3. run 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 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' > ~/.terp/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.
Now, you can take a look at the following example to create your validator:
- Binary
- Docker
terpd tx staking create-validator \
--from <my-validator-account> \
--amount 1000000uterp \
--min-self-delegation 1000000uterp \
--commission-rate 0.01 \
--commission-max-rate 0.1 \
--commission-max-change-rate 0.01 \
--pubkey "$(terpd tendermint show-validator)" \
--chain-id <chain-id> \
--gas-adjustment 1.3 \
--gas auto \
--fees 30000uthiol
docker run --rm -it -v ~/.terp:/root/.terp terpnetwork/terpd:barberry 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 "$(terpd tendermint show-validator)" --chain-id chain-id> --gas-adjustment 1.3 --gas auto --fees 30000uthiol
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.