Maintenance
Get Validator information
initiad status 2>&1 | jq .validator_info
Get Sync information
initiad status 2>&1 | jq .sync_info
Get node peer
echo $(initiad tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.initia/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Check validator keys
[[ $(initiad q mstaking validator $(initiad keys show wallet --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(initiad status | jq -r .validator_info.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
curl -sS http://localhost:26657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
Enable prometheus
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.initia/config/config.toml
Reset chain data
initiad tendermint unsafe-reset-all --keep-addr-book --home $HOME/.initia --keep-addr-book
Caution !
Before moving on to the next step, be aware that all chain data will be erased. Ensure you've created a backup of your priv_validator_key.json!
Remove Node
cd $HOME
sudo systemctl stop initiad
sudo systemctl disable initiad
sudo rm /etc/systemd/system/initiad.service
sudo systemctl daemon-reload
sudo rm -f $(which initiad)
sudo rm -rf $HOME/.initia
sudo rm -rf $HOME/initia
sudo rm -rf $HOME/go
Last updated