Upgrading your Injective Chain Node

This section details how to perform an update of your Injective Chain node.

Step 1 - Stopping the Services#

First, stop the injectived Injective Chain daemon and the peggo bridge relayer.

Step 2 - Upgrade the Binaries#

Then, update the injectived and peggo binaries to the latest versions.

  1. Download latest binaries using the following command.
wget https://github.com/InjectiveLabs/injective-chain-releases/releases/download/v1.0.1-1630308393/linux-amd64.zip

This zip file will contain three binaries:

  • injectived - the Injective Chain daemon
  • peggo - the Injective Chain ERC-20 bridge relayer daemon
  • injective-exchange - the Injective Exchange daemon
  1. Unzip and add injectived, peggo and injective-exchange to your /usr/bin.
unzip linux-amd64.zip
sudo mv injectived peggo injective-exchange /usr/bin
  1. Check your binary version by running following commands.
injectived version
peggo version
injective-exchange version
  1. Confirm your version matches the output below
injectived version
Version dev (b174465)
peggo version
Version dev (d6447e2)
injective-exchange version
Version dev (6072c29)

Step 3 - Start the chain#

Using Terminal output#

injectived start

Using systemd service#

Configure systemd service for relayer if not configured already. You can suppress log level to error using this config.

Edit the config at /etc/systemd/system/injectived.service:

[Unit]
Description=injectived
[Service]
WorkingDirectory=/usr/bin
ExecStart=/bin/bash -c '/usr/bin/injectived --log-level=error start'
Type=simple
Restart=always
RestartSec=5
User=ec2-user
[Install]
WantedBy=multi-user.target

Starting and restarting systemd service

sudo systemctl daemon-reload
sudo systemctl restart injectived
sudo systemctl status injectived
# enable start on system boot
sudo systemctl enable injectived
# To check Logs
journalctl -u injectived -f

Logs checking#

At this point, your node should start syncing blocks from the chain.

INFO[0000] starting ABCI with Tendermint module=main
INFO[0015] Starting StateSync service impl=StateSync module=statesync

Congratulations! You have successfully upgraded your node. 🎉

Step 4 - Resume Your Validator Node#

Once your node completed syncing the chain, check your validator status (here) or using the CLI command below.

injectived query staking validator $(injectived keys show {Your Validator Key Name} --bech val --address)

Unjail (if it's UNBONDING)#

injectived tx slashing unjail --from [Your validator key name] --chain-id=injective-1 --keyring-backend=file --yes --node=tcp://localhost:26657 --gas-prices=500000000inj

Restake and unjail (if it's UNBONDED)#

Check valid staked amount, the value tokens should be greater or equal than min-self-delegation.

# Check valid staked amount
# the value tokens should be greater or equal than min-self-delegation
injectived q staking validator [injvaloper-address]
```bash
# Example: self-delegate another 1 INJ to the validator, change with your appropriate amount
injectived tx staking delegate [injvaloper-address] 1000000000000000000inj --from [validator-key-name] --chain-id=injective-1 --keyring-backend=file --yes --node=tcp://localhost:26657 --gas-prices=500000000inj
# Now unjail your node as you've been off for a while
injectived tx slashing unjail --from [validator-key-name] --chain-id=injective-1 --keyring-backend=file --yes --node=tcp://localhost:26657 --gas-prices=500000000inj

Useful commands:

injectived keys list
injectived keys show [validator-key-name]
injectived q bank balances [Your Validator address]

Step 5 - Restart Your Relayer Bridge#

  1. Configure systemd service for relayer if not configured already

Edit the config at /etc/systemd/system/peggo.service:

[Unit]
Description=peggo
[Service]
WorkingDirectory=/home/ec2-user/.peggo
ExecStart=/bin/bash -c 'peggo orchestrator'
Type=simple
Restart=always
RestartSec=5
User=ec2-user
[Install]
WantedBy=multi-user.target
  1. Restart systemd service
sudo systemctl daemon-reload
sudo systemctl restart peggo
# enable start on system boot
sudo systemctl enable peggo
# To check Logs
$ journalctl -f -u peggo
Last updated on