-
Notifications
You must be signed in to change notification settings - Fork 0
build: defining skeletons forest input and introducing updated skeleton forest #110
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 @@
## nimrod/state_diff_methods #110 +/- ##
=============================================================
- Coverage 74.86% 70.02% -4.85%
=============================================================
Files 26 27 +1
Lines 959 1031 +72
Branches 959 1031 +72
=============================================================
+ Hits 718 722 +4
- Misses 207 275 +68
Partials 34 34 ☔ View full report in Codecov by Sentry. |
a6928d4
to
0cd7dc5
Compare
0a04175
to
d8ab3da
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 5 of 7 files at r1, 1 of 2 files at r3, all commit messages.
Reviewable status: 6 of 7 files reviewed, 4 unresolved discussions (waiting on @amosStarkware and @nimrod-starkware)
crates/committer/src/block_committer/commit.rs
line 30 at r3 (raw file):
input.tree_heights, ), &input.state_diff.accessed_addresses(),
this is all leaves of the contract (global) tree that have changed?
i.e. either have a diff in the storage, or a change in nonce/class hash?
Code quote:
input.state_diff.accessed_addresses()
crates/committer/src/block_committer/input.rs
line 0 at r3 (raw file):
looks like you aren't rebased...? why are these changes appearing in this PR?
crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest.rs
line 65 at r3 (raw file):
state_diff: &StateDiff, ) -> OriginalSkeletonTreeResult<OriginalSkeletonForest<L, T>> { let storage = S::from(storage);
this function should work with storage API.
the calling code (currently implemented for storage coming from input) should do the Storage::from
part.
Suggestion:
#[allow(dead_code)]
pub(crate) fn create_original_skeleton_forest<S: Storage>(
storage: S,
global_tree_root_hash: HashOutput,
classes_tree_root_hash: HashOutput,
tree_heights: TreeHeight,
current_contract_state_leaves: &HashMap<ContractAddress, ContractState>,
state_diff: &StateDiff,
) -> OriginalSkeletonTreeResult<OriginalSkeletonForest<L, T>> {
crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest_test.rs
line 223 at r3 (raw file):
&input.current_contract_state_leaves, &input.state_diff, )
why did you decide to split the Input
into explicit parameters on the create_X_forest
functions?
(genuine question)
Code quote:
> = OriginalSkeletonForest::create_original_skeleton_forest::<MapStorage>(
input.storage,
input.global_tree_root_hash,
input.classes_tree_root_hash,
input.tree_heights,
&input.current_contract_state_leaves,
&input.state_diff,
)
5e7bf9c
to
77342bc
Compare
d8ab3da
to
70670e1
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: 5 of 7 files reviewed, 4 unresolved discussions (waiting on @amosStarkware and @dorimedini-starkware)
crates/committer/src/block_committer/commit.rs
line 30 at r3 (raw file):
Previously, dorimedini-starkware wrote…
this is all leaves of the contract (global) tree that have changed?
i.e. either have a diff in the storage, or a change in nonce/class hash?
yes, exactly
crates/committer/src/block_committer/input.rs
line at r3 (raw file):
Previously, dorimedini-starkware wrote…
looks like you aren't rebased...? why are these changes appearing in this PR?
should be fine now, sorry
crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest.rs
line 65 at r3 (raw file):
Previously, dorimedini-starkware wrote…
this function should work with storage API.
the calling code (currently implemented for storage coming from input) should do theStorage::from
part.
Done.
crates/committer/src/patricia_merkle_tree/original_skeleton_tree/skeleton_forest_test.rs
line 223 at r3 (raw file):
Previously, dorimedini-starkware wrote…
why did you decide to split the
Input
into explicit parameters on thecreate_X_forest
functions?
(genuine question)
Isn't it better that a function will take what it actually needs?
introducing updated skeleton forest
70670e1
to
6de04ca
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 3 files at r5, all commit messages.
Reviewable status: 4 of 7 files reviewed, 2 unresolved discussions (waiting on @amosStarkware)
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 3 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @amosStarkware)
introducing updated skeleton forest
This change is