Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitbook/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
"infra/validator-mainnet/index",
"infra/validator-mainnet/peggo",
"infra/validator-mainnet/canonical-chain-upgrade",
"infra/validator-mainnet/canonical-chain-upgrade-v1.20.3",
"infra/validator-mainnet/canonical-chain-upgrade-v1.20.1",
"infra/validator-mainnet/canonical-chain-upgrade-v1.20.0",
"infra/validator-mainnet/canonical-chain-upgrade-v1.20.0-flag-changes",
Expand Down
108 changes: 108 additions & 0 deletions .gitbook/infra/validator-mainnet/canonical-chain-upgrade-v1.20.3.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
title: Upgrade to v1.20.3
description: How to upgrade Injective Mainnet Validator node to v1.20.3
updatedAt: "2026-07-25"
---

Wednesday, July 29th, 2026

Following [IIP-677](https://injhub.com/proposal/677/), the upgrade procedure should be performed at block height **176273000**.

* [Summary](#summary)
* [Recovery](#recovery)
* [Upgrade Procedure](#upgrade-procedure)
* [Notes for Validators](#notes-for-validators)

## Summary

The Injective Chain will undergo a scheduled enhancement upgrade at approximately **Wednesday, July 29th, 2026, 10:00 AM ET / 14:00 UTC**.

The following is a short summary of the upgrade steps:

1. Vote and wait till the node panics at block height **176273000**.
2. Backing up configs, data, and keys used for running the Injective Chain.
3. Install the [v1.20.3](https://github.com/InjectiveFoundation/injective-core/releases/tag/v1.20.3-1784976496) binaries.
4. Start your node with the new injectived binary to fulfill the upgrade.
Comment on lines +22 to +25

Upgrade coordination and support for validators will be available on the `#validators` private channel of the [Injective Discord](https://discord.gg/injective).

The network upgrade can take the following potential pathways:

1. **Happy path**:\
Validators successfully upgrade the chain without purging the blockchain history, and all validators are up within 5-10 minutes of the upgrade.
2. **Not-so-happy path**:\
Validators have trouble upgrading to the latest Canonical chain.
3. **Abort path**:\
In the rare event that the team becomes aware of unnoticed critical issues, the Injective team will attempt to patch all the breaking states and provide another official binary within 36 hours.\
If the chain is not successfully resumed within 36 hours, the upgrade will be announced as aborted on the `#validators` channel in [Injective's Discord](https://discord.gg/injective), and validators will need to resume running the chain without any updates or changes.

## Recovery

Prior to exporting chain state, validators are encouraged to take a full data snapshot at the export height before proceeding. Snapshotting depends heavily on infrastructure, but generally this can be done by backing up the `.injectived` directory.

It is critically important to backup the `.injectived/data/priv_validator_state.json` file after stopping your injectived process. This file is updated every block as your validator participates in consensus rounds. It is a critical file needed to prevent double-signing in case the upgrade fails and the previous chain needs to be restarted.

In the event that the upgrade does not succeed, validators and operators must restore the snapshot and downgrade back to Injective Chain release [v1.20.1](https://github.com/InjectiveFoundation/injective-core/releases/tag/v1.20.1-1782532109) and continue this earlier chain until the next upgrade announcement.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

git ls-files .gitbook/infra/validator-mainnet/canonical-chain-upgrade-v1.20.3.mdx && \
wc -l .gitbook/infra/validator-mainnet/canonical-chain-upgrade-v1.20.3.mdx && \
cat -n .gitbook/infra/validator-mainnet/canonical-chain-upgrade-v1.20.3.mdx | sed -n '1,140p'

Repository: InjectiveLabs/injective-docs

Length of output: 5391


🏁 Script executed:

# Inspect the relevant file section and search for the suspicious paths/commands.
cat -n .gitbook/infra/validator-mainnet/canonical-chain-upgrade-v1.20.3.mdx | sed -n '35,110p' && \
printf '\n--- search ---\n' && \
rg -n --no-heading '\.injectived|injectived start|peggo|priv_validator_state\.json|~/.injectived' .gitbook/infra/validator-mainnet/canonical-chain-upgrade-v1.20.3.mdx

Repository: InjectiveLabs/injective-docs

Length of output: 4558


Make the recovery procedure executable.

  • Line 45 only says to restore and downgrade; add the actual stop → reinstall v1.20.1 → restore snapshot plus priv_validator_state.json → restart sequence.
  • Line 54 should use ~/.injectived/wasm/wasm/cache/ instead of .injectived/....
  • Line 93 starts injectived in the middle of the flow; run it separately or background it so the later peggo steps can execute.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.gitbook/infra/validator-mainnet/canonical-chain-upgrade-v1.20.3.mdx at line
45, Update the recovery procedure around the failed-upgrade instructions to
provide executable steps: stop the node, reinstall Injective Chain v1.20.1,
restore the snapshot and priv_validator_state.json, then restart the node before
continuing. Correct the wasm cache path to ~/.injectived/wasm/wasm/cache/, and
adjust the injectived command so it runs separately or in the background,
allowing subsequent peggo commands to execute.


## Upgrade Procedure

### Notes for Validators

You must remove the wasm cache before upgrading to the new version:

```shell
rm -rf .injectived/wasm/wasm/cache/
```
Comment on lines +51 to +55

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use the validator home path when clearing the cache.

This relative path silently does nothing when the operator is not in their home directory, leaving the required cache uncleared. Lines 41 and 70 establish ~/.injectived as the node home.

Proposed fix
-rm -rf .injectived/wasm/wasm/cache/
+rm -rf ~/.injectived/wasm/wasm/cache/
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
You must remove the wasm cache before upgrading to the new version:
```shell
rm -rf .injectived/wasm/wasm/cache/
```
You must remove the wasm cache before upgrading to the new version:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.gitbook/infra/validator-mainnet/canonical-chain-upgrade-v1.20.3.mdx around
lines 51 - 55, Update the cache removal command in the upgrade instructions to
use the validator home path, matching the established ~/.injectived node-home
references, so it clears ~/.injectived/wasm/wasm/cache regardless of the
operator’s current directory.


### Steps

1. Verify you are currently running the correct version (`v1.20.1`) of `injectived`:

```bash
$ injectived version
Version v1.20.1 (eef179e)
Compiled at 20260627-0349 using Go go1.26.4 (amd64)
```

2. Make a backup of your `.injectived` directory:

```bash
cp -r ~/.injectived ./injectived-backup
```

3. Download and install the `injective-chain` release for v1.20.3:

```bash
wget https://github.com/InjectiveFoundation/injective-core/releases/download/v1.20.3-1784976496/linux-amd64.zip
unzip linux-amd64.zip
sudo mv injectived peggo /usr/bin
sudo mv libwasmvm.x86_64.so /usr/lib
```

4. Verify you are currently running the correct version (v1.20.3) of `injectived` after downloading the v1.20.3 release:

```bash
$ injectived version
Version v1.20.3 (5c3143e)
Compiled at 20260725-1049 using Go go1.26.4 (amd64)
```

5. Start `injectived`:

```bash
injectived start
```

6. Verify you are currently running the correct version (v1.20.3) of `peggo` after downloading the v1.20.3 release:

```bash
$ peggo version
Version v1.20.3 (5c3143e)
Compiled at 20260725-1056 using Go go1.26.4 (amd64)
```

7. Start peggo:

```bash
peggo orchestrator
```
Comment on lines +90 to +108

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Run peggo from a separate terminal or service.

injectived start on Line 93 runs in the foreground, so the later peggo verification and startup commands are unreachable in the same shell. State that Step 6 onward must use another terminal, tmux session, or service manager.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.gitbook/infra/validator-mainnet/canonical-chain-upgrade-v1.20.3.mdx around
lines 90 - 108, Update the instructions after the foreground `injectived start`
command to explicitly state that Step 6 verification and Step 7 `peggo
orchestrator` must run from a separate terminal, tmux session, or service
manager.