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 native implementation of BLAKE2bf precompile #857

Merged
merged 3 commits into from
Apr 11, 2024

Conversation

chfast
Copy link
Member

@chfast chfast commented Apr 5, 2024

  • Adds the implementation of the BLAKE2b compress function F following the RFC 7693.
  • Implements EIP-152 "BLAKE2 compression function F precompile" by exposing the evmone::crypto::blake2b_compress().
  • Do not cache this precompile.

@chfast chfast added the precompiles Related to EVM precompiles label Apr 5, 2024
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

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

Project coverage is 98.10%. Comparing base (cd1f3f6) to head (b2af042).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #857      +/-   ##
==========================================
- Coverage   98.13%   98.10%   -0.03%     
==========================================
  Files         125      127       +2     
  Lines       13095    13171      +76     
==========================================
+ Hits        12851    12922      +71     
- Misses        244      249       +5     
Flag Coverage Δ
statetests 63.38% <100.00%> (+0.47%) ⬆️
statetests-silkpre 22.13% <62.31%> (+0.22%) ⬆️
unittests 96.69% <77.63%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
lib/evmone_precompiles/blake2b.cpp 100.00% <100.00%> (ø)
test/state/precompiles_cache.cpp 58.82% <ø> (ø)
test/unittests/precompiles_blake2b_test.cpp 100.00% <100.00%> (ø)
test/state/precompiles.cpp 89.71% <82.35%> (-0.80%) ⬇️

... and 1 file with indirect coverage changes

@chfast chfast changed the title Add the BLAKE2bf precompile Add native implementation of BLAKE2bf precompile Apr 5, 2024
@chfast chfast requested a review from rodiazet April 5, 2024 14:39
Base automatically changed from precompiles/ripemd160 to master April 11, 2024 08:59
Adds the implementation of the BLAKE2b compress function F following
the [RFC 7693](https://datatracker.ietf.org/doc/html/rfc7693).
Implement [EIP-152](https://eips.ethereum.org/EIPS/eip-152)
"BLAKE2 compression function `F` precompile" by exposing
the `evmone::crypto::blake2b_compress()`.
Copy link
Collaborator

@battlmonstr battlmonstr left a comment

Choose a reason for hiding this comment

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

👍

@battlmonstr battlmonstr merged commit 0b648e3 into master Apr 11, 2024
22 of 24 checks passed
@battlmonstr battlmonstr deleted the precompiles/blake2bf branch April 11, 2024 12:45
@chfast
Copy link
Member Author

chfast commented Apr 11, 2024

Thanks for the review but don't merge next time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
precompiles Related to EVM precompiles
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants