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

Add MaxCollisionLimitPerDigest #271

Merged
merged 6 commits into from
Jun 23, 2022
Merged

Conversation

fxamacker
Copy link
Member

Description

Port of dapperlabs/atree-internal#4


  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

MaxCollisionLimitPerDigest is the noncryptographic hash collision
limit (per digest per map) we can enforce in the first level.
In the same map for the same digest, having a non-intentional
collision should be rare and several collisions should be extremely
rare.  The default limit should be high enough to ignore accidental
collisions while mitigating attacks.

CollisionLimitError is returned when a new element first level hash
points to a collision group which has already reached its max limit.
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2022

Codecov Report

Merging #271 (32d7f2a) into main (525fbc2) will increase coverage by 0.36%.
The diff coverage is 68.08%.

@@            Coverage Diff             @@
##             main     #271      +/-   ##
==========================================
+ Coverage   68.98%   69.34%   +0.36%     
==========================================
  Files          14       14              
  Lines        7257     7344      +87     
==========================================
+ Hits         5006     5093      +87     
- Misses       1619     1622       +3     
+ Partials      632      629       -3     
Impacted Files Coverage Δ
errors.go 19.70% <25.00%> (+0.32%) ⬆️
map.go 71.78% <76.92%> (+0.36%) ⬆️
storage.go 81.89% <0.00%> (+2.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 525fbc2...32d7f2a. Read the comment docs.

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

Maybe this can be tagged as a new release?

Could you please also open version-bump PRs in the Cadence and flow-go repos?

@fxamacker fxamacker merged commit d03bcfc into main Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants