-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: remove dependency on tree_height parameter on forest impl #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove dependency on tree_height parameter on forest impl #182
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #182 +/- ##
==========================================
+ Coverage 61.69% 63.27% +1.58%
==========================================
Files 36 36
Lines 1650 1702 +52
Branches 1650 1702 +52
==========================================
+ Hits 1018 1077 +59
+ Misses 583 575 -8
- Partials 49 50 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 8 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware and @TzahiTaub)
crates/committer/src/patricia_merkle_tree/types_test.rs
line 38 at r1 (raw file):
#[case(15, NodeIndex::FIRST_LEAF + NodeIndex::from(15))] #[case(0xDEADBEEF, NodeIndex::FIRST_LEAF + NodeIndex::from(0xDEADBEEF))] fn test_cast_to_node_index(
The test has become quite redundant when the function doesn't depend on tree height; maybe it's better to remove it.
Code quote:
fn test_cast_to_node_index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @nimrod-starkware and @TzahiTaub)
crates/committer/src/patricia_merkle_tree/types_test.rs
line 38 at r1 (raw file):
Previously, nimrod-starkware wrote…
The test has become quite redundant when the function doesn't depend on tree height; maybe it's better to remove it.
It checks conversions from contract address and storage key, so not completely redundant
crates/committer/src/patricia_merkle_tree/types_test.rs
line 42 at r1 (raw file):
#[case] expected_node_index: NodeIndex, #[values(true, false)] from_contract_address: bool, ) {
shorter, and means the same
Suggestion:
#[rstest]
fn test_cast_to_node_index(
#[values(0, 15, 0xDEADBEEF)] leaf_index: u128,
#[values(true, false)] from_contract_address: bool,
) {
let expected_node_index = NodeIndex::FIRST_LEAF + leaf_index;
a860c33
to
b9ee89c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware and @TzahiTaub)
crates/committer/src/patricia_merkle_tree/types_test.rs
line 42 at r1 (raw file):
Previously, dorimedini-starkware wrote…
shorter, and means the same
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)
This change is