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

precompiles: Optionally use silkpre as implementation #660

Merged
merged 5 commits into from
Jul 28, 2023

Conversation

chfast
Copy link
Member

@chfast chfast commented Jun 1, 2023

Add CMake option (off by default) EVMONE_PRECOMPILES_SILKPRE to enable building of silkpre as the precompiles implementation.

@chfast
Copy link
Member Author

chfast commented Jun 1, 2023

A Clang build of silkpre does not work. I'm getting SIGEMT.

@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Merging #660 (3f06da2) into master (18a8972) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #660      +/-   ##
==========================================
+ Coverage   97.41%   97.43%   +0.02%     
==========================================
  Files          81       83       +2     
  Lines        8013     8042      +29     
==========================================
+ Hits         7806     7836      +30     
+ Misses        207      206       -1     
Flag Coverage Δ
blockchaintests 62.95% <ø> (ø)
statetests 74.10% <ø> (ø)
statetests-silkpre 23.57% <100.00%> (?)
unittests 94.91% <ø> (ø)

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

Files Changed Coverage Δ
test/state/precompiles.cpp 84.21% <ø> (ø)
test/state/precompiles_silkpre.cpp 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

@yperbasis
Copy link
Member

A Clang build of silkpre does not work. I'm getting SIGEMT.

Not sure if it's relevant, but perhaps erigontech/silkpre#8 can help.

Add CMake option EVMONE_PRECOMPILES_SILKPRE (default OFF).
If enabled CMake will fetch the silkpre precompiles library.
https://github.com/torquem-ch/silkpre
@chfast chfast force-pushed the state_precompiles_silkpre branch from 72c533c to 12955a1 Compare July 24, 2023 08:54
@chfast
Copy link
Member Author

chfast commented Jul 24, 2023

A Clang build of silkpre does not work. I'm getting SIGEMT.

Not sure if it's relevant, but perhaps torquem-ch/silkpre#8 can help.

This seems coming from libff.

@chfast chfast force-pushed the state_precompiles_silkpre branch 2 times, most recently from f067d1b to 1717844 Compare July 24, 2023 09:54
test/state/precompiles_stub.json Show resolved Hide resolved
test/state/CMakeLists.txt Outdated Show resolved Hide resolved
@@ -172,6 +176,16 @@ inline constexpr auto traits = []() noexcept {
{ecpairing_analyze, dummy_execute<PrecompileId::ecpairing>},
{blake2bf_analyze, dummy_execute<PrecompileId::blake2bf>},
}};
#ifdef EVMONE_PRECOMPILES_SILKPRE
Copy link
Member

Choose a reason for hiding this comment

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

why not #ifdef with two branches directly in the initialization above ?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is structured as optional override. It also allows us quickly change what we override with silkpre.

@chfast chfast force-pushed the state_precompiles_silkpre branch from 97f3493 to 3f06da2 Compare July 28, 2023 14:56
@chfast chfast merged commit bc4eefb into master Jul 28, 2023
@chfast chfast deleted the state_precompiles_silkpre branch July 28, 2023 15:07
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.

4 participants