apollo_storage: add helper to build declared class component hashes for a block#14460
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryLow Risk Overview For a given block it walks A unit test covers fresh declaration vs migration across two blocks. Reviewed by Cursor Bugbot for commit 2903c18. Bugbot is set up for automated code reviews on this repo. Configure here. |
b177114 to
849fe29
Compare
|
PR description is weird...he is explaining other PRs |
itamar-starkware
left a comment
There was a problem hiding this comment.
Please read my non-blocking comments before merging.
…nent hashes for a block Add `get_declared_class_hash_to_component_hashes`, mapping each Cairo 1 class freshly declared in a block to its contract class component hashes (matching the OS block input). Classes whose compiled class hash was merely migrated in the block (declared in an earlier block) are excluded. The helper takes `impl StateStorageReader + ClassStorageReader` rather than a concrete transaction. Derive `Eq`/`PartialEq` for `ContractClassComponentHashes` so the test can assert on the returned map directly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
849fe29 to
2903c18
Compare
yoavGrs
left a comment
There was a problem hiding this comment.
Fixed.
@yoavGrs made 3 comments.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on itamar-starkware and yoavGrs).
itamar-starkware
left a comment
There was a problem hiding this comment.
@itamar-starkware reviewed 3 files and all commit messages, and resolved 2 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on yoavGrs).

apollo_committer: test new edge bottom in witnesses (#14388)
apollo_committer: reduce tests boilerplate (#14425)
apollo_propeller: added unit test infrastructure for testing behaviour (#12273)
Add unit-test infrastructure to exercise the apollo_propeller libp2p
Behaviourinisolation, driving it directly through its
NetworkBehaviourinterface without spinningup a real swarm.
Add
behaviour_test.rs(gated behind#[cfg(test)]fromlib.rs) with two harnesses:TestNode: wraps aBehaviourplus itsPeerIdand drives it viaon_swarm_event,on_connection_handler_event, andpoll.TestEnvironment: holds aBTreeMapof nodes keyed byPeerId, with helpers to builda full mesh and register a single equal-weight committee over all nodes.
simulate_*helpers (simulate_connect_to,simulate_receive_unit,simulate_connect_all)inject swarm/handler events;
expect_*helpers poll for and assert on emittedToSwarmevents under a timeout;
next_with_timeoutpolls the behaviour with a timeout.Named the event-injection helpers with a
simulate_prefix so call sites make clear theysimulate swarm interactions rather than perform real ones, and to distinguish them from the
expect_*assertion helpers (per review feedback).Named the polling helper
next_with_timeoutrather thannext_timeout, which reads as "thenext timeout" instead of "the next event, with a timeout" (per review feedback).
apollo_storage: add OwnedDbWriteTransaction for persistent transactions (#14439)
apollo_storage: add helper to build declared class component hashes for a block
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com