From f064fdcbd82ac82c59809e9b4a57c2c46bfdb722 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 4 Jan 2019 14:44:47 +0000 Subject: [PATCH 1/2] Add Istanbul to evmc_revision --- bindings/go/evmc/evmc.go | 1 + include/evmc/evmc.h | 3 ++- lib/instructions/instruction_metrics.c | 2 ++ lib/instructions/instruction_names.c | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bindings/go/evmc/evmc.go b/bindings/go/evmc/evmc.go index 8039490..f0b1a05 100644 --- a/bindings/go/evmc/evmc.go +++ b/bindings/go/evmc/evmc.go @@ -141,6 +141,7 @@ const ( SpuriousDragon Revision = C.EVMC_SPURIOUS_DRAGON Byzantium Revision = C.EVMC_BYZANTIUM Constantinople Revision = C.EVMC_CONSTANTINOPLE + Istanbul Revision = C.EVMC_ISTANBUL ) type Instance struct { diff --git a/include/evmc/evmc.h b/include/evmc/evmc.h index b3a058b..e405e47 100644 --- a/include/evmc/evmc.h +++ b/include/evmc/evmc.h @@ -706,8 +706,9 @@ enum evmc_revision EVMC_SPURIOUS_DRAGON = 3, EVMC_BYZANTIUM = 4, EVMC_CONSTANTINOPLE = 5, + EVMC_ISTANBUL = 6, - EVMC_LATEST_REVISION = EVMC_CONSTANTINOPLE + EVMC_LATEST_REVISION = EVMC_ISTANBUL }; diff --git a/lib/instructions/instruction_metrics.c b/lib/instructions/instruction_metrics.c index 9f7f412..41c9a3a 100644 --- a/lib/instructions/instruction_metrics.c +++ b/lib/instructions/instruction_metrics.c @@ -1321,6 +1321,8 @@ const struct evmc_instruction_metrics* evmc_get_instruction_metrics_table( { switch (revision) { + case EVMC_ISTANBUL: + /* Currently the same as Costantinople */ case EVMC_CONSTANTINOPLE: return constantinople_metrics; case EVMC_BYZANTIUM: diff --git a/lib/instructions/instruction_names.c b/lib/instructions/instruction_names.c index cd381d0..8ebe49c 100644 --- a/lib/instructions/instruction_names.c +++ b/lib/instructions/instruction_names.c @@ -1045,6 +1045,8 @@ const char* const* evmc_get_instruction_names_table(enum evmc_revision revision) { switch (revision) { + case EVMC_ISTANBUL: + /* Currently the same as Costantinople */ case EVMC_CONSTANTINOPLE: return constantinople_names; case EVMC_BYZANTIUM: From fc19d8219d8aa247d6b36e5a2edf295e22b0e14e Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 14 Jan 2019 13:38:03 +0000 Subject: [PATCH 2/2] Add a note to EVMC_LATEST_REVISION --- include/evmc/evmc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/evmc/evmc.h b/include/evmc/evmc.h index e405e47..f66d256 100644 --- a/include/evmc/evmc.h +++ b/include/evmc/evmc.h @@ -708,7 +708,7 @@ enum evmc_revision EVMC_CONSTANTINOPLE = 5, EVMC_ISTANBUL = 6, - EVMC_LATEST_REVISION = EVMC_ISTANBUL + EVMC_LATEST_REVISION = EVMC_ISTANBUL /**< This is the maximum revision number supported. */ };