mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Create network_utils crate (#7761)
Anchor currently depends on `lighthouse_network` for a few types and utilities that live within. As we use our own libp2p behaviours, we actually do not use the core logic in that crate. This makes us transitively depend on a bunch of unneeded crates (even a whole separate libp2p if the versions mismatch!) Move things we require into it's own lightweight crate. Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
This commit is contained in:
@@ -57,6 +57,7 @@ lighthouse_tracing = { workspace = true }
|
||||
lighthouse_version = { workspace = true }
|
||||
logging = { workspace = true }
|
||||
metrics = { workspace = true }
|
||||
network_utils = { workspace = true }
|
||||
opentelemetry = { workspace = true }
|
||||
opentelemetry-otlp = { workspace = true }
|
||||
opentelemetry_sdk = { workspace = true }
|
||||
@@ -70,7 +71,6 @@ tracing = { workspace = true }
|
||||
tracing-opentelemetry = { workspace = true }
|
||||
tracing-subscriber = { workspace = true }
|
||||
types = { workspace = true }
|
||||
unused_port = { workspace = true }
|
||||
validator_client = { workspace = true }
|
||||
validator_manager = { path = "../validator_manager" }
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@ use beacon_node::{
|
||||
};
|
||||
use beacon_processor::BeaconProcessorConfig;
|
||||
use lighthouse_network::PeerId;
|
||||
use network_utils::unused_port::{
|
||||
unused_tcp4_port, unused_tcp6_port, unused_udp4_port, unused_udp6_port,
|
||||
};
|
||||
use std::fs::File;
|
||||
use std::io::{Read, Write};
|
||||
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
|
||||
@@ -22,7 +25,6 @@ use std::time::Duration;
|
||||
use tempfile::TempDir;
|
||||
use types::non_zero_usize::new_non_zero_usize;
|
||||
use types::{Address, Checkpoint, Epoch, Hash256, MainnetEthSpec};
|
||||
use unused_port::{unused_tcp4_port, unused_tcp6_port, unused_udp4_port, unused_udp6_port};
|
||||
|
||||
const DEFAULT_EXECUTION_ENDPOINT: &str = "http://localhost:8551/";
|
||||
const DEFAULT_EXECUTION_JWT_SECRET_KEY: &str =
|
||||
|
||||
@@ -3,8 +3,8 @@ use boot_node::config::BootNodeConfigSerialization;
|
||||
use crate::exec::{CommandLineTestExec, CompletedTest};
|
||||
use clap::ArgMatches;
|
||||
use clap_utils::get_eth2_network_config;
|
||||
use lighthouse_network::Enr;
|
||||
use lighthouse_network::discovery::ENR_FILENAME;
|
||||
use lighthouse_network::{Enr, discovery::ENR_FILENAME};
|
||||
use network_utils::unused_port::unused_udp4_port;
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
use std::net::Ipv4Addr;
|
||||
@@ -12,7 +12,6 @@ use std::path::{Path, PathBuf};
|
||||
use std::process::Command;
|
||||
use std::str::FromStr;
|
||||
use tempfile::TempDir;
|
||||
use unused_port::unused_udp4_port;
|
||||
|
||||
const IP_ADDRESS: &str = "192.168.2.108";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user