diff --git a/Makefile b/Makefile index 41166c2f4..a6f7d678d 100644 --- a/Makefile +++ b/Makefile @@ -359,7 +359,7 @@ txparse: | build deps # builds the nimbus evmc shared library libnimbusevm: | build deps - $(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:evmc_enabled --app:lib --noMain -o:build/libnimbusevm/$@.$(SHAREDLIBEXT) nimbus/transaction/evmc_vm_glue.nim + $(ENV_SCRIPT) nim c $(NIM_PARAMS) -d:evmc_enabled --app:lib --noMain -o:build/libnimbusevm/$@.$(SHAREDLIBEXT) execution_chain/transaction/evmc_vm_glue.nim # usual cleaning clean: | clean-common diff --git a/execution_chain/common/evmforks.nim b/execution_chain/common/evmforks.nim index 2abe45b86..3917ec8c8 100644 --- a/execution_chain/common/evmforks.nim +++ b/execution_chain/common/evmforks.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2018-2024 Status Research & Development GmbH +# Copyright (c) 2018-2025 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -30,3 +30,4 @@ const FkCancun* = EVMC_CANCUN FkPrague* = EVMC_PRAGUE FkOsaka* = EVMC_OSAKA + FkLatest* = EVMFork(EVMFork.high.int - 1) diff --git a/execution_chain/core/eip7691.nim b/execution_chain/core/eip7691.nim index 14742e897..f03600767 100644 --- a/execution_chain/core/eip7691.nim +++ b/execution_chain/core/eip7691.nim @@ -25,10 +25,10 @@ func getTargetBlobGasPerBlock*(electra: bool): uint64 = else: TARGET_BLOB_GAS_PER_BLOCK.uint64 const - EVMForkToFork: array[FkCancun..EVMFork.high, HardFork] = [ + EVMForkToFork: array[FkCancun..FkLatest, HardFork] = [ Cancun, Prague, - Osaka + Osaka, ] func getMaxBlobsPerBlock*(com: CommonRef, fork: EVMFork): uint64 = diff --git a/execution_chain/core/executor/calculate_reward.nim b/execution_chain/core/executor/calculate_reward.nim index 3f889fa93..762bbf0e0 100644 --- a/execution_chain/core/executor/calculate_reward.nim +++ b/execution_chain/core/executor/calculate_reward.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2018-2024 Status Research & Development GmbH +# Copyright (c) 2018-2025 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -31,7 +31,7 @@ const eth2 = 2.eth eth0 = 0.u256 - BlockRewards: array[EVMFork, UInt256] = [ + BlockRewards: array[FkFrontier..FkLatest, UInt256] = [ eth5, # Frontier eth5, # Homestead eth5, # Tangerine diff --git a/execution_chain/evm/interpreter/gas_costs.nim b/execution_chain/evm/interpreter/gas_costs.nim index 6caeaf9d0..16193ff3c 100644 --- a/execution_chain/evm/interpreter/gas_costs.nim +++ b/execution_chain/evm/interpreter/gas_costs.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2018-2024 Status Research & Development GmbH +# Copyright (c) 2018-2025 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) # * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) @@ -774,7 +774,7 @@ const LondonGasFees = BerlinGasFees.londonGasFees ShanghaiGasFees = LondonGasFees.shanghaiGasFees - gasFees*: array[EVMFork, GasFeeSchedule] = [ + gasFees*: array[FkFrontier..FkLatest, GasFeeSchedule] = [ FkFrontier: BaseGasFees, FkHomestead: HomesteadGasFees, FkTangerine: TangerineGasFees, diff --git a/tests/test_helpers.nim b/tests/test_helpers.nim index 7c184c71d..dd592b59a 100644 --- a/tests/test_helpers.nim +++ b/tests/test_helpers.nim @@ -13,13 +13,13 @@ import ../execution_chain/db/ledger, ../execution_chain/common/[context, common] -func revTable(list: array[EVMFork, string]): Table[string, EVMFork] = +func revTable(list: array[FkFrontier..FkLatest, string]): Table[string, EVMFork] = for k, v in list: result[v] = k const # from https://ethereum-tests.readthedocs.io/en/latest/test_types/state_tests.html - ForkToName: array[EVMFork, string] = [ + ForkToName: array[FkFrontier..FkLatest, string] = [ "Frontier", # FkFrontier "Homestead", # FkHomestead "EIP150", # FkTangerine diff --git a/vendor/nim-evmc b/vendor/nim-evmc index 730d35d85..0b758ff7a 160000 --- a/vendor/nim-evmc +++ b/vendor/nim-evmc @@ -1 +1 @@ -Subproject commit 730d35d8572e1b3957b0c6c986ecd86413976da0 +Subproject commit 0b758ff7a59dd6b3728309fa7ffeeea3d46454e0