This page is designed to explain the upgrade process from Exocore (exocoretestnet_233-7) to Imuachain (imuachaintestnet_233-8).
Imuachain v1.1.0 brings support for manual upgrades using Cosmovisor. It is recommended that all validators install and use Cosmovisor to manage the node to make future upgrades easier and less manual than they are currently.
COSMOVISOR_VERSION="v1.7.0"
wget -O cosmovisor_${COSMOVISOR_VERSION}.tar.gz "https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2F${COSMOVISOR_VERSION}/cosmovisor-${COSMOVISOR_VERSION}-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/').tar.gz"
Extract and install the binary to /usr/binwhich will need root privileges.
tar -xvzf cosmovisor_${COSMOVISOR_VERSION}.tar.gz
mv cosmovisor /usr/bin/
Download the imuad binary and move it to /usr/binas well. Then, initialize the cosmovisor and imuad folders in a $HOMEDIR of your choice. You may need to create the user, if not created already.
# The top three items below may be edited as you see fit
export IMUA_USER="imuauser"
export HOMEDIR="/home/$IMUA_USER/.imuad"
export MONIKER="moniker"
# Leave these unchanged
export DAEMON_NAME="imuad"
export DAEMON_HOME=$HOMEDIR
export CHAIN_ID="imuachaintestnet_233-8"
cosmovisor init $(which imuad)
# also initialize imuad
imuad --home $HOMEDIR init --chain-id $CHAIN_ID $MONIKER
imuad --home $HOMEDIR config chain-id $CHAIN_ID
# file, or test, may be used for headless systems. test is insecure and not
# recommended for production systems.
imuad --home $HOMEDIR config keyring-backend file
Next, we need to configure imuadas instructed previously.
$HOMEDIR/config/config.toml
# Comma separated list of seed nodes to connect to
seeds = "5dfa2ddc4ce3535ef98470ffe108e6e12edd1955@seed2t.exocore-restaking.com:26656,4cc9c970fe52be4568942693ecfc2ee2cdb63d44@seed1t.exocore-restaking.com:26656"
$HOMEDIR/config/app.toml
###############################################################################
### Base Configuration ###
###############################################################################
# The minimum gas prices a validator is willing to accept for processing a
# transaction. A transaction's fees must meet the minimum of any denomination
# specified in this config (e.g. 0.25token1;0.0001token2).
minimum-gas-prices = "0.0001hua"
<! -- truncated -->
###############################################################################
### gRPC Configuration ###
###############################################################################
[grpc]
# Enable defines if the gRPC server should be enabled.
enable = true
Configure the oracle price feeder with its new configuration in the $HOMEDIRfolder. Note that the configuration format has changed and this step must therefore be performed manually.
Now, copy over the account keys and validator key from the exocoredfolder to this one.
export OLD_HOMEDIR="$HOME/.exocored" # or a custom value
cp -r --preserve=all $OLD_HOMEDIR/keyring-* $HOMEDIR/
cp -f --preserve=all $OLD_HOMEDIR/config/priv_validator_key.json $HOMEDIR/config
Manual upgrade
Download the genesis file and place it in the correct location inside $HOMEDIR/config. Create the cosmovisor.servicefile provided below and start the service using systemctl start cosmovisor. Make sure to own everything with the correct user by using chown -R imuauser:imuauser $HOMEDIR.
Scheduled upgrade using systemd
This approach is recommended for the day of the upgrade. Otherwise, go with the manual approach.
Schedule the download of the genesis file using systemd
/etc/systemd/system/genesis-updater.service
[Unit]
Description=Download imuachain testnet v8 genesis file
After=network.target
[Service]
Type=oneshot
User=imuauser
Group=imuauser
# Use your custom value below
Environment="HOMEDIR=/home/imuauser/.imuad"
# Do not edit this value
Environment="CHAIN_ID=imuachaintestnet_233-8"
ExecStart=/usr/bin/wget -O ${HOMEDIR}/config/genesis.json https://raw.githubusercontent.com/imua-xyz/testnets/refs/heads/main/genesis/${CHAIN_ID}.json
[Install]
WantedBy=multi-user.target
This is the corresponding timer for 27 Feb 06:30 am UTC.
/etc/systemd/system/genesis-updater.timer
[Unit]
Description=Triggers the genesis-updater service
[Timer]
OnCalendar=2025-02-27 06:30:00 UTC
Persistent=true
[Install]
WantedBy=timers.target
Finally, Cosmovisor can be scheduled to start 29 minutes thereafter (or 1 minute before the genesis time). The underlying imuad will wait until the genesis time provided in the file is reached.
/etc/systemd/system/cosmovisor.service
[Unit]
Description=Start Cosmovisor for imuad
After=network.target
[Service]
Type=simple
User=imuauser
Group=imuauser
# Point to your user
Environment="HOME=/home/imuauser"
# Change to your HOMEDIR value
Environment="HOMEDIR=/home/imuauser/.imuad"
# If running non-validator node, `--oracle` may be excluded
ExecStart=/usr/bin/cosmovisor --cosmovisor-config ${HOMEDIR}/cosmovisor/config.toml run start --oracle --home ${HOMEDIR}
[Install]
WantedBy=default.target
/etc/systemd/system/cosmovisor.timer
[Unit]
Description=Triggers the Cosmovisor service start
[Timer]
OnCalendar=2025-02-27 06:59:00 UTC
Persistent=true
[Install]
WantedBy=timers.target
Finally, activate the timers.
systemctl daemon-reload
systemctl disable exocore --now
systemctl enable genesis-updater.timer --now
systemctl enable cosmovisor.timer --now
# Make the new user own all the relevant files
chown -R imuauser:imuauser $HOMEDIR
Check their status via systemctl status cosmovisor.timer and systemctl status genesis-updater.timer
● cosmovisor.timer - Triggers the Cosmovisor service start
Loaded: loaded (/home/user/.config/systemd/user/cosmovisor.timer; enabled; preset: enabled)
Active: active (waiting) since Wed 2025-02-26 12:36:07 IST; 5s ago
Invocation: 54c08a8fc1034fc0af1522eb9983ebe6
Trigger: Thu 2025-02-27 12:29:00 IST; 23h left
Triggers: ● cosmovisor.service
Feb 26 12:36:07 laptop systemd[1091]: Started Triggers the Cosmovisor service start.
● genesis-update.timer - Triggers the genesis-updater service
Loaded: loaded (/home/user/.config/systemd/user/genesis-update.timer; enabled; preset: enabled)
Active: active (waiting) since Wed 2025-02-26 12:42:47 IST; 16s ago
Invocation: c6a9682e107441fe933e1d19586925c0
Trigger: Thu 2025-02-27 12:00:00 IST; 23h left
Triggers: ● genesis-update.service
Feb 26 12:42:47 laptop systemd[1091]: Started Triggers the genesis-updater service.