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:
Daniel Knopik
2025-09-10 14:59:24 +02:00
committed by GitHub
parent caa1df6fc3
commit ee1b6bc81b
42 changed files with 198 additions and 169 deletions

View File

@@ -54,10 +54,11 @@ use eth2::types::{
use eth2::{CONSENSUS_VERSION_HEADER, CONTENT_TYPE_HEADER, SSZ_CONTENT_TYPE_HEADER};
use health_metrics::observe::Observe;
use lighthouse_network::rpc::methods::MetaData;
use lighthouse_network::{Enr, EnrExt, NetworkGlobals, PeerId, PubsubMessage, types::SyncState};
use lighthouse_network::{Enr, NetworkGlobals, PeerId, PubsubMessage, types::SyncState};
use lighthouse_version::version_with_platform;
use logging::{SSELoggingComponents, crit};
use network::{NetworkMessage, NetworkSenders, ValidatorSubscriptionMessage};
use network_utils::enr_ext::EnrExt;
use operation_pool::ReceivedPreCapella;
use parking_lot::RwLock;
pub use publish_blocks::{