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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,10 +8,9 @@
import import
eth/common/eth_types, stint, options, stew/byteutils, eth/common/eth_types, stint, options, stew/byteutils,
".."/[vm_types, vm_types2, vm_state, utils], ".."/[vm_types, vm_state, vm_internals, vm_gas_costs, forks],
".."/[db/db_chain, config, rpc/hexstrings, utils], ".."/[db/db_chain, db/accounts_cache, transaction], eth/trie/db,
".."/[db/accounts_cache, utils, transaction, vm_gas_costs], eth/trie/db, ".."/[config, utils, rpc/hexstrings],
".."/vm_internals,
./call_common ./call_common
type 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 import
options, json, os, eth/trie/[db, hexary], options, json, os, eth/trie/[db, hexary],
../nimbus/db/[db_chain, accounts_cache], ../nimbus/db/[db_chain, accounts_cache],
../nimbus/[vm_types2, vm_internals], ../nimbus/vm_internals,
../nimbus/transaction/call_evm ../nimbus/transaction/call_evm
export vm_types2, byteutils export byteutils
{.experimental: "dynamicBindSym".} {.experimental: "dynamicBindSym".}
# backported from Nim 0.19.9 # backported from Nim 0.19.9

View File

@ -12,7 +12,7 @@ import
stew/endians2, nimcrypto, stew/endians2, nimcrypto,
./test_helpers, ./test_allowed_to_fail, ./test_helpers, ./test_allowed_to_fail,
../premix/parser, test_config, ../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/db/[db_chain, accounts_cache],
../nimbus/utils/header, ../nimbus/utils/header,
../nimbus/p2p/[executor, validate], ../nimbus/p2p/[executor, validate],

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@
import import
unittest2, ../nimbus/vm_precompiles, json, stew/byteutils, test_helpers, os, tables, unittest2, ../nimbus/vm_precompiles, json, stew/byteutils, test_helpers, os, tables,
strformat, strutils, eth/trie/db, eth/common, ../nimbus/db/db_chain, ../nimbus/constants, 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, test_allowed_to_fail,
../nimbus/transaction/call_evm, options ../nimbus/transaction/call_evm, options