diff --git a/Cargo.lock b/Cargo.lock index 4ed0b66625b..8c252a1d8b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -428,19 +428,6 @@ dependencies = [ "syn 2.0.39", ] -[[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" @@ -2494,7 +2481,7 @@ version = "0.12.0" dependencies = [ "async-std", "async-trait", - "asynchronous-codec 0.6.2", + "asynchronous-codec", "futures", "futures-timer", "instant", @@ -2554,7 +2541,7 @@ dependencies = [ "smallvec", "thiserror", "tracing", - "unsigned-varint", + "unsigned-varint 0.8.0", "void", ] @@ -2563,7 +2550,7 @@ name = "libp2p-dcutr" version = "0.11.0" dependencies = [ "async-std", - "asynchronous-codec 0.6.2", + "asynchronous-codec", "clap", "either", "futures", @@ -2614,7 +2601,7 @@ dependencies = [ name = "libp2p-floodsub" version = "0.44.0" dependencies = [ - "asynchronous-codec 0.6.2", + "asynchronous-codec", "bytes", "cuckoofilter", "fnv", @@ -2635,7 +2622,7 @@ name = "libp2p-gossipsub" version = "0.46.1" dependencies = [ "async-std", - "asynchronous-codec 0.6.2", + "asynchronous-codec", "base64 0.21.5", "byteorder", "bytes", @@ -2664,7 +2651,6 @@ dependencies = [ "smallvec", "tracing", "tracing-subscriber", - "unsigned-varint", "void", ] @@ -2673,7 +2659,7 @@ name = "libp2p-identify" version = "0.44.1" dependencies = [ "async-std", - "asynchronous-codec 0.6.2", + "asynchronous-codec", "either", "futures", "futures-bounded", @@ -2727,7 +2713,7 @@ version = "0.45.2" dependencies = [ "arrayvec", "async-std", - "asynchronous-codec 0.6.2", + "asynchronous-codec", "bytes", "either", "fnv", @@ -2752,7 +2738,6 @@ dependencies = [ "tracing", "tracing-subscriber", "uint", - "unsigned-varint", "void", ] @@ -2824,7 +2809,7 @@ name = "libp2p-mplex" version = "0.41.0" dependencies = [ "async-std", - "asynchronous-codec 0.6.2", + "asynchronous-codec", "bytes", "criterion", "futures", @@ -2840,7 +2825,7 @@ dependencies = [ "smallvec", "tracing", "tracing-subscriber", - "unsigned-varint", + "unsigned-varint 0.8.0", ] [[package]] @@ -2858,7 +2843,7 @@ dependencies = [ name = "libp2p-noise" version = "0.44.0" dependencies = [ - "asynchronous-codec 0.7.0", + "asynchronous-codec", "bytes", "curve25519-dalek", "futures", @@ -2935,7 +2920,7 @@ dependencies = [ name = "libp2p-plaintext" version = "0.41.0" dependencies = [ - "asynchronous-codec 0.6.2", + "asynchronous-codec", "bytes", "futures", "futures_ringbuf", @@ -3003,7 +2988,7 @@ dependencies = [ name = "libp2p-relay" version = "0.17.1" dependencies = [ - "asynchronous-codec 0.6.2", + "asynchronous-codec", "bytes", "either", "futures", @@ -3033,7 +3018,7 @@ name = "libp2p-rendezvous" version = "0.14.0" dependencies = [ "async-trait", - "asynchronous-codec 0.6.2", + "asynchronous-codec", "bimap", "futures", "futures-timer", @@ -3266,7 +3251,7 @@ dependencies = [ name = "libp2p-webrtc-utils" version = "0.1.0" dependencies = [ - "asynchronous-codec 0.6.2", + "asynchronous-codec", "bytes", "futures", "hex", @@ -3282,7 +3267,6 @@ dependencies = [ "thiserror", "tinytemplate", "tracing", - "unsigned-varint", ] [[package]] @@ -3626,7 +3610,7 @@ dependencies = [ "percent-encoding", "serde", "static_assertions", - "unsigned-varint", + "unsigned-varint 0.7.2", "url", ] @@ -3652,7 +3636,7 @@ dependencies = [ "quickcheck", "rand 0.8.5", "serde", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -3670,7 +3654,7 @@ dependencies = [ "smallvec", "tracing", "tracing-subscriber", - "unsigned-varint", + "unsigned-varint 0.8.0", ] [[package]] @@ -4384,11 +4368,11 @@ dependencies = [ name = "quick-protobuf-codec" version = "0.2.0" dependencies = [ - "asynchronous-codec 0.6.2", + "asynchronous-codec", "bytes", "quick-protobuf", "thiserror", - "unsigned-varint", + "unsigned-varint 0.8.0", ] [[package]] @@ -6083,8 +6067,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", ] diff --git a/Cargo.toml b/Cargo.toml index 72756ac51ad..a79c55bbf91 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" } @@ -119,6 +120,7 @@ prometheus-client = "0.22.0" quick-protobuf-codec = { version = "0.2.0", path = "misc/quick-protobuf-codec" } quickcheck = { package = "quickcheck-ext", path = "misc/quickcheck-ext" } rw-stream-sink = { version = "0.4.0", path = "misc/rw-stream-sink" } +unsigned-varint = { version = "0.8.0" } [patch.crates-io] diff --git a/core/Cargo.toml b/core/Cargo.toml index 5f75c978fed..7380695023b 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -30,7 +30,7 @@ serde = { version = "1", optional = true, features = ["derive"] } smallvec = "1.11.2" thiserror = "1.0" tracing = "0.1.37" -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 12161aef0fd..34b5b6a636c 100644 --- a/misc/multistream-select/Cargo.toml +++ b/misc/multistream-select/Cargo.toml @@ -16,7 +16,7 @@ futures = "0.3" tracing = "0.1.37" pin-project = "1.1.3" smallvec = "1.11.2" -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 0f793d1f185..2e309a02889 100644 --- a/misc/quick-protobuf-codec/Cargo.toml +++ b/misc/quick-protobuf-codec/Cargo.toml @@ -11,10 +11,10 @@ keywords = ["networking"] categories = ["asynchronous"] [dependencies] -asynchronous-codec = { version = "0.6" } +asynchronous-codec = { workspace = true } 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 868ab8db8fb..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.6" +asynchronous-codec = { workspace = true } bytes = "1" futures = "0.3" hex = "0.4" @@ -29,7 +29,6 @@ tracing = "0.1.37" [dev-dependencies] hex-literal = "0.4" -unsigned-varint = { version = "0.7", 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) +} diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index fb321b6f22e..1980fd5be0a 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.6" +asynchronous-codec = { workspace = true } libp2p-core = { workspace = true } libp2p-identity = { workspace = true } nohash-hasher = "0.2" @@ -21,7 +21,7 @@ parking_lot = "0.12" rand = "0.8" smallvec = "1.11.2" tracing = "0.1.37" -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/autonat/Cargo.toml b/protocols/autonat/Cargo.toml index cadddfa91fd..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.6.2" +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 c90794274aa..bf70e3b7868 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 = { 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 92c3b0ffd8d..87f0e636272 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 = { 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 16cc0d39209..37873de39f9 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 = { workspace = true } base64 = "0.21.5" byteorder = "1.5.0" bytes = "1.5" @@ -36,7 +36,6 @@ serde = { version = "1", optional = true, features = ["derive"] } sha2 = "0.10.8" smallvec = "1.11.2" tracing = "0.1.37" -unsigned-varint = { version = "0.7.2", features = ["asynchronous_codec"] } void = "1.0.2" # Metrics dependencies diff --git a/protocols/gossipsub/src/behaviour.rs b/protocols/gossipsub/src/behaviour.rs index 95665581a79..0780ca657db 100644 --- a/protocols/gossipsub/src/behaviour.rs +++ b/protocols/gossipsub/src/behaviour.rs @@ -3772,10 +3772,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 bec026dce94..42d43c97510 100644 --- a/protocols/gossipsub/src/protocol.rs +++ b/protocols/gossipsub/src/protocol.rs @@ -36,7 +36,6 @@ use libp2p_identity::{PeerId, PublicKey}; use libp2p_swarm::StreamProtocol; use quick_protobuf::Writer; use std::pin::Pin; -use unsigned_varint::codec; use void::Void; pub(crate) const SIGNING_PREFIX: &[u8] = b"libp2p-pubsub:"; @@ -108,12 +107,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, ))) @@ -129,12 +126,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, ))) @@ -151,8 +146,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, @@ -217,10 +212,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) } } @@ -587,7 +582,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(); diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index ed9ca3fc3e9..c5f8b87e85e 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 = { 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 403189b1801..04101d51026 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 = { workspace = true } futures = "0.3.29" libp2p-core = { workspace = true } libp2p-swarm = { workspace = true } @@ -26,7 +26,6 @@ rand = "0.8" sha2 = "0.10.8" smallvec = "1.11.2" uint = "0.9" -unsigned-varint = { version = "0.7", 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 e3e2c09e42a..7fe2d1130b1 100644 --- a/protocols/kad/src/protocol.rs +++ b/protocols/kad/src/protocol.rs @@ -195,9 +195,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/relay/Cargo.toml b/protocols/relay/Cargo.toml index 54336549c35..2ef9ed41019 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 = { 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 0e9ff88cd72..4dfd77e1eba 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 = { workspace = true } async-trait = "0.1" bimap = "0.6.3" futures = { version = "0.3", default-features = false, features = ["std"] } diff --git a/protocols/rendezvous/src/codec.rs b/protocols/rendezvous/src/codec.rs index df913353e20..41432a91d8c 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/noise/Cargo.toml b/transports/noise/Cargo.toml index 52111fc8d86..772b74c7acb 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 a64f6ce8e9f..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.6" +asynchronous-codec = { workspace = true } bytes = "1" futures = "0.3.29" libp2p-core = { workspace = true }