⚙️Setting up a Validator Node

PREREQUISITES:

Before you begin this guide, you will need an Ubuntu server set up with sudo privileges and a firewall enabled to block non-essential ports & the Egochain node installed & synced to the network

Creating an Account

WARNING:

Never create your mainnet validator keys using a test keying backend. Doing so might result in a loss of funds by making your funds remotely accessible via the eth_sendTransaction JSON-RPC endpoint.

- egaxd keys add <key_name> --home ~/.egaxd1 

If you're looking to obtain a public address beginning with "0x" you can start by executing the following command to retrieve the private key corresponding to your key.

- egaxd keys unsafe-export-eth-key <key_name>

Next step will be to import the private key you obtained into a wallet (such as Metamask) in order to retrieve the public address.

After which, you'll need to obtain some $EGAX tokens either through a wallet transfer or by buy from exchange before submitting your validator account address.

egaxd tx staking create-validator \ 
--amount=1000000000000000000egax \ 
--pubkey=$(egaxd tendermint show-validator) \ --moniker="choose a moniker" \ 
--chain-id=<chain_id> \ 
--commission-rate="0.05" \ 
--commission-max-rate="0.10" \ --commission-max-change-rate="0.01" \ --min-self-delegation="1000000000000000000" \ 
--gas="5000000" \ 
--gas-prices="50000000000egax" \ 
--from=<key_name>

Checking that it is in the Validator set

egaxd q staking validators -o json --limit=1000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '.tokens + " - " + .description.moniker' | sort -gr | nl

Distribution: Withdraw Rewards

egaxd tx distribution withdraw-all-rewards --from <key_name> --chain-id egax_5439-1 --gas-adjustment 1.4 --gas-prices 50000000000egax --gas 5000000 -y

Unbond/Unstake tokens from your validator

egaxd tx staking unbond $(egaxd keys show wallet --bech val -a) 1000000000000000000egax --from <key_name> --chain-id egax_5439-1 --gas 5000000 --gas-prices 50000000000egax -y

Unjailing a Validator

When a validator is "jailed" for downtime, you must submit an Unjail transaction from the operator account in order to be able to get block proposer rewards again (depends on the zone fee distribution).

egaxd tx slashing unjail --from <key_name> --chain-id egax_5439-1 --gas 5000000 --gas-prices 50000000000egax -y

Jail Reason

egaxd query slashing signing-info $(egaxd tendermint show-validator)

List all active validators

egaxd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl

List all inactive validators

egaxd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl

View validator details

egaxd q staking validator $(egaxd keys show <key_name> --bech val -a)

Delegate tokens to yourself

egaxd tx staking delegate $(egaxd keys show <key_name> --bech val -a) 1000000egax --from <key_name> --chain-id egax_5439-1 --gas 5000000 --gas-prices 50000000000egax -y

Delegate tokens to another validator

egaxd tx staking delegate <TO_VALOPER_ADDRESS> 1000000egax --from <key_name> --chain-id egax_5439-1 --gas 5000000 --gas-prices 50000000000egax -y

Re-delegate tokens to another validator

egaxd tx staking redelegate $(egaxd keys show <key_name> --bech val -a) <TO_VALOPER_ADDRESS> 1000000egax --from <key_name> --chain-id egax_5439-1 --gas 5000000 --gas-prices 50000000000egax -y

Last updated