Skip to content

feat(cast): use prestate tracer to speed up cast run#13226

Open
Himess wants to merge 2 commits intofoundry-rs:masterfrom
Himess:feat/prestate-tracer-cast-run
Open

feat(cast): use prestate tracer to speed up cast run#13226
Himess wants to merge 2 commits intofoundry-rs:masterfrom
Himess:feat/prestate-tracer-cast-run

Conversation

@Himess
Copy link
Contributor

@Himess Himess commented Jan 26, 2026

Motivation

Closes #12719

Builds upon the approach from #12743 by @dipanshuhappy

Use debug_traceTransaction prestate tracer to fetch accessed state
directly instead of replaying entire block. Falls back to block
replay if debug API is unavailable.

This optimization fetches the prestate (accounts and storage slots
accessed by the transaction) via the debug_traceTransaction RPC method.
When available, this is significantly faster than replaying all previous
transactions in the block.

Added `--no-prestate-tracer` flag to disable this optimization if needed.

Co-authored-by: dipanshuhappy <dipanshuhappy@gmail.com>
@Himess Himess force-pushed the feat/prestate-tracer-cast-run branch from 6a525fd to d77f0cf Compare January 26, 2026 16:35
@Himess Himess marked this pull request as ready for review January 26, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

feat(cast): use prestate tracer to speed up cast run

1 participant