diff --git a/crates/subspace-farmer/src/bin/subspace-farmer/commands/shared/network.rs b/crates/subspace-farmer/src/bin/subspace-farmer/commands/shared/network.rs index 158a8edd31..d044297abf 100644 --- a/crates/subspace-farmer/src/bin/subspace-farmer/commands/shared/network.rs +++ b/crates/subspace-farmer/src/bin/subspace-farmer/commands/shared/network.rs @@ -98,7 +98,7 @@ pub(in super::super) fn configure_network( node_client: NC, farmer_caches: FarmerCaches, prometheus_metrics_registry: Option<&mut Registry>, -) -> Result<(Node, NodeRunner), anyhow::Error> +) -> Result<(Node, NodeRunner), anyhow::Error> where FarmIndex: Hash + Eq + Copy + fmt::Debug + Send + Sync + 'static, usize: From, @@ -116,12 +116,7 @@ where .map(Box::new)?; let maybe_weak_node = Arc::new(Mutex::new(None::)); - let default_config = Config::new( - protocol_prefix, - keypair, - farmer_caches.clone(), - prometheus_metrics_registry, - ); + let default_config = Config::new(protocol_prefix, keypair, prometheus_metrics_registry); let config = Config { reserved_peers, listen_on, diff --git a/crates/subspace-farmer/src/farmer_cache.rs b/crates/subspace-farmer/src/farmer_cache.rs index 4912fd161d..41fccc13d7 100644 --- a/crates/subspace-farmer/src/farmer_cache.rs +++ b/crates/subspace-farmer/src/farmer_cache.rs @@ -34,13 +34,12 @@ use std::{fmt, mem}; use subspace_core_primitives::pieces::{Piece, PieceIndex}; use subspace_core_primitives::segments::{SegmentHeader, SegmentIndex}; use subspace_data_retrieval::piece_getter::PieceGetter; -use subspace_networking::libp2p::kad::{ProviderRecord, RecordKey}; +use subspace_networking::libp2p::kad::RecordKey; use subspace_networking::libp2p::PeerId; use subspace_networking::utils::multihash::ToMultihash; -use subspace_networking::{KeyWithDistance, LocalRecordProvider}; -use tokio::runtime::Handle; +use subspace_networking::KeyWithDistance; use tokio::sync::Semaphore; -use tokio::task::{block_in_place, yield_now}; +use tokio::task::yield_now; use tracing::{debug, error, info, info_span, trace, warn, Instrument}; const WORKER_CHANNEL_CAPACITY: usize = 100; @@ -50,9 +49,6 @@ const SYNC_CONCURRENT_BATCHES: usize = 4; /// this number defines an interval in pieces after which cache is updated const INTERMEDIATE_CACHE_UPDATE_INTERVAL: usize = 100; const INITIAL_SYNC_FARM_INFO_CHECK_INTERVAL: Duration = Duration::from_secs(1); -/// How long to wait for `is_piece_maybe_stored` response from plot cache before timing out in order -/// to prevent blocking of executor for too long -const IS_PIECE_MAYBE_STORED_TIMEOUT: Duration = Duration::from_millis(100); type HandlerFn = Arc; type Handler = Bag, A>; @@ -1603,65 +1599,6 @@ impl FarmerCache { } } -impl LocalRecordProvider for FarmerCache { - fn record(&self, key: &RecordKey) -> Option { - let distance_key = KeyWithDistance::new(self.peer_id, key.clone()); - if self - .piece_caches - .try_read()? - .contains_stored_piece(&distance_key) - { - // Note: We store our own provider records locally without local addresses - // to avoid redundant storage and outdated addresses. Instead, these are - // acquired on demand when returning a `ProviderRecord` for the local node. - return Some(ProviderRecord { - key: key.clone(), - provider: self.peer_id, - expires: None, - addresses: Vec::new(), - }); - }; - - let found_fut = self - .plot_caches - .caches - .try_read()? - .iter() - .map(|plot_cache| { - let plot_cache = Arc::clone(plot_cache); - - async move { - matches!( - plot_cache.is_piece_maybe_stored(key).await, - Ok(MaybePieceStoredResult::Yes) - ) - } - }) - .collect::>() - .any(|found| async move { found }); - - // TODO: Ideally libp2p would have an async API record store API, - let found = block_in_place(|| { - Handle::current() - .block_on(tokio::time::timeout( - IS_PIECE_MAYBE_STORED_TIMEOUT, - found_fut, - )) - .unwrap_or_default() - }); - - // Note: We store our own provider records locally without local addresses - // to avoid redundant storage and outdated addresses. Instead, these are - // acquired on demand when returning a `ProviderRecord` for the local node. - found.then_some(ProviderRecord { - key: key.clone(), - provider: self.peer_id, - expires: None, - addresses: Vec::new(), - }) - } -} - /// Collection of [`FarmerCache`] instances for load balancing #[derive(Debug, Clone)] pub struct FarmerCaches { @@ -1733,12 +1670,6 @@ impl FarmerCaches { } } -impl LocalRecordProvider for FarmerCaches { - fn record(&self, key: &RecordKey) -> Option { - self.caches.choose(&mut thread_rng())?.record(key) - } -} - /// Extracts the `PieceIndex` from a `RecordKey`. fn decode_piece_index_from_record_key(key: &RecordKey) -> PieceIndex { let len = key.as_ref().len(); diff --git a/crates/subspace-gateway/src/commands.rs b/crates/subspace-gateway/src/commands.rs index 8b40ea1e71..b82e30d9ef 100644 --- a/crates/subspace-gateway/src/commands.rs +++ b/crates/subspace-gateway/src/commands.rs @@ -128,7 +128,7 @@ pub async fn initialize_object_fetcher( options: GatewayOptions, ) -> anyhow::Result<( ObjectFetcher>>, - NodeRunner<()>, + NodeRunner, )> { let GatewayOptions { dev, diff --git a/crates/subspace-gateway/src/commands/network.rs b/crates/subspace-gateway/src/commands/network.rs index f985c59a5a..96c2e0284b 100644 --- a/crates/subspace-gateway/src/commands/network.rs +++ b/crates/subspace-gateway/src/commands/network.rs @@ -64,7 +64,7 @@ pub async fn configure_network( pending_out_connections, listen_on, }: NetworkArgs, -) -> anyhow::Result<(Node, NodeRunner<()>, RpcNodeClient)> { +) -> anyhow::Result<(Node, NodeRunner, RpcNodeClient)> { info!(url = %node_rpc_url, "Connecting to node RPC"); let node_client = RpcNodeClient::new(&node_rpc_url) .await @@ -89,12 +89,12 @@ pub async fn configure_network( debug!(?dsn_protocol_version, "Setting DSN protocol version..."); // TODO: - // - use a fixed identity kepair + // - use a fixed identity keypair // - cache known peers on disk // - prometheus telemetry let keypair = identity::ed25519::Keypair::generate(); let keypair = identity::Keypair::from(keypair); - let default_config = Config::new(dsn_protocol_version, keypair, (), None); + let default_config = Config::new(dsn_protocol_version, keypair, None); let config = Config { bootstrap_addresses: bootstrap_nodes, diff --git a/crates/subspace-networking/examples/benchmark.rs b/crates/subspace-networking/examples/benchmark.rs index 85bfa61227..f356f503ce 100644 --- a/crates/subspace-networking/examples/benchmark.rs +++ b/crates/subspace-networking/examples/benchmark.rs @@ -345,7 +345,7 @@ pub async fn configure_dsn( ) -> Node { let keypair = Keypair::generate_ed25519(); - let default_config = Config::new(protocol_prefix, keypair, (), None); + let default_config = Config::new(protocol_prefix, keypair, None); let config = Config { listen_on: vec!["/ip4/0.0.0.0/tcp/0".parse().unwrap()], diff --git a/crates/subspace-networking/examples/random-walker.rs b/crates/subspace-networking/examples/random-walker.rs index f2e4fac004..75e0115120 100644 --- a/crates/subspace-networking/examples/random-walker.rs +++ b/crates/subspace-networking/examples/random-walker.rs @@ -366,7 +366,7 @@ async fn configure_dsn( ) -> Node { let keypair = Keypair::generate_ed25519(); - let default_config = Config::new(protocol_prefix, keypair, (), None); + let default_config = Config::new(protocol_prefix, keypair, None); let config = Config { listen_on: vec!["/ip4/0.0.0.0/tcp/0".parse().unwrap()], diff --git a/crates/subspace-networking/src/behavior.rs b/crates/subspace-networking/src/behavior.rs index cb7ceac09e..ce2797ad6b 100644 --- a/crates/subspace-networking/src/behavior.rs +++ b/crates/subspace-networking/src/behavior.rs @@ -2,6 +2,7 @@ pub(crate) mod persistent_parameters; #[cfg(test)] mod tests; +use crate::constructor::DummyRecordStore; use crate::protocols::autonat_wrapper::{ Behaviour as AutonatWrapper, Config as AutonatWrapperConfig, }; @@ -29,7 +30,7 @@ use void::Void as VoidEvent; type BlockListBehaviour = AllowBlockListBehaviour; -pub(crate) struct BehaviorConfig { +pub(crate) struct BehaviorConfig { /// Identity keypair of a node used for authenticated connections. pub(crate) peer_id: PeerId, /// The configuration for the [`Identify`] behaviour. @@ -38,8 +39,6 @@ pub(crate) struct BehaviorConfig { pub(crate) kademlia: KademliaConfig, /// The configuration for the [`Gossipsub`] behaviour. pub(crate) gossipsub: Option, - /// Externally provided implementation of the custom record store for Kademlia DHT, - pub(crate) record_store: RecordStore, /// The configuration for the [`RequestResponsesBehaviour`] protocol. pub(crate) request_response_protocols: Vec>, /// The upper bound for the number of concurrent inbound + outbound streams for request/response @@ -55,12 +54,12 @@ pub(crate) struct BehaviorConfig { #[derive(NetworkBehaviour)] #[behaviour(to_swarm = "Event")] -pub(crate) struct Behavior { +pub(crate) struct Behavior { // TODO: Connection limits must be the first protocol due to https://github.com/libp2p/rust-libp2p/issues/4773 as // suggested in https://github.com/libp2p/rust-libp2p/issues/4898#issuecomment-1818013483 pub(crate) connection_limits: ConnectionLimitsBehaviour, pub(crate) identify: Identify, - pub(crate) kademlia: Kademlia, + pub(crate) kademlia: Kademlia, pub(crate) gossipsub: Toggle, pub(crate) ping: Ping, pub(crate) request_response: RequestResponseFactoryBehaviour, @@ -69,16 +68,9 @@ pub(crate) struct Behavior { pub(crate) autonat: AutonatWrapper, } -impl Behavior -where - RecordStore: Send + Sync + libp2p::kad::store::RecordStore + 'static, -{ - pub(crate) fn new(config: BehaviorConfig) -> Self { - let kademlia = Kademlia::::with_config( - config.peer_id, - config.record_store, - config.kademlia, - ); +impl Behavior { + pub(crate) fn new(config: BehaviorConfig) -> Self { + let kademlia = Kademlia::with_config(config.peer_id, DummyRecordStore, config.kademlia); let gossipsub = config .gossipsub diff --git a/crates/subspace-networking/src/bin/subspace-bootstrap-node/main.rs b/crates/subspace-networking/src/bin/subspace-bootstrap-node/main.rs index 9453c15c28..8e3f07ad18 100644 --- a/crates/subspace-networking/src/bin/subspace-bootstrap-node/main.rs +++ b/crates/subspace-networking/src/bin/subspace-bootstrap-node/main.rs @@ -162,12 +162,7 @@ async fn main() -> Result<(), Box> { kademlia_mode: KademliaMode::Static(Mode::Server), external_addresses, - ..Config::new( - protocol_version.to_string(), - keypair, - (), - dsn_metrics_registry, - ) + ..Config::new(protocol_version.to_string(), keypair, dsn_metrics_registry) }; let (node, mut node_runner) = subspace_networking::construct(config).expect("Networking stack creation failed."); diff --git a/crates/subspace-networking/src/constructor.rs b/crates/subspace-networking/src/constructor.rs index 70b29f433f..32eb742ffe 100644 --- a/crates/subspace-networking/src/constructor.rs +++ b/crates/subspace-networking/src/constructor.rs @@ -110,35 +110,9 @@ impl KademliaMode { } } -/// Trait to be implemented on providers of local records -pub trait LocalRecordProvider { - /// Gets a provider record for key that is stored locally - fn record(&self, key: &RecordKey) -> Option; -} - -impl LocalRecordProvider for () { - fn record(&self, _key: &RecordKey) -> Option { - None - } -} - -/// Record store that can't be created, only -pub(crate) struct LocalOnlyRecordStore { - local_records_provider: LocalRecordProvider, -} - -impl LocalOnlyRecordStore { - fn new(local_records_provider: LocalRecordProvider) -> Self { - Self { - local_records_provider, - } - } -} +pub(crate) struct DummyRecordStore; -impl RecordStore for LocalOnlyRecordStore -where - LocalRecordProvider: self::LocalRecordProvider, -{ +impl RecordStore for DummyRecordStore { type RecordsIter<'a> = Empty> where @@ -148,49 +122,55 @@ where where Self: 'a; + #[inline] fn get(&self, _key: &RecordKey) -> Option> { // Not supported None } + #[inline] fn put(&mut self, _record: Record) -> store::Result<()> { // Not supported Ok(()) } + #[inline] fn remove(&mut self, _key: &RecordKey) { // Not supported } + #[inline] fn records(&self) -> Self::RecordsIter<'_> { - // We don't use Kademlia's periodic replication + // Not supported iter::empty() } + #[inline] fn add_provider(&mut self, _record: ProviderRecord) -> store::Result<()> { // Not supported Ok(()) } - fn providers(&self, key: &RecordKey) -> Vec { - self.local_records_provider - .record(key) - .into_iter() - .collect() + #[inline] + fn providers(&self, _key: &RecordKey) -> Vec { + // Not supported + Vec::new() } + #[inline] fn provided(&self) -> Self::ProvidedIter<'_> { - // We don't use Kademlia's periodic replication + // Not supported iter::empty() } + #[inline] fn remove_provider(&mut self, _key: &RecordKey, _provider: &PeerId) { // Not supported } } /// [`Node`] configuration. -pub struct Config { +pub struct Config { /// Identity keypair of a node used for authenticated connections. pub keypair: identity::Keypair, /// List of [`Multiaddr`] on which to listen for incoming connections. @@ -206,8 +186,6 @@ pub struct Config { pub kademlia: KademliaConfig, /// The configuration for the Gossip behaviour. pub gossipsub: Option, - /// Externally provided implementation of the local records provider - pub local_records_provider: LocalRecordProvider, /// Yamux multiplexing configuration. pub yamux_config: YamuxConfig, /// Should non-global addresses be added to the DHT? @@ -249,7 +227,7 @@ pub struct Config { pub external_addresses: Vec, } -impl fmt::Debug for Config { +impl fmt::Debug for Config { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Config").finish() @@ -258,31 +236,22 @@ impl fmt::Debug for Config { /// This default can only be used for `dev` networks. /// Other networks should use `Config::new()` to apply the correct prefix to the protocol version. -impl Default for Config<()> { +impl Default for Config { #[inline] fn default() -> Self { let ed25519_keypair = identity::ed25519::Keypair::generate(); let keypair = identity::Keypair::from(ed25519_keypair); - Self::new( - DEFAULT_NETWORK_PROTOCOL_VERSION.to_string(), - keypair, - (), - None, - ) + Self::new(DEFAULT_NETWORK_PROTOCOL_VERSION.to_string(), keypair, None) } } -impl Config -where - LocalRecordProvider: self::LocalRecordProvider, -{ +impl Config { /// Creates a new [`Config`]. /// Applies a subspace-specific version prefix to the `protocol_version`. pub fn new( protocol_version: String, keypair: identity::Keypair, - local_records_provider: LocalRecordProvider, prometheus_registry: Option<&mut Registry>, ) -> Self { let (libp2p_metrics, metrics) = prometheus_registry @@ -349,7 +318,6 @@ where identify, kademlia, gossipsub, - local_records_provider, allow_non_global_addresses_in_dht: false, initial_random_query_interval: Duration::from_secs(1), known_peers_registry: StubNetworkingParametersManager.boxed(), @@ -398,12 +366,7 @@ pub fn peer_id(keypair: &identity::Keypair) -> PeerId { } /// Create a new network node and node runner instances. -pub fn construct( - config: Config, -) -> Result<(Node, NodeRunner), CreationError> -where - LocalRecordProvider: self::LocalRecordProvider + Send + Sync + 'static, -{ +pub fn construct(config: Config) -> Result<(Node, NodeRunner), CreationError> { let Config { keypair, listen_on, @@ -412,7 +375,6 @@ where identify, kademlia, gossipsub, - local_records_provider, yamux_config, allow_non_global_addresses_in_dht, initial_random_query_interval, @@ -468,7 +430,6 @@ where identify, kademlia, gossipsub, - record_store: LocalOnlyRecordStore::new(local_records_provider), request_response_protocols, request_response_max_concurrent_streams: { let max_num_connections = max_established_incoming_connections as usize diff --git a/crates/subspace-networking/src/lib.rs b/crates/subspace-networking/src/lib.rs index bc0bdc59a4..4a07d58e2c 100644 --- a/crates/subspace-networking/src/lib.rs +++ b/crates/subspace-networking/src/lib.rs @@ -21,9 +21,7 @@ pub use crate::node::{ GetClosestPeersError, Node, SendRequestError, SubscribeError, TopicSubscription, WeakNode, }; pub use crate::node_runner::NodeRunner; -pub use constructor::{ - construct, peer_id, Config, CreationError, KademliaMode, LocalRecordProvider, -}; +pub use constructor::{construct, peer_id, Config, CreationError, KademliaMode}; pub use libp2p; pub use shared::PeerDiscovered; pub use utils::key_with_distance::KeyWithDistance; diff --git a/crates/subspace-networking/src/node_runner.rs b/crates/subspace-networking/src/node_runner.rs index 8c85e1e2f8..943eb53faf 100644 --- a/crates/subspace-networking/src/node_runner.rs +++ b/crates/subspace-networking/src/node_runner.rs @@ -2,9 +2,8 @@ use crate::behavior::persistent_parameters::{ append_p2p_suffix, remove_p2p_suffix, KnownPeersRegistry, PeerAddressRemovedEvent, }; use crate::behavior::{Behavior, Event}; -use crate::constructor; use crate::constructor::temporary_bans::TemporaryBans; -use crate::constructor::LocalOnlyRecordStore; +use crate::constructor::DummyRecordStore; use crate::protocols::request_response::request_response_factory::{ Event as RequestResponseEvent, IfDisconnected, }; @@ -83,16 +82,13 @@ enum BootstrapCommandState { /// Runner for the Node. #[must_use = "Node does not function properly unless its runner is driven forward"] -pub struct NodeRunner -where - LocalRecordProvider: constructor::LocalRecordProvider + Send + Sync + 'static, -{ +pub struct NodeRunner { /// Should non-global addresses be added to the DHT? allow_non_global_addresses_in_dht: bool, /// Whether node is listening on some addresses is_listening: bool, command_receiver: mpsc::Receiver, - swarm: Swarm>>, + swarm: Swarm, shared_weak: Weak, /// How frequently should random queries be done using Kademlia DHT to populate routing table. next_random_query_interval: Duration, @@ -132,10 +128,7 @@ where _address_removal_task_handler_id: Option, } -impl fmt::Debug for NodeRunner -where - LocalRecordProvider: constructor::LocalRecordProvider + Send + Sync + 'static, -{ +impl fmt::Debug for NodeRunner { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("NodeRunner").finish_non_exhaustive() @@ -143,15 +136,12 @@ where } // Helper struct for NodeRunner configuration (clippy requirement). -pub(crate) struct NodeRunnerConfig -where - LocalRecordProvider: constructor::LocalRecordProvider + Send + Sync + 'static, -{ +pub(crate) struct NodeRunnerConfig { pub(crate) allow_non_global_addresses_in_dht: bool, /// Whether node is listening on some addresses pub(crate) is_listening: bool, pub(crate) command_receiver: mpsc::Receiver, - pub(crate) swarm: Swarm>>, + pub(crate) swarm: Swarm, pub(crate) shared_weak: Weak, pub(crate) next_random_query_interval: Duration, pub(crate) known_peers_registry: Box, @@ -163,10 +153,7 @@ where pub(crate) bootstrap_addresses: Vec, } -impl NodeRunner -where - LocalRecordProvider: constructor::LocalRecordProvider + Send + Sync + 'static, -{ +impl NodeRunner { pub(crate) fn new( NodeRunnerConfig { allow_non_global_addresses_in_dht, @@ -182,7 +169,7 @@ where metrics, protocol_version, bootstrap_addresses, - }: NodeRunnerConfig, + }: NodeRunnerConfig, ) -> Self { // Setup the address removal events exchange between persistent params storage and Kademlia. let (removed_addresses_tx, removed_addresses_rx) = mpsc::unbounded(); @@ -1140,7 +1127,7 @@ where // Returns `true` if query was cancelled fn unbounded_send_and_cancel_on_error( - kademlia: &mut Kademlia>, + kademlia: &mut Kademlia, sender: &mpsc::UnboundedSender, value: T, channel: &'static str, diff --git a/crates/subspace-networking/src/utils/piece_provider.rs b/crates/subspace-networking/src/utils/piece_provider.rs index 0b90093a8d..8e1e551821 100644 --- a/crates/subspace-networking/src/utils/piece_provider.rs +++ b/crates/subspace-networking/src/utils/piece_provider.rs @@ -1,5 +1,6 @@ //! Provides methods to retrieve pieces from DSN. +use crate::constructor::DummyRecordStore; use crate::protocols::request_response::handlers::cached_piece_by_index::{ CachedPieceByIndexRequest, CachedPieceByIndexResponse, PieceResult, }; @@ -15,19 +16,16 @@ use futures::future::FusedFuture; use futures::stream::FuturesUnordered; use futures::task::noop_waker_ref; use futures::{stream, FutureExt, Stream, StreamExt}; -use libp2p::kad::store::RecordStore; -use libp2p::kad::{store, Behaviour as Kademlia, KBucketKey, ProviderRecord, Record, RecordKey}; +use libp2p::kad::{Behaviour as Kademlia, KBucketKey, RecordKey}; use libp2p::swarm::NetworkBehaviour; use libp2p::{Multiaddr, PeerId}; use rand::prelude::*; use std::any::type_name; -use std::borrow::Cow; use std::collections::{HashMap, HashSet}; -use std::iter::Empty; +use std::fmt; use std::pin::Pin; use std::sync::Arc; use std::task::{Context, Poll}; -use std::{fmt, iter}; use subspace_core_primitives::pieces::{Piece, PieceIndex}; use tokio_stream::StreamMap; use tracing::{debug, trace, warn, Instrument}; @@ -407,57 +405,6 @@ where } } -struct DummyRecordStore; - -impl RecordStore for DummyRecordStore { - type RecordsIter<'a> - = Empty> - where - Self: 'a; - type ProvidedIter<'a> - = Empty> - where - Self: 'a; - - fn get(&self, _key: &RecordKey) -> Option> { - // Not supported - None - } - - fn put(&mut self, _record: Record) -> store::Result<()> { - // Not supported - Ok(()) - } - - fn remove(&mut self, _key: &RecordKey) { - // Not supported - } - - fn records(&self) -> Self::RecordsIter<'_> { - // Not supported - iter::empty() - } - - fn add_provider(&mut self, _record: ProviderRecord) -> store::Result<()> { - // Not supported - Ok(()) - } - - fn providers(&self, _key: &RecordKey) -> Vec { - // Not supported - Vec::new() - } - - fn provided(&self) -> Self::ProvidedIter<'_> { - // Not supported - iter::empty() - } - - fn remove_provider(&mut self, _key: &RecordKey, _provider: &PeerId) { - // Not supported - } -} - /// Kademlia wrapper to take advantage of its internal logic of selecting closest peers struct KademliaWrapper { local_peer_id: PeerId, diff --git a/crates/subspace-service/src/dsn.rs b/crates/subspace-service/src/dsn.rs index 3260c2008e..85d8d53256 100644 --- a/crates/subspace-service/src/dsn.rs +++ b/crates/subspace-service/src/dsn.rs @@ -70,7 +70,7 @@ pub(crate) fn create_dsn_instance( dsn_protocol_version: String, dsn_config: DsnConfig, prometheus_registry: Option<&mut Registry>, -) -> Result<(Node, NodeRunner<()>), DsnConfigurationError> { +) -> Result<(Node, NodeRunner), DsnConfigurationError> { trace!("Subspace networking starting."); let known_peers_registry = { @@ -96,7 +96,7 @@ pub(crate) fn create_dsn_instance( let keypair = dsn_config.keypair.clone(); let default_networking_config = - subspace_networking::Config::new(dsn_protocol_version, keypair, (), prometheus_registry); + subspace_networking::Config::new(dsn_protocol_version, keypair, prometheus_registry); let networking_config = subspace_networking::Config { keypair: dsn_config.keypair.clone(),