From 6b8c32b8599d9a32d8e31ed0347a155b8e0a4e9c Mon Sep 17 00:00:00 2001 From: hrkrshnn Date: Tue, 27 Jul 2021 16:38:48 +0200 Subject: [PATCH 1/2] Updated circleci scripts with evmone 0.8.0 docker images --- .circleci/config.yml | 12 ++++++------ .circleci/osx_install_dependencies.sh | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 93e9f93bd..1da228443 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,16 +9,16 @@ version: 2.1 parameters: ubuntu-2004-docker-image: type: string - # solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-7 - default: "solbuildpackpusher/solidity-buildpack-deps@sha256:af5a0c6ea5e113e477f5387955a862f9aea5cc74d9ceeb2377fc64e64088d200" + # solbuildpackpusher/solidity-buildpack-deps:ubuntu2004-8 + default: "solbuildpackpusher/solidity-buildpack-deps@sha256:9c3cdfc1d573d1ca3edacd892590a9a83487a1f746a6ca2093d7e009818c5179" ubuntu-2004-clang-docker-image: type: string - # solbuildpackpusher/solidity-buildpack-deps:ubuntu2004.clang-7 - default: "solbuildpackpusher/solidity-buildpack-deps@sha256:cb504c6456d4a2dd80b354acfd7429836da5acce4e394500c02d5740617f9d01" + # solbuildpackpusher/solidity-buildpack-deps:ubuntu2004.clang-8 + default: "solbuildpackpusher/solidity-buildpack-deps@sha256:61232feea23c8c57e82cf5fae890f8b86bbec353cdc04f2fcba383ca589e1d8b" ubuntu-1604-clang-ossfuzz-docker-image: type: string - # solbuildpackpusher/solidity-buildpack-deps:ubuntu1604.clang.ossfuzz-10 - default: "solbuildpackpusher/solidity-buildpack-deps@sha256:ea15a35f6188360b425593c83e946660ab4ea4dac9b9c3bb3629e6ed57276b1d" + # solbuildpackpusher/solidity-buildpack-deps:ubuntu1604.clang.ossfuzz-11 + default: "solbuildpackpusher/solidity-buildpack-deps@sha256:4acb2674eab3e7939d6dc6caa0b8320f4dd79484325242b58473ca2875792d90" emscripten-docker-image: type: string # solbuildpackpusher/solidity-buildpack-deps:emscripten-6 diff --git a/.circleci/osx_install_dependencies.sh b/.circleci/osx_install_dependencies.sh index 55d406946..0505aa6db 100755 --- a/.circleci/osx_install_dependencies.sh +++ b/.circleci/osx_install_dependencies.sh @@ -59,12 +59,12 @@ then rm -rf "$z3_version-x64-$osx_version" # evmone - wget https://github.com/ethereum/evmone/releases/download/v0.7.0/evmone-0.7.0-darwin-x86_64.tar.gz - tar xzpf evmone-0.7.0-darwin-x86_64.tar.gz -C /usr/local - rm -f evmone-0.7.0-darwin-x86_64.tar.gz + wget https://github.com/ethereum/evmone/releases/download/v0.8.0/evmone-0.8.0-darwin-x86_64.tar.gz + tar xzpf evmone-0.8.0-darwin-x86_64.tar.gz -C /usr/local + rm -f evmone-0.8.0-darwin-x86_64.tar.gz # hera - wget https://github.com/ewasm/hera/releases/download/v0.3.2-evmc8/hera-0.3.2+commit.dc886eb7-darwin-x86_64.tar.gz - tar xzpf hera-0.3.2+commit.dc886eb7-darwin-x86_64.tar.gz -C /usr/local - rm -f hera-0.3.2+commit.dc886eb7-darwin-x86_64.tar.gz + wget https://github.com/ewasm/hera/releases/download/v0.5.0/hera-0.5.0-darwin-x86_64.tar.gz + tar xzpf hera-0.5.0-darwin-x86_64.tar.gz -C /usr/local + rm -f hera-0.5.0-darwin-x86_64.tar.gz fi From 8bec0c8a6b0b1222136009b8ade65a03a56286c0 Mon Sep 17 00:00:00 2001 From: hrkrshnn Date: Tue, 27 Jul 2021 16:39:41 +0200 Subject: [PATCH 2/2] Updated docs and evmc.h header file for evmone 0.8.0 release --- docs/contributing.rst | 2 +- scripts/install_evmone.ps1 | 2 +- test/Common.h | 10 +++++----- test/evmc/README.md | 2 +- test/evmc/evmc.h | 30 ++++++++++++++++++++++++++---- 5 files changed, 34 insertions(+), 12 deletions(-) diff --git a/docs/contributing.rst b/docs/contributing.rst index 62d5bad1f..1d621d4a9 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -112,7 +112,7 @@ starting from the current directory. The required file is called ``libevmone.so` ``evmone.dll`` on Windows systems and ``libevmone.dylib`` on macOS. If it is not found, tests that use it are skipped. These tests are ``libsolididty/semanticTests``, ``libsolidity/GasCosts``, ``libsolidity/SolidityEndToEndTest``, part of the soltest suite. To run all tests, download the library from -`GitHub `_ +`GitHub `_ and place it in the project root path or inside the ``deps`` folder. If the ``libz3`` library is not installed on your system, you should disable the diff --git a/scripts/install_evmone.ps1 b/scripts/install_evmone.ps1 index ea911d3da..ace3e5751 100644 --- a/scripts/install_evmone.ps1 +++ b/scripts/install_evmone.ps1 @@ -3,7 +3,7 @@ $ErrorActionPreference = "Stop" # Needed for Invoke-WebRequest to work via CI. $progressPreference = "silentlyContinue" -Invoke-WebRequest -URI "https://github.com/ethereum/evmone/releases/download/v0.7.0/evmone-0.7.0-windows-amd64.zip" -OutFile "evmone.zip" +Invoke-WebRequest -URI "https://github.com/ethereum/evmone/releases/download/v0.8.0/evmone-0.8.0-windows-amd64.zip" -OutFile "evmone.zip" tar -xf evmone.zip "bin/evmone.dll" mkdir deps mv bin/evmone.dll deps diff --git a/test/Common.h b/test/Common.h index 4dfaeaed5..c8a863d8c 100644 --- a/test/Common.h +++ b/test/Common.h @@ -31,19 +31,19 @@ namespace solidity::test #ifdef _WIN32 static constexpr auto evmoneFilename = "evmone.dll"; -static constexpr auto evmoneDownloadLink = "https://github.com/ethereum/evmone/releases/download/v0.7.0/evmone-0.7.0-windows-amd64.zip"; +static constexpr auto evmoneDownloadLink = "https://github.com/ethereum/evmone/releases/download/v0.8.0/evmone-0.8.0-windows-amd64.zip"; static constexpr auto heraFilename = "hera.dll"; static constexpr auto heraDownloadLink = "https://github.com/ewasm/hera/archive/v0.3.2-evmc8.tar.gz"; #elif defined(__APPLE__) static constexpr auto evmoneFilename = "libevmone.dylib"; -static constexpr auto evmoneDownloadLink = "https://github.com/ethereum/evmone/releases/download/v0.7.0/evmone-0.7.0-darwin-x86_64.tar.gz"; +static constexpr auto evmoneDownloadLink = "https://github.com/ethereum/evmone/releases/download/v0.8.0/evmone-0.8.0-darwin-x86_64.tar.gz"; static constexpr auto heraFilename = "libhera.dylib"; -static constexpr auto heraDownloadLink = "https://github.com/ewasm/hera/releases/download/v0.3.2-evmc8/hera-0.3.2+commit.dc886eb7-darwin-x86_64.tar.gz"; +static constexpr auto heraDownloadLink = "https://github.com/ewasm/hera/releases/download/v0.5.0/hera-0.5.0-darwin-x86_64.tar.gz"; #else static constexpr auto evmoneFilename = "libevmone.so"; -static constexpr auto evmoneDownloadLink = "https://github.com/ethereum/evmone/releases/download/v0.7.0/evmone-0.7.0-linux-x86_64.tar.gz"; +static constexpr auto evmoneDownloadLink = "https://github.com/ethereum/evmone/releases/download/v0.8.0/evmone-0.8.0-linux-x86_64.tar.gz"; static constexpr auto heraFilename = "libhera.so"; -static constexpr auto heraDownloadLink = "https://github.com/ewasm/hera/releases/download/v0.3.2-evmc8/hera-0.3.2+commit.dc886eb7-linux-x86_64.tar.gz"; +static constexpr auto heraDownloadLink = "https://github.com/ewasm/hera/releases/download/v0.5.0/hera-0.5.0-linux-x86_64.tar.gz"; #endif struct ConfigException : public util::Exception {}; diff --git a/test/evmc/README.md b/test/evmc/README.md index 68bcdd92b..cae41f170 100644 --- a/test/evmc/README.md +++ b/test/evmc/README.md @@ -1,5 +1,5 @@ # EVMC -This is an import of [EVMC](https://github.com/ethereum/evmc) version [8.0.0](https://github.com/ethereum/evmc/releases/tag/v8.0.0). +This is an import of [EVMC](https://github.com/ethereum/evmc) version [9.0.0](https://github.com/ethereum/evmc/releases/tag/v9.0.0). Important: The `MockedAccount.storage` is changed to a map from unordered_map as ordering is important for fuzzing. diff --git a/test/evmc/evmc.h b/test/evmc/evmc.h index 5de5f5dae..c0d79d4e7 100644 --- a/test/evmc/evmc.h +++ b/test/evmc/evmc.h @@ -44,7 +44,7 @@ enum * * @see @ref versioning */ - EVMC_ABI_VERSION = 8 + EVMC_ABI_VERSION = 9 }; @@ -154,6 +154,7 @@ struct evmc_tx_context int64_t block_gas_limit; /**< The block gas limit. */ evmc_uint256be block_difficulty; /**< The block difficulty. */ evmc_uint256be chain_id; /**< The blockchain's ChainID. */ + evmc_uint256be block_base_fee; /**< The block base fee per gas (EIP-1559, EIP-3198). */ }; /** @@ -813,19 +814,40 @@ enum evmc_revision /** * The Istanbul revision. * - * The spec draft: https://eips.ethereum.org/EIPS/eip-1679. + * https://eips.ethereum.org/EIPS/eip-1679 */ EVMC_ISTANBUL = 7, /** * The Berlin revision. * - * The spec draft: https://eips.ethereum.org/EIPS/eip-2070. + * https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/berlin.md */ EVMC_BERLIN = 8, + /** + * The London revision. + * + * https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md + */ + EVMC_LONDON = 9, + + /** + * The Shanghai revision. + * + * https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md + */ + EVMC_SHANGHAI = 10, + /** The maximum EVM revision supported. */ - EVMC_MAX_REVISION = EVMC_BERLIN + EVMC_MAX_REVISION = EVMC_SHANGHAI, + + /** + * The latest known EVM revision with finalized specification. + * + * This is handy for EVM tools to always use the latest revision available. + */ + EVMC_LATEST_STABLE_REVISION = EVMC_LONDON };