Useful commands
List of commands used to manage the validator and node
Wallet interaction
Create Wallet
andromedad keys add <WALLET_NAME>
Restore wallet
andromedad keys add <WALLET_NAME> --recover
Show all wallets
Delete wallet
andromedad keys delete <WALLET_NAME>
Export wallet
andromedad keys export <WALLET_NAME>
Import wallet
andromedad keys import <WALLET_NAME> <WALLET_NAME>.backup
Show balance
andromedad q bank balances $(andromedad keys show <WALLET_NAME> -a)
Validator control
Create a validator
andromedad tx staking create-validator \
--chain-id andromeda-1 \
--commission-rate 0.05 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.1 \
--min-self-delegation "1000000" \
--amount 1000000uandr \
--pubkey $(andromedad tendermint show-validator) \
--moniker "<YOUR_MONIKER>" \
--from <WALLET_NAME> \
--fees 10000uandr \
--gas 300000
Edit validator
andromedad tx staking edit-validator \
--new-moniker="<YOUR_MONIKER>" \
--identity=<KEYBASE ID> \
--details="<YOUR_DETAILS>" \
--chain-id andromeda-1 \
--commission-rate=0.1 \
--from=<WALLET_NAME> \
--gas-prices=300000uandr \
--gas-adjustment=1.5 \
--gas=auto \
-y
Unjail
andromedad tx slashing unjail --from <WALLET_NAME> --chain-id andromeda-1 --fees 10000uandr --gas 300000 -y
Jail reason
andromedad q slashing signing-info $(andromedad tendermint show-validator)
Active validators
andromedad q staking validators -o json --limit=1000 \| jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' \| jq -r '.tokens + " - " + .description.moniker' \| sort -gr | nl
Inactive validators
andromedad 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
andromedad q staking validator $(andromedad keys show <WALLET_NAME> --bech val -a)
Balance management
Withdrawal of all rewards
andromedad tx distribution withdraw-all-rewards --from <WALLET_NAME> --chain-id andromeda-1 --fees 10000uandr --gas 300000 -y
Withdrawal of rewards and commissions
andromedad tx distribution withdraw-rewards <VALOPER_ADDRESS> --from <WALLET_NAME> --fees 10000uandr --gas 300000 --commission -y
Self-delegation
andromedad tx staking delegate <TO_VALOPER_ADDRESS> 1000000uandr --from <WALLET_NAME> --fees 10000uandr --gas 300000 -y
Delegation to validator
andromedad tx staking delegate <WALLET_NAME> <TO_VALOPER_ADDRESS> 1000000uandr --from <WALLET_NAME> --fees 10000uandr --gas 300000 -y
Redelegation to another validator
andromedad tx staking redelegate <WALLET_NAME> <TO_VALOPER_ADDRESS> 1000000uandr --from <WALLET_NAME> --fees 10000uandr --gas 300000 -y
Unbond tokens
andromedad tx staking unbond <WALLET_NAME> 1000000uandr --from <WALLET_NAME> --fees 10000uandr --gas 300000 -y
Sending tokens to a wallet
andromedad tx bank send <WALLET_NAME> <WALLET_ADDRESS> 1000000uandr --fees 10000uandr --gas 300000 -y
Governance
All proposals
andromedad query gov proposals
All proposals by ID
andromedad query gov proposal 1
Vote "YES"
andromedad tx gov vote 1 yes --from <WALLET_NAME> --fees 555uandr
Vote "NO"
andromedad tx gov vote 1 no --from <WALLET_NAME> --fees 555uandr
Vote "Abstain"
andromedad tx gov vote 1 abstain --from <WALLET_NAME> --fees 555uandr
Vote "NoWithVeto"
andromedad tx gov vote 1 no_with_veto --from <WALLET_NAME> --fees 555uandr
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/.andromeda/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/.andromeda/config/app.toml
Disable Indexer
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.andromeda/config/config.toml
Enable Indexer
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.andromeda/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/.andromeda/config/app.toml
Node support
Validator Info
andromedad status 2>&1 | jq .ValidatorInfo
Sync info
andromedad status 2>&1 | jq .SyncInfo.catching_up
Deleting a node
Before deleting a node make sure you save priv_validator_key.json
systemctl stop andromedad
systemctl disable andromedad
rm /etc/systemd/system/andromedad.service
systemctl daemon-reload
cd $HOME
rm -rf .andromeda andromedad
rm -rf $(which andromedad)
Service setup
Reload service configuration
sudo systemctl daemon-reload
Enable service
sudo systemctl enable andromedad
Disable service
sudo systemctl disable andromedad
Start service
sudo systemctl start andromedad
Stop service
sudo systemctl stop andromedad
Restart service
sudo systemctl restart andromedad
Check service status
sudo systemctl status andromedad
Check service logs
sudo journalctl -u andromedad -f --no-hostname -o cat
Last updated