GET NODE INFO
GET SYNC STATUS
0gchaind status | jq '{ latest_block_height: .sync_info.latest_block_height, catching_up: .sync_info.catching_up }'
GET NODE PEER
echo $(0gchaind tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.0gchain/config/config.toml \
| sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
GET LIVE PEERS
curl -sS http://localhost:$RPC_PORT/net_info \
| jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' \
| awk -F ':' '{print $1":"$(NF)}'
SET MINIMUM GAS PRICE
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025ua0gi\"/" $HOME/.0gchain/config/app.toml
ENABLE PROMETHEUS
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.0gchain/config/config.toml
RESET CHAIN DATA - !!!BE CAREFUL HERE!!!
0gchaind tendermint unsafe-reset-all --keep-addr-book --home $HOME/.0gchain --keep-addr-book
REMOVE NODE
Please, before proceeding with the next step! All chain data will be lost! Make sure you have backed up your priv_validator_key.json
cd $HOME
sudo systemctl stop 0gd
sudo systemctl disable 0gd
sudo rm /etc/systemd/system/0gd.service
sudo systemctl daemon-reload
rm -f $(which 0gchaind)
rm -rf $HOME/.0gchain
rm -rf $HOME/0gchaind