Skip to content

Commit 9ff6d26

Browse files
authored
Merge pull request ethereum#15830 from ethereum/add-evm-version-osaka
Introduces EVM version Osaka
2 parents 03ad799 + 6b4ee52 commit 9ff6d26

File tree

8 files changed

+16
-5
lines changed

8 files changed

+16
-5
lines changed

.circleci/soltest_all.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ REPODIR="$(realpath "$(dirname "$0")"/..)"
3131
# shellcheck source=scripts/common.sh
3232
source "${REPODIR}/scripts/common.sh"
3333

34-
DEFAULT_EVM_VALUES=(constantinople petersburg istanbul berlin london paris shanghai cancun prague)
34+
DEFAULT_EVM_VALUES=(constantinople petersburg istanbul berlin london paris shanghai cancun prague osaka)
3535
EVMS_WITH_EOF=(prague)
3636

3737
# Deserialize the EVM_VALUES array if it was provided as argument or

Changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Language Features:
55

66
Compiler Features:
77
* Error Reporting: Errors reported during code generation now point at the location of the contract when more fine-grained location is not available.
8+
* EVM: Support for the EVM version "Osaka".
89
* SMTChecker: Support `block.blobbasefee` and `blobhash`.
910
* SMTChecker: Z3 is now a runtime dependency, not a build dependency (except for emscripten build).
1011
* Yul Parser: Make name clash with a builtin a non-fatal error.

docs/using-the-compiler.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ at each version. Backward compatibility is not guaranteed between each version.
182182
- Opcode ``mcopy`` is available in assembly (see `EIP-5656 <https://eips.ethereum.org/EIPS/eip-5656>`_).
183183
- Opcodes ``tstore`` and ``tload`` are available in assembly (see `EIP-1153 <https://eips.ethereum.org/EIPS/eip-1153>`_).
184184
- ``prague`` (**experimental**)
185+
- ``osaka`` (**experimental**)
185186

186187
.. index:: ! standard JSON, ! --standard-json
187188
.. _compiler-api:
@@ -349,7 +350,7 @@ Input Description
349350
// Version of the EVM to compile for.
350351
// Affects type checking and code generation. Can be homestead,
351352
// tangerineWhistle, spuriousDragon, byzantium, constantinople,
352-
// petersburg, istanbul, berlin, london, paris, shanghai, cancun (default) or prague (experimental).
353+
// petersburg, istanbul, berlin, london, paris, shanghai, cancun (default), prague (experimental) or osaka (experimental).
353354
"evmVersion": "cancun",
354355
// Optional: Change compilation pipeline to go through the Yul intermediate representation.
355356
// This is false by default.

liblangutil/EVMVersion.h

+6-2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class EVMVersion:
6464
static EVMVersion shanghai() { return {Version::Shanghai}; }
6565
static EVMVersion cancun() { return {Version::Cancun}; }
6666
static EVMVersion prague() { return {Version::Prague}; }
67+
static EVMVersion osaka() { return {Version::Osaka}; }
6768

6869
static std::vector<EVMVersion> allVersions() {
6970
return {
@@ -80,6 +81,7 @@ class EVMVersion:
8081
shanghai(),
8182
cancun(),
8283
prague(),
84+
osaka(),
8385
};
8486
}
8587

@@ -92,7 +94,7 @@ class EVMVersion:
9294
}
9395

9496
bool isExperimental() const {
95-
return m_version == Version::Prague;
97+
return *this > EVMVersion{};
9698
}
9799

98100
bool operator==(EVMVersion const& _other) const { return m_version == _other.m_version; }
@@ -115,6 +117,7 @@ class EVMVersion:
115117
case Version::Shanghai: return "shanghai";
116118
case Version::Cancun: return "cancun";
117119
case Version::Prague: return "prague";
120+
case Version::Osaka: return "osaka";
118121
}
119122
util::unreachable();
120123
}
@@ -155,7 +158,8 @@ class EVMVersion:
155158
Paris,
156159
Shanghai,
157160
Cancun,
158-
Prague
161+
Prague,
162+
Osaka,
159163
};
160164

161165
EVMVersion(Version _version): m_version(_version) {}

scripts/tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ EVM_VERSIONS="homestead byzantium"
105105

106106
if [ -z "$CI" ]
107107
then
108-
EVM_VERSIONS+=" constantinople petersburg istanbul berlin london paris shanghai cancun prague"
108+
EVM_VERSIONS+=" constantinople petersburg istanbul berlin london paris shanghai cancun prague osaka"
109109
fi
110110

111111
# And then run the Solidity unit-tests in the matrix combination of optimizer / no optimizer

test/EVMHost.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ EVMHost::EVMHost(langutil::EVMVersion _evmVersion, evmc::VM& _vm):
134134
m_evmRevision = EVMC_CANCUN;
135135
else if (_evmVersion == langutil::EVMVersion::prague())
136136
m_evmRevision = EVMC_PRAGUE;
137+
else if (_evmVersion == langutil::EVMVersion::osaka())
138+
m_evmRevision = EVMC_OSAKA;
137139
else
138140
assertThrow(false, Exception, "Unsupported EVM version");
139141

test/tools/ossfuzz/protoToYul.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ EVMVersion ProtoConverter::evmVersionMapping(Program_Version const& _ver)
121121
return EVMVersion::cancun();
122122
case Program::PRAGUE:
123123
return EVMVersion::prague();
124+
case Program::OSAKA:
125+
return EVMVersion::osaka();
124126
}
125127
}
126128

test/tools/ossfuzz/yulProto.proto

+1
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ message Program {
407407
SHANGHAI = 10;
408408
CANCUN = 11;
409409
PRAGUE = 12;
410+
OSAKA = 13;
410411
}
411412
oneof program_oneof {
412413
Block block = 1;

0 commit comments

Comments
 (0)