Useful Commands

Service Management

Reload service configuration

sudo systemctl daemon-reload

Enable service

sudo systemctl enable gaiad

Disable service

sudo systemctl disable gaiad

Start service

sudo systemctl start gaiad

Stop service

sudo systemctl stop gaiad

Restart service

sudo systemctl restart gaiad

Check service status

sudo systemctl status gaiad

Check service logs

sudo journalctl -u gaiad -f

Key management

Add New Wallet

gaiad keys add wallet

Restore executing wallet

gaiad keys add wallet --recover

List All Wallets

gaiad keys list

Delete wallet

gaiad keys delete wallet

Check Balance

gaiad q bank balances $(gaiad keys show wallet -a)

Export key to a file

gaiad keys export wallet

View EVM Prived Key

gaiad keys unsafe-export-eth-key wallet

Import key from a file

gaiad keys import wallet wallet.backup

Token management

Withdraw rewards from all validators

gaiad tx distribution withdraw-all-rewards --from wallet --chain-id provider --gas-adjustment 1.4 --gas auto --gas-prices 0.005uatom -y

Withdraw commission and rewards from your validator

gaiad tx distribution withdraw-rewards $(gaiad keys show wallet --bech val -a) --commission --from wallet --chain-id provider --gas-adjustment 1.4 --gas auto --gas-prices 0.005uatom -y

Delegate tokens to yourself

gaiad tx staking delegate $(gaiad keys show wallet --bech val -a) 1000000uatom --from wallet --chain-id provider --gas-adjustment 1.4 --gas auto --gas-prices 0.005uatom -y

Delegate tokens to validator

gaiad tx staking delegate $(gaiad keys show wallet --bech val -a) 1000000uatom --from wallet --chain-id provider --gas-adjustment 1.4 --gas auto --gas-prices 0.005uatom -y

Redelegate tokens to another validator

gaiad tx staking redelegate $(gaiad keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uatom --from wallet --chain-id provider --gas-adjustment 1.4 --gas auto --gas-prices 0.005uatom -y

Unbond tokens from your validator

gaiad tx staking unbond $(gaiad keys show wallet --bech val -a) 1000000uatom --from wallet --chain-id provider --gas-adjustment 1.4 --gas auto --gas-prices 0.005uatom -y

Send tokens to the wallet

gaiad tx bank send wallet <TO_WALLET_ADDRESS> 1000000uatom --from wallet --chain-id provider --gas-adjustment 1.4 --gas auto --gas-prices 0.005uatom -y

Validator operations

Create New Validator

gaiad tx staking create-validator \
--amount 1000000uatom \
--pubkey $(gaiad tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id provider \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.005uatom \
-y

Edit Existing Validator

gaiad tx staking edit-validator \
--new-moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id provider \
--commission-rate 0.05 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.005uatom \
-y

Get sync info

gaiad status 2>&1 | jq .SyncInfo

Validator info

gaiad status 2>&1 | jq .ValidatorInfo

Validator Details

gaiad q staking validator $(gaiad keys show wallet --bech val -a) 

Jailing info

gaiad q slashing signing-info $(gaiad tendermint show-validator) 

Slashing parameters

gaiad q slashing params 

Unjail validator

gaiad tx slashing unjail --from wallet --chain-id provider --gas-adjustment 1.4 --gas auto --gas-prices 0.005uatom -y

Delete node

cd $HOME
sudo systemctl stop gaiad
sudo systemctl disable gaiad
sudo rm /etc/systemd/system/gaiad.service
sudo systemctl daemon-reload
rm -f $(which gaiad)
rm -rf $HOME/.gaia
rm -rf $HOME/gaia

Last updated