-
Notifications
You must be signed in to change notification settings - Fork 0
feat: added OriginalSkeletonInputNode enum to remove generic leaf fro… #168
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
861c375
to
d48007c
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 4 files reviewed, 2 unresolved discussions (waiting on @nimrod-starkware and @TzahiTaub)
crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs
line 111 at r1 (raw file):
} else if value.0.len() == EDGE_BYTES { return Ok(Self { hash: HashOutput(Felt::from_bytes_be_slice(&key.0)),
this wasn't used
Code quote:
hash: HashOutput(Felt::from_bytes_be_slice(&key.0)),
crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs
line 128 at r1 (raw file):
}); } else { // TODO(Nimrod, 5/5/2024): See if deserializing leaves data is needed somewhere.
seems that it isn't for the moment, and I can't imagine why it would be needed for the skeleton
Code quote:
// TODO(Nimrod, 5/5/2024): See if deserializing leaves data is needed somewhere.
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 3 of 4 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @dorimedini-starkware and @TzahiTaub)
crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs
line 35 at r2 (raw file):
type FilledNodeSerializationResult = Result<StorageValue, SerializationError>; type OriginalSkeletonInputNodeDeserializationResult = Result<OriginalSkeletonInputNode, DeserializationError>;
I think the name is too long; maybe would be better to remove it?
Code quote:
type OriginalSkeletonInputNodeDeserializationResult =
Result<OriginalSkeletonInputNode, DeserializationError>;
crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs
line 101 at r2 (raw file):
key: &StorageKey, value: &StorageValue, ) -> OriginalSkeletonInputNodeDeserializationResult {
Result<OriginalSkeletonInputNode, DeserializationError>
Code quote:
OriginalSkeletonInputNodeDeserializationResult
d48007c
to
3165a23
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: 3 of 4 files reviewed, 4 unresolved discussions (waiting on @nimrod-starkware and @TzahiTaub)
crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs
line 35 at r2 (raw file):
Previously, nimrod-starkware wrote…
I think the name is too long; maybe would be better to remove it?
Done.
crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs
line 101 at r2 (raw file):
Previously, nimrod-starkware wrote…
Result<OriginalSkeletonInputNode, DeserializationError>
Done.
also remove FilledNodeSerializationResult
, which was unused
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #168 +/- ##
==========================================
- Coverage 62.27% 61.95% -0.33%
==========================================
Files 35 35
Lines 1662 1682 +20
Branches 1662 1682 +20
==========================================
+ Hits 1035 1042 +7
- Misses 578 591 +13
Partials 49 49 ☔ 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: 3 of 4 files reviewed, 2 unresolved discussions (waiting on @TzahiTaub)
3165a23
to
36153ea
Compare
…m skeleton Signed-off-by: Dori Medini <dori@starkware.co>
36153ea
to
b7816af
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.
Reviewed 1 of 1 files at r3, 3 of 3 files at r4.
Reviewable status: 3 of 4 files reviewed, 3 unresolved discussions (waiting on @dorimedini-starkware)
crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree_test.rs
line 5 at r4 (raw file):
use crate::patricia_merkle_tree::node_data::inner_node::{EdgePathLength, PathToBottom}; use crate::patricia_merkle_tree::node_data::leaf::LeafModifications; use crate::patricia_merkle_tree::original_skeleton_tree::create_tree::LeafDataImpl;
Was this an import of an import?
Code quote:
use crate::patricia_merkle_tree::original_skeleton_tree::create_tree::LeafDataImpl;
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: 3 of 4 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware and @TzahiTaub)
crates/committer/src/patricia_merkle_tree/original_skeleton_tree/create_tree_test.rs
line 5 at r4 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
Was this an import of an import?
apparently
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 r5, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @dorimedini-starkware)
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:
complete! all files reviewed, all discussions resolved
crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs
line 111 at r1 (raw file):
Previously, dorimedini-starkware wrote…
this wasn't used
@dorimedini-starkware
I think that we actually need the hash, right?
Imagine this case where the hash is addition.
3
/
2
/
1 1
We want the root to be 3 (not 2)
…m skeleton
This change is