chore: upgrade Cosmos SDK v0.50.10 → v0.53.7 - #284
Merged
Conversation
0xNilesh
added a commit
that referenced
this pull request
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR upgrades the chain from Cosmos SDK
v0.50.10to the latest stableCosmos SDK
v0.53.x(v0.53.7). It is a dependency version upgrade only —no chain logic, module behaviour, state layout, or APIs were intentionally changed.
The only production code change is one interface that the SDK itself now requires
us to satisfy.
make buildproduces bothpchaindandpuniversaldpchaind version --longreportscosmos_sdk_version: v0.53.7go test -tags="ledger test_ledger_mock test" ./...→ 66 test-bearing packages pass, 0 failures (incl. the cgo/Rust TSS packages)
Cosmos SDK v0.53 ("Eden") is a deliberately backward-compatible, largely additive
release on top of the v0.50 line (same
core v0.11.x,store v1.x, CometBFTv0.38.x), which is why the required code changes are so small.Motivation
Cosmos SDK v0.53 is the current supported minor line for the v0.50 family. It brings
(all opt-in / additive):
x/protocolpoolandx/epochsAPI surfaceSIGN_MODE_TEXTUALand other signing improvementsThe push-chain EVM fork (
github.com/pushchain/evm) andibc-go/v10that this repoalready depends on are built against SDK v0.53 (they pin
cosmos-sdk v0.53.x,core v0.11.3,api v0.9.2,x/tx v0.14.0). Staying on v0.50 meant the repo wasrunning those dependencies below the SDK version they were compiled and tested for.
This upgrade realigns the whole stack onto v0.53.
Background: how versions were pinned before
The repo does not simply
requirethe SDK version — it drives the effectiveversion through a block of
replacedirectives at the top ofgo.mod. Therequireblock historically listed higher,
v0.54-alpha-line versions, and thereplaceblock forced everything down to the v0.50.10-compatible set. The effective build
version is whatever the
replaceblock says.So the upgrade is primarily about retargeting the
replaceblock to the stablev0.53.7 module matrix. This same pattern is preserved after the upgrade.
What changed
1.
go.mod— SDK module matrix retargeted to v0.53.7The override (
replace) block now pins the full, mutually-consistent v0.53.7 set.Target versions were taken directly from
cosmos-sdk@v0.53.7's owngo.modandfrom the
x/*submodule tags released alongside v0.53.github.com/cosmos/cosmos-sdkv0.50.10v0.53.7cosmossdk.io/apiv0.7.5v0.9.2cosmossdk.io/corev0.11.1v0.11.3cosmossdk.io/storev1.1.1v1.1.2cosmossdk.io/x/txv0.13.3v0.14.0cosmossdk.io/collectionsv0.4.0v1.3.1cosmossdk.io/x/evidencev0.1.1v0.2.0cosmossdk.io/x/feegrantv0.1.1v0.2.0cosmossdk.io/x/upgradev0.1.4v0.2.0cosmossdk.io/client/v2v2.0.0-beta.4v2.0.0-beta.11Modules that were already at v0.53-compatible versions were left as-is:
depinject v1.2.1,errors v1.0.2,log v1.6.1,math v1.5.3,cometbft v0.38.21,cosmos-db v1.1.3,gogoproto v1.7.2,x/circuit v0.2.0,ibc-go/v10 v10.4.0.Deliberately kept (see "What was intentionally not changed"):
wasmd v0.55.0,pushchain/evmfork,go-ethereum(cosmos fork),tokenfactory.2. New ORM compatibility shim —
compat/orm-api/(nested local module)The one genuinely tricky part of the upgrade.
Problem. SDK v0.53 requires
cosmossdk.io/api ≥ v0.9.2(it imports thecosmos/crisis,cosmos/epochs, andcosmos/protocolpoolAPI packages that onlyexist in the v0.9.x line). But
cosmossdk.io/api v0.9.0removed thecosmos/orm/*generated packages. Meanwhile:cosmossdk.io/orm(latest,v1.0.0-beta.3) still importscosmossdk.io/api/cosmos/orm/{v1, v1alpha1, module/v1alpha1}.x/uvalidator/types/keys.gousesormv1alpha1.ModuleSchemaDescriptorx/uregistry/types/state.pb.goandx/uvalidator/types/state.pb.gocarry the_ "cosmossdk.io/orm"proto-option registration importapp/tools.goblank-importscosmossdk.io/ormSo
api v0.9.2(needed by the SDK) and theormmodule (needed by us) are in directconflict — there is no single
cosmossdk.io/apiversion that satisfies both.Fix. Re-provide the removed (and unchanged) generated ORM API packages as a small
nested local module and wire it in via a
replace:go.mod(root):Because Go resolves a package to the module with the longest matching path prefix,
imports of
cosmossdk.io/api/cosmos/orm/v1now resolve to this local module insteadof the (orm-less)
cosmossdk.io/api v0.9.2. The three packages are pure generatedproto code whose only external dependencies (
cosmos/app/v1alpha1,cosmos/base/query/v1beta1) still exist inapi v0.9.2, so nothing else shifts.This is fully self-contained in the repo (no external fork), documented inline in
both
compat/orm-api/go.modand the rootgo.mod.3.
app/ante/handler_options.go— the only production code changeSDK v0.53's
x/auth/ante.AccountKeeperinterface gained three methods for the newunordered-transaction feature. Our local
AccountKeeperinterface (embedded into theante decorators) must expose them. They were already present in the file as
commented-out stubs — this PR simply enables them:
(plus a
"time"import). The concreteauthkeeper.AccountKeeperfrom SDK v0.53already implements all three, so no wiring changes are needed.
4.
app/ante/fee_test.go— matching test mockThe unit test's
mockAccountKeeperAntegets the same three methods (no-op /falsestubs) plus a"time"import, so the ante tests continue to compile and pass.What was intentionally NOT changed
wasmd v0.55.0— kept (as the existing// Keep v0.55.0comment mandates).It is a v0.50-line release but compiles cleanly against v0.53 (v0.53 is
API-compatible with v0.50). Bumping it was unnecessary and would widen the blast
radius.
pushchain/evmfork,ibc-go/v10 v10.4.0,tokenfactory,go-ethereum—already target SDK v0.53; left untouched.
interchaintest/module — a separate, self-contained Go module(
github.com/pushchain/push-chain-node/interchaintest). It is an E2E harness builton the strangelove-ventures
interchaintestframework with its own pinned SDKfork (
strangelove-ventures/cosmos-sdk v0.50.13,ibc-go/v8). It does notimport the main module (the parent-app
replaceis commented out) and is not partof
make buildormake test-unit, so it is unaffected by this upgrade and wasdeliberately left as-is. Retargeting it would be out of scope and risky.
Effect on the repo
store keys, message handlers, or state were modified. The new v0.53 features
(unordered txs, epochs, protocolpool) are not enabled/wired — they are simply
available in the SDK now.
AccountKeeperinterface: widened by three methods, all already satisfied bythe real keeper. No call sites change.
go.mod/go.sum). Thecompat/orm-apinested module must exist for the build toresolve — it is checked in.
go.sumreconciled to the v0.53 graph (+35 / −29 lines).Verification
go build ./...(all non-test packages, including the cgouniversalClient) alsocompiles with zero errors.
Files changed
How to review
go.mod— confirm thereplaceblock matches the table above and thatcosmos-sdk => v0.53.7.compat/orm-api/— three generated.pulsar.gofiles (unchanged upstreamcode) + a 15-line
go.mod. The interesting bit is why it exists (see §2).make build && ./build/pchaind version --longandmake test-unit.Rollback
Revert this PR. The change is confined to
go.mod/go.sum, thecompat/orm-api/directory, and the two
app/antefiles; there is no state or genesis impact.Notes / follow-ups
compat/orm-apishim exists purely because upstreamcosmossdk.io/ormhas notbeen re-released against
api v0.9.x. If/when the ORM module is updated (or thesemodules migrate off
cosmossdk.io/orm), the shim can be deleted.separate, opt-in change.
References
Changes
Testing
go test ./...Checklist