Useful commands
Service operations ⚙️
Check logs
sudo journalctl -u terpd -f
Start service
sudo systemctl start terpd
Stop service
sudo systemctl stop terpd
Restart service
sudo systemctl restart terpd
Check service status
sudo systemctl status terpd
Reload services
sudo systemctl daemon-reload
Enable Service
sudo systemctl enable terpd
Disable Service
sudo systemctl disable terpd
Sync info
terpd status 2>&1 | jq .SyncInfo
Node info
terpd status 2>&1 | jq .NodeInfo
Your node peer
echo $(terpd tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.terp/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Key management
Add New Wallet
terpd keys add $WALLET
Restore executing wallet
terpd keys add $WALLET --recover
List All Wallets
terpd keys list
Delete wallet
terpd keys delete $WALLET
Check Balance
terpd q bank balances $(terpd keys show $WALLET -a)
Export Key (save to wallet.backup)
terpd keys export $WALLET
Import Key (restore from wallet.backup)
terpd keys import $WALLET wallet.backup
Tokens
Withdraw all rewards
terpd tx distribution withdraw-all-rewards --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5
Withdraw rewards and commission from your validator
terpd tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
Check your balance
terpd query bank balances $WALLET_ADDRESS
Delegate to Yourself
terpd tx staking delegate $(terpd keys show $WALLET --bech val -a) 1000000uterpx --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
Delegate
terpd tx staking delegate <TO_VALOPER_ADDRESS> 1000000uterpx --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
Redelegate Stake to Another Validator
terpd tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000uterpx --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
Unbond
terpd tx staking unbond $(terpd keys show $WALLET --bech val -a) 1000000uterpx --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
Transfer Funds
terpd tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000uterpx --gas auto --gas-adjustment 1.5 -y
Validator operations
Create New Validator
terpd tx staking create-validator \
--amount 1000000uterpx \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(terpd tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxxxxxx" \
--chain-id 90u-2 \
--gas auto --gas-adjustment 1.5 \
-y
Edit Existing Validator
terpd tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "xxxxxxxxxx" \
--from $WALLET \
--chain-id 90u-2 \
--gas auto --gas-adjustment 1.5 \
-y
Validator info
terpd status 2>&1 | jq .ValidatorInfo
Validator Details
terpd q staking validator $(terpd keys show $WALLET --bech val -a)
Jailing info
terpd q slashing signing-info $(terpd tendermint show-validator)
Unjail validator
terpd tx slashing unjail --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
Active Validators List
terpd q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " " + .description.moniker' | sort -gr | nl
Check Validator key
[[ $(terpd q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(terpd status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
Signing info
terpd q slashing signing-info $(terpd tendermint show-validator)
Governance
Create New Text Proposal
terpd tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000uterpx \
--type Text \
--from $WALLET \
--gas auto --gas-adjustment 1.5 \
-y
Proposals List
terpd query gov proposals
Proposal IDProposal optionYesNoNo with vetoAbstain
View proposal
terpd query gov proposal 1
Vote
terpd tx gov vote 1 yes --from $WALLET --chain-id 90u-2 --gas auto --gas-adjustment 1.5 -y
Delete Node
sudo systemctl stop terpd
sudo systemctl disable terpd
sudo rm -rf /etc/systemd/system/terpd.service
sudo rm $(which terpd)
sudo rm -rf $HOME/.terp
sed -i "/TERP_/d" $HOME/.bash_profile
Last updated