Decentr Mainnet Validator Guide

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 20.10 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 ~/.decentrd
rm -rf ~/.decentrcli

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.4.6 is the latest at the moment, but we will need to start with 1.4.5 first

git clone -b v1.4.5 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.4.5

Initialize decentrd in ~/.decentrd 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 ~/.decentrd/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:

f9b77dd93f28d2a45b00d4e3041b89a3c08788ef@calliope.mainnet.decentr.xyz:26656,987b5ce87b1b922793069756f594533eedf0f060@euterpe.mainnet.decentr.xyz:26656,2caebc4dad8d2ff95400918572d455392e10a63c@hera.mainnet.decentr.xyz:26656,c37f32e202e13b0725515570f794b68573a6f58c@hermes.mainnet.decentr.xyz:26656,4520b3221c91fa98a947a4c7f518ba5aab4e5b08@melpomene.mainnet.decentr.xyz:26656,c17bc88591115e52a686811630ad8c053de19f83@poseidon.mainnet.decentr.xyz:26656,c4ba719d38c871a93fb06cbfe0891ab11fedb9f7@terpsichore.mainnet.decentr.xyz:26656,9e9e0243610fadc0f65d3d927e2d682d86f71ea9@thalia.mainnet.decentr.xyz:26656,e1f3ce208776ff1fad0e8190f5475b68e841d788@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/.decentrd/config/genesis.json https://raw.githubusercontent.com/Decentr-net/mainnets/master/1.0/genesis.json

Start Decentrd

decentrd start

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

You will need to wait till block 145000 is achieved and then you can go ahead and upgrade to 1.4.6 — At any time you can press ‘Cntrl+C’ and this will pause the operation and you can maintain the machine and change configurations.

Use the following commands to upgrade

git clone -b v1.4.6 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 say 1.4.6

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.

The height is around 200k right now so it might take some time to get the chain replicated. At any time you can press ‘Cntrl+C’ and this will pause the operation and you can maintain the machine and change configurations. To resume, execute the last command:

decentrd start

Top 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

decentrcli 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 —

decentrcli keys list

To see the options when creating a validator —

decentrcli 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.

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

Here is the same command with easier format for copying:

decentrcli tx staking create-validator --amount=100000000udec --pubkey=$(decentrd tendermint show-validator) --moniker=<your-validator-name> --website="optional website for your validator" --details="optional details for your validator" --commission-rate="0.10" --commission-max-rate="0.20" --commission-max-change-rate="0.01" --min-self-delegation="1" --from=<your-key-name> --chain-id=mainnet-1 --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:

decentrcli status --output json | 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

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

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