Skip to content

fix(rpc): mark block simulations in tx envs - #7228

Merged
joshieDo merged 4 commits into
mainfrom
joshie/extract-rpc-simulation-context
Aug 19, 2026
Merged

fix(rpc): mark block simulations in tx envs#7228
joshieDo merged 4 commits into
mainfrom
joshie/extract-rpc-simulation-context

Conversation

@joshieDo

@joshieDo joshieDo commented Aug 19, 2026

Copy link
Copy Markdown
Member

Marks Reth eth_simulateV1 transactions as simulations when their WithEncoded wrapper carries the empty envelope used by the block-simulation pipeline. Applies the same rule to envelope and bare AA conversions while preserving each transaction’s replay and channel identity.

Extracted while reviewing #4069.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Changelog not found.

A changelog entry is required before merging. We've generated a suggested changelog based on your changes:

Preview
---
tempo-alloy: patch
---

Fixed block RPC simulations to use the dedicated simulation execution context and transaction identifier.

Add changelog to commit this to your branch.

@joshieDo

Copy link
Copy Markdown
Member Author

cyclops audit fast

@tempoxyz-bot tempoxyz-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️ Cyclops Review

This change correctly identifies Reth block simulations, but using one global transaction identifier makes replay-sensitive simulation results diverge from execution. One verified low-severity correctness issue is annotated inline.

Reviewer Callouts
  • Simulation detection contract: encoded.is_empty() is an upstream implementation detail rather than an explicit simulation flag. Consider explicit plumbing or an upstream-pinned invariant test before other empty-encoded execution paths can acquire simulation semantics.
  • Conversion consistency: FromTxWithEncoded<AASigned> still ignores encoded bytes while the envelope implementation treats emptiness as simulation. This is unreachable today but should be checked before adding bare AASigned wrappers.

@joshieDo

Copy link
Copy Markdown
Member Author

cyclops audit fast

@joshieDo
joshieDo marked this pull request as ready for review August 19, 2026 12:05

@tempoxyz-bot tempoxyz-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️ Cyclops Review

This change correctly identifies Reth block simulations, but one verified Legacy-transaction compatibility issue remains on the current head.

Reviewer Callouts
  • Simulation classification contract: encoded.is_empty() is an upstream Reth convention rather than a locally enforced property. Future security-sensitive consumers should use an explicit trusted execution-path signal rather than treating this heuristic as authorization to skip validation.

Comment thread crates/revm/src/tx.rs
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.

3 participants