provide vm_forks as import/export wrapper
details: moved original vm/interpreter/vm_forks.nim => vm/interpreter/nvm_forks.nim
This commit is contained in:
parent
907465300f
commit
3a3e4d5707
|
@ -12,7 +12,7 @@ import
|
|||
chronos, eth/[keys, common, p2p, net/nat], chronicles, nimcrypto/hash,
|
||||
eth/p2p/bootnodes, eth/p2p/rlpx_protocols/whisper_protocol,
|
||||
./db/select_backend, eth/keys,
|
||||
./vm/interpreter/vm_forks
|
||||
./vm_forks
|
||||
|
||||
const
|
||||
NimbusName* = "Nimbus"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import ../db/db_chain, eth/common, chronicles, ../vm_state, ../vm_types,
|
||||
../vm/[computation, message], ../vm/interpreter/vm_forks, stint, nimcrypto,
|
||||
../vm/[computation, message], ./vm_forks, stint, nimcrypto,
|
||||
../utils, eth/trie/db, ./executor, ../config, ../genesis, ../utils,
|
||||
stew/endians2
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import options, sets,
|
|||
../utils, ../constants, ../transaction,
|
||||
../vm_state, ../vm_types, ../vm_state_transactions,
|
||||
../vm/[computation, message, precompiles],
|
||||
../vm/interpreter/vm_forks,
|
||||
./vm_forks,
|
||||
./dao, ../config
|
||||
|
||||
proc processTransaction*(tx: Transaction, sender: EthAddress, vmState: BaseVMState, fork: Fork): GasInt =
|
||||
|
|
|
@ -15,7 +15,7 @@ import
|
|||
../transaction, ../config, ../vm_state, ../constants, ../vm_types,
|
||||
../utils, ../db/[db_chain, state_db],
|
||||
rpc_types, rpc_utils, ../vm/[message, computation],
|
||||
../vm/interpreter/vm_forks
|
||||
../vm_forks
|
||||
|
||||
#[
|
||||
Note:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
import hexstrings, eth/[common, rlp, keys, trie/db], stew/byteutils, nimcrypto,
|
||||
../db/[db_chain, accounts_cache], strutils, algorithm, options, times, json,
|
||||
../constants, stint, hexstrings, rpc_types, ../config,
|
||||
../vm_state_transactions, ../vm_state, ../vm_types, ../vm/interpreter/vm_forks,
|
||||
../vm_state_transactions, ../vm_state, ../vm_types, ../vm_forks,
|
||||
../vm/computation, ../p2p/executor, ../utils, ../transaction
|
||||
|
||||
type
|
||||
|
|
|
@ -3,7 +3,7 @@ import
|
|||
constants, vm_state, vm_types, transaction, p2p/executor,
|
||||
eth/trie/db, nimcrypto, strutils,
|
||||
chronicles, rpc/hexstrings, launcher,
|
||||
vm/interpreter/vm_forks, ./config
|
||||
./vm_forks, ./config
|
||||
|
||||
when defined(geth):
|
||||
import db/geth_db
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import
|
||||
constants, errors, eth/[common, keys], utils,
|
||||
./vm/interpreter/[vm_forks, gas_costs], constants
|
||||
./vm_forks, ./vm/interpreter/gas_costs, constants
|
||||
|
||||
import eth/common/transaction as common_transaction
|
||||
export common_transaction
|
||||
|
|
|
@ -9,7 +9,7 @@ import
|
|||
chronicles, strformat, macros, options, times,
|
||||
sets, eth/[common, keys],
|
||||
constants, errors,
|
||||
vm/interpreter/[opcode_values, gas_meter, gas_costs, vm_forks],
|
||||
vm/interpreter/[opcode_values, gas_meter, gas_costs, nvm_forks],
|
||||
vm/[code_stream, memory, message, stack, nvm_types, nvm_state],
|
||||
db/[accounts_cache, db_chain],
|
||||
utils/header, precompiles,
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
import
|
||||
vm/interpreter/[opcode_values, gas_meter, vm_forks]
|
||||
vm/interpreter/[opcode_values, gas_meter, nvm_forks]
|
||||
|
||||
import # Used in vm_types. Beware of recursive dependencies
|
||||
vm/[code_stream, computation, stack, message]
|
||||
|
||||
export
|
||||
opcode_values, gas_meter,
|
||||
vm_forks
|
||||
nvm_forks
|
||||
|
||||
export
|
||||
code_stream, computation, stack, message
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import
|
||||
math, eth/common/eth_types,
|
||||
vm/interpreter/utils/[macros_gen_opcodes, utils_numeric],
|
||||
vm/interpreter/[opcode_values, vm_forks], errors
|
||||
vm/interpreter/[opcode_values, nvm_forks], errors
|
||||
|
||||
when defined(evmc_enabled):
|
||||
import evmc/evmc
|
||||
|
|
|
@ -9,7 +9,7 @@ import
|
|||
strformat, times, sets, sequtils, options,
|
||||
chronicles, stint, nimcrypto, stew/ranges/ptr_arith, eth/common,
|
||||
vm/interpreter/utils/[macros_procs_opcodes, utils_numeric],
|
||||
vm/interpreter/[gas_meter, gas_costs, opcode_values, vm_forks],
|
||||
vm/interpreter/[gas_meter, gas_costs, opcode_values, nvm_forks],
|
||||
vm/[memory, stack, code_stream, computation, nvm_state, nvm_types],
|
||||
errors, constants,
|
||||
db/[db_chain, accounts_cache]
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import
|
||||
tables, macros,
|
||||
chronicles,
|
||||
vm/interpreter/[opcode_values, opcodes_impl, vm_forks, gas_costs, gas_meter, utils/macros_gen_opcodes],
|
||||
vm/interpreter/[opcode_values, opcodes_impl, nvm_forks, gas_costs, gas_meter, utils/macros_gen_opcodes],
|
||||
vm/code_stream, vm/nvm_types, errors, precompiles, vm/stack,
|
||||
terminal # Those are only needed for logging
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
import
|
||||
macros, strformat, tables, sets, options,
|
||||
eth/[common, keys, rlp], nimcrypto/keccak,
|
||||
vm/interpreter/[vm_forks, gas_costs], errors,
|
||||
vm/interpreter/[nvm_forks, gas_costs], errors,
|
||||
constants, db/[db_chain, accounts_cache],
|
||||
utils, json, vm/[transaction_tracer, nvm_types],
|
||||
config, ../stateless/[witness_from_tree, witness_types]
|
||||
|
|
|
@ -12,7 +12,7 @@ import
|
|||
tables, eth/common,
|
||||
options, json, sets,
|
||||
vm/[memory, stack, code_stream],
|
||||
vm/interpreter/[gas_costs, opcode_values, vm_forks],
|
||||
vm/interpreter/[gas_costs, opcode_values, nvm_forks],
|
||||
# TODO - will be hidden at a lower layer
|
||||
db/[db_chain, accounts_cache]
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import
|
||||
vm/nvm_types,
|
||||
vm/interpreter/[gas_meter, gas_costs, utils/utils_numeric, vm_forks],
|
||||
vm/interpreter/[gas_meter, gas_costs, utils/utils_numeric, nvm_forks],
|
||||
errors, stint, eth/[keys, common], chronicles, tables, macros,
|
||||
math, nimcrypto, bncurve/[fields, groups], vm/blake2b_f, vm/blscurve
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
# Nimbus
|
||||
# Copyright (c) 2018 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
||||
# http://www.apache.org/licenses/LICENSE-2.0)
|
||||
# * 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.
|
||||
|
||||
# This should really go into vm_types once the circular computation.nim
|
||||
# include/import dependency is solved
|
||||
import
|
||||
./vm/interpreter/nvm_forks as vmf
|
||||
|
||||
export
|
||||
vmf.Fork
|
||||
|
||||
# End
|
|
@ -8,8 +8,7 @@ import
|
|||
options, json, os, eth/trie/[db, hexary],
|
||||
../nimbus/[vm_state, vm_types, transaction, utils],
|
||||
../nimbus/db/[db_chain, accounts_cache],
|
||||
../nimbus/vm_state_transactions,
|
||||
../nimbus/vm/interpreter/vm_forks,
|
||||
../nimbus/[vm_state_transactions, vm_forks],
|
||||
../nimbus/vm/[message, computation, memory]
|
||||
|
||||
export opcode_values, byteutils
|
||||
|
|
|
@ -12,8 +12,7 @@ import
|
|||
ethash, stew/endians2, nimcrypto,
|
||||
./test_helpers, ./test_allowed_to_fail,
|
||||
../premix/parser, test_config,
|
||||
../nimbus/vm/interpreter/vm_forks,
|
||||
../nimbus/[vm_state, utils, vm_types, errors, transaction, constants],
|
||||
../nimbus/[vm_state, utils, vm_types, errors, transaction, constants, vm_forks],
|
||||
../nimbus/db/[db_chain, accounts_cache],
|
||||
../nimbus/utils/header,
|
||||
../nimbus/p2p/[executor, dao],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import
|
||||
parseopt, strutils,
|
||||
../nimbus/vm/interpreter/vm_forks
|
||||
../nimbus/vm_forks
|
||||
|
||||
type
|
||||
ConfigStatus* = enum
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import unittest2, strutils, tables, os, json,
|
||||
../nimbus/utils/difficulty, stint, times,
|
||||
eth/common, test_helpers, stew/byteutils,
|
||||
../nimbus/constants, ../nimbus/vm/interpreter/vm_forks,
|
||||
../nimbus/constants, ../nimbus/vm_forks,
|
||||
../nimbus/config
|
||||
|
||||
type
|
||||
|
|
|
@ -10,7 +10,7 @@ import
|
|||
stew/byteutils, net, eth/[common, keys, rlp, p2p], unittest2,
|
||||
testutils/markdown_reports,
|
||||
../nimbus/[config, transaction, utils, errors],
|
||||
../nimbus/vm/interpreter/vm_forks,
|
||||
../nimbus/vm_forks,
|
||||
../nimbus/db/accounts_cache,
|
||||
../nimbus/random_keys
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
import
|
||||
unittest2, ../nimbus/vm/precompiles, json, stew/byteutils, test_helpers, os, tables,
|
||||
strformat, strutils, eth/trie/db, eth/common, ../nimbus/db/db_chain,
|
||||
../nimbus/[vm_types, vm_state], ../nimbus/vm/computation, macros,
|
||||
../nimbus/vm/interpreter/vm_forks, test_allowed_to_fail
|
||||
../nimbus/[vm_types, vm_state, vm_forks], ../nimbus/vm/computation, macros,
|
||||
test_allowed_to_fail
|
||||
|
||||
proc initAddress(i: byte): EthAddress = result[19] = i
|
||||
|
||||
|
|
Loading…
Reference in New Issue