diff --git a/.circleci/soltest_all.sh b/.circleci/soltest_all.sh index 5a5449a94..b3544a08c 100755 --- a/.circleci/soltest_all.sh +++ b/.circleci/soltest_all.sh @@ -32,7 +32,7 @@ REPODIR="$(realpath "$(dirname "$0")"/..)" source "${REPODIR}/scripts/common.sh" EVM_VALUES=(homestead byzantium constantinople petersburg istanbul berlin london paris) -DEFAULT_EVM=london +DEFAULT_EVM=paris [[ " ${EVM_VALUES[*]} " =~ $DEFAULT_EVM ]] OPTIMIZE_VALUES=(0 1) diff --git a/Changelog.md b/Changelog.md index 362be6d1f..a1ff633ea 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,6 +9,7 @@ Compiler Features: * Commandline Interface: Add `--no-cbor-metadata` that skips CBOR metadata from getting appended at the end of the bytecode. * EVM: Deprecate ``block.difficulty`` and disallow ``difficulty()`` in inline assembly for EVM versions >= paris. The change is due to the renaming introduced by [EIP-4399](https://eips.ethereum.org/EIPS/eip-4399). * EVM: Introduce ``block.prevrandao`` in Solidity and ``prevrandao()`` in inline assembly for EVM versions >= paris. + * EVM: Set the default EVM version to "Paris". * EVM: Support for the EVM version "Paris". * Natspec: Add event Natspec inheritance for devdoc. * Standard JSON: Add a boolean field `settings.metadata.appendCBOR` that skips CBOR metadata from getting appended at the end of the bytecode. diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst index fca81760c..c186fa25e 100644 --- a/docs/using-the-compiler.rst +++ b/docs/using-the-compiler.rst @@ -170,10 +170,10 @@ at each version. Backward compatibility is not guaranteed between each version. - Gas costs for ``SLOAD``, ``*CALL``, ``BALANCE``, ``EXT*`` and ``SELFDESTRUCT`` increased. The compiler assumes cold gas costs for such operations. This is relevant for gas estimation and the optimizer. -- ``london`` (**default**) +- ``london`` - The block's base fee (`EIP-3198 `_ and `EIP-1559 `_) can be accessed via the global ``block.basefee`` or ``basefee()`` in inline assembly. -- ``paris`` - - No changes, however the semantics of the ``difficulty`` value have changed (see `EIP-4399 `_). +- ``paris`` (**default**) + - Introduces ``prevrandao()`` and ``block.prevrandao``, and changes the semantics of the ``block.difficulty``, disallowing ``difficulty()`` in inline assembly (see `EIP-4399 `_). .. index:: ! standard JSON, ! --standard-json .. _compiler-api: diff --git a/liblangutil/EVMVersion.h b/liblangutil/EVMVersion.h index f985b4aff..aa23ea6ee 100644 --- a/liblangutil/EVMVersion.h +++ b/liblangutil/EVMVersion.h @@ -109,7 +109,7 @@ private: EVMVersion(Version _version): m_version(_version) {} - Version m_version = Version::London; + Version m_version = Version::Paris; }; } diff --git a/scripts/tests.sh b/scripts/tests.sh index c9a747134..2be31eec0 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -115,9 +115,9 @@ do for vm in $EVM_VERSIONS do FORCE_ABIV1_RUNS="no" - if [[ "$vm" == "london" ]] + if [[ "$vm" == "paris" ]] then - FORCE_ABIV1_RUNS="no yes" # run both in london + FORCE_ABIV1_RUNS="no yes" # run both in paris fi for abiv1 in $FORCE_ABIV1_RUNS do diff --git a/test/externalTests/common.sh b/test/externalTests/common.sh index 144c68a89..b6a85c1e3 100644 --- a/test/externalTests/common.sh +++ b/test/externalTests/common.sh @@ -22,7 +22,7 @@ set -e # Requires $REPO_ROOT to be defined and "${REPO_ROOT}/scripts/common.sh" to be included before. -CURRENT_EVM_VERSION=london +CURRENT_EVM_VERSION=paris AVAILABLE_PRESETS=( legacy-no-optimize diff --git a/test/libsolidity/StandardCompiler.cpp b/test/libsolidity/StandardCompiler.cpp index 61b28b11e..d2eeedd91 100644 --- a/test/libsolidity/StandardCompiler.cpp +++ b/test/libsolidity/StandardCompiler.cpp @@ -1086,7 +1086,7 @@ BOOST_AUTO_TEST_CASE(evm_version) BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"paris\"") != string::npos); // test default result = compile(inputForVersion("")); - BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"london\"") != string::npos); + BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"paris\"") != string::npos); // test invalid result = compile(inputForVersion("\"evmVersion\": \"invalid\",")); BOOST_CHECK(result["errors"][0]["message"].asString() == "Invalid EVM version requested.");