Reorg (5/5) (#2377)

* Reorg things left into networking and gossip_processing

* time -> beacon_clock

* fix builds
This commit is contained in:
Mamy Ratsimbazafy 2021-03-05 14:12:00 +01:00 committed by GitHub
parent c6f94ce165
commit d47f53cd9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 147 additions and 83 deletions

View File

@ -5,11 +5,11 @@ import
stew/[endians2, io2, objects, results], stew/[endians2, io2, objects, results],
serialization, chronicles, snappy, serialization, chronicles, snappy,
eth/db/[kvstore, kvstore_sqlite3], eth/db/[kvstore, kvstore_sqlite3],
./network_metadata, ./networking/network_metadata,
./spec/[crypto, datatypes, digest, state_transition], ./spec/[crypto, datatypes, digest, state_transition],
./ssz/[ssz_serialization, merkleization], ./ssz/[ssz_serialization, merkleization],
./eth1/merkle_minimal, ./eth1/merkle_minimal,
filepath ./filepath
type type
DbSeq*[T] = object DbSeq*[T] = object

View File

@ -2,7 +2,7 @@
import import
chronos, chronicles, chronos, chronicles,
spec/datatypes ./spec/datatypes
from times import Time, getTime, fromUnix, `<`, `-`, inNanoseconds from times import Time, getTime, fromUnix, `<`, `-`, inNanoseconds
@ -115,4 +115,3 @@ func shortLog*(v: BeaconTime): string = $(Duration v)
chronicles.formatIt Duration: $it chronicles.formatIt Duration: $it
chronicles.formatIt BeaconTime: $(Duration it) chronicles.formatIt BeaconTime: $(Duration it)

View File

@ -14,16 +14,17 @@ import
chronos, json_rpc/rpcserver, chronos, json_rpc/rpcserver,
# Local modules # Local modules
./conf, ./time, ./beacon_chain_db, ./eth2_network, ./conf, ./beacon_clock, ./beacon_chain_db,
./beacon_node_types, ./beacon_node_types,
./eth2_processor, ./gossip_processing/eth2_processor,
./networking/eth2_network,
./eth1/eth1_monitor, ./eth1/eth1_monitor,
./consensus_object_pools/[blockchain_dag, block_quarantine, attestation_pool], ./consensus_object_pools/[blockchain_dag, block_quarantine, attestation_pool],
./spec/datatypes, ./spec/datatypes,
./sync/[sync_manager, request_manager] ./sync/[sync_manager, request_manager]
export export
osproc, chronos, rpcserver, conf, time, beacon_chain_db, osproc, chronos, rpcserver, conf, beacon_clock, beacon_chain_db,
attestation_pool, eth2_network, beacon_node_types, eth1_monitor, attestation_pool, eth2_network, beacon_node_types, eth1_monitor,
request_manager, sync_manager, eth2_processor, blockchain_dag, block_quarantine, request_manager, sync_manager, eth2_processor, blockchain_dag, block_quarantine,
datatypes datatypes

View File

@ -9,7 +9,8 @@ import
eth/p2p/discoveryv5/enr, eth/p2p/discoveryv5/enr,
json_serialization, web3/[ethtypes, confutils_defs], json_serialization, web3/[ethtypes, confutils_defs],
spec/[crypto, keystore, digest, datatypes, network], spec/[crypto, keystore, digest, datatypes, network],
network_metadata, filepath ./networking/network_metadata,
filepath
export export
uri, uri,

View File

@ -12,7 +12,7 @@ import
chronicles, chronicles,
stew/[assign2, results], stew/[assign2, results],
eth/keys, eth/keys,
../extras, ../time, ../extras, ../beacon_clock,
../spec/[crypto, datatypes, digest, helpers, signatures, signatures_batch, state_transition], ../spec/[crypto, datatypes, digest, helpers, signatures, signatures_batch, state_transition],
./block_pools_types, ./blockchain_dag, ./block_quarantine ./block_pools_types, ./blockchain_dag, ./block_quarantine

View File

@ -15,7 +15,7 @@ import
../spec/[ ../spec/[
crypto, datatypes, digest, helpers, validator, state_transition, crypto, datatypes, digest, helpers, validator, state_transition,
beaconstate], beaconstate],
../time, ../beacon_clock,
"."/[block_pools_types, block_quarantine] "."/[block_pools_types, block_quarantine]
export block_pools_types, helpers export block_pools_types, helpers

View File

@ -1,7 +1,8 @@
import import
os, sequtils, strutils, options, json, terminal, random, os, sequtils, strutils, options, json, terminal, random,
chronos, chronicles, confutils, stint, json_serialization, chronos, chronicles, confutils, stint, json_serialization,
".."/[network_metadata, filepath], ../filepath,
../networking/network_metadata,
web3, web3/confutils_defs, eth/keys, stew/io2, web3, web3/confutils_defs, eth/keys, stew/io2,
../spec/[datatypes, crypto, presets], ../ssz/merkleization, ../spec/[datatypes, crypto, presets], ../ssz/merkleization,
../validators/keystore_management ../validators/keystore_management

View File

@ -6,8 +6,9 @@ import
web3, web3/ethtypes as web3Types, eth/common/eth_types, eth/async_utils, web3, web3/ethtypes as web3Types, eth/common/eth_types, eth/async_utils,
# Local modules: # Local modules:
../spec/[datatypes, digest, crypto, helpers], ../spec/[datatypes, digest, crypto, helpers],
../networking/network_metadata,
../ssz, ../ssz,
".."/[beacon_chain_db, network_metadata, beacon_node_status], ".."/[beacon_chain_db, beacon_node_status],
./merkle_minimal ./merkle_minimal
export export

View File

@ -0,0 +1,34 @@
# Gossip Processing
This folders hold a collection of modules to:
- validate raw gossip data before
- rebroadcasting them (potentially aggregated)
- sending it to one of the consensus object pool
## Validation
Gossip Validation is different from consensus verification in particular for blocks.
- Blocks: https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#beacon_block
- Attestations (aggregate): https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#beacon_aggregate_and_proof
- Attestations (single): https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#attestation-subnets
- Exits: https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#voluntary_exit
- Proposer slashings: https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#proposer_slashing
- Attester slashing: https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#attester_slashing
There are 2 consumers of validated consensus objects:
- a `ValidationResult.Accept` output triggers rebroadcasting in libp2p
- method `validate(PubSub, message)` in libp2p/protocols/pubsub/pubsub.nim in the
- which was called by `rpcHandler(GossipSub, PubSubPeer, RPCMsg)`
- a `xyzValidator` message enqueues the validated object in one of the processing queue in eth2_processor
- `blocksQueue: AsyncQueue[BlockEntry]`, (shared with request_manager and sync_manager)
- `attestationsQueue: AsyncQueue[AttestationEntry]`
- `aggregatesQueue: AsyncQueue[AggregateEntry]`
Those queues are then regularly processed to be made available to the consensus object pools.
## Security concerns
As the first line of defense in Nimbus, modules must be able to handle burst of data that may come:
- from malicious nodes trying to DOS us
- from long periods of non-finality, creating lots of forks, attestations, forks

View File

@ -10,13 +10,13 @@
import import
std/[options, sequtils], std/[options, sequtils],
chronos, chronicles, chronos, chronicles,
./spec/[ ../spec/[
beaconstate, datatypes, crypto, digest, helpers, network, signatures], beaconstate, datatypes, crypto, digest, helpers, network, signatures],
./consensus_object_pools/[ ../consensus_object_pools/[
spec_cache, blockchain_dag, block_quarantine, spec_cache, spec_cache, blockchain_dag, block_quarantine, spec_cache,
attestation_pool attestation_pool
], ],
./beacon_node_types, ./ssz, ./time ".."/[beacon_node_types, ssz, beacon_clock]
logScope: logScope:
topics = "att_aggr" topics = "att_aggr"

View File

@ -11,12 +11,12 @@ import
std/[math, tables], std/[math, tables],
stew/results, stew/results,
chronicles, chronos, metrics, chronicles, chronos, metrics,
./spec/[crypto, datatypes, digest], ../spec/[crypto, datatypes, digest],
./consensus_object_pools/[block_clearance, blockchain_dag, exit_pool, attestation_pool], ../consensus_object_pools/[block_clearance, blockchain_dag, exit_pool, attestation_pool],
./attestation_aggregation, ./attestation_aggregation,
./validators/validator_pool, ../validators/validator_pool,
./beacon_node_types, ../beacon_node_types,
./time, ./conf, ./ssz/sszdump ../beacon_clock, ../conf, ../ssz/sszdump
# Metrics for tracking attestation and beacon block loss # Metrics for tracking attestation and beacon block loss
declareCounter beacon_attestations_received, declareCounter beacon_attestations_received,

View File

@ -0,0 +1,14 @@
# Networking
This folders hold a collection of modules to:
- configure the Eth2 P2P network
- discover, connect, and maintain quality Eth2 peers
Data received is handed other to the `../gossip_processing` modules for validation.
## Security concerns
- Collusion: part of the peer selection must be kept random. This avoids peers bringing all their friends and colluding against a beacon node.
- Denial-of-service: The beacon node must provide ways to handle burst of data that may come:
- from malicious nodes trying to DOS us
- from long periods of non-finality, creating lots of forks, attestations, forks

View File

@ -4,7 +4,7 @@ import
std/[os, strutils], std/[os, strutils],
chronicles, stew/shims/net, stew/results, bearssl, chronicles, stew/shims/net, stew/results, bearssl,
eth/keys, eth/p2p/discoveryv5/[enr, protocol, node], eth/keys, eth/p2p/discoveryv5/[enr, protocol, node],
./conf ../conf
export protocol, keys export protocol, keys

View File

@ -21,11 +21,12 @@ import
libp2p/stream/connection, libp2p/stream/connection,
eth/[keys, async_utils], eth/p2p/p2p_protocol_dsl, eth/[keys, async_utils], eth/p2p/p2p_protocol_dsl,
eth/net/nat, eth/p2p/discoveryv5/[enr, node], eth/net/nat, eth/p2p/discoveryv5/[enr, node],
"."/[ ".."/[
version, conf, eth2_discovery, libp2p_json_serialization, version, conf,
ssz/ssz_serialization, peer_pool, time], ssz/ssz_serialization, beacon_clock],
./spec/[datatypes, digest, helpers, network], ../spec/[datatypes, digest, helpers, network],
./validators/keystore_management ../validators/keystore_management,
./eth2_discovery, ./peer_pool, ./libp2p_json_serialization
import libp2p/protocols/pubsub/gossipsub import libp2p/protocols/pubsub/gossipsub

View File

@ -12,8 +12,8 @@ import
chronicles, chronicles,
json_serialization, json_serialization,
json_serialization/std/[options, sets, net], serialization/errors, json_serialization/std/[options, sets, net], serialization/errors,
ssz/navigator, ../ssz/navigator,
spec/[presets, datatypes, digest] ../spec/[presets, datatypes, digest]
# ATTENTION! This file will produce a large C file, because we are inlining # ATTENTION! This file will produce a large C file, because we are inlining
# genesis states as C literals in the generated code (and blobs in the final # genesis states as C literals in the generated code (and blobs in the final
@ -74,7 +74,7 @@ type
incompatibilityDesc*: string incompatibilityDesc*: string
const const
eth2testnetsDir = currentSourcePath.parentDir.replace('\\', '/') & "/../vendor/eth2-testnets" eth2testnetsDir = currentSourcePath.parentDir.replace('\\', '/') & "/../../vendor/eth2-testnets"
const presetValueLoaders = genExpr(nnkBracket): const presetValueLoaders = genExpr(nnkBracket):
for constName in PresetValue: for constName in PresetValue:
@ -228,4 +228,3 @@ proc getRuntimePresetForNetwork*(eth2Network: Option[string]): RuntimePreset =
proc extractGenesisValidatorRootFromSnapshop*(snapshot: string): Eth2Digest = proc extractGenesisValidatorRootFromSnapshop*(snapshot: string): Eth2Digest =
sszMount(snapshot, BeaconState).genesis_validators_root[] sszMount(snapshot, BeaconState).genesis_validators_root[]

View File

@ -23,12 +23,13 @@ import
# Local modules # Local modules
"."/[ "."/[
attestation_aggregation, beacon_chain_db, beacon_chain_db,
beacon_node_common, beacon_node_status, beacon_node_types, conf, beacon_node_common, beacon_node_status, beacon_node_types, conf,
eth2_discovery, eth2_network, eth2_processor, extras, filepath, interop,
extras, filepath, interop, network_metadata,
nimbus_binary_common, ssz/merkleization, statusbar, nimbus_binary_common, ssz/merkleization, statusbar,
time, version], beacon_clock, version],
./networking/[eth2_discovery, eth2_network, network_metadata],
./gossip_processing/[eth2_processor, attestation_aggregation],
./validators/[validator_duties, validator_pool, slashing_protection, keystore_management], ./validators/[validator_duties, validator_pool, slashing_protection, keystore_management],
./sync/[sync_manager, sync_protocol, request_manager], ./sync/[sync_manager, sync_protocol, request_manager],
./rpc/[beacon_api, config_api, debug_api, event_api, nimbus_api, node_api, ./rpc/[beacon_api, config_api, debug_api, event_api, nimbus_api, node_api,

View File

@ -17,7 +17,8 @@ import
stew/io2, stew/io2,
# Local modules # Local modules
spec/[datatypes, crypto, helpers], eth2_network, time, filepath ./spec/[datatypes, crypto, helpers], beacon_clock, filepath,
./networking/eth2_network
proc setupStdoutLogging*(logLevel: string) = proc setupStdoutLogging*(logLevel: string) =
when compiles(defaultChroniclesStream.output.writer): when compiles(defaultChroniclesStream.output.writer):
@ -80,7 +81,7 @@ template makeBannerAndConfig*(clientId: string, ConfType: type): untyped =
{.pop.} {.pop.}
config config
# TODO not sure if this belongs here but it doesn't belong in `time.nim` either # TODO not sure if this belongs here but it doesn't belong in `beacon_clock.nim` either
proc sleepToSlotOffset*(clock: BeaconClock, extra: chronos.Duration, proc sleepToSlotOffset*(clock: BeaconClock, extra: chronos.Duration,
slot: Slot, msg: static string): Future[bool] {.async.} = slot: Slot, msg: static string): Future[bool] {.async.} =
let let

View File

@ -10,8 +10,8 @@ import
os, strutils, tables, os, strutils, tables,
# Local modules # Local modules
spec/[digest, crypto], ./spec/[digest, crypto],
validators/keystore_management ./validators/keystore_management
programMain: programMain:
var validators: Table[ValidatorPubKey, ValidatorPrivKey] var validators: Table[ValidatorPubKey, ValidatorPrivKey]

View File

@ -16,18 +16,19 @@ import
json_serialization/std/[options, net], json_serialization/std/[options, net],
# Local modules # Local modules
spec/[datatypes, digest, crypto, helpers, network, signatures], ./spec/[datatypes, digest, crypto, helpers, network, signatures],
spec/eth2_apis/beacon_rpc_client, ./spec/eth2_apis/beacon_rpc_client,
sync/sync_manager, ./sync/sync_manager,
conf, time, version, "."/[conf, beacon_clock, version],
eth2_network, eth2_discovery, beacon_node_types, ./networking/[eth2_network, eth2_discovery],
attestation_aggregation, ./rpc/eth2_json_rpc_serialization,
nimbus_binary_common, ./beacon_node_types,
version, ssz/merkleization, ./gossip_processing/attestation_aggregation,
spec/eth2_apis/callsigs_types, ./nimbus_binary_common,
eth2_json_rpc_serialization, ./ssz/merkleization,
validators/[keystore_management, validator_pool, slashing_protection], ./spec/eth2_apis/callsigs_types,
eth/db/[kvstore, kvstore_sqlite3] ./validators/[keystore_management, validator_pool, slashing_protection],
./eth/db/[kvstore, kvstore_sqlite3]
logScope: topics = "vc" logScope: topics = "vc"

View File

@ -10,13 +10,14 @@ import
json_rpc/[rpcserver, jsonmarshal], json_rpc/[rpcserver, jsonmarshal],
chronicles, chronicles,
nimcrypto/utils as ncrutils, nimcrypto/utils as ncrutils,
../beacon_node_common, ../eth2_json_rpc_serialization, ../eth2_network, ../beacon_node_common,
../networking/eth2_network,
../validators/validator_duties, ../validators/validator_duties,
../consensus_object_pools/[blockchain_dag, exit_pool], ../consensus_object_pools/[blockchain_dag, exit_pool],
../spec/[crypto, digest, datatypes, validator, network], ../spec/[crypto, digest, datatypes, validator, network],
../spec/eth2_apis/callsigs_types, ../spec/eth2_apis/callsigs_types,
../ssz/merkleization, ../ssz/merkleization,
./rpc_utils ./rpc_utils, ./eth2_json_rpc_serialization
logScope: topics = "beaconapi" logScope: topics = "beaconapi"

View File

@ -2,10 +2,10 @@ import
std/sequtils, std/sequtils,
json_rpc/[rpcserver, jsonmarshal], json_rpc/[rpcserver, jsonmarshal],
chronicles, chronicles,
../version, ../beacon_node_common, ../eth2_json_rpc_serialization, ../version, ../beacon_node_common,
../eth2_network, ../peer_pool, ../networking/[eth2_network, peer_pool],
../spec/[datatypes, digest, presets], ../spec/[datatypes, digest, presets],
./rpc_utils ./rpc_utils, ./eth2_json_rpc_serialization
logScope: topics = "debugapi" logScope: topics = "debugapi"
@ -20,4 +20,3 @@ proc installDebugApiHandlers*(rpcServer: RpcServer, node: BeaconNode) =
rpcServer.rpc("get_v1_debug_beacon_heads") do () -> seq[tuple[root: Eth2Digest, slot: Slot]]: rpcServer.rpc("get_v1_debug_beacon_heads") do () -> seq[tuple[root: Eth2Digest, slot: Slot]]:
return node.chainDag.heads.mapIt((it.root, it.slot)) return node.chainDag.heads.mapIt((it.root, it.slot))

View File

@ -3,11 +3,12 @@ import
std/[tables, json, typetraits], std/[tables, json, typetraits],
# Nimble packages # Nimble packages
stew/byteutils, ssz/types, stew/byteutils,
json_rpc/jsonmarshal, json_rpc/jsonmarshal,
# Local modules # Local modules
spec/[datatypes, crypto, digest] ../ssz/types,
../spec/[datatypes, crypto, digest]
proc toJsonHex(data: openArray[byte]): string = proc toJsonHex(data: openArray[byte]): string =
# Per the eth2 API spec, hex arrays are printed with leading 0x # Per the eth2 API spec, hex arrays are printed with leading 0x

View File

@ -12,7 +12,8 @@ import
json_rpc/[rpcserver, jsonmarshal], json_rpc/[rpcserver, jsonmarshal],
rpc_utils, rpc_utils,
../beacon_node_common, ../nimbus_binary_common, ../eth2_network, ../beacon_node_common, ../nimbus_binary_common,
../networking/eth2_network,
../eth1/eth1_monitor, ../eth1/eth1_monitor,
../validators/validator_duties, ../validators/validator_duties,
../spec/[digest, datatypes, presets], ../spec/[digest, datatypes, presets],

View File

@ -4,8 +4,9 @@ import std/options,
eth/p2p/discoveryv5/enr, eth/p2p/discoveryv5/enr,
libp2p/[multiaddress, multicodec], libp2p/[multiaddress, multicodec],
nimcrypto/utils as ncrutils, nimcrypto/utils as ncrutils,
../beacon_node_common, ../eth2_network, ../sync/sync_manager, ../beacon_node_common, ../version,
../peer_pool, ../version, ../networking/[eth2_network, peer_pool],
../sync/sync_manager,
../spec/[datatypes, digest, presets], ../spec/[datatypes, digest, presets],
../spec/eth2_apis/callsigs_types ../spec/eth2_apis/callsigs_types

View File

@ -19,8 +19,9 @@ import
../spec/eth2_apis/callsigs_types, ../spec/eth2_apis/callsigs_types,
../consensus_object_pools/[blockchain_dag, spec_cache, attestation_pool], ../ssz/merkleization, ../consensus_object_pools/[blockchain_dag, spec_cache, attestation_pool], ../ssz/merkleization,
../beacon_node_common, ../beacon_node_types, ../beacon_node_common, ../beacon_node_types,
../validators/validator_duties, ../eth2_network, ../validators/validator_duties,
../eth2_json_rpc_serialization, ../networking/eth2_network,
./eth2_json_rpc_serialization,
./rpc_utils ./rpc_utils
logScope: topics = "valapi" logScope: topics = "valapi"

View File

@ -1,7 +1,7 @@
import import
std/[os, json], std/[os, json],
json_rpc/[rpcclient, jsonmarshal], json_rpc/[rpcclient, jsonmarshal],
../../eth2_json_rpc_serialization, ../../rpc/eth2_json_rpc_serialization,
../crypto, ../digest, ../datatypes, ../crypto, ../digest, ../datatypes,
callsigs_types callsigs_types

View File

@ -8,8 +8,8 @@
{.push raises: [Defect].} {.push raises: [Defect].}
import import
ssz/types, ./ssz/types,
spec/[datatypes, digest, helpers] ./spec/[datatypes, digest, helpers]
func diffModIncEpoch[T, U](hl: HashArray[U, T], startSlot: uint64): func diffModIncEpoch[T, U](hl: HashArray[U, T], startSlot: uint64):
array[SLOTS_PER_EPOCH, T] = array[SLOTS_PER_EPOCH, T] =

View File

@ -1,8 +1,10 @@
import options, sequtils, strutils import options, sequtils, strutils
import chronos, chronicles import chronos, chronicles
import ../spec/[datatypes, digest], import ../spec/[datatypes, digest],
".."/[eth2_network, beacon_node_types, ../networking/eth2_network,
ssz/merkleization, eth2_processor], ../beacon_node_types,
../ssz/merkleization,
../gossip_processing/eth2_processor,
./sync_protocol, ./sync_manager ./sync_protocol, ./sync_manager
export sync_manager export sync_manager

View File

@ -2,9 +2,9 @@ import chronicles
import options, deques, heapqueue, tables, strutils, sequtils, math, algorithm import options, deques, heapqueue, tables, strutils, sequtils, math, algorithm
import stew/results, chronos, chronicles import stew/results, chronos, chronicles
import ../spec/[datatypes, digest, helpers, eth2_apis/callsigs_types], import ../spec/[datatypes, digest, helpers, eth2_apis/callsigs_types],
../peer_pool, ../eth2_network ../networking/[peer_pool, eth2_network]
import ../eth2_processor import ../gossip_processing/eth2_processor
import ../consensus_object_pools/block_pools_types import ../consensus_object_pools/block_pools_types
export datatypes, digest, chronos, chronicles, results, block_pools_types export datatypes, digest, chronos, chronicles, results, block_pools_types

View File

@ -2,8 +2,9 @@ import
options, tables, sets, macros, options, tables, sets, macros,
chronicles, chronos, stew/ranges/bitranges, libp2p/switch, chronicles, chronos, stew/ranges/bitranges, libp2p/switch,
../spec/[datatypes, network, crypto, digest], ../spec/[datatypes, network, crypto, digest],
".."/[beacon_node_types, eth2_network, ../beacon_node_types,
consensus_object_pools/blockchain_dag] ../networking/eth2_network,
../consensus_object_pools/blockchain_dag
logScope: logScope:
topics = "sync" topics = "sync"

View File

@ -5,7 +5,8 @@ import
../spec/[datatypes, digest, crypto, keystore], ../spec/[datatypes, digest, crypto, keystore],
stew/io2, libp2p/crypto/crypto as lcrypto, stew/io2, libp2p/crypto/crypto as lcrypto,
nimcrypto/utils as ncrutils, nimcrypto/utils as ncrutils,
".."/[conf, ssz/merkleization, network_metadata, filepath] ".."/[conf, ssz/merkleization, filepath],
../networking/network_metadata
export export
keystore keystore

View File

@ -21,14 +21,15 @@ import
../spec/[ ../spec/[
datatypes, digest, crypto, helpers, network, signatures, state_transition, datatypes, digest, crypto, helpers, network, signatures, state_transition,
validator], validator],
../conf, ../time, ../conf, ../beacon_clock,
../consensus_object_pools/[ ../consensus_object_pools/[
spec_cache, blockchain_dag, block_clearance, spec_cache, blockchain_dag, block_clearance,
attestation_pool, exit_pool], attestation_pool, exit_pool],
../eth1/eth1_monitor, ../eth1/eth1_monitor,
../eth2_network, ../beacon_node_common, ../networking/eth2_network,
../beacon_node_types, ../nimbus_binary_common, ../version, ".."/[beacon_node_common, beacon_node_types, nimbus_binary_common, version],
../ssz, ../ssz/sszdump, ../attestation_aggregation, ../sync/sync_manager, ../gossip_processing/attestation_aggregation,
../ssz, ../ssz/sszdump, ../sync/sync_manager,
./slashing_protection, ./slashing_protection,
./validator_pool, ./keystore_management ./validator_pool, ./keystore_management

View File

@ -5,7 +5,7 @@ import
../research/simutils, ../research/simutils,
../beacon_chain/spec/[crypto, datatypes, digest, helpers, state_transition], ../beacon_chain/spec/[crypto, datatypes, digest, helpers, state_transition],
../beacon_chain/extras, ../beacon_chain/extras,
../beacon_chain/network_metadata, ../beacon_chain/networking/network_metadata,
../beacon_chain/ssz/[merkleization, ssz_serialization] ../beacon_chain/ssz/[merkleization, ssz_serialization]
type type

View File

@ -1,7 +1,7 @@
import import
os, stats, strformat, tables, os, stats, strformat, tables,
chronicles, confutils, stew/byteutils, eth/db/kvstore_sqlite3, chronicles, confutils, stew/byteutils, eth/db/kvstore_sqlite3,
../beacon_chain/network_metadata, ../beacon_chain/networking/network_metadata,
../beacon_chain/[beacon_chain_db, extras], ../beacon_chain/[beacon_chain_db, extras],
../beacon_chain/consensus_object_pools/blockchain_dag, ../beacon_chain/consensus_object_pools/blockchain_dag,
../beacon_chain/spec/[crypto, datatypes, digest, helpers, ../beacon_chain/spec/[crypto, datatypes, digest, helpers,

View File

@ -17,7 +17,8 @@ import
# Internal # Internal
../beacon_chain/spec/[crypto, datatypes, digest, validator, state_transition, ../beacon_chain/spec/[crypto, datatypes, digest, validator, state_transition,
helpers, beaconstate, presets, network], helpers, beaconstate, presets, network],
../beacon_chain/[beacon_node_types, attestation_aggregation, extras, time], ../beacon_chain/[beacon_node_types, extras, beacon_clock],
../beacon_chain/gossip_processing/attestation_aggregation,
../beacon_chain/fork_choice/[fork_choice_types, fork_choice], ../beacon_chain/fork_choice/[fork_choice_types, fork_choice],
../beacon_chain/consensus_object_pools/[block_quarantine, blockchain_dag, block_clearance, attestation_pool], ../beacon_chain/consensus_object_pools/[block_quarantine, blockchain_dag, block_clearance, attestation_pool],
# Test utilities # Test utilities

View File

@ -3,7 +3,7 @@
import import
unittest, ./testutil, unittest, ./testutil,
../beacon_chain/spec/[crypto, datatypes, network], ../beacon_chain/spec/[crypto, datatypes, network],
../beacon_chain/attestation_aggregation ../beacon_chain/gossip_processing/attestation_aggregation
suiteReport "Honest validator": suiteReport "Honest validator":
var forkDigest: ForkDigest var forkDigest: ForkDigest

View File

@ -9,7 +9,7 @@
import std/[unittest, random, heapqueue, tables] import std/[unittest, random, heapqueue, tables]
import chronos import chronos
import ../beacon_chain/peer_pool import ../beacon_chain/networking/peer_pool
import testutil import testutil
type type

View File

@ -2,7 +2,7 @@
import unittest import unittest
import chronos import chronos
import ../beacon_chain/eth2_processor, import ../beacon_chain/gossip_processing/eth2_processor,
../beacon_chain/sync/sync_manager ../beacon_chain/sync/sync_manager
type type