Skip to content

fix(anvil): coerce decoder hardfork to executed network family - #16454

Merged
mattsse merged 1 commit into
steven/unified-decoder-hardforkfrom
mattsse/anvil-decoder-hardfork-coercion
Aug 29, 2026
Merged

fix(anvil): coerce decoder hardfork to executed network family#16454
mattsse merged 1 commit into
steven/unified-decoder-hardforkfrom
mattsse/anvil-decoder-hardfork-coercion

Conversation

@mattsse

@mattsse mattsse commented Aug 29, 2026

Copy link
Copy Markdown
Member

Fixes a corner introduced by #16417 (stacked on that branch; will be rebased onto master once it merges). anvil accepts a cross-namespace hardfork override when the network is only inferred later from the fork endpoint (anvil --hardfork prague --fork-url <tempo/monad rpc>), and execution and fees coerce that override into the network family via the lossy From conversions. The unified decoder received the raw override instead, whose strict from_foundry_hardfork extraction yields None: monad address metadata was no longer registered and tempo precompile classification fell back to the full address list, so trace decoding disagreed with what the node executes.

The decoder now derives its hardfork through the same coercion execution applies, at build time and in the runtime refresh, restoring the pre-#16417 decoder behavior for this configuration. The added regression test fails without the coercion.

AI-assisted.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Changelog found

The deterministic check will validate the changed entry.

Comment thread crates/anvil/src/config.rs Outdated
A cross-namespace hardfork override on a tempo or monad node (e.g.
--hardfork prague with an inferred fork network) left the trace decoder
without a network hardfork while execution still coerced via the lossy
From conversions, dropping monad metadata and widening the tempo
precompile set. The decoder now derives its hardfork through the same
coercion execution applies.
@mattsse
mattsse force-pushed the mattsse/anvil-decoder-hardfork-coercion branch from 5a8805e to 38184bf Compare August 29, 2026 08:32
@mattsse
mattsse merged commit ff0db6f into steven/unified-decoder-hardfork Aug 29, 2026
26 checks passed
@mattsse
mattsse deleted the mattsse/anvil-decoder-hardfork-coercion branch August 29, 2026 08:55
@github-project-automation github-project-automation Bot moved this to Done in Foundry Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants