Use nim-eth (#224)

This commit is contained in:
Yuriy Glukhov 2019-02-05 20:15:50 +01:00 committed by Mamy Ratsimbazafy
parent 2bc880d395
commit 481c6cf4ed
71 changed files with 103 additions and 115 deletions

View File

@ -38,12 +38,10 @@ GITHUB_REPOS := \
status-im/nim-chronicles \
cheatfate/nimcrypto \
status-im/nim-ranges \
status-im/nim-rlp \
status-im/nim-stint \
status-im/nim-rocksdb \
status-im/nim-eth-trie \
status-im/nim-eth \
status-im/nim-byteutils \
status-im/nim-eth-common \
status-im/nim-http-utils \
status-im/nim-asyncdispatch2 \
status-im/nim-json-rpc \
@ -54,10 +52,6 @@ GITHUB_REPOS := \
zah/nim-package-visible-types \
status-im/nim-secp256k1 \
jangko/snappy \
status-im/nim-eth-keys \
status-im/nim-eth-p2p \
status-im/nim-eth-keyfile \
status-im/nim-eth-bloom \
status-im/nim-bncurve \
status-im/nim-confutils \
status-im/nim-beacon-chain

View File

@ -9,21 +9,15 @@ skipDirs = @["tests", "examples"]
# we can't have the result of a custom task in the "bin" var - https://github.com/nim-lang/nimble/issues/542
# bin = @["build/nimbus"]
requires "nim >= 0.18.1",
requires "nim >= 0.19",
"chronicles",
"nimcrypto",
"rlp",
"stint",
"rocksdb",
"eth_trie",
"eth_common",
"json_rpc",
"asyncdispatch2",
"eth_p2p",
"eth_keyfile",
"eth_keys",
"eth_bloom",
"bncurve"
"bncurve",
"https://github.com/status-im/nim-eth",
"std_shims"
proc buildBinary(name: string, srcDir = ".", lang = "c") =
if not dirExists "build": mkDir "build"

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
eth_common,
eth/common,
./constants
type

View File

@ -9,7 +9,7 @@
import
parseopt, strutils, macros, os, times,
asyncdispatch2, eth_keys, eth_p2p, eth_common, chronicles, nimcrypto/hash,
asyncdispatch2, eth/[keys, common, p2p], chronicles, nimcrypto/hash,
./db/select_backend,
./vm/interpreter/vm_forks

View File

@ -1,5 +1,5 @@
import
math, strutils, eth_common, nimcrypto/hash
math, strutils, eth/common, nimcrypto/hash
proc default(t: typedesc): t = discard

View File

@ -1,4 +1,4 @@
import eth_trie/db, ranges
import eth/trie/db, ranges
type
CaptureFlags* {.pure.} = enum

View File

@ -7,7 +7,7 @@
import
tables, sequtils, algorithm,
rlp, ranges, state_db, nimcrypto, eth_trie/[hexary, db], eth_common, byteutils, chronicles,
ranges, state_db, nimcrypto, eth/trie/[hexary, db], eth/[common, rlp], byteutils, chronicles,
../errors, ../block_types, ../utils/header, ../constants, ./storage_types
type

View File

@ -10,10 +10,10 @@ const
dbBackend = parseEnum[DbBackend](nimbus_db_backend)
when dbBackend == sqlite:
import eth_trie/backends/sqlite_backend as database_backend
import eth/trie/backends/sqlite_backend as database_backend
elif dbBackend == rocksdb:
import eth_trie/backends/rocksdb_backend as database_backend
import eth/trie/backends/rocksdb_backend as database_backend
elif dbBackend == lmdb:
import eth_trie/backends/lmdb_backend as database_backend
import eth/trie/backends/lmdb_backend as database_backend
export database_backend

View File

@ -7,7 +7,7 @@
import
sequtils, strformat, tables,
chronicles, eth_common, nimcrypto, rlp, eth_trie/[hexary, db],
chronicles, eth/[common, rlp], nimcrypto, eth/trie/[hexary, db],
../constants, ../errors, ../validation,
storage_types

View File

@ -1,5 +1,5 @@
import
hashes, eth_common
hashes, eth/common
type
DBKeyKind* = enum

View File

@ -1,7 +1,7 @@
import
times, tables,
eth_common, stint, byteutils, rlp, ranges, block_types, nimcrypto,
chronicles, eth_trie, eth_trie/db,
eth/[common, rlp, trie], stint, byteutils, ranges, block_types, nimcrypto,
chronicles, eth/trie/db,
db/[db_chain, state_db], genesis_alloc, config, constants
type

View File

@ -8,12 +8,13 @@
# those terms.
import
os, strutils, net, eth_common, db/[storage_types, db_chain, select_backend],
asyncdispatch2, json_rpc/rpcserver, eth_keys, chronicles,
eth_p2p, eth_p2p/rlpx_protocols/[eth_protocol, les_protocol],
eth_p2p/blockchain_sync,
os, strutils, net, eth/keys, db/[storage_types, db_chain, select_backend],
eth/common as eth_common, eth/p2p as eth_p2p,
asyncdispatch2, json_rpc/rpcserver, chronicles,
eth/p2p/rlpx_protocols/[eth_protocol, les_protocol],
eth/p2p/blockchain_sync,
config, genesis, rpc/[common, p2p, debug, whisper], p2p/chain,
eth_trie/db
eth/trie/db
## TODO:
## * No IPv6 support

View File

@ -1,6 +1,6 @@
import ../db/[db_chain, state_db], eth_common, chronicles, ../vm_state, ../vm_types, ../transaction, ranges,
import ../db/[db_chain, state_db], eth/common, chronicles, ../vm_state, ../vm_types, ../transaction, ranges,
../vm/[computation, interpreter_dispatch, message], ../constants, stint, nimcrypto,
../vm_state_transactions, sugar, ../utils, eth_trie/db, ../tracer, ./executor
../vm_state_transactions, sugar, ../utils, eth/trie/db, ../tracer, ./executor
type
Chain* = ref object of AbstractChainDB

View File

@ -1,5 +1,5 @@
import options,
eth_common, ranges, chronicles, eth_bloom, nimcrypto,
eth/[common, bloom], ranges, chronicles, nimcrypto,
../db/[db_chain, state_db],
../utils, ../constants, ../transaction,
../vm_state, ../vm_types, ../vm_state_transactions,
@ -111,9 +111,9 @@ proc processTransaction*(t: Transaction, sender: EthAddress, vmState: BaseVMStat
type
# TODO: these types need to be removed
# once eth_bloom and eth_common sync'ed
Bloom = eth_common.BloomFilter
LogsBloom = eth_bloom.BloomFilter
# once eth/bloom and eth/common sync'ed
Bloom = common.BloomFilter
LogsBloom = bloom.BloomFilter
# TODO: move these three receipt procs below somewhere else more appropriate
func logsBloom(logs: openArray[Log]): LogsBloom =

View File

@ -9,7 +9,7 @@
import
strutils,
nimcrypto, eth_common, stint, json_rpc/server,
nimcrypto, eth/common as eth_common, stint, json_rpc/server,
../vm_state, ../db/[db_chain, state_db], ../constants, ../config, hexstrings
proc setupCommonRPC*(server: RpcServer) =

View File

@ -9,7 +9,7 @@
import
strutils, json, options,
json_rpc/rpcserver, rpc_utils, eth_common,
json_rpc/rpcserver, rpc_utils, eth/common,
hexstrings, ../tracer, ../vm_state, ../vm_types,
../db/[db_chain, storage_types]

View File

@ -22,7 +22,7 @@
* ref BloomFilter
]#
import eth_common/eth_types, stint, byteutils, nimcrypto
import eth/common/eth_types, stint, byteutils, nimcrypto
type
HexQuantityStr* = distinct string

View File

@ -10,7 +10,7 @@
import
strutils, times, options,
nimcrypto, json_rpc/rpcserver, hexstrings, stint, byteutils, ranges/typedranges,
eth_common, eth_p2p, eth_keys, eth_trie/db, rlp,
eth/[common, keys, rlp, p2p], eth/trie/db,
../utils/header, ../transaction, ../config, ../vm_state, ../constants, ../vm_types,
../vm_state_transactions, ../utils/addresses,
../db/[db_chain, state_db, storage_types],

View File

@ -1,4 +1,4 @@
import eth_common, hexstrings, options
import eth/common, hexstrings, options
#[
Notes:
@ -38,7 +38,7 @@ type
data*: Option[EthHashStr] # (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI.
## A block object, or null when no block was found
## Note that this includes slightly different information from eth_common.BlockHeader
## Note that this includes slightly different information from eth/common.BlockHeader
BlockObject* = object
# Returned to user
number*: Option[BlockNumber] # the block number. null when its pending block.

View File

@ -7,7 +7,7 @@
# This file may not be copied, modified, or distributed except according to
# those terms.
import hexstrings, nimcrypto, eth_common, byteutils,
import hexstrings, nimcrypto, eth/common, byteutils,
../db/[db_chain, state_db, storage_types], strutils,
../constants, stint

View File

@ -1,4 +1,4 @@
import json_rpc/rpcserver, rpc_types, stint, hexstrings, eth_common
import json_rpc/rpcserver, rpc_types, stint, hexstrings, eth/common
proc setupWhisperRPC*(rpcsrv: RpcServer) =
rpcsrv.rpc("shh_version") do() -> string:

View File

@ -1,7 +1,7 @@
import
db/[db_chain, state_db, capturedb], eth_common, utils, json,
db/[db_chain, state_db, capturedb], eth/common, utils, json,
constants, vm_state, vm_types, transaction, p2p/executor,
eth_trie/db, nimcrypto, strutils, ranges, ./utils/addresses,
eth/trie/db, nimcrypto, strutils, ranges, ./utils/addresses,
chronicles, rpc/hexstrings, launcher
proc getParentHeader(self: BaseChainDB, header: BlockHeader): BlockHeader =

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
constants, errors, eth_common, eth_keys, nimcrypto, rlp
constants, errors, eth/[common, rlp, keys], nimcrypto
proc initTransaction*(nonce: AccountNonce, gasPrice, gasLimit: GasInt, to: EthAddress,
value: UInt256, payload: Blob, V: byte, R, S: UInt256, isContractCreation = false): Transaction =

View File

@ -1,4 +1,4 @@
import eth_trie/db, eth_trie, rlp, eth_common
import eth/trie/db, eth/[trie, rlp, common]
proc calcRootHash[T](items: openArray[T]): Hash256 =
var tr = initHexaryTrie(newMemoryDB())

View File

@ -1,4 +1,4 @@
import nimcrypto, eth_common, rlp
import nimcrypto, eth/[common, rlp]
func generateAddress*(address: EthAddress, nonce: AccountNonce): EthAddress =
result[0..19] = keccak256.digest(rlp.encodeList(address, nonce)).data.toOpenArray(12, 31)

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import eth_common, ../constants, strformat, times, ../validation, rlp
import eth/[common, rlp], ../constants, strformat, times, ../validation
export BlockHeader
@ -94,6 +94,6 @@ proc generateHeaderFromParentHeader*(
import nimcrypto
# TODO: required otherwise
# eth_common/rlp_serialization.nim(18, 12) template/generic instantiation from here
# eth/common/rlp_serialization.nim(18, 12) template/generic instantiation from here
# nimcrypto/hash.nim(46, 6) Error: attempting to call undeclared routine: 'init'
proc hash*(b: BlockHeader): Hash256 {.inline.} = rlpHash(b)

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
nimcrypto, strutils, eth_common
nimcrypto, strutils, eth/common
proc keccak*(value: openarray[byte]): Hash256 {.inline.} =
keccak256.digest value

View File

@ -7,7 +7,7 @@
import
strformat,
errors, constants, eth_common
errors, constants, eth/common
proc validateGte*(value: Int256 | int, minimum: int, title: string = "Value") =
if value.i256 < minimum.i256:

View File

@ -7,7 +7,7 @@
import
chronicles, strformat, strutils, sequtils, parseutils, sets, macros,
eth_common,
eth/common,
../constants, ./interpreter/opcode_values
logScope:

View File

@ -7,11 +7,11 @@
import
chronicles, strformat, strutils, sequtils, macros, terminal, math, tables, options,
eth_common,
eth/[common, keys],
../constants, ../errors, ../validation, ../vm_state, ../vm_types,
./interpreter/[opcode_values, gas_meter, gas_costs, vm_forks],
./code_stream, ./memory, ./message, ./stack, ../db/[state_db, db_chain],
../utils/header, byteutils, ranges, eth_keys, precompiles,
../utils/header, byteutils, ranges, precompiles,
transaction_tracer
logScope:

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
math, eth_common/eth_types,
math, eth/common/eth_types,
./utils/[macros_gen_opcodes, utils_numeric],
./opcode_values, ./vm_forks

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
chronicles, strformat, eth_common, # GasInt
chronicles, strformat, eth/common, # GasInt
../../errors, ../../vm_types
logScope:

View File

@ -7,7 +7,7 @@
import
strformat, times, ranges, sequtils,
chronicles, stint, nimcrypto, ranges/typedranges, eth_common,
chronicles, stint, nimcrypto, ranges/typedranges, eth/common,
./utils/[macros_procs_opcodes, utils_numeric],
./gas_meter, ./gas_costs, ./opcode_values, ./vm_forks,
../memory, ../message, ../stack, ../code_stream, ../computation,

View File

@ -9,7 +9,7 @@
# Macros to facilitate opcode procs creation
import
macros, strformat, stint, eth_common,
macros, strformat, stint, eth/common,
../../computation, ../../stack, ../../code_stream,
../../../constants, ../../../vm_types, ../../memory,
../../../errors, ../../message, ../../interpreter/[gas_meter, opcode_values],

View File

@ -7,7 +7,7 @@
import
strformat, strutils, sequtils, endians, macros,
eth_common/eth_types, rlp,
eth/common/eth_types, eth/rlp,
../../../constants
# some methods based on py-evm utils/numeric

View File

@ -7,7 +7,7 @@
import
sequtils,
chronicles, eth_common/eth_types,
chronicles, eth/common/eth_types,
../constants, ../errors, ../validation,
./interpreter/utils/utils_numeric

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
eth_common,
eth/common,
../constants, ../validation, ../vm_types, chronicles
logScope:

View File

@ -1,6 +1,6 @@
import
../vm_types, interpreter/[gas_meter, gas_costs, utils/utils_numeric],
../errors, stint, eth_keys, eth_common, chronicles, tables, macros,
../errors, stint, eth/[keys, common], chronicles, tables, macros,
message, math, nimcrypto, bncurve/[fields, groups]
type

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
chronicles, strformat, strutils, sequtils, macros, rlp, eth_common, nimcrypto,
chronicles, strformat, strutils, sequtils, macros, eth/[rlp, common], nimcrypto,
../errors, ../validation, ./interpreter/utils/utils_numeric, ../constants
logScope:

View File

@ -1,8 +1,8 @@
import
json, strutils, sets,
chronicles, nimcrypto, eth_common, stint,
chronicles, nimcrypto, eth/common, stint,
../vm_types, memory, stack, ../db/[db_chain, state_db],
eth_trie/hexary, ./message, ranges/typedranges,
eth/trie/hexary, ./message, ranges/typedranges,
./interpreter/opcode_values
logScope:

View File

@ -7,7 +7,7 @@
import
macros, strformat, tables, sets,
eth_common, eth_trie/db,
eth/common, eth/trie/db,
./constants, ./errors, ./transaction, ./db/[db_chain, state_db],
./utils/header, json, vm_types, vm/transaction_tracer

View File

@ -7,7 +7,7 @@
import
ranges/typedranges, sequtils, strformat, tables, options,
eth_common, chronicles,
eth/common, chronicles,
./constants, ./errors, ./vm/computation,
./transaction, ./vm_types, ./vm_state, ./block_types, ./db/[db_chain, state_db], ./utils/header,
./vm/interpreter, ./vm/interpreter/gas_costs, ./utils/addresses

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
tables, eth_common, options,
tables, eth/common, options,
./constants, json, sets,
./vm/[memory, stack, code_stream],
./vm/interpreter/[gas_costs, opcode_values, vm_forks], # TODO - will be hidden at a lower layer

View File

@ -1,5 +1,5 @@
import
json, os, stint, eth_trie/db, byteutils, eth_common,
json, os, stint, eth/trie/db, byteutils, eth/common,
../nimbus/db/[db_chain], chronicles, ../nimbus/vm_state,
../nimbus/p2p/executor, premixcore, prestate, ../nimbus/tracer

View File

@ -1,6 +1,6 @@
import
json_rpc/[rpcclient], json, parser, httputils, strutils,
eth_common, chronicles, ../nimbus/[utils], rlp, nimcrypto
eth/[common, rlp], chronicles, ../nimbus/[utils], nimcrypto
logScope:
topics = "downloader"

View File

@ -4,9 +4,9 @@
#
import
configuration, stint, eth_common,
configuration, stint, eth/common,
../nimbus/db/[storage_types, db_chain, select_backend, capturedb],
eth_trie/[hexary, db, defs], ../nimbus/p2p/executor,
eth/trie/[hexary, db, trie_defs], ../nimbus/p2p/executor,
../nimbus/[tracer, vm_state]
proc dumpDebug(chainDB: BaseChainDB, blockNumber: Uint256) =

View File

@ -1,8 +1,8 @@
import
json, downloader, stint, strutils, byteutils, parser, nimcrypto,
chronicles, ../nimbus/tracer, eth_trie/[defs, db], ../nimbus/vm_state,
chronicles, ../nimbus/tracer, eth/trie/[trie_defs, db], ../nimbus/vm_state,
../nimbus/db/[db_chain, state_db], ../nimbus/p2p/executor, premixcore,
eth_common, configuration
eth/common, configuration
const
emptyCodeHash = blankStringHash

View File

@ -1,7 +1,7 @@
import
json, strutils, times, options, os,
rlp, httputils, nimcrypto, chronicles,
stint, eth_common, byteutils
eth/[rlp, common], httputils, nimcrypto, chronicles,
stint, byteutils
import
../nimbus/[transaction, rpc/hexstrings]

View File

@ -1,12 +1,12 @@
# use this module to quickly populate db with data from geth/parity
import
eth_common, stint, byteutils, nimcrypto,
chronicles, rlp, downloader, configuration,
eth/[common, rlp], stint, byteutils, nimcrypto,
chronicles, downloader, configuration,
../nimbus/errors
import
eth_trie/[hexary, db, defs],
eth/trie/[hexary, db, trie_defs],
../nimbus/db/[storage_types, db_chain, select_backend],
../nimbus/[genesis, utils],
../nimbus/p2p/chain

View File

@ -1,7 +1,7 @@
import
json, downloader, stint, strutils, os,
../nimbus/tracer, chronicles, prestate,
js_tracer, eth_common, byteutils, parser,
js_tracer, eth/common, byteutils, parser,
nimcrypto, premixcore
proc generateGethData(thisBlock: Block, blockNumber: Uint256, accounts: JsonNode): JsonNode =

View File

@ -1,6 +1,6 @@
import
json, strutils, os,
stint, chronicles, eth_common,
stint, chronicles, eth/common,
../nimbus/tracer, ../nimbus/launcher,
./js_tracer, ./parser, ./downloader

View File

@ -1,6 +1,6 @@
import
json, downloader, stint, eth_trie/db, byteutils,
../nimbus/db/[db_chain, storage_types], rlp, eth_common,
json, downloader, stint, eth/trie/db, byteutils,
../nimbus/db/[db_chain, storage_types], eth/[rlp, common],
../nimbus/p2p/chain, ../nimbus/tracer
proc generatePrestate*(nimbus, geth: JsonNode, blockNumber: Uint256, parent, header: BlockHeader, body: BlockBody) =

View File

@ -1,11 +1,11 @@
import
macros, macrocache, strutils, unittest,
byteutils, chronicles, ranges, eth_common,
byteutils, chronicles, ranges, eth/common,
../nimbus/vm/interpreter/opcode_values,
std_shims/macros_shim
import
options, json, os, eth_trie/[db, hexary],
options, json, os, eth/trie/[db, hexary],
../nimbus/[vm_state, tracer, vm_types, transaction],
../nimbus/db/[db_chain, state_db],
../nimbus/vm_state_transactions,

View File

@ -1,6 +1,6 @@
import
json, os, eth_common, stint, chronicles, byteutils, nimcrypto, rlp,
eth_trie/[db], ../nimbus/db/[db_chain, capturedb, storage_types, select_backend],
json, os, eth/common, stint, chronicles, byteutils, nimcrypto, rlp,
eth/trie/db, ../nimbus/db/[db_chain, capturedb, storage_types, select_backend],
../nimbus/[tracer, vm_types, config],
../nimbus/p2p/chain

View File

@ -10,7 +10,7 @@
## then a procedure body is generated to marshal native Nim parameters to json and visa versa.
import
json,
stint, eth_common,
stint, eth/common,
../../nimbus/rpc/hexstrings, ../../nimbus/rpc/rpc_types
proc web3_clientVersion(): string
@ -39,7 +39,7 @@ proc eth_sign(data:EthAddressStr, message: HexDataStr): HexDataStr
proc eth_call(call: EthCall, quantityTag: string): string
proc eth_estimateGas(call: EthCall, quantityTag: string): GasInt
# TODO: Use eth_common types
# TODO: Use eth/common types
#[proc eth_sendTransaction(obj: EthSend): UInt256
proc eth_getBlockByHash(data: array[32, byte], fullTransactions: bool): BlockObject

View File

@ -7,7 +7,7 @@
import
unittest, macros, strformat,
eth_common/eth_types,
eth/common/eth_types,
../nimbus/[vm_types, errors, vm/interpreter]
# TODO: quicktest

View File

@ -8,8 +8,7 @@
import
unittest, strformat, strutils, tables, json, ospaths, times,
byteutils, ranges/typedranges, nimcrypto/[keccak, hash], options,
rlp, eth_trie/db, eth_common,
eth_keys, chronicles,
eth/[rlp, common, keys], eth/trie/db, chronicles,
./test_helpers,
../nimbus/[constants, errors],
../nimbus/[vm_state, vm_types, vm_state_transactions],

View File

@ -1,4 +1,4 @@
import unittest, ../nimbus/[genesis, config], eth_common, nimcrypto/hash
import unittest, ../nimbus/[genesis, config], eth/common, nimcrypto/hash
suite "Genesis":
test "Correct mainnet hash":

View File

@ -7,7 +7,7 @@
import
os, macros, json, strformat, strutils, parseutils, ospaths, tables,
byteutils, eth_common, eth_keys, ranges/typedranges,
byteutils, eth/[common, keys], ranges/typedranges,
../nimbus/[vm_state, constants],
../nimbus/db/[db_chain, state_db],
../nimbus/transaction,

View File

@ -7,7 +7,7 @@
import
unittest, sequtils,
eth_common/eth_types,
eth/common/eth_types,
../nimbus/[constants, errors, vm/memory]
proc memory32: Memory =

View File

@ -1,6 +1,6 @@
import
macro_assembler, unittest, macros, strutils,
byteutils, eth_common, ../nimbus/db/state_db,
byteutils, eth/common, ../nimbus/db/state_db,
../nimbus/db/db_chain, ranges
suite "Custom Opcodes Test":

View File

@ -1,6 +1,6 @@
import
macro_assembler, unittest, macros, strutils,
byteutils, eth_common, ../nimbus/db/state_db,
byteutils, eth/common, ../nimbus/db/state_db,
../nimbus/db/db_chain, ranges
suite "Environmental Information Opcodes":

View File

@ -1,6 +1,6 @@
import
macro_assembler, unittest, macros, strutils,
byteutils, eth_common, ../nimbus/db/state_db,
byteutils, eth/common, ../nimbus/db/state_db,
../nimbus/db/db_chain, ranges
suite "Misc Opcodes":

View File

@ -7,14 +7,14 @@
import
unittest, tables, parseutils, byteutils,
eth_trie/db, eth_common/eth_types,
eth/trie/db, eth/common/eth_types,
../nimbus/[constants, vm_types, vm_state],
../nimbus/vm/interpreter,
../nimbus/utils/header,
../nimbus/db/[db_chain, state_db],
./test_helpers
from eth_common import GasInt
from eth/common import GasInt
proc testCode(code: string, initialGas: GasInt, blockNum: UInt256): BaseComputation =
let header = BlockHeader(blockNumber: blockNum)

View File

@ -7,7 +7,7 @@
import
unittest, json, os, tables, strformat, strutils,
eth_common, byteutils, eth_trie/db, rlp,
eth/[common, rlp], byteutils, eth/trie/db,
./test_helpers, ../nimbus/db/[db_chain, storage_types], ../nimbus/[tracer, vm_types],
../nimbus/p2p/chain

View File

@ -7,7 +7,7 @@
import
unittest, ../nimbus/vm/precompiles, json, byteutils, test_helpers, ospaths, tables,
strformat, strutils, eth_trie/db, eth_common, ../nimbus/db/[db_chain, state_db],
strformat, strutils, eth/trie/db, eth/common, ../nimbus/db/[db_chain, state_db],
../nimbus/[constants, vm_types, vm_state], ../nimbus/vm/[computation, message], macros
proc initAddress(i: byte): EthAddress = result[19] = i

View File

@ -7,12 +7,12 @@
import
unittest, json, strformat, options,
nimcrypto, rlp, eth_trie/db, eth_p2p, eth_keys,
nimcrypto, eth/[rlp, keys], eth/trie/db, eth/p2p as eth_p2p,
json_rpc/[rpcserver, rpcclient],
../nimbus/rpc/[common, p2p, hexstrings, rpc_types],
../nimbus/constants,
../nimbus/[vm_state, config],
../nimbus/db/[state_db, db_chain, storage_types], eth_common, byteutils,
../nimbus/db/[state_db, db_chain, storage_types], eth/common as eth_common, byteutils,
../nimbus/p2p/chain,
../nimbus/genesis,
./rpcclient/test_hexstrings

View File

@ -7,7 +7,7 @@
import
unittest,
eth_common/eth_types,
eth/common/eth_types,
../nimbus/[constants, errors, vm/interpreter]

View File

@ -7,7 +7,7 @@
import
unittest, json, os, tables, strformat, strutils,
eth_common, byteutils, eth_trie/db,
eth/common, byteutils, eth/trie/db,
./test_helpers, ../nimbus/db/db_chain, ../nimbus/[tracer, vm_types]
proc testFixture(node: JsonNode, testStatusIMPL: var TestStatus)

View File

@ -8,7 +8,7 @@
import
unittest, strformat, strutils, sequtils, tables, json, ospaths, times,
byteutils, ranges/typedranges, nimcrypto/[keccak, hash],
rlp, eth_trie/db, eth_common,
eth/[rlp, common], eth/trie/db,
./test_helpers,
../nimbus/[constants, errors],
../nimbus/[vm_state, vm_types],

View File

@ -1,6 +1,6 @@
import
json, os, eth_common, stint, chronicles, byteutils, nimcrypto,
eth_trie/[db], ../nimbus/db/[db_chain, capturedb, select_backend],
json, os, eth/common, stint, chronicles, byteutils, nimcrypto,
eth/trie/db, ../nimbus/db/[db_chain, capturedb, select_backend],
../nimbus/[tracer, vm_types, config]
proc dumpTest(chainDB: BaseChainDB, blockNumber: int) =