Decentr Mainnet Validator Guide

Decentr
6 min readAug 4, 2021

--

Welcome to the Decentr Validator setup tutorial.

Running a Node

TLDR Requirements —

Step One

Step One will setup a Ubuntu VPS on Vultur.

Firstly, please go to https://vultr.com and register. You will need to add funds to the account as well.

Then go to the products page and set up your instance.

Choose a Cloud Compute and Ubuntu 21.10 x64 with 55GB SSD and 2 GB of RAM.

Once the instance shows as “Running”, select “Server Details”.

Click on the copy icon next to “Password” (username is root).

In the top right hand corner of the same page, please choose the ‘Terminal’ icon.

On the first launch of the console press special button (see screenshot below):

Enter your login (root) and then press ‘Enter’.

You should see the prompt for Password.

Throughout our tutorial you can just copy commands and paste them using the upper right hand corner button. Such as with password (don’t forget to press enter once you press ‘Send Clipboard’):

Congratulations! You are now ready to start installing Decentr.

Step Two

Firstly, update your VPS and install some required software by running the following commands

apt-get update -y && apt-get upgrade -yapt install software-properties-common nano git make ufw jq -ysudo apt install snapd

Create a new user to run the Decentr node services.

adduser decnode

Add your new user to the sudo’ers group (so it has the required permissions to run privileged commands).

adduser decnode sudo

Log in as your new user.

su - decnode

If you have previous version of Decentr installed please run the following commands:

rm -rf ~/.decentr

Step Three

Next we need to install GO and Decentr.

sudo snap install go --classicexport PATH=$PATH:$HOME/go/binecho export PATH=$PATH:$HOME/go/bin >> ~/.bashrc

Now we are ready to install Decentr!

All the commands are listed in our Readme on github (https://github.com/Decentr-net/decentr/blob/master/README.md ) but let’s walk through them one by one in this tutorial.

Clone Decentr from the latest release found here: https://github.com/Decentr-net/decentr/releases

1.5.7 is the latest at the moment

git clone -b v1.5.7 https://github.com/Decentr-net/decentr

Enter the folder Decentr was cloned into

cd decentr

Compile and install Decentr

make install

Make sure the correct version of decentrd installed by running

decentrd version

It should display 1.5.7

Initialize decentrd in ~/.decentr and name your node (In this case it’s NikitaNode but you can choose any name you like. This is the public name of your node, so choose it wisely)

decentrd init NikitaNode

You should see something like this:

Now for the slightly difficult part (but fun nonetheless!) — adding existing main seeds to the config file. For that we are going to use the text editor Nano

nano ~/.decentr/config/config.toml

Once you have entered this command your screen should look like this:

Don’t be intimidated, just scroll using your up and down arrows on the keyboard, and in the middle of the text you should see this:

Please insert one by one the following seeds (you can add just two but better to add them all) inside the “”, and separate them by commas like so:

7708addcfb9d4ff394b18fbc6c016b4aaa90a10a@ares.mainnet.decentr.xyz:26656,8a3485f940c3b2b9f0dd979a16ea28de154f14dd@calliope.mainnet.decentr.xyz:26656,87490fd832f3226ac5d090f6a438d402670881d0@euterpe.mainnet.decentr.xyz:26656,3261bff0b7c16dcf6b5b8e62dd54faafbfd75415@hera.mainnet.decentr.xyz:26656,5f3cfa2e3d5ed2c2ef699c8593a3d93c902406a9@hermes.mainnet.decentr.xyz:26656,a529801b5390f56d5c280eaff4ae95b7163e385f@melpomene.mainnet.decentr.xyz:26656,385129dbe71bceff982204afa11ed7fa0ee39430@poseidon.mainnet.decentr.xyz:26656,35a934228c32ad8329ac917613a25474cc79bc08@terpsichore.mainnet.decentr.xyz:26656,0fd62bcd1de6f2e3cfc15852cdde9f3f8a7987e4@thalia.mainnet.decentr.xyz:26656,bd99693d0dbc855b0367f781fb48bf1ca6a6a58b@zeus.mainnet.decentr.xyz:26656

Once you have entered those values then press ‘Ctrl+X’ on your keyboard and it will ask if you want to save, and then you press the letter ‘Y’ on your keyboard. and then press ‘Enter’.

Then run the following two commands:

Download genesis.json

wget -O $HOME/.decentr/config/genesis.json https://raw.githubusercontent.com/Decentr-net/mainnets/master/3.0/genesis.json

Start Decentrd

decentrd start

After around 1–2 minutes you should see something like this:

Congratulations!

This is your Decentr Node running! It is currently gathering information about all the blocks of the Decentr blockchain. Each moving line is a block ID number of transactions and height.

To make sure your node is running all the time set the node up as a service:

First we’ll create the service file:

sudo nano /lib/systemd/system/decentr_node.service

Paste this and save and exit again (Ctrl-X, Enter and Y):

[Unit]
Description=Decentr Daemon
After=network-online.target
[Service]
User=decnode
ExecStart=/home/decnode/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 decentr_nodesudo systemctl start decentr_node

To check if the service has started correctly use:

sudo journalctl -u decentr_node.service -f

And that’s it. You’re running a Decentr mainnet node.

Step Four

Now you have a working Decentr node, you can now start the validator process.

Firstly, you will need to import a wallet, which will give you a private key/public key pair for your node. Make sure you do it in a separate terminal or that node is running in background mode.

# Replace <your-key-name> with a name for your key that you will remember

decentrd keys add <your-key-name> -i

You will be asked to enter a BIP39 mnemonic. This is the phrase you generated during registration of your Decentr account.

If you don’t have a Decentr account, create a new one with the Decentr browser. Once the account is created you will need to swap ERC20 Dec to Native DEC and send it to your Native DEC address.

For the second question simply hit “Enter”:

Then you will be asked for a password for your key (enter at least 8 character password that you will remember):

To see a list of wallets on your node, type —

decentrd keys list

To see the options when creating a validator —

decentrd tx staking create-validator -h

An example, to create a validator with 100 DEC self-delegation and a 10% commission — Please be aware that you need 100k DEC to run so adjust accordingly!

# Replace <your-key-name> with the key you created previously.
# Replace <your-validator-name> with name you would like your validator node be known to everyone.

decentrd tx staking create-validator \
--amount=100000000udec \
--pubkey=$(decentrd tendermint show-validator) \
--moniker=<your-validator-name> \
--website="" \
--details="" \
--commission-rate="0.05" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1" \
--from=<your-key-name> \
--chain-id=mainnet-3 \
--gas=auto \
--gas-adjustment=1.4 \
--gas-prices="0.025udec"

After running this command you will be asked for a password you set for your key name 2 times.

To check on the status of your validator:

decentrd status | jq '.validator_info'

If you have completed all steps successfully, you will see something similar to “Congratulations! You are now a validator!”

Your validator should now be running and ready to receive delegations and you will be able to see it here — https://explorer.decentr.net

Note that only the top 100 validators by weighted stake (self-delegations + other delegations) are eligible for block rewards.

Official Links for Decentr:

Website: https://decentr.net
Twitter: https://twitter.com/DecentrNet
Telegram Group: https://t.me/DecentrNet
Telegram ANN: https://t.me/DecentrAnnouncements
Beta Testers: https://t.me/DecentrBetaTesters
Github: https://github.com/Decentr-net
Windows Browser: https://decentr.net/files/DecentrSetupUpdate.exe
OSX Browser: https://decentr.net/files/MacOS_X64_Decentr_1.0.0.zip
Linux Browser: https://decentr.net/files/Ubuntu_X64_Decentr_1.0.0.deb

--

--

Decentr
Decentr

Written by Decentr

Your data is value. Decentr makes your data payable and tradeable online. Decentr.net Medium.com https://rich-james.medium.com/ t.me/DecentrNet

Responses (1)