mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-16 16:38:07 +00:00
Use nim-eth (#82)
This commit is contained in:
parent
d1af069c55
commit
7f1bddb267
@ -13,11 +13,9 @@ bin = @[
|
||||
|
||||
### Dependencies
|
||||
requires "nim >= 0.18.0",
|
||||
"eth_common",
|
||||
"eth_keys",
|
||||
"https://github.com/status-im/nim-eth",
|
||||
"nimcrypto",
|
||||
"https://github.com/status-im/nim-blscurve#master",
|
||||
"eth_p2p",
|
||||
"ranges",
|
||||
"chronicles",
|
||||
"confutils",
|
||||
|
@ -1,8 +1,8 @@
|
||||
import
|
||||
os, json, tables, options,
|
||||
chronicles, json_serialization, eth_common/eth_types_json_serialization,
|
||||
chronicles, json_serialization, eth/common/eth_types_json_serialization,
|
||||
spec/[datatypes, digest, crypto],
|
||||
eth_trie/db, ssz
|
||||
eth/trie/db, ssz
|
||||
|
||||
|
||||
type
|
||||
|
@ -1,10 +1,10 @@
|
||||
import
|
||||
std_shims/[os_shims, objects], net, sequtils, options, tables,
|
||||
asyncdispatch2, chronicles, confutils, eth_p2p, eth_keys,
|
||||
asyncdispatch2, chronicles, confutils, eth/[p2p, keys],
|
||||
spec/[datatypes, digest, crypto, beaconstate, helpers, validator], conf, time,
|
||||
state_transition, fork_choice, ssz, beacon_chain_db, validator_pool, extras,
|
||||
mainchain_monitor, sync_protocol, gossipsub_protocol, trusted_state_snapshots,
|
||||
eth_trie/db, eth_trie/backends/rocksdb_backend
|
||||
eth/trie/db, eth/trie/backends/rocksdb_backend
|
||||
|
||||
type
|
||||
BeaconNode* = ref object
|
||||
|
@ -1,7 +1,7 @@
|
||||
import
|
||||
tables, sets, macros, base64,
|
||||
asyncdispatch2, nimcrypto/sysrand, chronicles, rlp, json_serialization,
|
||||
eth_p2p, eth_p2p/[rlpx, peer_pool],
|
||||
asyncdispatch2, nimcrypto/sysrand, chronicles, json_serialization,
|
||||
eth/[p2p, rlp], eth/p2p/[rlpx, peer_pool],
|
||||
spec/[datatypes, crypto]
|
||||
|
||||
type
|
||||
|
@ -24,7 +24,7 @@
|
||||
# types / composition
|
||||
|
||||
import
|
||||
eth_common, math,
|
||||
eth/common, math,
|
||||
./crypto, ./digest
|
||||
|
||||
# TODO Data types:
|
||||
@ -437,7 +437,7 @@ template epoch*(slot: int|uint64): auto =
|
||||
|
||||
when true:
|
||||
# TODO: Remove these once RLP serialization is no longer used
|
||||
import nimcrypto, rlp, json_serialization
|
||||
import nimcrypto, eth/rlp, json_serialization
|
||||
export append, read, json_serialization
|
||||
|
||||
proc append*(rlpWriter: var RlpWriter, value: ValidatorPubKey) =
|
||||
|
@ -21,7 +21,7 @@
|
||||
# `eth2hash`, and it outputs a `Eth2Digest`. Easy to sed :)
|
||||
|
||||
import
|
||||
nimcrypto/[blake2, hash], eth_common/eth_types_json_serialization,
|
||||
nimcrypto/[blake2, hash], eth/common/eth_types_json_serialization,
|
||||
hashes
|
||||
|
||||
export
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import
|
||||
options, nimcrypto, sequtils, math,
|
||||
eth_common,
|
||||
eth/common,
|
||||
../ssz,
|
||||
./crypto, ./datatypes, ./digest, ./helpers
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
import
|
||||
endians, typetraits, options, algorithm,
|
||||
eth_common, nimcrypto/blake2,
|
||||
eth/common, nimcrypto/blake2,
|
||||
./spec/[crypto, datatypes, digest]
|
||||
|
||||
# ################### Helper functions ###################################
|
||||
|
@ -1,6 +1,6 @@
|
||||
import
|
||||
options,
|
||||
chronicles, rlp, asyncdispatch2, ranges/bitranges, eth_p2p, eth_p2p/rlpx,
|
||||
chronicles, eth/[rlp, p2p], asyncdispatch2, ranges/bitranges, eth/p2p/rlpx,
|
||||
spec/[datatypes, crypto, digest]
|
||||
|
||||
type
|
||||
|
@ -1,6 +1,6 @@
|
||||
import
|
||||
json, macros, sequtils, endians,
|
||||
eth_common, stint, nimcrypto, byteutils
|
||||
eth/common, stint, nimcrypto, byteutils
|
||||
|
||||
type
|
||||
Validator {.packed.} = object
|
||||
|
@ -6,7 +6,7 @@
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
import
|
||||
unittest, nimcrypto, eth_common, sequtils, options, blscurve,
|
||||
unittest, nimcrypto, eth/common, sequtils, options, blscurve,
|
||||
../beacon_chain/ssz, ../beacon_chain/spec/datatypes
|
||||
|
||||
func filled[N: static[int], T](typ: type array[N, T], value: T): array[N, T] =
|
||||
|
Loading…
x
Reference in New Issue
Block a user