Skip to content

precompiles: Optionally use silkpre as implementation#660

Merged
chfast merged 5 commits intomasterfrom
state_precompiles_silkpre
Jul 28, 2023
Merged

precompiles: Optionally use silkpre as implementation#660
chfast merged 5 commits intomasterfrom
state_precompiles_silkpre

Conversation

@chfast
Copy link
Copy Markdown
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
Copy Markdown
Member Author

chfast commented Jun 1, 2023

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

@codecov
Copy link
Copy Markdown

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
Copy Markdown
Contributor

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
Copy Markdown
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
{ecpairing_analyze, dummy_execute<PrecompileId::ecpairing>},
{blake2bf_analyze, dummy_execute<PrecompileId::blake2bf>},
}};
#ifdef EVMONE_PRECOMPILES_SILKPRE
Copy link
Copy Markdown
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
Copy Markdown
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