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