diff --git a/Cargo.lock b/Cargo.lock index 9d7cee34c7c64..82bd2fd53e543 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3860,7 +3860,6 @@ dependencies = [ "libp2p-kad", "libp2p-mdns", "libp2p-metrics", - "libp2p-mplex", "libp2p-noise", "libp2p-ping", "libp2p-quic", @@ -4044,24 +4043,6 @@ dependencies = [ "prometheus-client", ] -[[package]] -name = "libp2p-mplex" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d34780b514b159e6f3fd70ba3e72664ec89da28dca2d1e7856ee55e2c7031ba" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures", - "libp2p-core", - "log", - "nohash-hasher", - "parking_lot 0.12.1", - "rand 0.8.5", - "smallvec", - "unsigned-varint", -] - [[package]] name = "libp2p-noise" version = "0.42.0" diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index dab754cf44d6e..de4c4c14a2587 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -25,7 +25,7 @@ fnv = "1.0.6" futures = "0.3.21" futures-timer = "3.0.2" ip_network = "0.4.1" -libp2p = { version = "0.51.3", features = ["dns", "identify", "kad", "macros", "mdns", "mplex", "noise", "ping", "tcp", "tokio", "yamux", "websocket", "request-response"] } +libp2p = { version = "0.51.3", features = ["dns", "identify", "kad", "macros", "mdns", "noise", "ping", "tcp", "tokio", "yamux", "websocket", "request-response"] } linked_hash_set = "0.1.3" log = "0.4.17" lru = "0.8.1" diff --git a/client/network/README.md b/client/network/README.md index b9c0e028ffe77..cad46d059092c 100644 --- a/client/network/README.md +++ b/client/network/README.md @@ -66,8 +66,6 @@ negotiated and applied. The exact handshake protocol is experimental and is subj The following multiplexing protocols are supported: -- [Mplex](https://github.com/libp2p/specs/tree/master/mplex). Support for mplex will likely -be deprecated in the future. - [Yamux](https://github.com/hashicorp/yamux/blob/master/spec.md). ## Substreams diff --git a/client/network/src/lib.rs b/client/network/src/lib.rs index f29eb69ade64e..79023923e8b05 100644 --- a/client/network/src/lib.rs +++ b/client/network/src/lib.rs @@ -87,8 +87,6 @@ //! //! The following multiplexing protocols are supported: //! -//! - [Mplex](https://github.com/libp2p/specs/tree/master/mplex). Support for mplex will likely -//! be deprecated in the future. //! - [Yamux](https://github.com/hashicorp/yamux/blob/master/spec.md). //! //! ## Substreams diff --git a/client/network/src/transport.rs b/client/network/src/transport.rs index 619961dd0b4fc..e20121154cfcd 100644 --- a/client/network/src/transport.rs +++ b/client/network/src/transport.rs @@ -19,12 +19,11 @@ use either::Either; use libp2p::{ core::{ - self, muxing::StreamMuxerBox, transport::{Boxed, OptionalTransport}, upgrade, }, - dns, identity, mplex, noise, tcp, websocket, PeerId, Transport, TransportExt, + dns, identity, noise, tcp, websocket, PeerId, Transport, TransportExt, }; use std::{sync::Arc, time::Duration}; @@ -100,10 +99,6 @@ pub fn build_transport( }; let multiplexing_config = { - let mut mplex_config = mplex::MplexConfig::new(); - mplex_config.set_max_buffer_behaviour(mplex::MaxBufferBehaviour::Block); - mplex_config.set_max_buffer_size(usize::MAX); - let mut yamux_config = libp2p::yamux::YamuxConfig::default(); // Enable proper flow-control: window updates are only sent when // buffered data has been consumed. @@ -114,7 +109,7 @@ pub fn build_transport( yamux_config.set_receive_window_size(yamux_window_size); } - core::upgrade::SelectUpgrade::new(yamux_config, mplex_config) + yamux_config }; let transport = transport