From b0776f1664c14405e6775936e308860ab5422d60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 04:34:55 +0000 Subject: [PATCH 1/9] deps: bump asynchronous-codec from 0.6.2 to 0.7.0 Bumps [asynchronous-codec](https://github.com/mxinden/asynchronous-codec) from 0.6.2 to 0.7.0. - [Release notes](https://github.com/mxinden/asynchronous-codec/releases) - [Changelog](https://github.com/mxinden/asynchronous-codec/blob/master/CHANGELOG.md) - [Commits](https://github.com/mxinden/asynchronous-codec/compare/v0.6.2...v0.7.0) --- updated-dependencies: - dependency-name: asynchronous-codec dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 37 +++++++++++++++++++--------- misc/quick-protobuf-codec/Cargo.toml | 2 +- misc/webrtc-utils/Cargo.toml | 2 +- muxers/mplex/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/relay/Cargo.toml | 2 +- protocols/rendezvous/Cargo.toml | 2 +- transports/plaintext/Cargo.toml | 2 +- 12 files changed, 36 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef31ddd94fa..254b1e4587e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -446,6 +446,19 @@ dependencies = [ "pin-project-lite 0.2.12", ] +[[package]] +name = "asynchronous-codec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" +dependencies = [ + "bytes", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite 0.2.12", +] + [[package]] name = "atomic-waker" version = "1.1.1" @@ -2501,7 +2514,7 @@ name = "libp2p-dcutr" version = "0.10.0" dependencies = [ "async-std", - "asynchronous-codec", + "asynchronous-codec 0.7.0", "clap", "either", "env_logger 0.10.0", @@ -2564,7 +2577,7 @@ dependencies = [ name = "libp2p-floodsub" version = "0.43.0" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.7.0", "cuckoofilter", "fnv", "futures", @@ -2584,7 +2597,7 @@ name = "libp2p-gossipsub" version = "0.45.1" dependencies = [ "async-std", - "asynchronous-codec", + "asynchronous-codec 0.7.0", "base64 0.21.4", "byteorder", "bytes", @@ -2622,7 +2635,7 @@ name = "libp2p-identify" version = "0.43.1" dependencies = [ "async-std", - "asynchronous-codec", + "asynchronous-codec 0.7.0", "either", "env_logger 0.10.0", "futures", @@ -2676,7 +2689,7 @@ version = "0.44.6" dependencies = [ "arrayvec", "async-std", - "asynchronous-codec", + "asynchronous-codec 0.7.0", "bytes", "either", "env_logger 0.10.0", @@ -2772,7 +2785,7 @@ name = "libp2p-mplex" version = "0.40.0" dependencies = [ "async-std", - "asynchronous-codec", + "asynchronous-codec 0.7.0", "bytes", "criterion", "env_logger 0.10.0", @@ -2881,7 +2894,7 @@ dependencies = [ name = "libp2p-plaintext" version = "0.40.1" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.7.0", "bytes", "env_logger 0.10.0", "futures", @@ -2949,7 +2962,7 @@ dependencies = [ name = "libp2p-relay" version = "0.16.1" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.7.0", "bytes", "either", "env_logger 0.10.0", @@ -2978,7 +2991,7 @@ name = "libp2p-rendezvous" version = "0.13.0" dependencies = [ "async-trait", - "asynchronous-codec", + "asynchronous-codec 0.7.0", "bimap", "env_logger 0.10.0", "futures", @@ -3221,7 +3234,7 @@ dependencies = [ name = "libp2p-webrtc-utils" version = "0.1.0" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.7.0", "bytes", "futures", "hex", @@ -4247,7 +4260,7 @@ dependencies = [ name = "quick-protobuf-codec" version = "0.2.0" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.7.0", "bytes", "quick-protobuf", "thiserror", @@ -5939,7 +5952,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.2", "bytes", ] diff --git a/misc/quick-protobuf-codec/Cargo.toml b/misc/quick-protobuf-codec/Cargo.toml index 0f793d1f185..35df211e3ca 100644 --- a/misc/quick-protobuf-codec/Cargo.toml +++ b/misc/quick-protobuf-codec/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["networking"] categories = ["asynchronous"] [dependencies] -asynchronous-codec = { version = "0.6" } +asynchronous-codec = { version = "0.7" } bytes = { version = "1" } thiserror = "1.0" unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } diff --git a/misc/webrtc-utils/Cargo.toml b/misc/webrtc-utils/Cargo.toml index 4401ef9bc44..312a87e6cbd 100644 --- a/misc/webrtc-utils/Cargo.toml +++ b/misc/webrtc-utils/Cargo.toml @@ -25,7 +25,7 @@ serde = { version = "1.0", features = ["derive"] } sha2 = "0.10.8" thiserror = "1" tinytemplate = "1.2" -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" [dev-dependencies] hex-literal = "0.4" diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index aca3ec6eadf..0a6d041cde5 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -13,7 +13,7 @@ categories = ["network-programming", "asynchronous"] [dependencies] bytes = "1" futures = "0.3.28" -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" libp2p-core = { workspace = true } libp2p-identity = { workspace = true } log = "0.4" diff --git a/protocols/dcutr/Cargo.toml b/protocols/dcutr/Cargo.toml index f12684816c6..eb1b307095f 100644 --- a/protocols/dcutr/Cargo.toml +++ b/protocols/dcutr/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" either = "1.9.0" futures = "0.3.28" futures-timer = "3.0" diff --git a/protocols/floodsub/Cargo.toml b/protocols/floodsub/Cargo.toml index dfa9ad63bd2..11bd0072973 100644 --- a/protocols/floodsub/Cargo.toml +++ b/protocols/floodsub/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" cuckoofilter = "0.5.0" fnv = "1.0" futures = "0.3.28" diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index 4f9fd2fa9d3..2506be4b2d5 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -14,7 +14,7 @@ categories = ["network-programming", "asynchronous"] wasm-bindgen = ["getrandom/js", "instant/wasm-bindgen"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" base64 = "0.21.4" byteorder = "1.5.0" bytes = "1.5" diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index 43421811c5d..c75ea6af544 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" futures = "0.3.28" futures-timer = "3.0.2" futures-bounded = { workspace = true } diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index f97f4ba03ad..249c6d5da86 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -15,7 +15,7 @@ arrayvec = "0.7.4" bytes = "1" either = "1.9" fnv = "1.0" -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" futures = "0.3.28" log = "0.4" libp2p-core = { workspace = true } diff --git a/protocols/relay/Cargo.toml b/protocols/relay/Cargo.toml index 03799a8c77c..7bce6e8dbad 100644 --- a/protocols/relay/Cargo.toml +++ b/protocols/relay/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" bytes = "1" either = "1.9.0" futures = "0.3.28" diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index 3a61c21ffa2..f5bc10addd2 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" async-trait = "0.1" bimap = "0.6.3" futures = { version = "0.3", default-features = false, features = ["std"] } diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index f58fefb44ca..52d78cd3031 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" bytes = "1" futures = "0.3.28" libp2p-core = { workspace = true } From 321f614c9736e55cbc4060ad7a896951b167e487 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 08:25:48 +0000 Subject: [PATCH 2/9] deps: bump asynchronous-codec from 0.6.2 to 0.7.0 Bumps [asynchronous-codec](https://github.com/mxinden/asynchronous-codec) from 0.6.2 to 0.7.0. - [Release notes](https://github.com/mxinden/asynchronous-codec/releases) - [Changelog](https://github.com/mxinden/asynchronous-codec/blob/master/CHANGELOG.md) - [Commits](https://github.com/mxinden/asynchronous-codec/compare/v0.6.2...v0.7.0) --- updated-dependencies: - dependency-name: asynchronous-codec dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 22 +++++++++++----------- misc/quick-protobuf-codec/Cargo.toml | 2 +- misc/webrtc-utils/Cargo.toml | 2 +- muxers/mplex/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/relay/Cargo.toml | 2 +- protocols/rendezvous/Cargo.toml | 2 +- transports/plaintext/Cargo.toml | 2 +- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2caae44d4d3..e2b309bc21c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2493,7 +2493,7 @@ name = "libp2p-dcutr" version = "0.11.0" dependencies = [ "async-std", - "asynchronous-codec 0.6.2", + "asynchronous-codec 0.7.0", "clap", "either", "env_logger 0.10.0", @@ -2543,7 +2543,7 @@ dependencies = [ name = "libp2p-floodsub" version = "0.44.0" dependencies = [ - "asynchronous-codec 0.6.2", + "asynchronous-codec 0.7.0", "bytes", "cuckoofilter", "fnv", @@ -2564,7 +2564,7 @@ name = "libp2p-gossipsub" version = "0.46.0" dependencies = [ "async-std", - "asynchronous-codec 0.6.2", + "asynchronous-codec 0.7.0", "base64 0.21.4", "byteorder", "bytes", @@ -2602,7 +2602,7 @@ name = "libp2p-identify" version = "0.44.0" dependencies = [ "async-std", - "asynchronous-codec 0.6.2", + "asynchronous-codec 0.7.0", "either", "env_logger 0.10.0", "futures", @@ -2656,7 +2656,7 @@ version = "0.45.0" dependencies = [ "arrayvec", "async-std", - "asynchronous-codec 0.6.2", + "asynchronous-codec 0.7.0", "bytes", "either", "env_logger 0.10.0", @@ -2751,7 +2751,7 @@ name = "libp2p-mplex" version = "0.41.0" dependencies = [ "async-std", - "asynchronous-codec 0.6.2", + "asynchronous-codec 0.7.0", "bytes", "criterion", "env_logger 0.10.0", @@ -2862,7 +2862,7 @@ dependencies = [ name = "libp2p-plaintext" version = "0.41.0" dependencies = [ - "asynchronous-codec 0.6.2", + "asynchronous-codec 0.7.0", "bytes", "env_logger 0.10.0", "futures", @@ -2930,7 +2930,7 @@ dependencies = [ name = "libp2p-relay" version = "0.17.0" dependencies = [ - "asynchronous-codec 0.6.2", + "asynchronous-codec 0.7.0", "bytes", "either", "env_logger 0.10.0", @@ -2959,7 +2959,7 @@ name = "libp2p-rendezvous" version = "0.14.0" dependencies = [ "async-trait", - "asynchronous-codec 0.6.2", + "asynchronous-codec 0.7.0", "bimap", "env_logger 0.10.0", "futures", @@ -3192,7 +3192,7 @@ dependencies = [ name = "libp2p-webrtc-utils" version = "0.1.0" dependencies = [ - "asynchronous-codec 0.6.2", + "asynchronous-codec 0.7.0", "bytes", "futures", "hex", @@ -4201,7 +4201,7 @@ dependencies = [ name = "quick-protobuf-codec" version = "0.2.0" dependencies = [ - "asynchronous-codec 0.6.2", + "asynchronous-codec 0.7.0", "bytes", "quick-protobuf", "thiserror", diff --git a/misc/quick-protobuf-codec/Cargo.toml b/misc/quick-protobuf-codec/Cargo.toml index 0f793d1f185..35df211e3ca 100644 --- a/misc/quick-protobuf-codec/Cargo.toml +++ b/misc/quick-protobuf-codec/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["networking"] categories = ["asynchronous"] [dependencies] -asynchronous-codec = { version = "0.6" } +asynchronous-codec = { version = "0.7" } bytes = { version = "1" } thiserror = "1.0" unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } diff --git a/misc/webrtc-utils/Cargo.toml b/misc/webrtc-utils/Cargo.toml index 4401ef9bc44..312a87e6cbd 100644 --- a/misc/webrtc-utils/Cargo.toml +++ b/misc/webrtc-utils/Cargo.toml @@ -25,7 +25,7 @@ serde = { version = "1.0", features = ["derive"] } sha2 = "0.10.8" thiserror = "1" tinytemplate = "1.2" -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" [dev-dependencies] hex-literal = "0.4" diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index c57df26f8ec..38e645158d9 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -13,7 +13,7 @@ categories = ["network-programming", "asynchronous"] [dependencies] bytes = "1" futures = "0.3.28" -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" libp2p-core = { workspace = true } libp2p-identity = { workspace = true } log = "0.4" diff --git a/protocols/dcutr/Cargo.toml b/protocols/dcutr/Cargo.toml index ce038b4b5b7..c8ed546b4c4 100644 --- a/protocols/dcutr/Cargo.toml +++ b/protocols/dcutr/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" either = "1.9.0" futures = "0.3.28" futures-timer = "3.0" diff --git a/protocols/floodsub/Cargo.toml b/protocols/floodsub/Cargo.toml index 04b29e1812d..f921e57a07e 100644 --- a/protocols/floodsub/Cargo.toml +++ b/protocols/floodsub/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" cuckoofilter = "0.5.0" fnv = "1.0" bytes = "1.5" diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index 58ea50161a4..01905670399 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -14,7 +14,7 @@ categories = ["network-programming", "asynchronous"] wasm-bindgen = ["getrandom/js", "instant/wasm-bindgen"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" base64 = "0.21.4" byteorder = "1.5.0" bytes = "1.5" diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index ba285771f4f..61357b0f567 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" futures = "0.3.28" futures-timer = "3.0.2" futures-bounded = { workspace = true } diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 48916fd5881..15caf8e1908 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -15,7 +15,7 @@ arrayvec = "0.7.4" bytes = "1" either = "1.9" fnv = "1.0" -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" futures = "0.3.28" log = "0.4" libp2p-core = { workspace = true } diff --git a/protocols/relay/Cargo.toml b/protocols/relay/Cargo.toml index f42782dadef..dbf32d86006 100644 --- a/protocols/relay/Cargo.toml +++ b/protocols/relay/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" bytes = "1" either = "1.9.0" futures = "0.3.28" diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index a56cf737656..878460a25c1 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" async-trait = "0.1" bimap = "0.6.3" futures = { version = "0.3", default-features = false, features = ["std"] } diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index feee0af75b7..bd900a2ed54 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.6" +asynchronous-codec = "0.7" bytes = "1" futures = "0.3.28" libp2p-core = { workspace = true } From e7006e588f181f4dddef91657b14ddd6ea1cca8a Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 2 Nov 2023 11:49:56 +1100 Subject: [PATCH 3/9] Upgrade to `unsigned-varint` v0.8.0 --- Cargo.toml | 1 + core/Cargo.toml | 2 +- misc/multistream-select/Cargo.toml | 2 +- misc/quick-protobuf-codec/Cargo.toml | 2 +- misc/quick-protobuf-codec/src/lib.rs | 4 ++-- misc/webrtc-utils/Cargo.toml | 2 +- muxers/mplex/Cargo.toml | 2 +- muxers/mplex/src/codec.rs | 4 ++-- protocols/gossipsub/Cargo.toml | 2 +- protocols/gossipsub/src/protocol.rs | 4 ++-- protocols/kad/Cargo.toml | 2 +- protocols/kad/src/protocol.rs | 4 ++-- protocols/rendezvous/src/codec.rs | 4 ++-- transports/plaintext/Cargo.toml | 2 +- 14 files changed, 19 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 587b8970d1f..d8e493d8be1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -121,6 +121,7 @@ quickcheck = { package = "quickcheck-ext", path = "misc/quickcheck-ext" } rw-stream-sink = { version = "0.4.0", path = "misc/rw-stream-sink" } multiaddr = "0.18.0" multihash = "0.19.1" +unsigned-varint = { version = "0.8.0" } [patch.crates-io] diff --git a/core/Cargo.toml b/core/Cargo.toml index 15288a48d1c..3bff646caa3 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -30,7 +30,7 @@ rw-stream-sink = { workspace = true } serde = { version = "1", optional = true, features = ["derive"] } smallvec = "1.11.1" thiserror = "1.0" -unsigned-varint = "0.7" +unsigned-varint = { workspace = true } void = "1" [dev-dependencies] diff --git a/misc/multistream-select/Cargo.toml b/misc/multistream-select/Cargo.toml index 6bd072070e7..ec60d8d4cc5 100644 --- a/misc/multistream-select/Cargo.toml +++ b/misc/multistream-select/Cargo.toml @@ -16,7 +16,7 @@ futures = "0.3" log = "0.4" pin-project = "1.1.3" smallvec = "1.11.1" -unsigned-varint = "0.7" +unsigned-varint = { workspace = true } [dev-dependencies] async-std = { version = "1.6.2", features = ["attributes"] } diff --git a/misc/quick-protobuf-codec/Cargo.toml b/misc/quick-protobuf-codec/Cargo.toml index 35df211e3ca..77e74a7e2f6 100644 --- a/misc/quick-protobuf-codec/Cargo.toml +++ b/misc/quick-protobuf-codec/Cargo.toml @@ -14,7 +14,7 @@ categories = ["asynchronous"] asynchronous-codec = { version = "0.7" } bytes = { version = "1" } thiserror = "1.0" -unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } +unsigned-varint = { workspace = true, features = ["asynchronous_codec"] } quick-protobuf = "0.8" # Passing arguments to the docsrs builder in order to properly document cfg's. diff --git a/misc/quick-protobuf-codec/src/lib.rs b/misc/quick-protobuf-codec/src/lib.rs index 04ee4980d3a..2d1fda99a70 100644 --- a/misc/quick-protobuf-codec/src/lib.rs +++ b/misc/quick-protobuf-codec/src/lib.rs @@ -31,10 +31,10 @@ impl Codec { } impl Encoder for Codec { - type Item = In; + type Item<'a> = In; type Error = Error; - fn encode(&mut self, item: Self::Item, dst: &mut BytesMut) -> Result<(), Self::Error> { + fn encode(&mut self, item: Self::Item<'_>, dst: &mut BytesMut) -> Result<(), Self::Error> { let mut encoded_msg = Vec::new(); let mut writer = Writer::new(&mut encoded_msg); item.write_message(&mut writer) diff --git a/misc/webrtc-utils/Cargo.toml b/misc/webrtc-utils/Cargo.toml index 312a87e6cbd..6f4a5273222 100644 --- a/misc/webrtc-utils/Cargo.toml +++ b/misc/webrtc-utils/Cargo.toml @@ -29,7 +29,7 @@ asynchronous-codec = "0.7" [dev-dependencies] hex-literal = "0.4" -unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } +unsigned-varint = { workspace = true, features = ["asynchronous_codec"] } [lints] workspace = true diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index 0a6d041cde5..0f7f503c57a 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -21,7 +21,7 @@ nohash-hasher = "0.2" parking_lot = "0.12" rand = "0.8" smallvec = "1.11.1" -unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } +unsigned-varint = { workspace = true, features = ["asynchronous_codec"] } [dev-dependencies] async-std = { version = "1.7.0", features = ["attributes"] } diff --git a/muxers/mplex/src/codec.rs b/muxers/mplex/src/codec.rs index ec605edc6a7..014ee899280 100644 --- a/muxers/mplex/src/codec.rs +++ b/muxers/mplex/src/codec.rs @@ -285,10 +285,10 @@ impl Decoder for Codec { } impl Encoder for Codec { - type Item = Frame; + type Item<'a> = Frame; type Error = io::Error; - fn encode(&mut self, item: Self::Item, dst: &mut BytesMut) -> Result<(), Self::Error> { + fn encode(&mut self, item: Self::Item<'_>, dst: &mut BytesMut) -> Result<(), Self::Error> { let (header, data) = match item { Frame::Open { stream_id } => (stream_id.num << 3, Bytes::new()), Frame::Data { diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index 2506be4b2d5..8af24cb5327 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -36,7 +36,7 @@ regex = "1.10.0" serde = { version = "1", optional = true, features = ["derive"] } sha2 = "0.10.8" smallvec = "1.11.1" -unsigned-varint = { version = "0.7.2", features = ["asynchronous_codec"] } +unsigned-varint = { workspace = true, features = ["asynchronous_codec"] } void = "1.0.2" # Metrics dependencies diff --git a/protocols/gossipsub/src/protocol.rs b/protocols/gossipsub/src/protocol.rs index 15d2f59755a..a911a014f2d 100644 --- a/protocols/gossipsub/src/protocol.rs +++ b/protocols/gossipsub/src/protocol.rs @@ -225,10 +225,10 @@ impl GossipsubCodec { } impl Encoder for GossipsubCodec { - type Item = proto::RPC; + type Item<'a> = proto::RPC; type Error = quick_protobuf_codec::Error; - fn encode(&mut self, item: Self::Item, dst: &mut BytesMut) -> Result<(), Self::Error> { + fn encode(&mut self, item: Self::Item<'_>, dst: &mut BytesMut) -> Result<(), Self::Error> { self.codec.encode(item, dst) } } diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 249c6d5da86..1a2212042c5 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -27,7 +27,7 @@ rand = "0.8" sha2 = "0.10.8" smallvec = "1.11.1" uint = "0.9" -unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } +unsigned-varint = { workspace = true, features = ["asynchronous_codec"] } void = "1.0" futures-timer = "3.0.2" instant = "0.1.12" diff --git a/protocols/kad/src/protocol.rs b/protocols/kad/src/protocol.rs index e6341ee4f21..283ce12e5ed 100644 --- a/protocols/kad/src/protocol.rs +++ b/protocols/kad/src/protocol.rs @@ -193,9 +193,9 @@ impl Codec { impl, B> Encoder for Codec { type Error = io::Error; - type Item = A; + type Item<'a> = A; - fn encode(&mut self, item: Self::Item, dst: &mut BytesMut) -> Result<(), Self::Error> { + fn encode(&mut self, item: Self::Item<'_>, dst: &mut BytesMut) -> Result<(), Self::Error> { Ok(self.codec.encode(item.into(), dst)?) } } diff --git a/protocols/rendezvous/src/codec.rs b/protocols/rendezvous/src/codec.rs index bfc3cf275fc..fabea5210fe 100644 --- a/protocols/rendezvous/src/codec.rs +++ b/protocols/rendezvous/src/codec.rs @@ -208,10 +208,10 @@ pub enum ErrorCode { } impl Encoder for Codec { - type Item = Message; + type Item<'a> = Message; type Error = Error; - fn encode(&mut self, item: Self::Item, dst: &mut BytesMut) -> Result<(), Self::Error> { + fn encode(&mut self, item: Self::Item<'_>, dst: &mut BytesMut) -> Result<(), Self::Error> { let mut pb: ProtobufCodec = ProtobufCodec::new(MAX_MESSAGE_LEN_BYTES); pb.encode(proto::Message::from(item), dst)?; diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index 52d78cd3031..d1cb2bdb4d9 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -18,7 +18,7 @@ libp2p-core = { workspace = true } libp2p-identity = { workspace = true } log = "0.4.20" quick-protobuf = "0.8" -unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } +unsigned-varint = { workspace = true, features = ["asynchronous_codec"] } [dev-dependencies] env_logger = "0.10.0" From 477c09e9cf20972ba319550fb26af0a41f5c0e6c Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 2 Nov 2023 11:51:03 +1100 Subject: [PATCH 4/9] Update lockfile --- Cargo.lock | 74 ++++++++++++++++++++---------------------------------- 1 file changed, 27 insertions(+), 47 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d6659272f71..492f0622d9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -432,32 +432,6 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "asynchronous-codec" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" -dependencies = [ - "bytes", - "futures-sink", - "futures-util", - "memchr", - "pin-project-lite", -] - -[[package]] -name = "asynchronous-codec" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" -dependencies = [ - "bytes", - "futures-sink", - "futures-util", - "memchr", - "pin-project-lite", -] - [[package]] name = "asynchronous-codec" version = "0.7.0" @@ -2497,7 +2471,7 @@ dependencies = [ "serde", "smallvec", "thiserror", - "unsigned-varint", + "unsigned-varint 0.8.0", "void", ] @@ -2506,7 +2480,7 @@ name = "libp2p-dcutr" version = "0.11.0" dependencies = [ "async-std", - "asynchronous-codec 0.7.0", + "asynchronous-codec", "clap", "either", "env_logger 0.10.0", @@ -2576,7 +2550,7 @@ name = "libp2p-gossipsub" version = "0.46.0" dependencies = [ "async-std", - "asynchronous-codec 0.7.0", + "asynchronous-codec", "base64 0.21.4", "byteorder", "bytes", @@ -2605,7 +2579,7 @@ dependencies = [ "serde", "sha2 0.10.8", "smallvec", - "unsigned-varint", + "unsigned-varint 0.8.0", "void", ] @@ -2614,7 +2588,7 @@ name = "libp2p-identify" version = "0.44.0" dependencies = [ "async-std", - "asynchronous-codec 0.7.0", + "asynchronous-codec", "either", "env_logger 0.10.0", "futures", @@ -2668,7 +2642,7 @@ version = "0.45.0" dependencies = [ "arrayvec", "async-std", - "asynchronous-codec 0.7.0", + "asynchronous-codec", "bytes", "either", "env_logger 0.10.0", @@ -2693,7 +2667,7 @@ dependencies = [ "smallvec", "thiserror", "uint", - "unsigned-varint", + "unsigned-varint 0.8.0", "void", ] @@ -2763,7 +2737,7 @@ name = "libp2p-mplex" version = "0.41.0" dependencies = [ "async-std", - "asynchronous-codec 0.7.0", + "asynchronous-codec", "bytes", "criterion", "env_logger 0.10.0", @@ -2779,7 +2753,7 @@ dependencies = [ "quickcheck-ext", "rand 0.8.5", "smallvec", - "unsigned-varint", + "unsigned-varint 0.8.0", ] [[package]] @@ -2874,7 +2848,7 @@ dependencies = [ name = "libp2p-plaintext" version = "0.41.0" dependencies = [ - "asynchronous-codec 0.7.0", + "asynchronous-codec", "bytes", "env_logger 0.10.0", "futures", @@ -2885,7 +2859,7 @@ dependencies = [ "quick-protobuf", "quickcheck-ext", "rand 0.8.5", - "unsigned-varint", + "unsigned-varint 0.8.0", ] [[package]] @@ -2942,7 +2916,7 @@ dependencies = [ name = "libp2p-relay" version = "0.17.0" dependencies = [ - "asynchronous-codec 0.7.0", + "asynchronous-codec", "bytes", "either", "env_logger 0.10.0", @@ -2971,7 +2945,7 @@ name = "libp2p-rendezvous" version = "0.14.0" dependencies = [ "async-trait", - "asynchronous-codec 0.7.0", + "asynchronous-codec", "bimap", "env_logger 0.10.0", "futures", @@ -3204,7 +3178,7 @@ dependencies = [ name = "libp2p-webrtc-utils" version = "0.1.0" dependencies = [ - "asynchronous-codec 0.7.0", + "asynchronous-codec", "bytes", "futures", "hex", @@ -3220,7 +3194,7 @@ dependencies = [ "sha2 0.10.8", "thiserror", "tinytemplate", - "unsigned-varint", + "unsigned-varint 0.8.0", ] [[package]] @@ -3569,7 +3543,7 @@ dependencies = [ "percent-encoding", "serde", "static_assertions", - "unsigned-varint", + "unsigned-varint 0.7.2", "url", ] @@ -3595,7 +3569,7 @@ dependencies = [ "quickcheck", "rand 0.8.5", "serde", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -3613,7 +3587,7 @@ dependencies = [ "rand 0.8.5", "rw-stream-sink", "smallvec", - "unsigned-varint", + "unsigned-varint 0.8.0", ] [[package]] @@ -4213,11 +4187,11 @@ dependencies = [ name = "quick-protobuf-codec" version = "0.2.0" dependencies = [ - "asynchronous-codec 0.7.0", + "asynchronous-codec", "bytes", "quick-protobuf", "thiserror", - "unsigned-varint", + "unsigned-varint 0.8.0", ] [[package]] @@ -5880,8 +5854,14 @@ name = "unsigned-varint" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" + +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" dependencies = [ - "asynchronous-codec 0.6.2", + "asynchronous-codec", "bytes", ] From 70781ef62f40f51ccb30291b7b05da99a7465a7b Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 2 Nov 2023 12:13:04 +1100 Subject: [PATCH 5/9] Remove unsigned-varint dependency from `gossipsub` --- Cargo.lock | 6 +++--- protocols/gossipsub/Cargo.toml | 1 - protocols/gossipsub/src/behaviour.rs | 4 +--- protocols/gossipsub/src/protocol.rs | 15 +++++---------- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 18efb06ac25..23da3fdfa8e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -442,7 +442,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.12", + "pin-project-lite", ] [[package]] @@ -2536,6 +2536,7 @@ name = "libp2p-floodsub" version = "0.44.0" dependencies = [ "asynchronous-codec", + "bytes", "cuckoofilter", "fnv", "futures", @@ -2584,7 +2585,6 @@ dependencies = [ "serde", "sha2 0.10.8", "smallvec", - "unsigned-varint 0.8.0", "void", ] @@ -2776,7 +2776,7 @@ dependencies = [ name = "libp2p-noise" version = "0.44.0" dependencies = [ - "asynchronous-codec 0.7.0", + "asynchronous-codec", "bytes", "curve25519-dalek", "env_logger 0.10.0", diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index 6eb341fb2f2..80ec26320e9 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -36,7 +36,6 @@ regex = "1.10.2" serde = { version = "1", optional = true, features = ["derive"] } sha2 = "0.10.8" smallvec = "1.11.1" -unsigned-varint = { workspace = true, features = ["asynchronous_codec"] } void = "1.0.2" # Metrics dependencies diff --git a/protocols/gossipsub/src/behaviour.rs b/protocols/gossipsub/src/behaviour.rs index 2a3a13ea6e7..73353298819 100644 --- a/protocols/gossipsub/src/behaviour.rs +++ b/protocols/gossipsub/src/behaviour.rs @@ -3771,10 +3771,8 @@ mod local_test { .unwrap(); let gs: Behaviour = Behaviour::new(MessageAuthenticity::RandomAuthor, config).unwrap(); - let mut length_codec = unsigned_varint::codec::UviBytes::default(); - length_codec.set_max_len(max_transmit_size); let mut codec = - crate::protocol::GossipsubCodec::new(length_codec, ValidationMode::Permissive); + crate::protocol::GossipsubCodec::new(max_transmit_size, ValidationMode::Permissive); let rpc_proto = rpc.into_protobuf(); let fragmented_messages = gs diff --git a/protocols/gossipsub/src/protocol.rs b/protocols/gossipsub/src/protocol.rs index a911a014f2d..6fcc265c98c 100644 --- a/protocols/gossipsub/src/protocol.rs +++ b/protocols/gossipsub/src/protocol.rs @@ -37,7 +37,6 @@ use libp2p_swarm::StreamProtocol; use log::{debug, warn}; use quick_protobuf::Writer; use std::pin::Pin; -use unsigned_varint::codec; use void::Void; pub(crate) const SIGNING_PREFIX: &[u8] = b"libp2p-pubsub:"; @@ -109,12 +108,10 @@ where type Future = Pin> + Send>>; fn upgrade_inbound(self, socket: TSocket, protocol_id: Self::Info) -> Self::Future { - let mut length_codec = codec::UviBytes::default(); - length_codec.set_max_len(self.max_transmit_size); Box::pin(future::ok(( Framed::new( socket, - GossipsubCodec::new(length_codec, self.validation_mode), + GossipsubCodec::new(self.max_transmit_size, self.validation_mode), ), protocol_id.kind, ))) @@ -130,12 +127,10 @@ where type Future = Pin> + Send>>; fn upgrade_outbound(self, socket: TSocket, protocol_id: Self::Info) -> Self::Future { - let mut length_codec = codec::UviBytes::default(); - length_codec.set_max_len(self.max_transmit_size); Box::pin(future::ok(( Framed::new( socket, - GossipsubCodec::new(length_codec, self.validation_mode), + GossipsubCodec::new(self.max_transmit_size, self.validation_mode), ), protocol_id.kind, ))) @@ -152,8 +147,8 @@ pub struct GossipsubCodec { } impl GossipsubCodec { - pub fn new(length_codec: codec::UviBytes, validation_mode: ValidationMode) -> GossipsubCodec { - let codec = quick_protobuf_codec::Codec::new(length_codec.max_len()); + pub fn new(max_length: usize, validation_mode: ValidationMode) -> GossipsubCodec { + let codec = quick_protobuf_codec::Codec::new(max_length); GossipsubCodec { validation_mode, codec, @@ -593,7 +588,7 @@ mod tests { control_msgs: vec![], }; - let mut codec = GossipsubCodec::new(codec::UviBytes::default(), ValidationMode::Strict); + let mut codec = GossipsubCodec::new(u32::MAX as usize, ValidationMode::Strict); let mut buf = BytesMut::new(); codec.encode(rpc.into_protobuf(), &mut buf).unwrap(); let decoded_rpc = codec.decode(&mut buf).unwrap().unwrap(); From 8e08613d6688f583ac2d9e79bba39055ad572e82 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 2 Nov 2023 12:16:14 +1100 Subject: [PATCH 6/9] Remove unsigned-varint dependency from `webrtc-utils` --- Cargo.lock | 1 - misc/webrtc-utils/Cargo.toml | 1 - misc/webrtc-utils/src/stream.rs | 15 +++------------ misc/webrtc-utils/src/stream/framed_dc.rs | 9 +++++---- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 23da3fdfa8e..b29bd87d430 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3200,7 +3200,6 @@ dependencies = [ "sha2 0.10.8", "thiserror", "tinytemplate", - "unsigned-varint 0.8.0", ] [[package]] diff --git a/misc/webrtc-utils/Cargo.toml b/misc/webrtc-utils/Cargo.toml index 6f4a5273222..7707bb4d000 100644 --- a/misc/webrtc-utils/Cargo.toml +++ b/misc/webrtc-utils/Cargo.toml @@ -29,7 +29,6 @@ asynchronous-codec = "0.7" [dev-dependencies] hex-literal = "0.4" -unsigned-varint = { workspace = true, features = ["asynchronous_codec"] } [lints] workspace = true diff --git a/misc/webrtc-utils/src/stream.rs b/misc/webrtc-utils/src/stream.rs index a6de759a412..0e1496eb640 100644 --- a/misc/webrtc-utils/src/stream.rs +++ b/misc/webrtc-utils/src/stream.rs @@ -260,10 +260,9 @@ where #[cfg(test)] mod tests { use super::*; + use crate::stream::framed_dc::codec; use asynchronous_codec::Encoder; use bytes::BytesMut; - use quick_protobuf::{MessageWrite, Writer}; - use unsigned_varint::codec::UviBytes; #[test] fn max_data_len() { @@ -275,21 +274,13 @@ mod tests { message: Some(message.to_vec()), }; - let mut encoded_msg = Vec::new(); - let mut writer = Writer::new(&mut encoded_msg); - protobuf - .write_message(&mut writer) - .expect("Encoding to succeed"); - assert_eq!(encoded_msg.len(), message.len() + PROTO_OVERHEAD); + let mut codec = codec(); - let mut uvi = UviBytes::default(); let mut dst = BytesMut::new(); - uvi.encode(encoded_msg.as_slice(), &mut dst).unwrap(); + codec.encode(protobuf, &mut dst).unwrap(); // Ensure the varint prefixed and protobuf encoded largest message is no longer than the // maximum limit specified in the libp2p WebRTC specification. assert_eq!(dst.len(), MAX_MSG_LEN); - - assert_eq!(dst.len() - encoded_msg.len(), VARINT_LEN); } } diff --git a/misc/webrtc-utils/src/stream/framed_dc.rs b/misc/webrtc-utils/src/stream/framed_dc.rs index 4409b79a0ed..721178fdcd3 100644 --- a/misc/webrtc-utils/src/stream/framed_dc.rs +++ b/misc/webrtc-utils/src/stream/framed_dc.rs @@ -29,12 +29,13 @@ pub(crate) fn new(inner: T) -> FramedDc where T: AsyncRead + AsyncWrite, { - let mut framed = Framed::new( - inner, - quick_protobuf_codec::Codec::new(MAX_MSG_LEN - VARINT_LEN), - ); + let mut framed = Framed::new(inner, codec()); // If not set, `Framed` buffers up to 131kB of data before sending, which leads to "outbound // packet larger than maximum message size" error in webrtc-rs. framed.set_send_high_water_mark(MAX_DATA_LEN); framed } + +pub(crate) fn codec() -> quick_protobuf_codec::Codec { + quick_protobuf_codec::Codec::new(MAX_MSG_LEN - VARINT_LEN) +} From a5d6b24e2fa4013cc30fefda1adb96d751e1e356 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 2 Nov 2023 12:18:31 +1100 Subject: [PATCH 7/9] Remove unsigned-varint dependency from `kad` --- protocols/kad/Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 5b8361b5eca..fd810c707af 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -27,7 +27,6 @@ rand = "0.8" sha2 = "0.10.8" smallvec = "1.11.1" uint = "0.9" -unsigned-varint = { workspace = true, features = ["asynchronous_codec"] } void = "1.0" futures-timer = "3.0.2" instant = "0.1.12" From 2a82b793d1c867ed26479bad3253624d9db60772 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 2 Nov 2023 12:25:13 +1100 Subject: [PATCH 8/9] Update lockfile --- Cargo.lock | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index b29bd87d430..fc2589565f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2672,7 +2672,6 @@ dependencies = [ "smallvec", "thiserror", "uint", - "unsigned-varint 0.8.0", "void", ] From fec2d5341b314aeba84db4ca24efffd29d446c7a Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 3 Nov 2023 10:22:30 +1100 Subject: [PATCH 9/9] Unify version in one place --- Cargo.toml | 1 + misc/quick-protobuf-codec/Cargo.toml | 2 +- misc/webrtc-utils/Cargo.toml | 2 +- muxers/mplex/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/relay/Cargo.toml | 2 +- protocols/rendezvous/Cargo.toml | 2 +- transports/noise/Cargo.toml | 2 +- transports/plaintext/Cargo.toml | 2 +- 14 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a0ae0d669db..030703e4ba3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,6 +70,7 @@ resolver = "2" rust-version = "1.73.0" [workspace.dependencies] +asynchronous-codec = { version = "0.7.0" } futures-bounded = { version = "0.2.1", path = "misc/futures-bounded" } libp2p = { version = "0.53.0", path = "libp2p" } libp2p-allow-block-list = { version = "0.3.0", path = "misc/allow-block-list" } diff --git a/misc/quick-protobuf-codec/Cargo.toml b/misc/quick-protobuf-codec/Cargo.toml index 77e74a7e2f6..2e309a02889 100644 --- a/misc/quick-protobuf-codec/Cargo.toml +++ b/misc/quick-protobuf-codec/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["networking"] categories = ["asynchronous"] [dependencies] -asynchronous-codec = { version = "0.7" } +asynchronous-codec = { workspace = true } bytes = { version = "1" } thiserror = "1.0" unsigned-varint = { workspace = true, features = ["asynchronous_codec"] } diff --git a/misc/webrtc-utils/Cargo.toml b/misc/webrtc-utils/Cargo.toml index 065ca1c3f62..8ae36754d0f 100644 --- a/misc/webrtc-utils/Cargo.toml +++ b/misc/webrtc-utils/Cargo.toml @@ -11,7 +11,7 @@ version = "0.1.0" publish = true [dependencies] -asynchronous-codec = "0.7" +asynchronous-codec = { workspace = true } bytes = "1" futures = "0.3" hex = "0.4" diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index 3774230aea8..ada0a4b8383 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -13,7 +13,7 @@ categories = ["network-programming", "asynchronous"] [dependencies] bytes = "1" futures = "0.3.29" -asynchronous-codec = "0.7" +asynchronous-codec = { workspace = true } libp2p-core = { workspace = true } libp2p-identity = { workspace = true } nohash-hasher = "0.2" diff --git a/protocols/autonat/Cargo.toml b/protocols/autonat/Cargo.toml index 574a2d54577..a1ecae7ccab 100644 --- a/protocols/autonat/Cargo.toml +++ b/protocols/autonat/Cargo.toml @@ -23,7 +23,7 @@ quick-protobuf = "0.8" rand = "0.8" tracing = "0.1.37" quick-protobuf-codec = { workspace = true } -asynchronous-codec = "0.7.0" +asynchronous-codec = { workspace = true } [dev-dependencies] async-std = { version = "1.10", features = ["attributes"] } diff --git a/protocols/dcutr/Cargo.toml b/protocols/dcutr/Cargo.toml index 83b79b999cb..45fab44bf9b 100644 --- a/protocols/dcutr/Cargo.toml +++ b/protocols/dcutr/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.7" +asynchronous-codec = { workspace = true } either = "1.9.0" futures = "0.3.29" futures-timer = "3.0" diff --git a/protocols/floodsub/Cargo.toml b/protocols/floodsub/Cargo.toml index 8893df5423e..3e5bad3a691 100644 --- a/protocols/floodsub/Cargo.toml +++ b/protocols/floodsub/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.7" +asynchronous-codec = { workspace = true } cuckoofilter = "0.5.0" fnv = "1.0" bytes = "1.5" diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index 9265e937bf9..6edefa3c927 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -14,7 +14,7 @@ categories = ["network-programming", "asynchronous"] wasm-bindgen = ["getrandom/js", "instant/wasm-bindgen"] [dependencies] -asynchronous-codec = "0.7" +asynchronous-codec = { workspace = true } base64 = "0.21.5" byteorder = "1.5.0" bytes = "1.5" diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index 72750138372..a58a0a8e16e 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.7" +asynchronous-codec = { workspace = true } futures = "0.3.29" futures-timer = "3.0.2" futures-bounded = { workspace = true } diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 32824cabd4a..4c6349aa250 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -15,7 +15,7 @@ arrayvec = "0.7.4" bytes = "1" either = "1.9" fnv = "1.0" -asynchronous-codec = "0.7" +asynchronous-codec = { workspace = true } futures = "0.3.29" libp2p-core = { workspace = true } libp2p-swarm = { workspace = true } diff --git a/protocols/relay/Cargo.toml b/protocols/relay/Cargo.toml index 4079d396641..639a1c47484 100644 --- a/protocols/relay/Cargo.toml +++ b/protocols/relay/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.7" +asynchronous-codec = { workspace = true } bytes = "1" either = "1.9.0" futures = "0.3.29" diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index 10a6ae3d7a1..92244f04427 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.7" +asynchronous-codec = { workspace = true } async-trait = "0.1" bimap = "0.6.3" futures = { version = "0.3", default-features = false, features = ["std"] } diff --git a/transports/noise/Cargo.toml b/transports/noise/Cargo.toml index 502cfdd99d9..e028d2fe99c 100644 --- a/transports/noise/Cargo.toml +++ b/transports/noise/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" [dependencies] -asynchronous-codec = "0.7" +asynchronous-codec = { workspace = true } bytes = "1" curve25519-dalek = "4.1.1" futures = "0.3.29" diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index 2521aef1ca9..96cb83c7d69 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -asynchronous-codec = "0.7" +asynchronous-codec = { workspace = true } bytes = "1" futures = "0.3.29" libp2p-core = { workspace = true }