SLPDB
SLPDB copied to clipboard
Nodejs v16 update instructions (maybe faster but uses more RAM, supports ripemd160)
Line 30 of package.json can be set to:
"@types/node": "16.11.7",
This line assumes we all update to nodejs v16. I've verified it works with 16.16.0
, not just 16.11.7
. Why v16? v17 no longer supports ripemd160 (by default), so v16 is the newest (& prob fastest) node which works straight away. I verified v18 won't work by default. The OpenSSL-3 issue is well-known.
Why update? Speed is critical for syncing new instances. If I have to wait another 5 weeks, a speed-up of just 3% is over a full day's work. SLPDB README could provide instructions to operators for a smooth update, or else maybe have a separate package.json for v16 versus v10 etc. The following terminal commands worked for me, resulting in npm (& npx) v8.11.0 & nodejs v16.16.0 in Debian.
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install nodejs
sudo npm rebuild
npm install --force
Last line (or two) may be optional.
v16 feels slightly faster than v12 imo, but it does cause more RAM usage. I have a running sync journal on Reddit (here), where I've reported a RAM increase from 21 GiB to 29 GiB shortly after updating nodejs.