Skip to content

Commit cea2b7a

Browse files
committed
precompiles: Remove optional "silkpre" backend
Drop the CMake EVMONE_PRECOMPILES_SILKPRE option. Silkpre is outdated and it only provided useful (not slower than evmone) implementations for ecrecover and modexp. These are now covered directly by libsecp256k1 and GMP options.
1 parent 7efdd12 commit cea2b7a

File tree

5 files changed

+0
-196
lines changed

5 files changed

+0
-196
lines changed

circle.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -503,28 +503,6 @@ jobs:
503503
- upload_coverage:
504504
flags: eest-develop-gmp
505505

506-
precompiles-silkpre:
507-
executor: linux-clang-latest
508-
environment:
509-
BUILD_TYPE: Release
510-
CMAKE_OPTIONS: -DCOVERAGE=1 -DEVMONE_PRECOMPILES_SILKPRE=1
511-
steps:
512-
- run:
513-
name: "Install GMP"
514-
command: sudo apt-get -q update && sudo apt-get -qy install libgmp-dev
515-
- build
516-
- download_execution_tests:
517-
rev: v17.1
518-
legacy: false
519-
- run:
520-
name: "State tests"
521-
working_directory: ~/build
522-
command: |
523-
bin/evmone-statetest ~/tests/GeneralStateTests
524-
- collect_coverage_clang
525-
- upload_coverage:
526-
flags: eest-legacy-silkpre
527-
528506
gcc-min:
529507
executor: linux-gcc-min
530508
steps:
@@ -709,7 +687,6 @@ workflows:
709687
- ethereum-tests
710688
- precompiles-libsecp256k1
711689
- precompiles-gmp
712-
- precompiles-silkpre
713690
- cmake-min
714691
- gcc-min
715692
- clang-min

test/precompiles_bench/precompiles_bench.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
#include <state/precompiles_gmp.hpp>
2020
#endif
2121

22-
#ifdef EVMONE_PRECOMPILES_SILKPRE
23-
#include <state/precompiles_silkpre.hpp>
24-
#endif
25-
2622
namespace
2723
{
2824
using namespace evmone::state;
@@ -326,10 +322,6 @@ BENCHMARK_TEMPLATE(precompile, PrecompileId::ecrecover, evmone);
326322
constexpr auto libsecp256k1 = ecrecover_execute_libsecp256k1;
327323
BENCHMARK_TEMPLATE(precompile, PrecompileId::ecrecover, libsecp256k1);
328324
#endif
329-
#ifdef EVMONE_PRECOMPILES_SILKPRE
330-
constexpr auto silkpre_libsecp256k1 = silkpre_ecrecover_execute;
331-
BENCHMARK_TEMPLATE(precompile, PrecompileId::ecrecover, silkpre_libsecp256k1);
332-
#endif
333325
} // namespace bench_ecrecovery
334326

335327
namespace bench_expmod
@@ -340,40 +332,24 @@ BENCHMARK(precompile<PrecompileId::expmod, evmone>);
340332
constexpr auto gmp = expmod_execute_gmp;
341333
BENCHMARK(precompile<PrecompileId::expmod, gmp>);
342334
#endif
343-
#ifdef EVMONE_PRECOMPILES_SILKPRE
344-
constexpr auto silkpre = silkpre_expmod_execute;
345-
BENCHMARK(precompile<PrecompileId::expmod, silkpre>);
346-
#endif
347335
} // namespace bench_expmod
348336

349337
namespace bench_ecadd
350338
{
351339
constexpr auto evmmax_cpp = ecadd_execute;
352340
BENCHMARK_TEMPLATE(precompile, PrecompileId::ecadd, evmmax_cpp);
353-
#ifdef EVMONE_PRECOMPILES_SILKPRE
354-
constexpr auto libff = silkpre_ecadd_execute;
355-
BENCHMARK_TEMPLATE(precompile, PrecompileId::ecadd, libff);
356-
#endif
357341
} // namespace bench_ecadd
358342

359343
namespace bench_ecmul
360344
{
361345
constexpr auto evmmax_cpp = ecmul_execute;
362346
BENCHMARK_TEMPLATE(precompile, PrecompileId::ecmul, evmmax_cpp);
363-
#ifdef EVMONE_PRECOMPILES_SILKPRE
364-
constexpr auto libff = silkpre_ecmul_execute;
365-
BENCHMARK_TEMPLATE(precompile, PrecompileId::ecmul, libff);
366-
#endif
367347
} // namespace bench_ecmul
368348

369349
namespace bench_ecpairing
370350
{
371351
constexpr auto evmmax_cpp = ecpairing_execute;
372352
BENCHMARK_TEMPLATE(precompile, PrecompileId::ecpairing, evmmax_cpp);
373-
#ifdef EVMONE_PRECOMPILES_SILKPRE
374-
constexpr auto libff = silkpre_ecpairing_execute;
375-
BENCHMARK_TEMPLATE(precompile, PrecompileId::ecpairing, libff);
376-
#endif
377353
} // namespace bench_ecpairing
378354

379355
namespace bench_kzg

test/state/CMakeLists.txt

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -84,40 +84,6 @@ if(EVMONE_PRECOMPILES_LIBSECP256K1)
8484
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_ORIG})
8585
endif()
8686

87-
option(EVMONE_PRECOMPILES_SILKPRE "Enable precompiles from silkpre library (for benchmarking only)" OFF)
88-
if(EVMONE_PRECOMPILES_SILKPRE)
89-
# Silkpre requires the ethash library, so enable it in Hunter.
90-
hunter_add_package(ethash)
91-
92-
FetchContent_Declare(
93-
silkpre
94-
GIT_REPOSITORY https://github.com/erigontech/silkpre
95-
GIT_TAG f972090a41de75073f55e914bf0107838b4b86a4
96-
GIT_SHALLOW TRUE
97-
)
98-
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
99-
set(BUILD_SHARED_LIBS_ORIG ${BUILD_SHARED_LIBS})
100-
set(BUILD_SHARED_LIBS OFF)
101-
FetchContent_MakeAvailable(silkpre)
102-
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_ORIG})
103-
104-
set_target_properties(
105-
silkpre secp256k1 ff
106-
PROPERTIES
107-
COMPILE_OPTIONS -w # Disable warnings.
108-
CXX_CLANG_TIDY ""
109-
)
110-
111-
target_link_libraries(evmone-state PRIVATE silkpre)
112-
target_compile_definitions(evmone-state PUBLIC EVMONE_PRECOMPILES_SILKPRE=1)
113-
target_sources(
114-
evmone-state PRIVATE
115-
precompiles_silkpre.hpp
116-
precompiles_silkpre.cpp
117-
)
118-
endif()
119-
120-
# This is done after Silkpre because it also tries to find GMP.
12187
option(EVMONE_PRECOMPILES_GMP "Enable precompiles implementations via the GMP/MPIR library" OFF)
12288
if(EVMONE_PRECOMPILES_GMP)
12389
find_package(GMP REQUIRED)

test/state/precompiles_silkpre.cpp

Lines changed: 0 additions & 82 deletions
This file was deleted.

test/state/precompiles_silkpre.hpp

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)