Skip to content

blockifier_reexecution,starknet_transaction_prover: graceful fallback on prefetch failure#13743

Merged
AvivYossef-starkware merged 1 commit intomain-v0.14.2from
aviv/reexecution-prefetch-fallback
Apr 20, 2026
Merged

blockifier_reexecution,starknet_transaction_prover: graceful fallback on prefetch failure#13743
AvivYossef-starkware merged 1 commit intomain-v0.14.2from
aviv/reexecution-prefetch-fallback

Conversation

@AvivYossef-starkware
Copy link
Copy Markdown
Contributor

@AvivYossef-starkware AvivYossef-starkware commented Apr 14, 2026

If starknet_simulateTransactions fails (e.g. the node does not support
Starknet spec >= v0.10.1, or a transient network error), log a warning
and fall back to empty StateMaps instead of failing the block.

The SimulatedStateReader with empty maps routes all reads through
individual RPC calls — slower but correct.

Both call sites are updated:

  • SimulatedStateReader::from_rpc_state_reader (reexecution flow)
  • RpcVirtualBlockExecutor::state_reader (virtual block executor)

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 14, 2026

PR Summary

Low Risk
Error-handling change that only affects the prefetch optimization path; correctness should be preserved, with the main risk being silently reduced performance if simulate failures become frequent.

Overview
State prefetching via starknet_simulateTransactions is now best-effort: failures no longer abort reexecution or virtual block execution.

Both SimulatedStateReader::from_rpc_state_reader and RpcVirtualBlockExecutor::state_reader catch simulation errors, log a warning about missing spec support/transient failures, and proceed with StateMaps::default() so all reads fall back to individual RPC calls (slower but correct).

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

@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/reexecution-prefetch-fallback branch from a9cf339 to a253c19 Compare April 14, 2026 11:32
@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/reexecution-skip-fee-charge-param branch from c60012e to 710f918 Compare April 14, 2026 11:32
Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

@Yoni-Starkware reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on noaov1).

@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/reexecution-skip-fee-charge-param branch from 710f918 to cf57e7f Compare April 14, 2026 18:45
@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/reexecution-prefetch-fallback branch from a253c19 to 76274da Compare April 14, 2026 18:45
@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/reexecution-skip-fee-charge-param branch from cf57e7f to de3ba72 Compare April 15, 2026 12:22
@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/reexecution-prefetch-fallback branch 2 times, most recently from 86e0c7e to 9adb208 Compare April 15, 2026 16:45
@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/reexecution-skip-fee-charge-param branch from de3ba72 to 910c0f2 Compare April 15, 2026 16:45
@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/reexecution-prefetch-fallback branch from 9adb208 to 408650d Compare April 15, 2026 16:49
… on prefetch failure

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/reexecution-prefetch-fallback branch from 408650d to 1f187b0 Compare April 16, 2026 08:10
@AvivYossef-starkware AvivYossef-starkware force-pushed the aviv/reexecution-skip-fee-charge-param branch from 910c0f2 to b4e1482 Compare April 16, 2026 08:10
@AvivYossef-starkware AvivYossef-starkware changed the base branch from aviv/reexecution-skip-fee-charge-param to main-v0.14.2 April 20, 2026 07:44
@AvivYossef-starkware AvivYossef-starkware added this pull request to the merge queue Apr 20, 2026
Merged via the queue into main-v0.14.2 with commit 14a6c38 Apr 20, 2026
39 of 56 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants