Useful commands
List of commands used to manage the validator and node
Wallet interaction
Create Wallet
bandd keys add <WALLET_NAME>
Restore wallet
bandd keys add <WALLET_NAME> --recover
Show all wallets
Delete wallet
bandd keys delete <WALLET_NAME>
Export wallet
bandd keys export <WALLET_NAME>
Import wallet
bandd keys import <WALLET_NAME> <WALLET_NAME>.backup
Show balance
bandd q bank balances $(bandd keys show <WALLET_NAME> -a)
Validator control
Create a validator
bandd tx staking create-validator \
--amount=1000000uband \
--pubkey=$(bandd tendermint show-validator) \
--moniker="<YOUR_MONIKER>" \
--identity="<KEY_BASE>" \
--details="<YOUR_DETAILS>" \
--website="<YOUR_WEBSITE>" \
--chain-id="laozi-mainnet" \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.2" \
--min-self-delegation="1" \
--from=<WALLET_NAME> -y
Edit validator
bandd tx staking edit-validator \
--new-moniker="<YOUR_MONIKER>" \
--identity=<KEY_BASE> \
--details="<YOUR_DETAILS>" \
--chain-id laozi-mainnet \
--commission-rate=0.1 \
--from=<WALLET_NAME> -y
Unjail
bandd tx slashing unjail --from <WALLET_NAME> -y
Jail reason
bandd q slashing signing-info $(bandd tendermint show-validator)
Active validators
bandd q staking validators -o json --limit=1000 \| jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' \| jq -r '.tokens + " - " + .description.moniker' \| sort -gr | nl
Inactive validators
bandd q staking validators -o json --limit=1000 \| jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' \| jq -r '.tokens + " - " + .description.moniker' \| sort -gr | nl
Information about the validator
bandd q staking validator $(bandd keys show <WALLET_NAME> --bech val -a)
Balance management
Withdrawal of all rewards
bandd tx distribution withdraw-all-rewards --from <WALLET_NAME> -y
Withdrawal of rewards and commissions
bandd tx distribution withdraw-rewards <WALLET_NAME> --from <WALLET_NAME> --commission -y
Self-delegation
bandd tx staking delegate <TO_VALOPER_ADDRESS> --from <WALLET_NAME> -y
Delegation to validator
bandd tx staking delegate <WALLET_NAME> <TO_VALOPER_ADDRESS> 1000000uband --from <WALLET_NAME> -y
Redelegation to another validator
bandd tx staking redelegate <WALLET_NAME> <TO_VALOPER_ADDRESS> 1000000uband --from <WALLET_NAME> -y
Unbond tokens
bandd tx staking unbond <WALLET_NAME> 1000000uband --from <WALLET_NAME> -y
Sending tokens to a wallet
bandd tx bank send <FROM_WALLET_NAME> <TO_WALLET> 1000000uband -y
Governance
All proposals
bandd query gov proposals
All proposals by ID
bandd query gov proposal 1
Vote "YES"
bandd tx gov vote 1 yes --from <WALLET_NAME>
Vote "NO"
bandd tx gov vote 1 no --from <WALLET_NAME>
Vote "Abstain"
bandd tx gov vote 1 abstain --from <WALLET_NAME>
Vote "NoWithVeto"
bandd tx gov vote 1 no_with_veto --from <WALLET_NAME>
Utility
Update ports
CUSTOM_PORT=10
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}58\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}57\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}60\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}56\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}66\"%" $HOME/.band/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}17\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}80\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}90\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}91\"%" $HOME/.band/config/app.toml
Disable Indexer
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.band/config/config.toml
Enable Indexer
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.band/config/config.toml
Update pruning
sed -i \
-e 's|^pruning *=.*|pruning = "custom"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
-e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
$HOME/.band/config/app.toml
Node support
Validator Info
bandd status 2>&1 | jq .ValidatorInfo
Sync info
bandd status 2>&1 | jq .SyncInfo.catching_up
Deleting a node
Before deleting a node make sure you save priv_validator_key.json
systemctl stop bandd
systemctl disable bandd
rm /etc/systemd/system/bandd.service
systemctl daemon-reload
cd $HOME
rm -rf .band band
rm -rf $(which bandd)
Service setup
Reload service configuration
sudo systemctl daemon-reload
Enable service
sudo systemctl enable bandd
Disable service
sudo systemctl disable bandd
Start service
sudo systemctl start bandd
Stop service
sudo systemctl stop bandd
Restart service
sudo systemctl restart bandd
Check service status
sudo systemctl status bandd
Check service logs
sudo journalctl -u bandd -f --no-hostname -o cat
Last updated