Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Upgrade libp2p to 0.49.0 (#12256)
Browse files Browse the repository at this point in the history
* cargo upgrade libp2p

* Get rid of `NetworkBehaviourEventProcess` in handling of `CustomMessageOutcome`

* Get rid of `NetworkBehaviourEventProcess` in handling of `request_responses::Event`

* Get rid of `NetworkBehaviourEventProcess` in handling of `peer_info::PeerInfoEvent`

* Get rid of `NetworkBehaviourEventProcess` in handling of `DiscoveryOut`

* Get rid of `poll()` method in `Bahaviour`

* minor: comments

* Upgrade libp2p to 0.49.0 (unreleased)

* Support multiple Kad protocol names

* Make borrow checker happy

* minor: wording

* Make substrate build with libp2p-0.49.0

* rustfmt

* Get rid of MdnsWrapper

* Resolve deprecation warnings

* Fix documentation

* Apply suggestions from code review: fix typos

Co-authored-by: Aaro Altonen <[email protected]>

* Apply suggestion: simplify kad protocol name matching

Co-authored-by: Aaro Altonen <[email protected]>
  • Loading branch information
dmitry-markin and altonen authored Oct 17, 2022
1 parent acacb53 commit 444cf9d
Show file tree
Hide file tree
Showing 21 changed files with 526 additions and 829 deletions.
651 changes: 172 additions & 479 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/authority-discovery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
futures = "0.3.21"
futures-timer = "3.0.1"
ip_network = "0.4.1"
libp2p = { version = "0.46.1", default-features = false, features = ["kad"] }
libp2p = { version = "0.49.0", default-features = false, features = ["kad"] }
log = "0.4.17"
prost = "0.11"
rand = "0.7.2"
Expand Down
5 changes: 1 addition & 4 deletions client/authority-discovery/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ fn cryptos_are_compatible() {
let libp2p_public = libp2p_secret.public();

let sp_core_secret = {
let libp2p_ed_secret = match libp2p_secret.clone() {
libp2p::identity::Keypair::Ed25519(x) => x,
_ => panic!("generate_ed25519 should have generated an Ed25519 key ¯\\_(ツ)_/¯"),
};
let libp2p::identity::Keypair::Ed25519(libp2p_ed_secret) = libp2p_secret.clone();
sp_core::ed25519::Pair::from_seed_slice(&libp2p_ed_secret.secret().as_ref()).unwrap()
};
let sp_core_public = sp_core_secret.public();
Expand Down
2 changes: 1 addition & 1 deletion client/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ chrono = "0.4.10"
clap = { version = "3.1.18", features = ["derive"] }
fdlimit = "0.2.1"
futures = "0.3.21"
libp2p = "0.46.1"
libp2p = "0.49.0"
log = "0.4.17"
names = { version = "0.13.0", default-features = false }
parity-scale-codec = "3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
async-trait = "0.1.57"
futures = { version = "0.3.21", features = ["thread-pool"] }
futures-timer = "3.0.1"
libp2p = { version = "0.46.1", default-features = false }
libp2p = { version = "0.49.0", default-features = false }
log = "0.4.17"
parking_lot = "0.12.1"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion client/network-gossip/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ targets = ["x86_64-unknown-linux-gnu"]
ahash = "0.7.6"
futures = "0.3.21"
futures-timer = "3.0.1"
libp2p = { version = "0.46.1", default-features = false }
libp2p = { version = "0.49.0", default-features = false }
log = "0.4.17"
lru = "0.7.5"
tracing = "0.1.29"
Expand Down
2 changes: 1 addition & 1 deletion client/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fnv = "1.0.6"
futures = "0.3.21"
futures-timer = "3.0.2"
ip_network = "0.4.1"
libp2p = "0.46.1"
libp2p = { version = "0.49.0", features = ["async-std", "dns", "identify", "kad", "mdns-async-io", "mplex", "noise", "ping", "tcp", "yamux"] }
linked_hash_set = "0.1.3"
linked-hash-map = "0.5.4"
log = "0.4.17"
Expand Down
2 changes: 1 addition & 1 deletion client/network/bitswap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ prost-build = "0.11"
[dependencies]
cid = "0.8.6"
futures = "0.3.21"
libp2p = "0.46.1"
libp2p = "0.49.0"
log = "0.4.17"
prost = "0.11"
thiserror = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion client/network/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [
] }
futures = "0.3.21"
futures-timer = "3.0.2"
libp2p = "0.46.1"
libp2p = { version = "0.49.0", features = [ "request-response", "kad" ] }
linked_hash_set = "0.1.3"
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.10.0-dev", path = "../../../utils/prometheus" }
smallvec = "1.8.0"
Expand Down
2 changes: 1 addition & 1 deletion client/network/light/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [
"derive",
] }
futures = "0.3.21"
libp2p = "0.46.1"
libp2p = "0.49.0"
log = "0.4.16"
prost = "0.11"
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
Expand Down
Loading

0 comments on commit 444cf9d

Please sign in to comment.