renamed types.nim, vm_fork.nim, opcode_values.nim => v2*.nim
why: these files provide part of the externally accessible interface provided by vm_types*.nim. so the new filename indicates that the source code belongs to vm2 (rather than vm).
This commit is contained in:
parent
cf2d771c4d
commit
7b6767c4a3
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import
|
||||
chronicles, strformat, eth/common, # GasInt
|
||||
../../errors, ../types
|
||||
../../errors, ../v2types
|
||||
|
||||
logScope:
|
||||
topics = "vm gas"
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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]
|
||||
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue