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