Skip to content

Commit

Permalink
third_party: update evmone to v0.12.0 (#2217)
Browse files Browse the repository at this point in the history
  • Loading branch information
yperbasis authored Aug 9, 2024
1 parent 09c93f2 commit d8462db
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 48 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ commands:
- install_conan
- run:
name: "Install compiler"
command: cmake/setup/compiler_install.sh clang 15
command: cmake/setup/compiler_install.sh clang <<pipeline.parameters.clang_version_min>>
- run:
name: "CMake Fuzzer"
working_directory: ~/build
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
type: boolean
default: true
machine:
image: ubuntu-2204:2023.04.2
image: ubuntu-2404:2024.05.1
resource_class: 2xlarge
steps:
- checkout_with_submodules:
Expand Down Expand Up @@ -354,8 +354,8 @@ jobs:
environment:
BUILD_CMAKE_ARGS: -DSILKWORM_FUZZER=ON
UBSAN_OPTIONS: print_stacktrace=1
docker:
- image: cimg/python:3.12
machine:
image: ubuntu-2404:2024.05.1
resource_class: 2xlarge
steps:
- build_fuzzer
Expand Down Expand Up @@ -393,7 +393,7 @@ jobs:
name: "Build GMP"
working_directory: ~/tmp3
command: |
git clone https://github.com/torquem-ch/gmp-wasm
git clone https://github.com/erigontech/gmp-wasm
cd gmp-wasm
git checkout 87e9087
./configure --prefix $HOME/opt-wasm CC=/opt/wasi-sdk/bin/clang --host=none AR=llvm-ar RANLIB=llvm-ranlib --enable-cxx CXX=/opt/wasi-sdk/bin/clang++ ABI=longlong
Expand All @@ -415,7 +415,7 @@ jobs:
parameters:
clang_version_min:
type: integer
default: 15
default: 16
clang_version_latest:
type: integer
default: 18
Expand Down
18 changes: 4 additions & 14 deletions .github/workflows/rpc-fuzzer-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,8 @@ jobs:
submodules: recursive
fetch-depth: "1" # Fetch only the last commit, not the entire history

- name: Install Compiler (Clang 15)
run: |
# Ensure the correct version of Clang is installed
# sudo apt-get install -y libc++-15-dev libc++abi-15-dev clang-15
# Set the compiler paths
sudo ln -sfv /usr/bin/clang-15 /usr/bin/clang
sudo ln -sfv /usr/bin/clang++-15 /usr/bin/clang++
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 120
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 120
update-alternatives --query cc
update-alternatives --query c++
- name: Install Compiler
run: cmake/setup/compiler_install.sh clang 16

- name: Clean Build Directory
run: rm -rf ${{runner.workspace}}/silkworm/build
Expand All @@ -48,11 +38,11 @@ jobs:

- name: Configure CMake
working-directory: ${{runner.workspace}}/silkworm/build
run: CC=clang-15 CXX=clang++-15 cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONAN_PROFILE=linux_x64_clang_13_release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/clang_libcxx.cmake -DSILKWORM_FUZZER=ON
run: CC=clang-16 CXX=clang++-16 cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONAN_PROFILE=linux_x64_clang_13_release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/clang_libcxx.cmake -DSILKWORM_FUZZER=ON

- name: Build Silkworm Fuzzer Test
working-directory: ${{runner.workspace}}/silkworm/build
run: CC=clang-15 CXX=clang++-15 cmake --build . --target rpcdaemon_fuzzer_test -j 8
run: CC=clang-16 CXX=clang++-16 cmake --build . --target rpcdaemon_fuzzer_test -j 8

- name: Prepare Corpus Directories
working-directory: ${{runner.workspace}}/silkworm/build/cmd/test
Expand Down
7 changes: 3 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[submodule "evmone"]
path = third_party/evmone/evmone
url = https://github.com/erigontech/evmone.git
branch = revert_517
url = https://github.com/ethereum/evmone.git
[submodule "ethereum-tests"]
path = third_party/ethereum-tests
url = https://github.com/ethereum/tests.git
[submodule "cbor-cpp"]
path = third_party/cbor-cpp/cbor-cpp
url = https://github.com/torquem-ch/cbor-cpp.git
url = https://github.com/erigontech/cbor-cpp.git
[submodule "interfaces"]
path = third_party/erigon-interfaces
url = https://github.com/erigontech/interfaces.git
Expand All @@ -25,7 +24,7 @@
url = https://github.com/bitcoin-core/secp256k1.git
[submodule "libff"]
path = third_party/libff/libff
url = https://github.com/torquem-ch/libff.git
url = https://github.com/erigontech/libff.git
branch = win
[submodule "glaze"]
path = third_party/glaze/glaze
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ git submodule update --init --recursive
## Building on Linux & macOS

Building Silkworm requires:
* C++20 compiler: [GCC](https://www.gnu.org/software/gcc/) >= 11.2 or [Clang](https://clang.llvm.org/) >= 15
* C++20 compiler: [GCC](https://www.gnu.org/software/gcc/) >= 11.2 or [Clang](https://clang.llvm.org/) >= 16
or AppleClang ([Xcode](https://developer.apple.com/xcode/) >= 15)
* [CMake](https://cmake.org)
* [Conan](https://conan.io)
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ In addition to the [Boost libraries permitted in the style guide](https://google
* System
* Thread

[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) runs on CI. The report is attached to the "ARTIFACTS" section of the linux-clang-tidy job that can be found [here](https://app.circleci.com/pipelines/github/torquem-ch/silkworm?branch=master).
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) runs on CI. The report is attached to the "ARTIFACTS" section of the linux-clang-tidy job that can be found [here](https://app.circleci.com/pipelines/github/erigontech/silkworm?branch=master).


## Code Structure
Expand Down
2 changes: 1 addition & 1 deletion silkworm/core/protocol/rule_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class RuleSet {
//! \param [in] header: header to validate.
//! \param [in] state: current state.
//! \param [in] with_future_timestamp_check : whether to check header timestamp is in the future wrt host current
//! time \see https://github.com/torquem-ch/silkworm/issues/448
//! time \see https://github.com/erigontech/silkworm/issues/448
//! \note Shouldn't be used for genesis block.
virtual ValidationResult validate_block_header(const BlockHeader& header, const BlockState& state,
bool with_future_timestamp_check);
Expand Down
2 changes: 1 addition & 1 deletion silkworm/db/test_util/test_database_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ InMemoryState populate_genesis(db::RWTxn& txn, const std::filesystem::path& test
.withdrawals = std::vector<silkworm::Withdrawal>{0},
};

// FIX 2: set empty receipts root, should be done in the main code, requires https://github.com/torquem-ch/silkworm/issues/1348
// FIX 2: set empty receipts root, should be done in the main code, requires https://github.com/erigontech/silkworm/issues/1348
header.withdrawals_root = kEmptyRoot;

auto block_hash{header.hash()};
Expand Down
13 changes: 1 addition & 12 deletions tests/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,7 @@ RUN git submodule sync
RUN git submodule update --init --recursive

# 3 Install compiler
RUN cmake/setup/compiler_install.sh clang 15
# Alternative way to install clang > 15
# WORKDIR /app
# ARG LLVM_VERSION=16
# RUN sudo wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
# RUN wget https://apt.llvm.org/llvm.sh
# RUN chmod +x llvm.sh
# RUN sudo ./llvm.sh ${LLVM_VERSION} all
# RUN sudo ln -sfv /usr/bin/clang-${LLVM_VERSION} /usr/bin/clang
# RUN sudo ln -sfv /usr/bin/clang++-${LLVM_VERSION} /usr/bin/clang++
# RUN sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${LLVM_VERSION} 100
# RUN sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${LLVM_VERSION} 100
RUN cmake/setup/compiler_install.sh clang 16

# 4 Build all targets
WORKDIR /app/build
Expand Down
8 changes: 4 additions & 4 deletions tests/docker/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ fi
BRANCH=$1

if [ -z "$RENEW" ]; then
echo docker build --tag silkworm-clang:15 --progress=plain --build-arg="CACHEBUST=$(date +%s)" --build-arg="BRANCH=$BRANCH" -f ./Dockerfile ../..
echo docker build --tag silkworm-clang:16 --progress=plain --build-arg="CACHEBUST=$(date +%s)" --build-arg="BRANCH=$BRANCH" -f ./Dockerfile ../..
else
echo docker build --tag silkworm-clang:15 --progress=plain --no-cache --build-arg="BRANCH=$BRANCH" -f ./Dockerfile ../..
echo docker build --tag silkworm-clang:16 --progress=plain --no-cache --build-arg="BRANCH=$BRANCH" -f ./Dockerfile ../..
fi

echo docker rm -f $(docker ps -aq --filter name=silkworm-clang-15)
echo docker run --name silkworm-clang-15 -d -t silkworm-clang:15
echo docker rm -f $(docker ps -aq --filter name=silkworm-clang-16)
echo docker run --name silkworm-clang-16 -d -t silkworm-clang:16
5 changes: 3 additions & 2 deletions third_party/evmone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ add_library(
evmone/lib/evmone/advanced_execution.cpp
evmone/lib/evmone/advanced_execution.hpp
evmone/lib/evmone/advanced_instructions.cpp
evmone/lib/evmone/baseline_analysis.cpp
evmone/lib/evmone/baseline_execution.cpp
evmone/lib/evmone/baseline_instruction_table.cpp
evmone/lib/evmone/baseline_instruction_table.hpp
evmone/lib/evmone/baseline.cpp
evmone/lib/evmone/baseline.hpp
evmone/lib/evmone/constants.hpp
evmone/lib/evmone/eof.cpp
Expand All @@ -45,7 +46,7 @@ add_library(
evmone/lib/evmone/vm.cpp
evmone/lib/evmone/vm.hpp
)
set_source_files_properties(evmone/lib/evmone/vm.cpp PROPERTIES COMPILE_DEFINITIONS PROJECT_VERSION="0.12.0-dev")
set_source_files_properties(evmone/lib/evmone/vm.cpp PROPERTIES COMPILE_DEFINITIONS PROJECT_VERSION="0.12.0")
target_include_directories(evmone PUBLIC evmone/include evmone/lib)
target_link_libraries(
evmone
Expand Down
2 changes: 1 addition & 1 deletion third_party/evmone/evmone

0 comments on commit d8462db

Please sign in to comment.