renamed nvm_ prefixed modules to its original names

why:
  the nvm_ prefix was used inside the vm folder to hide them temporarily
  from the outside world while writing export wrappers. now all
  functionality is accessed via vm_*, rather than vm/* imports.

todo:
  at a later stage the import headers of the vm modules need to get fixed
  to meet style guide standards (as jacek kindly pointed out.)
This commit is contained in:
Jordan Hrycaj 2021-03-31 17:17:46 +01:00
parent 474bd9e910
commit 9e365734e6
No known key found for this signature in database
GPG Key ID: 4101B9BC5A0DB080
30 changed files with 42 additions and 42 deletions

View File

@ -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"

View File

@ -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):

View File

@ -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,

View File

@ -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

View File

@ -7,7 +7,7 @@
import
chronicles, strformat, eth/common, # GasInt
errors, vm/nvm_types
errors, vm/types
logScope:
topics = "vm gas"

View File

@ -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]

View File

@ -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

View File

@ -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:

View File

@ -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"

View File

@ -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}

View File

@ -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

View File

@ -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 =

View File

@ -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)

View File

@ -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"

View File

@ -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]

View File

@ -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,

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -9,7 +9,7 @@
# according to those terms.
import
./vm/nvm_precompiles as vmp
./vm/precompiles as vmp
export
vmp.PrecompileAddresses,

View File

@ -9,7 +9,7 @@
# according to those terms.
import
./vm/nvm_state as vms
./vm/state as vms
export
vms.`$`,

View File

@ -9,7 +9,7 @@
# according to those terms.
import
vm/nvm_state_transactions as vmx
vm/state_transactions as vmx
export
vmx.execComputation,

View File

@ -9,7 +9,7 @@
# according to those terms.
import
./vm/nvm_types as vmt
./vm/types as vmt
export
vmt.AccessLogs,

View File

@ -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,