Useful commands List of commands used to manage the validator and node
Wallet interaction
Create Wallet
Copy canined keys add <WALLET_NAME>
Restore wallet
Copy canined keys add <WALLET_NAME> --recover
Show all wallets
Delete wallet
Copy canined keys delete <WALLET_NAME>
Show balance
Copy canined q bank balances $(canined keys show <WALLET_NAME> -a)
Validator control
Create a validator
Copy canined tx staking create-validator \
--amount=1000000ujkl \
--pubkey=$(canined tendermint show-validator) \
--moniker="<YOUR_MONIKER>" \
--identity="<YOUR_KEYBASE_ID>" \
--details="<YOUR_DETAILS>" \
--website="<YOUR_WEBSITE_URL>"
--chain-id=jackal-1 \
--commission-rate=0.05 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--from=<WALLET_NAME> \
--gas-adjustment=1.4 \
--gas=auto -y
Edit validator
Copy canined tx staking edit-validator \
--new-moniker="<YOUR_MONIKER>" \
--identity="<YOUR_KEYBASE_ID>" \
--details="<YOUR_DETAILS>" \
--website="<YOUR_WEBSITE_URL>"
--chain-id=jackal-1 \
--commission-rate=0.05 \
--from=<WALLET_NAME> \
--gas-adjustment=1.4 \
--gas=auto -y
Unjail
Copy canined tx slashing unjail --from <WALLET_NAME> --chain-id jackal-1 --fees 500ujckl -y
Jail reason
Copy canined query slashing signing-info $(canined tendermint show-validator)
Active validators
Copy canined 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
Copy canined 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
Copy canined q staking validator $(canined keys show <WALLET_NAME> --bech val -a)
Balance management
Withdrawal of all rewards
Copy canined tx distribution withdraw-all-rewards --from <WALLET_NAME> --chain-id jackal-1 -y --fees 500ujkl
Withdrawal of rewards and commissions
Copy canined tx distribution withdraw-rewards <VALOPER_ADDRESS> --commission --from <WALLET_NAME> --chain-id jackal-1 -y --fees 500ujkl
Self-delegation
Copy canined tx staking delegate $(canined keys show <WALLET_NAME> --bech val -a) 1000000ujkl --from <WALLET_NAME> --chain-id jackal-1 --fees 500ujkl -y
Delegation to validator
Copy canined tx staking delegate <TO_VALOPER_ADDRESS> 1000000ujkl --from <WALLET_NAME> --chain-id jackal-1 -y --fees 500ujkl
Redelegation to another validator
Copy canined tx staking redelegate $(canined keys show <WALLET_NAME> --bech val -a) <TO_VALOPER_ADDRESS> 1000000ujkl --from <WALLET_NAME> --chain-id jackal-1 --fees 500ujkl -y
Unbond tokens
Copy canined tx staking unbond $(canined keys show <WALLET_NAME> --bech val -a) 1000000ujkl --from <WALLET_NAME> --chain-id jackal-1 --fees 500ujkl -y
Sending tokens to a wallet
Copy canined tx bank send <WALLET_NAME> <TO_WALLET_ADDRESS> 1000000ujkl --fees 500ujkl --from wallet --chain-id jackal-1
Governance
All proposals
Copy canined query gov proposals
All proposals by ID
Copy canined query gov proposal 1
Vote "YES"
Copy canined tx gov vote 1 yes --from <WALLET_NAME> --chain-id jackal-1 --fees 500ujkl -y
Vote "NO"
Copy canined tx gov vote 1 no --from <WALLET_NAME> --chain-id jackal-1 --fees 500ujkl -y
Vote "Abstain"
Copy canined tx gov vote 1 abstain --from <WALLET_NAME> --chain-id jackal-1 --fees 500ujkl -y
Vote "NoWithVeto"
Copy canined tx gov vote 1 nowithveto --from <WALLET_NAME> --chain-id jackal-1 --fees 500ujkl -y
Utility
Update ports
Copy 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/.canine/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/.canine/config/app.toml
Disable Indexer
Copy sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.canine/config/config.toml
Enable Indexer
Copy sed -i 's|^indexer *=.*|indexer = "kv"|' $HOME/.canine/config/config.toml
Update pruning
Copy 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/.canine/config/app.toml
Node support
Validator Info
Copy canined status 2>&1 | jq .ValidatorInfo
Sync info
Copy canined status 2>&1 | jq .SyncInfo
Get peers
Copy echo $(canined tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.canine/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Validator key check
Copy [[ $(canined q staking validator $(canined keys show <WALLET_NAME> --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(canined status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
Get live peers
Copy [[ $(canined q staking validator $(canined keys show <WALLET_NAME> --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(canined status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
Setting the minimum commission
Copy sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0ujkl\"/" $HOME/.canine/config/app.toml
Enable prometheus
Copy sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.canine/config/config.toml
Reset chain data
Copy canined tendermint unsafe-reset-all --home $HOME/.canine --keep-addr-book
Deleting a node
Before deleting a node make sure you save priv_validator_key.json
Copy cd $HOME
sudo systemctl stop canined
sudo systemctl disable canined
sudo rm /etc/systemd/system/canined.service
sudo systemctl daemon-reload
rm -rf $(which canined)
rm -rf $HOME/.canine
rm -rf $HOME/canine-chain
Service setup
Reload service configuration
Copy sudo systemctl daemon-reload
Enable service
Copy sudo systemctl enable teritorid
Disable service
Copy sudo systemctl disable canined
Start service
Copy sudo systemctl start canined
Stop service
Copy sudo systemctl stop canined
Restart service
Copy sudo systemctl restart canined
Check service status
Copy sudo systemctl status canined
Check service logs
Copy sudo journalctl -u canined -f --no-hostname -o cat
Last updated 2 months ago