How do I become a validator?

Running a node is a long term commitment, and recommended to those with Linux terminal experience.

TLDR Requirements —

Step One

Setup a Ubuntu VPS on Vultur.

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

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

Choose Cloud Compute and Ubuntu 21.10 with a 80GB SSD, and 2 GB of RAM.

Once the instance shows that it is “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, click the ‘Terminal’ icon.

On the first launch of the console, click the 'Send CtrlAltDel' button (see screenshot below):

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

You should see the prompt for Password.

Throughout this 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 the 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 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 a previous version of Decentr installed, please run the following commands:

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

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 <a href="https://github.com/Decentr-net/decentr">https://github.com/Decentr-net/decentr</a>

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

[email protected]z:26656,[email protected]r.xyz:26656,[email protected].xyz:26656,[email protected]z:26656,[email protected]xyz:26656,[email protected]tr.xyz:26656,[email protected]r.xyz:26656,[email protected]entr.xyz:26656,[email protected]xyz:26656,[email protected]z: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]<br>Description=Decentr Daemon<br>After=network-online.target[Service]<br>User=decnode<br>ExecStart=/home/decnode/go/bin/decentrd start<br>Restart=always<br>RestartSec=3<br>LimitNOFILE=4096[Install]<br>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

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

# Replace 100000000udec with your desired amount for self-bonding. (Minimum 1000 DEC)

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

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.