blockifier,apollo_batcher: produce OS initial reads behind os_input#14592
blockifier,apollo_batcher: produce OS initial reads behind os_input#14592yoavGrs wants to merge 1 commit into
Conversation
PR SummaryMedium Risk Overview Those values are attached to Reviewed by Cursor Bugbot for commit 6df9efa. Bugbot is set up for automated code reviews on this repo. Configure here. |
2eba218 to
94cf5bb
Compare
itamar-starkware
left a comment
There was a problem hiding this comment.
There is one comment about the feature flag removal. Consider split to more PRs to handle this design issue.
94cf5bb to
c52efb3
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c52efb3. Configure here.
| let state_diff = block_state.to_state_diff()?.state_maps; | ||
|
|
||
| #[cfg(feature = "os_input")] | ||
| let initial_reads = block_state.get_os_initial_reads()?; |
There was a problem hiding this comment.
Migration breaks OS initial reads
High Severity
get_os_initial_reads runs after set_compiled_class_hash_migration, so migrated classes already have post-migration compiled class hashes in the write cache. The OS backfill via get_compiled_class_hash then skips reading parent state and often leaves no pre-block compiled class hash in initial_reads, so downstream OS replay can get wrong trie inputs.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c52efb3. Configure here.
There was a problem hiding this comment.
It already inserts into the initial reads. See the discussion here:
https://reviewable.io/reviews/starkware-libs/sequencer/14612
yoavGrs
left a comment
There was a problem hiding this comment.
@yoavGrs made 1 comment.
Reviewable status: 0 of 10 files reviewed, 3 unresolved discussions (waiting on itamar-starkware).
c52efb3 to
15affd5
Compare
15affd5 to
f5749a5
Compare
94279be to
cdbf3ab
Compare
f5749a5 to
9f42919
Compare
Add an os_input feature on blockifier and, behind it, compute the pre-block OS read values (CachedState::get_os_initial_reads) in finalize_block, expose them on BlockExecutionSummary/BlockExecutionArtifacts, and carry them into the batcher's CentralObjects decision-reached response. Not yet consumed downstream. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cdbf3ab to
01f17ad
Compare
9f42919 to
6df9efa
Compare
yoavGrs
left a comment
There was a problem hiding this comment.
@yoavGrs made 1 comment.
Reviewable status: 0 of 10 files reviewed, 2 unresolved discussions (waiting on itamar-starkware).
| let state_diff = block_state.to_state_diff()?.state_maps; | ||
|
|
||
| #[cfg(feature = "os_input")] | ||
| let initial_reads = block_state.get_os_initial_reads()?; |
There was a problem hiding this comment.
It already inserts into the initial reads. See the discussion here:
https://reviewable.io/reviews/starkware-libs/sequencer/14612



Add an os_input feature on blockifier and, behind it, compute the pre-block OS read values (CachedState::get_os_initial_reads) in finalize_block, expose them on BlockExecutionSummary/BlockExecutionArtifacts, and carry them into the batcher's CentralObjects decision-reached response. Not yet consumed downstream.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com