Skip to content
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

build: add get_root_hash for filled tree #31

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Conversation

aner-starkware
Copy link
Contributor

@aner-starkware aner-starkware commented Apr 10, 2024

This change is Reviewable

@codecov-commenter
Copy link

codecov-commenter commented Apr 10, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 26.15%. Comparing base (8ec4d7a) to head (e4c44bf).

Files Patch % Lines
.../committer/src/patricia_merkle_tree/filled_tree.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
- Coverage   28.33%   26.15%   -2.18%     
==========================================
  Files           6        6              
  Lines          60       65       +5     
  Branches       60       65       +5     
==========================================
  Hits           17       17              
- Misses         43       48       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aner-starkware aner-starkware force-pushed the aner/compute_path_to_bottom_index branch from 94f97e3 to f7eac37 Compare April 10, 2024 10:44
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware and @aner-starkware)


crates/committer/src/patricia_merkle_tree/filled_tree.rs line 35 at r1 (raw file):

    fn get_root_hash(&self) -> Result<HashOutput, FilledTreeError> {
        match self.tree_map.get(&NodeIndex::root_index()) {
            Some(root_node) => Ok(root_node.lock().expect("Lock poisned.").hash),

typo

Code quote:

poisned

@aner-starkware aner-starkware force-pushed the aner/compute_path_to_bottom_index branch 2 times, most recently from 2fa4475 to 3e0c47a Compare April 10, 2024 12:51
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a 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: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware and @aner-starkware)

@aner-starkware aner-starkware changed the base branch from aner/compute_path_to_bottom_index to main April 10, 2024 13:04
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @amosStarkware and @aner-starkware)


Cargo.toml line 19 at r3 (raw file):

rstest = "0.17.0"
starknet-types-core = { version = "0.0.11", features = ["hash"] }
derive_more = "0.99.17"

lexicographic order of dependencies

Suggestion:

derive_more = "0.99.17"
pretty_assertions = "1.2.1"
rstest = "0.17.0"
starknet-types-core = { version = "0.0.11", features = ["hash"] }

crates/committer/Cargo.toml line 18 at r3 (raw file):

[dependencies]
starknet-types-core.workspace = true
derive_more.workspace = true

alphabetize... sorry, forgot before

Suggestion:

derive_more.workspace = true
starknet-types-core.workspace = true

Copy link
Contributor Author

@aner-starkware aner-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 6 of 8 files reviewed, 2 unresolved discussions (waiting on @amosStarkware and @dorimedini-starkware)


Cargo.toml line 19 at r3 (raw file):

Previously, dorimedini-starkware wrote…

lexicographic order of dependencies

Done.


crates/committer/Cargo.toml line 18 at r3 (raw file):

Previously, dorimedini-starkware wrote…

alphabetize... sorry, forgot before

Done.

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a 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 r4, 2 of 2 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @amosStarkware)

@aner-starkware aner-starkware added this pull request to the merge queue Apr 11, 2024
Merged via the queue into main with commit 00c3775 Apr 11, 2024
10 checks passed
@aner-starkware aner-starkware deleted the aner/get_root_hash branch April 15, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants