blockifier: take CommitmentStateDiff in AccessedKeys::new and predicted_alias_storage_entries#14156
Conversation
…ed_alias_storage_entries CommitmentStateDiff is the natural per-block state-diff type at the OS-replay boundary (the batcher's BlockExecutionArtifacts already carries one). Swap both AccessedKeys::new and predicted_alias_storage_entries to consume it directly: - AccessedKeys::new derives storage entries from state_diff.storage_updates, the modified-contracts union from storage_updates / address_to_nonce / address_to_class_hash, and the class-hash keys from address_to_class_hash + class_hash_to_compiled_class_hash. - predicted_alias_storage_entries now walks CommitmentStateDiff directly; the parity test converts its StateMaps fixture via CommitmentStateDiff::from. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryMedium Risk Overview Tests are updated to build Reviewed by Cursor Bugbot for commit f457985. Bugbot is set up for automated code reviews on this repo. Configure here. |
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on yoavGrs).
crates/blockifier/src/state/stateful_compression.rs line 98 at r1 (raw file):
.keys() .chain(state_diff.address_to_nonce.keys()) .chain(state_diff.address_to_class_hash.keys());
this is implemented twice; make this a method of CommitmentStateDiff?
Code quote:
let modified_contracts = state_diff
.storage_updates
.keys()
.chain(state_diff.address_to_nonce.keys())
.chain(state_diff.address_to_class_hash.keys());
CommitmentStateDiff is the natural per-block state-diff type at the OS-replay
boundary (the batcher's BlockExecutionArtifacts already carries one). Swap
both AccessedKeys::new and predicted_alias_storage_entries to consume it
directly:
state_diff.storage_updates, the modified-contracts union from
storage_updates / address_to_nonce / address_to_class_hash, and the
class-hash keys from address_to_class_hash + class_hash_to_compiled_class_hash.
the parity test converts its StateMaps fixture via CommitmentStateDiff::from.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com