-
Notifications
You must be signed in to change notification settings - Fork 285
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
precompiles: Add SHA256 implementation #924
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #924 +/- ##
==========================================
- Coverage 95.12% 94.29% -0.83%
==========================================
Files 140 142 +2
Lines 15892 16102 +210
==========================================
+ Hits 15117 15184 +67
- Misses 775 918 +143
Flags with carried forward coverage won't be shown. Click here to find out more.
|
985dbdb
to
c102779
Compare
I tested this additionally on AMD Zen2 CPU with |
eadca78
to
23a3e62
Compare
Outdated, the code has changed a lot since.
5b6bf1b
to
6042829
Compare
7867022
to
b697c4f
Compare
Copy the C implementation of SHA256 from Silkworm to evmone without any modifications. The original source file: https://github.com/erigontech/silkworm/blob/capi-0.19.0/silkworm/core/crypto/sha256.c
Convert C implementation of SHA256 to C++. evmone is declared as C++ only project. This also enabled previously missed coverage for the sha256.cpp file.
Improve SHA256 code quality by: - fixing/disabling some clang-tidy warnings, - adding `BufferState` constructor, - using `std::rotr()`, - using C++ attributes.
Use `std::byte` instead of `uint8_t` and drop the `use_cpu_extensions` parameter.
This adds the SHA256 implementation from Silkworm and removes the precompile stub.