Skip to content

chore: adapt push-chain-node to cosmos/evm v0.6.0 - #339

Merged
0xNilesh merged 3 commits into
audit-fixesfrom
chore/evm-0.6.0-audit-fixes
Aug 26, 2026
Merged

chore: adapt push-chain-node to cosmos/evm v0.6.0#339
0xNilesh merged 3 commits into
audit-fixesfrom
chore/evm-0.6.0-audit-fixes

Conversation

@0xNilesh

Copy link
Copy Markdown
Member

Node-side half of the cosmos/evm v0.6.0 upgrade for the audit-fixes line. Pairs with pushchain/push-chain-evm#47.

Important

Merge order. push-chain-evm#47 must merge first, and the pin here must then be re-pointed at the resulting audit-fixes commit. Right now go.mod points at 9031914c on the PR branch chore/evm-0.6.0-on-audit-fixes, which is not a merged commit. Do not merge this before that is corrected.

Why

audit-fixes (and so main/mainnet) sits on the evm v0.5.1 line while develop and testnet/donut have run v0.6.0 since 2026-06-27. That gap is what F-2026-18785 reports; evm#47 closes it. This PR is what makes the node compile and pass against it.

What changed

v0.6.0 makes two breaking changes that reach the node:

1. cosmos/evm removed its custom x/ibc/transfer wrapper. Imports move to standard ibc-go, the keeper no longer takes an Erc20Keeper, and the ERC-20↔IBC conversion that wrapper used to do is now performed by the erc20 IBC middleware wrapped around the transfer stack:

transferStack = erc20.NewIBCMiddleware(app.Erc20Keeper, transferStack)

2. CallEVM gained stateDB and callFromPrecompile parameters — touching x/uexecutor/keeper/evm.go, gas_fee.go, expected_keepers.go, the generated EVM-keeper mock, and every call site in tests.

How it was produced

Cherry-picked 46c77ca4 ("feat: evm 0.6.0 adjustment changes") from #272, which did this same adaptation on develop. It applied with no conflicts. Three deviations, all deliberate:

Tests

Full suite against the v0.6.0 pin, run serially to avoid local disk contention:

go test -mod=readonly -p 1 -tags="ledger test_ledger_mock test" ./test/integration/...
  exit=0  ok=6   FAIL=0   disk errors: 0

go test -mod=readonly -p 1 -tags="ledger test_ledger_mock test" ./app/... ./x/... ./utils/...
  exit=0  ok=15  FAIL=0   disk errors: 0

21 packages green, no failures. go build ./... and go mod tidy clean.

The integration run is the meaningful one — test/integration/uexecutor is where the CallEVM signature change actually bites, and it is where the one real breakage surfaced and was fixed.

Scope

This is a version bump plus the mechanical adaptation. No behavioural change is intended on the node side, and no upgrade handler is included. The single audit finding closed by the upgrade (F-2026-18785) is fixed in the evm repo, not here — see evm#47 for that analysis and for which evm-attributed findings the upgrade does not address.

v0.6.0 removes cosmos/evm's custom x/ibc/transfer wrapper and adds stateDB /
callFromPrecompile to CallEVM. Cherry-picked from #272 with the pin retargeted
and one newer call site fixed; no upgrade handler (fresh-genesis branch).
…nd mocks

Pin moves off the PR-branch commit onto evm audit-fixes (89c7e52b), which
carries v0.6.0 plus every merged audit fix. build_revert_outbound_test.go
arrived after this branch was opened and mocked the pre-v0.6.0 CallEVM
signature: v0.6.0 inserts stateDB, so the mock needed NewStateDB and the
method-name matcher moved to index 8.
@0xNilesh
0xNilesh merged commit f96eed0 into audit-fixes Aug 26, 2026
7 checks passed
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.

1 participant