-
Notifications
You must be signed in to change notification settings - Fork 0
fix: fetch nodes didn't support empty tree #184
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #184 +/- ##
==========================================
- Coverage 62.13% 62.06% -0.07%
==========================================
Files 36 36
Lines 1624 1629 +5
Branches 1624 1629 +5
==========================================
+ Hits 1009 1011 +2
- Misses 565 568 +3
Partials 50 50 ☔ 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.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware and @TzahiTaub)
crates/committer/src/hash/hash_trait.rs
line 9 at r1 (raw file):
#[allow(dead_code)] pub(crate) const ZERO: HashOutput = HashOutput(Felt::ZERO); pub(crate) const EMPTY_NODE: HashOutput = Self::ZERO;
please rename for clarity - for example, an "empty ContractState" (which is a leaf node with three zeros as data) will not have a hash that is equal to zero
Suggestion:
pub(crate) const ROOT_OF_EMPTY_TREE: HashOutput = Self::ZERO;
70fc408
to
414d370
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: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware and @TzahiTaub)
crates/committer/src/hash/hash_trait.rs
line 9 at r1 (raw file):
Previously, dorimedini-starkware wrote…
please rename for clarity - for example, an "empty ContractState" (which is a leaf node with three zeros as data) will not have a hash that is equal to zero
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 2 of 2 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)
This change is