# Install latest go version https://golang.org/doc/install
wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash -s -- --version 1.15.3
source ~/.profile
To verify that Golang is installed:
go version
# Should return go version go1.15.3 linux/amd64
Running a Validator Node
Install the executables
git clone https://github.com/anathatech/project-anatha.git
cd project-anatha
git checkout v0.1.1
# install executables
make install
Initialize the validator
# Replace <your-moniker> with the publicly viewable name for your validator.
anathad init --chain-id mainnet <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.
anathacli keys add <your_wallet_name> --keyring-backend test
# 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
anathacli keys add <your_wallet_name> --recover --keyring-backend test
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 anathad
make log-files
# Enable the anathad service
sudo systemctl enable anathad
# Add seed nodes to ~/.anathad/config/config.toml, replace line 172 with
seeds = "aed92dab9de41325b1d0ed39b0d4fc30c6192868@node101.mainnet.anatha.net:26656,f54086e191a9735bbaca614ae91124fd1407f77f@node201.mainnet.anatha.net:26656,05e2de3ff3249216c4043922ad744c8abb9f45eb@node301.mainnet.anatha.net:26656"
# Start the node
sudo systemctl start anathad
To check on the status of the node use:
anathacli status
# or
sudo journalctl -u anathad -f
To view the logs use:
# Standard output of anathad
tail -f /var/log/anathad/anathad.log
# Standard error of anathad
tail -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 validators
anathacli q astaking validators
# 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>
anathacli tx slashing unjail --from <your-wallet-name> --keyring-backend test --chain-id mainnet
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>
anathacli tx astaking unbond --from <your-wallet-name> --chain-id mainnet --keyring-backend test
After running the unbonding transaction, you need to check the length of the unbonding time by running:
anathacli q astaking params
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.