Skip to content

chore(deps): bump cosmos-sdk to v0.53.8, ship it as an empty v4.4 upgrade (backport #2024) - #2028

Merged
RafilxTenfen merged 1 commit into
release/v4.4.xfrom
backport/2024-sdk-v0.53.8-v4.4.x
Aug 5, 2026
Merged

chore(deps): bump cosmos-sdk to v0.53.8, ship it as an empty v4.4 upgrade (backport #2024)#2028
RafilxTenfen merged 1 commit into
release/v4.4.xfrom
backport/2024-sdk-v0.53.8-v4.4.x

Conversation

@RafilxTenfen

@RafilxTenfen RafilxTenfen commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Backport of #2024 (0de36afa) to release/v4.4.x.

This is the top of a three PR stack and targets #2027's branch, not release/v4.4.x directly. Merge order is #2026, then #2027, then this one. GitHub retargets each PR automatically as the one below it merges.

release/v4.4.x
 └─ #2026  reset release/v4.4.x to release/v4.3.x
     └─ #2027  bump CosmWasm/wasmd v0.60.5 (backport #1965)
         └─ THIS PR  cosmos-sdk v0.53.8 + empty v4.4 upgrade
  • Bumps cosmos-sdk v0.53.5 to v0.53.8 and cometbft v0.38.22 to v0.38.23
  • Adds the v4.4 upgrade handler, which carries no state migration and exists only to coordinate the binary swap for the v0.53.8 security release
  • Registers v4.4 in Upgrades for both mainnet and testnet builds
  • Adds TestUpgradeV44, which boots the pre-upgrade image, passes a gov software upgrade proposal, and asserts state survives the swap

Refer to #2024 for the full analysis of why v0.53.8 is state breaking and why no migration is required. That reasoning is unchanged here.

Backport adaptations

  1. v4.5 is not included. On main, chore(deps): bump cosmos-sdk to v0.53.8, ship it as an empty v4.4 upgrade #2024 moved the costaking ActiveBaby recalculation out of v4_4 and into a new, deliberately unregistered v4_5. On this branch chore: reset release/v4.4.x to release/v4.3.x #2026 removed that code entirely, so there is nothing to move: v4_4 is authored directly as the empty handler and no v4_5 package is created. This means the costaking recalculation staged on main for v4.5 does not reach this release line. If it is meant to, it needs its own backport.
  2. TestUpgradeV44 is adapted to this branch's tmanager, which does not have the helpers the original relies on. Ported verbatim from main: StakingQuery, EpochingQuery, QueryDelegation, QueryCurrentEpoch (node_queries.go), WrappedDelegate (node_txs.go) and WaitForEpochEnd (node.go).
  3. createGovPropAndPreUpgradeFunc lives in the test file here. On main it sits in upgrades_v4_5_test.go, which is not backported.
  4. Two small API differences on this branch: WalletSender has no Addr() (uses .Address.String()), and UpdateWalletAccSeqNumber is not variadic (the call is split in two).
  5. cfg.EpochLength is dropped from the test setup. That field is not wired into genesis on this branch, so setting it is a no-op. The epoching default here is already 10 blocks, so the epoch assertions behave as intended without it.

Why the stack

wasmd v0.55.1, which #2026 restores, does not compile against cosmos-sdk v0.53.5 or later, so #2027 is a hard prerequisite for this PR. See that PR for the detail.

Original PR

#2024

🤖 Generated with Claude Code

@RafilxTenfen
RafilxTenfen requested a review from a team as a code owner August 4, 2026 18:15
@RafilxTenfen
RafilxTenfen requested review from KonradStaniec and Vvaradinov and removed request for a team August 4, 2026 18:15
@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown

Greptile Summary

The PR upgrades Cosmos SDK to v0.53.8 and CometBFT to v0.38.23, coordinating the state-breaking binary change through an empty v4.4 upgrade.

  • Registers the v4.4 handler in mainnet and testnet builds.
  • Adds an end-to-end binary-upgrade and state-preservation test plus supporting test-manager helpers.
  • Updates dependency checksums and the changelog.
  • No SECURITY-GUARDRAILS.md file was present, so no repository-specific security guardrails applied; the reviewed upgrade path uses the standard named upgrade handler and migration mechanism, and no concrete security regression was identified.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified in the upgrade registration, handler, dependency update, or test flow.

The v4.4 plan is registered consistently for both network builds, dispatches through the standard upgrade mechanism, and runs module migrations without unsupported store changes; the accompanying test covers binary replacement and state continuity.

Important Files Changed

Filename Overview
app/upgrades/v4_4/upgrade.go Adds the named v4.4 handler using the standard migration path with no store-key changes or custom state mutation.
app/include_upgrade_mainnet.go Registers the v4.4 upgrade for mainnet builds.
app/include_upgrade_testnet.go Registers the same v4.4 upgrade for testnet and e2e builds.
go.mod Upgrades Cosmos SDK, CometBFT, and the resulting Ledger transitive dependency.
test/e2ev2/upgrades_v4_4_test.go Exercises governance scheduling, binary replacement, continued block production, and pre/post-upgrade state and transaction behavior.
test/e2ev2/tmanager/node.go Adds an epoch-transition waiting helper used by the upgrade test.
test/e2ev2/tmanager/node_queries.go Adds staking and epoch query helpers needed to verify delegation state.
test/e2ev2/tmanager/node_txs.go Adds the wrapped staking delegation transaction helper used in the state-preservation scenario.

Sequence Diagram

sequenceDiagram
    participant Gov as Governance
    participant Old as Pre-v4.4 validators
    participant UK as Upgrade keeper
    participant New as v4.4 validators
    Gov->>Old: Approve v4.4 software-upgrade plan
    Old->>UK: Reach scheduled upgrade height
    UK-->>Old: Halt for binary replacement
    New->>UK: Restart with v4.4 handler
    UK->>New: RunMigrations with existing version map
    New-->>New: Resume consensus without custom state migration
Loading

Reviews (1): Last reviewed commit: "chore(deps): bump cosmos-sdk to v0.53.8,..." | Re-trigger Greptile

@RafilxTenfen RafilxTenfen self-assigned this Aug 4, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🔐 Commit Signature Verification

All 1 commit(s) passed verification

Commit Author Signature Key Type Key Check
f3faa55dfb22 RafilxTenfen sk-ssh-ed25519

Summary

  • Commits verified: 1
  • Signature check: ✅ All passed
  • Key type enforcement: ✅ All sk-ssh-ed25519

Required key type: sk-ssh-ed25519 (FIDO2 hardware key)

Last verified: 2026-08-05 21:31 UTC

@RafilxTenfen
RafilxTenfen force-pushed the backport/2024-sdk-v0.53.8-v4.4.x branch from 5a731ce to f3c0c48 Compare August 5, 2026 21:27
Base automatically changed from chore/bump-wasmd-v0.60.5-v4.4.x to release/v4.4.x August 5, 2026 21:29
@RafilxTenfen
RafilxTenfen force-pushed the backport/2024-sdk-v0.53.8-v4.4.x branch from f3c0c48 to 3049900 Compare August 5, 2026 21:30
…rade (backport #2024)

Backport of #2024 (0de36af) adapted to release/v4.4.x.

Bumps cosmos-sdk v0.53.5 -> v0.53.8 and cometbft v0.38.22 -> v0.38.23, and
adds the v4.4 upgrade handler, which carries no state migration and exists
only to coordinate the binary swap for the v0.53.8 security release.

Adapted from the original:

- v4.5 is not included. On main, #2024 moved the costaking ActiveBaby
  recalculation from v4_4 to a new v4_5. On this branch the reset in #2026
  removed that code entirely, so there is nothing to move and v4.4 is
  authored directly as the empty handler.
- TestUpgradeV44 is adapted to this branch's tmanager, which lacks the
  helpers the original relies on. StakingQuery, EpochingQuery,
  QueryDelegation, QueryCurrentEpoch, WrappedDelegate and WaitForEpochEnd
  are ported verbatim from main.
- createGovPropAndPreUpgradeFunc lives in the test file here, since on main
  it sits in upgrades_v4_5_test.go which is not backported.

(backport of commit 0de36af)
@RafilxTenfen
RafilxTenfen force-pushed the backport/2024-sdk-v0.53.8-v4.4.x branch from 3049900 to f3faa55 Compare August 5, 2026 21:31
@RafilxTenfen
RafilxTenfen merged commit 2baf785 into release/v4.4.x Aug 5, 2026
7 checks passed
@RafilxTenfen
RafilxTenfen deleted the backport/2024-sdk-v0.53.8-v4.4.x branch August 5, 2026 21:33
RafilxTenfen added a commit that referenced this pull request Aug 6, 2026
## Summary

Brings `release/v4.4.x`'s CI, devops and dependency surface up to
`main`, in two commits.

This is the **top of a four PR stack** and targets #2028's branch. Merge
order is #2026, #2027, #2028, then this one. GitHub retargets each PR
automatically as the one below it merges.

```
release/v4.4.x
 └─ #2026  reset release/v4.4.x to release/v4.3.x
     └─ #2027  bump CosmWasm/wasmd v0.60.5 (backport #1965)
         └─ #2028  cosmos-sdk v0.53.8 + empty v4.4 upgrade (backport #2024)
             └─ THIS PR  CI, devops and dependency bumps
```

### Commit 1, CI and devops

* **#1995, #2010**: reusable workflows to v0.19.1 across `ci.yml`,
`publish.yml`, `changelog-reminder.yml` and `sync_pr_main_to_base.yml`,
plus the tibdex backport action comment. The action SHA pins these PRs
also carry are already present from #2022, so only the reusable refs
move.
* **#1952**: Dockerfile hardening (Alpine 3.21 and Debian bookworm
bases, pinned runtime packages, hadolint fixes) and the devops
CODEOWNERS entry for `/.github/workflows/`.
* **#1931**: pin `GORELEASER_IMAGE` to `goreleaser-cross:v1.27.0` rather
than deriving the tag from `go.mod`.

### Commit 2, Go 1.25 and dependencies (#2008)

* `go` directive 1.23.8 to 1.25.8, with matching `go-version` in the
workflows, the golang base images, and golangci-lint v2.11.4
* **`grpc` v1.75.0 to v1.80.0, which closes `CVE-2026-33186`**, the
critical currently failing Trivy on #2026
* `x/crypto` v0.49.0, `x/net` v0.52.0, `x/text` v0.35.0, `x/sys`
v0.42.0, `otel` v1.43.0, `go-getter` v1.8.6, `go-ethereum` v1.17.0,
`go-jose` v4.1.4, `runc` v1.3.6, `xz` v0.5.15, `mapstructure` v2.4.0,
`msgpack` v2.4.1, `edwards25519` v1.1.1, `bitset` v1.24.3, `docker/cli`
v29.2.0
* the `.golangci.yml` `noctx` exemption for `test/e2ev2/`

## Things reviewers should weigh

1. **The Go bump and the dependency bumps are not separable.** #2008
bundles them upstream, and mechanically `go-getter` v1.8.6 requires `go
1.25.8` while the `x/*` and `otel` packages require `go 1.25.0`. There
is no version of this change that fixes the CVEs while the branch stays
on `go 1.23.8`. It was attempted first and does not resolve.

2. **The v4.4 binary swap now crosses two deltas, not one.** #2028 was
designed around a single clean delta, cosmos-sdk v0.53.4 to v0.53.8.
With this PR the swap also crosses go 1.23 to go 1.25. Go version
changes are a known source of subtle non-determinism in Cosmos chains,
`sort.Slice` is not stable and its algorithm has changed across
releases, and this repo has already been bitten by that class of bug
(#1956, #1802, #1805). Green unit tests and lint do not rule it out. The
check that would is a mainnet block replay comparing a go 1.23 build
against a go 1.25 build, worth doing before v4.4 ships.

3. **`goreleaser-cross:v1.27.0` ships Go 1.25.5, but `go.mod` now
requires 1.25.8.** Release builds would have to auto-download a
toolchain, or fail outright under `GOTOOLCHAIN=local`. `main` carries
the identical mismatch, so this is inherited rather than introduced, but
it affects release builds and someone should own it.

4. **`go.mod` and `go.sum` were regenerated against this branch's
dependency graph** rather than copied from `main`, which carries
indirect requirements from features not present here (the AWS SDK set,
ProjectZKM/Ziren). This is why the `go.sum` diff is large.

5. **`test/replay/stake_expansion_test.go` and `wrong_epoch_ve_test.go`
are reformatted only.** Go 1.25's `gofmt` aligns struct fields
differently. Neither file is otherwise modified.

## Verification

Run locally against this branch before pushing:

| Check | Result |
| --- | --- |
| `go build ./...` | clean |
| `go vet` under `mainnet`, `testnet`, `e2e` and `./test/e2ev2/...` |
clean |
| `golangci-lint v2.11.4`, the version CI uses | 0 issues |
| `gofmt -l` | clean |
| `make test-unit` | 34 packages ok, 0 failures |

## Not included

**#2008 is included but the following are deliberately not**: the
`e2e-docker-build-e2e-init-chain` job added to `ci.yml` by #1906, since
that PR's substance is not backported here. `cometbft` #1999 is already
present via #2001.

## Original PRs

#1931, #1952, #1995, #2008, #2010

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants