December 21, 2022
Useful commands for checking and interacting with the OKP4 blockchain
journalctl -fu okp4d -o cat
sudo systemctl stop okp4d
sudo systemctl restart okp4d
okp4d q slashing signing-info $(binary_file tendermint show-validator)
okp4d q slashing params
okp4d status 2>&1 | jq .SyncInfo
okp4d query staking validator <valoper_address>
find out the validator's address:
okp4d keys show $WALLET --bech val -a
okp4d status | jq
okp4d keys add $WALLET --recover
okp4d keys delete $WALLET
okp4d keys list
okp4d query bank balances $OKP4_WALLET_ADDRESS
okp4d tx bank send $OKP4_WALLET_ADDRESS <TO_OKP4_WALLET_ADDRESS> 5000000uknow
okp4d tx gov vote 5 yes --from $WALLET --chain-id=$OKP4_CHAIN_ID
okp4d tx staking delegate $OKP4_VALOPER_ADDRESS 5000000uknow --from=$WALLET --chain-id=$OKP4_CHAIN_ID --fees=500uknow --gas=auto
redelegate a steak from a validator to another validator:
okp4d tx staking redelegate <src_ValidatorAddress> <dest_ValidatorAddress> 5000000uknow --from=$WALLET --chain-id=$OKP4_CHAIN_ID --fees=500uknow --gas=auto
withdrawal of rewards with commission:
okp4d tx distribution withdraw-rewards $OKP4_VALOPER_ADDRESS --from=$WALLET --commission --chain-id=$OKP4_CHAIN_ID --fees=500uknow --gas=auto
curl -sS http://localhost:xxxxx/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
echo -e "\033[0;32m$(grep -A 3 "\[rpc\]" ~/.okp4d/config/config.toml | egrep -o ":[0-9]+")\033[0m"
okp4d tx staking edit-validator \ --moniker=$NODENAME \ --identity=<your_keybase_id> \ --website="<your_website>" \ --details="<your_validator_description>" \ --chain-id=$OKP4_CHAIN_ID \ --from=$WALLET \ --fees=500uknow
okp4d tx slashing unjail \ --broadcast-mode=block \ --from=$WALLET \ --chain-id=$OKP4_CHAIN_ID \ --gas=auto \ --fees=500uknow