The latest arweave release (arweave-2.9.5-alpha1
) includes a new entry-point
to control arweave node.
Here the procedure used to check if a multi-node configuration can work with the latest arweave release. The first step is to prepare the environment with the latest release from the binary.
# prepare and fetch the release
mkdir /opt/t
cd /opt/t
wget https://github.com/ArweaveTeam/arweave/releases/download/N.2.9.5-alpha1/arweave-2.9.5-alpha1.linux-x86_64.tar.gz
tar zxvf arweave-2.9.5-alpha1.linux-x86_64.tar.gz
the file releases/2.9.5-alpha1/vm.args.src
must be patched to allow dynamic variable
configuration from environment. The patch function is used here, and should be applied
only on a fresh installation. This snippet will simply update these two lines:
-name ${NAME:-arweave@127.0.0.1}
-setcookie ${COOKIE:-arweave}
# patch the file
cat | patch -u releases/2.9.5-alpha1/vm.args.src - << 'EOF'
--- vm.args.src 2025-03-13 16:47:22.982251812 +0000
+++ vm.args.src2 2025-03-13 16:47:09.566189432 +0000
@@ -12,10 +12,10 @@
## schedulers that will be used, to do that: +S 16:16
######################################################################
## Name of the node
--name arweave@127.0.0.1
+-name ${NAME:-arweave@127.0.0.1}
## Cookie for distributed erlang
--setcookie arweave
+-setcookie ${COOKIE:-arweave}
## This is now the default as of OTP-26
## Multi-time warp mode in combination with time correction is the
EOF
A first node is started, it will use TCP/1984
and
/opt/arweave_data1
.
# first node:
touch config1.json
NAME=a@127.0.0.1 ./bin/arweave console config1.json
A second node is started. this time, it will use
TCP/1985
and /opt/arweave_data2
.
# second node:
touch config2.json
NAME=b@127.0.0.1 ./bin/arweave console config2.json
To be sure, curl is then used. Both nodes are working correctly
$ curl localhost:1984; echo
{"version":5,"release":81,"queue_length":0,"peers":598,"node_state_latency":1,"network":"arweave.N.1","height":1628135,"current":"X6j1_GgRPK4DZhrt2wXt-EI4E4LCJ2capBpmysJZ9dyIv1Ov6E4x07i9cZETHAyt","blocks":8434}
$ curl localhost:1985; echo
{"version":5,"release":81,"queue_length":0,"peers":316,"node_state_latency":1,"network":"arweave.N.1","height":1628135,"current":"X6j1_GgRPK4DZhrt2wXt-EI4E4LCJ2capBpmysJZ9dyIv1Ov6E4x07i9cZETHAyt","blocks":933437}
A check can also be done using the entry-point:
NAME=a@127.0.0.1 ./bin/arweave ping
# should return pong
NAME=b@127.0.0.1 ./bin/arweave ping
# should return pong
A quick summary:
- your nodes are not sharing the same configuration files and/or parameters that could collide (ie
data_dir
) - ensure
data_dir
is different for both nodes (in the previous example, one node was using/opt/arweave_data1
and the second/opt/arweave_data2
) - ensure
port
is different for both nodes (in the previous example, one node was listening onTCP/1984
and the other onTCP/1985
) - ensure
NAME
andCOOKIE
variables are correctly configured - ensure
epmd
has been correctly started and is correctly configured in doubt:pkill epmd
- ensure the variables have been correctly configuration (ie
${NAME:-default_value}
)