# Replace <your-moniker> with the publicly viewable name for your validator.anathadinit--chain-idmainnet<your-moniker>
Set up your keys
# Create a wallet for your node. <your-wallet-name> is just a human-readable name you can use to remember your wallet. It can be the same or different than your moniker.
anathaclikeysadd<your_wallet_name>--keyring-backendtest# If you have a wallet with a balance assigned to it, you need to import it by. You will be prompted to enter your bip39 mnemonic
anathaclikeysadd<your_wallet_name>--recover--keyring-backendtest
ls-las~/.anathad/upgrade_manager/genesis/bin# Should return the anathad binary in the correct location
Fetch the genesis file
# Copy the genesis file to the anathad directorycurlhttps://guardians.mainnet.anatha.net:26657/genesis|jq".result.genesis">~/.anathad/config/genesis.json
Create the service file with the following content
If you are not logged in as the ubuntu user and/or if your home directory is not /home/ubuntu, please change the User, Group, Environment, and ExecStart variables in the service config above appropriately.
Start the Daemon service
# Create log files for anathadmakelog-files# Enable the anathad servicesudosystemctlenableanathad# Add seed nodes to ~/.anathad/config/config.toml, replace line 172 withseeds = "aed92dab9de41325b1d0ed39b0d4fc30c6192868@node101.mainnet.anatha.net:26656,f54086e191a9735bbaca614ae91124fd1407f77f@node201.mainnet.anatha.net:26656,05e2de3ff3249216c4043922ad744c8abb9f45eb@node301.mainnet.anatha.net:26656"
# Start the nodesudosystemctlstartanathad
To check on the status of the node use:
anathaclistatus# orsudojournalctl-uanathad-f
To view the logs use:
# Standard output of anathadtail-f/var/log/anathad/anathad.log# Standard error of anathadtail-f/var/log/anathad/anathad_error.log
Applying for being a validator
# Create the validator# Be sure to replace <your-wallet-name>, <your-moniker>anathacli tx astaking create-validator --from <your-wallet-name> --moniker <your-moniker> --pubkey $(anathad tendermint show-validator) --chain-id mainnet --keyring-backend test
Verify the node is in the validator list
# Check all validatorsanathacliqastakingvalidators# Check current validator# Be sure to replace <your-wallet-name>anathacli q astaking validator $(anathacli keys show <your-wallet-name> --keyring-backend test --bech val -a) --chain-id mainnet
Recovering From a Slashing Infraction
First, you need to verify the state of your validator by running:
# Check current validator# Be sure to replace <your-wallet-name>anathacli q astaking validator $(anathacli keys show <your-wallet-name> --keyring-backend test --bech val -a) --chain-id mainnet
As you can see the jailed status is set to true and the delegation tokens are below the needed amount. You need to perform top up your token balance and send an unjail transaction.
To check when is the earliest time the validator can be unjailed run:
# Be sure to replace <your-wallet-name>anathacli tx astaking delegate $(anathacli keys show <your-wallet-name> --keyring-backend test --bech val -a) --from <your-wallet-name> --chain-id mainnet --keyring-backend test
To unjail your validator run:
# Be sure to replace <your-wallet-name>anathaclitxslashingunjail--from<your-wallet-name>--keyring-backendtest--chain-idmainnet
Stopping a Validator Node
To gracefully shutdown a validator node which is in the active validator set, the operator must first unbond their tokens before being able to shut down the node and withdraw their stake.
# Be sure to replace <your-wallet-name>anathaclitxastakingunbond--from<your-wallet-name>--chain-idmainnet--keyring-backendtest
After running the unbonding transaction, you need to check the length of the unbonding time by running:
anathacliqastakingparams
After that period of time, your stake will be returned to your account. During the unbounding period, you can be slashed for any infraction that happened before the unbonding transaction.
As soon as you run the unbond transaction, you are free to shut down your validator node.