This site requires Javascript to be enabled.
  • Docs
  • Run a node
  • Run a validator node

Running a Validator Node

This guide shows how to set up a node, run that node and create your validator.

You will need to use the Networks page to find information like the <chain-id> and <rpc-url> of the network you would like to connect to.

It is recommended to run the node using Cosmovisor, as this is the current best practice to run a validator.

Running your validator

The first step is to run a node. See the Node Installation and Joining a Network guides for instructions on how to get your node up and running.

Make sure to initialize your node and add your keys.

After your node is running and synced, you can create a validator by staking tokens.

Run a validator pre-genesis

Firstly, make sure you have properly installed and configured your node.

In order to set up a validator before the genesis block, a genesis transaction that includes your validator account is needed.

You can add the genesis account by setting the number of coins to stake:

Binary

Docker

archwayd add-genesis-account "$(archwayd keys show my-validator-account -a)" 10000000000000000000aarch

Info

Your account must have an equal amount of coins that match the bond denomination ("bond_denom") in your genesis file.

// genesis.json"staking": {  "params": {    "unbonding_time": "1814400s",    "max_validators": 100,    "max_entries": 7,    "historical_entries": 10000,    "bond_denom": "aarch" // "aarch" is the bond denomination of the Triomphe testnet  },}

Create your validator

To make the node into a validator, you need to create a validator transaction by running the command below:

Binary

Docker

  archwayd gentx my-validator-account 9500000000000000000aarch --commission-rate 0.01 --commission-max-rate 0.1 --commission-max-change-rate 0.1  --pubkey "$(archwayd tendermint show-validator)" --chain-id archway-1 --fees 180000000000000000aarch

Warning

Validators must add the --fees flag in this step. This step is not a standard Cosmos SDK requirement, and it is specific to Archway. Validators need to make sure to add the --fees 180000000000000000aarch flag, otherwise they won't be able to go active. 180000000000000000aarch is the minimum recommended value.

Add transaction to genesis file

Now, you can add the generated bonding transaction to the genesis file:

Binary

Docker

archwayd collect-gentxs

Start validator node

Now, you can start the validator node:

Binary

Docker

archwayd start

Run a validator post-genesis

Retrieve the genesis file

To retrieve the genesis file, install jq (lightweight and flexible command-line JSON processor). Run the below command to retrive the genesis file:

curl -s "<rpc-url>/genesis" | jq '.result.genesis' > ~/.archway/config/genesis.json

This will replace the default genesis file with the one connected to the network you are joining.

After having followed the instructions to join a network and your running node is synced, you can create a validator by executing the create-validator command. Please make sure to create a validator only once the node is fully synced, so that you avoid being slashed.

Info

If you ran the previous command in interactive mode, you must run the following command in a separate terminal window. You can also use screen, to detach your shell from processes by virtual shells.

Now, you can take a look at the following example to create your validator:

Binary

Docker

archwayd tx staking create-validator --from <my-validator-account> --amount 1000000000udenom --min-self-delegation 1000000000udenom --commission-rate 0.01 --commission-max-rate 0.1 --commission-max-change-rate 0.1 --pubkey "$(archwayd tendermint show-validator)" --chain-id <chain-id> --gas auto --gas-adjustment 1.3 --gas-prices $(archwayd q rewards estimate-fees 1 --output json | jq -r '.gas_unit_price | (.amount + .denom)')

For example, in the case of Triomphe mainnet, you would run:

Binary

Docker

archwayd tx staking create-validator --from <my-validator-account> --amount 10000000000000000000aarch --min-self-delegation 10000000000000000000aarch --commission-rate 0.01 --commission-max-rate 0.1 --commission-max-change-rate 0.1 --pubkey "$(archwayd tendermint show-validator)" --chain-id archway-1 --gas auto --gas-adjustment 1.3 --gas-prices $(archwayd q rewards estimate-fees 1 --output json | jq -r '.gas_unit_price | (.amount + .denom)')

And in the case of Constantine testnet, you would run:

Binary

Docker

archwayd tx staking create-validator  --from cool-validator --amount 10000000000000000000aconst --min-self-delegation 10000000000000000000aconst --commission-rate 0.01 --commission-max-rate 0.1 --commission-max-change-rate 0.1 --pubkey "$(archwayd tendermint show-validator)" --chain-id constantine-3 --gas auto --gas-adjustment 1.3 --gas-prices $(archwayd q rewards estimate-fees 1 --output json | jq -r '.gas_unit_price | (.amount + .denom)')

Next steps

Great! Now, make sure you monitor your validator. Monitoring the validator will help to prevent getting slashed, and ensure higher reliability to your validating operations.

Drop Camp is here!

Join the queue and be one of the first to get in!.

Go Camping ↗