onflow / atree

Atree provides scalable arrays and scalable ordered maps.
https://onflow.org
Apache License 2.0
39 stars 16 forks source link

Add regression tests for BLAKE3 #248

Closed fxamacker closed 2 years ago

fxamacker commented 2 years ago

Description

Add tests to verify 131107 BLAKE3 digests to detect compatibility regressions using input data sizes up to 102400 bytes.

Also compare 131107 BLAKE3 digests from two libraries to confirm they match

The test file is a modified subset of circlehash64_test.go copied from fxamacker/circlehash.

The test uses SHA-512 to hash all 35 BLAKE3 digests that should match what is published by official BLAKE3 team. This allows us to compare one hardcoded value instead of 35.

An additional 131072 BLAKE3 digests are verified using a more random input data set than is used by the BLAKE3 team.

Closes #246


codecov-commenter commented 2 years ago

Codecov Report

Merging #248 (dc74793) into main (f8f0a14) will increase coverage by 0.34%. The diff coverage is 100.00%.

:exclamation: Current head dc74793 differs from pull request most recent head 26ae318. Consider uploading reports for the commit 26ae318 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #248      +/-   ##
==========================================
+ Coverage   68.62%   68.97%   +0.34%     
==========================================
  Files          14       14              
  Lines        7222     7245      +23     
==========================================
+ Hits         4956     4997      +41     
+ Misses       1631     1617      -14     
+ Partials      635      631       -4     
Impacted Files Coverage Δ
storage.go 79.64% <100.00%> (+1.43%) :arrow_up:
map.go 71.41% <0.00%> (+0.10%) :arrow_up:
array.go 76.15% <0.00%> (+0.16%) :arrow_up:
errors.go 19.37% <0.00%> (+4.65%) :arrow_up:
storable.go 65.57% <0.00%> (+4.91%) :arrow_up:

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 f894079...26ae318. Read the comment docs.