How to Become a Validator
This document explains the steps to become a validator on the Sunrise chain.
Prerequisites
Section titled “Prerequisites”Before operating a validator, you must set up a Full Consensus Node and be fully synchronized with the network.
Data Availability Verification
Section titled “Data Availability Verification”Setup Cosmovisor
Section titled “Setup Cosmovisor”For mainnet, it is strongly recommended to use Cosmovisor to run your node. Cosmovisor allows you to perform chain upgrades smoothly with minimal downtime.
Follow the Cosmovisor setup tutorial for details.
It is recommended to set the following environment variable to enable automatic upgrades:
export DAEMON_ALLOW_DOWNLOAD_BINARIES=trueBinary and Genesis File
Section titled “Binary and Genesis File”When setting up a validator, it is crucial to use the correct version of the binary and genesis.json.
- Binary: The latest binary can be downloaded from the GitHub releases.
- Genesis File: The
genesis.jsonfile is located in the network repository.
Creating a Validator
Section titled “Creating a Validator”There are two ways to create a validator: joining at genesis and joining after the chain has started.
Join as a Genesis Validator (Gentx)
Section titled “Join as a Genesis Validator (Gentx)”To join as a validator before the network starts (as a genesis validator), you need to generate and submit a gentx (genesis transaction).
For detailed instructions, please refer to the README in the sunriselayer/network repository.
Join as a Validator After the Chain Has Started
Section titled “Join as a Validator After the Chain Has Started”If the chain is already running, you can create a validator with the following method.
tx staking create-validator
Section titled “tx staking create-validator”This is the standard Cosmos SDK method, which uses a validator.json file to create a validator. This method requires vRISE for self-delegation. This method requires vRISE for self-delegation.
-
Get the Validator’s Public Key
Run the
sunrised tendermint show-validatorcommand to get the validator’s public key (pubkey).Terminal window sunrised tendermint show-validator -
Create the
validator.jsonfileCreate a
validator.jsonfile with the following content. Set thepubkeywith the value obtained above.{"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"oWg2ISpLF405Jcm2vXV+2v4fnjodh6aafuIdeoW+rUw="},"amount": "1000000uvrise","moniker": "myvalidator","identity": "optional identity signature (ex. UPort or Keybase)","website": "validator's (optional) website","security": "validator's (optional) security contact email","details": "validator's (optional) details","commission-rate": "0.1","commission-max-rate": "0.2","commission-max-change-rate": "0.01","min-self-delegation": "1"}- The
amountis specified inuvrise. - The
min-self-delegationis also the amount ofvRISE.
- The
-
Send the
create-validatortransactionTerminal window sunrised tx staking create-validator path/to/validator.json --from <keyname> --chain-id <chain-id> --gas="auto" --gas-prices=<gas-prices> -yUsage:
Terminal window sunrised tx staking create-validator [path/to/validator.json] [flags]
Backup
Section titled “Backup”Backing up key files is crucial for validator operations. Please back up the following files to a secure location:
~/.sunrise/config/priv_validator_key.json~/.sunrise/config/node_key.json
It is strongly recommended to encrypt these backup files.