Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: Switch futures_codec to asynchronous-codec #1908

Merged
merged 5 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

# Version 0.34.0 [unreleased]

- Update `libp2p-request-response`.
- Update `libp2p-gossipsub`, `libp2p-kad` and `libp2p-request-response`.

- Update dependencies.

# Version 0.33.0 [2020-12-17]

Expand Down
40 changes: 20 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,37 +58,37 @@ all-features = true

[dependencies]
atomic = "0.5.0"
bytes = "0.5"
bytes = "1"
futures = "0.3.1"
lazy_static = "1.2"
libp2p-core = { version = "0.26.0", path = "core" }
libp2p-core = { version = "0.27.0", path = "core" }
libp2p-core-derive = { version = "0.21.0", path = "misc/core-derive" }
libp2p-floodsub = { version = "0.26.0", path = "protocols/floodsub", optional = true }
libp2p-gossipsub = { version = "0.26.0", path = "./protocols/gossipsub", optional = true }
libp2p-identify = { version = "0.26.0", path = "protocols/identify", optional = true }
libp2p-kad = { version = "0.27.1", path = "protocols/kad", optional = true }
libp2p-mplex = { version = "0.26.0", path = "muxers/mplex", optional = true }
libp2p-noise = { version = "0.28.0", path = "protocols/noise", optional = true }
libp2p-ping = { version = "0.26.0", path = "protocols/ping", optional = true }
libp2p-plaintext = { version = "0.26.0", path = "protocols/plaintext", optional = true }
libp2p-floodsub = { version = "0.27.0", path = "protocols/floodsub", optional = true }
libp2p-gossipsub = { version = "0.27.0", path = "./protocols/gossipsub", optional = true }
libp2p-identify = { version = "0.27.0", path = "protocols/identify", optional = true }
libp2p-kad = { version = "0.28.0", path = "protocols/kad", optional = true }
libp2p-mplex = { version = "0.27.0", path = "muxers/mplex", optional = true }
libp2p-noise = { version = "0.29.0", path = "protocols/noise", optional = true }
libp2p-ping = { version = "0.27.0", path = "protocols/ping", optional = true }
libp2p-plaintext = { version = "0.27.0", path = "protocols/plaintext", optional = true }
libp2p-pnet = { version = "0.20.0", path = "protocols/pnet", optional = true }
libp2p-request-response = { version = "0.9.0", path = "protocols/request-response", optional = true }
libp2p-swarm = { version = "0.26.0", path = "swarm" }
libp2p-uds = { version = "0.26.0", path = "transports/uds", optional = true }
libp2p-wasm-ext = { version = "0.26.0", path = "transports/wasm-ext", optional = true }
libp2p-yamux = { version = "0.29.0", path = "muxers/yamux", optional = true }
multiaddr = { package = "parity-multiaddr", version = "0.10.0", path = "misc/multiaddr" }
libp2p-swarm = { version = "0.27.0", path = "swarm" }
libp2p-uds = { version = "0.27.0", path = "transports/uds", optional = true }
libp2p-wasm-ext = { version = "0.27.0", path = "transports/wasm-ext", optional = true }
libp2p-yamux = { version = "0.30.0", path = "muxers/yamux", optional = true }
multiaddr = { package = "parity-multiaddr", version = "0.11.0", path = "misc/multiaddr" }
parking_lot = "0.11.0"
pin-project = "1.0.0"
smallvec = "1.0"
wasm-timer = "0.2.4"

[target.'cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))'.dependencies]
libp2p-deflate = { version = "0.26.0", path = "protocols/deflate", optional = true }
libp2p-dns = { version = "0.26.0", path = "transports/dns", optional = true }
libp2p-mdns = { version = "0.27.0", path = "protocols/mdns", optional = true }
libp2p-tcp = { version = "0.26.0", path = "transports/tcp", optional = true }
libp2p-websocket = { version = "0.27.0", path = "transports/websocket", optional = true }
libp2p-deflate = { version = "0.27.0", path = "protocols/deflate", optional = true }
libp2p-dns = { version = "0.27.0", path = "transports/dns", optional = true }
libp2p-mdns = { version = "0.28.0", path = "protocols/mdns", optional = true }
libp2p-tcp = { version = "0.27.0", path = "transports/tcp", optional = true }
libp2p-websocket = { version = "0.28.0", path = "transports/websocket", optional = true }

[dev-dependencies]
async-std = "1.6.2"
Expand Down
4 changes: 4 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.27.0 [unreleased]

- Update dependencies.

# 0.26.0 [2020-12-17]

- Make `PeerId` be `Copy`, including small `PeerId` API changes.
Expand Down
10 changes: 5 additions & 5 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "libp2p-core"
edition = "2018"
description = "Core traits and structs of libp2p"
version = "0.26.0"
version = "0.27.0"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -20,18 +20,18 @@ futures-timer = "3"
lazy_static = "1.2"
libsecp256k1 = { version = "0.3.1", optional = true }
log = "0.4"
multiaddr = { package = "parity-multiaddr", version = "0.10.0", path = "../misc/multiaddr" }
multiaddr = { package = "parity-multiaddr", version = "0.11", path = "../misc/multiaddr" }
multihash = { version = "0.13", default-features = false, features = ["std", "multihash-impl", "identity", "sha2"] }
multistream-select = { version = "0.9.1", path = "../misc/multistream-select" }
multistream-select = { version = "0.10", path = "../misc/multistream-select" }
parking_lot = "0.11.0"
pin-project = "1.0.0"
prost = "0.6.1"
prost = "0.7"
rand = "0.7"
rw-stream-sink = "0.2.0"
sha2 = "0.9.1"
smallvec = "1.0"
thiserror = "1.0"
unsigned-varint = "0.5"
unsigned-varint = "0.6"
void = "1"
zeroize = "1"

Expand Down
4 changes: 4 additions & 0 deletions misc/multiaddr/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.11.0 [unreleased]

- Update dependencies

# 0.10.1 [2021-01-12]

- Fix compilation with serde-1.0.119.
Expand Down
4 changes: 2 additions & 2 deletions misc/multiaddr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "Implementation of the multiaddr format"
homepage = "https://github.com/libp2p/rust-libp2p"
keywords = ["multiaddr", "ipfs"]
license = "MIT"
version = "0.10.1"
version = "0.11.0"

[features]
default = ["url"]
Expand All @@ -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.5"
unsigned-varint = "0.6"
url = { version = "2.1.0", optional = true, default-features = false }

[dev-dependencies]
Expand Down
4 changes: 4 additions & 0 deletions misc/multistream-select/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.10.0 [unreleased]

- Update dependencies.

# 0.9.1 [2020-12-02]

- Ensure uniform outcomes for failed negotiations with both
Expand Down
6 changes: 3 additions & 3 deletions misc/multistream-select/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "multistream-select"
description = "Multistream-select negotiation protocol for libp2p"
version = "0.9.1"
version = "0.10.0"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -10,12 +10,12 @@ categories = ["network-programming", "asynchronous"]
edition = "2018"

[dependencies]
bytes = "0.5"
bytes = "1"
futures = "0.3"
log = "0.4"
pin-project = "1.0.0"
smallvec = "1.0"
unsigned-varint = "0.5"
unsigned-varint = "0.6"

[dev-dependencies]
async-std = "1.6.2"
Expand Down
4 changes: 4 additions & 0 deletions muxers/mplex/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.27.0 [unreleased]

- Update dependencies.

# 0.26.0 [2020-12-17]

- Update `libp2p-core`.
Expand Down
10 changes: 5 additions & 5 deletions muxers/mplex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
name = "libp2p-mplex"
edition = "2018"
description = "Mplex multiplexing protocol for libp2p"
version = "0.26.0"
version = "0.27.0"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[dependencies]
bytes = "0.5"
bytes = "1"
futures = "0.3.1"
futures_codec = "0.4.1"
libp2p-core = { version = "0.26.0", path = "../../core" }
asynchronous-codec = "0.5.0"
libp2p-core = { version = "0.27.0", path = "../../core" }
log = "0.4"
nohash-hasher = "0.2"
parking_lot = "0.11"
rand = "0.7"
smallvec = "1.4"
unsigned-varint = { version = "0.5", features = ["futures-codec"] }
unsigned-varint = { version = "0.6", features = ["asynchronous_codec"] }

[dev-dependencies]
async-std = "1.7.0"
Expand Down
2 changes: 1 addition & 1 deletion muxers/mplex/src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// DEALINGS IN THE SOFTWARE.

use bytes::{BufMut, Bytes, BytesMut};
use futures_codec::{Decoder, Encoder};
use asynchronous_codec::{Decoder, Encoder};
use libp2p_core::Endpoint;
use std::{fmt, hash::{Hash, Hasher}, io, mem};
use unsigned_varint::{codec, encode};
Expand Down
4 changes: 2 additions & 2 deletions muxers/mplex/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::codec::{Codec, Frame, LocalStreamId, RemoteStreamId};
use log::{debug, trace};
use futures::{prelude::*, ready, stream::Fuse};
use futures::task::{AtomicWaker, ArcWake, waker_ref, WakerRef};
use futures_codec::Framed;
use asynchronous_codec::Framed;
use nohash_hasher::{IntMap, IntSet};
use parking_lot::Mutex;
use smallvec::SmallVec;
Expand Down Expand Up @@ -1006,7 +1006,7 @@ mod tests {
use async_std::task;
use bytes::BytesMut;
use futures::prelude::*;
use futures_codec::{Decoder, Encoder};
use asynchronous_codec::{Decoder, Encoder};
use quickcheck::*;
use rand::prelude::*;
use std::collections::HashSet;
Expand Down
4 changes: 4 additions & 0 deletions muxers/yamux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.30.0 [unreleased]

- Update dependencies.

# 0.29.0 [2020-12-17]

- Update `libp2p-core`.
Expand Down
4 changes: 2 additions & 2 deletions muxers/yamux/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "libp2p-yamux"
edition = "2018"
description = "Yamux multiplexing protocol for libp2p"
version = "0.29.0"
version = "0.30.0"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -11,7 +11,7 @@ categories = ["network-programming", "asynchronous"]

[dependencies]
futures = "0.3.1"
libp2p-core = { version = "0.26.0", path = "../../core" }
libp2p-core = { version = "0.27.0", path = "../../core" }
parking_lot = "0.11"
thiserror = "1.0"
yamux = "0.8.0"
4 changes: 4 additions & 0 deletions protocols/deflate/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.27.0 [unreleased]

- Update dependencies.

# 0.26.0 [2020-12-17]

- Update `libp2p-core`.
Expand Down
4 changes: 2 additions & 2 deletions protocols/deflate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "libp2p-deflate"
edition = "2018"
description = "Deflate encryption protocol for libp2p"
version = "0.26.0"
version = "0.27.0"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -11,7 +11,7 @@ categories = ["network-programming", "asynchronous"]

[dependencies]
futures = "0.3.1"
libp2p-core = { version = "0.26.0", path = "../../core" }
libp2p-core = { version = "0.27.0", path = "../../core" }
flate2 = "1.0"

[dev-dependencies]
Expand Down
4 changes: 4 additions & 0 deletions protocols/floodsub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.27.0 [unreleased]

- Update dependencies.

# 0.26.0 [2020-12-17]

- Update `libp2p-swarm` and `libp2p-core`.
Expand Down
8 changes: 4 additions & 4 deletions protocols/floodsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "libp2p-floodsub"
edition = "2018"
description = "Floodsub protocol for libp2p"
version = "0.26.0"
version = "0.27.0"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -13,10 +13,10 @@ categories = ["network-programming", "asynchronous"]
cuckoofilter = "0.5.0"
fnv = "1.0"
futures = "0.3.1"
libp2p-core = { version = "0.26.0", path = "../../core" }
libp2p-swarm = { version = "0.26.0", path = "../../swarm" }
libp2p-core = { version = "0.27.0", path = "../../core" }
libp2p-swarm = { version = "0.27.0", path = "../../swarm" }
log = "0.4"
prost = "0.6.1"
prost = "0.7"
rand = "0.7"
smallvec = "1.0"

Expand Down
7 changes: 7 additions & 0 deletions protocols/gossipsub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 0.27.0 [unreleased]

- Update dependencies.

- Implement Gossipsub v1.1 specification.
[PR 1720](https://github.com/libp2p/rust-libp2p/pull/1720)

# 0.26.0 [2020-12-17]

- Update `libp2p-swarm` and `libp2p-core`.
Expand Down
16 changes: 8 additions & 8 deletions protocols/gossipsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
name = "libp2p-gossipsub"
edition = "2018"
description = "Gossipsub protocol for libp2p"
version = "0.26.0"
version = "0.27.0"
authors = ["Age Manning <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[dependencies]
libp2p-swarm = { version = "0.26.0", path = "../../swarm" }
libp2p-core = { version = "0.26.0", path = "../../core" }
bytes = "0.5.6"
libp2p-swarm = { version = "0.27.0", path = "../../swarm" }
libp2p-core = { version = "0.27.0", path = "../../core" }
bytes = "1.0"
byteorder = "1.3.4"
fnv = "1.0.7"
futures = "0.3.5"
rand = "0.7.3"
futures_codec = "0.4.1"
asynchronous-codec = "0.5"
wasm-timer = "0.2.4"
unsigned-varint = { version = "0.5.0", features = ["futures-codec"] }
unsigned-varint = { version = "0.6.0", features = ["asynchronous-codec"] }
log = "0.4.11"
sha2 = "0.9.1"
base64 = "0.13.0"
smallvec = "1.4.2"
prost = "0.6.1"
prost = "0.7"
hex_fmt = "0.3.0"
regex = "1.4.0"

Expand All @@ -40,4 +40,4 @@ hex = "0.4.2"
derive_builder = "0.9.0"

[build-dependencies]
prost-build = "0.6.1"
prost-build = "0.7"
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3251,7 +3251,7 @@ impl fmt::Debug for PublishConfig {
mod local_test {
use super::*;
use crate::IdentTopic;
use futures_codec::Encoder;
use asynchronous_codec::Encoder;
use quickcheck::*;
use rand::Rng;

Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::protocol::{GossipsubCodec, ProtocolConfig};
use crate::types::{GossipsubRpc, PeerKind, RawGossipsubMessage};
use futures::prelude::*;
use futures::StreamExt;
use futures_codec::Framed;
use asynchronous_codec::Framed;
use libp2p_core::upgrade::{InboundUpgrade, NegotiationError, OutboundUpgrade, UpgradeError};
use libp2p_swarm::protocols_handler::{
KeepAlive, ProtocolsHandler, ProtocolsHandlerEvent, ProtocolsHandlerUpgrErr, SubstreamProtocol,
Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use bytes::Bytes;
use bytes::BytesMut;
use futures::future;
use futures::prelude::*;
use futures_codec::{Decoder, Encoder, Framed};
use asynchronous_codec::{Decoder, Encoder, Framed};
use libp2p_core::{
identity::PublicKey, InboundUpgrade, OutboundUpgrade, PeerId, ProtocolName, UpgradeInfo,
};
Expand Down
Loading