Skip to content

blockifier_reexecution: cache BlockInfoWithTxs in consecutive readers to dedupe RPC fetches#13833

Open
AvivYossef-starkware wants to merge 1 commit intoaviv/reexecution-base-info-structfrom
aviv/reexecution-thread-block-info-with-txs
Open

blockifier_reexecution: cache BlockInfoWithTxs in consecutive readers to dedupe RPC fetches#13833
AvivYossef-starkware wants to merge 1 commit intoaviv/reexecution-base-info-structfrom
aviv/reexecution-thread-block-info-with-txs

Conversation

@AvivYossef-starkware
Copy link
Copy Markdown
Contributor

No description provided.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Contributor Author

AvivYossef-starkware commented Apr 20, 2026

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 20, 2026

PR Summary

Medium Risk
Moderate risk because it changes how block header/txs and BlockContext are sourced (cached starknet_getBlockWithTxs vs multiple RPC calls), which could affect reexecution correctness if caching/borrowing assumptions are wrong.

Overview
Deduplicates next-block RPC fetches in ConsecutiveRpcStateReaders by introducing a lazy OnceLock cache for BlockInfoWithTxs, so multiple consumers reuse a single starknet_getBlockWithTxs response.

Refactors BlockContext creation to support building from a pre-fetched BlockInfo (build_block_context) and updates execution/prefetch/offline-dump paths to use the cached block info/transactions instead of re-fetching per operation.

Reviewed by Cursor Bugbot for commit 2bd7f4f. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

2 participants