Testnet
Cosmos Hub
- Chain ID
- Version
- Go
Run these after the install guide, which sets $WALLET, $MONIKER and the chain variables.
Keys and wallet
Add a new key
gaiad keys add $WALLETRecover a key
gaiad keys add $WALLET --recoverList keys
gaiad keys listWallet balance
gaiad q bank balances $(gaiad keys show $WALLET -a)
Validator
Create a validator
cat > $HOME/validator.json << EOF { "pubkey": $(gaiad comet show-validator), "amount": "1000000uatom", "moniker": "$MONIKER", "identity": "", "website": "", "security": "", "details": "", "commission-rate": "0.05", "commission-max-rate": "0.20", "commission-max-change-rate": "0.05", "min-self-delegation": "1" } EOF gaiad tx staking create-validator $HOME/validator.json --from $WALLET --chain-id $GAIA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom -yEdit the validator
gaiad tx staking edit-validator --new-moniker "$MONIKER" --identity "" --website "" --details "" --from $WALLET --chain-id $GAIA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom -yUnjail
gaiad tx slashing unjail --from $WALLET --chain-id $GAIA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom -yValidator details
gaiad q staking validator $(gaiad keys show $WALLET --bech val -a)
Tokens
Withdraw all rewards
gaiad tx distribution withdraw-all-rewards --from $WALLET --chain-id $GAIA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom -yWithdraw commission and rewards
gaiad tx distribution withdraw-rewards $(gaiad keys show $WALLET --bech val -a) --commission --from $WALLET --chain-id $GAIA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom -yDelegate to yourself
gaiad tx staking delegate $(gaiad keys show $WALLET --bech val -a) 1000000uatom --from $WALLET --chain-id $GAIA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom -yRedelegate
gaiad tx staking redelegate $(gaiad keys show $WALLET --bech val -a) <TO_VALOPER> 1000000uatom --from $WALLET --chain-id $GAIA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom -yUnbond
gaiad tx staking unbond $(gaiad keys show $WALLET --bech val -a) 1000000uatom --from $WALLET --chain-id $GAIA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom -ySend tokens
gaiad tx bank send $WALLET <TO_ADDRESS> 1000000uatom --chain-id $GAIA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom -y
Governance
List proposals
gaiad q gov proposalsView a proposal
gaiad q gov proposal <ID>Vote
gaiad tx gov vote <ID> yes --from $WALLET --chain-id $GAIA_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom -y # yes | no | abstain | no_with_veto
Maintenance
Node status
gaiad status 2>&1 | jqNode peer address
echo $(gaiad comet show-node-id)@$(wget -qO- eth0.me):$GAIA_PORT656Live peers
curl -s localhost:$GAIA_PORT657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr | split(":") | last)"' | paste -sd,Check the validator key
[[ $(gaiad q staking validator $(gaiad keys show $WALLET --bech val -a) -o json | jq -r .validator.consensus_pubkey.value) = $(gaiad comet show-validator | jq -r .key) ]] && echo "match" || echo "MISMATCH"Reset chain data
gaiad comet unsafe-reset-all --keep-addr-book --home $HOME/.gaiaRemove the node
sudo systemctl stop gaiad sudo systemctl disable gaiad sudo rm /etc/systemd/system/gaiad.service sudo systemctl daemon-reload rm -rf $HOME/.gaia $(which gaiad)
Service
Service status
sudo systemctl status gaiadFollow logs
sudo journalctl -fu gaiad -o catRestart
sudo systemctl restart gaiadStop
sudo systemctl stop gaiad