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

chore: remove hash generic args from the different tree traits #36

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

TzahiTaub
Copy link
Contributor

@TzahiTaub TzahiTaub commented Apr 11, 2024

This change is Reviewable

@TzahiTaub TzahiTaub self-assigned this Apr 11, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 18.88%. Comparing base (a5db564) to head (f8fdece).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #36   +/-   ##
=======================================
  Coverage   18.88%   18.88%           
=======================================
  Files           7        7           
  Lines          90       90           
  Branches       90       90           
=======================================
  Hits           17       17           
  Misses         73       73           

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

@TzahiTaub TzahiTaub force-pushed the tzahi/remove_hash_generics_from_tree_traits branch 2 times, most recently from 2fc4902 to d8a4f44 Compare April 11, 2024 10:11
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 r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware and @TzahiTaub)


crates/committer/src/patricia_merkle_tree/updated_skeleton_tree.rs line 18 at r1 (raw file):

        &self,
        tree_hash_func: &impl TreeHashFunction<L, H>,
    ) -> Result<impl FilledTree<L>, UpdatedSkeletonTreeError>;

say we define a struct PedersenTreeHash and impl<L: LeafDataTrait> TreeHashFunction<L, PedersenHash> for PedersenTreeHash; why would we need to pass an instance of PedersenTreeHash? what is tree_hash_func for?

Suggestion:

    fn compute_filled_tree<H: HashFunction, TH: TreeHashFunction<L, H>>(
        &self
    ) -> Result<impl FilledTree<L>, UpdatedSkeletonTreeError>;

@TzahiTaub TzahiTaub force-pushed the tzahi/remove_hash_generics_from_tree_traits branch from d8a4f44 to f8fdece Compare April 11, 2024 10:51
Copy link
Contributor Author

@TzahiTaub TzahiTaub 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: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @amosStarkware and @dorimedini-starkware)


crates/committer/src/patricia_merkle_tree/updated_skeleton_tree.rs line 18 at r1 (raw file):

Previously, dorimedini-starkware wrote…

say we define a struct PedersenTreeHash and impl<L: LeafDataTrait> TreeHashFunction<L, PedersenHash> for PedersenTreeHash; why would we need to pass an instance of PedersenTreeHash? what is tree_hash_func for?

No need, got confused.

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 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @amosStarkware)

@TzahiTaub TzahiTaub added this pull request to the merge queue Apr 11, 2024
Merged via the queue into main with commit 6af2975 Apr 11, 2024
10 checks passed
@TzahiTaub TzahiTaub deleted the tzahi/remove_hash_generics_from_tree_traits branch April 11, 2024 13:23
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