Skip to content

feat(upgrade): add v1.3.0 upgrade handler (release/1.3.x)#247

Merged
puneet2019 merged 2 commits into
release/1.3.xfrom
feat/upgrade-handler-v1.3.0-1.3.x
Jun 3, 2026
Merged

feat(upgrade): add v1.3.0 upgrade handler (release/1.3.x)#247
puneet2019 merged 2 commits into
release/1.3.xfrom
feat/upgrade-handler-v1.3.0-1.3.x

Conversation

@puneet2019

Copy link
Copy Markdown
Contributor

Summary

Registers a no-op v1.3.0 upgrade handler in app/app.go, slotted between the existing v1.2.0 handler and the testnet-only handlers:

app.UpgradeKeeper.SetUpgradeHandler("v1.3.0", func(ctx context.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
    // noop
    return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})

Why a noop is correct for v1.3.x

The state-machine-affecting work targeted at v1.3.x does not require module migrations or store changes:

So RunMigrations(fromVM) alone covers v1.3.0 from any prior version.

Companion PR

Test plan

  • go build ./app/...
  • CI

Registers a no-op v1.3.0 upgrade handler that runs module migrations,
slotted between the v1.2.0 handler and the testnet-only handlers in
app/app.go.

No module consensus versions or store keys change in v1.3.x (the SDK
gas-meter changes from moca-cosmos-sdk#125 only affect runtime gas
semantics; the dropped proto fields are not persisted), so the handler
is a pure RunMigrations noop.

Mirrors #246 (the main-branch counterpart).
@puneet2019 puneet2019 force-pushed the feat/upgrade-handler-v1.3.0-1.3.x branch from 7918288 to a32c277 Compare June 3, 2026 15:46
@puneet2019

Copy link
Copy Markdown
Contributor Author

Resolved the merge conflict (DIRTY status): rebased onto current release/1.3.x (now at c309c157 after #244 merged). Single CHANGELOG conflict — both (cli) [#243] and (upgrade) [#247] entries now coexist under Features. App.go is unchanged from review.

Remaining red CI checks are all release/1.3.x baseline failures, not introduced by this PR — verified against #244 which has the identical 4 failures on the same base:

Check Cause Notes
golangci CI config — golangci-lint-action v7+ rejects version: 'v1.59' config on the branch Workflow file needs bump; affects every PR against release/1.3.x
Run markdown-lint Pre-existing MD violations in deployment/dockerup/README.md (not touched here) release/1.3.x predates the dockerup cleanup that's on main
test-unit-cover Pre-existing failures in TestKeeperTestSuite/TestTransfer (x/erc20) and TestCLITestSuite/TestQueryCmd (x/storage CLI) on this branch base Same failures on #244
dependency-review Go-stdlib CVEs flagged by govulncheck against the 1.25.10 toolchain Same env issue as main's #240 — fix is a Go bump (like #241 on main)
Publish Docker image, Notify to Lark Non-functional infra

The change itself: app/app.go +5 lines (the v1.3.0 handler) + 1 CHANGELOG line. Builds locally; APPROVED by @phenix3443. Ready for admin merge whenever you want it landed (no realistic way to get this PR's CI green without unrelated branch-wide CI fixes).

@puneet2019 puneet2019 merged commit f4bd5e5 into release/1.3.x Jun 3, 2026
11 of 17 checks passed
@puneet2019 puneet2019 deleted the feat/upgrade-handler-v1.3.0-1.3.x branch June 3, 2026 18:09
puneet2019 added a commit that referenced this pull request Jun 4, 2026
The governance + comprehensive upgrade tests default to UPGRADE_NAME=v2.0.0
in the scripts, which works on main (#221 registered the v2.0.0 handler
for the x/erc20 store delete) but NOT on release/1.3.x. release/1.3.x
only has v1.1.0 / v1.2.0 / v1.3.0 (#247) handlers, so the proposal
panics with:

  UPGRADE "v2.0.0" NEEDED at height: 49
  panic: runtime error: invalid memory address or nil pointer dereference
  github.com/evmos/evmos/v12/app.(*Evmos).FinalizeBlock.func1()
      app/app.go:1160 +0x1d

(Hardfork mode passed because it doesn't go through the upgrade module's
handler lookup.)

Mirroring the existing OLD_VERSION pattern:
- Add an `upgrade_name` workflow_dispatch input.
- Default to v1.3.0 — the natural upgrade target on this branch.
- Plumb to UPGRADE_NAME env so the test scripts' \${UPGRADE_NAME:-v2.0.0}
  fallback is overridden uniformly across all matrix jobs.
puneet2019 added a commit that referenced this pull request Jun 4, 2026
* feat(e2e): backport e2e/kind framework to release/1.3.x

Backports the Kind-based E2E framework (originally added on main via
#105 and follow-ups) onto release/1.3.x so the same
upgrade-flow and smoke tests run on this branch's PRs.

Should have been part of #247 (the v1.3.0 upgrade
handler). This PR is the follow-up that wires the test harness.

Includes:
- e2e/kind/ (framework, scripts, manifests, contracts, tests
  incl. test_upgrade_hardfork.sh / test_upgrade_governance.sh)
- .github/workflows/e2e-kind.yml (per-PR + workflow_dispatch)
- .github/workflows/notify-e2e.yml (moca-e2e hub cross-repo trigger)
- Makefile e2e-fw / e2e-kind-* targets

Snapshot taken from main HEAD at backport time. No app/SDK code
touched.

* chore(e2e): adapt e2e-kind.yml for release/1.3.x context

- PR trigger: branches main -> release/1.3.x (so this workflow runs on
  PRs against release/1.3.x).
- Default old_version: v1.1.2 -> v1.2.1 (matches the natural upgrade
  source for release/1.3.x; main targets a different floor).

Leaves notify-e2e.yml's `branches: [main]` filter unchanged — the
moca-e2e hub tracks main only, so this workflow stays a safe no-op on
release/1.3.x by design.

* fix(e2e): set UPGRADE_NAME=v1.3.0 default for release/1.3.x

The governance + comprehensive upgrade tests default to UPGRADE_NAME=v2.0.0
in the scripts, which works on main (#221 registered the v2.0.0 handler
for the x/erc20 store delete) but NOT on release/1.3.x. release/1.3.x
only has v1.1.0 / v1.2.0 / v1.3.0 (#247) handlers, so the proposal
panics with:

  UPGRADE "v2.0.0" NEEDED at height: 49
  panic: runtime error: invalid memory address or nil pointer dereference
  github.com/evmos/evmos/v12/app.(*Evmos).FinalizeBlock.func1()
      app/app.go:1160 +0x1d

(Hardfork mode passed because it doesn't go through the upgrade module's
handler lookup.)

Mirroring the existing OLD_VERSION pattern:
- Add an `upgrade_name` workflow_dispatch input.
- Default to v1.3.0 — the natural upgrade target on this branch.
- Plumb to UPGRADE_NAME env so the test scripts' \${UPGRADE_NAME:-v2.0.0}
  fallback is overridden uniformly across all matrix jobs.

* fix(e2e): align upgrade test script defaults with release/1.3.x

The three upgrade test scripts defaulted to OLD_VERSION=v1.2.0 and
UPGRADE_NAME=v2.0.0 (correct for main, where #221 registered the
v2.0.0 handler). On release/1.3.x there is no v2.0.0 handler, so
running e.g. `make e2e-fw-test TEST=upgrade_governance` locally without
overrides hit:

  UPGRADE "v2.0.0" NEEDED at height: 49
  panic: runtime error: invalid memory address or nil pointer dereference

Aligns the local script defaults with the CI workflow defaults set in
a5634ae / 18c3477:

  e2e/kind/tests/test_upgrade_hardfork.sh
  e2e/kind/tests/test_upgrade_governance.sh
  e2e/kind/tests/test_upgrade_comprehensive.sh
    OLD_VERSION  v1.2.0 -> v1.2.1
    UPGRADE_NAME v2.0.0 -> v1.3.0
    (also the example commands in the usage headers)

So `make e2e-fw-test TEST=upgrade_governance` on release/1.3.x now
exercises the same v1.2.1 -> v1.3.0 path as the CI workflow's default
dispatch.

Resolves phenix3443's review point 2 on #255.

* docs(e2e): sync README with release/1.3.x defaults

- OLD_VERSION examples: v12.0.1 (stale evmos-era tag, never valid on
  any moca release) -> v1.2.1, matching the script + workflow defaults
  on this branch (aef131b / a5634ae). Three occurrences in
  e2e/kind/README.md.
- CI section: workflow runs automatically on PRs to `main` -> PRs to
  `release/1.3.x`, matching the workflow's pull_request trigger filter
  (a5634ae).

Resolves phenix3443's follow-up review point 2 on #255.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants