Node
This guide was created for Autonomys Taurus Testnet and will be updated once mainnet is launched.
Introduction
System Requirements
Download Node Executables
Organization
Create a folder labeled 'autonomys' in the home directory, with a subfolder for the Node
mkdir -p ~/autonomys/node
This folder will store the executables and the Node data.
Download the Latest version
Currently, the Taurus (testnet) network is the best option to run your Node on. Navigate to the Subspace Releases page and look for the entry with the Latest
tag. Then identify the correct file to download under the "Assets" section. Make sure to click "show more assets" at the bottom if the correct file is not showing.
- For Ubuntu with non-ARM Intel Skylake/AMD Ryzen processes you will want to download the file that starts with
subspace-node-ubuntu-x86_64
- For Ubuntu with non-ARM CPUs that were released before Skylake/Ryzen CPUs and after ~2009 download the file that starts with
subspace-node-ubuntu-v2
- For Ubuntu with ARM CPUs download the version that starts with
subspace-node-ubuntu-aarch64
- For all other Ubuntu setups you will need to manually compile your executables which falls outside the scope of this wiki.
Once the appropriate asset has been identified, right click and copy the link. The latest version at the time of this wiki is subspace-node-ubuntu-x86_64-skylake-taurus-2024-oct-24
and it will be used as an example in this wiki.
Use wget
to download the asset to the Node folder
wget -P ~/autonomys/node https://github.com/autonomys/subspace/releases/download/taurus-2024-oct-24/subspace-node-ubuntu-x86_64-skylake-taurus-2024-oct-24
Make it executable
chmod +x ~/autonomys/node/subspace-node-ubuntu-x86_64-skylake-taurus-2024-oct-24
Launching the Node
The following is the most basic way to launch a node - replace subspace-node-ubuntu...
with the actual file downloaded. Logging is also enabled via tee
and will create a node-logs.log
file in the node
subfolder.
./subspace-node-ubuntu-x86_64-skylake-taurus-2024-oct-24 \
run \
--chain taurus \
--base-path "./" \
--name "<YOUR_NODE_NAME>" \
--prometheus-listen-on 127.0.0.1:9080 \
--farmer | tee -a ~/autonomys/node/node-logs.log
To store the Node data in a different directory, specify the location where it should be stored with the --base-path
.
Once the Node is started two directories will be created: "network" & "db". It may take some time but eventually
the Node will perform a snap-sync
and jump to an almost fully synced state. Depending on the network size it can take some time to sync, but the snap sync should reduce the overall time. Peers should slowly increase to around 40 if your ports are forwarded correctly.
Additional Parameters
If your Farmer will be on a different PC than your Node, you must add a few more parameters:
--rpc-listen-on 0.0.0.0:9944
--rpc-methods unsafe
--rpc-cors all
Tips and Tricks
Using a Deployment Script
To make life easier, a simple shell script can be used. Start by opening up the script in the node
directory with nano
nano ~/autonomys/node/node.sh
Then paste in the following script - making sure to update the executable
#!/bin/bash
# Variables
NODE_EXEC="$HOME/autonomys/node/subspace-node-ubuntu-x86_64-skylake-taurus-2024-oct-24"
CHAIN="taurus"
BASE_PATH="$HOME/autonomys/node/"
NODE_NAME="hakehardware-tutorial"
LOG_LOCATION="$HOME/autonomys/node/node-logs.log"
# Run the command
$NODE_EXEC run \
--chain $CHAIN \
--base-path $BASE_PATH \
--name $NODE_NAME \
--prometheus-listen-on 127.0.0.1:9080 \
--farmer | tee -a $LOG_LOCATION
Make the file executable
chmod +x node.sh
Run the Node
~/autonomys/node/node.sh
As versions change you can update the NODE_EXEC, CHAIN, etc.. This makes it a lot easier to deploy and manage your Node
Using TMUX to Persist Your Session
As you may have noticed, closing your Node will exit the Node and stop it from running. You can create a session with TMUX to persist the session even if you close it. Ubuntu typically has TMUX installed, if needed, install it via apt
sudo apt install tmux
Then create a new session called 'node'
tmux new -s node
Then execute your script inside the TMUX session
~/autonomys/node/node.sh
To exit the TMUX session without closing it detach from it with CTRL + b
and then d
for detach. The SSH session can now be safely disconnected and the TMUX session will persist. To confirm, log back into the session
tmux attach -t node
If the session name is forgotten, all sessions can be listed
tmux ls
Final Notes
- The Node must be running and synced with the network for the Farmer work
- The Farmer (or Controller if using a Cluster) will need to connect to the Node, so if your Node will be on a different PC, take note of the IP address of your Node with
ip a