apollo_committer: test new edge bottom in witnesses#14388
Conversation
PR SummaryLow Risk Overview The scenario commits three class leaves (left pair A/B and rightmost D), then deletes D while requesting witnesses only for that key. It asserts Supporting imports only: Reviewed by Cursor Bugbot for commit 523092c. Bugbot is set up for automated code reviews on this repo. Configure here. |
yoavGrs
left a comment
There was a problem hiding this comment.
@yoavGrs made 2 comments.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on ArielElp).
a discussion (no related file):
Can you reuse utils in crates/starknet_committer/src/forest/deleted_nodes_test.rs?
crates/apollo_committer/src/request_paths_and_commit_block_tests.rs line 484 at r1 (raw file):
response.patricia_proofs.classes_trie_proof.contains_key(&edge_tree_node_e_hash), "missing bottom of a new edge node in a proof", );
Use your new storage proof verification?
Code quote:
assert!(
response.patricia_proofs.classes_trie_proof.contains_key(&edge_tree_node_e_hash),
"missing bottom of a new edge node in a proof",
);
ArielElp
left a comment
There was a problem hiding this comment.
@ArielElp made 2 comments.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on yoavGrs).
a discussion (no related file):
Previously, yoavGrs wrote…
Can you reuse utils in
crates/starknet_committer/src/forest/deleted_nodes_test.rs?
Hhhmm doesn't look like it, in addition to being a bit higher level on ApolloCommitter it's testing different things. I don't really care about the deleted nodes on the right side.
crates/apollo_committer/src/request_paths_and_commit_block_tests.rs line 484 at r1 (raw file):
Previously, yoavGrs wrote…
Use your new storage proof verification?
To what leaf? I think the point here is that this case does not add "full paths" to the proof.
651ab0e to
efb1efd
Compare
852520b to
b8f5eef
Compare
yoavGrs
left a comment
There was a problem hiding this comment.
@yoavGrs made 1 comment and resolved 2 discussions.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on ArielElp).
crates/apollo_committer/src/request_paths_and_commit_block_tests.rs line 421 at r1 (raw file):
let class_hash_a = ClassHash(0_u64.into()); let class_hash_b = ClassHash(1_u64.into()); let class_hash_d = ClassHash(PATRICIA_KEY_UPPER_BOUND_FELT - 1_u64);
Please add another case where this key is 3 or 4:
- To match the illustration.
- In this case, the proof should contain a and b, right?
Code quote:
PATRICIA_KEY_UPPER_BOUND_FELT - 1_u64b8f5eef to
66c20f8
Compare
efb1efd to
1a70b65
Compare
1a70b65 to
91077f1
Compare
66c20f8 to
523092c
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 1 file and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on ArielElp).
crates/apollo_committer/src/request_paths_and_commit_block_tests.rs line 383 at r3 (raw file):
/// 2. Commit block 1 via [crate::committer::Committer::read_paths_and_commit_block], deleting `D` /// and requesting witnesses only for the deleted key. /// 3. Assert the returned classes-trie proof contains node `E`.
we actually need A and B here as well, to prove E is binary when converting R to an edge from R to E
Code quote:
Assert the returned classes-trie proof contains node `E`.crates/apollo_committer/src/request_paths_and_commit_block_tests.rs line 452 at r3 (raw file):
response.patricia_proofs.classes_trie_proof.contains_key(&edge_tree_node_e_hash), "missing bottom of a new edge node in a proof", );
also assert leaf_a_hash and leaf_b_hash
Code quote:
assert!(
response.patricia_proofs.classes_trie_proof.contains_key(&edge_tree_node_e_hash),
"missing bottom of a new edge node in a proof",
);
No description provided.