Skip to content

feat: upgrade to cosmos-sdk v0.54.3 + ibc-go v11 + cometbft v0.39#2080

Open
JayT106 wants to merge 11 commits into
crypto-org-chain:mainfrom
JayT106:feat/cosmos-sdk-v0.54-upgrade-wip
Open

feat: upgrade to cosmos-sdk v0.54.3 + ibc-go v11 + cometbft v0.39#2080
JayT106 wants to merge 11 commits into
crypto-org-chain:mainfrom
JayT106:feat/cosmos-sdk-v0.54-upgrade-wip

Conversation

@JayT106
Copy link
Copy Markdown
Contributor

@JayT106 JayT106 commented May 20, 2026

Summary

  • bump cosmos-sdk v0.53.4→v0.54.3, ibc-go v10→v11, cometbft v0.38→v0.39.3, Go 1.25.8→1.25.9
  • migrate cosmossdk.io/{store,log,x/evidence,x/feegrant,x/upgrade,x/tx} standalone modules to in-tree github.com/cosmos/cosmos-sdk paths (store/v2, log/v2, contrib/x/crisis)
  • v1.8 upgrade handler: opt-in PopulateQueuePendingSlots feat(staking): expose queue migration as utility, keep consensus version at 5 cosmos-sdk#1814
  • add fastNoOpPrepareProposal: skip per-tx TxDecode for NoOp/nil mempool; delegate to upstream default for priority mempools
  • IBC v11 wiring (gmp v2-only, ratelimit v1, IBCStackBuilder, SetICS4Wrapper)
  • hermes 1.13.1 + compat_mode: '0.38' + index-events: [] for v0.39 ABCI

Protocol Upgrade Notice

  • Consensus-breaking. Coordinated chain halt + binary swap at the v1.8 upgrade plan height.
  • Plan name: v1.8. Operators must use the matching binary; mismatched binaries will halt or fork.
  • State migration: PopulateQueuePendingSlots runs once at upgrade height to populate staking queue pending-slot indexes (opt-in optimization; idempotent re-runs not supported).
  • Store changes: none. No store-key churn from v0.53→v0.54 in this app, so the upgrade handler installs no StoreUpgrades. Both regular and upgrade-height boots use cronos's MaxVersionStoreLoader (the existing custom loader).
  • Cosmovisor: standard upgrade-info.json flow; no manual store ops.

Relayer / Hermes Setup

  • Bump hermes ≥ 1.13.1 (older builds reject v0.39 chain header version). Nix derivation in nix/hermes.nix.
  • relayer.toml per-chain config:
    • compat_mode = '0.38' — required so hermes treats v0.39 ABCI as Tendermint 0.38-compatible.
    • event_source = { mode = 'push', url = 'ws://...:26657/websocket', batch_delay = '500ms' } (existing config retained).
  • Cronos node config (config.toml / app.toml):
    • index-events = [] (index all) — required so hermes can pull packet data; non-empty filter (e.g. ['ethereum_tx.ethereumTxHash', 'message.action']) drops send_packet events and breaks relaying.
  • No client/connection/channel rebuild required. IBC v11 is wire-compatible with v10 channels; existing clients continue to work.
  • Operator action: restart hermes after compat_mode change; verify with hermes health-check.

Follow-ups

  • IBC v2 routes wiring (SetRouterV2, transfer v2, attestation v2)
  • Mainnet upgrade params tuning (gov proposal)

Summary by CodeRabbit

  • New Features

    • Enhanced proposal handling for improved performance with NoOp mempool configurations.
  • Bug Fixes

    • Corrected keyring error handling to use correct sentinel error value.
  • Chores

    • Upgraded to Go 1.25.9, Cosmos SDK v0.54.3, IBC-Go v11, and CometBFT v0.39.3.
    • Updated all dependencies to align with latest Cosmos ecosystem versions.
    • Migrated internal infrastructure to Cosmos SDK v2 APIs.
    • Updated integration test configurations for IBC compatibility.

Review Change Stack

@JayT106 JayT106 requested a review from a team as a code owner May 20, 2026 14:05
@JayT106 JayT106 requested review from calvinaco and randy-cro and removed request for a team May 20, 2026 14:05
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Coordinated upgrade: Go toolchain to 1.25.9, Cosmos SDK imports migrated to v0.54/v2 packages, IBC-Go v10→v11, App.New/keeper refactors, ICA/ICS4 middleware wiring changes, proposal fast-path and governance updates, upgrade handler/store-loader adjustments, and dependency pin refreshes.

Changes

Cosmos SDK v0.54 and IBC-Go v11 migration

Layer / File(s) Summary
Go toolchain and dependency manifest updates
.github/workflows/codeql-analysis.yml, .github/workflows/lint.yml, .github/workflows/sims.yml, go.mod, gomod2nix.toml, nix/build_overlay.nix, nix/sources.json
Go version bumped to 1.25.9 across CI/workflows and build tooling; go.mod and gomod2nix pins refreshed and replace directives reworked.
Systematic import path migrations to v2 modules and IBC-Go v11
app/..., cmd/..., x/cronos/..., x/e2ee/..., test/*
cosmossdk.io log/store imports moved to v2 packages and ibc-go v10→v11 applied across app, modules, precompiles, middleware, migrations, RPC, and tests.
App constructor signature and keeper field refactoring
app/app.go, cmd/cronosd/cmd/root.go
Remove traceStore io.Writer from App.New, drop commit tracer setup, and change ICA controller/host and transfer keeper fields to pointer types; update root command/appExport wiring.
Proposal selection and governance handler updates
app/proposal.go, app/proposal_test.go, app/app.go
ExtTxSelector.SelectTxForProposal drops gasWanted, validates tx bytes before delegating, removes SelectTxForProposalFast; integrate fastNoOpPrepareProposal and switch to baseapp.NewDefaultProposalHandler. Governance keeper adds default vote/votingpower calculator.
ICA callbacks and ICS4 wrapper middleware integration
app/app.go, x/cronos/middleware/conversion_middleware.go, x/cronos/middleware/conversion_middleware_test.go
Callbacks middleware constructed and configured with SetUnderlyingApplication/SetICS4Wrapper, then installed via WithICS4Wrapper; middleware implements SetICS4Wrapper to satisfy v11 IBCModule contract; tests updated.
Upgrade handler and store loader logic
app/upgrades.go
Upgrade handler now populates staking queue slots before migrations; post-registration reads upgrade info from disk and conditionally sets UpgradeStoreLoader when stored plan matches local plan and height not skipped.
Node service, block-stm runner, and supporting app updates
app/app.go
RegisterNodeService supplies earliest-version callback; RefreshBlockList call annotated with //nolint:staticcheck; STM runner uses txnrunner.NewSTMRunner; legacy IBC param key-table registrations removed.
Test and test-helper app initialization updates
app/bench_test.go, app/test_helpers.go, app/sim_test.go, testutil/simapp/simapp.go, x/cronos/keeper/keeper_test.go
Update app.New(...) callsites to new constructor form (replace nil with boolean), and adapt keeper test helpers (e.g., NextAccountNumber usage).
Telemetry lint annotations, migration codec, and minor fixes
x/cronos/keeper/ibc.go, x/cronos/types/proposal.go, x/e2ee/keyring/keyring.go, x/cronos/migrations/v2/migrate_test.go, cmd/cronosd/dbmigrate/patch.go
Add //nolint:staticcheck on telemetry calls, simplify String() formatting, fix keyring error sentinel, and switch test codec to ethermint encoding where applicable.
Integration test Hermes compatibility and changelog
integration_tests/configs/ibc.jsonnet, CHANGELOG.md
Adjust index-events and add compat_mode: '0.38' for Hermes; add UNRELEASED changelog entry documenting SDK/IBC/CometBFT upgrades.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • calvinaco
  • randy-cro

🐰 I hopped through imports and bumped the Go,
From v10 to v11 the IBC seeds flow,
Keepers turned pointers, middleware set free,
Tests and builds updated—one-two-three,
Cheers! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and specifically summarizes the main objective: upgrading to three major dependencies (cosmos-sdk v0.54.3, ibc-go v11, cometbft v0.39), which aligns perfectly with the extensive changeset that updates imports, wiring, and module APIs across the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

This comment has been minimized.

Comment thread go.mod
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
docs/architecture/cosmos-sdk-v0.54-upgrade-plan.md (1)

22-45: ⚡ Quick win

Avoid forcing persistent global git rewrites in the default setup path.

Using git config --global ... insteadOf can leak into unrelated repositories and surprise developers. Please either (a) document a repo-scoped config alternative first, or (b) include explicit cleanup commands in this section.

Suggested doc tweak
-## Pre-merge dev setup (insteadOf redirect)
+## Pre-merge dev setup (scoped redirect preferred)

-Configure git to redirect:
+Prefer repository-scoped redirect (run from this repo):
+
+```bash
+git config --local url."https://github.com/JayT106/ethermint".insteadOf \
+  "https://github.com/crypto-org-chain/ethermint"
+git config --local url."https://github.com/JayT106/cronos-store".insteadOf \
+  "https://github.com/crypto-org-chain/cronos-store"
+```
+
+If you use `--global`, add cleanup after PRs merge:
+
+```bash
+git config --global --unset-all url."https://github.com/JayT106/ethermint".insteadOf
+git config --global --unset-all url."https://github.com/JayT106/ethermint.git".insteadOf
+git config --global --unset-all url."https://github.com/JayT106/cronos-store".insteadOf
+git config --global --unset-all url."https://github.com/JayT106/cronos-store.git".insteadOf
+```
🤖 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 `@docs/architecture/cosmos-sdk-v0.54-upgrade-plan.md` around lines 22 - 45, The
docs currently recommend using git config --global url."...".insteadOf which can
leak into other repos; change the instructions to prefer a repo-scoped config
using git config --local url."...".insteadOf for the two redirect entries (the
existing git config --global
url."https://github.com/JayT106/ethermint".insteadOf / git config --global
url."https://github.com/JayT106/ethermint.git".insteadOf and the cronos-store
equivalents) and keep the go env -w GOPRIVATE guidance, and if you still
document the --global option include explicit cleanup commands using git config
--global --unset-all for each url."...".insteadOf entry so developers can revert
the global rewrites after the upstream PRs merge.
🤖 Prompt for all review comments with 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.

Inline comments:
In `@docs/architecture/cosmos-sdk-v0.54-upgrade-plan.md`:
- Line 202: The link at line 202 uses the floating `/sdk/next/upgrade/upgrade`
URL which can drift; update the markdown reference text "[Cosmos SDK v0.54
upgrade docs](https://cosmos-docs.mintlify.app/sdk/next/upgrade/upgrade)" to a
version-pinned v0.54 docs URL (replace `/sdk/next/` with the v0.54 path) so the
runbook always points to the stable v0.54 upgrade documentation.
- Line 11: Replace the vague version token "v11.x" for the ibc-go dependency
with the exact release "v11.0.0" in the upgrade plan; locate the table row
containing the "ibc-go" entry and update its version cell from "v11.x" to
"v11.0.0" so the document pins the baseline release for Cosmos SDK v0.54
rehearsals.

In `@go.mod`:
- Line 3: The module's Go version directive currently reads "go 1.26.3" which
conflicts with CI's pinned setup-go version 1.25.9; update the go directive in
go.mod from "go 1.26.3" to "go 1.25.9" so the module and CI toolchain match (or
alternatively update the CI setup-go pins to 1.26.3), and ensure any references
to the Go version in CI workflows (.github/workflows/*) are consistent with the
updated go.mod.

---

Nitpick comments:
In `@docs/architecture/cosmos-sdk-v0.54-upgrade-plan.md`:
- Around line 22-45: The docs currently recommend using git config --global
url."...".insteadOf which can leak into other repos; change the instructions to
prefer a repo-scoped config using git config --local url."...".insteadOf for the
two redirect entries (the existing git config --global
url."https://github.com/JayT106/ethermint".insteadOf / git config --global
url."https://github.com/JayT106/ethermint.git".insteadOf and the cronos-store
equivalents) and keep the go env -w GOPRIVATE guidance, and if you still
document the --global option include explicit cleanup commands using git config
--global --unset-all for each url."...".insteadOf entry so developers can revert
the global rewrites after the upstream PRs merge.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 436950d0-eee8-4267-8674-49af553a9d90

📥 Commits

Reviewing files that changed from the base of the PR and between 919769c and 23dd931.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (48)
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/lint.yml
  • .github/workflows/sims.yml
  • app/app.go
  • app/bench_test.go
  • app/export.go
  • app/proposal.go
  • app/proposal_test.go
  • app/sim_test.go
  • app/storeloader.go
  • app/test_helpers.go
  • app/upgrades.go
  • app/versiondb.go
  • app/versiondb_placeholder.go
  • cmd/cronosd/cmd/root.go
  • cmd/cronosd/dbmigrate/migrate.go
  • cmd/cronosd/dbmigrate/migrate_basic_test.go
  • cmd/cronosd/dbmigrate/migrate_dbname_test.go
  • cmd/cronosd/dbmigrate/migrate_enhanced_test.go
  • cmd/cronosd/dbmigrate/migrate_rocksdb_test.go
  • cmd/cronosd/dbmigrate/migrate_test.go
  • cmd/cronosd/dbmigrate/patch.go
  • cmd/cronosd/dbmigrate/patch_advanced_test.go
  • cmd/cronosd/dbmigrate/patch_integration_test.go
  • docs/architecture/cosmos-sdk-v0.54-upgrade-plan.md
  • go.mod
  • gomod2nix.toml
  • testutil/simapp/simapp.go
  • x/cronos/client/cli/tx.go
  • x/cronos/events/decoders.go
  • x/cronos/events/events.go
  • x/cronos/keeper/ibc.go
  • x/cronos/keeper/keeper.go
  • x/cronos/keeper/keeper_test.go
  • x/cronos/keeper/mock/ibckeeper_mock.go
  • x/cronos/keeper/params.go
  • x/cronos/keeper/precompiles/bank.go
  • x/cronos/keeper/precompiles/ica.go
  • x/cronos/keeper/precompiles/relayer.go
  • x/cronos/middleware/conversion_middleware.go
  • x/cronos/middleware/conversion_middleware_test.go
  • x/cronos/migrations/v2/migrate.go
  • x/cronos/migrations/v2/migrate_test.go
  • x/cronos/rpc/api.go
  • x/cronos/types/interfaces.go
  • x/cronos/types/proposal.go
  • x/e2ee/keeper/keeper.go
  • x/e2ee/keyring/keyring.go
💤 Files with no reviewable changes (1)
  • app/proposal_test.go

Comment thread docs/architecture/cosmos-sdk-v0.54-upgrade-plan.md Outdated
Comment thread docs/architecture/cosmos-sdk-v0.54-upgrade-plan.md Outdated
Comment thread go.mod Outdated
@JayT106 JayT106 force-pushed the feat/cosmos-sdk-v0.54-upgrade-wip branch 2 times, most recently from efa739a to 9374171 Compare May 20, 2026 14:56
@JayT106 JayT106 marked this pull request as draft May 20, 2026 14:57
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with 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.

Inline comments:
In `@app/upgrades.go`:
- Around line 35-38: The current code calls
UpgradeKeeper.ReadUpgradeInfoFromDisk() and returns false on error, silently
skipping critical upgrade/store-loader setup; change the implementation so the
error is not swallowed: propagate or return the error (e.g., change the caller
signature to return (bool, error) or return the error up the stack) instead of
returning false, and ensure any callers of this function handle the error
appropriately; locate the call to UpgradeKeeper.ReadUpgradeInfoFromDisk and the
surrounding logic that uses upgradeInfo to wire the error propagation through or
fail fast (log/return) so disk read failures cannot be ignored.

In `@gomod2nix.toml`:
- Around line 296-306: The three cronos-store module entries in gomod2nix.toml
([mod."github.com/crypto-org-chain/cronos-store/memiavl"],
[mod."github.com/crypto-org-chain/cronos-store/store"],
[mod."github.com/crypto-org-chain/cronos-store/versiondb"]) are pinned to commit
704a4bc6440f while go.mod references commit 596a1419d7a1, causing inconsistent
dependency graphs; fix by reconciling versions so both files match—either update
the three version fields in gomod2nix.toml to the same pseudo-version that
includes 596a1419d7a1 (and update the corresponding hash values to the correct
sha256 entries from go.sum or from a regenerated gomod2nix output) or regenerate
gomod2nix.toml from the current go.mod so the module entries and hashes for the
cronos-store modules align with the commit referenced in go.mod.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1783d3a3-a5be-4c22-9a47-b29f0e352209

📥 Commits

Reviewing files that changed from the base of the PR and between 23dd931 and 2c7cfe7.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (48)
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/lint.yml
  • .github/workflows/sims.yml
  • app/app.go
  • app/bench_test.go
  • app/export.go
  • app/proposal.go
  • app/proposal_test.go
  • app/sim_test.go
  • app/storeloader.go
  • app/test_helpers.go
  • app/upgrades.go
  • app/versiondb.go
  • app/versiondb_placeholder.go
  • cmd/cronosd/cmd/root.go
  • cmd/cronosd/dbmigrate/migrate.go
  • cmd/cronosd/dbmigrate/migrate_basic_test.go
  • cmd/cronosd/dbmigrate/migrate_dbname_test.go
  • cmd/cronosd/dbmigrate/migrate_enhanced_test.go
  • cmd/cronosd/dbmigrate/migrate_rocksdb_test.go
  • cmd/cronosd/dbmigrate/migrate_test.go
  • cmd/cronosd/dbmigrate/patch.go
  • cmd/cronosd/dbmigrate/patch_advanced_test.go
  • cmd/cronosd/dbmigrate/patch_integration_test.go
  • docs/architecture/cosmos-sdk-v0.54-upgrade-plan.md
  • go.mod
  • gomod2nix.toml
  • testutil/simapp/simapp.go
  • x/cronos/client/cli/tx.go
  • x/cronos/events/decoders.go
  • x/cronos/events/events.go
  • x/cronos/keeper/ibc.go
  • x/cronos/keeper/keeper.go
  • x/cronos/keeper/keeper_test.go
  • x/cronos/keeper/mock/ibckeeper_mock.go
  • x/cronos/keeper/params.go
  • x/cronos/keeper/precompiles/bank.go
  • x/cronos/keeper/precompiles/ica.go
  • x/cronos/keeper/precompiles/relayer.go
  • x/cronos/middleware/conversion_middleware.go
  • x/cronos/middleware/conversion_middleware_test.go
  • x/cronos/migrations/v2/migrate.go
  • x/cronos/migrations/v2/migrate_test.go
  • x/cronos/rpc/api.go
  • x/cronos/types/interfaces.go
  • x/cronos/types/proposal.go
  • x/e2ee/keeper/keeper.go
  • x/e2ee/keyring/keyring.go
💤 Files with no reviewable changes (1)
  • app/proposal_test.go
✅ Files skipped from review due to trivial changes (10)
  • x/cronos/migrations/v2/migrate_test.go
  • cmd/cronosd/dbmigrate/migrate_basic_test.go
  • app/storeloader.go
  • x/cronos/keeper/mock/ibckeeper_mock.go
  • x/cronos/types/proposal.go
  • x/cronos/events/decoders.go
  • cmd/cronosd/dbmigrate/migrate.go
  • .github/workflows/sims.yml
  • .github/workflows/codeql-analysis.yml
  • cmd/cronosd/dbmigrate/patch_advanced_test.go

Comment thread app/upgrades.go Outdated
Comment thread gomod2nix.toml Outdated
@JayT106 JayT106 force-pushed the feat/cosmos-sdk-v0.54-upgrade-wip branch from d7524ed to 79983fa Compare May 20, 2026 15:27
@github-actions github-actions Bot added the build label May 20, 2026
@JayT106 JayT106 force-pushed the feat/cosmos-sdk-v0.54-upgrade-wip branch 3 times, most recently from 6a2b173 to e8437d0 Compare May 20, 2026 15:56
@github-actions github-actions Bot added the nix label May 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 74.28571% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 13.68%. Comparing base (a3c2f70) to head (db37fde).
⚠️ Report is 200 commits behind head on main.

Files with missing lines Patch % Lines
app/upgrades.go 0.00% 3 Missing ⚠️
x/cronos/middleware/conversion_middleware.go 0.00% 2 Missing ⚠️
x/cronos/types/proposal.go 0.00% 2 Missing ⚠️
testutil/simapp/simapp.go 0.00% 1 Missing ⚠️
x/e2ee/keyring/keyring.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2080      +/-   ##
==========================================
- Coverage   16.87%   13.68%   -3.20%     
==========================================
  Files          72       74       +2     
  Lines        6163     5102    -1061     
==========================================
- Hits         1040      698     -342     
+ Misses       5000     4329     -671     
+ Partials      123       75      -48     
Files with missing lines Coverage Δ
app/export.go 0.00% <ø> (ø)
app/proposal.go 25.42% <100.00%> (+7.00%) ⬆️
app/storeloader.go 0.00% <ø> (ø)
app/versiondb_placeholder.go 0.00% <ø> (ø)
x/cronos/client/cli/tx.go 0.00% <ø> (-38.88%) ⬇️
x/cronos/events/decoders.go 0.00% <ø> (ø)
x/cronos/events/events.go 0.00% <ø> (-23.08%) ⬇️
x/cronos/keeper/ibc.go 83.48% <100.00%> (+83.48%) ⬆️
x/cronos/keeper/keeper.go 68.59% <ø> (+61.52%) ⬆️
x/cronos/keeper/mock/ibckeeper_mock.go 0.00% <ø> (ø)
... and 12 more

... and 52 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JayT106 JayT106 force-pushed the feat/cosmos-sdk-v0.54-upgrade-wip branch 5 times, most recently from 0063035 to adf8c57 Compare May 21, 2026 01:29
@JayT106
Copy link
Copy Markdown
Contributor Author

JayT106 commented May 21, 2026

@claude review PR

@JayT106 JayT106 force-pushed the feat/cosmos-sdk-v0.54-upgrade-wip branch from 3adca1e to afef52c Compare May 21, 2026 18:04
Comment thread app/upgrades.go Outdated
Comment thread go.mod
Comment thread app/app.go
@JayT106 JayT106 marked this pull request as ready for review May 21, 2026 18:25
@JayT106 JayT106 force-pushed the feat/cosmos-sdk-v0.54-upgrade-wip branch from 69271ac to cca1fe6 Compare May 21, 2026 18:26
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with 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.

Inline comments:
In `@app/upgrades.go`:
- Line 35: The upgrade currently calls
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height,
&storetypes.StoreUpgrades{})) with an empty StoreUpgrades; verify that is
correct for the v0.54.3 + IBC v11 upgrade by comparing this app's registered
store keys and ModuleManager list (inspect functions/vars that call
storetypes.NewKVStoreKey/NewMemoryStoreKey/NewTransientStoreKey and the
ModuleManager instantiation in app.go) against the SDK v0.54 module store
changes; if no stores were added/removed/renamed, remove the no-op
SetStoreLoader call or leave as-is, otherwise populate the
&storetypes.StoreUpgrades{Added:[], Renamed:map[string]string{}, Deleted:[]}
with the exact module store key names that changed at the upgrade height so
UpgradeStoreLoader in upgradetypes applies the correct multistore modifications.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2657b094-f809-4c68-b57d-77bdb809f313

📥 Commits

Reviewing files that changed from the base of the PR and between 2c7cfe7 and cca1fe6.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (52)
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/lint.yml
  • .github/workflows/sims.yml
  • .github/workflows/test.yml
  • CHANGELOG.md
  • app/app.go
  • app/bench_test.go
  • app/export.go
  • app/proposal.go
  • app/proposal_test.go
  • app/sim_test.go
  • app/storeloader.go
  • app/test_helpers.go
  • app/upgrades.go
  • app/versiondb.go
  • app/versiondb_placeholder.go
  • cmd/cronosd/cmd/root.go
  • cmd/cronosd/dbmigrate/migrate.go
  • cmd/cronosd/dbmigrate/migrate_basic_test.go
  • cmd/cronosd/dbmigrate/migrate_dbname_test.go
  • cmd/cronosd/dbmigrate/migrate_enhanced_test.go
  • cmd/cronosd/dbmigrate/migrate_rocksdb_test.go
  • cmd/cronosd/dbmigrate/migrate_test.go
  • cmd/cronosd/dbmigrate/patch.go
  • cmd/cronosd/dbmigrate/patch_advanced_test.go
  • cmd/cronosd/dbmigrate/patch_integration_test.go
  • go.mod
  • gomod2nix.toml
  • integration_tests/configs/ibc.jsonnet
  • nix/build_overlay.nix
  • nix/sources.json
  • testutil/simapp/simapp.go
  • x/cronos/client/cli/tx.go
  • x/cronos/events/decoders.go
  • x/cronos/events/events.go
  • x/cronos/keeper/ibc.go
  • x/cronos/keeper/keeper.go
  • x/cronos/keeper/keeper_test.go
  • x/cronos/keeper/mock/ibckeeper_mock.go
  • x/cronos/keeper/params.go
  • x/cronos/keeper/precompiles/bank.go
  • x/cronos/keeper/precompiles/ica.go
  • x/cronos/keeper/precompiles/relayer.go
  • x/cronos/middleware/conversion_middleware.go
  • x/cronos/middleware/conversion_middleware_test.go
  • x/cronos/migrations/v2/migrate.go
  • x/cronos/migrations/v2/migrate_test.go
  • x/cronos/rpc/api.go
  • x/cronos/types/interfaces.go
  • x/cronos/types/proposal.go
  • x/e2ee/keeper/keeper.go
  • x/e2ee/keyring/keyring.go
💤 Files with no reviewable changes (1)
  • app/proposal_test.go
✅ Files skipped from review due to trivial changes (8)
  • x/cronos/keeper/mock/ibckeeper_mock.go
  • cmd/cronosd/dbmigrate/migrate_basic_test.go
  • x/cronos/keeper/params.go
  • CHANGELOG.md
  • app/storeloader.go
  • x/cronos/keeper/precompiles/ica.go
  • .github/workflows/sims.yml
  • x/cronos/types/interfaces.go

Comment thread app/upgrades.go Outdated
@JayT106 JayT106 force-pushed the feat/cosmos-sdk-v0.54-upgrade-wip branch 2 times, most recently from cf46a65 to d08ef30 Compare May 21, 2026 18:59
- bump cosmos-sdk v0.53.4→v0.54.3, ibc-go v10→v11, cometbft v0.38→v0.39.3,
  Go 1.25.8→1.25.9
- migrate cosmossdk.io/{store,log,x/evidence,x/feegrant,x/upgrade,x/tx}
  standalone modules to in-tree github.com/cosmos/cosmos-sdk paths
  (store/v2, log/v2, contrib/x/crisis)
- pin replaces: cosmos-sdk fork (PR crypto-org-chain#1812 staking queue optimization),
  ethermint fork (PR crypto-org-chain#894), cronos-store fork (PR crypto-org-chain#57)
- app.go: drop traceStore from New(); SetCommitMultiStoreTracer removed;
  ICAControllerKeeper/ICAHostKeeper/TransferKeeper as pointer; drop
  subspaces from IBC/ICA/Transfer NewKeeper; gov adds
  CalculateVoteResultsAndVotingPower; RegisterNodeService takes
  EarliestVersion func; remove ParamKeyTable for ibcclient/transfer/ica
- ExtTxSelector: drop gasWanted arg; remove SelectTxForProposalFast (no
  Noopmempool path)
- IBCConversionModule: forward SetICS4Wrapper to underlying app
- ibccallbacks v11: NewIBCMiddleware(ck, max) +
  SetUnderlyingApplication + SetICS4Wrapper composition pattern
- blockstm.NewSTMRunner → txnrunner.NewSTMRunner
- AppCreator/AppExporter: drop io.Writer
- AccountKeeper.NextAccountNumber takes (ctx, AccountI)
- e2ee/keyring: ErrUnknownBacked → ErrUnknownBackend
- add v6.0.0-sdk54 upgrade handler with staking v6 migration + StoreUpgrades
- bump CI Go to 1.25.9

Plan: docs/architecture/cosmos-sdk-v0.54-upgrade-plan.md

IBC v2 routes deferred to follow-up PR.
@JayT106 JayT106 force-pushed the feat/cosmos-sdk-v0.54-upgrade-wip branch from d08ef30 to 426a87a Compare May 21, 2026 19:02
JayT106 and others added 4 commits May 21, 2026 15:09
cosmos-sdk v0.54 removed NewDefaultProposalHandlerFast, regressing
per-block proposer cost for nodes running NoOp mempool (archives /
non-priority validators) by re-running TxDecode + AnteHandler per tx.
Reintroduce the fast path locally: when the mempool is nil or NoOp,
filter req.Txs at byte-level via the cronos block-list ValidateTx and
honor req.MaxTxBytes; otherwise delegate to the upstream default
handler so priority mempool ordering semantics are preserved.

Adds unit tests covering: non-NoOp delegation, NoOp filtering with
order preservation, MaxTxBytes boundary, MaxTxBytes <= 0, nil mempool
fast path, and empty req.Txs.
Five subtests duplicated the same `t.Fatal` default-handler stub and
three duplicated the `acceptAll` validator. Hoist `mustNotInvoke` and
`acceptAll` to the parent test scope so each subtest only states what
is unique about its case. No behavior change; same six subtests still
pass.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
x/cronos/keeper/ibc.go (1)

69-73: 💤 Low value

Note: Staticcheck suppressions added for telemetry calls.

The //nolint:staticcheck directives have been added to telemetry.SetGaugeWithLabels calls. This is acceptable for this migration PR, as it allows the upgrade to proceed while preserving existing telemetry behavior. However, these suppressions suggest the API may be deprecated.

Consider tracking these for future cleanup in a follow-up PR once the SDK upgrade is stable.

Also applies to: 150-154

🤖 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 `@x/cronos/keeper/ibc.go` around lines 69 - 73, Staticcheck suppressions were
added to telemetry.SetGaugeWithLabels calls (e.g., in ConvertVouchersToEvmCoins
using telemetry.NewLabel) to allow the migration to proceed; keep the
suppressions for now but add a short TODO comment above each suppressed call
referencing a follow-up task/issue (e.g., "TODO: remove staticcheck suppression
and migrate telemetry API — issue #<id>") so these instances (including the
other occurrences around the 150-154 block) are tracked for cleanup in a
subsequent PR.
🤖 Prompt for all review comments with 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.

Inline comments:
In `@integration_tests/configs/ibc.jsonnet`:
- Around line 153-155: Update the Hermes compatibility setting by changing the
compat_mode value from '0.38' to '0.37' where the compat_mode key is set (ensure
the compat_mode assignment is updated to '0.37' to force wire-compat for
CometBFT v0.38); also update any nearby comment to reflect that '0.37' is used
for v0.37/v0.38 wire-compat if present.

---

Nitpick comments:
In `@x/cronos/keeper/ibc.go`:
- Around line 69-73: Staticcheck suppressions were added to
telemetry.SetGaugeWithLabels calls (e.g., in ConvertVouchersToEvmCoins using
telemetry.NewLabel) to allow the migration to proceed; keep the suppressions for
now but add a short TODO comment above each suppressed call referencing a
follow-up task/issue (e.g., "TODO: remove staticcheck suppression and migrate
telemetry API — issue #<id>") so these instances (including the other
occurrences around the 150-154 block) are tracked for cleanup in a subsequent
PR.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8a90424a-1cad-4a74-a346-976a6ca2d4fc

📥 Commits

Reviewing files that changed from the base of the PR and between cca1fe6 and 92a6e61.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (51)
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/lint.yml
  • .github/workflows/sims.yml
  • CHANGELOG.md
  • app/app.go
  • app/bench_test.go
  • app/export.go
  • app/proposal.go
  • app/proposal_test.go
  • app/sim_test.go
  • app/storeloader.go
  • app/test_helpers.go
  • app/upgrades.go
  • app/versiondb.go
  • app/versiondb_placeholder.go
  • cmd/cronosd/cmd/root.go
  • cmd/cronosd/dbmigrate/migrate.go
  • cmd/cronosd/dbmigrate/migrate_basic_test.go
  • cmd/cronosd/dbmigrate/migrate_dbname_test.go
  • cmd/cronosd/dbmigrate/migrate_enhanced_test.go
  • cmd/cronosd/dbmigrate/migrate_rocksdb_test.go
  • cmd/cronosd/dbmigrate/migrate_test.go
  • cmd/cronosd/dbmigrate/patch.go
  • cmd/cronosd/dbmigrate/patch_advanced_test.go
  • cmd/cronosd/dbmigrate/patch_integration_test.go
  • go.mod
  • gomod2nix.toml
  • integration_tests/configs/ibc.jsonnet
  • nix/build_overlay.nix
  • nix/sources.json
  • testutil/simapp/simapp.go
  • x/cronos/client/cli/tx.go
  • x/cronos/events/decoders.go
  • x/cronos/events/events.go
  • x/cronos/keeper/ibc.go
  • x/cronos/keeper/keeper.go
  • x/cronos/keeper/keeper_test.go
  • x/cronos/keeper/mock/ibckeeper_mock.go
  • x/cronos/keeper/params.go
  • x/cronos/keeper/precompiles/bank.go
  • x/cronos/keeper/precompiles/ica.go
  • x/cronos/keeper/precompiles/relayer.go
  • x/cronos/middleware/conversion_middleware.go
  • x/cronos/middleware/conversion_middleware_test.go
  • x/cronos/migrations/v2/migrate.go
  • x/cronos/migrations/v2/migrate_test.go
  • x/cronos/rpc/api.go
  • x/cronos/types/interfaces.go
  • x/cronos/types/proposal.go
  • x/e2ee/keeper/keeper.go
  • x/e2ee/keyring/keyring.go
✅ Files skipped from review due to trivial changes (11)
  • x/cronos/keeper/mock/ibckeeper_mock.go
  • cmd/cronosd/dbmigrate/patch_advanced_test.go
  • CHANGELOG.md
  • app/storeloader.go
  • cmd/cronosd/dbmigrate/migrate_dbname_test.go
  • x/cronos/events/events.go
  • x/cronos/types/proposal.go
  • app/versiondb.go
  • x/cronos/keeper/precompiles/relayer.go
  • x/cronos/keeper/precompiles/bank.go
  • .github/workflows/sims.yml

Comment thread integration_tests/configs/ibc.jsonnet
JayT106 added 2 commits May 21, 2026 15:40
Previously the hoisted `mustNotInvoke` closed over the parent test's
`*testing.T`. If a regression made the fast path delegate, the parent
test was marked failed but the specific failing subtest wasn't, losing
localization in test output.

Convert `mustNotInvoke` to a factory taking the subtest `t`, so each
subtest's invocation captures its own `t.Fatal` target and failure
attribution is preserved.
…mment

Drop the explanation of why cosmos-sdk removed NewDefaultProposalHandlerFast.
Comment now states only what the function does and the contract for non-NoOp
delegation.
@JayT106
Copy link
Copy Markdown
Contributor Author

JayT106 commented May 21, 2026

@claude

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

Claude finished @JayT106's task in 4m 20s —— View job


PR Review: feat: upgrade to cosmos-sdk v0.54.3 + ibc-go v11 + cometbft v0.39

Tasks:

  • Read context and understand the request
  • Analyze key changed files
  • Review upgrade handler and migrations
  • Review IBC/ICA keeper wiring
  • Review proposal handler changes
  • Check integration test config
  • Post inline comments and final review

State-Breaking Changes 🚨

This PR is intentionally state-breaking — it is a coordinated network upgrade. All validators must upgrade at the v1.8 plan height.

Change Impact
cosmos-sdk v0.53 → v0.54.3, cometbft v0.38 → v0.39.3 Consensus-breaking — requires coordinated network upgrade
StakingKeeper.PopulateQueuePendingSlots in upgrade handler In-place store migration (staking slot index)
store/v2 path migration Store layer API change
ICA keeper fields changed to pointers (*icacontrollerkeeper.Keeper, etc.) API-breaking for downstream users
x/crisis, x/evidence, x/feegrant, x/upgrade moved in-tree Import path change only, not state-breaking

Issues Found

🔴 Critical

compat_mode: '0.38' in ibc.jsonnet:155 — Per the official Hermes docs, the only valid values for compat_mode are '0.34' and '0.37'. The '0.37' mode covers CometBFT v0.38 and v0.39 wire-compat. The pinned Hermes rev (bab3b80) is an untagged main snapshot — if it doesn't accept '0.38' as a value, the integration tests will silently use the wrong compat mode or fail with a confusing error. An inline comment has been posted. Fix this →

🟡 Important

Added: []string{} in StoreUpgrades (app/upgrades.go:40) — This is a no-op that's equivalent to nil. The comment says "no store-key churn from v0.53→v0.54 in this app", but the store list includes crisistypes.StoreKey, which is an in-tree module that moved in v0.54. Please explicitly verify whether x/crisis or any other module requires a store entry in Added/Deleted at the upgrade height. If nothing changed, simplify to storetypes.StoreUpgrades{}. An inline comment has been posted.

cosmos-sdk replace directive version mismatch (go.mod:396) — The require block pins github.com/cosmos/cosmos-sdk v0.54.3, but the replace directive points to github.com/crypto-org-chain/cosmos-sdk v0.50.6-0.20260521.... The v0.50.6 pseudo-version prefix is intentionally misleading — this is a rebased fork with v0.54 API surface. Adding a comment explaining the pseudo-version prefix would prevent confusion for govulncheck and future contributors.

ICA callbacks wiring — The new ibccallbacks.NewIBCMiddleware(app.CronosKeeper, math.MaxUint64) factory pattern (followed by SetUnderlyingApplication + SetICS4Wrapper) is the correct IBC-Go v11 approach. The old code panicked if the type assertion to ICS4Wrapper failed; the new code is cleaner. One thing to verify in integration: confirm that callbacks fire correctly on the send path since app.ICAControllerKeeper.WithICS4Wrapper(icaCallbacks) routes outbound sends through the callbacks middleware. An inline comment has been posted.

🟢 Positive Changes / Observations

NewDefaultProposalHandlerFastNewDefaultProposalHandler + fastNoOpPrepareProposal — The new approach is architecturally cleaner: the NoOp fast path is explicit and tested, and the standard proposal handler is used for real (priority) mempools. The fastNoOpPrepareProposal function properly detects mempool.NoOpMempool and skips the SDK's per-tx re-decode/ante re-run. Well done.

ExtTxSelector.SelectTxForProposal simplified — The gasWanted parameter drop is correct; the parent selector no longer needs it for the block-list use case. The ValidateTx call for block-list filtering before delegating to the parent is a clean improvement.

blockstm.NewSTMRunnertxnrunner.NewSTMRunner — The STM runner correctly follows the SDK v0.54 reorganization into baseapp/txnrunner.

keyring.ErrUnknownBackend typo fix — The ErrUnknownBackedErrUnknownBackend correction is a good catch.

go.mod and CI Go versiongo.mod correctly pins go 1.25.9, matching the CI setup-go version across all workflows. ✓

StakingKeeper.PopulateQueuePendingSlots — Wrapping the error with context ("populate queue pending slots: %w") is good practice. This correctly follows the cosmos-sdk v0.54 opt-in migration pattern.

panic(err) on ReadUpgradeInfoFromDisk error — Already fixed from the previous review round. The fail-fast approach is correct here.


Summary

The upgrade is well-structured and follows the standard Cosmos SDK major version upgrade pattern. The main open items before merging:

  1. Confirm or fix compat_mode in ibc.jsonnet'0.38' may not be a valid Hermes value
  2. Verify StoreUpgrades.Added — confirm whether x/crisis or any other module needs an entry
  3. Add a comment in go.mod explaining the v0.50.6 pseudo-version prefix on the cosmos-sdk fork

Comment thread integration_tests/configs/ibc.jsonnet
Comment thread app/upgrades.go Outdated
Comment thread app/app.go
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: JayT106 <JayT106@users.noreply.github.com>
@crypto-org-chain crypto-org-chain deleted a comment from github-actions Bot May 21, 2026
Comment thread app/upgrades.go Fixed
JayT106 added 3 commits May 21, 2026 16:09
Bot-applied suggestion (commit 00c48a3) closed the struct literal with
`StoreUpgrades{}` and left the `Added: []string{}` field hanging outside
it, producing two syntax errors (unexpected `}`, non-declaration outside
function body). Restore the multi-line literal so the field initializer
sits inside the braces.
The Added set is empty (no store-key churn from v0.53→v0.54 in this
app), so wiring UpgradeStoreLoader was strictly redundant — and worse
than letting the caller fall back to MaxVersionStoreLoader, which is
cronos's custom loader and the loader used at every other height.
Always return false so the caller installs MaxVersionStoreLoader for
both regular and upgrade-height boots.

Drops the upgradeInfo read, the StoreUpgrades literal, and the
storetypes import.
golangci-lint thelper flagged `mustNotInvoke` (factory taking *testing.T)
as a helper missing the `t.Helper()` call. Add it so failure tracebacks
skip the helper frame and report the calling subtest.
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.

3 participants