Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit 0bf52fe

Browse files
authored
Add EXPERIMENTAL revision (#728)
Add new `EVMC_EXPERIMENTAL` to `evmc_revision` to allow EVM implementations to expose experimental features.
1 parent 521e486 commit 0bf52fe

File tree

7 files changed

+18
-6
lines changed

7 files changed

+18
-6
lines changed

bindings/go/evmc/evmc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ const (
112112
Cancun Revision = C.EVMC_CANCUN
113113
Prague Revision = C.EVMC_PRAGUE
114114
Osaka Revision = C.EVMC_OSAKA
115+
Experimental Revision = C.EVMC_EXPERIMENTAL
115116
MaxRevision Revision = C.EVMC_MAX_REVISION
116117
LatestStableRevision Revision = C.EVMC_LATEST_STABLE_REVISION
117118
)

bindings/go/evmc/evmc_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func TestExecuteEmptyCode(t *testing.T) {
6464
}
6565

6666
func TestRevision(t *testing.T) {
67-
if MaxRevision != Osaka {
67+
if MaxRevision != Experimental {
6868
t.Errorf("missing constant for revision %d", MaxRevision)
6969
}
7070
if LatestStableRevision != Cancun {

include/evmc/evmc.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,21 +1034,27 @@ enum evmc_revision
10341034
EVMC_CANCUN = 12,
10351035

10361036
/**
1037-
* The Prague revision.
1037+
* The Prague / Pectra revision.
10381038
*
1039-
* The future next revision after Cancun.
1039+
* https://eips.ethereum.org/EIPS/eip-7600
10401040
*/
10411041
EVMC_PRAGUE = 13,
10421042

10431043
/**
1044-
* The Osaka revision.
1044+
* The Osaka / Fusaka revision.
10451045
*
1046-
* The future next revision after Prague.
1046+
* https://eips.ethereum.org/EIPS/eip-7607
10471047
*/
10481048
EVMC_OSAKA = 14,
10491049

1050+
/**
1051+
* The unspecified EVM revision used for EVM implementations to expose
1052+
* experimental features.
1053+
*/
1054+
EVMC_EXPERIMENTAL = 15,
1055+
10501056
/** The maximum EVM revision supported. */
1051-
EVMC_MAX_REVISION = EVMC_OSAKA,
1057+
EVMC_MAX_REVISION = EVMC_EXPERIMENTAL,
10521058

10531059
/**
10541060
* The latest known EVM revision with finalized specification.

include/evmc/helpers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ static inline const char* evmc_revision_to_string(enum evmc_revision rev)
303303
return "Prague";
304304
case EVMC_OSAKA:
305305
return "Osaka";
306+
case EVMC_EXPERIMENTAL:
307+
return "Experimental";
306308
}
307309
return "<unknown>";
308310
}

lib/instructions/instruction_metrics.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3146,6 +3146,7 @@ const struct evmc_instruction_metrics* evmc_get_instruction_metrics_table(
31463146
{
31473147
switch (revision)
31483148
{
3149+
case EVMC_EXPERIMENTAL:
31493150
case EVMC_OSAKA:
31503151
return osaka_metrics;
31513152
case EVMC_PRAGUE:

lib/instructions/instruction_names.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2857,6 +2857,7 @@ const char* const* evmc_get_instruction_names_table(enum evmc_revision revision)
28572857
{
28582858
switch (revision)
28592859
{
2860+
case EVMC_EXPERIMENTAL:
28602861
case EVMC_OSAKA:
28612862
return osaka_names;
28622863
case EVMC_PRAGUE:

test/unittests/cpp_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,7 @@ TEST(cpp, revision_to_string)
919919
TEST_CASE(EVMC_CANCUN),
920920
TEST_CASE(EVMC_PRAGUE),
921921
TEST_CASE(EVMC_OSAKA),
922+
TEST_CASE(EVMC_EXPERIMENTAL),
922923
};
923924
#undef TEST_CASE
924925

0 commit comments

Comments
 (0)