chore: bring cosmos/evm v0.6.0 onto audit-fixes (fixes F-2026-18785) - #47
Merged
Conversation
* Changelog * fix line length
Seven jobs never run — they queue until GitHub cancels them at 24h. Bumps test/lint timeouts 15m->30m for the smaller GitHub runners.
ci: move jobs off dead Depot runners to GitHub-hosted
fix(rpc): report base fee as the gas price of derived txs
The shim existed because cosmos-sdk v0.50.x had no in-place events setter; the fork now pins v0.53.6, where OverrideEvents is exactly em.events = events.
This was referenced Aug 26, 2026
# Conflicts: # tests/integration/x/erc20/test_msg_server.go # x/erc20/keeper/ibc_callbacks.go # x/erc20/keeper/msg_server.go # x/ibc/callbacks/keeper/keeper.go # x/vm/keeper/call_evm.go
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.
Brings cosmos/evm v0.6.0 onto the
audit-fixesline by mergingdevelop, which already carries it.Why
audit-fixes(and thereforemain/mainnet) sits on the v0.5.1 line, whiledevelopandtestnet/donuthave run v0.6.0 since Arya's upgrade in2ed3c930(2026-06-27). That gap is what F-2026-18785 reports.F-2026-18785 — RevertMultiStore EventManager / writeCache desync. On our side
RevertMultiStorereplaced thewriteCacheclosure with one holding a frozen event slice, and nothing ever restored it:Two consequences: precompiles succeeding after a caught revert had their store writes committed but their events swallowed; and because
cacheCtx's events were never truncated, a later reverting frame could freeze in a slice still containing earlier reverted emissions. Trigger is ordinary Soliditytry/catcharound a precompile call.v0.6.0 fixes it structurally — the function no longer takes events and only rolls the store, with restoration moved into the journal entry where it belongs:
writeCachestays the live flush, and revert rewinds events rather than freezing them.The merge
git merge-treereported no conflicts, and the real merge was clean. The lineages share a very recent base —96231e7a(our pin) is a direct ancestor ofdevelop, with the v0.6.0 upgrade sitting immediately on top. Divergence was only 3 commits vs 9.Verified after merging:
RevertMultiStoreis the v0.6.0 store-only form; event restoration present inprecompileCallChange.RevertVerifySender), F-2026-18197, F-2026-18187 (getTallyResult)go build ./x/... ./precompiles/... ./ante/...cleanSecond commit — retiring a reflect/unsafe shim
The merge brought a Push-fork adaptation that writes the SDK's unexported
eventsfield by reflection:Its comment explains why: "push-chain pins cosmos-sdk to the v0.50.x line … which has no in-place events setter." That was correct when written — v0.50.10 has zero occurrences of
OverrideEvents— but the premise is now stale. This fork pins cosmos-sdk v0.53.6, where:is exactly the in-place mutation the comment says is required, and is on
EventManagerItoo. So the shim is replaced with the direct call and thereflect/unsafeimports are dropped.Worth doing beyond tidiness: as written it was a latent panic on a consensus path —
FieldByNamereturns a zeroValueif the concrete type behindEventManagerIis ever not*sdk.EventManager, and.UnsafeAddr()on a zeroValuepanics insideRevert. It also breaks silently if the SDK renames the field.Scope — what this does not fix
Checked every evm-attributed finding in this audit against v0.6.0; it closes exactly one:
mainante/types/block.gobyte-identical to oursmainTraceCallidentical to ourscosmossdk.io/x/tx)So this is a drift-reduction and one-finding fix, not a sweep of the evm cluster.
Sequencing
The node side needs a matching PR — v0.6.0 removes cosmos/evm's custom
x/ibc/transferwrapper and changes theCallEVMsignature, sopush-chain-nodedoes not compile against this until its adaptation lands. Merge this first, then the node PR pins to the resulting commit.Open evm PRs #43–#46 will need rebasing onto this once merged.
Follow-up
A regression test for F-2026-18785 (Hacken's rec 4 — revert precompile A via try/catch, then a successful precompile B must emit B's events and not A's) is not in this PR. Tracked separately; the fix here rests on the upstream diff plus the verifications above.