Rename eth2_libp2p to lighthouse_network (#2702)
## Description The `eth2_libp2p` crate was originally named and designed to incorporate a simple libp2p integration into lighthouse. Since its origins the crates purpose has expanded dramatically. It now houses a lot more sophistication that is specific to lighthouse and no longer just a libp2p integration. As of this writing it currently houses the following high-level lighthouse-specific logic: - Lighthouse's implementation of the eth2 RPC protocol and specific encodings/decodings - Integration and handling of ENRs with respect to libp2p and eth2 - Lighthouse's discovery logic, its integration with discv5 and logic about searching and handling peers. - Lighthouse's peer manager - This is a large module handling various aspects of Lighthouse's network, such as peer scoring, handling pings and metadata, connection maintenance and recording, etc. - Lighthouse's peer database - This is a collection of information stored for each individual peer which is specific to lighthouse. We store connection state, sync state, last seen ips and scores etc. The data stored for each peer is designed for various elements of the lighthouse code base such as syncing and the http api. - Gossipsub scoring - This stores a collection of gossipsub 1.1 scoring mechanisms that are continuously analyssed and updated based on the ethereum 2 networks and how Lighthouse performs on these networks. - Lighthouse specific types for managing gossipsub topics, sync status and ENR fields - Lighthouse's network HTTP API metrics - A collection of metrics for lighthouse network monitoring - Lighthouse's custom configuration of all networking protocols, RPC, gossipsub, discovery, identify and libp2p. Therefore it makes sense to rename the crate to be more akin to its current purposes, simply that it manages the majority of Lighthouse's network stack. This PR renames this crate to `lighthouse_network` Co-authored-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
parent
06e310c4eb
commit
df40700ddd
108
Cargo.lock
generated
108
Cargo.lock
generated
@ -478,13 +478,13 @@ dependencies = [
|
||||
"dirs",
|
||||
"environment",
|
||||
"eth2_config",
|
||||
"eth2_libp2p",
|
||||
"eth2_network_config",
|
||||
"futures",
|
||||
"genesis",
|
||||
"hex",
|
||||
"http_api",
|
||||
"hyper",
|
||||
"lighthouse_network",
|
||||
"lighthouse_version",
|
||||
"monitoring_api",
|
||||
"node_test_rig",
|
||||
@ -624,9 +624,9 @@ version = "2.0.1"
|
||||
dependencies = [
|
||||
"beacon_node",
|
||||
"clap",
|
||||
"eth2_libp2p",
|
||||
"eth2_ssz",
|
||||
"hex",
|
||||
"lighthouse_network",
|
||||
"log",
|
||||
"logging",
|
||||
"slog",
|
||||
@ -856,12 +856,12 @@ dependencies = [
|
||||
"eth1",
|
||||
"eth2",
|
||||
"eth2_config",
|
||||
"eth2_libp2p",
|
||||
"genesis",
|
||||
"http_api",
|
||||
"http_metrics",
|
||||
"lazy_static",
|
||||
"lighthouse_metrics",
|
||||
"lighthouse_network",
|
||||
"monitoring_api",
|
||||
"network",
|
||||
"parking_lot",
|
||||
@ -1657,13 +1657,13 @@ dependencies = [
|
||||
"account_utils",
|
||||
"bytes 1.1.0",
|
||||
"eth2_keystore",
|
||||
"eth2_libp2p",
|
||||
"eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"eth2_ssz",
|
||||
"eth2_ssz_derive",
|
||||
"futures",
|
||||
"futures-util",
|
||||
"libsecp256k1 0.6.0",
|
||||
"lighthouse_network",
|
||||
"procinfo",
|
||||
"proto_array",
|
||||
"psutil",
|
||||
@ -1757,50 +1757,6 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eth2_libp2p"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"directory",
|
||||
"dirs",
|
||||
"discv5",
|
||||
"error-chain",
|
||||
"eth2_ssz",
|
||||
"eth2_ssz_derive",
|
||||
"eth2_ssz_types",
|
||||
"exit-future",
|
||||
"fnv",
|
||||
"futures",
|
||||
"hashset_delay",
|
||||
"hex",
|
||||
"lazy_static",
|
||||
"libp2p",
|
||||
"lighthouse_metrics",
|
||||
"lighthouse_version",
|
||||
"lru",
|
||||
"parking_lot",
|
||||
"rand 0.7.3",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"sha2",
|
||||
"slog",
|
||||
"slog-async",
|
||||
"slog-term",
|
||||
"smallvec",
|
||||
"snap",
|
||||
"strum",
|
||||
"superstruct",
|
||||
"task_executor",
|
||||
"tempfile",
|
||||
"tiny-keccak 2.0.2",
|
||||
"tokio",
|
||||
"tokio-io-timeout",
|
||||
"tokio-util",
|
||||
"types",
|
||||
"unsigned-varint 0.6.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eth2_network_config"
|
||||
version = "0.2.0"
|
||||
@ -2612,12 +2568,12 @@ dependencies = [
|
||||
"environment",
|
||||
"eth1",
|
||||
"eth2",
|
||||
"eth2_libp2p",
|
||||
"eth2_ssz",
|
||||
"futures",
|
||||
"hex",
|
||||
"lazy_static",
|
||||
"lighthouse_metrics",
|
||||
"lighthouse_network",
|
||||
"lighthouse_version",
|
||||
"network",
|
||||
"sensitive_url",
|
||||
@ -2640,8 +2596,8 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"beacon_chain",
|
||||
"environment",
|
||||
"eth2_libp2p",
|
||||
"lighthouse_metrics",
|
||||
"lighthouse_network",
|
||||
"lighthouse_version",
|
||||
"malloc_utils",
|
||||
"reqwest",
|
||||
@ -2986,11 +2942,11 @@ dependencies = [
|
||||
"environment",
|
||||
"eth1_test_rig",
|
||||
"eth2",
|
||||
"eth2_libp2p",
|
||||
"eth2_network_config",
|
||||
"eth2_ssz",
|
||||
"eth2_wallet",
|
||||
"genesis",
|
||||
"lighthouse_network",
|
||||
"lighthouse_version",
|
||||
"log",
|
||||
"sensitive_url",
|
||||
@ -3609,11 +3565,11 @@ dependencies = [
|
||||
"env_logger 0.9.0",
|
||||
"environment",
|
||||
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"eth2_libp2p",
|
||||
"eth2_network_config",
|
||||
"futures",
|
||||
"lazy_static",
|
||||
"lighthouse_metrics",
|
||||
"lighthouse_network",
|
||||
"lighthouse_version",
|
||||
"malloc_utils",
|
||||
"serde_json",
|
||||
@ -3635,6 +3591,50 @@ dependencies = [
|
||||
"prometheus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lighthouse_network"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"directory",
|
||||
"dirs",
|
||||
"discv5",
|
||||
"error-chain",
|
||||
"eth2_ssz",
|
||||
"eth2_ssz_derive",
|
||||
"eth2_ssz_types",
|
||||
"exit-future",
|
||||
"fnv",
|
||||
"futures",
|
||||
"hashset_delay",
|
||||
"hex",
|
||||
"lazy_static",
|
||||
"libp2p",
|
||||
"lighthouse_metrics",
|
||||
"lighthouse_version",
|
||||
"lru",
|
||||
"parking_lot",
|
||||
"rand 0.7.3",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"sha2",
|
||||
"slog",
|
||||
"slog-async",
|
||||
"slog-term",
|
||||
"smallvec",
|
||||
"snap",
|
||||
"strum",
|
||||
"superstruct",
|
||||
"task_executor",
|
||||
"tempfile",
|
||||
"tiny-keccak 2.0.2",
|
||||
"tokio",
|
||||
"tokio-io-timeout",
|
||||
"tokio-util",
|
||||
"types",
|
||||
"unsigned-varint 0.6.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lighthouse_version"
|
||||
version = "0.1.0"
|
||||
@ -4029,7 +4029,6 @@ dependencies = [
|
||||
"beacon_chain",
|
||||
"environment",
|
||||
"error-chain",
|
||||
"eth2_libp2p",
|
||||
"eth2_ssz",
|
||||
"eth2_ssz_types",
|
||||
"exit-future",
|
||||
@ -4043,6 +4042,7 @@ dependencies = [
|
||||
"itertools",
|
||||
"lazy_static",
|
||||
"lighthouse_metrics",
|
||||
"lighthouse_network",
|
||||
"logging",
|
||||
"lru_cache",
|
||||
"matches",
|
||||
@ -5572,7 +5572,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"beacon_chain",
|
||||
"directory",
|
||||
"eth2_libp2p",
|
||||
"lighthouse_network",
|
||||
"network",
|
||||
"slasher",
|
||||
"slog",
|
||||
|
@ -6,7 +6,7 @@ members = [
|
||||
"beacon_node/beacon_chain",
|
||||
"beacon_node/client",
|
||||
"beacon_node/eth1",
|
||||
"beacon_node/eth2_libp2p",
|
||||
"beacon_node/lighthouse_network",
|
||||
"beacon_node/http_api",
|
||||
"beacon_node/http_metrics",
|
||||
"beacon_node/network",
|
||||
|
@ -29,7 +29,7 @@ environment = { path = "../lighthouse/environment" }
|
||||
task_executor = { path = "../common/task_executor" }
|
||||
genesis = { path = "genesis" }
|
||||
eth2_network_config = { path = "../common/eth2_network_config" }
|
||||
eth2_libp2p = { path = "./eth2_libp2p" }
|
||||
lighthouse_network = { path = "./lighthouse_network" }
|
||||
serde = "1.0.116"
|
||||
clap_utils = { path = "../common/clap_utils" }
|
||||
hyper = "0.14.4"
|
||||
|
@ -12,7 +12,7 @@ beacon_chain = { path = "../beacon_chain" }
|
||||
store = { path = "../store" }
|
||||
network = { path = "../network" }
|
||||
timer = { path = "../timer" }
|
||||
eth2_libp2p = { path = "../eth2_libp2p" }
|
||||
lighthouse_network = { path = "../lighthouse_network" }
|
||||
parking_lot = "0.11.0"
|
||||
types = { path = "../../consensus/types" }
|
||||
eth2_config = { path = "../../common/eth2_config" }
|
||||
|
@ -16,8 +16,8 @@ use eth2::{
|
||||
types::{BlockId, StateId},
|
||||
BeaconNodeHttpClient, Error as ApiError, Timeouts,
|
||||
};
|
||||
use eth2_libp2p::NetworkGlobals;
|
||||
use genesis::{interop_genesis_state, Eth1GenesisService};
|
||||
use lighthouse_network::NetworkGlobals;
|
||||
use monitoring_api::{MonitoringHttpClient, ProcessType};
|
||||
use network::{NetworkConfig, NetworkMessage, NetworkService};
|
||||
use slasher::Slasher;
|
||||
|
@ -8,7 +8,7 @@ pub mod builder;
|
||||
pub mod error;
|
||||
|
||||
use beacon_chain::BeaconChain;
|
||||
use eth2_libp2p::{Enr, Multiaddr, NetworkGlobals};
|
||||
use lighthouse_network::{Enr, Multiaddr, NetworkGlobals};
|
||||
use std::net::SocketAddr;
|
||||
use std::sync::Arc;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::metrics;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2_libp2p::{types::SyncState, NetworkGlobals};
|
||||
use lighthouse_network::{types::SyncState, NetworkGlobals};
|
||||
use parking_lot::Mutex;
|
||||
use slog::{debug, error, info, warn, Logger};
|
||||
use slot_clock::SlotClock;
|
||||
|
@ -16,7 +16,7 @@ beacon_chain = { path = "../beacon_chain" }
|
||||
eth2 = { path = "../../common/eth2", features = ["lighthouse"] }
|
||||
slog = "2.5.2"
|
||||
network = { path = "../network" }
|
||||
eth2_libp2p = { path = "../eth2_libp2p" }
|
||||
lighthouse_network = { path = "../lighthouse_network" }
|
||||
eth1 = { path = "../eth1" }
|
||||
state_processing = { path = "../../consensus/state_processing" }
|
||||
lighthouse_version = { path = "../../common/lighthouse_version" }
|
||||
|
@ -24,7 +24,7 @@ use beacon_chain::{
|
||||
};
|
||||
use block_id::BlockId;
|
||||
use eth2::types::{self as api_types, EndpointVersion, ValidatorId};
|
||||
use eth2_libp2p::{types::SyncState, EnrExt, NetworkGlobals, PeerId, PubsubMessage};
|
||||
use lighthouse_network::{types::SyncState, EnrExt, NetworkGlobals, PeerId, PubsubMessage};
|
||||
use lighthouse_version::version_with_platform;
|
||||
use network::NetworkMessage;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@ -1635,8 +1635,10 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
|
||||
if let Some(peer_info) = network_globals.peers.read().peer_info(&peer_id) {
|
||||
let address = if let Some(socket_addr) = peer_info.seen_addresses().next() {
|
||||
let mut addr = eth2_libp2p::Multiaddr::from(socket_addr.ip());
|
||||
addr.push(eth2_libp2p::multiaddr::Protocol::Tcp(socket_addr.port()));
|
||||
let mut addr = lighthouse_network::Multiaddr::from(socket_addr.ip());
|
||||
addr.push(lighthouse_network::multiaddr::Protocol::Tcp(
|
||||
socket_addr.port(),
|
||||
));
|
||||
addr.to_string()
|
||||
} else if let Some(addr) = peer_info.listening_addresses().first() {
|
||||
addr.to_string()
|
||||
@ -1682,8 +1684,9 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
.for_each(|(peer_id, peer_info)| {
|
||||
let address =
|
||||
if let Some(socket_addr) = peer_info.seen_addresses().next() {
|
||||
let mut addr = eth2_libp2p::Multiaddr::from(socket_addr.ip());
|
||||
addr.push(eth2_libp2p::multiaddr::Protocol::Tcp(
|
||||
let mut addr =
|
||||
lighthouse_network::Multiaddr::from(socket_addr.ip());
|
||||
addr.push(lighthouse_network::multiaddr::Protocol::Tcp(
|
||||
socket_addr.port(),
|
||||
));
|
||||
addr.to_string()
|
||||
|
@ -9,7 +9,7 @@ use beacon_chain::{
|
||||
StateSkipConfig, MAXIMUM_GOSSIP_CLOCK_DISPARITY,
|
||||
};
|
||||
use eth2::types::{self as api_types};
|
||||
use eth2_libp2p::PubsubMessage;
|
||||
use lighthouse_network::PubsubMessage;
|
||||
use network::NetworkMessage;
|
||||
use slog::{error, warn, Logger};
|
||||
use slot_clock::SlotClock;
|
||||
|
@ -3,13 +3,13 @@ use beacon_chain::{
|
||||
BeaconChain, BeaconChainTypes,
|
||||
};
|
||||
use eth2::{BeaconNodeHttpClient, Timeouts};
|
||||
use eth2_libp2p::{
|
||||
use http_api::{Config, Context};
|
||||
use lighthouse_network::{
|
||||
discv5::enr::{CombinedKey, EnrBuilder},
|
||||
rpc::methods::{MetaData, MetaDataV2},
|
||||
types::{EnrAttestationBitfield, EnrSyncCommitteeBitfield, SyncState},
|
||||
ConnectedPoint, Enr, NetworkConfig, NetworkGlobals, PeerId, PeerManager,
|
||||
};
|
||||
use http_api::{Config, Context};
|
||||
use network::NetworkMessage;
|
||||
use sensitive_url::SensitiveUrl;
|
||||
use slog::Logger;
|
||||
|
@ -8,9 +8,9 @@ use environment::null_logger;
|
||||
use eth2::Error;
|
||||
use eth2::StatusCode;
|
||||
use eth2::{types::*, BeaconNodeHttpClient, Timeouts};
|
||||
use eth2_libp2p::{Enr, EnrExt, PeerId};
|
||||
use futures::stream::{Stream, StreamExt};
|
||||
use futures::FutureExt;
|
||||
use lighthouse_network::{Enr, EnrExt, PeerId};
|
||||
use network::NetworkMessage;
|
||||
use sensitive_url::SensitiveUrl;
|
||||
use slot_clock::SlotClock;
|
||||
|
@ -12,7 +12,7 @@ serde = { version = "1.0.116", features = ["derive"] }
|
||||
slog = "2.5.2"
|
||||
beacon_chain = { path = "../beacon_chain" }
|
||||
store = { path = "../store" }
|
||||
eth2_libp2p = { path = "../eth2_libp2p" }
|
||||
lighthouse_network = { path = "../lighthouse_network" }
|
||||
slot_clock = { path = "../../common/slot_clock" }
|
||||
lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
|
||||
lighthouse_version = { path = "../../common/lighthouse_version" }
|
||||
|
@ -38,7 +38,7 @@ pub fn gather_prometheus_metrics<T: BeaconChainTypes>(
|
||||
store::scrape_for_metrics(db_path, freezer_db_path);
|
||||
}
|
||||
|
||||
eth2_libp2p::scrape_discovery_metrics();
|
||||
lighthouse_network::scrape_discovery_metrics();
|
||||
|
||||
warp_utils::metrics::scrape_health_metrics();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "eth2_libp2p"
|
||||
name = "lighthouse_network"
|
||||
version = "0.2.0"
|
||||
authors = ["Sigma Prime <contact@sigmaprime.io>"]
|
||||
edition = "2018"
|
@ -1,10 +1,10 @@
|
||||
#![cfg(test)]
|
||||
use eth2_libp2p::Enr;
|
||||
use eth2_libp2p::EnrExt;
|
||||
use eth2_libp2p::Multiaddr;
|
||||
use eth2_libp2p::Service as LibP2PService;
|
||||
use eth2_libp2p::{Libp2pEvent, NetworkConfig};
|
||||
use libp2p::gossipsub::GossipsubConfigBuilder;
|
||||
use lighthouse_network::Enr;
|
||||
use lighthouse_network::EnrExt;
|
||||
use lighthouse_network::Multiaddr;
|
||||
use lighthouse_network::Service as LibP2PService;
|
||||
use lighthouse_network::{Libp2pEvent, NetworkConfig};
|
||||
use slog::{debug, error, o, Drain};
|
||||
use std::net::{TcpListener, UdpSocket};
|
||||
use std::sync::Arc;
|
@ -5,7 +5,7 @@
|
||||
#![cfg(test)]
|
||||
use crate::types::GossipEncoding;
|
||||
use ::types::{BeaconBlock, EthSpec, MinimalEthSpec, Signature, SignedBeaconBlock};
|
||||
use eth2_libp2p::*;
|
||||
use lighthouse_network::*;
|
||||
use slog::{debug, Level};
|
||||
|
||||
type E = MinimalEthSpec;
|
@ -1,6 +1,6 @@
|
||||
#![cfg(test)]
|
||||
use eth2_libp2p::rpc::methods::*;
|
||||
use eth2_libp2p::{BehaviourEvent, Libp2pEvent, ReportSource, Request, Response};
|
||||
use lighthouse_network::rpc::methods::*;
|
||||
use lighthouse_network::{BehaviourEvent, Libp2pEvent, ReportSource, Request, Response};
|
||||
use slog::{debug, warn, Level};
|
||||
use ssz_types::VariableList;
|
||||
use std::sync::Arc;
|
@ -17,7 +17,7 @@ environment = { path = "../../lighthouse/environment" }
|
||||
[dependencies]
|
||||
beacon_chain = { path = "../beacon_chain" }
|
||||
store = { path = "../store" }
|
||||
eth2_libp2p = { path = "../eth2_libp2p" }
|
||||
lighthouse_network = { path = "../lighthouse_network" }
|
||||
hashset_delay = { path = "../../common/hashset_delay" }
|
||||
types = { path = "../../consensus/types" }
|
||||
slot_clock = { path = "../../common/slot_clock" }
|
||||
|
@ -40,12 +40,12 @@
|
||||
|
||||
use crate::{metrics, service::NetworkMessage, sync::SyncMessage};
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes, BlockError, GossipVerifiedBlock};
|
||||
use eth2_libp2p::{
|
||||
use futures::stream::{Stream, StreamExt};
|
||||
use futures::task::Poll;
|
||||
use lighthouse_network::{
|
||||
rpc::{BlocksByRangeRequest, BlocksByRootRequest, StatusMessage},
|
||||
Client, MessageId, NetworkGlobals, PeerId, PeerRequestId,
|
||||
};
|
||||
use futures::stream::{Stream, StreamExt};
|
||||
use futures::task::Poll;
|
||||
use slog::{crit, debug, error, trace, warn, Logger};
|
||||
use std::cmp;
|
||||
use std::collections::VecDeque;
|
||||
|
@ -9,7 +9,7 @@ use beacon_chain::test_utils::{
|
||||
};
|
||||
use beacon_chain::{BeaconChain, MAXIMUM_GOSSIP_CLOCK_DISPARITY};
|
||||
use environment::{null_logger, Environment, EnvironmentBuilder};
|
||||
use eth2_libp2p::{
|
||||
use lighthouse_network::{
|
||||
discv5::enr::{CombinedKey, EnrBuilder},
|
||||
rpc::methods::{MetaData, MetaDataV2},
|
||||
types::{EnrAttestationBitfield, EnrSyncCommitteeBitfield},
|
||||
|
@ -13,10 +13,10 @@
|
||||
use super::MAX_SCHEDULED_WORK_QUEUE_LEN;
|
||||
use crate::metrics;
|
||||
use beacon_chain::{BeaconChainTypes, GossipVerifiedBlock, MAXIMUM_GOSSIP_CLOCK_DISPARITY};
|
||||
use eth2_libp2p::{MessageId, PeerId};
|
||||
use fnv::FnvHashMap;
|
||||
use futures::task::Poll;
|
||||
use futures::{Stream, StreamExt};
|
||||
use lighthouse_network::{MessageId, PeerId};
|
||||
use slog::{crit, debug, error, warn, Logger};
|
||||
use slot_clock::SlotClock;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
@ -7,7 +7,7 @@ use beacon_chain::{
|
||||
validator_monitor::get_block_delay_ms,
|
||||
BeaconChainError, BeaconChainTypes, BlockError, ForkChoiceError, GossipVerifiedBlock,
|
||||
};
|
||||
use eth2_libp2p::{Client, MessageAcceptance, MessageId, PeerAction, PeerId, ReportSource};
|
||||
use lighthouse_network::{Client, MessageAcceptance, MessageId, PeerAction, PeerId, ReportSource};
|
||||
use slog::{crit, debug, error, info, trace, warn};
|
||||
use slot_clock::SlotClock;
|
||||
use ssz::Encode;
|
||||
|
@ -3,10 +3,10 @@ use crate::service::NetworkMessage;
|
||||
use crate::status::ToStatusMessage;
|
||||
use crate::sync::SyncMessage;
|
||||
use beacon_chain::{BeaconChainError, BeaconChainTypes, HistoricalBlockError, WhenSlotSkipped};
|
||||
use eth2_libp2p::rpc::StatusMessage;
|
||||
use eth2_libp2p::rpc::*;
|
||||
use eth2_libp2p::{PeerId, PeerRequestId, ReportSource, Response, SyncInfo};
|
||||
use itertools::process_results;
|
||||
use lighthouse_network::rpc::StatusMessage;
|
||||
use lighthouse_network::rpc::*;
|
||||
use lighthouse_network::{PeerId, PeerRequestId, ReportSource, Response, SyncInfo};
|
||||
use slog::{debug, error, warn};
|
||||
use slot_clock::SlotClock;
|
||||
use types::{Epoch, EthSpec, Hash256, Slot};
|
||||
|
@ -7,7 +7,7 @@ use crate::sync::{BatchProcessResult, ChainId};
|
||||
use beacon_chain::{
|
||||
BeaconChainError, BeaconChainTypes, BlockError, ChainSegmentResult, HistoricalBlockError,
|
||||
};
|
||||
use eth2_libp2p::PeerId;
|
||||
use lighthouse_network::PeerId;
|
||||
use slog::{crit, debug, error, info, trace, warn};
|
||||
use tokio::sync::mpsc;
|
||||
use types::{Epoch, Hash256, SignedBeaconBlock};
|
||||
|
@ -3,6 +3,6 @@ use error_chain::error_chain;
|
||||
|
||||
error_chain! {
|
||||
links {
|
||||
Libp2p(eth2_libp2p::error::Error, eth2_libp2p::error::ErrorKind);
|
||||
Libp2p(lighthouse_network::error::Error, lighthouse_network::error::ErrorKind);
|
||||
}
|
||||
}
|
||||
|
@ -17,5 +17,5 @@ mod subnet_service;
|
||||
#[allow(clippy::mutable_key_type)] // PeerId in hashmaps are no longer permitted by clippy
|
||||
mod sync;
|
||||
|
||||
pub use eth2_libp2p::NetworkConfig;
|
||||
pub use lighthouse_network::NetworkConfig;
|
||||
pub use service::{NetworkMessage, NetworkService};
|
||||
|
@ -2,12 +2,12 @@ use beacon_chain::{
|
||||
attestation_verification::Error as AttnError,
|
||||
sync_committee_verification::Error as SyncCommitteeError,
|
||||
};
|
||||
use eth2_libp2p::PubsubMessage;
|
||||
use eth2_libp2p::{
|
||||
types::GossipKind, BandwidthSinks, GossipTopic, Gossipsub, NetworkGlobals, TopicHash,
|
||||
};
|
||||
use fnv::FnvHashMap;
|
||||
pub use lighthouse_metrics::*;
|
||||
use lighthouse_network::PubsubMessage;
|
||||
use lighthouse_network::{
|
||||
types::GossipKind, BandwidthSinks, GossipTopic, Gossipsub, NetworkGlobals, TopicHash,
|
||||
};
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
use strum::AsStaticRef;
|
||||
use types::{
|
||||
|
@ -1,4 +1,4 @@
|
||||
use eth2_libp2p::Enr;
|
||||
use lighthouse_network::Enr;
|
||||
use std::sync::Arc;
|
||||
use store::{DBColumn, Error as StoreError, HotColdDB, ItemStore, StoreItem};
|
||||
use types::{EthSpec, Hash256};
|
||||
@ -60,7 +60,7 @@ impl StoreItem for PersistedDht {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use eth2_libp2p::Enr;
|
||||
use lighthouse_network::Enr;
|
||||
use sloggers::{null::NullLoggerBuilder, Build};
|
||||
use std::str::FromStr;
|
||||
use store::config::StoreConfig;
|
||||
|
@ -10,11 +10,11 @@ mod processor;
|
||||
use crate::error;
|
||||
use crate::service::NetworkMessage;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2_libp2p::{
|
||||
use futures::prelude::*;
|
||||
use lighthouse_network::{
|
||||
rpc::RequestId, MessageId, NetworkGlobals, PeerId, PeerRequestId, PubsubMessage, Request,
|
||||
Response,
|
||||
};
|
||||
use futures::prelude::*;
|
||||
use processor::Processor;
|
||||
use slog::{debug, o, trace};
|
||||
use std::sync::Arc;
|
||||
|
@ -4,8 +4,10 @@ use crate::beacon_processor::{
|
||||
use crate::service::NetworkMessage;
|
||||
use crate::sync::SyncMessage;
|
||||
use beacon_chain::{BeaconChain, BeaconChainError, BeaconChainTypes};
|
||||
use eth2_libp2p::rpc::*;
|
||||
use eth2_libp2p::{Client, MessageId, NetworkGlobals, PeerId, PeerRequestId, Request, Response};
|
||||
use lighthouse_network::rpc::*;
|
||||
use lighthouse_network::{
|
||||
Client, MessageId, NetworkGlobals, PeerId, PeerRequestId, Request, Response,
|
||||
};
|
||||
use slog::{debug, error, o, trace, warn};
|
||||
use std::cmp;
|
||||
use std::sync::Arc;
|
||||
|
@ -7,17 +7,17 @@ use crate::{
|
||||
NetworkConfig,
|
||||
};
|
||||
use beacon_chain::{BeaconChain, BeaconChainError, BeaconChainTypes};
|
||||
use eth2_libp2p::{
|
||||
use futures::future::OptionFuture;
|
||||
use futures::prelude::*;
|
||||
use lighthouse_network::{
|
||||
rpc::{GoodbyeReason, RPCResponseErrorCode, RequestId},
|
||||
Libp2pEvent, PeerAction, PeerRequestId, PubsubMessage, ReportSource, Request, Response, Subnet,
|
||||
};
|
||||
use eth2_libp2p::{
|
||||
use lighthouse_network::{
|
||||
types::{GossipEncoding, GossipTopic},
|
||||
BehaviourEvent, MessageId, NetworkGlobals, PeerId,
|
||||
};
|
||||
use eth2_libp2p::{MessageAcceptance, Service as LibP2PService};
|
||||
use futures::future::OptionFuture;
|
||||
use futures::prelude::*;
|
||||
use lighthouse_network::{MessageAcceptance, Service as LibP2PService};
|
||||
use slog::{crit, debug, error, info, o, trace, warn};
|
||||
use std::{net::SocketAddr, pin::Pin, sync::Arc, time::Duration};
|
||||
use store::HotColdDB;
|
||||
@ -102,7 +102,7 @@ pub enum NetworkMessage<T: EthSpec> {
|
||||
},
|
||||
}
|
||||
|
||||
/// Service that handles communication between internal services and the `eth2_libp2p` network service.
|
||||
/// Service that handles communication between internal services and the `lighthouse_network` network service.
|
||||
pub struct NetworkService<T: BeaconChainTypes> {
|
||||
/// A reference to the underlying beacon chain.
|
||||
beacon_chain: Arc<BeaconChain<T>>,
|
||||
@ -469,7 +469,7 @@ fn spawn_service<T: BeaconChainTypes>(
|
||||
return;
|
||||
}
|
||||
let mut subscribed_topics: Vec<GossipTopic> = vec![];
|
||||
for topic_kind in eth2_libp2p::types::CORE_TOPICS.iter() {
|
||||
for topic_kind in lighthouse_network::types::CORE_TOPICS.iter() {
|
||||
for fork_digest in service.required_gossip_fork_digests() {
|
||||
let topic = GossipTopic::new(topic_kind.clone(), GossipEncoding::default(), fork_digest);
|
||||
if service.libp2p.swarm.behaviour_mut().subscribe(topic.clone()) {
|
||||
|
@ -4,7 +4,7 @@ mod tests {
|
||||
use crate::persisted_dht::load_dht;
|
||||
use crate::{NetworkConfig, NetworkService};
|
||||
use beacon_chain::test_utils::BeaconChainHarness;
|
||||
use eth2_libp2p::Enr;
|
||||
use lighthouse_network::Enr;
|
||||
use slog::{o, Drain, Level, Logger};
|
||||
use sloggers::{null::NullLoggerBuilder, Build};
|
||||
use std::str::FromStr;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use beacon_chain::{BeaconChain, BeaconChainError, BeaconChainTypes};
|
||||
|
||||
use eth2_libp2p::rpc::StatusMessage;
|
||||
use lighthouse_network::rpc::StatusMessage;
|
||||
/// Trait to produce a `StatusMessage` representing the state of the given `beacon_chain`.
|
||||
///
|
||||
/// NOTE: The purpose of this is simply to obtain a `StatusMessage` from the `BeaconChain` without
|
||||
|
@ -14,8 +14,8 @@ use rand::seq::SliceRandom;
|
||||
use slog::{debug, error, o, trace, warn};
|
||||
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2_libp2p::{NetworkConfig, Subnet, SubnetDiscovery};
|
||||
use hashset_delay::HashSetDelay;
|
||||
use lighthouse_network::{NetworkConfig, Subnet, SubnetDiscovery};
|
||||
use slot_clock::SlotClock;
|
||||
use types::{Attestation, EthSpec, Slot, SubnetId, ValidatorSubscription};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
pub mod attestation_subnets;
|
||||
pub mod sync_subnets;
|
||||
|
||||
use eth2_libp2p::{Subnet, SubnetDiscovery};
|
||||
use lighthouse_network::{Subnet, SubnetDiscovery};
|
||||
|
||||
pub use attestation_subnets::AttestationService;
|
||||
pub use sync_subnets::SyncCommitteeService;
|
||||
|
@ -12,8 +12,8 @@ use slog::{debug, error, o, trace, warn};
|
||||
|
||||
use super::SubnetServiceMessage;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2_libp2p::{NetworkConfig, Subnet, SubnetDiscovery};
|
||||
use hashset_delay::HashSetDelay;
|
||||
use lighthouse_network::{NetworkConfig, Subnet, SubnetDiscovery};
|
||||
use slot_clock::SlotClock;
|
||||
use types::{Epoch, EthSpec, SyncCommitteeSubscription, SyncSubnetId};
|
||||
|
||||
|
@ -4,10 +4,10 @@ use beacon_chain::{
|
||||
eth1_chain::CachingEth1Backend,
|
||||
BeaconChain,
|
||||
};
|
||||
use eth2_libp2p::NetworkConfig;
|
||||
use futures::prelude::*;
|
||||
use genesis::{generate_deterministic_keypairs, interop_genesis_state};
|
||||
use lazy_static::lazy_static;
|
||||
use lighthouse_network::NetworkConfig;
|
||||
use slog::Logger;
|
||||
use sloggers::{null::NullLoggerBuilder, Build};
|
||||
use slot_clock::{SlotClock, SystemTimeSlotClock};
|
||||
|
@ -14,8 +14,8 @@ use crate::sync::manager::BatchProcessResult;
|
||||
use crate::sync::network_context::SyncNetworkContext;
|
||||
use crate::sync::range_sync::{BatchConfig, BatchId, BatchInfo, BatchState};
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2_libp2p::types::{BackFillState, NetworkGlobals};
|
||||
use eth2_libp2p::{PeerAction, PeerId};
|
||||
use lighthouse_network::types::{BackFillState, NetworkGlobals};
|
||||
use lighthouse_network::{PeerAction, PeerId};
|
||||
use rand::seq::SliceRandom;
|
||||
use slog::{crit, debug, error, info, warn};
|
||||
use std::collections::{
|
||||
|
@ -42,11 +42,11 @@ use crate::beacon_processor::{ProcessId, WorkEvent as BeaconWorkEvent};
|
||||
use crate::service::NetworkMessage;
|
||||
use crate::status::ToStatusMessage;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes, BlockError};
|
||||
use eth2_libp2p::rpc::{methods::MAX_REQUEST_BLOCKS, BlocksByRootRequest, GoodbyeReason};
|
||||
use eth2_libp2p::types::{NetworkGlobals, SyncState};
|
||||
use eth2_libp2p::SyncInfo;
|
||||
use eth2_libp2p::{PeerAction, PeerId};
|
||||
use fnv::FnvHashMap;
|
||||
use lighthouse_network::rpc::{methods::MAX_REQUEST_BLOCKS, BlocksByRootRequest, GoodbyeReason};
|
||||
use lighthouse_network::types::{NetworkGlobals, SyncState};
|
||||
use lighthouse_network::SyncInfo;
|
||||
use lighthouse_network::{PeerAction, PeerId};
|
||||
use lru_cache::LRUCache;
|
||||
use slog::{crit, debug, error, info, trace, warn, Logger};
|
||||
use smallvec::SmallVec;
|
||||
|
@ -7,9 +7,11 @@ use super::RequestId as SyncRequestId;
|
||||
use crate::service::NetworkMessage;
|
||||
use crate::status::ToStatusMessage;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2_libp2p::rpc::{BlocksByRangeRequest, BlocksByRootRequest, GoodbyeReason, RequestId};
|
||||
use eth2_libp2p::{Client, NetworkGlobals, PeerAction, PeerId, ReportSource, Request};
|
||||
use fnv::FnvHashMap;
|
||||
use lighthouse_network::rpc::{
|
||||
BlocksByRangeRequest, BlocksByRootRequest, GoodbyeReason, RequestId,
|
||||
};
|
||||
use lighthouse_network::{Client, NetworkGlobals, PeerAction, PeerId, ReportSource, Request};
|
||||
use slog::{debug, trace, warn};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::mpsc;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::manager::SLOT_IMPORT_TOLERANCE;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2_libp2p::{SyncInfo, SyncStatus as PeerSyncStatus};
|
||||
use lighthouse_network::{SyncInfo, SyncStatus as PeerSyncStatus};
|
||||
use std::cmp::Ordering;
|
||||
|
||||
/// The type of peer relative to our current state.
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::sync::RequestId;
|
||||
use eth2_libp2p::rpc::methods::BlocksByRangeRequest;
|
||||
use eth2_libp2p::PeerId;
|
||||
use lighthouse_network::rpc::methods::BlocksByRangeRequest;
|
||||
use lighthouse_network::PeerId;
|
||||
use ssz::Encode;
|
||||
use std::collections::HashSet;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
@ -3,8 +3,8 @@ use crate::beacon_processor::ProcessId;
|
||||
use crate::beacon_processor::WorkEvent as BeaconWorkEvent;
|
||||
use crate::sync::{network_context::SyncNetworkContext, BatchProcessResult, RequestId};
|
||||
use beacon_chain::BeaconChainTypes;
|
||||
use eth2_libp2p::{PeerAction, PeerId};
|
||||
use fnv::FnvHashMap;
|
||||
use lighthouse_network::{PeerAction, PeerId};
|
||||
use rand::seq::SliceRandom;
|
||||
use slog::{crit, debug, o, warn};
|
||||
use std::collections::{btree_map::Entry, BTreeMap, HashSet};
|
||||
|
@ -9,9 +9,9 @@ use crate::beacon_processor::WorkEvent as BeaconWorkEvent;
|
||||
use crate::metrics;
|
||||
use crate::sync::network_context::SyncNetworkContext;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2_libp2p::PeerId;
|
||||
use eth2_libp2p::SyncInfo;
|
||||
use fnv::FnvHashMap;
|
||||
use lighthouse_network::PeerId;
|
||||
use lighthouse_network::SyncInfo;
|
||||
use slog::{crit, debug, error};
|
||||
use smallvec::SmallVec;
|
||||
use std::collections::hash_map::Entry;
|
||||
|
@ -47,8 +47,8 @@ use crate::status::ToStatusMessage;
|
||||
use crate::sync::network_context::SyncNetworkContext;
|
||||
use crate::sync::{BatchProcessResult, RequestId};
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2_libp2p::PeerId;
|
||||
use eth2_libp2p::SyncInfo;
|
||||
use lighthouse_network::PeerId;
|
||||
use lighthouse_network::SyncInfo;
|
||||
use slog::{crit, debug, error, trace};
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//! of a remote.
|
||||
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2_libp2p::SyncInfo;
|
||||
use lighthouse_network::SyncInfo;
|
||||
use std::sync::Arc;
|
||||
|
||||
/// The type of Range sync that should be done relative to our current state.
|
||||
|
@ -2,9 +2,9 @@ use clap::ArgMatches;
|
||||
use clap_utils::{flags::DISABLE_MALLOC_TUNING_FLAG, BAD_TESTNET_DIR_MESSAGE};
|
||||
use client::{ClientConfig, ClientGenesis};
|
||||
use directory::{DEFAULT_BEACON_NODE_DIR, DEFAULT_NETWORK_DIR, DEFAULT_ROOT_DIR};
|
||||
use eth2_libp2p::{multiaddr::Protocol, Enr, Multiaddr, NetworkConfig, PeerIdSerialized};
|
||||
use eth2_network_config::{Eth2NetworkConfig, DEFAULT_HARDCODED_NETWORK};
|
||||
use http_api::TlsConfig;
|
||||
use lighthouse_network::{multiaddr::Protocol, Enr, Multiaddr, NetworkConfig, PeerIdSerialized};
|
||||
use sensitive_url::SensitiveUrl;
|
||||
use slog::{info, warn, Logger};
|
||||
use std::cmp;
|
||||
|
@ -158,7 +158,7 @@ impl<E: EthSpec> DerefMut for ProductionBeaconNode<E> {
|
||||
#[derive(Clone)]
|
||||
struct Discv5Executor(task_executor::TaskExecutor);
|
||||
|
||||
impl eth2_libp2p::discv5::Executor for Discv5Executor {
|
||||
impl lighthouse_network::discv5::Executor for Discv5Executor {
|
||||
fn spawn(&self, future: std::pin::Pin<Box<dyn std::future::Future<Output = ()> + Send>>) {
|
||||
self.0.spawn(future, "discv5")
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
beacon_node = { path = "../beacon_node" }
|
||||
clap = "2.33.3"
|
||||
eth2_libp2p = { path = "../beacon_node/eth2_libp2p" }
|
||||
lighthouse_network = { path = "../beacon_node/lighthouse_network" }
|
||||
types = { path = "../consensus/types" }
|
||||
eth2_ssz = "0.4.0"
|
||||
slog = "2.5.2"
|
||||
|
@ -1,7 +1,7 @@
|
||||
use beacon_node::{get_data_dir, get_eth2_network_config, set_network_config};
|
||||
use clap::ArgMatches;
|
||||
use eth2_libp2p::discv5::{enr::CombinedKey, Discv5Config, Enr};
|
||||
use eth2_libp2p::{
|
||||
use lighthouse_network::discv5::{enr::CombinedKey, Discv5Config, Enr};
|
||||
use lighthouse_network::{
|
||||
discovery::{create_enr_builder_from_config, load_enr_from_disk, use_or_load_enr},
|
||||
load_private_key, CombinedKeyExt, NetworkConfig,
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
//! The main bootnode server execution.
|
||||
|
||||
use super::BootNodeConfig;
|
||||
use eth2_libp2p::{
|
||||
use lighthouse_network::{
|
||||
discv5::{enr::NodeId, Discv5, Discv5Event},
|
||||
EnrExt, Eth2Enr,
|
||||
};
|
||||
|
@ -11,7 +11,7 @@ serde = { version = "1.0.116", features = ["derive"] }
|
||||
serde_json = "1.0.58"
|
||||
types = { path = "../../consensus/types" }
|
||||
reqwest = { version = "0.11.0", features = ["json","stream"] }
|
||||
eth2_libp2p = { path = "../../beacon_node/eth2_libp2p" }
|
||||
lighthouse_network = { path = "../../beacon_node/lighthouse_network" }
|
||||
proto_array = { path = "../../consensus/proto_array", optional = true }
|
||||
eth2_serde_utils = "0.1.0"
|
||||
eth2_keystore = { path = "../../crypto/eth2_keystore" }
|
||||
|
@ -13,9 +13,9 @@ pub mod lighthouse_vc;
|
||||
pub mod types;
|
||||
|
||||
use self::types::{Error as ResponseError, *};
|
||||
use eth2_libp2p::PeerId;
|
||||
use futures::Stream;
|
||||
use futures_util::StreamExt;
|
||||
use lighthouse_network::PeerId;
|
||||
pub use reqwest;
|
||||
use reqwest::{IntoUrl, Response};
|
||||
pub use reqwest::{StatusCode, Url};
|
||||
|
@ -12,7 +12,7 @@ use ssz::four_byte_option_impl;
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use store::{AnchorInfo, Split};
|
||||
|
||||
pub use eth2_libp2p::{types::SyncState, PeerInfo};
|
||||
pub use lighthouse_network::{types::SyncState, PeerInfo};
|
||||
|
||||
// Define "legacy" implementations of `Option<T>` which use four bytes for encoding the union
|
||||
// selector.
|
||||
|
@ -2,7 +2,7 @@
|
||||
//! required for the HTTP API.
|
||||
|
||||
use crate::Error as ServerError;
|
||||
use eth2_libp2p::{ConnectionDirection, Enr, Multiaddr, PeerConnectionStatus};
|
||||
use lighthouse_network::{ConnectionDirection, Enr, Multiaddr, PeerConnectionStatus};
|
||||
pub use reqwest::header::ACCEPT;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::convert::TryFrom;
|
||||
|
@ -26,7 +26,7 @@ genesis = { path = "../beacon_node/genesis" }
|
||||
deposit_contract = { path = "../common/deposit_contract" }
|
||||
tree_hash = "0.4.0"
|
||||
clap_utils = { path = "../common/clap_utils" }
|
||||
eth2_libp2p = { path = "../beacon_node/eth2_libp2p" }
|
||||
lighthouse_network = { path = "../beacon_node/lighthouse_network" }
|
||||
validator_dir = { path = "../common/validator_dir", features = ["insecure_keys"] }
|
||||
lighthouse_version = { path = "../common/lighthouse_version" }
|
||||
directory = { path = "../common/directory" }
|
||||
|
@ -1,5 +1,5 @@
|
||||
use clap::ArgMatches;
|
||||
use eth2_libp2p::{
|
||||
use lighthouse_network::{
|
||||
discovery::{build_enr, CombinedKey, CombinedKeyExt, Keypair, ENR_FILENAME},
|
||||
NetworkConfig, NETWORK_KEY_FILENAME,
|
||||
};
|
||||
|
@ -45,7 +45,7 @@ malloc_utils = { path = "../common/malloc_utils" }
|
||||
tempfile = "3.1.0"
|
||||
validator_dir = { path = "../common/validator_dir" }
|
||||
slashing_protection = { path = "../validator_client/slashing_protection" }
|
||||
eth2_libp2p = { path = "../beacon_node/eth2_libp2p" }
|
||||
lighthouse_network = { path = "../beacon_node/lighthouse_network" }
|
||||
|
||||
[[test]]
|
||||
name = "lighthouse_tests"
|
||||
|
@ -1,6 +1,6 @@
|
||||
use beacon_node::ClientConfig as Config;
|
||||
|
||||
use eth2_libp2p::PeerId;
|
||||
use lighthouse_network::PeerId;
|
||||
use serde_json::from_reader;
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
|
@ -7,7 +7,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
beacon_chain = { path = "../../beacon_node/beacon_chain" }
|
||||
directory = { path = "../../common/directory" }
|
||||
eth2_libp2p = { path = "../../beacon_node/eth2_libp2p" }
|
||||
lighthouse_network = { path = "../../beacon_node/lighthouse_network" }
|
||||
network = { path = "../../beacon_node/network" }
|
||||
slasher = { path = ".." }
|
||||
slog = "2.5.2"
|
||||
|
@ -2,7 +2,7 @@ use beacon_chain::{
|
||||
observed_operations::ObservationOutcome, BeaconChain, BeaconChainError, BeaconChainTypes,
|
||||
};
|
||||
use directory::size_of_dir;
|
||||
use eth2_libp2p::PubsubMessage;
|
||||
use lighthouse_network::PubsubMessage;
|
||||
use network::NetworkMessage;
|
||||
use slasher::{
|
||||
metrics::{self, SLASHER_DATABASE_SIZE, SLASHER_RUN_TIME},
|
||||
|
Loading…
Reference in New Issue
Block a user