mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-25 10:25:32 +00:00
renamed computation.nim, memory.nim, utils_numeric.nim, interpreter.nim => v2*.nim
why: these files provide part of the externally accessible interface provided by vm_cpmputation.nim, vm_internals.nim. so the new filename indicates that the source code belongs to vm2 (rather than vm).
This commit is contained in:
parent
2ca9621799
commit
e02c6d4c3d
@ -8,9 +8,9 @@
|
|||||||
import
|
import
|
||||||
strformat, times, sets, sequtils, options,
|
strformat, times, sets, sequtils, options,
|
||||||
chronicles, stint, nimcrypto, stew/ranges/ptr_arith, eth/common,
|
chronicles, stint, nimcrypto, stew/ranges/ptr_arith, eth/common,
|
||||||
./utils/[macros_procs_opcodes, utils_numeric],
|
./utils/[macros_procs_opcodes, v2utils_numeric],
|
||||||
./gas_meter, ./v2gas_costs, ./v2opcode_values, ./v2forks,
|
./gas_meter, ./v2gas_costs, ./v2opcode_values, ./v2forks,
|
||||||
../memory, ../stack, ../code_stream, ../computation, ../v2state, ../v2types,
|
../v2memory, ../stack, ../code_stream, ../v2computation, ../v2state, ../v2types,
|
||||||
../../errors, ../../constants,
|
../../errors, ../../constants,
|
||||||
../../db/[db_chain, accounts_cache]
|
../../db/[db_chain, accounts_cache]
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
import
|
import
|
||||||
macros, strformat, stint, eth/common,
|
macros, strformat, stint, eth/common,
|
||||||
../../computation, ../../stack, ../../code_stream, ../../memory,
|
../../v2computation, ../../stack, ../../code_stream, ../../v2memory,
|
||||||
../../v2types, ../../../errors, ../gas_meter, ../v2opcode_values,
|
../../v2types, ../../../errors, ../gas_meter, ../v2opcode_values,
|
||||||
./utils_numeric
|
./v2utils_numeric
|
||||||
|
|
||||||
proc pop(tree: var NimNode): NimNode =
|
proc pop(tree: var NimNode): NimNode =
|
||||||
## Returns the last value of a NimNode and remove it
|
## Returns the last value of a NimNode and remove it
|
||||||
|
@ -12,7 +12,7 @@ when defined(evmc_enabled):
|
|||||||
|
|
||||||
import
|
import
|
||||||
math, eth/common/eth_types,
|
math, eth/common/eth_types,
|
||||||
./utils/[macros_gen_opcodes, utils_numeric],
|
./utils/[macros_gen_opcodes, v2utils_numeric],
|
||||||
./v2opcode_values, ./v2forks, ../../errors
|
./v2opcode_values, ./v2forks, ../../errors
|
||||||
|
|
||||||
# Gas Fee Schedule
|
# Gas Fee Schedule
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import
|
import
|
||||||
json, strutils, sets, hashes,
|
json, strutils, sets, hashes,
|
||||||
chronicles, nimcrypto, eth/common, stint,
|
chronicles, nimcrypto, eth/common, stint,
|
||||||
./v2types, ./memory, ./stack, ../db/accounts_cache,
|
./v2types, ./v2memory, ./stack, ../db/accounts_cache,
|
||||||
eth/trie/hexary,
|
eth/trie/hexary,
|
||||||
./interpreter/v2opcode_values
|
./interpreter/v2opcode_values
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ import
|
|||||||
sets, eth/[common, keys],
|
sets, eth/[common, keys],
|
||||||
../constants, ../errors,
|
../constants, ../errors,
|
||||||
./interpreter/[v2opcode_values, gas_meter, v2gas_costs, v2forks],
|
./interpreter/[v2opcode_values, gas_meter, v2gas_costs, v2forks],
|
||||||
./code_stream, ./memory, ./v2message, ./stack, ./v2types, ./v2state,
|
./code_stream, ./v2memory, ./v2message, ./stack, ./v2types, ./v2state,
|
||||||
../db/[accounts_cache, db_chain],
|
../db/[accounts_cache, db_chain],
|
||||||
../utils/header, ./v2precompiles,
|
../utils/header, ./v2precompiles,
|
||||||
./transaction_tracer, ../utils
|
./transaction_tracer, ../utils
|
@ -38,7 +38,7 @@ export
|
|||||||
|
|
||||||
# see vm_computation
|
# see vm_computation
|
||||||
import
|
import
|
||||||
./computation as vmc
|
./v2computation as vmc
|
||||||
export
|
export
|
||||||
vmc.accountExists,
|
vmc.accountExists,
|
||||||
vmc.addLogEntry,
|
vmc.addLogEntry,
|
@ -14,7 +14,7 @@ import
|
|||||||
sequtils,
|
sequtils,
|
||||||
chronicles, eth/common/eth_types,
|
chronicles, eth/common/eth_types,
|
||||||
../errors, ../validation,
|
../errors, ../validation,
|
||||||
./interpreter/utils/utils_numeric
|
./interpreter/utils/v2utils_numeric
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "vm memory"
|
topics = "vm memory"
|
@ -15,7 +15,7 @@ when defined(evmc_enabled):
|
|||||||
|
|
||||||
import
|
import
|
||||||
./v2types,
|
./v2types,
|
||||||
./interpreter/[gas_meter, v2gas_costs, utils/utils_numeric, v2forks],
|
./interpreter/[gas_meter, v2gas_costs, utils/v2utils_numeric, v2forks],
|
||||||
../errors, stint, eth/[keys, common], chronicles, tables, macros,
|
../errors, stint, eth/[keys, common], chronicles, tables, macros,
|
||||||
math, nimcrypto, bncurve/[fields, groups], ./blake2b_f, ./blscurve
|
math, nimcrypto, bncurve/[fields, groups], ./blake2b_f, ./blscurve
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import
|
|||||||
options, sets,
|
options, sets,
|
||||||
eth/common, chronicles, ../db/accounts_cache,
|
eth/common, chronicles, ../db/accounts_cache,
|
||||||
../transaction,
|
../transaction,
|
||||||
./computation, ./interpreter, ./v2state, ./v2types
|
./v2computation, ./v2interpreter, ./v2state, ./v2types
|
||||||
|
|
||||||
proc setupComputation*(vmState: BaseVMState, tx: Transaction, sender: EthAddress, fork: Fork) : Computation =
|
proc setupComputation*(vmState: BaseVMState, tx: Transaction, sender: EthAddress, fork: Fork) : Computation =
|
||||||
var gas = tx.gasLimit - tx.intrinsicGas(fork)
|
var gas = tx.gasLimit - tx.intrinsicGas(fork)
|
||||||
|
@ -16,7 +16,7 @@ when defined(evmc_enabled):
|
|||||||
import
|
import
|
||||||
tables, eth/common,
|
tables, eth/common,
|
||||||
options, json, sets,
|
options, json, sets,
|
||||||
./memory, ./stack, ./code_stream,
|
./v2memory, ./stack, ./code_stream,
|
||||||
./interpreter/[v2gas_costs, v2opcode_values, v2forks],
|
./interpreter/[v2gas_costs, v2opcode_values, v2forks],
|
||||||
# TODO - will be hidden at a lower layer
|
# TODO - will be hidden at a lower layer
|
||||||
../db/[db_chain, accounts_cache]
|
../db/[db_chain, accounts_cache]
|
||||||
|
@ -16,7 +16,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled):
|
|||||||
./vm/computation as vmc
|
./vm/computation as vmc
|
||||||
else:
|
else:
|
||||||
import
|
import
|
||||||
./vm2/computation as vmc
|
./vm2/v2computation as vmc
|
||||||
|
|
||||||
export
|
export
|
||||||
vmc.accountExists,
|
vmc.accountExists,
|
||||||
|
@ -15,7 +15,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled):
|
|||||||
./vm/memory as vmm
|
./vm/memory as vmm
|
||||||
else:
|
else:
|
||||||
import
|
import
|
||||||
./vm2/memory as vmm
|
./vm2/v2memory as vmm
|
||||||
|
|
||||||
export
|
export
|
||||||
vmm.Memory,
|
vmm.Memory,
|
||||||
@ -35,7 +35,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled):
|
|||||||
./vm/interpreter/utils/utils_numeric as vmn
|
./vm/interpreter/utils/utils_numeric as vmn
|
||||||
else:
|
else:
|
||||||
import
|
import
|
||||||
./vm2/interpreter/utils/utils_numeric as vmn
|
./vm2/interpreter/utils/v2utils_numeric as vmn
|
||||||
|
|
||||||
|
|
||||||
export
|
export
|
||||||
@ -59,7 +59,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled):
|
|||||||
./vm/interpreter as vmi
|
./vm/interpreter as vmi
|
||||||
else:
|
else:
|
||||||
import
|
import
|
||||||
./vm2/interpreter as vmi
|
./vm2/v2interpreter as vmi
|
||||||
|
|
||||||
export
|
export
|
||||||
vmi
|
vmi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user