I need some help installing a local instance of mempool.space, hoping some of you with experience can chime in.
I've installed all the dependencies using
apt, so they should all be stable LTS versions. I also installed npm.
I am trying to run this on separate hardware than my bitcoind and electrumx services. On the mempool machine I set up the config file with the node server's local IP, and an rpc password generated using rpcauth.py. On the node server I added the user authorization to the bitcoin.conf file, opened the applicable ports in ufw, and set port routing in my router. I double checked all that over and over, so I'm sure that's not presenting any issues.
I installed nodejs and mariadb only on the machine that'll be running mempool, not on the machine running bitcoind/electrumx.
Here's the error I get when trying to run the backend:
direwolf@mempoolserver:/usr/local/bin/mempool/backend$ sudo npm run start
>
[email protected] start /usr/local/bin/mempool/backend
> node --max-old-space-size=2048 dist/index.js
/usr/local/bin/mempool/backend/dist/index.js:24
wss;
^
SyntaxError: Unexpected token ;
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR!
[email protected] start: `node --max-old-space-size=2048 dist/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the
[email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-09-26T23_59_21_850Z-debug.log
Here's my mempool-config.json file. I only changed the rpc password in two places, and the IP address in thee places (as shown below.)
{
"MEMPOOL": {
"NETWORK": "mainnet",
"BACKEND": "electrum",
"HTTP_PORT": 8999,
"SPAWN_CLUSTER_PROCS": 0,
"API_URL_PREFIX": "/api/v1/",
"POLL_RATE_MS": 2000,
"CACHE_DIR": "./cache",
"CLEAR_PROTECTION_MINUTES": 20,
"RECOMMENDED_FEE_PERCENTILE": 50,
"BLOCK_WEIGHT_UNITS": 4000000,
"INITIAL_BLOCKS_AMOUNT": 8,
"MEMPOOL_BLOCKS_AMOUNT": 8,
"PRICE_FEED_UPDATE_INTERVAL": 3600
},
"CORE_RPC": {
"HOST": "",
"PORT": 8332,
"USERNAME": "mempool",
"PASSWORD": ""
},
"ELECTRUM": {
"HOST": "",
"PORT": 50002,
"TLS_ENABLED": true
},
"ESPLORA": {
"REST_API_URL": "http://127.0.0.1:3000"
},
"CORE_RPC_MINFEE": {
"ENABLED": false,
"HOST": "",
"PORT": 8332,
"USERNAME": "mempool",
"PASSWORD": ""
},
"DATABASE": {
"ENABLED": true,
"HOST": "127.0.0.1",
"PORT": 3306,
"DATABASE": "mempool",
"USERNAME": "mempool",
"PASSWORD": "mempool"
},
"SYSLOG": {
"ENABLED": true,
"HOST": "127.0.0.1",
"PORT": 514,
"MIN_PRIORITY": "info",
"FACILITY": "local7"
},
"STATISTICS": {
"ENABLED": true,
"TX_PER_SECOND_SAMPLE_PERIOD": 150
},
"BISQ": {
"ENABLED": false,
"DATA_PATH": "/bisq/statsnode-data/btc_mainnet/db"
}
}
Thanks in advance.