diff --git a/nimbus/vm2/code_stream.nim b/nimbus/vm2/code_stream.nim index 9f2ce84e6..3e9f52497 100644 --- a/nimbus/vm2/code_stream.nim +++ b/nimbus/vm2/code_stream.nim @@ -8,7 +8,7 @@ import chronicles, strformat, strutils, sequtils, parseutils, sets, macros, eth/common, - ./interpreter/opcode_values + ./interpreter/v2opcode_values logScope: topics = "vm code_stream" diff --git a/nimbus/vm2/computation.nim b/nimbus/vm2/computation.nim index 3e93cdc51..abbdb3554 100644 --- a/nimbus/vm2/computation.nim +++ b/nimbus/vm2/computation.nim @@ -14,8 +14,8 @@ import chronicles, strformat, macros, options, times, sets, eth/[common, keys], ../constants, ../errors, - ./interpreter/[opcode_values, gas_meter, gas_costs, vm_forks], - ./code_stream, ./memory, ./message, ./stack, ./types, ./state, + ./interpreter/[v2opcode_values, gas_meter, gas_costs, v2forks], + ./code_stream, ./memory, ./message, ./stack, ./v2types, ./state, ../db/[accounts_cache, db_chain], ../utils/header, ./precompiles, ./transaction_tracer, ../utils diff --git a/nimbus/vm2/interpreter.nim b/nimbus/vm2/interpreter.nim index 6362b9ef5..c3ee49069 100644 --- a/nimbus/vm2/interpreter.nim +++ b/nimbus/vm2/interpreter.nim @@ -16,14 +16,14 @@ when defined(evmc_enabled): # see vm_opcode_value import - ./interpreter/opcode_values as vmo + ./interpreter/v2opcode_values as vmo export vmo.Op -# see vm_forks +# see v2forks import - ./interpreter/vm_forks as vmf + ./interpreter/v2forks as vmf export vmf.Fork diff --git a/nimbus/vm2/interpreter/gas_costs.nim b/nimbus/vm2/interpreter/gas_costs.nim index 9f9e1bd12..860fbebdb 100644 --- a/nimbus/vm2/interpreter/gas_costs.nim +++ b/nimbus/vm2/interpreter/gas_costs.nim @@ -13,7 +13,7 @@ when defined(evmc_enabled): import math, eth/common/eth_types, ./utils/[macros_gen_opcodes, utils_numeric], - ./opcode_values, ./vm_forks, ../../errors + ./v2opcode_values, ./v2forks, ../../errors # Gas Fee Schedule # Yellow Paper Appendix G - https://ethereum.github.io/yellowpaper/paper.pdf diff --git a/nimbus/vm2/interpreter/gas_meter.nim b/nimbus/vm2/interpreter/gas_meter.nim index 9a0fb4077..76d2f4d09 100644 --- a/nimbus/vm2/interpreter/gas_meter.nim +++ b/nimbus/vm2/interpreter/gas_meter.nim @@ -7,7 +7,7 @@ import chronicles, strformat, eth/common, # GasInt - ../../errors, ../types + ../../errors, ../v2types logScope: topics = "vm gas" diff --git a/nimbus/vm2/interpreter/opcodes_impl.nim b/nimbus/vm2/interpreter/opcodes_impl.nim index 29b3aa18d..ab319d569 100644 --- a/nimbus/vm2/interpreter/opcodes_impl.nim +++ b/nimbus/vm2/interpreter/opcodes_impl.nim @@ -9,8 +9,8 @@ import strformat, times, sets, sequtils, options, chronicles, stint, nimcrypto, stew/ranges/ptr_arith, eth/common, ./utils/[macros_procs_opcodes, utils_numeric], - ./gas_meter, ./gas_costs, ./opcode_values, ./vm_forks, - ../memory, ../stack, ../code_stream, ../computation, ../state, ../types, + ./gas_meter, ./gas_costs, ./v2opcode_values, ./v2forks, + ../memory, ../stack, ../code_stream, ../computation, ../state, ../v2types, ../../errors, ../../constants, ../../db/[db_chain, accounts_cache] diff --git a/nimbus/vm2/interpreter/utils/macros_procs_opcodes.nim b/nimbus/vm2/interpreter/utils/macros_procs_opcodes.nim index 1e76d9cd9..c9fb0c6ef 100644 --- a/nimbus/vm2/interpreter/utils/macros_procs_opcodes.nim +++ b/nimbus/vm2/interpreter/utils/macros_procs_opcodes.nim @@ -11,7 +11,7 @@ import macros, strformat, stint, eth/common, ../../computation, ../../stack, ../../code_stream, ../../memory, - ../../types, ../../../errors, ../gas_meter, ../opcode_values, + ../../v2types, ../../../errors, ../gas_meter, ../v2opcode_values, ./utils_numeric proc pop(tree: var NimNode): NimNode = diff --git a/nimbus/vm2/interpreter/vm_forks.nim b/nimbus/vm2/interpreter/v2forks.nim similarity index 100% rename from nimbus/vm2/interpreter/vm_forks.nim rename to nimbus/vm2/interpreter/v2forks.nim diff --git a/nimbus/vm2/interpreter/opcode_values.nim b/nimbus/vm2/interpreter/v2opcode_values.nim similarity index 100% rename from nimbus/vm2/interpreter/opcode_values.nim rename to nimbus/vm2/interpreter/v2opcode_values.nim diff --git a/nimbus/vm2/interpreter_dispatch.nim b/nimbus/vm2/interpreter_dispatch.nim index 593d76dc1..003421474 100644 --- a/nimbus/vm2/interpreter_dispatch.nim +++ b/nimbus/vm2/interpreter_dispatch.nim @@ -8,8 +8,8 @@ import tables, macros, chronicles, - ./interpreter/[opcode_values, opcodes_impl, vm_forks, gas_costs, gas_meter, utils/macros_gen_opcodes], - ./code_stream, ./types, ../errors, ./precompiles, ./stack, + ./interpreter/[v2opcode_values, opcodes_impl, v2forks, gas_costs, gas_meter, utils/macros_gen_opcodes], + ./code_stream, ./v2types, ../errors, ./precompiles, ./stack, terminal # Those are only needed for logging logScope: diff --git a/nimbus/vm2/message.nim b/nimbus/vm2/message.nim index 44014cbb5..168becda5 100644 --- a/nimbus/vm2/message.nim +++ b/nimbus/vm2/message.nim @@ -10,7 +10,7 @@ when not defined(vm2_enabled): when defined(evmc_enabled): {.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"} -import ./types +import ./v2types proc isCreate*(message: Message): bool = message.kind in {evmcCreate, evmcCreate2} diff --git a/nimbus/vm2/precompiles.nim b/nimbus/vm2/precompiles.nim index 32a392cdb..bfe150682 100644 --- a/nimbus/vm2/precompiles.nim +++ b/nimbus/vm2/precompiles.nim @@ -14,8 +14,8 @@ when defined(evmc_enabled): {.fatal: "Flags \"evmc_enabled\" and \"vm2_enabled\" are mutually exclusive"} import - ./types, - ./interpreter/[gas_meter, gas_costs, utils/utils_numeric, vm_forks], + ./v2types, + ./interpreter/[gas_meter, gas_costs, utils/utils_numeric, v2forks], ../errors, stint, eth/[keys, common], chronicles, tables, macros, math, nimcrypto, bncurve/[fields, groups], ./blake2b_f, ./blscurve diff --git a/nimbus/vm2/state.nim b/nimbus/vm2/state.nim index 5a07b0223..acabf536f 100644 --- a/nimbus/vm2/state.nim +++ b/nimbus/vm2/state.nim @@ -16,9 +16,9 @@ when defined(evmc_enabled): import macros, strformat, tables, sets, options, eth/[common, keys, rlp], nimcrypto/keccak, - ./interpreter/[vm_forks, gas_costs], ../errors, + ./interpreter/[v2forks, gas_costs], ../errors, ../constants, ../db/[db_chain, accounts_cache], - ../utils, json, ./transaction_tracer, ./types, + ../utils, json, ./transaction_tracer, ./v2types, ../config, ../../stateless/[witness_from_tree, witness_types] proc newAccessLogs*: AccessLogs = diff --git a/nimbus/vm2/state_transactions.nim b/nimbus/vm2/state_transactions.nim index 3f5217069..cc1278f5f 100644 --- a/nimbus/vm2/state_transactions.nim +++ b/nimbus/vm2/state_transactions.nim @@ -14,7 +14,7 @@ import options, sets, eth/common, chronicles, ../db/accounts_cache, ../transaction, - ./computation, ./interpreter, ./state, ./types + ./computation, ./interpreter, ./state, ./v2types proc setupComputation*(vmState: BaseVMState, tx: Transaction, sender: EthAddress, fork: Fork) : Computation = var gas = tx.gasLimit - tx.intrinsicGas(fork) diff --git a/nimbus/vm2/transaction_tracer.nim b/nimbus/vm2/transaction_tracer.nim index 57826f0c9..821e3e50d 100644 --- a/nimbus/vm2/transaction_tracer.nim +++ b/nimbus/vm2/transaction_tracer.nim @@ -1,9 +1,9 @@ import json, strutils, sets, hashes, chronicles, nimcrypto, eth/common, stint, - ./types, ./memory, ./stack, ../db/accounts_cache, + ./v2types, ./memory, ./stack, ../db/accounts_cache, eth/trie/hexary, - ./interpreter/opcode_values + ./interpreter/v2opcode_values logScope: topics = "vm opcode" diff --git a/nimbus/vm2/types.nim b/nimbus/vm2/v2types.nim similarity index 98% rename from nimbus/vm2/types.nim rename to nimbus/vm2/v2types.nim index e0cf1d8a6..3ccb3363d 100644 --- a/nimbus/vm2/types.nim +++ b/nimbus/vm2/v2types.nim @@ -17,7 +17,7 @@ import tables, eth/common, options, json, sets, ./memory, ./stack, ./code_stream, - ./interpreter/[gas_costs, opcode_values, vm_forks], + ./interpreter/[gas_costs, v2opcode_values, v2forks], # TODO - will be hidden at a lower layer ../db/[db_chain, accounts_cache] diff --git a/nimbus/vm_types.nim b/nimbus/vm_types.nim index 0d30f16eb..b91e05446 100644 --- a/nimbus/vm_types.nim +++ b/nimbus/vm_types.nim @@ -13,7 +13,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled): ./vm/types as vmt else: import - ./vm2/types as vmt + ./vm2/v2types as vmt export vmt.AccessLogs, diff --git a/nimbus/vm_types2.nim b/nimbus/vm_types2.nim index 9ce3f3fc5..df1e5389f 100644 --- a/nimbus/vm_types2.nim +++ b/nimbus/vm_types2.nim @@ -16,7 +16,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled): ./vm/interpreter/vm_forks as vmf else: import - ./vm2/interpreter/vm_forks as vmf + ./vm2/interpreter/v2forks as vmf export vmf.Fork @@ -26,7 +26,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled): ./vm/interpreter/opcode_values as vmo else: import - ./vm2/interpreter/opcode_values as vmo + ./vm2/interpreter/v2opcode_values as vmo export vmo.Op