diff --git a/nimbus/vm/code_stream.nim b/nimbus/vm/code_stream.nim index ba222f45f..f63d09e17 100644 --- a/nimbus/vm/code_stream.nim +++ b/nimbus/vm/code_stream.nim @@ -8,7 +8,7 @@ import chronicles, strformat, strutils, sequtils, parseutils, sets, macros, eth/common, - vm/interpreter/nvm_opcode_values + vm/interpreter/opcode_values logScope: topics = "vm code_stream" diff --git a/nimbus/vm/nvm_computation.nim b/nimbus/vm/computation.nim similarity index 98% rename from nimbus/vm/nvm_computation.nim rename to nimbus/vm/computation.nim index bb50990f5..e5ba8fb52 100644 --- a/nimbus/vm/nvm_computation.nim +++ b/nimbus/vm/computation.nim @@ -9,10 +9,10 @@ import chronicles, strformat, macros, options, times, sets, eth/[common, keys], constants, errors, - vm/interpreter/[nvm_opcode_values, gas_meter, nvm_gas_costs, nvm_forks], - vm/[code_stream, nvm_memory, nvm_message, stack, nvm_types, nvm_state], + vm/interpreter/[opcode_values, gas_meter, gas_costs, vm_forks], + vm/[code_stream, memory, message, stack, types, state], db/[accounts_cache, db_chain], - utils/header, nvm_precompiles, + utils/header, precompiles, transaction_tracer, utils when defined(chronicles_log_level): diff --git a/nimbus/vm/nvm_interpreter.nim b/nimbus/vm/interpreter.nim similarity index 93% rename from nimbus/vm/nvm_interpreter.nim rename to nimbus/vm/interpreter.nim index 13854b5e4..3845dfcb6 100644 --- a/nimbus/vm/nvm_interpreter.nim +++ b/nimbus/vm/interpreter.nim @@ -10,28 +10,28 @@ # see vm_opcode_value import - ./vm/interpreter/nvm_opcode_values as vmo + ./vm/interpreter/opcode_values as vmo export vmo.Op # see vm_forks import - vm/interpreter/nvm_forks as vmf + vm/interpreter/vm_forks as vmf export vmf.Fork # see vm_message import - ./vm/nvm_message as vmm + ./vm/message as vmm export vmm.isCreate # see vm_computation import - ./vm/nvm_computation as vmc + ./vm/computation as vmc export vmc.accountExists, vmc.addLogEntry, diff --git a/nimbus/vm/interpreter/nvm_gas_costs.nim b/nimbus/vm/interpreter/gas_costs.nim similarity index 99% rename from nimbus/vm/interpreter/nvm_gas_costs.nim rename to nimbus/vm/interpreter/gas_costs.nim index 088115404..f3ef8941d 100644 --- a/nimbus/vm/interpreter/nvm_gas_costs.nim +++ b/nimbus/vm/interpreter/gas_costs.nim @@ -7,8 +7,8 @@ import math, eth/common/eth_types, - vm/interpreter/utils/[macros_gen_opcodes, nvm_utils_numeric], - vm/interpreter/[nvm_opcode_values, nvm_forks], errors + vm/interpreter/utils/[macros_gen_opcodes, utils_numeric], + vm/interpreter/[opcode_values, vm_forks], errors when defined(evmc_enabled): import evmc/evmc diff --git a/nimbus/vm/interpreter/gas_meter.nim b/nimbus/vm/interpreter/gas_meter.nim index d090ef229..8c57ff7f2 100644 --- a/nimbus/vm/interpreter/gas_meter.nim +++ b/nimbus/vm/interpreter/gas_meter.nim @@ -7,7 +7,7 @@ import chronicles, strformat, eth/common, # GasInt - errors, vm/nvm_types + errors, vm/types logScope: topics = "vm gas" diff --git a/nimbus/vm/interpreter/nvm_opcode_values.nim b/nimbus/vm/interpreter/opcode_values.nim similarity index 100% rename from nimbus/vm/interpreter/nvm_opcode_values.nim rename to nimbus/vm/interpreter/opcode_values.nim diff --git a/nimbus/vm/interpreter/opcodes_impl.nim b/nimbus/vm/interpreter/opcodes_impl.nim index a691f4bcf..d3db2d69e 100644 --- a/nimbus/vm/interpreter/opcodes_impl.nim +++ b/nimbus/vm/interpreter/opcodes_impl.nim @@ -8,9 +8,9 @@ import strformat, times, sets, sequtils, options, chronicles, stint, nimcrypto, stew/ranges/ptr_arith, eth/common, - vm/interpreter/utils/[macros_procs_opcodes, nvm_utils_numeric], - vm/interpreter/[gas_meter, nvm_gas_costs, nvm_opcode_values, nvm_forks], - vm/[nvm_memory, stack, code_stream, nvm_computation, nvm_state, nvm_types], + vm/interpreter/utils/[macros_procs_opcodes, utils_numeric], + vm/interpreter/[gas_meter, gas_costs, opcode_values, vm_forks], + vm/[memory, stack, code_stream, computation, state, types], errors, constants, db/[db_chain, accounts_cache] diff --git a/nimbus/vm/interpreter/utils/macros_procs_opcodes.nim b/nimbus/vm/interpreter/utils/macros_procs_opcodes.nim index bc3851a24..f23cccd83 100644 --- a/nimbus/vm/interpreter/utils/macros_procs_opcodes.nim +++ b/nimbus/vm/interpreter/utils/macros_procs_opcodes.nim @@ -10,9 +10,9 @@ import macros, strformat, stint, eth/common, - vm/[nvm_computation, stack, code_stream, nvm_memory], - vm/nvm_types, errors, vm/interpreter/[gas_meter, nvm_opcode_values], - vm/interpreter/utils/nvm_utils_numeric + vm/[computation, stack, code_stream, memory], + vm/types, errors, vm/interpreter/[gas_meter, opcode_values], + vm/interpreter/utils/utils_numeric when defined(evmc_enabled): import vm/evmc_api, evmc/evmc diff --git a/nimbus/vm/interpreter/utils/nvm_utils_numeric.nim b/nimbus/vm/interpreter/utils/utils_numeric.nim similarity index 100% rename from nimbus/vm/interpreter/utils/nvm_utils_numeric.nim rename to nimbus/vm/interpreter/utils/utils_numeric.nim diff --git a/nimbus/vm/interpreter/nvm_forks.nim b/nimbus/vm/interpreter/vm_forks.nim similarity index 100% rename from nimbus/vm/interpreter/nvm_forks.nim rename to nimbus/vm/interpreter/vm_forks.nim diff --git a/nimbus/vm/interpreter_dispatch.nim b/nimbus/vm/interpreter_dispatch.nim index 70979a76d..cad86df65 100644 --- a/nimbus/vm/interpreter_dispatch.nim +++ b/nimbus/vm/interpreter_dispatch.nim @@ -8,8 +8,8 @@ import tables, macros, chronicles, - vm/interpreter/[nvm_opcode_values, opcodes_impl, nvm_forks, nvm_gas_costs, gas_meter, utils/macros_gen_opcodes], - vm/code_stream, vm/nvm_types, errors, nvm_precompiles, vm/stack, + vm/interpreter/[opcode_values, opcodes_impl, vm_forks, gas_costs, gas_meter, utils/macros_gen_opcodes], + vm/code_stream, vm/types, errors, precompiles, vm/stack, terminal # Those are only needed for logging logScope: diff --git a/nimbus/vm/nvm_memory.nim b/nimbus/vm/memory.nim similarity index 97% rename from nimbus/vm/nvm_memory.nim rename to nimbus/vm/memory.nim index 11ea255ea..1d1e55a93 100644 --- a/nimbus/vm/nvm_memory.nim +++ b/nimbus/vm/memory.nim @@ -9,7 +9,7 @@ import sequtils, chronicles, eth/common/eth_types, errors, validation, - vm/interpreter/utils/nvm_utils_numeric + vm/interpreter/utils/utils_numeric logScope: topics = "vm memory" diff --git a/nimbus/vm/nvm_message.nim b/nimbus/vm/message.nim similarity index 96% rename from nimbus/vm/nvm_message.nim rename to nimbus/vm/message.nim index e70e4008b..b2611914a 100644 --- a/nimbus/vm/nvm_message.nim +++ b/nimbus/vm/message.nim @@ -5,7 +5,7 @@ # * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) # at your option. This file may not be copied, modified, or distributed except according to those terms. -import vm/nvm_types +import vm/types proc isCreate*(message: Message): bool = message.kind in {evmcCreate, evmcCreate2} diff --git a/nimbus/vm/nvm_precompiles.nim b/nimbus/vm/precompiles.nim similarity index 99% rename from nimbus/vm/nvm_precompiles.nim rename to nimbus/vm/precompiles.nim index 8695041c9..5ca1a0046 100644 --- a/nimbus/vm/nvm_precompiles.nim +++ b/nimbus/vm/precompiles.nim @@ -1,6 +1,6 @@ import - vm/nvm_types, - vm/interpreter/[gas_meter, nvm_gas_costs, utils/nvm_utils_numeric, nvm_forks], + vm/types, + vm/interpreter/[gas_meter, gas_costs, utils/utils_numeric, vm_forks], errors, stint, eth/[keys, common], chronicles, tables, macros, math, nimcrypto, bncurve/[fields, groups], vm/blake2b_f, vm/blscurve diff --git a/nimbus/vm/nvm_state.nim b/nimbus/vm/state.nim similarity index 98% rename from nimbus/vm/nvm_state.nim rename to nimbus/vm/state.nim index 14a40c196..bdcf04eec 100644 --- a/nimbus/vm/nvm_state.nim +++ b/nimbus/vm/state.nim @@ -11,9 +11,9 @@ import macros, strformat, tables, sets, options, eth/[common, keys, rlp], nimcrypto/keccak, - vm/interpreter/[nvm_forks, nvm_gas_costs], errors, + vm/interpreter/[vm_forks, gas_costs], errors, constants, db/[db_chain, accounts_cache], - utils, json, vm/[transaction_tracer, nvm_types], + utils, json, vm/[transaction_tracer, types], config, ../stateless/[witness_from_tree, witness_types] proc newAccessLogs*: AccessLogs = diff --git a/nimbus/vm/nvm_state_transactions.nim b/nimbus/vm/state_transactions.nim similarity index 98% rename from nimbus/vm/nvm_state_transactions.nim rename to nimbus/vm/state_transactions.nim index 22bbb1056..8627e3120 100644 --- a/nimbus/vm/nvm_state_transactions.nim +++ b/nimbus/vm/state_transactions.nim @@ -9,7 +9,7 @@ import options, sets, eth/common, chronicles, db/accounts_cache, transaction, - vm/[nvm_computation, nvm_interpreter, nvm_state, nvm_types] + vm/[computation, interpreter, state, types] proc validateTransaction*(vmState: BaseVMState, tx: Transaction, sender: EthAddress, fork: Fork): bool = let balance = vmState.readOnlyStateDB.getBalance(sender) diff --git a/nimbus/vm/transaction_tracer.nim b/nimbus/vm/transaction_tracer.nim index 89c4aede9..6b1ad2b9d 100644 --- a/nimbus/vm/transaction_tracer.nim +++ b/nimbus/vm/transaction_tracer.nim @@ -1,9 +1,9 @@ import json, strutils, sets, hashes, chronicles, nimcrypto, eth/common, stint, - vm/[nvm_types, nvm_memory, stack], db/accounts_cache, + vm/[types, memory, stack], db/accounts_cache, eth/trie/hexary, - vm/interpreter/nvm_opcode_values + vm/interpreter/opcode_values logScope: topics = "vm opcode" diff --git a/nimbus/vm/nvm_types.nim b/nimbus/vm/types.nim similarity index 96% rename from nimbus/vm/nvm_types.nim rename to nimbus/vm/types.nim index 8585dfe6a..4c4610a3a 100644 --- a/nimbus/vm/nvm_types.nim +++ b/nimbus/vm/types.nim @@ -11,8 +11,8 @@ import tables, eth/common, options, json, sets, - vm/[nvm_memory, stack, code_stream], - vm/interpreter/[nvm_gas_costs, nvm_opcode_values, nvm_forks], + vm/[memory, stack, code_stream], + vm/interpreter/[gas_costs, opcode_values, vm_forks], # TODO - will be hidden at a lower layer db/[db_chain, accounts_cache] diff --git a/nimbus/vm_computation.nim b/nimbus/vm_computation.nim index 76e2d88ae..be222385b 100644 --- a/nimbus/vm_computation.nim +++ b/nimbus/vm_computation.nim @@ -12,7 +12,7 @@ # The computation module suffers from a circular include/import dependency. # After fixing this wrapper should be re-factored. import - ./vm/nvm_computation as vmc + ./vm/computation as vmc export vmc.accountExists, diff --git a/nimbus/vm_forks.nim b/nimbus/vm_forks.nim index e4dec851b..4c43d866e 100644 --- a/nimbus/vm_forks.nim +++ b/nimbus/vm_forks.nim @@ -11,7 +11,7 @@ # This should really go into vm_types once the circular computation.nim # include/import dependency is solved import - ./vm/interpreter/nvm_forks as vmf + ./vm/interpreter/vm_forks as vmf export vmf.Fork diff --git a/nimbus/vm_gas_costs.nim b/nimbus/vm_gas_costs.nim index bdb3cecac..361790a2d 100644 --- a/nimbus/vm_gas_costs.nim +++ b/nimbus/vm_gas_costs.nim @@ -9,7 +9,7 @@ # according to those terms. import - ./vm/interpreter/nvm_gas_costs as vmg + ./vm/interpreter/gas_costs as vmg export vmg.Bls12381G1AddGas, diff --git a/nimbus/vm_interpreter.nim b/nimbus/vm_interpreter.nim index ddee3ac18..2b77986cd 100644 --- a/nimbus/vm_interpreter.nim +++ b/nimbus/vm_interpreter.nim @@ -13,7 +13,7 @@ # At the moment, this header file interface is only used for testing, so it # might be worth merging it into a vm_internals.nim (or so) header file. import - ./vm/nvm_interpreter as vmi + ./vm/interpreter as vmi export vmi diff --git a/nimbus/vm_memory.nim b/nimbus/vm_memory.nim index 573160e4a..61b83fa5e 100644 --- a/nimbus/vm_memory.nim +++ b/nimbus/vm_memory.nim @@ -13,7 +13,7 @@ # At the moment, this header file interface is only used for testing, so it # might be worth merging it into a vm_internals.nim (or so) header file. import - ./vm/nvm_memory as vmm + ./vm/memory as vmm export vmm.Memory, diff --git a/nimbus/vm_message.nim b/nimbus/vm_message.nim index c3511b212..edb4fac3a 100644 --- a/nimbus/vm_message.nim +++ b/nimbus/vm_message.nim @@ -10,7 +10,7 @@ # Should be considered part of another header file (e.h. vm_misc) import - ./vm/nvm_message as vmm + ./vm/message as vmm export vmm.isCreate diff --git a/nimbus/vm_opcode_values.nim b/nimbus/vm_opcode_values.nim index c5d358779..2f784abea 100644 --- a/nimbus/vm_opcode_values.nim +++ b/nimbus/vm_opcode_values.nim @@ -11,7 +11,7 @@ # At the moment, this header file interface is only used for testing, so it # might be worth merging it into a vm_internals.nim (or so) header file. import - ./vm/interpreter/nvm_opcode_values as vmo + ./vm/interpreter/opcode_values as vmo export vmo.Op diff --git a/nimbus/vm_precompiles.nim b/nimbus/vm_precompiles.nim index fa54caed5..72059497a 100644 --- a/nimbus/vm_precompiles.nim +++ b/nimbus/vm_precompiles.nim @@ -9,7 +9,7 @@ # according to those terms. import - ./vm/nvm_precompiles as vmp + ./vm/precompiles as vmp export vmp.PrecompileAddresses, diff --git a/nimbus/vm_state.nim b/nimbus/vm_state.nim index f13b4223e..a4ab18db2 100644 --- a/nimbus/vm_state.nim +++ b/nimbus/vm_state.nim @@ -9,7 +9,7 @@ # according to those terms. import - ./vm/nvm_state as vms + ./vm/state as vms export vms.`$`, diff --git a/nimbus/vm_state_transactions.nim b/nimbus/vm_state_transactions.nim index b0284f3aa..ae5da481f 100644 --- a/nimbus/vm_state_transactions.nim +++ b/nimbus/vm_state_transactions.nim @@ -9,7 +9,7 @@ # according to those terms. import - vm/nvm_state_transactions as vmx + vm/state_transactions as vmx export vmx.execComputation, diff --git a/nimbus/vm_types.nim b/nimbus/vm_types.nim index 76f6fb2e0..8e13a28cb 100644 --- a/nimbus/vm_types.nim +++ b/nimbus/vm_types.nim @@ -9,7 +9,7 @@ # according to those terms. import - ./vm/nvm_types as vmt + ./vm/types as vmt export vmt.AccessLogs, diff --git a/nimbus/vm_utils_numeric.nim b/nimbus/vm_utils_numeric.nim index 5d83a991e..62577ee12 100644 --- a/nimbus/vm_utils_numeric.nim +++ b/nimbus/vm_utils_numeric.nim @@ -11,7 +11,7 @@ # At the moment, this header file interface is only used for testing, so it # might be worth merging it into a vm_internals.nim (or so) header file. import - ./vm/interpreter/utils/nvm_utils_numeric as vmn + ./vm/interpreter/utils/utils_numeric as vmn export vmn.GasNatural,