We’re doing another testnet, surprise, surprise 😉
This time we’re helping out the good folks over at DECENTR, which is an awesome project, definitely worth checking out if you don’t know it.
This guide is a compressed version of the original medium post by DEC, you can find that here, and information from the telegram channel and some additional touches by myself.
Get yourself an Ubuntu 20.04 VPS from your favorite VPS provider conforming to the minimum requirements. Start putty and connect with the information provided by your VPS provider.
Remember, pasting in putty is done with Right-Click of the mouse, copying you do by selecting the text with your mouse (nothing else, just selecting).
Ok, here we go:
- Update the system:
sudo apt-get update
sudo apt-get upgrade
- Install Go:
sudo apt install snapd
sudo snap install go --classic
export PATH=$PATH:/root/go/bin
echo 'export PATH=$PATH:/root/go/bin' >> ~/.bashrc
- Install Decentr testnet node:
sudo apt install git
git clone -b v1.3.8 https://github.com/Decentr-net/decentr
cd decentr/
sudo apt install make
make install
- Initialize & configure your node:
Now we need to initialize the node, replace <NODE_NAME> below with a name of your choosing, just make sure it doesn’t have any spaces:
decentrd init <NODE_NAME>
- Change config.toml:
sudo nano ~/.decentrd/config/config.toml
find the seeds line down near the end of the document and replace it with this:
seeds = "95a70f0119af52e54697fa7feb8b09b4e7c7ec21@ares.testnet.decentr.xyz:26656,b6d499b2b0146627b9bf6f33a9a7e4013312c6d1@hera.testnet.decentr.xyz:26656,576d044b24cc449366850a95f7616f03ab8d14b3@hermes.testnet.decentr.xyz:26656,c98511455134b4450ebb20fce57308a9fb300b89@poseidon.testnet.decentr.xyz:26656,acc5524b4ff34591357a28d5fccf4efb5ad883c5@zeus.testnet.decentr.xyz:26656"
Save and exit from nano (Ctrl-X and then Y). We’re almost done.
- Download the genesis.json:
wget -O $HOME/.decentrd/config/genesis.json https://raw.githubusercontent.com/Decentr-net/testnets/master/1.3.8/genesis.json
And start your node:
decentrd start
If everything went ok you should mostly see stuff like this:
It will take a little bit for the node to catch up, but that’s no problem. You can cancel the node with Ctrl-C and restart it with decentrd start
again.
- To make things a bit easier you can also set the node up as a service:
First we’ll create the service file:
sudo nano /lib/systemd/system/dec_node.service
Paste this and save and exit again (Ctrl-X, Enter and Y):
[Unit]
Description=Decentr Testnet Node
After=network-online.target
[Service]
User=root
ExecStart=/root/go/bin/decentrd start
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
Now all we need to do is enable and start it:
sudo systemctl enable dec_node
sudo systemctl start dec_node
To check if the service has started correctly use:
sudo journalctl -u dec_node.service -f
And that’s it. You’re running a Decentr testnet node. Make sure to check in the telegram channel regularly for any updates: DecentrBetaTesters & Node Runners
p.s. If you see your node crashing with this error:
This should be fixed in the current v1.1.0 version, so if it does occur please let the team know.
CONSENSUS FAILURE!!! module=consensus err="enterPrecommit: +2/3 prevoted for an invalid block: wrong Block.Header.AppHash. Expected A0B2CF50C30F794BABAD5BD00BD5301F18F29EF000D4F01E4FA34D403DA301F8, got C69AB2F98B5A9BFE3466CC80847567715C9DB741359A3A3B78EC1FD7BA997255"
This is a know error, but will crash your node currently. To fix this you’ll need to reset your node and resync.
First, if you haven’t already, stop the node service:
sudo systemctl stop dec_node
Then reset the node:
decentrd unsafe-reset-all
If you get a ‘command not found’ error run the following again:
export PATH=$PATH:/root/go/bin
echo 'export PATH=$PATH:/root/go/bin' >> ~/.bashrc
Now we can start the node again and let it sync:
sudo systemctl start dec_node
p.p.s. here’s some useful links during testnet:
- Current block height: zeus.testnet.decentr.xyz:26657/abci_info
- Connected testnet nodes: zeus.testnet.decentr.xyz:26657/net_info (search for your node name if you want to make sure you’re connected after your synched)
- Connected testnet validators: https://zeus.testnet.decentr.xyz/staking/validators
One Reply to “DECENTR Testnet node setup”
[…] This guide is a compressed version of the original medium post by DEC, you can find that here, and mostly a copy of the DECENTR Testnet node setup guide. […]