From c8bf27122ba3b6a48520cf6c41e401625b4b41f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 09:06:54 +0000 Subject: [PATCH 1/4] Update unsigned-varint requirement from 0.6 to 0.7 Updates the requirements on [unsigned-varint](https://github.com/paritytech/unsigned-varint) to permit the latest version. - [Release notes](https://github.com/paritytech/unsigned-varint/releases) - [Changelog](https://github.com/paritytech/unsigned-varint/blob/master/CHANGELOG.md) - [Commits](https://github.com/paritytech/unsigned-varint/compare/v0.6.0...v0.7.0) Signed-off-by: dependabot[bot] --- core/Cargo.toml | 2 +- misc/multiaddr/Cargo.toml | 2 +- misc/multistream-select/Cargo.toml | 2 +- muxers/mplex/Cargo.toml | 2 +- protocols/gossipsub/Cargo.toml | 2 +- protocols/kad/Cargo.toml | 2 +- protocols/request-response/Cargo.toml | 2 +- transports/plaintext/Cargo.toml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/Cargo.toml b/core/Cargo.toml index 91102b60a9c..ad4164ba2e1 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -31,7 +31,7 @@ rw-stream-sink = "0.2.0" sha2 = "0.9.1" smallvec = "1.0" thiserror = "1.0" -unsigned-varint = "0.6" +unsigned-varint = "0.7" void = "1" zeroize = "1" diff --git a/misc/multiaddr/Cargo.toml b/misc/multiaddr/Cargo.toml index ddebe81d709..3e0dc52c5c9 100644 --- a/misc/multiaddr/Cargo.toml +++ b/misc/multiaddr/Cargo.toml @@ -20,7 +20,7 @@ multihash = { version = "0.13", default-features = false, features = ["std", "mu percent-encoding = "2.1.0" serde = "1.0.70" static_assertions = "1.1" -unsigned-varint = "0.6" +unsigned-varint = "0.7" url = { version = "2.1.0", optional = true, default-features = false } [dev-dependencies] diff --git a/misc/multistream-select/Cargo.toml b/misc/multistream-select/Cargo.toml index 041a035c27a..8df72cb9b35 100644 --- a/misc/multistream-select/Cargo.toml +++ b/misc/multistream-select/Cargo.toml @@ -15,7 +15,7 @@ futures = "0.3" log = "0.4" pin-project = "1.0.0" smallvec = "1.0" -unsigned-varint = "0.6" +unsigned-varint = "0.7" [dev-dependencies] async-std = "1.6.2" diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index db60a5f9884..96993ba8fa8 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -19,7 +19,7 @@ nohash-hasher = "0.2" parking_lot = "0.11" rand = "0.7" smallvec = "1.4" -unsigned-varint = { version = "0.6", features = ["asynchronous_codec"] } +unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } [dev-dependencies] async-std = "1.7.0" diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index 7f3414c824c..f73826bf0bc 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -19,7 +19,7 @@ futures = "0.3.5" rand = "0.7.3" asynchronous-codec = "0.5" wasm-timer = "0.2.4" -unsigned-varint = { version = "0.6.0", features = ["asynchronous_codec"] } +unsigned-varint = { version = "0.7.0", features = ["asynchronous_codec"] } log = "0.4.11" sha2 = "0.9.1" base64 = "0.13.0" diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 21ac3a46fee..c16db19871a 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -25,7 +25,7 @@ sha2 = "0.9.1" smallvec = "1.0" wasm-timer = "0.2" uint = "0.9" -unsigned-varint = { version = "0.6", features = ["asynchronous_codec"] } +unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } void = "1.0" [dev-dependencies] diff --git a/protocols/request-response/Cargo.toml b/protocols/request-response/Cargo.toml index 903b9af1801..a69941da3d0 100644 --- a/protocols/request-response/Cargo.toml +++ b/protocols/request-response/Cargo.toml @@ -20,7 +20,7 @@ lru = "0.6" minicbor = { version = "0.7", features = ["std", "derive"] } rand = "0.7" smallvec = "1.4" -unsigned-varint = { version = "0.6", features = ["std", "futures"] } +unsigned-varint = { version = "0.7", features = ["std", "futures"] } wasm-timer = "0.2" [dev-dependencies] diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index 7749db2e829..435ab69df6c 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -16,7 +16,7 @@ asynchronous-codec = "0.5.0" libp2p-core = { version = "0.27.0", path = "../../core" } log = "0.4.8" prost = "0.7" -unsigned-varint = { version = "0.6", features = ["asynchronous_codec"] } +unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } void = "1.0.2" [dev-dependencies] From 83b8143e3e00d4989e08d264524e69be08331ebf Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 10 Feb 2021 17:09:14 +0100 Subject: [PATCH 2/4] *: Update to asynchronous-codec v0.6 --- muxers/mplex/Cargo.toml | 2 +- protocols/gossipsub/Cargo.toml | 2 +- protocols/kad/Cargo.toml | 2 +- transports/plaintext/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index 96993ba8fa8..7b55585a1bb 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous"] [dependencies] bytes = "1" futures = "0.3.1" -asynchronous-codec = "0.5.0" +asynchronous-codec = "0.6" libp2p-core = { version = "0.27.0", path = "../../core" } log = "0.4" nohash-hasher = "0.2" diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index f73826bf0bc..4348960c6b4 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -17,7 +17,7 @@ byteorder = "1.3.4" fnv = "1.0.7" futures = "0.3.5" rand = "0.7.3" -asynchronous-codec = "0.5" +asynchronous-codec = "0.6" wasm-timer = "0.2.4" unsigned-varint = { version = "0.7.0", features = ["asynchronous_codec"] } log = "0.4.11" diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index c16db19871a..468aa4bf5e3 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -14,7 +14,7 @@ arrayvec = "0.5.1" bytes = "1" either = "1.5" fnv = "1.0" -asynchronous-codec = "0.5" +asynchronous-codec = "0.6" futures = "0.3.1" log = "0.4" libp2p-core = { version = "0.27.0", path = "../../core" } diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index 435ab69df6c..7c5ee346442 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -12,7 +12,7 @@ categories = ["network-programming", "asynchronous"] [dependencies] bytes = "1" futures = "0.3.1" -asynchronous-codec = "0.5.0" +asynchronous-codec = "0.6" libp2p-core = { version = "0.27.0", path = "../../core" } log = "0.4.8" prost = "0.7" From 3184fb94cc05124a56dd8db19794f5f1b1c057cd Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 10 Feb 2021 17:10:11 +0100 Subject: [PATCH 3/4] transports/plaintext: Use Framed::into_parts --- transports/plaintext/src/handshake.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/transports/plaintext/src/handshake.rs b/transports/plaintext/src/handshake.rs index cc3ad32b4ed..078a5109b96 100644 --- a/transports/plaintext/src/handshake.rs +++ b/transports/plaintext/src/handshake.rs @@ -24,7 +24,7 @@ use crate::structs_proto::Exchange; use bytes::{Bytes, BytesMut}; use futures::prelude::*; -use asynchronous_codec::Framed; +use asynchronous_codec::{Framed, FramedParts}; use libp2p_core::{PublicKey, PeerId}; use log::{debug, trace}; use prost::Message; @@ -134,12 +134,9 @@ where } }; - // The `Framed` wrapper may have buffered additional data that - // was already received but is no longer part of the plaintext - // handshake. We need to capture that data before dropping - // the `Framed` wrapper via `Framed::into_inner()`. - let read_buffer = framed_socket.read_buffer().clone().freeze(); - trace!("received exchange from remote; pubkey = {:?}", context.state.public_key); - Ok((framed_socket.into_inner(), context.state, read_buffer)) + + let FramedParts { io, read_buffer, write_buffer, .. } = framed_socket.into_parts(); + assert!(write_buffer.is_empty()); + Ok((io, context.state, read_buffer.freeze())) } From fcafce3db35a6b737aa406db8b74351127ea63e4 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 10 Feb 2021 17:34:52 +0100 Subject: [PATCH 4/4] *: Update cargo tomls and changelogs --- core/CHANGELOG.md | 4 ++++ core/Cargo.toml | 2 +- misc/multiaddr/CHANGELOG.md | 4 ++++ misc/multiaddr/Cargo.toml | 2 +- misc/multistream-select/CHANGELOG.md | 4 ++++ misc/multistream-select/Cargo.toml | 2 +- muxers/mplex/CHANGELOG.md | 4 ++++ muxers/mplex/Cargo.toml | 2 +- protocols/gossipsub/CHANGELOG.md | 2 ++ protocols/kad/CHANGELOG.md | 4 ++++ protocols/kad/Cargo.toml | 2 +- protocols/request-response/CHANGELOG.md | 3 ++- transports/plaintext/CHANGELOG.md | 4 ++++ transports/plaintext/Cargo.toml | 2 +- 14 files changed, 34 insertions(+), 7 deletions(-) diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index b2141dff8f6..4956cbc16be 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.27.1 [unreleased] + +- Update dependencies. + # 0.27.0 [2021-01-12] - (Re)add `Transport::address_translation` to permit transport-specific diff --git a/core/Cargo.toml b/core/Cargo.toml index ad4164ba2e1..11a8cce9857 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -2,7 +2,7 @@ name = "libp2p-core" edition = "2018" description = "Core traits and structs of libp2p" -version = "0.27.0" +version = "0.27.1" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/misc/multiaddr/CHANGELOG.md b/misc/multiaddr/CHANGELOG.md index aa684421466..c889475e101 100644 --- a/misc/multiaddr/CHANGELOG.md +++ b/misc/multiaddr/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.11.1 [unreleased] + +- Update dependencies + # 0.11.0 [2021-01-12] - Update dependencies diff --git a/misc/multiaddr/Cargo.toml b/misc/multiaddr/Cargo.toml index 3e0dc52c5c9..75c446b9a3b 100644 --- a/misc/multiaddr/Cargo.toml +++ b/misc/multiaddr/Cargo.toml @@ -6,7 +6,7 @@ description = "Implementation of the multiaddr format" homepage = "https://github.com/libp2p/rust-libp2p" keywords = ["multiaddr", "ipfs"] license = "MIT" -version = "0.11.0" +version = "0.11.1" [features] default = ["url"] diff --git a/misc/multistream-select/CHANGELOG.md b/misc/multistream-select/CHANGELOG.md index 64fc712a7e1..07334c5183a 100644 --- a/misc/multistream-select/CHANGELOG.md +++ b/misc/multistream-select/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.10.1 [unreleased] + +- Update dependencies. + # 0.10.0 [2021-01-12] - Update dependencies. diff --git a/misc/multistream-select/Cargo.toml b/misc/multistream-select/Cargo.toml index 8df72cb9b35..66e74830116 100644 --- a/misc/multistream-select/Cargo.toml +++ b/misc/multistream-select/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "multistream-select" description = "Multistream-select negotiation protocol for libp2p" -version = "0.10.0" +version = "0.10.1" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/muxers/mplex/CHANGELOG.md b/muxers/mplex/CHANGELOG.md index 684fc81797e..e8f7b2809d7 100644 --- a/muxers/mplex/CHANGELOG.md +++ b/muxers/mplex/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.27.1 [unreleased] + +- Update dependencies. + # 0.27.0 [2021-01-12] - Update dependencies. diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index 7b55585a1bb..153a63ead77 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -2,7 +2,7 @@ name = "libp2p-mplex" edition = "2018" description = "Mplex multiplexing protocol for libp2p" -version = "0.27.0" +version = "0.27.1" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/gossipsub/CHANGELOG.md b/protocols/gossipsub/CHANGELOG.md index 3c79bf705eb..5a21915b718 100644 --- a/protocols/gossipsub/CHANGELOG.md +++ b/protocols/gossipsub/CHANGELOG.md @@ -3,6 +3,8 @@ - Prevent non-published messages being added to caches. [PR 1930](https://github.com/libp2p/rust-libp2p/pull/1930) +- Update dependencies. + # 0.27.0 [2021-01-12] - Update dependencies. diff --git a/protocols/kad/CHANGELOG.md b/protocols/kad/CHANGELOG.md index 86e283f5186..645d63c108f 100644 --- a/protocols/kad/CHANGELOG.md +++ b/protocols/kad/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.28.1 [unreleased] + +- Update dependencies. + # 0.28.0 [2021-01-12] - Update dependencies. diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 468aa4bf5e3..d82deec6a56 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -2,7 +2,7 @@ name = "libp2p-kad" edition = "2018" description = "Kademlia protocol for libp2p" -version = "0.28.0" +version = "0.28.1" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" diff --git a/protocols/request-response/CHANGELOG.md b/protocols/request-response/CHANGELOG.md index 15e49716863..0a84c00aa4c 100644 --- a/protocols/request-response/CHANGELOG.md +++ b/protocols/request-response/CHANGELOG.md @@ -3,6 +3,8 @@ - Make `is_pending_outbound` return true on pending connection. [PR 1928](https://github.com/libp2p/rust-libp2p/pull/1928). +- Update dependencies. + # 0.9.0 [2021-01-12] - Update dependencies. @@ -66,4 +68,3 @@ https://github.com/libp2p/rust-libp2p/pull/1606). # 0.1.0 - Initial release. - diff --git a/transports/plaintext/CHANGELOG.md b/transports/plaintext/CHANGELOG.md index 98defcfbfe6..70bec4f5fb6 100644 --- a/transports/plaintext/CHANGELOG.md +++ b/transports/plaintext/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.27.1 [unreleased] + +- Update dependencies. + # 0.27.0 [2021-01-12] - Update dependencies. diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index 7c5ee346442..4d50e68da2b 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -2,7 +2,7 @@ name = "libp2p-plaintext" edition = "2018" description = "Plaintext encryption dummy protocol for libp2p" -version = "0.27.0" +version = "0.27.1" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p"