From 4686ce8e660591951be63c0f155a6bfcdacf970e Mon Sep 17 00:00:00 2001 From: Darius Clark Date: Sun, 15 Oct 2023 04:40:13 -0400 Subject: [PATCH 01/27] feat(rendezous): refresh registration on change to external addresses Resolves #4627. Pull-Request: #4629. --- Cargo.lock | 2 +- Cargo.toml | 2 +- protocols/rendezvous/CHANGELOG.md | 6 +++ protocols/rendezvous/Cargo.toml | 2 +- protocols/rendezvous/src/client.rs | 20 ++++++++- protocols/rendezvous/tests/rendezvous.rs | 53 ++++++++++++++++++++++++ 6 files changed, 81 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7b1defcea3c..fb029f86bc2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2975,7 +2975,7 @@ dependencies = [ [[package]] name = "libp2p-rendezvous" -version = "0.13.0" +version = "0.13.1" dependencies = [ "async-trait", "asynchronous-codec", diff --git a/Cargo.toml b/Cargo.toml index 587b8970d1f..4632900f638 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -97,7 +97,7 @@ libp2p-plaintext = { version = "0.40.1", path = "transports/plaintext" } libp2p-pnet = { version = "0.23.0", path = "transports/pnet" } libp2p-quic = { version = "0.9.3", path = "transports/quic" } libp2p-relay = { version = "0.16.1", path = "protocols/relay" } -libp2p-rendezvous = { version = "0.13.0", path = "protocols/rendezvous" } +libp2p-rendezvous = { version = "0.13.1", path = "protocols/rendezvous" } libp2p-upnp = { version = "0.1.1", path = "protocols/upnp" } libp2p-request-response = { version = "0.25.1", path = "protocols/request-response" } libp2p-server = { version = "0.12.3", path = "misc/server" } diff --git a/protocols/rendezvous/CHANGELOG.md b/protocols/rendezvous/CHANGELOG.md index 15438502daa..7f204c1c07b 100644 --- a/protocols/rendezvous/CHANGELOG.md +++ b/protocols/rendezvous/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.13.1 - unreleased +- Refresh registration upon a change in external addresses. + See [PR 4629]. + +[PR 4629]: https://github.com/libp2p/rust-libp2p/pull/4629 + ## 0.13.0 - Changed the signature of the function `client::Behavior::register()`, diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index 3a61c21ffa2..0225f915346 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-rendezvous" edition = "2021" rust-version = { workspace = true } description = "Rendezvous protocol for libp2p" -version = "0.13.0" +version = "0.13.1" authors = ["The COMIT guys "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/rendezvous/src/client.rs b/protocols/rendezvous/src/client.rs index 505635efda8..8459dc21c7e 100644 --- a/protocols/rendezvous/src/client.rs +++ b/protocols/rendezvous/src/client.rs @@ -49,6 +49,8 @@ pub struct Behaviour { /// Storing these internally allows us to assist the [`libp2p_swarm::Swarm`] in dialing by returning addresses from [`NetworkBehaviour::handle_pending_outbound_connection`]. discovered_peers: HashMap<(PeerId, Namespace), Vec>, + registered_namespaces: HashMap<(PeerId, Namespace), Ttl>, + /// Tracks the expiry of registrations that we have discovered and stored in `discovered_peers` otherwise we have a memory leak. expiring_registrations: FuturesUnordered>, @@ -68,6 +70,7 @@ impl Behaviour { waiting_for_register: Default::default(), waiting_for_discovery: Default::default(), discovered_peers: Default::default(), + registered_namespaces: Default::default(), expiring_registrations: FuturesUnordered::from_iter(vec![ futures::future::pending().boxed() ]), @@ -103,6 +106,9 @@ impl Behaviour { /// Unregister ourselves from the given namespace with the given rendezvous peer. pub fn unregister(&mut self, namespace: Namespace, rendezvous_node: PeerId) { + self.registered_namespaces + .retain(|(rz_node, ns), _| rz_node.ne(&rendezvous_node) && ns.ne(&namespace)); + self.inner .send_request(&rendezvous_node, Unregister(namespace)); } @@ -218,9 +224,18 @@ impl NetworkBehaviour for Behaviour { } fn on_swarm_event(&mut self, event: FromSwarm) { - self.external_addresses.on_swarm_event(&event); + let changed = self.external_addresses.on_swarm_event(&event); self.inner.on_swarm_event(event); + + if changed && self.external_addresses.iter().count() > 0 { + let registered = self.registered_namespaces.clone(); + for ((rz_node, ns), ttl) in registered { + if let Err(e) = self.register(ns, rz_node, Some(ttl)) { + log::warn!("refreshing registration failed: {e}") + } + } + } } fn poll( @@ -348,6 +363,9 @@ impl Behaviour { if let Some((rendezvous_node, namespace)) = self.waiting_for_register.remove(request_id) { + self.registered_namespaces + .insert((rendezvous_node, namespace.clone()), ttl); + return Some(Event::Registered { rendezvous_node, ttl, diff --git a/protocols/rendezvous/tests/rendezvous.rs b/protocols/rendezvous/tests/rendezvous.rs index 992876d1971..64cd294eefa 100644 --- a/protocols/rendezvous/tests/rendezvous.rs +++ b/protocols/rendezvous/tests/rendezvous.rs @@ -20,6 +20,8 @@ use futures::stream::FuturesUnordered; use futures::StreamExt; +use libp2p_core::multiaddr::Protocol; +use libp2p_core::Multiaddr; use libp2p_identity as identity; use libp2p_rendezvous as rendezvous; use libp2p_rendezvous::client::RegisterError; @@ -162,6 +164,57 @@ async fn given_successful_registration_then_refresh_ttl() { } } +#[tokio::test] +async fn given_successful_registration_then_refresh_external_addrs() { + let _ = env_logger::try_init(); + let namespace = rendezvous::Namespace::from_static("some-namespace"); + let ([mut alice], mut robert) = + new_server_with_connected_clients(rendezvous::server::Config::default()).await; + + let roberts_peer_id = *robert.local_peer_id(); + + alice + .behaviour_mut() + .register(namespace.clone(), roberts_peer_id, None) + .unwrap(); + + match libp2p_swarm_test::drive(&mut alice, &mut robert).await { + ( + [rendezvous::client::Event::Registered { .. }], + [rendezvous::server::Event::PeerRegistered { .. }], + ) => {} + events => panic!("Unexpected events: {events:?}"), + } + + let external_addr = Multiaddr::empty().with(Protocol::Memory(0)); + + alice.add_external_address(external_addr.clone()); + + match libp2p_swarm_test::drive(&mut alice, &mut robert).await { + ( + [rendezvous::client::Event::Registered { .. }], + [rendezvous::server::Event::PeerRegistered { registration, .. }], + ) => { + let record = registration.record; + assert!(record.addresses().contains(&external_addr)); + } + events => panic!("Unexpected events: {events:?}"), + } + + alice.remove_external_address(&external_addr); + + match libp2p_swarm_test::drive(&mut alice, &mut robert).await { + ( + [rendezvous::client::Event::Registered { .. }], + [rendezvous::server::Event::PeerRegistered { registration, .. }], + ) => { + let record = registration.record; + assert!(!record.addresses().contains(&external_addr)); + } + events => panic!("Unexpected events: {events:?}"), + } +} + #[tokio::test] async fn given_invalid_ttl_then_unsuccessful_registration() { let _ = env_logger::try_init(); From 15ad4ea1d15c871e55034bd5ff8df5ce4c6f1cc4 Mon Sep 17 00:00:00 2001 From: Leonz Date: Sun, 15 Oct 2023 20:05:08 +0800 Subject: [PATCH 02/27] feat(gossipsub): deprecate `Config::idle_timeout` Deprecate the `Config::idle_timeout` function in preparation for removing the `KeepAlive::Until` entirely. Related: #3844. Pull-Request: #4648. --- Cargo.lock | 2 +- Cargo.toml | 2 +- protocols/gossipsub/CHANGELOG.md | 7 +++++++ protocols/gossipsub/Cargo.toml | 2 +- protocols/gossipsub/src/behaviour.rs | 2 ++ protocols/gossipsub/src/config.rs | 3 +++ 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fb029f86bc2..dc04ae5f776 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2581,7 +2581,7 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" -version = "0.45.1" +version = "0.45.2" dependencies = [ "async-std", "asynchronous-codec", diff --git a/Cargo.toml b/Cargo.toml index 4632900f638..3d7255317cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,7 +81,7 @@ libp2p-dcutr = { version = "0.10.0", path = "protocols/dcutr" } libp2p-deflate = { version = "0.40.1", path = "transports/deflate" } libp2p-dns = { version = "0.40.1", path = "transports/dns" } libp2p-floodsub = { version = "0.43.0", path = "protocols/floodsub" } -libp2p-gossipsub = { version = "0.45.1", path = "protocols/gossipsub" } +libp2p-gossipsub = { version = "0.45.2", path = "protocols/gossipsub" } libp2p-identify = { version = "0.43.1", path = "protocols/identify" } libp2p-identity = { version = "0.2.5" } libp2p-kad = { version = "0.44.6", path = "protocols/kad" } diff --git a/protocols/gossipsub/CHANGELOG.md b/protocols/gossipsub/CHANGELOG.md index a1f4ef6c973..e8e216e29ca 100644 --- a/protocols/gossipsub/CHANGELOG.md +++ b/protocols/gossipsub/CHANGELOG.md @@ -1,3 +1,10 @@ +## 0.45.2 - unreleased + +- Deprecate `gossipsub::Config::idle_timeout` in favor of `SwarmBuilder::idle_connection_timeout`. + See [PR 4648]. + +[PR 4648]: (https://github.com/libp2p/rust-libp2p/pull/4648) + ## 0.45.1 - Add getter function to obtain `TopicScoreParams`. diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index 4f9fd2fa9d3..7a983d66c99 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-gossipsub" edition = "2021" rust-version = { workspace = true } description = "Gossipsub protocol for libp2p" -version = "0.45.1" +version = "0.45.2" authors = ["Age Manning "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/gossipsub/src/behaviour.rs b/protocols/gossipsub/src/behaviour.rs index 402420f378e..2dea607d485 100644 --- a/protocols/gossipsub/src/behaviour.rs +++ b/protocols/gossipsub/src/behaviour.rs @@ -3305,6 +3305,7 @@ where type ConnectionHandler = Handler; type ToSwarm = Event; + #[allow(deprecated)] fn handle_established_inbound_connection( &mut self, _: ConnectionId, @@ -3318,6 +3319,7 @@ where )) } + #[allow(deprecated)] fn handle_established_outbound_connection( &mut self, _: ConnectionId, diff --git a/protocols/gossipsub/src/config.rs b/protocols/gossipsub/src/config.rs index a5d31071538..8ca1d4044f3 100644 --- a/protocols/gossipsub/src/config.rs +++ b/protocols/gossipsub/src/config.rs @@ -186,6 +186,9 @@ impl Config { /// The time a connection is maintained to a peer without being in the mesh and without /// send/receiving a message from. Connections that idle beyond this timeout are disconnected. /// Default is 120 seconds. + #[deprecated( + note = "Set a global idle connection timeout via `SwarmBuilder::idle_connection_timeout` instead." + )] pub fn idle_timeout(&self) -> Duration { self.idle_timeout } From 44ce6566f7ecf5e1499d3811469d003874269a65 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Mon, 16 Oct 2023 13:31:29 +1100 Subject: [PATCH 03/27] chore: activate `clippy::unnecessary_wraps` lint Today, I discovered this clippy lint as part of some other work and found it useful. It doesn't turn up anything in our repository at the moment but it is good to guard against this in future code. Pull-Request: #4652. --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 3d7255317cb..c918f6687b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -136,3 +136,4 @@ rust.unreachable_pub = "warn" clippy.used_underscore_binding = "warn" clippy.pedantic = "allow" clippy.type_complexity = "allow" +clippy.unnecessary_wraps = "warn" From 29c44e85766087e063735b3b547233b874e8431c Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Mon, 16 Oct 2023 17:26:08 +1100 Subject: [PATCH 04/27] ci: run clippy on all targets A small left-over mistake from moving towards `Cargo.toml` controlled lint configuration. Pull-Request: #4654. --- .github/workflows/ci.yml | 3 +-- protocols/kad/CHANGELOG.md | 6 ++++++ protocols/kad/src/handler.rs | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 488cfbc4093..66f686e58ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -229,8 +229,7 @@ jobs: with: save-if: ${{ github.ref == 'refs/heads/master' }} - - name: Run cargo clippy - run: cargo clippy + - run: cargo clippy --all-targets --all-features ipfs-integration-test: name: IPFS Integration tests diff --git a/protocols/kad/CHANGELOG.md b/protocols/kad/CHANGELOG.md index cfc0f325308..d4cc1f6c030 100644 --- a/protocols/kad/CHANGELOG.md +++ b/protocols/kad/CHANGELOG.md @@ -8,6 +8,12 @@ [PR 4547]: https://github.com/libp2p/rust-libp2p/pull/4547 + + ## 0.44.5 - Migrate to `quick-protobuf-codec` crate for codec logic. See [PR 4501]. diff --git a/protocols/kad/src/handler.rs b/protocols/kad/src/handler.rs index 9fcd39190c4..3695c74c50a 100644 --- a/protocols/kad/src/handler.rs +++ b/protocols/kad/src/handler.rs @@ -1224,14 +1224,14 @@ mod tests { match current { None => { - assert_eq!(new.reported, false); + assert!(!new.reported); assert_eq!(new.supported, now_supported); } Some(current) => { if current.supported == now_supported { - assert_eq!(new.reported, true); + assert!(new.reported); } else { - assert_eq!(new.reported, false); + assert!(!new.reported); } assert_eq!(new.supported, now_supported); From c91ecbc8a279a87c9abfb8b0d2f76195f39b7298 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Mon, 16 Oct 2023 17:43:06 +1100 Subject: [PATCH 05/27] ci: don't run changelog check on chores and refactor PRs We don't always want to write a changelog entry or bump the version of a crate when we make changes to it. This especially applies to refactorings and other chores. We can automatically detect such PRs based on our conventional commit title. At the moment, this is not per crate but could be extended in the future. For now, this should be good enough to unblock PRs that are currently stuck on this workflow. Pull-Request: #4658. --- .github/workflows/ci.yml | 5 ++++- protocols/kad/CHANGELOG.md | 6 ------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66f686e58ea..dcfb6bd21be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,10 @@ jobs: test "$PACKAGE_VERSION" = "$SPECIFIED_VERSION" - name: Ensure manifest and CHANGELOG are properly updated - if: github.event_name == 'pull_request' + if: > + github.event_name == 'pull_request' && + !startsWith(github.event.pull_request.title, 'chore') && + !startsWith(github.event.pull_request.title, 'refactor') run: | git fetch origin master:master ./scripts/ensure-version-bump-and-changelog.sh diff --git a/protocols/kad/CHANGELOG.md b/protocols/kad/CHANGELOG.md index d4cc1f6c030..cfc0f325308 100644 --- a/protocols/kad/CHANGELOG.md +++ b/protocols/kad/CHANGELOG.md @@ -8,12 +8,6 @@ [PR 4547]: https://github.com/libp2p/rust-libp2p/pull/4547 - - ## 0.44.5 - Migrate to `quick-protobuf-codec` crate for codec logic. See [PR 4501]. From e1c1f038fe88d0e1b210afe65bdfaa9fdd571f78 Mon Sep 17 00:00:00 2001 From: Leonz Date: Mon, 16 Oct 2023 15:05:10 +0800 Subject: [PATCH 06/27] chore(perf): remove unused module Related: #3844. Pull-Request: #4655. --- protocols/perf/src/client/behaviour.rs | 158 ------------------- protocols/perf/src/client/handler.rs | 203 ------------------------- protocols/perf/src/server/behaviour.rs | 121 --------------- protocols/perf/src/server/handler.rs | 155 ------------------- 4 files changed, 637 deletions(-) delete mode 100644 protocols/perf/src/client/behaviour.rs delete mode 100644 protocols/perf/src/client/handler.rs delete mode 100644 protocols/perf/src/server/behaviour.rs delete mode 100644 protocols/perf/src/server/handler.rs diff --git a/protocols/perf/src/client/behaviour.rs b/protocols/perf/src/client/behaviour.rs deleted file mode 100644 index 912f6d5bb9e..00000000000 --- a/protocols/perf/src/client/behaviour.rs +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright 2023 Protocol Labs. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -//! [`NetworkBehaviour`] of the libp2p perf client protocol. - -use std::{ - collections::{HashSet, VecDeque}, - task::{Context, Poll}, -}; - -use libp2p_core::Multiaddr; -use libp2p_identity::PeerId; -use libp2p_swarm::{ - derive_prelude::ConnectionEstablished, ConnectionClosed, ConnectionId, FromSwarm, - NetworkBehaviour, NotifyHandler, PollParameters, StreamUpgradeError, THandlerInEvent, - THandlerOutEvent, ToSwarm, -}; -use void::Void; - -use crate::client::handler::Handler; - -use super::{RunId, RunParams, RunStats}; - -#[derive(Debug)] -pub struct Event { - pub id: RunId, - pub result: Result>, -} - -#[derive(Default)] -pub struct Behaviour { - /// Queue of actions to return when polled. - queued_events: VecDeque>>, - /// Set of connected peers. - connected: HashSet, -} - -impl Behaviour { - pub fn new() -> Self { - Self::default() - } - - pub fn perf(&mut self, server: PeerId, params: RunParams) -> Result { - if !self.connected.contains(&server) { - return Err(PerfError::NotConnected); - } - - let id = RunId::next(); - - self.queued_events.push_back(ToSwarm::NotifyHandler { - peer_id: server, - handler: NotifyHandler::Any, - event: crate::client::handler::Command { id, params }, - }); - - Ok(id) - } -} - -#[derive(thiserror::Error, Debug)] -pub enum PerfError { - #[error("Not connected to peer")] - NotConnected, -} - -impl NetworkBehaviour for Behaviour { - type ConnectionHandler = Handler; - type ToSwarm = Event; - - fn handle_established_outbound_connection( - &mut self, - _connection_id: ConnectionId, - _peer: PeerId, - _addr: &Multiaddr, - _role_override: libp2p_core::Endpoint, - ) -> Result, libp2p_swarm::ConnectionDenied> { - Ok(Handler::default()) - } - - fn handle_established_inbound_connection( - &mut self, - _connection_id: ConnectionId, - _peer: PeerId, - _local_addr: &Multiaddr, - _remote_addr: &Multiaddr, - ) -> Result, libp2p_swarm::ConnectionDenied> { - Ok(Handler::default()) - } - - fn on_swarm_event(&mut self, event: FromSwarm) { - match event { - FromSwarm::ConnectionEstablished(ConnectionEstablished { peer_id, .. }) => { - self.connected.insert(peer_id); - } - FromSwarm::ConnectionClosed(ConnectionClosed { - peer_id, - connection_id: _, - endpoint: _, - handler: _, - remaining_established, - }) => { - if remaining_established == 0 { - assert!(self.connected.remove(&peer_id)); - } - } - FromSwarm::AddressChange(_) - | FromSwarm::DialFailure(_) - | FromSwarm::ListenFailure(_) - | FromSwarm::NewListener(_) - | FromSwarm::NewListenAddr(_) - | FromSwarm::ExpiredListenAddr(_) - | FromSwarm::ListenerError(_) - | FromSwarm::ListenerClosed(_) - | FromSwarm::NewExternalAddrCandidate(_) - | FromSwarm::ExternalAddrExpired(_) - | FromSwarm::ExternalAddrConfirmed(_) => {} - } - } - - fn on_connection_handler_event( - &mut self, - _event_source: PeerId, - _connection_id: ConnectionId, - super::handler::Event { id, result }: THandlerOutEvent, - ) { - self.queued_events - .push_back(ToSwarm::GenerateEvent(Event { id, result })); - } - - fn poll( - &mut self, - _cx: &mut Context<'_>, - _: &mut impl PollParameters, - ) -> Poll>> { - if let Some(event) = self.queued_events.pop_front() { - return Poll::Ready(event); - } - - Poll::Pending - } -} diff --git a/protocols/perf/src/client/handler.rs b/protocols/perf/src/client/handler.rs deleted file mode 100644 index 8a6df43d198..00000000000 --- a/protocols/perf/src/client/handler.rs +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright 2023 Protocol Labs. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -use std::{ - collections::VecDeque, - task::{Context, Poll}, - time::{Duration, Instant}, -}; - -use futures::{future::BoxFuture, stream::FuturesUnordered, FutureExt, StreamExt, TryFutureExt}; -use libp2p_core::upgrade::{DeniedUpgrade, ReadyUpgrade}; -use libp2p_swarm::{ - handler::{ - ConnectionEvent, DialUpgradeError, FullyNegotiatedInbound, FullyNegotiatedOutbound, - ListenUpgradeError, - }, - ConnectionHandler, ConnectionHandlerEvent, KeepAlive, StreamProtocol, StreamUpgradeError, - SubstreamProtocol, -}; -use void::Void; - -use super::{RunId, RunParams, RunStats}; - -#[derive(Debug)] -pub struct Command { - pub(crate) id: RunId, - pub(crate) params: RunParams, -} - -#[derive(Debug)] -pub struct Event { - pub(crate) id: RunId, - pub(crate) result: Result>, -} - -pub struct Handler { - /// Queue of events to return when polled. - queued_events: VecDeque< - ConnectionHandlerEvent< - ::OutboundProtocol, - ::OutboundOpenInfo, - ::ToBehaviour, - ::Error, - >, - >, - - requested_streams: VecDeque, - - outbound: FuturesUnordered>>, - - keep_alive: KeepAlive, -} - -impl Handler { - pub fn new() -> Self { - Self { - queued_events: Default::default(), - requested_streams: Default::default(), - outbound: Default::default(), - keep_alive: KeepAlive::Yes, - } - } -} - -impl Default for Handler { - fn default() -> Self { - Self::new() - } -} - -impl ConnectionHandler for Handler { - type FromBehaviour = Command; - type ToBehaviour = Event; - type Error = Void; - type InboundProtocol = DeniedUpgrade; - type OutboundProtocol = ReadyUpgrade; - type OutboundOpenInfo = (); - type InboundOpenInfo = (); - - fn listen_protocol(&self) -> SubstreamProtocol { - SubstreamProtocol::new(DeniedUpgrade, ()) - } - - fn on_behaviour_event(&mut self, command: Self::FromBehaviour) { - self.requested_streams.push_back(command); - self.queued_events - .push_back(ConnectionHandlerEvent::OutboundSubstreamRequest { - protocol: SubstreamProtocol::new(ReadyUpgrade::new(crate::PROTOCOL_NAME), ()), - }) - } - - fn on_connection_event( - &mut self, - event: ConnectionEvent< - Self::InboundProtocol, - Self::OutboundProtocol, - Self::InboundOpenInfo, - Self::OutboundOpenInfo, - >, - ) { - match event { - ConnectionEvent::FullyNegotiatedInbound(FullyNegotiatedInbound { - protocol, .. - }) => void::unreachable(protocol), - ConnectionEvent::FullyNegotiatedOutbound(FullyNegotiatedOutbound { - protocol, - info: (), - }) => { - let Command { id, params } = self - .requested_streams - .pop_front() - .expect("opened a stream without a pending command"); - self.outbound.push( - crate::protocol::send_receive(params, protocol) - .map_ok(move |timers| Event { - id, - result: Ok(RunStats { params, timers }), - }) - .boxed(), - ); - } - - ConnectionEvent::AddressChange(_) - | ConnectionEvent::LocalProtocolsChange(_) - | ConnectionEvent::RemoteProtocolsChange(_) => {} - ConnectionEvent::DialUpgradeError(DialUpgradeError { info: (), error }) => { - let Command { id, .. } = self - .requested_streams - .pop_front() - .expect("requested stream without pending command"); - self.queued_events - .push_back(ConnectionHandlerEvent::NotifyBehaviour(Event { - id, - result: Err(error), - })); - } - ConnectionEvent::ListenUpgradeError(ListenUpgradeError { info: (), error }) => { - void::unreachable(error) - } - } - } - - fn connection_keep_alive(&self) -> KeepAlive { - self.keep_alive - } - - fn poll( - &mut self, - cx: &mut Context<'_>, - ) -> Poll< - ConnectionHandlerEvent< - Self::OutboundProtocol, - Self::OutboundOpenInfo, - Self::ToBehaviour, - Self::Error, - >, - > { - // Return queued events. - if let Some(event) = self.queued_events.pop_front() { - return Poll::Ready(event); - } - - while let Poll::Ready(Some(result)) = self.outbound.poll_next_unpin(cx) { - match result { - Ok(event) => return Poll::Ready(ConnectionHandlerEvent::NotifyBehaviour(event)), - Err(e) => { - panic!("{e:?}") - } - } - } - - if self.outbound.is_empty() { - match self.keep_alive { - KeepAlive::Yes => { - self.keep_alive = KeepAlive::Until(Instant::now() + Duration::from_secs(10)); - } - KeepAlive::Until(_) => {} - KeepAlive::No => panic!("Handler never sets KeepAlive::No."), - } - } else { - self.keep_alive = KeepAlive::Yes - } - - Poll::Pending - } -} diff --git a/protocols/perf/src/server/behaviour.rs b/protocols/perf/src/server/behaviour.rs deleted file mode 100644 index b15cb70110d..00000000000 --- a/protocols/perf/src/server/behaviour.rs +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2023 Protocol Labs. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -//! [`NetworkBehaviour`] of the libp2p perf server protocol. - -use std::{ - collections::VecDeque, - task::{Context, Poll}, -}; - -use libp2p_identity::PeerId; -use libp2p_swarm::{ - ConnectionId, FromSwarm, NetworkBehaviour, PollParameters, THandlerInEvent, THandlerOutEvent, - ToSwarm, -}; - -use crate::server::handler::Handler; - -use super::RunStats; - -#[derive(Debug)] -pub struct Event { - pub remote_peer_id: PeerId, - pub stats: RunStats, -} - -#[derive(Default)] -pub struct Behaviour { - /// Queue of actions to return when polled. - queued_events: VecDeque>>, -} - -impl Behaviour { - pub fn new() -> Self { - Self::default() - } -} - -impl NetworkBehaviour for Behaviour { - type ConnectionHandler = Handler; - type ToSwarm = Event; - - fn handle_established_inbound_connection( - &mut self, - _connection_id: ConnectionId, - _peer: PeerId, - _local_addr: &libp2p_core::Multiaddr, - _remote_addr: &libp2p_core::Multiaddr, - ) -> Result, libp2p_swarm::ConnectionDenied> { - Ok(Handler::default()) - } - - fn handle_established_outbound_connection( - &mut self, - _connection_id: ConnectionId, - _peer: PeerId, - _addr: &libp2p_core::Multiaddr, - _role_override: libp2p_core::Endpoint, - ) -> Result, libp2p_swarm::ConnectionDenied> { - Ok(Handler::default()) - } - - fn on_swarm_event(&mut self, event: FromSwarm) { - match event { - FromSwarm::ConnectionEstablished(_) => {} - FromSwarm::ConnectionClosed(_) => {} - FromSwarm::AddressChange(_) => {} - FromSwarm::DialFailure(_) => {} - FromSwarm::ListenFailure(_) => {} - FromSwarm::NewListener(_) => {} - FromSwarm::NewListenAddr(_) => {} - FromSwarm::ExpiredListenAddr(_) => {} - FromSwarm::ListenerError(_) => {} - FromSwarm::ListenerClosed(_) => {} - FromSwarm::NewExternalAddrCandidate(_) => {} - FromSwarm::ExternalAddrExpired(_) => {} - FromSwarm::ExternalAddrConfirmed(_) => {} - } - } - - fn on_connection_handler_event( - &mut self, - event_source: PeerId, - _connection_id: ConnectionId, - super::handler::Event { stats }: THandlerOutEvent, - ) { - self.queued_events.push_back(ToSwarm::GenerateEvent(Event { - remote_peer_id: event_source, - stats, - })) - } - - fn poll( - &mut self, - _cx: &mut Context<'_>, - _: &mut impl PollParameters, - ) -> Poll>> { - if let Some(event) = self.queued_events.pop_front() { - return Poll::Ready(event); - } - - Poll::Pending - } -} diff --git a/protocols/perf/src/server/handler.rs b/protocols/perf/src/server/handler.rs deleted file mode 100644 index e8f7b72e605..00000000000 --- a/protocols/perf/src/server/handler.rs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2023 Protocol Labs. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. - -use std::{ - task::{Context, Poll}, - time::{Duration, Instant}, -}; - -use futures::{future::BoxFuture, stream::FuturesUnordered, FutureExt, StreamExt}; -use libp2p_core::upgrade::{DeniedUpgrade, ReadyUpgrade}; -use libp2p_swarm::{ - handler::{ - ConnectionEvent, DialUpgradeError, FullyNegotiatedInbound, FullyNegotiatedOutbound, - ListenUpgradeError, - }, - ConnectionHandler, ConnectionHandlerEvent, KeepAlive, StreamProtocol, SubstreamProtocol, -}; -use log::error; -use void::Void; - -use super::RunStats; - -#[derive(Debug)] -pub struct Event { - pub stats: RunStats, -} - -pub struct Handler { - inbound: FuturesUnordered>>, - keep_alive: KeepAlive, -} - -impl Handler { - pub fn new() -> Self { - Self { - inbound: Default::default(), - keep_alive: KeepAlive::Yes, - } - } -} - -impl Default for Handler { - fn default() -> Self { - Self::new() - } -} - -impl ConnectionHandler for Handler { - type FromBehaviour = Void; - type ToBehaviour = Event; - type Error = Void; - type InboundProtocol = ReadyUpgrade; - type OutboundProtocol = DeniedUpgrade; - type OutboundOpenInfo = Void; - type InboundOpenInfo = (); - - fn listen_protocol(&self) -> SubstreamProtocol { - SubstreamProtocol::new(ReadyUpgrade::new(crate::PROTOCOL_NAME), ()) - } - - fn on_behaviour_event(&mut self, v: Self::FromBehaviour) { - void::unreachable(v) - } - - fn on_connection_event( - &mut self, - event: ConnectionEvent< - Self::InboundProtocol, - Self::OutboundProtocol, - Self::InboundOpenInfo, - Self::OutboundOpenInfo, - >, - ) { - match event { - ConnectionEvent::FullyNegotiatedInbound(FullyNegotiatedInbound { - protocol, - info: _, - }) => { - self.inbound - .push(crate::protocol::receive_send(protocol).boxed()); - } - ConnectionEvent::FullyNegotiatedOutbound(FullyNegotiatedOutbound { info, .. }) => { - void::unreachable(info) - } - - ConnectionEvent::DialUpgradeError(DialUpgradeError { info, .. }) => { - void::unreachable(info) - } - ConnectionEvent::AddressChange(_) - | ConnectionEvent::LocalProtocolsChange(_) - | ConnectionEvent::RemoteProtocolsChange(_) => {} - ConnectionEvent::ListenUpgradeError(ListenUpgradeError { info: (), error }) => { - void::unreachable(error) - } - } - } - - fn connection_keep_alive(&self) -> KeepAlive { - self.keep_alive - } - - fn poll( - &mut self, - cx: &mut Context<'_>, - ) -> Poll< - ConnectionHandlerEvent< - Self::OutboundProtocol, - Self::OutboundOpenInfo, - Self::ToBehaviour, - Self::Error, - >, - > { - while let Poll::Ready(Some(result)) = self.inbound.poll_next_unpin(cx) { - match result { - Ok(stats) => { - return Poll::Ready(ConnectionHandlerEvent::NotifyBehaviour(Event { stats })) - } - Err(e) => { - error!("{e:?}") - } - } - } - - if self.inbound.is_empty() { - match self.keep_alive { - KeepAlive::Yes => { - self.keep_alive = KeepAlive::Until(Instant::now() + Duration::from_secs(10)); - } - KeepAlive::Until(_) => {} - KeepAlive::No => panic!("Handler never sets KeepAlive::No."), - } - } else { - self.keep_alive = KeepAlive::Yes - } - - Poll::Pending - } -} From c980b4e2ceb3fe16534d7fd4fda86077da2d8636 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Mon, 16 Oct 2023 03:43:33 -0400 Subject: [PATCH 07/27] deps(noise): update `x25519-dalek` to 2.0.0 Pull-Request: #4657. --- Cargo.lock | 38 +++++++---------------------------- Cargo.toml | 2 +- transports/noise/CHANGELOG.md | 4 ++++ transports/noise/Cargo.toml | 4 ++-- 4 files changed, 14 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dc04ae5f776..521780e8599 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1159,19 +1159,6 @@ dependencies = [ "rand 0.7.3", ] -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "4.1.1" @@ -1363,7 +1350,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek", "ed25519", "rand_core 0.6.4", "serde", @@ -2804,10 +2791,10 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.43.1" +version = "0.43.2" dependencies = [ "bytes", - "curve25519-dalek 4.1.1", + "curve25519-dalek", "env_logger 0.10.0", "futures", "futures_ringbuf", @@ -2824,7 +2811,7 @@ dependencies = [ "snow", "static_assertions", "thiserror", - "x25519-dalek 1.1.1", + "x25519-dalek", "zeroize", ] @@ -5231,7 +5218,7 @@ dependencies = [ "aes-gcm 0.9.2", "blake2", "chacha20poly1305", - "curve25519-dalek 4.1.1", + "curve25519-dalek", "rand_core 0.6.4", "ring", "rustc_version", @@ -6297,7 +6284,7 @@ dependencies = [ "thiserror", "tokio", "webrtc-util", - "x25519-dalek 2.0.0", + "x25519-dalek", "x509-parser", ] @@ -6562,24 +6549,13 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "x25519-dalek" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" -dependencies = [ - "curve25519-dalek 3.2.0", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "x25519-dalek" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek", "rand_core 0.6.4", "serde", "zeroize", diff --git a/Cargo.toml b/Cargo.toml index c918f6687b5..53caa96109d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,7 +90,7 @@ libp2p-memory-connection-limits = { version = "0.1.0", path = "misc/memory-conne libp2p-metrics = { version = "0.13.1", path = "misc/metrics" } libp2p-mplex = { version = "0.40.0", path = "muxers/mplex" } libp2p-muxer-test-harness = { path = "muxers/test-harness" } -libp2p-noise = { version = "0.43.1", path = "transports/noise" } +libp2p-noise = { version = "0.43.2", path = "transports/noise" } libp2p-perf = { version = "0.2.0", path = "protocols/perf" } libp2p-ping = { version = "0.43.1", path = "protocols/ping" } libp2p-plaintext = { version = "0.40.1", path = "transports/plaintext" } diff --git a/transports/noise/CHANGELOG.md b/transports/noise/CHANGELOG.md index 2a0c31c96a8..63fad1357d7 100644 --- a/transports/noise/CHANGELOG.md +++ b/transports/noise/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.43.2 + +- Update x25519-dalek to 2.0.0. + ## 0.43.1 - Update dependencies. diff --git a/transports/noise/Cargo.toml b/transports/noise/Cargo.toml index 876a3cd34d5..2ea366f8293 100644 --- a/transports/noise/Cargo.toml +++ b/transports/noise/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-noise" edition = "2021" rust-version = { workspace = true } description = "Cryptographic handshake protocol using the noise framework." -version = "0.43.1" +version = "0.43.2" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -23,7 +23,7 @@ rand = "0.8.3" sha2 = "0.10.8" static_assertions = "1" thiserror = "1.0.49" -x25519-dalek = "1.1.0" +x25519-dalek = "2" zeroize = "1" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] From e54580525dea8ee6e0ace1feaa5e46778bc5aaba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 08:22:36 +0000 Subject: [PATCH 08/27] deps: bump tracing from 0.1.37 to 0.1.39 Pull-Request: #4665. --- Cargo.lock | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 521780e8599..3bea3dd5367 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5681,11 +5681,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "ee2ef2af84856a50c1d430afce2fdded0a4ec7eda868db86409b4543df0797f9" dependencies = [ - "cfg-if", "log", "pin-project-lite 0.2.12", "tracing-attributes", @@ -5694,9 +5693,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", @@ -5705,9 +5704,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", From 7c6f75eaf2398db7dda44959a6bc05355386f81e Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 17 Oct 2023 03:32:09 +1100 Subject: [PATCH 09/27] feat(swarm): deprecate `KeepAlive::Until` In preparation for removing this variant, we are issuing a deprecation notice. The linked issue describes why and guides users in migrating away from it. This deprecation is backwards-compatible and allows us to remove the variant in the next breaking release. We haven't migrated all internal protocols yet but that isn't strictly necessary to issue the deprecation. Related: #3844. Pull-Request: #4656. --- Cargo.lock | 4 ++-- Cargo.toml | 4 ++-- protocols/gossipsub/CHANGELOG.md | 6 ++++++ protocols/gossipsub/src/handler.rs | 1 + protocols/kad/CHANGELOG.md | 6 ++++++ protocols/kad/src/handler.rs | 19 ++++++++++------ protocols/relay/CHANGELOG.md | 8 +++++++ protocols/relay/Cargo.toml | 2 +- protocols/relay/src/behaviour/handler.rs | 1 + protocols/relay/src/priv_client/handler.rs | 25 ++++++++++++---------- protocols/request-response/CHANGELOG.md | 8 +++++++ protocols/request-response/Cargo.toml | 2 +- protocols/request-response/src/handler.rs | 1 + swarm/CHANGELOG.md | 4 ++++ swarm/src/connection.rs | 2 ++ swarm/src/handler.rs | 4 ++++ swarm/src/handler/one_shot.rs | 3 +++ 17 files changed, 76 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3bea3dd5367..c13e8367e11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2934,7 +2934,7 @@ dependencies = [ [[package]] name = "libp2p-relay" -version = "0.16.1" +version = "0.16.2" dependencies = [ "asynchronous-codec", "bytes", @@ -2992,7 +2992,7 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.25.1" +version = "0.25.2" dependencies = [ "async-std", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 53caa96109d..3f2de6c2e29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -96,10 +96,10 @@ libp2p-ping = { version = "0.43.1", path = "protocols/ping" } libp2p-plaintext = { version = "0.40.1", path = "transports/plaintext" } libp2p-pnet = { version = "0.23.0", path = "transports/pnet" } libp2p-quic = { version = "0.9.3", path = "transports/quic" } -libp2p-relay = { version = "0.16.1", path = "protocols/relay" } +libp2p-relay = { version = "0.16.2", path = "protocols/relay" } libp2p-rendezvous = { version = "0.13.1", path = "protocols/rendezvous" } libp2p-upnp = { version = "0.1.1", path = "protocols/upnp" } -libp2p-request-response = { version = "0.25.1", path = "protocols/request-response" } +libp2p-request-response = { version = "0.25.2", path = "protocols/request-response" } libp2p-server = { version = "0.12.3", path = "misc/server" } libp2p-swarm = { version = "0.43.6", path = "swarm" } libp2p-swarm-derive = { version = "0.33.0", path = "swarm-derive" } diff --git a/protocols/gossipsub/CHANGELOG.md b/protocols/gossipsub/CHANGELOG.md index e8e216e29ca..51836ec9074 100644 --- a/protocols/gossipsub/CHANGELOG.md +++ b/protocols/gossipsub/CHANGELOG.md @@ -5,6 +5,12 @@ [PR 4648]: (https://github.com/libp2p/rust-libp2p/pull/4648) + + ## 0.45.1 - Add getter function to obtain `TopicScoreParams`. diff --git a/protocols/gossipsub/src/handler.rs b/protocols/gossipsub/src/handler.rs index 8508e026cee..f152b51ba14 100644 --- a/protocols/gossipsub/src/handler.rs +++ b/protocols/gossipsub/src/handler.rs @@ -444,6 +444,7 @@ impl ConnectionHandler for Handler { return KeepAlive::Yes; } + #[allow(deprecated)] KeepAlive::Until(handler.last_io_activity + handler.idle_timeout) } Handler::Disabled(_) => KeepAlive::No, diff --git a/protocols/kad/CHANGELOG.md b/protocols/kad/CHANGELOG.md index cfc0f325308..63d0e6a3fbc 100644 --- a/protocols/kad/CHANGELOG.md +++ b/protocols/kad/CHANGELOG.md @@ -8,6 +8,12 @@ [PR 4547]: https://github.com/libp2p/rust-libp2p/pull/4547 + + ## 0.44.5 - Migrate to `quick-protobuf-codec` crate for codec logic. See [PR 4501]. diff --git a/protocols/kad/src/handler.rs b/protocols/kad/src/handler.rs index 3695c74c50a..fdb927836c7 100644 --- a/protocols/kad/src/handler.rs +++ b/protocols/kad/src/handler.rs @@ -484,6 +484,7 @@ impl Handler { } } + #[allow(deprecated)] let keep_alive = KeepAlive::Until(Instant::now() + idle_timeout); Handler { @@ -769,13 +770,17 @@ impl ConnectionHandler for Handler { } let no_streams = self.outbound_substreams.is_empty() && self.inbound_substreams.is_empty(); - self.keep_alive = match (no_streams, self.keep_alive) { - // No open streams. Preserve the existing idle timeout. - (true, k @ KeepAlive::Until(_)) => k, - // No open streams. Set idle timeout. - (true, _) => KeepAlive::Until(Instant::now() + self.idle_timeout), - // Keep alive for open streams. - (false, _) => KeepAlive::Yes, + + self.keep_alive = { + #[allow(deprecated)] + match (no_streams, self.keep_alive) { + // No open streams. Preserve the existing idle timeout. + (true, k @ KeepAlive::Until(_)) => k, + // No open streams. Set idle timeout. + (true, _) => KeepAlive::Until(Instant::now() + self.idle_timeout), + // Keep alive for open streams. + (false, _) => KeepAlive::Yes, + } }; Poll::Pending diff --git a/protocols/relay/CHANGELOG.md b/protocols/relay/CHANGELOG.md index 6af89e25d71..6c5e107e67d 100644 --- a/protocols/relay/CHANGELOG.md +++ b/protocols/relay/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.16.2 - unreleased + + + ## 0.16.1 - Export `RateLimiter` type. diff --git a/protocols/relay/Cargo.toml b/protocols/relay/Cargo.toml index 03799a8c77c..070c2cbc50d 100644 --- a/protocols/relay/Cargo.toml +++ b/protocols/relay/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-relay" edition = "2021" rust-version = { workspace = true } description = "Communications relaying for libp2p" -version = "0.16.1" +version = "0.16.2" authors = ["Parity Technologies ", "Max Inden "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/relay/src/behaviour/handler.rs b/protocols/relay/src/behaviour/handler.rs index 895228e807b..fc822e78ce5 100644 --- a/protocols/relay/src/behaviour/handler.rs +++ b/protocols/relay/src/behaviour/handler.rs @@ -883,6 +883,7 @@ impl ConnectionHandler for Handler { && self.circuits.is_empty() && self.active_reservation.is_none() { + #[allow(deprecated)] match self.keep_alive { KeepAlive::Yes => { self.keep_alive = KeepAlive::Until(Instant::now() + Duration::from_secs(10)); diff --git a/protocols/relay/src/priv_client/handler.rs b/protocols/relay/src/priv_client/handler.rs index 25488ac3041..41ac85cfdd2 100644 --- a/protocols/relay/src/priv_client/handler.rs +++ b/protocols/relay/src/priv_client/handler.rs @@ -489,21 +489,24 @@ impl ConnectionHandler for Handler { } // Update keep-alive handling. - if matches!(self.reservation, Reservation::None) - && self.alive_lend_out_substreams.is_empty() - && self.circuit_deny_futs.is_empty() + #[allow(deprecated)] { - match self.keep_alive { - KeepAlive::Yes => { - self.keep_alive = KeepAlive::Until(Instant::now() + Duration::from_secs(10)); + if matches!(self.reservation, Reservation::None) + && self.alive_lend_out_substreams.is_empty() + && self.circuit_deny_futs.is_empty() + { + match self.keep_alive { + KeepAlive::Yes => { + self.keep_alive = + KeepAlive::Until(Instant::now() + Duration::from_secs(10)); + } + KeepAlive::Until(_) => {} + KeepAlive::No => panic!("Handler never sets KeepAlive::No."), } - KeepAlive::Until(_) => {} - KeepAlive::No => panic!("Handler never sets KeepAlive::No."), + } else { + self.keep_alive = KeepAlive::Yes; } - } else { - self.keep_alive = KeepAlive::Yes; } - Poll::Pending } diff --git a/protocols/request-response/CHANGELOG.md b/protocols/request-response/CHANGELOG.md index 693145c6f72..485fa911396 100644 --- a/protocols/request-response/CHANGELOG.md +++ b/protocols/request-response/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.25.2 - unreleased + + + ## 0.25.1 - Replace unmaintained `serde_cbor` dependency with `cbor4ii`. diff --git a/protocols/request-response/Cargo.toml b/protocols/request-response/Cargo.toml index b87048bb629..ee1049a96e3 100644 --- a/protocols/request-response/Cargo.toml +++ b/protocols/request-response/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-request-response" edition = "2021" rust-version = { workspace = true } description = "Generic Request/Response Protocols" -version = "0.25.1" +version = "0.25.2" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/request-response/src/handler.rs b/protocols/request-response/src/handler.rs index 35a2db98bdc..86f036365b8 100644 --- a/protocols/request-response/src/handler.rs +++ b/protocols/request-response/src/handler.rs @@ -336,6 +336,7 @@ where self.outbound.shrink_to_fit(); } + #[allow(deprecated)] if self.inbound.is_empty() && self.keep_alive.is_yes() { // No new inbound or outbound requests. However, we may just have // started the latest inbound or outbound upgrade(s), so make sure diff --git a/swarm/CHANGELOG.md b/swarm/CHANGELOG.md index 3e4ccd004b4..cb003f2da4f 100644 --- a/swarm/CHANGELOG.md +++ b/swarm/CHANGELOG.md @@ -6,6 +6,10 @@ See [PR 4120]. - Make the `Debug` implementation of `StreamProtocol` more concise. See [PR 4631](https://github.com/libp2p/rust-libp2p/pull/4631). +- Deprecate `KeepAlive::Until`. + Individual protocols should not keep connections alive for longer than necessary. + Users should use `swarm::Config::idle_connection_timeout` instead. + See [PR 4656](https://github.com/libp2p/rust-libp2p/pull/4656). [PR 4120]: https://github.com/libp2p/rust-libp2p/pull/4120 diff --git a/swarm/src/connection.rs b/swarm/src/connection.rs index 8fdc39edae0..7cbd66ed700 100644 --- a/swarm/src/connection.rs +++ b/swarm/src/connection.rs @@ -347,6 +347,7 @@ where // Ask the handler whether it wants the connection (and the handler itself) // to be kept alive, which determines the planned shutdown, if any. let keep_alive = handler.connection_keep_alive(); + #[allow(deprecated)] match (&mut *shutdown, keep_alive) { (Shutdown::Later(timer, deadline), KeepAlive::Until(t)) => { if *deadline != t { @@ -1005,6 +1006,7 @@ mod tests { } fn connection_keep_alive(&self) -> KeepAlive { + #[allow(deprecated)] KeepAlive::Until(self.until) } diff --git a/swarm/src/handler.rs b/swarm/src/handler.rs index 9374903f9b7..67ca095ed1e 100644 --- a/swarm/src/handler.rs +++ b/swarm/src/handler.rs @@ -728,6 +728,9 @@ where #[derive(Debug, Copy, Clone, PartialEq, Eq)] pub enum KeepAlive { /// If nothing new happens, the connection should be closed at the given `Instant`. + #[deprecated( + note = "Use `swarm::Config::with_idle_connection_timeout` instead. See for details." + )] Until(Instant), /// Keep the connection alive. Yes, @@ -748,6 +751,7 @@ impl PartialOrd for KeepAlive { } } +#[allow(deprecated)] impl Ord for KeepAlive { fn cmp(&self, other: &KeepAlive) -> Ordering { use self::KeepAlive::*; diff --git a/swarm/src/handler/one_shot.rs b/swarm/src/handler/one_shot.rs index 439d3f47ee3..bcbfae9c7b5 100644 --- a/swarm/src/handler/one_shot.rs +++ b/swarm/src/handler/one_shot.rs @@ -176,6 +176,7 @@ where } else { self.dial_queue.shrink_to_fit(); + #[allow(deprecated)] if self.dial_negotiated == 0 && self.keep_alive.is_yes() { self.keep_alive = KeepAlive::Until(Instant::now() + self.config.keep_alive_timeout); } @@ -199,6 +200,7 @@ where .. }) => { // If we're shutting down the connection for inactivity, reset the timeout. + #[allow(deprecated)] if !self.keep_alive.is_yes() { self.keep_alive = KeepAlive::Until(Instant::now() + self.config.keep_alive_timeout); @@ -258,6 +260,7 @@ mod tests { use void::Void; #[test] + #[allow(deprecated)] fn do_not_keep_idle_connection_alive() { let mut handler: OneShotHandler<_, DeniedUpgrade, Void> = OneShotHandler::new( SubstreamProtocol::new(DeniedUpgrade {}, ()), From ce91c1c22c3db9a21eb8ab5b636bd7894cf5f216 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 17 Oct 2023 08:57:36 +1100 Subject: [PATCH 10/27] chore: apply clippy lints to public API By default, clippy doesn't suggest changes if it would break the public API. Whilst a sensible default, it makes us miss certain opportunities to follow conventions correctly. When a new lint is added, we can always temporarily allow it and make a change in the next breaking release but I think it is better to be aware of the lint than having it automatically silenced. Pull-Request: #4653. --- Cargo.lock | 6 +++--- Cargo.toml | 6 +++--- clippy.toml | 1 + identity/CHANGELOG.md | 5 +++++ identity/Cargo.toml | 2 +- identity/src/lib.rs | 3 ++- identity/src/peer_id.rs | 4 ++-- protocols/gossipsub/CHANGELOG.md | 6 ++++++ protocols/gossipsub/src/behaviour.rs | 2 +- transports/pnet/CHANGELOG.md | 8 ++++++++ transports/pnet/Cargo.toml | 2 +- transports/pnet/src/lib.rs | 1 + transports/webrtc-websys/CHANGELOG.md | 5 +++++ transports/webrtc-websys/Cargo.toml | 2 +- transports/webrtc-websys/src/connection.rs | 6 +++--- transports/webrtc-websys/src/error.rs | 8 ++++---- 16 files changed, 47 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c13e8367e11..a4113e63344 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2630,7 +2630,7 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.2.5" +version = "0.2.6" dependencies = [ "asn1_der", "base64 0.21.4", @@ -2884,7 +2884,7 @@ dependencies = [ [[package]] name = "libp2p-pnet" -version = "0.23.0" +version = "0.23.1" dependencies = [ "futures", "libp2p-core", @@ -3229,7 +3229,7 @@ dependencies = [ [[package]] name = "libp2p-webrtc-websys" -version = "0.1.0-alpha" +version = "0.2.0-alpha" dependencies = [ "bytes", "futures", diff --git a/Cargo.toml b/Cargo.toml index 3f2de6c2e29..8d57d1dd9e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,7 +83,7 @@ libp2p-dns = { version = "0.40.1", path = "transports/dns" } libp2p-floodsub = { version = "0.43.0", path = "protocols/floodsub" } libp2p-gossipsub = { version = "0.45.2", path = "protocols/gossipsub" } libp2p-identify = { version = "0.43.1", path = "protocols/identify" } -libp2p-identity = { version = "0.2.5" } +libp2p-identity = { version = "0.2.6" } libp2p-kad = { version = "0.44.6", path = "protocols/kad" } libp2p-mdns = { version = "0.44.0", path = "protocols/mdns" } libp2p-memory-connection-limits = { version = "0.1.0", path = "misc/memory-connection-limits" } @@ -94,7 +94,7 @@ libp2p-noise = { version = "0.43.2", path = "transports/noise" } libp2p-perf = { version = "0.2.0", path = "protocols/perf" } libp2p-ping = { version = "0.43.1", path = "protocols/ping" } libp2p-plaintext = { version = "0.40.1", path = "transports/plaintext" } -libp2p-pnet = { version = "0.23.0", path = "transports/pnet" } +libp2p-pnet = { version = "0.23.1", path = "transports/pnet" } libp2p-quic = { version = "0.9.3", path = "transports/quic" } libp2p-relay = { version = "0.16.2", path = "protocols/relay" } libp2p-rendezvous = { version = "0.13.1", path = "protocols/rendezvous" } @@ -110,7 +110,7 @@ libp2p-uds = { version = "0.39.0", path = "transports/uds" } libp2p-wasm-ext = { version = "0.40.0", path = "transports/wasm-ext" } libp2p-webrtc = { version = "0.6.1-alpha", path = "transports/webrtc" } libp2p-webrtc-utils = { version = "0.1.0", path = "misc/webrtc-utils" } -libp2p-webrtc-websys = { version = "0.1.0-alpha", path = "transports/webrtc-websys" } +libp2p-webrtc-websys = { version = "0.2.0-alpha", path = "transports/webrtc-websys" } libp2p-websocket = { version = "0.42.1", path = "transports/websocket" } libp2p-websocket-websys = { version = "0.2.0", path = "transports/websocket-websys" } libp2p-webtransport-websys = { version = "0.1.0", path = "transports/webtransport-websys" } diff --git a/clippy.toml b/clippy.toml index f66cc0ac2da..fd38ead0202 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1,3 +1,4 @@ disallowed-methods = [ { path = "futures::channel::mpsc::unbounded", reason = "does not enforce backpressure" }, ] +avoid-breaking-exported-api = false diff --git a/identity/CHANGELOG.md b/identity/CHANGELOG.md index 27873e88e01..3e4cf727ad7 100644 --- a/identity/CHANGELOG.md +++ b/identity/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.2.6 + +- Make `PeerId::to_bytes` and `PeerId::to_base58` take `self` by value to follow Rust convention of `Copy` types. + See [PR 4653](https://github.com/libp2p/rust-libp2p/pull/4653). + ## 0.2.5 - Fix usage of HKDF within `Keypair::derive_secret`. diff --git a/identity/Cargo.toml b/identity/Cargo.toml index 69f8bf55f02..1502b0932a2 100644 --- a/identity/Cargo.toml +++ b/identity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libp2p-identity" -version = "0.2.5" +version = "0.2.6" edition = "2021" description = "Data structures and algorithms for identifying peers in libp2p." rust-version = { workspace = true } diff --git a/identity/src/lib.rs b/identity/src/lib.rs index 9a6c42374f6..c78e68d1652 100644 --- a/identity/src/lib.rs +++ b/identity/src/lib.rs @@ -114,8 +114,9 @@ pub use keypair::{Keypair, PublicKey}; #[cfg(feature = "peerid")] pub use peer_id::{ParseError, PeerId}; -#[derive(Debug, PartialEq, Eq)] /// The type of key a `KeyPair` is holding. +#[derive(Debug, PartialEq, Eq)] +#[allow(clippy::upper_case_acronyms)] pub enum KeyType { Ed25519, RSA, diff --git a/identity/src/peer_id.rs b/identity/src/peer_id.rs index 60ded4ad37c..838799697e7 100644 --- a/identity/src/peer_id.rs +++ b/identity/src/peer_id.rs @@ -109,12 +109,12 @@ impl PeerId { } /// Returns a raw bytes representation of this `PeerId`. - pub fn to_bytes(&self) -> Vec { + pub fn to_bytes(self) -> Vec { self.multihash.to_bytes() } /// Returns a base-58 encoded string of this `PeerId`. - pub fn to_base58(&self) -> String { + pub fn to_base58(self) -> String { bs58::encode(self.to_bytes()).into_string() } } diff --git a/protocols/gossipsub/CHANGELOG.md b/protocols/gossipsub/CHANGELOG.md index 51836ec9074..4532c6e78fc 100644 --- a/protocols/gossipsub/CHANGELOG.md +++ b/protocols/gossipsub/CHANGELOG.md @@ -3,6 +3,12 @@ - Deprecate `gossipsub::Config::idle_timeout` in favor of `SwarmBuilder::idle_connection_timeout`. See [PR 4648]. + + [PR 4648]: (https://github.com/libp2p/rust-libp2p/pull/4648) + ## 0.23.0 - Raise MSRV to 1.65. diff --git a/transports/pnet/Cargo.toml b/transports/pnet/Cargo.toml index c6dd93f661a..936e3da9357 100644 --- a/transports/pnet/Cargo.toml +++ b/transports/pnet/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-pnet" edition = "2021" rust-version = { workspace = true } description = "Private swarm support for libp2p" -version = "0.23.0" +version = "0.23.1" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/pnet/src/lib.rs b/transports/pnet/src/lib.rs index 15f42556c62..d8aac22eecd 100644 --- a/transports/pnet/src/lib.rs +++ b/transports/pnet/src/lib.rs @@ -159,6 +159,7 @@ impl fmt::Display for Fingerprint { /// Error when parsing a PreSharedKey #[derive(Clone, Debug, PartialEq, Eq)] +#[allow(clippy::enum_variant_names)] // Maybe fix at some stage, not important now. pub enum KeyParseError { /// file does not have the expected structure InvalidKeyFile, diff --git a/transports/webrtc-websys/CHANGELOG.md b/transports/webrtc-websys/CHANGELOG.md index 7c40c08f1f6..7887d30a07f 100644 --- a/transports/webrtc-websys/CHANGELOG.md +++ b/transports/webrtc-websys/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.2.0-alpha - unreleased + +- Rename `Error::JsError` to `Error::Js`. + See [PR 4653](https://github.com/libp2p/rust-libp2p/pull/4653) + ## 0.1.0-alpha - Initial alpha release. diff --git a/transports/webrtc-websys/Cargo.toml b/transports/webrtc-websys/Cargo.toml index cb90573b1fe..847e54abbd5 100644 --- a/transports/webrtc-websys/Cargo.toml +++ b/transports/webrtc-websys/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" name = "libp2p-webrtc-websys" repository = "https://github.com/libp2p/rust-libp2p" rust-version = { workspace = true } -version = "0.1.0-alpha" +version = "0.2.0-alpha" publish = true [dependencies] diff --git a/transports/webrtc-websys/src/connection.rs b/transports/webrtc-websys/src/connection.rs index dfdebbc98c0..b026aec0b40 100644 --- a/transports/webrtc-websys/src/connection.rs +++ b/transports/webrtc-websys/src/connection.rs @@ -252,11 +252,11 @@ impl RtcPeerConnection { let sdp = &self .inner .local_description() - .ok_or_else(|| Error::JsError("No local description".to_string()))? + .ok_or_else(|| Error::Js("No local description".to_string()))? .sdp(); - let fingerprint = parse_fingerprint(sdp) - .ok_or_else(|| Error::JsError("No fingerprint in SDP".to_string()))?; + let fingerprint = + parse_fingerprint(sdp).ok_or_else(|| Error::Js("No fingerprint in SDP".to_string()))?; Ok(fingerprint) } diff --git a/transports/webrtc-websys/src/error.rs b/transports/webrtc-websys/src/error.rs index e226dea8069..c95b1caf49b 100644 --- a/transports/webrtc-websys/src/error.rs +++ b/transports/webrtc-websys/src/error.rs @@ -8,7 +8,7 @@ pub enum Error { InvalidMultiaddr(&'static str), #[error("JavaScript error: {0}")] - JsError(String), + Js(String), #[error("JavaScript typecasting failed")] JsCastFailed, @@ -34,7 +34,7 @@ impl Error { "Unknown error".to_string() }; - Error::JsError(s) + Error::Js(s) } } @@ -46,12 +46,12 @@ impl std::convert::From for Error { impl From for Error { fn from(value: String) -> Self { - Error::JsError(value) + Error::Js(value) } } impl From for Error { fn from(value: std::io::Error) -> Self { - Error::JsError(value.to_string()) + Error::Js(value.to_string()) } } From 09f8cb4d27ce66207b617ed7ada6a78b8764b481 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 17 Oct 2023 09:31:06 +1100 Subject: [PATCH 11/27] ci: don't require changelog entries for `docs` and `deps` Pull-Request: #4670. --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcfb6bd21be..68c52cffb2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,7 +76,9 @@ jobs: if: > github.event_name == 'pull_request' && !startsWith(github.event.pull_request.title, 'chore') && - !startsWith(github.event.pull_request.title, 'refactor') + !startsWith(github.event.pull_request.title, 'refactor') && + !startsWith(github.event.pull_request.title, 'deps') && + !startsWith(github.event.pull_request.title, 'docs') run: | git fetch origin master:master ./scripts/ensure-version-bump-and-changelog.sh From 43575e9918bd2c5d0dea076d52f82d4f31b42bb1 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 17 Oct 2023 10:27:41 +1100 Subject: [PATCH 12/27] refactor: use `cargo chef` for `rust-libp2p-server` docker build Using `cargo chef` allows us to significantly speed up the build of docker images in CI as we can make use of `cache-{to,from}` to push the created cache layers to an S3 bucket. Pull-Request: #4605. --- .github/workflows/docker-image.yml | 5 +++++ misc/server/Dockerfile | 29 +++++++++++++++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 322fb255b1c..b9cd82897c2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -35,5 +35,10 @@ jobs: context: . file: ./misc/server/Dockerfile push: ${{ ! github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} # Only push image if we have the required permissions, i.e. not running from a fork + cache-from: ${{ ! github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' && type=s3,mode=max,bucket=libp2p-by-tf-aws-bootstrap,region=us-east-1,prefix=buildCache,name=rust-libp2p-server }} + cache-to: ${{ ! github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' && type=s3,mode=max,bucket=libp2p-by-tf-aws-bootstrap,region=us-east-1,prefix=buildCache,name=rust-libp2p-server }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + env: + AWS_ACCESS_KEY_ID: ${{ vars.TEST_PLANS_BUILD_CACHE_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_PLANS_BUILD_CACHE_KEY }} diff --git a/misc/server/Dockerfile b/misc/server/Dockerfile index 72641cc3b2e..90e504f4b11 100644 --- a/misc/server/Dockerfile +++ b/misc/server/Dockerfile @@ -1,19 +1,20 @@ -FROM rust:1.72-bullseye as builder -WORKDIR /usr/src/rust-libp2p-server +# syntax=docker/dockerfile:1.5-labs +FROM rust:1.67.0 as chef +RUN wget -q -O- https://github.com/LukeMathWalker/cargo-chef/releases/download/v0.1.62/cargo-chef-x86_64-unknown-linux-gnu.tar.gz | tar -zx -C /usr/local/bin +RUN cargo install --locked --root /usr/local libp2p-lookup --version 0.6.4 +WORKDIR /app -# Run with access to the target cache to speed up builds -WORKDIR /workspace +FROM chef AS planner +COPY . . +RUN cargo chef prepare --recipe-path recipe.json -RUN --mount=type=cache,target=/usr/local/cargo/registry \ - cargo install --locked --root /usr/local libp2p-lookup --version 0.6.4 - -ADD . . -RUN --mount=type=cache,target=./target \ - --mount=type=cache,target=/usr/local/cargo/registry \ - cargo build --release --package libp2p-server - -RUN --mount=type=cache,target=./target \ - mv ./target/release/libp2p-server /usr/local/bin/libp2p-server +FROM chef AS builder +COPY --from=planner /app/recipe.json recipe.json +# Build dependencies - this is the caching Docker layer! +RUN cargo chef cook --release --package libp2p-server --recipe-path recipe.json +# Build application +COPY . . +RUN cargo build --release --package libp2p-server FROM gcr.io/distroless/cc COPY --from=builder /usr/local/bin/libp2p-server /usr/local/bin/libp2p-lookup /usr/local/bin/ From 82902fc9f9a9a85d38ee62fdd11d3cd7bf8f5474 Mon Sep 17 00:00:00 2001 From: Nathaniel Cook Date: Mon, 16 Oct 2023 17:54:36 -0600 Subject: [PATCH 13/27] fix(kad): re-export `NodeStatus` The `EntryView` struct exposes the node status however its type is not public making it impossible to use the status field. This change re-exports `NodeStatus`. Related: #4108. Pull-Request: #4645. --- protocols/kad/CHANGELOG.md | 6 ++++-- protocols/kad/src/kbucket.rs | 1 + protocols/kad/src/lib.rs | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/protocols/kad/CHANGELOG.md b/protocols/kad/CHANGELOG.md index 63d0e6a3fbc..11510e3e963 100644 --- a/protocols/kad/CHANGELOG.md +++ b/protocols/kad/CHANGELOG.md @@ -1,12 +1,14 @@ ## 0.44.6 - unreleased -- Rename `Kademlia` symbols to follow naming convention. +- Rename `Kademlia` symbols to follow naming convention. See [PR 4547]. - - Fix a bug where we didn't detect a remote peer moving into client-state. See [PR 4639](https://github.com/libp2p/rust-libp2p/pull/4639). +- Re-export `NodeStatus`. + See [PR 4645]. [PR 4547]: https://github.com/libp2p/rust-libp2p/pull/4547 +[PR 4645]: https://github.com/libp2p/rust-libp2p/pull/4645 -## 0.23.0 +## 0.23.0 - Raise MSRV to 1.65. See [PR 3715]. diff --git a/transports/quic/CHANGELOG.md b/transports/quic/CHANGELOG.md index fdd8c24b2a5..e13488cff49 100644 --- a/transports/quic/CHANGELOG.md +++ b/transports/quic/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.9.3 - unreleased +## 0.9.3 - No longer report error when explicit closing of a QUIC endpoint succeeds. See [PR 4621]. diff --git a/transports/webrtc-websys/CHANGELOG.md b/transports/webrtc-websys/CHANGELOG.md index 7887d30a07f..3cc263e2ce5 100644 --- a/transports/webrtc-websys/CHANGELOG.md +++ b/transports/webrtc-websys/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.2.0-alpha - unreleased +## 0.2.0-alpha - Rename `Error::JsError` to `Error::Js`. See [PR 4653](https://github.com/libp2p/rust-libp2p/pull/4653) diff --git a/transports/websocket-websys/CHANGELOG.md b/transports/websocket-websys/CHANGELOG.md index 1eb27b83071..e9b4cb9d2b3 100644 --- a/transports/websocket-websys/CHANGELOG.md +++ b/transports/websocket-websys/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.2.0 - unreleased +## 0.2.0 - Add Websys Websocket transport. From 51070dae6395821c5ab45014b7208f15975c9101 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 18 Oct 2023 19:36:05 +0200 Subject: [PATCH 25/27] chore(tcp): release v0.40.1 Version bump missed in https://github.com/libp2p/rust-libp2p/pull/4120. Pull-Request: #4683. --- Cargo.lock | 2 +- Cargo.toml | 2 +- transports/tcp/CHANGELOG.md | 7 ++++++- transports/tcp/Cargo.toml | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 91423aa0461..915b47d253b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3099,7 +3099,7 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.40.0" +version = "0.40.1" dependencies = [ "async-io", "async-std", diff --git a/Cargo.toml b/Cargo.toml index f8b092e8d6b..7194347e1e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -104,7 +104,7 @@ libp2p-server = { version = "0.12.3", path = "misc/server" } libp2p-swarm = { version = "0.43.6", path = "swarm" } libp2p-swarm-derive = { version = "0.33.0", path = "swarm-derive" } libp2p-swarm-test = { version = "0.2.0", path = "swarm-test" } -libp2p-tcp = { version = "0.40.0", path = "transports/tcp" } +libp2p-tcp = { version = "0.40.1", path = "transports/tcp" } libp2p-tls = { version = "0.2.1", path = "transports/tls" } libp2p-uds = { version = "0.39.0", path = "transports/uds" } libp2p-wasm-ext = { version = "0.40.0", path = "transports/wasm-ext" } diff --git a/transports/tcp/CHANGELOG.md b/transports/tcp/CHANGELOG.md index f0164b342e5..13134b661c5 100644 --- a/transports/tcp/CHANGELOG.md +++ b/transports/tcp/CHANGELOG.md @@ -1,4 +1,9 @@ -## 0.40.0 +## 0.40.1 + +- Expose `async_io::TcpStream`. + See [PR 4683](https://github.com/libp2p/rust-libp2p/pull/4683). + +## 0.40.0 - Raise MSRV to 1.65. See [PR 3715]. diff --git a/transports/tcp/Cargo.toml b/transports/tcp/Cargo.toml index dd3d58875ab..8e0f37302ea 100644 --- a/transports/tcp/Cargo.toml +++ b/transports/tcp/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-tcp" edition = "2021" rust-version = { workspace = true } description = "TCP/IP transport protocol for libp2p" -version = "0.40.0" +version = "0.40.1" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" From c35c413b3a2987892bc822a9c0c63ae8a56d24d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 19:06:57 +0000 Subject: [PATCH 26/27] deps: bump rustix from 0.37.23 to 0.37.25 Pull-Request: #4684. --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 915b47d253b..e53f40ecdb4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -328,7 +328,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.23", + "rustix 0.37.25", "slab", "socket2 0.4.9", "waker-fn", @@ -368,7 +368,7 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix 0.37.23", + "rustix 0.37.25", "signal-hook", "windows-sys", ] @@ -4777,9 +4777,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" +version = "0.37.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "d4eb579851244c2c03e7c24f501c3432bed80b8f720af1d6e5b0e0f01555a035" dependencies = [ "bitflags 1.3.2", "errno", From 7e3c2fe0884deecb56f2f346a4e23f4e43f6e80b Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 20 Oct 2023 11:06:17 +1100 Subject: [PATCH 27/27] chore: open merge window for next breaking release (#4685) --- Cargo.lock | 70 +++++++++---------- Cargo.toml | 70 +++++++++---------- core/Cargo.toml | 2 +- examples/autonat/Cargo.toml | 3 + examples/browser-webrtc/Cargo.toml | 3 + examples/chat/Cargo.toml | 3 + examples/dcutr/Cargo.toml | 3 + .../distributed-key-value-store/Cargo.toml | 3 + examples/file-sharing/Cargo.toml | 3 + examples/identify/Cargo.toml | 3 + examples/ipfs-kad/Cargo.toml | 3 + examples/ipfs-private/Cargo.toml | 3 + examples/metrics/Cargo.toml | 3 + examples/ping/Cargo.toml | 3 + examples/relay-server/Cargo.toml | 3 + examples/rendezvous/Cargo.toml | 3 + examples/upnp/Cargo.toml | 3 + interop-tests/Cargo.toml | 3 + libp2p/Cargo.toml | 2 +- misc/allow-block-list/Cargo.toml | 2 +- misc/connection-limits/Cargo.toml | 2 +- misc/keygen/Cargo.toml | 3 + misc/memory-connection-limits/Cargo.toml | 2 +- misc/metrics/Cargo.toml | 2 +- misc/quickcheck-ext/Cargo.toml | 3 + muxers/mplex/Cargo.toml | 2 +- muxers/test-harness/Cargo.toml | 3 + muxers/yamux/Cargo.toml | 2 +- protocols/autonat/Cargo.toml | 2 +- protocols/dcutr/Cargo.toml | 2 +- protocols/floodsub/Cargo.toml | 2 +- protocols/gossipsub/Cargo.toml | 2 +- protocols/identify/Cargo.toml | 2 +- protocols/kad/Cargo.toml | 2 +- protocols/mdns/Cargo.toml | 2 +- protocols/ping/Cargo.toml | 2 +- protocols/relay/Cargo.toml | 2 +- protocols/rendezvous/Cargo.toml | 2 +- protocols/request-response/Cargo.toml | 2 +- protocols/upnp/Cargo.toml | 2 +- swarm-derive/Cargo.toml | 2 +- swarm-test/Cargo.toml | 2 +- swarm/Cargo.toml | 2 +- transports/deflate/Cargo.toml | 2 +- transports/dns/Cargo.toml | 2 +- transports/noise/Cargo.toml | 2 +- transports/plaintext/Cargo.toml | 2 +- transports/pnet/Cargo.toml | 2 +- transports/quic/Cargo.toml | 2 +- transports/tcp/Cargo.toml | 2 +- transports/tls/Cargo.toml | 2 +- transports/uds/Cargo.toml | 2 +- transports/websocket-websys/Cargo.toml | 2 +- transports/websocket/Cargo.toml | 2 +- transports/webtransport-websys/Cargo.toml | 2 +- wasm-tests/webtransport-tests/Cargo.toml | 3 + 56 files changed, 162 insertions(+), 105 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e53f40ecdb4..112df8b4219 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2349,7 +2349,7 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libp2p" -version = "0.52.4" +version = "0.53.0" dependencies = [ "async-std", "async-trait", @@ -2404,7 +2404,7 @@ dependencies = [ [[package]] name = "libp2p-allow-block-list" -version = "0.2.0" +version = "0.3.0" dependencies = [ "async-std", "libp2p-core", @@ -2417,7 +2417,7 @@ dependencies = [ [[package]] name = "libp2p-autonat" -version = "0.11.0" +version = "0.12.0" dependencies = [ "async-std", "async-trait", @@ -2437,7 +2437,7 @@ dependencies = [ [[package]] name = "libp2p-connection-limits" -version = "0.2.1" +version = "0.3.0" dependencies = [ "async-std", "libp2p-core", @@ -2454,7 +2454,7 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.40.1" +version = "0.41.0" dependencies = [ "async-std", "either", @@ -2485,7 +2485,7 @@ dependencies = [ [[package]] name = "libp2p-dcutr" -version = "0.10.0" +version = "0.11.0" dependencies = [ "async-std", "asynchronous-codec", @@ -2517,7 +2517,7 @@ dependencies = [ [[package]] name = "libp2p-deflate" -version = "0.40.1" +version = "0.41.0" dependencies = [ "async-std", "flate2", @@ -2531,7 +2531,7 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.40.1" +version = "0.41.0" dependencies = [ "async-std", "async-std-resolver", @@ -2549,7 +2549,7 @@ dependencies = [ [[package]] name = "libp2p-floodsub" -version = "0.43.0" +version = "0.44.0" dependencies = [ "asynchronous-codec", "cuckoofilter", @@ -2568,7 +2568,7 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" -version = "0.45.2" +version = "0.46.0" dependencies = [ "async-std", "asynchronous-codec", @@ -2606,7 +2606,7 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.43.1" +version = "0.44.0" dependencies = [ "async-std", "asynchronous-codec", @@ -2659,7 +2659,7 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.44.6" +version = "0.45.0" dependencies = [ "arrayvec", "async-std", @@ -2694,7 +2694,7 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.44.0" +version = "0.45.0" dependencies = [ "async-io", "async-std", @@ -2720,7 +2720,7 @@ dependencies = [ [[package]] name = "libp2p-memory-connection-limits" -version = "0.1.0" +version = "0.2.0" dependencies = [ "async-std", "libp2p-core", @@ -2738,7 +2738,7 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.13.1" +version = "0.14.0" dependencies = [ "instant", "libp2p-core", @@ -2756,7 +2756,7 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.40.0" +version = "0.41.0" dependencies = [ "async-std", "asynchronous-codec", @@ -2791,7 +2791,7 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.43.2" +version = "0.44.0" dependencies = [ "bytes", "curve25519-dalek", @@ -2846,7 +2846,7 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.43.1" +version = "0.44.0" dependencies = [ "async-std", "either", @@ -2866,7 +2866,7 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.40.1" +version = "0.41.0" dependencies = [ "asynchronous-codec", "bytes", @@ -2884,7 +2884,7 @@ dependencies = [ [[package]] name = "libp2p-pnet" -version = "0.23.1" +version = "0.24.0" dependencies = [ "futures", "libp2p-core", @@ -2905,7 +2905,7 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.9.3" +version = "0.10.0" dependencies = [ "async-std", "bytes", @@ -2934,7 +2934,7 @@ dependencies = [ [[package]] name = "libp2p-relay" -version = "0.16.2" +version = "0.17.0" dependencies = [ "asynchronous-codec", "bytes", @@ -2962,7 +2962,7 @@ dependencies = [ [[package]] name = "libp2p-rendezvous" -version = "0.13.1" +version = "0.14.0" dependencies = [ "async-trait", "asynchronous-codec", @@ -2992,7 +2992,7 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.25.2" +version = "0.26.0" dependencies = [ "async-std", "async-trait", @@ -3038,7 +3038,7 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.43.6" +version = "0.44.0" dependencies = [ "async-std", "either", @@ -3071,7 +3071,7 @@ dependencies = [ [[package]] name = "libp2p-swarm-derive" -version = "0.33.0" +version = "0.34.0" dependencies = [ "heck", "proc-macro-warning", @@ -3082,7 +3082,7 @@ dependencies = [ [[package]] name = "libp2p-swarm-test" -version = "0.2.0" +version = "0.3.0" dependencies = [ "async-trait", "futures", @@ -3099,7 +3099,7 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.40.1" +version = "0.41.0" dependencies = [ "async-io", "async-std", @@ -3117,7 +3117,7 @@ dependencies = [ [[package]] name = "libp2p-tls" -version = "0.2.1" +version = "0.3.0" dependencies = [ "futures", "futures-rustls", @@ -3139,7 +3139,7 @@ dependencies = [ [[package]] name = "libp2p-uds" -version = "0.39.0" +version = "0.40.0" dependencies = [ "async-std", "futures", @@ -3151,7 +3151,7 @@ dependencies = [ [[package]] name = "libp2p-upnp" -version = "0.1.1" +version = "0.2.0" dependencies = [ "futures", "futures-timer", @@ -3255,7 +3255,7 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.42.1" +version = "0.43.0" dependencies = [ "async-std", "either", @@ -3277,7 +3277,7 @@ dependencies = [ [[package]] name = "libp2p-websocket-websys" -version = "0.2.0" +version = "0.3.0" dependencies = [ "bytes", "futures", @@ -3296,7 +3296,7 @@ dependencies = [ [[package]] name = "libp2p-webtransport-websys" -version = "0.1.0" +version = "0.2.0" dependencies = [ "futures", "js-sys", @@ -3316,7 +3316,7 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.44.1" +version = "0.45.0" dependencies = [ "async-std", "futures", diff --git a/Cargo.toml b/Cargo.toml index 7194347e1e6..c2c92d751af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,49 +72,49 @@ rust-version = "1.65.0" [workspace.dependencies] futures-bounded = { version = "0.1.0", path = "misc/futures-bounded" } -libp2p = { version = "0.52.4", path = "libp2p" } -libp2p-allow-block-list = { version = "0.2.0", path = "misc/allow-block-list" } -libp2p-autonat = { version = "0.11.0", path = "protocols/autonat" } -libp2p-connection-limits = { version = "0.2.1", path = "misc/connection-limits" } -libp2p-core = { version = "0.40.1", path = "core" } -libp2p-dcutr = { version = "0.10.0", path = "protocols/dcutr" } -libp2p-deflate = { version = "0.40.1", path = "transports/deflate" } -libp2p-dns = { version = "0.40.1", path = "transports/dns" } -libp2p-floodsub = { version = "0.43.0", path = "protocols/floodsub" } -libp2p-gossipsub = { version = "0.45.2", path = "protocols/gossipsub" } -libp2p-identify = { version = "0.43.1", path = "protocols/identify" } +libp2p = { version = "0.53.0", path = "libp2p" } +libp2p-allow-block-list = { version = "0.3.0", path = "misc/allow-block-list" } +libp2p-autonat = { version = "0.12.0", path = "protocols/autonat" } +libp2p-connection-limits = { version = "0.3.0", path = "misc/connection-limits" } +libp2p-core = { version = "0.41.0", path = "core" } +libp2p-dcutr = { version = "0.11.0", path = "protocols/dcutr" } +libp2p-deflate = { version = "0.41.0", path = "transports/deflate" } +libp2p-dns = { version = "0.41.0", path = "transports/dns" } +libp2p-floodsub = { version = "0.44.0", path = "protocols/floodsub" } +libp2p-gossipsub = { version = "0.46.0", path = "protocols/gossipsub" } +libp2p-identify = { version = "0.44.0", path = "protocols/identify" } libp2p-identity = { version = "0.2.7" } -libp2p-kad = { version = "0.44.6", path = "protocols/kad" } -libp2p-mdns = { version = "0.44.0", path = "protocols/mdns" } -libp2p-memory-connection-limits = { version = "0.1.0", path = "misc/memory-connection-limits" } -libp2p-metrics = { version = "0.13.1", path = "misc/metrics" } -libp2p-mplex = { version = "0.40.0", path = "muxers/mplex" } +libp2p-kad = { version = "0.45.0", path = "protocols/kad" } +libp2p-mdns = { version = "0.45.0", path = "protocols/mdns" } +libp2p-memory-connection-limits = { version = "0.2.0", path = "misc/memory-connection-limits" } +libp2p-metrics = { version = "0.14.0", path = "misc/metrics" } +libp2p-mplex = { version = "0.41.0", path = "muxers/mplex" } libp2p-muxer-test-harness = { path = "muxers/test-harness" } -libp2p-noise = { version = "0.43.2", path = "transports/noise" } +libp2p-noise = { version = "0.44.0", path = "transports/noise" } libp2p-perf = { version = "0.2.0", path = "protocols/perf" } -libp2p-ping = { version = "0.43.1", path = "protocols/ping" } -libp2p-plaintext = { version = "0.40.1", path = "transports/plaintext" } -libp2p-pnet = { version = "0.23.1", path = "transports/pnet" } -libp2p-quic = { version = "0.9.3", path = "transports/quic" } -libp2p-relay = { version = "0.16.2", path = "protocols/relay" } -libp2p-rendezvous = { version = "0.13.1", path = "protocols/rendezvous" } -libp2p-upnp = { version = "0.1.1", path = "protocols/upnp" } -libp2p-request-response = { version = "0.25.2", path = "protocols/request-response" } +libp2p-ping = { version = "0.44.0", path = "protocols/ping" } +libp2p-plaintext = { version = "0.41.0", path = "transports/plaintext" } +libp2p-pnet = { version = "0.24.0", path = "transports/pnet" } +libp2p-quic = { version = "0.10.0", path = "transports/quic" } +libp2p-relay = { version = "0.17.0", path = "protocols/relay" } +libp2p-rendezvous = { version = "0.14.0", path = "protocols/rendezvous" } +libp2p-upnp = { version = "0.2.0", path = "protocols/upnp" } +libp2p-request-response = { version = "0.26.0", path = "protocols/request-response" } libp2p-server = { version = "0.12.3", path = "misc/server" } -libp2p-swarm = { version = "0.43.6", path = "swarm" } -libp2p-swarm-derive = { version = "0.33.0", path = "swarm-derive" } -libp2p-swarm-test = { version = "0.2.0", path = "swarm-test" } -libp2p-tcp = { version = "0.40.1", path = "transports/tcp" } -libp2p-tls = { version = "0.2.1", path = "transports/tls" } -libp2p-uds = { version = "0.39.0", path = "transports/uds" } +libp2p-swarm = { version = "0.44.0", path = "swarm" } +libp2p-swarm-derive = { version = "0.34.0", path = "swarm-derive" } +libp2p-swarm-test = { version = "0.3.0", path = "swarm-test" } +libp2p-tcp = { version = "0.41.0", path = "transports/tcp" } +libp2p-tls = { version = "0.3.0", path = "transports/tls" } +libp2p-uds = { version = "0.40.0", path = "transports/uds" } libp2p-wasm-ext = { version = "0.40.0", path = "transports/wasm-ext" } libp2p-webrtc = { version = "0.6.1-alpha", path = "transports/webrtc" } libp2p-webrtc-utils = { version = "0.1.0", path = "misc/webrtc-utils" } libp2p-webrtc-websys = { version = "0.2.0-alpha", path = "transports/webrtc-websys" } -libp2p-websocket = { version = "0.42.1", path = "transports/websocket" } -libp2p-websocket-websys = { version = "0.2.0", path = "transports/websocket-websys" } -libp2p-webtransport-websys = { version = "0.1.0", path = "transports/webtransport-websys" } -libp2p-yamux = { version = "0.44.1", path = "muxers/yamux" } +libp2p-websocket = { version = "0.43.0", path = "transports/websocket" } +libp2p-websocket-websys = { version = "0.3.0", path = "transports/websocket-websys" } +libp2p-webtransport-websys = { version = "0.2.0", path = "transports/webtransport-websys" } +libp2p-yamux = { version = "0.45.0", path = "muxers/yamux" } multistream-select = { version = "0.13.0", path = "misc/multistream-select" } quick-protobuf-codec = { version = "0.2.0", path = "misc/quick-protobuf-codec" } quickcheck = { package = "quickcheck-ext", path = "misc/quickcheck-ext" } diff --git a/core/Cargo.toml b/core/Cargo.toml index b1fd644f379..7347fd98ca2 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-core" edition = "2021" rust-version = { workspace = true } description = "Core traits and structs of libp2p" -version = "0.40.1" +version = "0.41.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/examples/autonat/Cargo.toml b/examples/autonat/Cargo.toml index f720b191e68..e61a31bcd85 100644 --- a/examples/autonat/Cargo.toml +++ b/examples/autonat/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] tokio = { version = "1.33", features = ["full"] } clap = { version = "4.3.23", features = ["derive"] } diff --git a/examples/browser-webrtc/Cargo.toml b/examples/browser-webrtc/Cargo.toml index eed983a3ca8..dfd0d5bf7c7 100644 --- a/examples/browser-webrtc/Cargo.toml +++ b/examples/browser-webrtc/Cargo.toml @@ -9,6 +9,9 @@ repository = "https://github.com/libp2p/rust-libp2p" rust-version = { workspace = true } version = "0.1.0" +[package.metadata.release] +release = false + [lib] crate-type = ["cdylib"] diff --git a/examples/chat/Cargo.toml b/examples/chat/Cargo.toml index ee82c6dccbe..9889fbc7ee4 100644 --- a/examples/chat/Cargo.toml +++ b/examples/chat/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] tokio = { version = "1.33", features = ["full"] } async-trait = "0.1" diff --git a/examples/dcutr/Cargo.toml b/examples/dcutr/Cargo.toml index 7c35fefcaf9..56a0ef1eca1 100644 --- a/examples/dcutr/Cargo.toml +++ b/examples/dcutr/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] clap = { version = "4.3.23", features = ["derive"] } env_logger = "0.10.0" diff --git a/examples/distributed-key-value-store/Cargo.toml b/examples/distributed-key-value-store/Cargo.toml index fd1f92dc410..123fbc1b3fc 100644 --- a/examples/distributed-key-value-store/Cargo.toml +++ b/examples/distributed-key-value-store/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" diff --git a/examples/file-sharing/Cargo.toml b/examples/file-sharing/Cargo.toml index 90462790c11..f64fc504700 100644 --- a/examples/file-sharing/Cargo.toml +++ b/examples/file-sharing/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] serde = { version = "1.0", features = ["derive"] } async-std = { version = "1.12", features = ["attributes"] } diff --git a/examples/identify/Cargo.toml b/examples/identify/Cargo.toml index cc30a0c614c..e0d21590bb4 100644 --- a/examples/identify/Cargo.toml +++ b/examples/identify/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" diff --git a/examples/ipfs-kad/Cargo.toml b/examples/ipfs-kad/Cargo.toml index 075d80754c1..e619a72a551 100644 --- a/examples/ipfs-kad/Cargo.toml +++ b/examples/ipfs-kad/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] tokio = { version = "1.33", features = ["rt-multi-thread", "macros"] } async-trait = "0.1" diff --git a/examples/ipfs-private/Cargo.toml b/examples/ipfs-private/Cargo.toml index a042212b2d4..e9cccce7c60 100644 --- a/examples/ipfs-private/Cargo.toml +++ b/examples/ipfs-private/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] tokio = { version = "1.33", features = ["rt-multi-thread", "macros", "io-std"] } async-trait = "0.1" diff --git a/examples/metrics/Cargo.toml b/examples/metrics/Cargo.toml index 8cf7e1fc406..239e88bd424 100644 --- a/examples/metrics/Cargo.toml +++ b/examples/metrics/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] env_logger = "0.10.0" futures = "0.3.27" diff --git a/examples/ping/Cargo.toml b/examples/ping/Cargo.toml index 04a6073f363..3b45b0b9115 100644 --- a/examples/ping/Cargo.toml +++ b/examples/ping/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] env_logger = "0.10.0" futures = "0.3.28" diff --git a/examples/relay-server/Cargo.toml b/examples/relay-server/Cargo.toml index 39d899f5573..275038f75df 100644 --- a/examples/relay-server/Cargo.toml +++ b/examples/relay-server/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] clap = { version = "4.3.23", features = ["derive"] } async-std = { version = "1.12", features = ["attributes"] } diff --git a/examples/rendezvous/Cargo.toml b/examples/rendezvous/Cargo.toml index 45ffc4e170a..fa5125dded1 100644 --- a/examples/rendezvous/Cargo.toml +++ b/examples/rendezvous/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" diff --git a/examples/upnp/Cargo.toml b/examples/upnp/Cargo.toml index dc55507a021..a7beb8378d3 100644 --- a/examples/upnp/Cargo.toml +++ b/examples/upnp/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + [dependencies] tokio = { version = "1", features = ["rt-multi-thread", "macros"] } futures = "0.3.28" diff --git a/interop-tests/Cargo.toml b/interop-tests/Cargo.toml index 2383499b835..b10fed0ae49 100644 --- a/interop-tests/Cargo.toml +++ b/interop-tests/Cargo.toml @@ -5,6 +5,9 @@ version = "0.1.0" publish = false license = "MIT" +[package.metadata.release] +release = false + [lib] crate-type = ["cdylib", "rlib"] diff --git a/libp2p/Cargo.toml b/libp2p/Cargo.toml index 0e142261f46..a576409c81a 100644 --- a/libp2p/Cargo.toml +++ b/libp2p/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p" edition = "2021" rust-version = { workspace = true } description = "Peer-to-peer networking library" -version = "0.52.4" +version = "0.53.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/misc/allow-block-list/Cargo.toml b/misc/allow-block-list/Cargo.toml index 84125f0c0a7..c620e7f4a2b 100644 --- a/misc/allow-block-list/Cargo.toml +++ b/misc/allow-block-list/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-allow-block-list" edition = "2021" rust-version = { workspace = true } description = "Allow/block list connection management for libp2p." -version = "0.2.0" +version = "0.3.0" license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] diff --git a/misc/connection-limits/Cargo.toml b/misc/connection-limits/Cargo.toml index 1ba551470a0..2aa26ad44f1 100644 --- a/misc/connection-limits/Cargo.toml +++ b/misc/connection-limits/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-connection-limits" edition = "2021" rust-version = { workspace = true } description = "Connection limits for libp2p." -version = "0.2.1" +version = "0.3.0" license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] diff --git a/misc/keygen/Cargo.toml b/misc/keygen/Cargo.toml index 4ef663c4c9c..91092d9920e 100644 --- a/misc/keygen/Cargo.toml +++ b/misc/keygen/Cargo.toml @@ -9,6 +9,9 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] publish = false +[package.metadata.release] +release = false + [dependencies] clap = { version = "4.3.23", features = ["derive"] } zeroize = "1" diff --git a/misc/memory-connection-limits/Cargo.toml b/misc/memory-connection-limits/Cargo.toml index eb65d26ac66..bf2a0384570 100644 --- a/misc/memory-connection-limits/Cargo.toml +++ b/misc/memory-connection-limits/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-memory-connection-limits" edition = "2021" rust-version = { workspace = true } description = "Memory usage based connection limits for libp2p." -version = "0.1.0" +version = "0.2.0" license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] diff --git a/misc/metrics/Cargo.toml b/misc/metrics/Cargo.toml index 661774dcc8f..3f2845dafb8 100644 --- a/misc/metrics/Cargo.toml +++ b/misc/metrics/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-metrics" edition = "2021" rust-version = { workspace = true } description = "Metrics for libp2p" -version = "0.13.1" +version = "0.14.0" authors = ["Max Inden "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/misc/quickcheck-ext/Cargo.toml b/misc/quickcheck-ext/Cargo.toml index 65e45e47ab8..9fe3cbf25c1 100644 --- a/misc/quickcheck-ext/Cargo.toml +++ b/misc/quickcheck-ext/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "Unlicense/MIT" +[package.metadata.release] +release = false + [dependencies] quickcheck = "1" num-traits = "0.2" diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index 4501546adc1..c57df26f8ec 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-mplex" edition = "2021" rust-version = { workspace = true } description = "Mplex multiplexing protocol for libp2p" -version = "0.40.0" +version = "0.41.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/muxers/test-harness/Cargo.toml b/muxers/test-harness/Cargo.toml index 5304509b9cc..59a047d8daf 100644 --- a/muxers/test-harness/Cargo.toml +++ b/muxers/test-harness/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" publish = false license = "MIT" +[package.metadata.release] +release = false + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] diff --git a/muxers/yamux/Cargo.toml b/muxers/yamux/Cargo.toml index 3073c040ff3..e9e62238f6f 100644 --- a/muxers/yamux/Cargo.toml +++ b/muxers/yamux/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-yamux" edition = "2021" rust-version = { workspace = true } description = "Yamux multiplexing protocol for libp2p" -version = "0.44.1" +version = "0.45.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/autonat/Cargo.toml b/protocols/autonat/Cargo.toml index 3b81d62b516..e3b4ed4a120 100644 --- a/protocols/autonat/Cargo.toml +++ b/protocols/autonat/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-autonat" edition = "2021" rust-version = { workspace = true } description = "NAT and firewall detection for libp2p" -version = "0.11.0" +version = "0.12.0" authors = ["David Craven ", "Elena Frank "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/dcutr/Cargo.toml b/protocols/dcutr/Cargo.toml index f12684816c6..1cd82ca1b60 100644 --- a/protocols/dcutr/Cargo.toml +++ b/protocols/dcutr/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-dcutr" edition = "2021" rust-version = { workspace = true } description = "Direct connection upgrade through relay" -version = "0.10.0" +version = "0.11.0" authors = ["Max Inden "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/floodsub/Cargo.toml b/protocols/floodsub/Cargo.toml index dfa9ad63bd2..ace2c5cbaf8 100644 --- a/protocols/floodsub/Cargo.toml +++ b/protocols/floodsub/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-floodsub" edition = "2021" rust-version = { workspace = true } description = "Floodsub protocol for libp2p" -version = "0.43.0" +version = "0.44.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index 941efc47aea..d3f715676ed 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-gossipsub" edition = "2021" rust-version = { workspace = true } description = "Gossipsub protocol for libp2p" -version = "0.45.2" +version = "0.46.0" authors = ["Age Manning "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index 43421811c5d..ba285771f4f 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-identify" edition = "2021" rust-version = { workspace = true } description = "Nodes identifcation protocol for libp2p" -version = "0.43.1" +version = "0.44.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 7e8b67b7cc2..48916fd5881 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-kad" edition = "2021" rust-version = { workspace = true } description = "Kademlia protocol for libp2p" -version = "0.44.6" +version = "0.45.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/mdns/Cargo.toml b/protocols/mdns/Cargo.toml index 7ddf4e3e179..b4a285448da 100644 --- a/protocols/mdns/Cargo.toml +++ b/protocols/mdns/Cargo.toml @@ -2,7 +2,7 @@ name = "libp2p-mdns" edition = "2021" rust-version = { workspace = true } -version = "0.44.0" +version = "0.45.0" description = "Implementation of the libp2p mDNS discovery method" authors = ["Parity Technologies "] license = "MIT" diff --git a/protocols/ping/Cargo.toml b/protocols/ping/Cargo.toml index a15407b2840..501007159d5 100644 --- a/protocols/ping/Cargo.toml +++ b/protocols/ping/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-ping" edition = "2021" rust-version = { workspace = true } description = "Ping protocol for libp2p" -version = "0.43.1" +version = "0.44.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/relay/Cargo.toml b/protocols/relay/Cargo.toml index 3d01a6af09c..f42782dadef 100644 --- a/protocols/relay/Cargo.toml +++ b/protocols/relay/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-relay" edition = "2021" rust-version = { workspace = true } description = "Communications relaying for libp2p" -version = "0.16.2" +version = "0.17.0" authors = ["Parity Technologies ", "Max Inden "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index 0225f915346..a56cf737656 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-rendezvous" edition = "2021" rust-version = { workspace = true } description = "Rendezvous protocol for libp2p" -version = "0.13.1" +version = "0.14.0" authors = ["The COMIT guys "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/request-response/Cargo.toml b/protocols/request-response/Cargo.toml index ee1049a96e3..823c7f49656 100644 --- a/protocols/request-response/Cargo.toml +++ b/protocols/request-response/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-request-response" edition = "2021" rust-version = { workspace = true } description = "Generic Request/Response Protocols" -version = "0.25.2" +version = "0.26.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/upnp/Cargo.toml b/protocols/upnp/Cargo.toml index fbef93550b0..4b1ba3e204b 100644 --- a/protocols/upnp/Cargo.toml +++ b/protocols/upnp/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-upnp" edition = "2021" rust-version = "1.60.0" description = "UPnP support for libp2p transports" -version = "0.1.1" +version = "0.2.0" license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] diff --git a/swarm-derive/Cargo.toml b/swarm-derive/Cargo.toml index 54ba2d2f495..322ffda0c1d 100644 --- a/swarm-derive/Cargo.toml +++ b/swarm-derive/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-swarm-derive" edition = "2021" rust-version = { workspace = true } description = "Procedural macros of libp2p-swarm" -version = "0.33.0" +version = "0.34.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/swarm-test/Cargo.toml b/swarm-test/Cargo.toml index c3d2a993cb9..cad7c98affd 100644 --- a/swarm-test/Cargo.toml +++ b/swarm-test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libp2p-swarm-test" -version = "0.2.0" +version = "0.3.0" edition = "2021" rust-version = { workspace = true } license = "MIT" diff --git a/swarm/Cargo.toml b/swarm/Cargo.toml index d151e7af614..ae4ccd7ef1b 100644 --- a/swarm/Cargo.toml +++ b/swarm/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-swarm" edition = "2021" rust-version = { workspace = true } description = "The libp2p swarm" -version = "0.43.6" +version = "0.44.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/deflate/Cargo.toml b/transports/deflate/Cargo.toml index 9e2e1f4e029..605b9b9e767 100644 --- a/transports/deflate/Cargo.toml +++ b/transports/deflate/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-deflate" edition = "2021" rust-version = { workspace = true } description = "Deflate encryption protocol for libp2p" -version = "0.40.1" +version = "0.41.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/dns/Cargo.toml b/transports/dns/Cargo.toml index 947feb16b26..535cc240503 100644 --- a/transports/dns/Cargo.toml +++ b/transports/dns/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-dns" edition = "2021" rust-version = { workspace = true } description = "DNS transport implementation for libp2p" -version = "0.40.1" +version = "0.41.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/noise/Cargo.toml b/transports/noise/Cargo.toml index 80ab28fd81d..6c20d72213e 100644 --- a/transports/noise/Cargo.toml +++ b/transports/noise/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-noise" edition = "2021" rust-version = { workspace = true } description = "Cryptographic handshake protocol using the noise framework." -version = "0.43.2" +version = "0.44.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index 14c5fd71ae9..feee0af75b7 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-plaintext" edition = "2021" rust-version = { workspace = true } description = "Plaintext encryption dummy protocol for libp2p" -version = "0.40.1" +version = "0.41.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/pnet/Cargo.toml b/transports/pnet/Cargo.toml index 53b7fe52211..97e13767ed1 100644 --- a/transports/pnet/Cargo.toml +++ b/transports/pnet/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-pnet" edition = "2021" rust-version = { workspace = true } description = "Private swarm support for libp2p" -version = "0.23.1" +version = "0.24.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/quic/Cargo.toml b/transports/quic/Cargo.toml index b73f33bc669..ee9e8b8d965 100644 --- a/transports/quic/Cargo.toml +++ b/transports/quic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libp2p-quic" -version = "0.9.3" +version = "0.10.0" authors = ["Parity Technologies "] edition = "2021" rust-version = { workspace = true } diff --git a/transports/tcp/Cargo.toml b/transports/tcp/Cargo.toml index 8e0f37302ea..fa6e3b73413 100644 --- a/transports/tcp/Cargo.toml +++ b/transports/tcp/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-tcp" edition = "2021" rust-version = { workspace = true } description = "TCP/IP transport protocol for libp2p" -version = "0.40.1" +version = "0.41.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/tls/Cargo.toml b/transports/tls/Cargo.toml index 29928cc21fc..10124f6cd56 100644 --- a/transports/tls/Cargo.toml +++ b/transports/tls/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libp2p-tls" -version = "0.2.1" +version = "0.3.0" edition = "2021" rust-version = { workspace = true } description = "TLS configuration based on libp2p TLS specs." diff --git a/transports/uds/Cargo.toml b/transports/uds/Cargo.toml index 0f6f81735fc..3b84db3e074 100644 --- a/transports/uds/Cargo.toml +++ b/transports/uds/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-uds" edition = "2021" rust-version = { workspace = true } description = "Unix domain sockets transport for libp2p" -version = "0.39.0" +version = "0.40.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/websocket-websys/Cargo.toml b/transports/websocket-websys/Cargo.toml index 3f7b5d76886..2018df1bf07 100644 --- a/transports/websocket-websys/Cargo.toml +++ b/transports/websocket-websys/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-websocket-websys" edition = "2021" rust-version = "1.60.0" description = "WebSocket for libp2p under WASM environment" -version = "0.2.0" +version = "0.3.0" authors = ["Vince Vasta "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/websocket/Cargo.toml b/transports/websocket/Cargo.toml index 3dc3a710567..488e93dc835 100644 --- a/transports/websocket/Cargo.toml +++ b/transports/websocket/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-websocket" edition = "2021" rust-version = { workspace = true } description = "WebSocket transport for libp2p" -version = "0.42.1" +version = "0.43.0" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/transports/webtransport-websys/Cargo.toml b/transports/webtransport-websys/Cargo.toml index 54ecc5b9b40..9fcfd820b5d 100644 --- a/transports/webtransport-websys/Cargo.toml +++ b/transports/webtransport-websys/Cargo.toml @@ -3,7 +3,7 @@ name = "libp2p-webtransport-websys" edition = "2021" rust-version = { workspace = true } description = "WebTransport for libp2p under WASM environment" -version = "0.1.0" +version = "0.2.0" authors = [ "Yiannis Marangos ", "oblique ", diff --git a/wasm-tests/webtransport-tests/Cargo.toml b/wasm-tests/webtransport-tests/Cargo.toml index fb3e5db9ba6..97e8c5b0159 100644 --- a/wasm-tests/webtransport-tests/Cargo.toml +++ b/wasm-tests/webtransport-tests/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" license = "MIT" publish = false +[package.metadata.release] +release = false + [dependencies] futures = "0.3.28" getrandom = { version = "0.2.9", features = ["js"] }