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

Ensure leafs are 32-bytes #51

Merged
merged 1 commit into from
Nov 6, 2024
Merged

Ensure leafs are 32-bytes #51

merged 1 commit into from
Nov 6, 2024

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Nov 5, 2024

If a merkle tree is built with leafs that aren't 32 bytes long ValidatePartialTree and other methods will fail.

I added a check to AddLeafs to ensure that only values with 32 byte length are added to the tree.

@fasmat fasmat requested review from noamnelke and poszu November 5, 2024 18:41
@fasmat fasmat self-assigned this Nov 5, 2024
@fasmat fasmat force-pushed the ensure-leafs-are-32-bytes branch from 891af7d to c9ce0a6 Compare November 5, 2024 18:42
@fasmat fasmat force-pushed the ensure-leafs-are-32-bytes branch from c9ce0a6 to 5bdb848 Compare November 5, 2024 18:43
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Project coverage is 77.97%. Comparing base (e05293e) to head (5bdb848).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
merkle.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #51      +/-   ##
===========================================
- Coverage    78.45%   77.97%   -0.48%     
===========================================
  Files           12       12              
  Lines          724      722       -2     
===========================================
- Hits           568      563       -5     
- Misses         132      134       +2     
- Partials        24       25       +1     

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

Copy link
Member

@noamnelke noamnelke left a comment

Choose a reason for hiding this comment

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

lgtm :shipit:

@fasmat fasmat merged commit fcb2328 into develop Nov 6, 2024
8 of 10 checks passed
@fasmat fasmat deleted the ensure-leafs-are-32-bytes branch November 6, 2024 10:31
fasmat added a commit that referenced this pull request Nov 7, 2024
fasmat added a commit that referenced this pull request Nov 7, 2024
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.

2 participants