From e3e1462083cac6aa5980c3dd5ff913cad8039971 Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Mon, 27 Mar 2023 12:56:17 +0200 Subject: [PATCH 1/9] deprecate mplex --- Cargo.lock | 10 ++++++++++ examples/chat-example/Cargo.toml | 11 ++++++++++- examples/dcutr/Cargo.toml | 16 +++++++++++++++- .../distributed-key-value-store/Cargo.toml | 13 ++++++++++++- examples/file-sharing/Cargo.toml | 13 ++++++++++++- examples/identify/Cargo.toml | 16 +++++++++++++++- examples/ipfs-kad/Cargo.toml | 11 ++++++++++- examples/ipfs-private/Cargo.toml | 16 +++++++++++++++- examples/ping-example/Cargo.toml | 12 +++++++++++- examples/rendezvous/Cargo.toml | 15 +++++++++++++-- interop-tests/Cargo.toml | 18 ++++++++++++++++-- interop-tests/src/bin/ping.rs | 5 +++-- libp2p/CHANGELOG.md | 3 +++ libp2p/src/lib.rs | 12 ++++++------ protocols/rendezvous/Cargo.toml | 10 +++++++++- transports/webrtc/Cargo.toml | 8 +++++--- 16 files changed, 165 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fb0bb3c8923..dcd4a381cac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -660,6 +660,7 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", + "libp2p-mplex", "libp2p-quic", ] @@ -1142,6 +1143,7 @@ dependencies = [ "futures", "futures-timer", "libp2p", + "libp2p-mplex", "log", ] @@ -1255,6 +1257,7 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", + "libp2p-mplex", "multiaddr", ] @@ -1437,6 +1440,7 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", + "libp2p-mplex", "multiaddr", ] @@ -1898,6 +1902,7 @@ dependencies = [ "async-trait", "futures", "libp2p", + "libp2p-mplex", ] [[package]] @@ -2010,6 +2015,7 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", + "libp2p-mplex", "libp2p-quic", "libp2p-webrtc", "log", @@ -2049,6 +2055,7 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", + "libp2p-mplex", ] [[package]] @@ -2061,6 +2068,7 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", + "libp2p-mplex", "multiaddr", ] @@ -3600,6 +3608,7 @@ dependencies = [ "async-trait", "futures", "libp2p", + "libp2p-mplex", "multiaddr", ] @@ -4072,6 +4081,7 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", + "libp2p-mplex", "log", "tokio", ] diff --git a/examples/chat-example/Cargo.toml b/examples/chat-example/Cargo.toml index cfd75ea2764..363c59fc05f 100644 --- a/examples/chat-example/Cargo.toml +++ b/examples/chat-example/Cargo.toml @@ -10,5 +10,14 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "gossipsub", "mdns", "mplex", "noise", "macros", "tcp", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "gossipsub", + "mdns", + "noise", + "macros", + "tcp", + "yamux" +] } libp2p-quic = { path = "../../transports/quic", features = ["async-std"] } +libp2p-mplex = { path = "../../muxers/mplex" } diff --git a/examples/dcutr/Cargo.toml b/examples/dcutr/Cargo.toml index 57439d9353e..723552da994 100644 --- a/examples/dcutr/Cargo.toml +++ b/examples/dcutr/Cargo.toml @@ -10,5 +10,19 @@ clap = { version = "4.1.11", features = ["derive"] } env_logger = "0.10.0" futures = "0.3.27" futures-timer = "3.0" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "mplex", "noise", "ping", "relay", "rendezvous", "tcp", "tokio", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "dns", + "dcutr", + "identify", + "macros", + "noise", + "ping", + "relay", + "rendezvous", + "tcp", + "tokio", + "yamux" +] } +libp2p-mplex = { path = "../../muxers/mplex" } log = "0.4" diff --git a/examples/distributed-key-value-store/Cargo.toml b/examples/distributed-key-value-store/Cargo.toml index 2f7a7118c54..b867768e22f 100644 --- a/examples/distributed-key-value-store/Cargo.toml +++ b/examples/distributed-key-value-store/Cargo.toml @@ -10,5 +10,16 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "mdns", "mplex", "noise", "macros", "tcp", "websocket", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "dns", + "kad", + "mdns", + "noise", + "macros", + "tcp", + "websocket", + "yamux" +] } +libp2p-mplex = { path = "../../muxers/mplex" } multiaddr = { version = "0.17.0" } diff --git a/examples/file-sharing/Cargo.toml b/examples/file-sharing/Cargo.toml index d206ec22f6d..6e82837ecab 100644 --- a/examples/file-sharing/Cargo.toml +++ b/examples/file-sharing/Cargo.toml @@ -12,5 +12,16 @@ clap = { version = "4.1.11", features = ["derive"] } either = "1.8" env_logger = "0.10" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "mplex", "noise", "macros", "request-response", "tcp", "websocket", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "dns", + "kad", + "noise", + "macros", + "request-response", + "tcp", + "websocket", + "yamux" +] } +libp2p-mplex = { path = "../../muxers/mplex" } multiaddr = { version = "0.17.0" } diff --git a/examples/identify/Cargo.toml b/examples/identify/Cargo.toml index ab9bf892c67..f9795b95a81 100644 --- a/examples/identify/Cargo.toml +++ b/examples/identify/Cargo.toml @@ -9,4 +9,18 @@ license = "MIT" async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "mplex", "noise", "ping", "relay", "rendezvous", "tcp", "tokio", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "dns", + "dcutr", + "identify", + "macros", + "noise", + "ping", + "relay", + "rendezvous", + "tcp", + "tokio", + "yamux" +] } +libp2p-mplex = { path = "../../muxers/mplex" } diff --git a/examples/ipfs-kad/Cargo.toml b/examples/ipfs-kad/Cargo.toml index f1b4d050057..b02970b4a66 100644 --- a/examples/ipfs-kad/Cargo.toml +++ b/examples/ipfs-kad/Cargo.toml @@ -10,4 +10,13 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "mplex", "noise", "tcp", "websocket", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "dns", + "kad", + "noise", + "tcp", + "websocket", + "yamux" +] } +libp2p-mplex = { path = "../../muxers/mplex" } diff --git a/examples/ipfs-private/Cargo.toml b/examples/ipfs-private/Cargo.toml index 77c390d3f3c..6a98bcfba0b 100644 --- a/examples/ipfs-private/Cargo.toml +++ b/examples/ipfs-private/Cargo.toml @@ -11,5 +11,19 @@ async-trait = "0.1" either = "1.8" env_logger = "0.10" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "gossipsub", "dns", "identify", "kad", "macros", "mplex", "noise", "ping", "pnet", "tcp", "websocket", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "gossipsub", + "dns", + "identify", + "kad", + "macros", + "noise", + "ping", + "pnet", + "tcp", + "websocket", + "yamux" +] } +libp2p-mplex = { path = "../../muxers/mplex" } multiaddr = { version = "0.17.0" } diff --git a/examples/ping-example/Cargo.toml b/examples/ping-example/Cargo.toml index 625926d2777..1a18b24c74f 100644 --- a/examples/ping-example/Cargo.toml +++ b/examples/ping-example/Cargo.toml @@ -9,5 +9,15 @@ license = "MIT" async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "macros", "mplex", "noise", "ping", "tcp", "websocket", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "dns", + "macros", + "noise", + "ping", + "tcp", + "websocket", + "yamux" +] } +libp2p-mplex = { path = "../../muxers/mplex" } multiaddr = { version = "0.17.0" } diff --git a/examples/rendezvous/Cargo.toml b/examples/rendezvous/Cargo.toml index dc162480655..25ee1094cfc 100644 --- a/examples/rendezvous/Cargo.toml +++ b/examples/rendezvous/Cargo.toml @@ -10,6 +10,17 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "identify", "macros", "mplex", "noise", "ping", "rendezvous", "tcp", "tokio", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "identify", + "macros", + "noise", + "ping", + "rendezvous", + "tcp", + "tokio", + "yamux" +] } +libp2p-mplex = { path = "../../muxers/mplex" } log = "0.4" -tokio = { version = "1.25", features = [ "rt-multi-thread", "macros", "time" ] } +tokio = { version = "1.25", features = ["rt-multi-thread", "macros", "time"] } diff --git a/interop-tests/Cargo.toml b/interop-tests/Cargo.toml index dfaf93fd9df..74cfb84f77e 100644 --- a/interop-tests/Cargo.toml +++ b/interop-tests/Cargo.toml @@ -10,10 +10,24 @@ anyhow = "1" either = "1.8.0" env_logger = "0.10.0" futures = "0.3.27" -libp2p = { path = "../libp2p", features = ["websocket", "mplex", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros"] } +libp2p = { path = "../libp2p", features = [ + "websocket", + "yamux", + "tcp", + "tokio", + "ping", + "noise", + "tls", + "dns", + "rsa", + "macros" +] } libp2p-quic = { path = "../transports/quic", features = ["tokio"] } libp2p-webrtc = { path = "../transports/webrtc", features = ["tokio"] } +libp2p-mplex = { path = "../muxers/mplex" } log = "0.4" rand = "0.8.5" -redis = { version = "0.22.1", default-features = false, features = ["tokio-comp"] } +redis = { version = "0.22.1", default-features = false, features = [ + "tokio-comp" +] } tokio = { version = "1.24.1", features = ["full"] } diff --git a/interop-tests/src/bin/ping.rs b/interop-tests/src/bin/ping.rs index 25d4459d0fa..ba29f9c5bf3 100644 --- a/interop-tests/src/bin/ping.rs +++ b/interop-tests/src/bin/ping.rs @@ -13,9 +13,10 @@ use libp2p::swarm::{keep_alive, NetworkBehaviour, SwarmEvent}; use libp2p::tls::TlsStream; use libp2p::websocket::WsConfig; use libp2p::{ - identity, mplex, noise, ping, swarm::SwarmBuilder, tcp, tls, yamux, InboundUpgradeExt, - Multiaddr, OutboundUpgradeExt, PeerId, Transport as _, + identity, noise, ping, swarm::SwarmBuilder, tcp, tls, yamux, InboundUpgradeExt, Multiaddr, + OutboundUpgradeExt, PeerId, Transport as _, }; +use libp2p_mplex as mplex; use libp2p_quic as quic; use libp2p_webrtc as webrtc; use redis::AsyncCommands; diff --git a/libp2p/CHANGELOG.md b/libp2p/CHANGELOG.md index adab7b52e13..3774477dda0 100644 --- a/libp2p/CHANGELOG.md +++ b/libp2p/CHANGELOG.md @@ -3,6 +3,9 @@ - Introduce `libp2p::connection_limits` module. See [PR 3386]. +- Deprecate the `mplex` feature. +The recommended baseline stream multiplexer is `yamux`. + - Deprecate the `quic` and `webrtc` feature. These two crates are only in alpha state. To properly communicate this to users, we want them to add the dependency directly which makes the `alpha` version visible. diff --git a/libp2p/src/lib.rs b/libp2p/src/lib.rs index f453b5c28fd..8b1a1cd21d2 100644 --- a/libp2p/src/lib.rs +++ b/libp2p/src/lib.rs @@ -83,8 +83,10 @@ pub use libp2p_mdns as mdns; #[doc(inline)] pub use libp2p_metrics as metrics; #[cfg(feature = "mplex")] -#[doc(inline)] -pub use libp2p_mplex as mplex; +#[deprecated(note = "`mplex` is not recommended anymore. Please use `yamux` instead.")] +pub mod mplex { + pub use libp2p_mplex::*; +} #[cfg(feature = "noise")] #[doc(inline)] pub use libp2p_noise as noise; @@ -188,7 +190,6 @@ pub use libp2p_identity::PeerId; ), feature = "websocket", feature = "noise", - feature = "mplex", feature = "yamux" ))] #[cfg_attr( @@ -223,7 +224,7 @@ pub async fn development_transport( .authenticate(noise::NoiseAuthenticated::xx(&keypair).unwrap()) .multiplex(core::upgrade::SelectUpgrade::new( yamux::YamuxConfig::default(), - mplex::MplexConfig::default(), + libp2p_mplex::MplexConfig::default(), )) .timeout(std::time::Duration::from_secs(20)) .boxed()) @@ -248,7 +249,6 @@ pub async fn development_transport( ), feature = "websocket", feature = "noise", - feature = "mplex", feature = "yamux" ))] #[cfg_attr( @@ -279,7 +279,7 @@ pub fn tokio_development_transport( .authenticate(noise::NoiseAuthenticated::xx(&keypair).unwrap()) .multiplex(core::upgrade::SelectUpgrade::new( yamux::YamuxConfig::default(), - mplex::MplexConfig::default(), + libp2p_mplex::MplexConfig::default(), )) .timeout(std::time::Duration::from_secs(20)) .boxed()) diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index 1575c5dd21e..02ad1a80bc1 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -37,7 +37,15 @@ libp2p-identify = { path = "../identify" } libp2p-yamux = { path = "../../muxers/yamux" } libp2p-tcp = { path = "../../transports/tcp", features = ["tokio"] } rand = "0.8" -tokio = { version = "1.15", features = [ "rt-multi-thread", "time", "macros", "sync", "process", "fs", "net" ] } +tokio = { version = "1.15", features = [ + "rt-multi-thread", + "time", + "macros", + "sync", + "process", + "fs", + "net" +] } libp2p-swarm-test = { path = "../../swarm-test" } # Passing arguments to the docsrs builder in order to properly document cfg's. diff --git a/transports/webrtc/Cargo.toml b/transports/webrtc/Cargo.toml index 6f18265cd27..da060beda75 100644 --- a/transports/webrtc/Cargo.toml +++ b/transports/webrtc/Cargo.toml @@ -18,11 +18,13 @@ futures = "0.3" futures-timer = "3" hex = "0.4" if-watch = "3.0" -libp2p-core = { version = "0.39.0", path = "../../core" } +libp2p-core = { version = "0.39.0", path = "../../core" } libp2p-noise = { version = "0.42.0", path = "../../transports/noise" } libp2p-identity = { version = "0.1.0", path = "../../identity" } log = "0.4" -multihash = { version = "0.17.0", default-features = false, features = ["sha2"] } +multihash = { version = "0.17.0", default-features = false, features = [ + "sha2" +] } quick-protobuf = "0.8" quick-protobuf-codec = { version = "0.1", path = "../../misc/quick-protobuf-codec" } rand = "0.8" @@ -31,7 +33,7 @@ serde = { version = "1.0", features = ["derive"] } stun = "0.4" thiserror = "1" tinytemplate = "1.2" -tokio = { version = "1.19", features = ["net"], optional = true} +tokio = { version = "1.19", features = ["net"], optional = true } tokio-util = { version = "0.7", features = ["compat"], optional = true } webrtc = { version = "0.6.0", optional = true } From 5667da00d9e99764d6b17291d66c28d4c18b60fb Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Mon, 27 Mar 2023 13:38:35 +0200 Subject: [PATCH 2/9] replace mplex by yamux in src/lib.rs --- libp2p/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libp2p/src/lib.rs b/libp2p/src/lib.rs index 8b1a1cd21d2..298dae427de 100644 --- a/libp2p/src/lib.rs +++ b/libp2p/src/lib.rs @@ -190,7 +190,7 @@ pub use libp2p_identity::PeerId; ), feature = "websocket", feature = "noise", - feature = "yamux" + feature = "yamux", ))] #[cfg_attr( all( @@ -224,7 +224,7 @@ pub async fn development_transport( .authenticate(noise::NoiseAuthenticated::xx(&keypair).unwrap()) .multiplex(core::upgrade::SelectUpgrade::new( yamux::YamuxConfig::default(), - libp2p_mplex::MplexConfig::default(), + yamux::YamuxConfig::default(), )) .timeout(std::time::Duration::from_secs(20)) .boxed()) @@ -279,7 +279,7 @@ pub fn tokio_development_transport( .authenticate(noise::NoiseAuthenticated::xx(&keypair).unwrap()) .multiplex(core::upgrade::SelectUpgrade::new( yamux::YamuxConfig::default(), - libp2p_mplex::MplexConfig::default(), + yamux::YamuxConfig::default(), )) .timeout(std::time::Duration::from_secs(20)) .boxed()) From 6f876185860c3fb1a514b0f96f72eb09bb68b3f8 Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Mon, 27 Mar 2023 19:23:49 +0200 Subject: [PATCH 3/9] remove formatting, deprecated in examples and minor fixes --- Cargo.lock | 9 --------- examples/chat-example/Cargo.toml | 13 ++---------- examples/dcutr/Cargo.toml | 18 ++--------------- .../distributed-key-value-store/Cargo.toml | 15 ++------------ examples/file-sharing/Cargo.toml | 15 ++------------ examples/identify/Cargo.toml | 16 +-------------- examples/ipfs-kad/Cargo.toml | 11 +--------- examples/ipfs-private/Cargo.toml | 18 ++--------------- examples/ping-example/Cargo.toml | 14 ++----------- examples/relay-server/Cargo.toml | 2 +- examples/rendezvous/Cargo.toml | 15 ++------------ interop-tests/Cargo.toml | 20 ++++--------------- libp2p/CHANGELOG.md | 2 ++ libp2p/src/lib.rs | 13 ++++++++---- 14 files changed, 32 insertions(+), 149 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dcd4a381cac..f29cac489ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -660,7 +660,6 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", - "libp2p-mplex", "libp2p-quic", ] @@ -1143,7 +1142,6 @@ dependencies = [ "futures", "futures-timer", "libp2p", - "libp2p-mplex", "log", ] @@ -1257,7 +1255,6 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", - "libp2p-mplex", "multiaddr", ] @@ -1440,7 +1437,6 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", - "libp2p-mplex", "multiaddr", ] @@ -1902,7 +1898,6 @@ dependencies = [ "async-trait", "futures", "libp2p", - "libp2p-mplex", ] [[package]] @@ -2055,7 +2050,6 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", - "libp2p-mplex", ] [[package]] @@ -2068,7 +2062,6 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", - "libp2p-mplex", "multiaddr", ] @@ -3608,7 +3601,6 @@ dependencies = [ "async-trait", "futures", "libp2p", - "libp2p-mplex", "multiaddr", ] @@ -4081,7 +4073,6 @@ dependencies = [ "env_logger 0.10.0", "futures", "libp2p", - "libp2p-mplex", "log", "tokio", ] diff --git a/examples/chat-example/Cargo.toml b/examples/chat-example/Cargo.toml index 363c59fc05f..530e52c6fb4 100644 --- a/examples/chat-example/Cargo.toml +++ b/examples/chat-example/Cargo.toml @@ -10,14 +10,5 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "gossipsub", - "mdns", - "noise", - "macros", - "tcp", - "yamux" -] } -libp2p-quic = { path = "../../transports/quic", features = ["async-std"] } -libp2p-mplex = { path = "../../muxers/mplex" } +libp2p = { path = "../../libp2p", features = ["async-std", "gossipsub", "mdns", "noise", "macros", "tcp", "yamux"] } +libp2p-quic = { path = "../../transports/quic", features = ["async-std"] } \ No newline at end of file diff --git a/examples/dcutr/Cargo.toml b/examples/dcutr/Cargo.toml index 723552da994..f475960b8ef 100644 --- a/examples/dcutr/Cargo.toml +++ b/examples/dcutr/Cargo.toml @@ -10,19 +10,5 @@ clap = { version = "4.1.11", features = ["derive"] } env_logger = "0.10.0" futures = "0.3.27" futures-timer = "3.0" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "dns", - "dcutr", - "identify", - "macros", - "noise", - "ping", - "relay", - "rendezvous", - "tcp", - "tokio", - "yamux" -] } -libp2p-mplex = { path = "../../muxers/mplex" } -log = "0.4" +libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "relay", "rendezvous", "tcp", "tokio", "yamux"] } +log = "0.4" \ No newline at end of file diff --git a/examples/distributed-key-value-store/Cargo.toml b/examples/distributed-key-value-store/Cargo.toml index b867768e22f..b239175d5d9 100644 --- a/examples/distributed-key-value-store/Cargo.toml +++ b/examples/distributed-key-value-store/Cargo.toml @@ -10,16 +10,5 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "dns", - "kad", - "mdns", - "noise", - "macros", - "tcp", - "websocket", - "yamux" -] } -libp2p-mplex = { path = "../../muxers/mplex" } -multiaddr = { version = "0.17.0" } +libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "mdns", "noise", "macros", "tcp", "websocket", "yamux"] } +multiaddr = { version = "0.17.0" } \ No newline at end of file diff --git a/examples/file-sharing/Cargo.toml b/examples/file-sharing/Cargo.toml index 6e82837ecab..7511500a90e 100644 --- a/examples/file-sharing/Cargo.toml +++ b/examples/file-sharing/Cargo.toml @@ -12,16 +12,5 @@ clap = { version = "4.1.11", features = ["derive"] } either = "1.8" env_logger = "0.10" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "dns", - "kad", - "noise", - "macros", - "request-response", - "tcp", - "websocket", - "yamux" -] } -libp2p-mplex = { path = "../../muxers/mplex" } -multiaddr = { version = "0.17.0" } +libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "noise", "macros", "request-response", "tcp", "websocket", "yamux"] } +multiaddr = { version = "0.17.0" } \ No newline at end of file diff --git a/examples/identify/Cargo.toml b/examples/identify/Cargo.toml index f9795b95a81..d962db90018 100644 --- a/examples/identify/Cargo.toml +++ b/examples/identify/Cargo.toml @@ -9,18 +9,4 @@ license = "MIT" async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "dns", - "dcutr", - "identify", - "macros", - "noise", - "ping", - "relay", - "rendezvous", - "tcp", - "tokio", - "yamux" -] } -libp2p-mplex = { path = "../../muxers/mplex" } +libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "relay", "rendezvous", "tcp", "tokio", "yamux"] } \ No newline at end of file diff --git a/examples/ipfs-kad/Cargo.toml b/examples/ipfs-kad/Cargo.toml index b02970b4a66..ccbd1061d13 100644 --- a/examples/ipfs-kad/Cargo.toml +++ b/examples/ipfs-kad/Cargo.toml @@ -10,13 +10,4 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "dns", - "kad", - "noise", - "tcp", - "websocket", - "yamux" -] } -libp2p-mplex = { path = "../../muxers/mplex" } +libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "noise", "tcp", "websocket", "yamux"] } \ No newline at end of file diff --git a/examples/ipfs-private/Cargo.toml b/examples/ipfs-private/Cargo.toml index 6a98bcfba0b..b30f4e443c5 100644 --- a/examples/ipfs-private/Cargo.toml +++ b/examples/ipfs-private/Cargo.toml @@ -11,19 +11,5 @@ async-trait = "0.1" either = "1.8" env_logger = "0.10" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "gossipsub", - "dns", - "identify", - "kad", - "macros", - "noise", - "ping", - "pnet", - "tcp", - "websocket", - "yamux" -] } -libp2p-mplex = { path = "../../muxers/mplex" } -multiaddr = { version = "0.17.0" } +libp2p = { path = "../../libp2p", features = ["async-std", "gossipsub", "dns", "identify", "kad", "macros", "noise", "ping", "pnet", "tcp", "websocket", "yamux"] } +multiaddr = { version = "0.17.0" } \ No newline at end of file diff --git a/examples/ping-example/Cargo.toml b/examples/ping-example/Cargo.toml index 1a18b24c74f..ffa1635f37c 100644 --- a/examples/ping-example/Cargo.toml +++ b/examples/ping-example/Cargo.toml @@ -9,15 +9,5 @@ license = "MIT" async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "dns", - "macros", - "noise", - "ping", - "tcp", - "websocket", - "yamux" -] } -libp2p-mplex = { path = "../../muxers/mplex" } -multiaddr = { version = "0.17.0" } +libp2p = { path = "../../libp2p", features = ["async-std", "dns", "macros", "noise", "ping", "tcp", "websocket", "yamux"] } +multiaddr = { version = "0.17.0" } \ No newline at end of file diff --git a/examples/relay-server/Cargo.toml b/examples/relay-server/Cargo.toml index f42753ad977..792c92847f0 100644 --- a/examples/relay-server/Cargo.toml +++ b/examples/relay-server/Cargo.toml @@ -11,4 +11,4 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "noise", "macros", "ping", "tcp", "identify", "yamux", "relay"] } +libp2p = { path = "../../libp2p", features = ["async-std", "noise", "macros", "ping", "tcp", "identify", "yamux", "relay"] } \ No newline at end of file diff --git a/examples/rendezvous/Cargo.toml b/examples/rendezvous/Cargo.toml index 25ee1094cfc..a9c38ba5960 100644 --- a/examples/rendezvous/Cargo.toml +++ b/examples/rendezvous/Cargo.toml @@ -10,17 +10,6 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "identify", - "macros", - "noise", - "ping", - "rendezvous", - "tcp", - "tokio", - "yamux" -] } -libp2p-mplex = { path = "../../muxers/mplex" } +libp2p = { path = "../../libp2p", features = ["async-std", "identify", "macros", "noise", "ping", "rendezvous", "tcp", "tokio", "yamux"] } log = "0.4" -tokio = { version = "1.25", features = ["rt-multi-thread", "macros", "time"] } +tokio = { version = "1.25", features = [ "rt-multi-thread", "macros", "time" ] } \ No newline at end of file diff --git a/interop-tests/Cargo.toml b/interop-tests/Cargo.toml index 74cfb84f77e..f787dff0bce 100644 --- a/interop-tests/Cargo.toml +++ b/interop-tests/Cargo.toml @@ -10,24 +10,12 @@ anyhow = "1" either = "1.8.0" env_logger = "0.10.0" futures = "0.3.27" -libp2p = { path = "../libp2p", features = [ - "websocket", - "yamux", - "tcp", - "tokio", - "ping", - "noise", - "tls", - "dns", - "rsa", - "macros" -] } +libp2p = { path = "../libp2p", features = ["websocket", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros"] } +# libp2p = { path = "../libp2p", features = ["websocket", "mplex", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros"] } libp2p-quic = { path = "../transports/quic", features = ["tokio"] } libp2p-webrtc = { path = "../transports/webrtc", features = ["tokio"] } libp2p-mplex = { path = "../muxers/mplex" } log = "0.4" rand = "0.8.5" -redis = { version = "0.22.1", default-features = false, features = [ - "tokio-comp" -] } -tokio = { version = "1.24.1", features = ["full"] } +redis = { version = "0.22.1", default-features = false, features = ["tokio-comp"] } +tokio = { version = "1.24.1", features = ["full"] } \ No newline at end of file diff --git a/libp2p/CHANGELOG.md b/libp2p/CHANGELOG.md index 3774477dda0..5c1099b4e12 100644 --- a/libp2p/CHANGELOG.md +++ b/libp2p/CHANGELOG.md @@ -5,6 +5,7 @@ - Deprecate the `mplex` feature. The recommended baseline stream multiplexer is `yamux`. +See [PR 3689]. - Deprecate the `quic` and `webrtc` feature. These two crates are only in alpha state. @@ -14,6 +15,7 @@ The recommended baseline stream multiplexer is `yamux`. - Introduce `libp2p::allow_block_list` module and deprecate `libp2p::Swarm::ban_peer_id`. See [PR 3590]. +[PR 3689]: https://github.com/libp2p/rust-libp2p/pull/3689 [PR 3386]: https://github.com/libp2p/rust-libp2p/pull/3386 [PR 3580]: https://github.com/libp2p/rust-libp2p/pull/3580 [PR 3590]: https://github.com/libp2p/rust-libp2p/pull/3590 diff --git a/libp2p/src/lib.rs b/libp2p/src/lib.rs index 298dae427de..a6e46cb5bdf 100644 --- a/libp2p/src/lib.rs +++ b/libp2p/src/lib.rs @@ -83,7 +83,10 @@ pub use libp2p_mdns as mdns; #[doc(inline)] pub use libp2p_metrics as metrics; #[cfg(feature = "mplex")] -#[deprecated(note = "`mplex` is not recommended anymore. Please use `yamux` instead.")] +// pub use libp2p_mplex as mplex; +#[deprecated( + note = "`mplex` is not recommended anymore. Please use `yamux` instead or depend on `libp2p-mplex` directly if you need it for legacy use cases." +)] pub mod mplex { pub use libp2p_mplex::*; } @@ -190,7 +193,8 @@ pub use libp2p_identity::PeerId; ), feature = "websocket", feature = "noise", - feature = "yamux", + feature = "mplex", + feature = "yamux" ))] #[cfg_attr( all( @@ -224,7 +228,7 @@ pub async fn development_transport( .authenticate(noise::NoiseAuthenticated::xx(&keypair).unwrap()) .multiplex(core::upgrade::SelectUpgrade::new( yamux::YamuxConfig::default(), - yamux::YamuxConfig::default(), + mplex::MplexConfig::default(), )) .timeout(std::time::Duration::from_secs(20)) .boxed()) @@ -249,6 +253,7 @@ pub async fn development_transport( ), feature = "websocket", feature = "noise", + feature = "mplex", feature = "yamux" ))] #[cfg_attr( @@ -279,7 +284,7 @@ pub fn tokio_development_transport( .authenticate(noise::NoiseAuthenticated::xx(&keypair).unwrap()) .multiplex(core::upgrade::SelectUpgrade::new( yamux::YamuxConfig::default(), - yamux::YamuxConfig::default(), + mplex::MplexConfig::default(), )) .timeout(std::time::Duration::from_secs(20)) .boxed()) From e5b9285c0ed581224c1ecc59101e2e2e7f7da478 Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Mon, 27 Mar 2023 19:29:02 +0200 Subject: [PATCH 4/9] clean up --- interop-tests/Cargo.toml | 1 - libp2p/src/lib.rs | 1 - protocols/rendezvous/Cargo.toml | 12 ++---------- transports/webrtc/Cargo.toml | 10 ++++------ 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/interop-tests/Cargo.toml b/interop-tests/Cargo.toml index f787dff0bce..93758624b5d 100644 --- a/interop-tests/Cargo.toml +++ b/interop-tests/Cargo.toml @@ -11,7 +11,6 @@ either = "1.8.0" env_logger = "0.10.0" futures = "0.3.27" libp2p = { path = "../libp2p", features = ["websocket", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros"] } -# libp2p = { path = "../libp2p", features = ["websocket", "mplex", "yamux", "tcp", "tokio", "ping", "noise", "tls", "dns", "rsa", "macros"] } libp2p-quic = { path = "../transports/quic", features = ["tokio"] } libp2p-webrtc = { path = "../transports/webrtc", features = ["tokio"] } libp2p-mplex = { path = "../muxers/mplex" } diff --git a/libp2p/src/lib.rs b/libp2p/src/lib.rs index a6e46cb5bdf..6fce9510663 100644 --- a/libp2p/src/lib.rs +++ b/libp2p/src/lib.rs @@ -83,7 +83,6 @@ pub use libp2p_mdns as mdns; #[doc(inline)] pub use libp2p_metrics as metrics; #[cfg(feature = "mplex")] -// pub use libp2p_mplex as mplex; #[deprecated( note = "`mplex` is not recommended anymore. Please use `yamux` instead or depend on `libp2p-mplex` directly if you need it for legacy use cases." )] diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index 02ad1a80bc1..8720c706eb2 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -37,15 +37,7 @@ libp2p-identify = { path = "../identify" } libp2p-yamux = { path = "../../muxers/yamux" } libp2p-tcp = { path = "../../transports/tcp", features = ["tokio"] } rand = "0.8" -tokio = { version = "1.15", features = [ - "rt-multi-thread", - "time", - "macros", - "sync", - "process", - "fs", - "net" -] } +tokio = { version = "1.15", features = [ "rt-multi-thread", "time", "macros", "sync", "process", "fs", "net" ] } libp2p-swarm-test = { path = "../../swarm-test" } # Passing arguments to the docsrs builder in order to properly document cfg's. @@ -53,4 +45,4 @@ libp2p-swarm-test = { path = "../../swarm-test" } [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] -rustc-args = ["--cfg", "docsrs"] +rustc-args = ["--cfg", "docsrs"] \ No newline at end of file diff --git a/transports/webrtc/Cargo.toml b/transports/webrtc/Cargo.toml index da060beda75..3537a347593 100644 --- a/transports/webrtc/Cargo.toml +++ b/transports/webrtc/Cargo.toml @@ -18,13 +18,11 @@ futures = "0.3" futures-timer = "3" hex = "0.4" if-watch = "3.0" -libp2p-core = { version = "0.39.0", path = "../../core" } +libp2p-core = { version = "0.39.0", path = "../../core" } libp2p-noise = { version = "0.42.0", path = "../../transports/noise" } libp2p-identity = { version = "0.1.0", path = "../../identity" } log = "0.4" -multihash = { version = "0.17.0", default-features = false, features = [ - "sha2" -] } +multihash = { version = "0.17.0", default-features = false, features = ["sha2"] } quick-protobuf = "0.8" quick-protobuf-codec = { version = "0.1", path = "../../misc/quick-protobuf-codec" } rand = "0.8" @@ -33,7 +31,7 @@ serde = { version = "1.0", features = ["derive"] } stun = "0.4" thiserror = "1" tinytemplate = "1.2" -tokio = { version = "1.19", features = ["net"], optional = true } +tokio = { version = "1.19", features = ["net"], optional = true} tokio-util = { version = "0.7", features = ["compat"], optional = true } webrtc = { version = "0.6.0", optional = true } @@ -58,4 +56,4 @@ required-features = ["tokio"] [[example]] name = "listen_ping" -required-features = ["tokio"] +required-features = ["tokio"] \ No newline at end of file From feb444194bec22cec037915df375e7cd721144e9 Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Mon, 3 Apr 2023 16:49:04 +0200 Subject: [PATCH 5/9] new line added end cargo --- examples/chat-example/Cargo.toml | 2 +- examples/dcutr/Cargo.toml | 2 +- examples/distributed-key-value-store/Cargo.toml | 2 +- examples/file-sharing/Cargo.toml | 2 +- examples/identify/Cargo.toml | 2 +- examples/ipfs-kad/Cargo.toml | 2 +- examples/ipfs-private/Cargo.toml | 2 +- examples/ping-example/Cargo.toml | 2 +- examples/relay-server/Cargo.toml | 2 +- examples/rendezvous/Cargo.toml | 2 +- interop-tests/Cargo.toml | 2 +- libp2p/CHANGELOG.md | 9 ++++----- libp2p/src/lib.rs | 2 ++ protocols/rendezvous/Cargo.toml | 2 +- transports/webrtc/Cargo.toml | 2 +- 15 files changed, 19 insertions(+), 18 deletions(-) diff --git a/examples/chat-example/Cargo.toml b/examples/chat-example/Cargo.toml index 530e52c6fb4..03ec17ea4a8 100644 --- a/examples/chat-example/Cargo.toml +++ b/examples/chat-example/Cargo.toml @@ -11,4 +11,4 @@ async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.27" libp2p = { path = "../../libp2p", features = ["async-std", "gossipsub", "mdns", "noise", "macros", "tcp", "yamux"] } -libp2p-quic = { path = "../../transports/quic", features = ["async-std"] } \ No newline at end of file +libp2p-quic = { path = "../../transports/quic", features = ["async-std"] } diff --git a/examples/dcutr/Cargo.toml b/examples/dcutr/Cargo.toml index f475960b8ef..b4737e58127 100644 --- a/examples/dcutr/Cargo.toml +++ b/examples/dcutr/Cargo.toml @@ -11,4 +11,4 @@ env_logger = "0.10.0" futures = "0.3.27" futures-timer = "3.0" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "relay", "rendezvous", "tcp", "tokio", "yamux"] } -log = "0.4" \ No newline at end of file +log = "0.4" diff --git a/examples/distributed-key-value-store/Cargo.toml b/examples/distributed-key-value-store/Cargo.toml index b239175d5d9..8cf4a5d8f02 100644 --- a/examples/distributed-key-value-store/Cargo.toml +++ b/examples/distributed-key-value-store/Cargo.toml @@ -11,4 +11,4 @@ async-trait = "0.1" env_logger = "0.10" futures = "0.3.27" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "mdns", "noise", "macros", "tcp", "websocket", "yamux"] } -multiaddr = { version = "0.17.0" } \ No newline at end of file +multiaddr = { version = "0.17.0" } diff --git a/examples/file-sharing/Cargo.toml b/examples/file-sharing/Cargo.toml index 7511500a90e..c8849095f1c 100644 --- a/examples/file-sharing/Cargo.toml +++ b/examples/file-sharing/Cargo.toml @@ -13,4 +13,4 @@ either = "1.8" env_logger = "0.10" futures = "0.3.27" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "noise", "macros", "request-response", "tcp", "websocket", "yamux"] } -multiaddr = { version = "0.17.0" } \ No newline at end of file +multiaddr = { version = "0.17.0" } diff --git a/examples/identify/Cargo.toml b/examples/identify/Cargo.toml index d962db90018..d6e18814632 100644 --- a/examples/identify/Cargo.toml +++ b/examples/identify/Cargo.toml @@ -9,4 +9,4 @@ license = "MIT" async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "relay", "rendezvous", "tcp", "tokio", "yamux"] } \ No newline at end of file +libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "relay", "rendezvous", "tcp", "tokio", "yamux"] } diff --git a/examples/ipfs-kad/Cargo.toml b/examples/ipfs-kad/Cargo.toml index ccbd1061d13..80a62964b7c 100644 --- a/examples/ipfs-kad/Cargo.toml +++ b/examples/ipfs-kad/Cargo.toml @@ -10,4 +10,4 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "noise", "tcp", "websocket", "yamux"] } \ No newline at end of file +libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "noise", "tcp", "websocket", "yamux"] } diff --git a/examples/ipfs-private/Cargo.toml b/examples/ipfs-private/Cargo.toml index b30f4e443c5..9e0784e4404 100644 --- a/examples/ipfs-private/Cargo.toml +++ b/examples/ipfs-private/Cargo.toml @@ -12,4 +12,4 @@ either = "1.8" env_logger = "0.10" futures = "0.3.27" libp2p = { path = "../../libp2p", features = ["async-std", "gossipsub", "dns", "identify", "kad", "macros", "noise", "ping", "pnet", "tcp", "websocket", "yamux"] } -multiaddr = { version = "0.17.0" } \ No newline at end of file +multiaddr = { version = "0.17.0" } diff --git a/examples/ping-example/Cargo.toml b/examples/ping-example/Cargo.toml index ffa1635f37c..4607a3fc792 100644 --- a/examples/ping-example/Cargo.toml +++ b/examples/ping-example/Cargo.toml @@ -10,4 +10,4 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" futures = "0.3.27" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "macros", "noise", "ping", "tcp", "websocket", "yamux"] } -multiaddr = { version = "0.17.0" } \ No newline at end of file +multiaddr = { version = "0.17.0" } diff --git a/examples/relay-server/Cargo.toml b/examples/relay-server/Cargo.toml index 792c92847f0..f42753ad977 100644 --- a/examples/relay-server/Cargo.toml +++ b/examples/relay-server/Cargo.toml @@ -11,4 +11,4 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.27" -libp2p = { path = "../../libp2p", features = ["async-std", "noise", "macros", "ping", "tcp", "identify", "yamux", "relay"] } \ No newline at end of file +libp2p = { path = "../../libp2p", features = ["async-std", "noise", "macros", "ping", "tcp", "identify", "yamux", "relay"] } diff --git a/examples/rendezvous/Cargo.toml b/examples/rendezvous/Cargo.toml index a9c38ba5960..9f9a5724040 100644 --- a/examples/rendezvous/Cargo.toml +++ b/examples/rendezvous/Cargo.toml @@ -12,4 +12,4 @@ env_logger = "0.10.0" futures = "0.3.27" libp2p = { path = "../../libp2p", features = ["async-std", "identify", "macros", "noise", "ping", "rendezvous", "tcp", "tokio", "yamux"] } log = "0.4" -tokio = { version = "1.25", features = [ "rt-multi-thread", "macros", "time" ] } \ No newline at end of file +tokio = { version = "1.25", features = [ "rt-multi-thread", "macros", "time" ] } diff --git a/interop-tests/Cargo.toml b/interop-tests/Cargo.toml index 93758624b5d..877b2c3e65d 100644 --- a/interop-tests/Cargo.toml +++ b/interop-tests/Cargo.toml @@ -17,4 +17,4 @@ libp2p-mplex = { path = "../muxers/mplex" } log = "0.4" rand = "0.8.5" redis = { version = "0.22.1", default-features = false, features = ["tokio-comp"] } -tokio = { version = "1.24.1", features = ["full"] } \ No newline at end of file +tokio = { version = "1.24.1", features = ["full"] } diff --git a/libp2p/CHANGELOG.md b/libp2p/CHANGELOG.md index fbb1a4fc735..8c900160560 100644 --- a/libp2p/CHANGELOG.md +++ b/libp2p/CHANGELOG.md @@ -3,6 +3,10 @@ - Introduce `libp2p::connection_limits` module. See [PR 3386]. +- Deprecate the `mplex` feature. +The recommended baseline stream multiplexer is `yamux`. +See [PR 3689]. + - Deprecate the `quic` and `webrtc` feature. These two crates are only in alpha state. To properly communicate this to users, we want them to add the dependency directly which makes the `alpha` version visible. @@ -14,15 +18,10 @@ - Introduce `libp2p::perf` module. See [PR 3693]. -- Deprecate the `mplex` feature. - The recommended baseline stream multiplexer is `yamux`. - See [PR 3689]. - [PR 3386]: https://github.com/libp2p/rust-libp2p/pull/3386 [PR 3580]: https://github.com/libp2p/rust-libp2p/pull/3580 [PR 3590]: https://github.com/libp2p/rust-libp2p/pull/3590 [PR 3693]: https://github.com/libp2p/rust-libp2p/pull/3693 -[PR 3689]: https://github.com/libp2p/rust-libp2p/pull/3689 ## 0.51.1 diff --git a/libp2p/src/lib.rs b/libp2p/src/lib.rs index a38702bf412..93378478ab1 100644 --- a/libp2p/src/lib.rs +++ b/libp2p/src/lib.rs @@ -232,6 +232,7 @@ pub async fn development_transport( .authenticate(noise::NoiseAuthenticated::xx(&keypair).unwrap()) .multiplex(core::upgrade::SelectUpgrade::new( yamux::YamuxConfig::default(), + #[allow(deprecated)] mplex::MplexConfig::default(), )) .timeout(std::time::Duration::from_secs(20)) @@ -288,6 +289,7 @@ pub fn tokio_development_transport( .authenticate(noise::NoiseAuthenticated::xx(&keypair).unwrap()) .multiplex(core::upgrade::SelectUpgrade::new( yamux::YamuxConfig::default(), + #[allow(deprecated)] mplex::MplexConfig::default(), )) .timeout(std::time::Duration::from_secs(20)) diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index 4ec2a356826..3acd4e1a18e 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -45,4 +45,4 @@ libp2p-swarm-test = { path = "../../swarm-test" } [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] -rustc-args = ["--cfg", "docsrs"] \ No newline at end of file +rustc-args = ["--cfg", "docsrs"] diff --git a/transports/webrtc/Cargo.toml b/transports/webrtc/Cargo.toml index 47195dbff1d..cf4c5802339 100644 --- a/transports/webrtc/Cargo.toml +++ b/transports/webrtc/Cargo.toml @@ -57,4 +57,4 @@ required-features = ["tokio"] [[example]] name = "listen_ping" -required-features = ["tokio"] \ No newline at end of file +required-features = ["tokio"] From 9cf02c0489e497db98ac527c6a25ef4197852d26 Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Mon, 3 Apr 2023 17:11:10 +0200 Subject: [PATCH 6/9] libp2p new version changelog --- libp2p/CHANGELOG.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libp2p/CHANGELOG.md b/libp2p/CHANGELOG.md index 8c900160560..d1112aeb778 100644 --- a/libp2p/CHANGELOG.md +++ b/libp2p/CHANGELOG.md @@ -1,12 +1,16 @@ -## 0.52.2 - -- Introduce `libp2p::connection_limits` module. - See [PR 3386]. +## 0.52.3 - Deprecate the `mplex` feature. The recommended baseline stream multiplexer is `yamux`. See [PR 3689]. +[PR 3689]: https://github.com/libp2p/rust-libp2p/pull/3689 + +## 0.52.2 + +- Introduce `libp2p::connection_limits` module. + See [PR 3386]. + - Deprecate the `quic` and `webrtc` feature. These two crates are only in alpha state. To properly communicate this to users, we want them to add the dependency directly which makes the `alpha` version visible. From 8632f253a6b78325111df2fc69dbc386c18124a7 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 4 Apr 2023 01:39:43 +1000 Subject: [PATCH 7/9] Update libp2p/CHANGELOG.md --- libp2p/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p/CHANGELOG.md b/libp2p/CHANGELOG.md index d1112aeb778..d372fb9fd3e 100644 --- a/libp2p/CHANGELOG.md +++ b/libp2p/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.52.3 +## 0.52.3 - unreleased - Deprecate the `mplex` feature. The recommended baseline stream multiplexer is `yamux`. From e7cd30dcd91e3387b8a420a3505195f1e74d0d4f Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Mon, 3 Apr 2023 17:47:36 +0200 Subject: [PATCH 8/9] add new libp2p version in Cargo and mplex to ipfs-kad example --- Cargo.lock | 2 +- examples/ipfs-kad/Cargo.toml | 2 +- libp2p/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c45501ff24d..6f9a938a738 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2169,7 +2169,7 @@ checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" [[package]] name = "libp2p" -version = "0.51.2" +version = "0.52.3" dependencies = [ "async-std", "async-trait", diff --git a/examples/ipfs-kad/Cargo.toml b/examples/ipfs-kad/Cargo.toml index 701e4543408..7e156572781 100644 --- a/examples/ipfs-kad/Cargo.toml +++ b/examples/ipfs-kad/Cargo.toml @@ -10,4 +10,4 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "noise", "tcp", "websocket", "yamux"] } +libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "mplex", "noise", "tcp", "websocket", "yamux"] } diff --git a/libp2p/Cargo.toml b/libp2p/Cargo.toml index 33176cfaf95..5c0b6108c37 100644 --- a/libp2p/Cargo.toml +++ b/libp2p/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p" edition = "2021" rust-version = "1.65.0" description = "Peer-to-peer networking library" -version = "0.51.2" +version = "0.52.3" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" From 6eff4899e3424468b35de0e3d14881d9391013c4 Mon Sep 17 00:00:00 2001 From: Thomas Coratger Date: Mon, 3 Apr 2023 18:09:16 +0200 Subject: [PATCH 9/9] update libp2p version typo --- Cargo.lock | 2 +- libp2p/CHANGELOG.md | 4 ++-- libp2p/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f9a938a738..c1abf617ff1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2169,7 +2169,7 @@ checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" [[package]] name = "libp2p" -version = "0.52.3" +version = "0.51.3" dependencies = [ "async-std", "async-trait", diff --git a/libp2p/CHANGELOG.md b/libp2p/CHANGELOG.md index d372fb9fd3e..d9ad1e8788f 100644 --- a/libp2p/CHANGELOG.md +++ b/libp2p/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.52.3 - unreleased +## 0.51.3 - unreleased - Deprecate the `mplex` feature. The recommended baseline stream multiplexer is `yamux`. @@ -6,7 +6,7 @@ See [PR 3689]. [PR 3689]: https://github.com/libp2p/rust-libp2p/pull/3689 -## 0.52.2 +## 0.51.2 - Introduce `libp2p::connection_limits` module. See [PR 3386]. diff --git a/libp2p/Cargo.toml b/libp2p/Cargo.toml index 5c0b6108c37..aa35c2b84db 100644 --- a/libp2p/Cargo.toml +++ b/libp2p/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p" edition = "2021" rust-version = "1.65.0" description = "Peer-to-peer networking library" -version = "0.52.3" +version = "0.51.3" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p"