EVM: Remove `vm_types2` everywhere, use common forks list instead

File `vm_types2` is obsolete.  Remove this file and divert all imports to the
common forks list outside the EVM, or in some cases they don't need it anyway.

Signed-off-by: Jamie Lokier <jamie@shareable.org>
This commit is contained in:
Jamie Lokier 2021-06-01 11:54:13 +01:00
parent 84269ddccf
commit aee0fe39d2
No known key found for this signature in database
GPG Key ID: CBC25C68435C30A2
13 changed files with 17 additions and 47 deletions

View File

@ -10,9 +10,7 @@
import
parseopt, strutils, macros, os, times, json, tables, stew/[byteutils],
chronos, eth/[keys, common, p2p, net/nat], chronicles, nimcrypto/hash,
eth/p2p/bootnodes, ./db/select_backend, eth/keys, ./chain_config
from ./vm_types2 import Fork
eth/p2p/bootnodes, ./db/select_backend, eth/keys, ./chain_config, ./forks
const
NimbusName* = "Nimbus"

View File

@ -3,8 +3,7 @@ import options, sets,
../db/[db_chain, accounts_cache],
../utils, ../constants, ../transaction,
../vm_state, ../vm_types,
../vm_types2,
./dao, ./validate, ../config,
./dao, ./validate, ../config, ../forks,
../transaction/call_evm

View File

@ -16,7 +16,7 @@ import
../utils/header,
../vm_state,
../vm_types,
../vm_types2,
../forks,
./validate/epoch_hash_cache,
chronicles,
eth/[common, rlp, trie/trie_defs],

View File

@ -8,7 +8,7 @@
import
./constants, ./errors, eth/[common, keys], ./utils,
stew/shims/macros,
./vm_types2, ./vm_gas_costs
./forks, ./vm_gas_costs
import eth/common/transaction as common_transaction
export common_transaction

View File

@ -8,9 +8,9 @@
import
eth/common/eth_types, stint, options, stew/ranges/ptr_arith,
".."/[vm_types, vm_types2, vm_state, vm_computation, vm_state_transactions],
".."/[db/accounts_cache, utils, vm_precompiles, vm_gas_costs],
".."/vm_internals,
".."/[vm_types, vm_state, vm_computation, vm_state_transactions],
".."/[vm_internals, vm_precompiles, vm_gas_costs],
".."/[db/accounts_cache, utils, forks],
./host_types
type

View File

@ -8,10 +8,9 @@
import
eth/common/eth_types, stint, options, stew/byteutils,
".."/[vm_types, vm_types2, vm_state, utils],
".."/[db/db_chain, config, rpc/hexstrings, utils],
".."/[db/accounts_cache, utils, transaction, vm_gas_costs], eth/trie/db,
".."/vm_internals,
".."/[vm_types, vm_state, vm_internals, vm_gas_costs, forks],
".."/[db/db_chain, db/accounts_cache, transaction], eth/trie/db,
".."/[config, utils, rpc/hexstrings],
./call_common
type

View File

@ -1,24 +0,0 @@
# 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.
# The following should really go into vm_types once the circular computation.nim
# include/import dependency is solved. The problem is with vm_types.nim which
# includes computation.nim.
when defined(evmc_enabled) or not defined(vm2_enabled):
import
./vm/interpreter/vm_forks as vmf
else:
import
./vm2/interpreter/forks_list as vmf
export
vmf.Fork
# End

View File

@ -6,10 +6,10 @@ import
import
options, json, os, eth/trie/[db, hexary],
../nimbus/db/[db_chain, accounts_cache],
../nimbus/[vm_types2, vm_internals],
../nimbus/vm_internals,
../nimbus/transaction/call_evm
export vm_types2, byteutils
export byteutils
{.experimental: "dynamicBindSym".}
# backported from Nim 0.19.9

View File

@ -12,7 +12,7 @@ import
stew/endians2, nimcrypto,
./test_helpers, ./test_allowed_to_fail,
../premix/parser, test_config,
../nimbus/[vm_state, utils, vm_types, errors, transaction, constants, vm_types2],
../nimbus/[vm_state, utils, vm_types, errors, transaction, constants, forks],
../nimbus/db/[db_chain, accounts_cache],
../nimbus/utils/header,
../nimbus/p2p/[executor, validate],

View File

@ -1,6 +1,6 @@
import
parseopt, strutils,
../nimbus/vm_types2
../nimbus/forks
type
ConfigStatus* = enum

View File

@ -1,8 +1,7 @@
import unittest2, strutils, tables, os, json,
../nimbus/utils/difficulty, stint, times,
eth/common, test_helpers, stew/byteutils,
../nimbus/constants, ../nimbus/vm_types2,
../nimbus/config
../nimbus/constants, ../nimbus/config
type
Tester = object

View File

@ -9,8 +9,7 @@ import
os, macros, json, strformat, strutils, parseutils, os, tables,
stew/byteutils, net, eth/[common, keys, rlp, p2p], unittest2,
testutils/markdown_reports,
../nimbus/[constants, config, transaction, utils, errors],
../nimbus/vm_types2,
../nimbus/[constants, config, transaction, utils, errors, forks],
../nimbus/db/accounts_cache,
../nimbus/random_keys

View File

@ -8,7 +8,7 @@
import
unittest2, ../nimbus/vm_precompiles, json, stew/byteutils, test_helpers, os, tables,
strformat, strutils, eth/trie/db, eth/common, ../nimbus/db/db_chain, ../nimbus/constants,
../nimbus/[vm_computation, vm_state, vm_types2], macros,
../nimbus/[vm_computation, vm_state, forks], macros,
test_allowed_to_fail,
../nimbus/transaction/call_evm, options