May 30, 2024

Validator Guide

Prerequisite

Linux server with at least 2GB RAM and 100GB SSD/HDD.

Golang 1.20

Join our Discord server and get a role to stay up to date with all information.

Staking Currency

Staking currency of Scorum Network is Scorum Power (SP). This currency is also used for the initial creation of the validator.


Scorum power is obtained by converting SCR for it in a ratio of 1 to 1. Conversion can be performed by any registered user within his own scr balance. User's funds are converted immediately. In order to convert SCR for Scorum Power, the following command can be used:

scorumd tx scorum convert-scr2sp [amount] [flags]

Guide

The present guide had been written for Ubuntu 20.04

Environment preparation

Create user to run scorumd as a service

adduser scorumnode
adduser scorumnode sudo

Switch user to scorumnode

su - scorumnode
Install golang

rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.7.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
echo export PATH=$PATH:/usr/local/go/bin >> ~/.bashrc

Install scorumd

Remove old sources if exist

rm ~/.network

Clone network source code repo to the current directory (should be scorumnode user's home)

git clone -b <version> https://github.com/scorum/cosmos-network

Change directory

cd cosmos-network

Install scorumd

make install

Verify installed version is up-to-date

scorumd version

It should display v1.0.0

Prepare scorumd node

First we need to initialise a node’s home directory. Change <moniker> to your preferred value.

scorumd init <moniker>

After that you need to open the config file that can be found at ~/.scorumd/config/config.toml. We will use nano to edit the config.

nano ~/.scorum/config/config.toml

Now find a line with seeds parameter and change it.

Find seeds = "" line by pressing CTRL+W and typing the search text. You will be moved to the proper line and now you need to change to

seeds = "<seeds>"

Save changes by pressing CTRL+X, Y, ENTER.

Next step is to download genesis.json and to replace initialised one

wget -O $HOME/.scorum/config/genesis.json <genesis file url>

Verify node setup

scorumd start

After some you it should display blocks being synchronised

Stop the running node by pressing CTRL+C twice.

Seeds

MainNet:

7c0008a9d13cbfc2672bc241547b3219b9fa6cca@scorum-blockchain-mainnet-p2p-1.scorum.com:26656

68e34a95b67f28d4b9c25a1fe3d2bdde4b921187@scorum-blockchain-mainnet-p2p-2.scorum.com:26656

0f97a484fcd027cf57243b21c3ebe21d02605657@scorum-blockchain-mainnet-p2p-3.scorum.com:26656

a75acca4c04f05b62a323c6492870cb988b1505f@scorum-blockchain-mainnet-p2p-4.scorum.com:26656

Genesis files

MainNet:

https://raw.githubusercontent.com/scorum/cosmos-network/main/genesis/mainnet/genesis.json

Run node as a service

Create service config by

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

Paste service configuration from the snippet

[Unit]
Description=Scorumd Service
After=network-online.target
[Service]
User=scorumnode
ExecStart=/home/scorumnode/go/bin/scorumd start
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target

Now save changes by pressing CTRL+X, Y, ENTER.

Enable and start service

sudo systemctl enable scorum_node
sudo systemctl start scorum_node

Verify node is running by looking at logs

sudo journalctl -u scorum_node.service -f

Stop following logs with CTRL+C

Create validator

First you need to import your key to the keychain.

scorumd 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 Scorum account.

If you don’t have one register it and get some SCR to convert it to SP.

To see options you have for MsgCreateValidator transaction

scorumd tx staking create-validator -h

In this guide we create a validator with self-delegated 100sp and pretty default commission settings

scorumd tx staking create-validator \
--amount=100000000000nsp \
--pubkey=$(scorumd tendermint show-validator) \
--moniker=<your-validator-name> \
--website="" \
--details="" \
--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=<chain-id> \
--gas=auto \
--gas-adjustment=1.4

To check on the status of your validator:

scorumd status | jq '.validator_info'

Withdraw validator rewards

Validator rewards can be checked and withdrawn by using the next commands:

Check rewards:

scorumd query distribution commission <validator address>

Withdraw rewards:

scorumd tx distribution withdraw-rewards <validator address> --from <key-name> --commission --fees 300000gas --chain-id=scorum-1