Managing The Validator
This page describes the regular tasks that you may need to do, as a node runner.
Handling Upgrades
Depending on the type of upgrade being undertaken by the wider network, one of the options below should be used to perform the upgrade. Automatic upgrades via the x/upgrade
module and/or Cosmovisor are not yet supported.
The type of upgrade required by the network impacts which options you may select.
Option 1: Upgrade with chain-id change. Without coordination.
This type of upgrade is the most commonly used on the Imua testnet. For example, the testnet was upgraded from exocoretestnet_233-7
to imuachaintestnet_233-8
with this option.
Stop the node.
Remove the existing data
rm -rf $HOMEDIR/config/genesis.json $HOMEDIR/data/*.db $HOMEDIR/data/snapshots $HOMEDIR/data/cs.wal
Overwrite the validator's signature history, if any
jq -n '{"height": "0", "round": 0, "step": 0}' > $HOMEDIR/data/priv_validator_state.json
Download the newer binary, overwriting the previous one
/usr/bin/imuad
. Verify that the version of this binary is correct by runningimuad version
Store the new
CHAIN_ID
in the environment withCHAIN_ID=<new-chain-id>
Set the new
CHAIN_ID
in the configuration withimuad --home $HOMEDIR config chain-id $CHAIN_ID
and make other configuration changes, if anyDownload the genesis file
wget -O $HOMEDIR/config/genesis.json https://raw.githubusercontent.com/imua-xyz/testnets/main/genesis/$CHAIN_ID.json
Start the node
Option 2: Upgrade with chain-id change. With coordination.
Initialize a new node with the increased chain-id at a new location (for example
imuachaintestnet_233-3
becomesimuachaintestnet_233-4
) and configure it. Make sure to re-use the same validator private key ($HOMEDIR/config/priv_validator_key.json
) or provide the mnemonic via--recover
during the initialization.Modify the
systemd
service to use the provided--halt-height
or--halt-time
so that all v3 nodes stop at the same time.Once the network is halted, obtain the new genesis file and add it to the new
$HOMEDIR
Additionally, upgrade the binary by overwriting the existing one.Edit the
systemd
service to point to the new$HOMEDIR
and remove the--halt
parameters.Restart the service.
Option 3: No chain-id change. With coordination.
Edit the
systemd
service with the specified--halt-height
or--halt-time
.Once the network is halted, remove the
--halt
parameters from thesystemd
file and upgrade the binary.Restart the service.
Monitoring Uptime
Enable Prometheus metrics in the configuration by editing the configuration files.
Set up a Prometheus instance to scrape the metrics exposed by your node.
Visualize these with Grafana by using its dashboards. Metrics include:
cometbft_consensus_latest_block_height
: The latest block heightcometbft_consensus_block_syncing
: Whether the node is synced or still catching up.cometbft_consensus_block_interval_seconds
: Time between blocks, useful for monitoring block production delays.
In addition, system level information can be loaded with prometheus-node-exporter
into Grafana to complement the metrics exposed by imuad
.
Lastly, third-party monitoring services such as ping.pub may be used when they add support for Imuachain.
Useful Commands
Stop the node
systemctl stop imua
Start the node
systemctl start imua
Restart the node
systemctl restart imua
Find my im1...
(account) address
imuad --home $HOMEDIR keys show -a $ACCOUNT_KEY_NAME
Get current height
imuad query block | jq .block.header.height
Check sync status
imuad status | jq
Get current validator set
imuad query tendermint-validator-set
Get own validator address
imuad --home $HOMEDIR tendermint show-address
Convert address formats
imuad debug addr <VALUE>
Get bytes32 val pub key
imuad --home $HOMEDIR --output json keys consensus-pubkey-to-bytes | jq -r .bytes32
Get bytes32 val pub key (another method)
imuad debug pubkey $(imuad --home $HOMEDIR tendermint show-validator)
Get JSON val pub key
imuad --home $HOMEDIR tendermint show-validator
Check node logs
journalctl -u imua -f
Get the number of peers
curl -s http://localhost:26657/net_info
Check transaction status
imuad query tx <hash>
Find my consensus address
imuad --home $HOMEDIR tendermint show-address
Find my P2P ID
imuad --home $HOMEDIR tendermint show-node-id
(assuming the node port hasn't changed; if it has, it may be supplied with --node
)
Last updated