From ffe1545aba6c2557a2843579de331f3fc1c60743 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Fri, 14 Aug 2020 11:02:15 +0200 Subject: [PATCH 1/8] *: Update to next libp2p version (likely v0.24.0) --- Cargo.lock | 182 +++++++++++++++++-------- bin/node/browser-testing/Cargo.toml | 2 +- bin/utils/subkey/Cargo.toml | 2 +- client/authority-discovery/Cargo.toml | 2 +- client/network-gossip/Cargo.toml | 2 +- client/network/Cargo.toml | 5 +- client/network/src/service.rs | 19 +-- client/network/test/Cargo.toml | 2 +- client/peerset/Cargo.toml | 2 +- client/telemetry/Cargo.toml | 2 +- primitives/consensus/common/Cargo.toml | 2 +- utils/browser/Cargo.toml | 2 +- 12 files changed, 144 insertions(+), 80 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 197751bedb15d..005a48618ae2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2804,14 +2804,13 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1ebb6c031584a5af181fe3a1e4b074af5d0b1a3b31663200f0251f4bcff6b5c" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "atomic", "bytes 0.5.4", "futures 0.3.5", "lazy_static", - "libp2p-core", + "libp2p-core 0.21.0", "libp2p-core-derive", "libp2p-dns", "libp2p-identify", @@ -2823,11 +2822,11 @@ dependencies = [ "libp2p-secio", "libp2p-swarm", "libp2p-tcp", - "libp2p-wasm-ext", + "libp2p-wasm-ext 0.21.0", "libp2p-websocket", "libp2p-yamux", "multihash", - "parity-multiaddr", + "parity-multiaddr 0.9.1 (git+https://github.com/libp2p/rust-libp2p)", "parking_lot 0.10.2", "pin-project", "smallvec 1.4.1", @@ -2851,8 +2850,41 @@ dependencies = [ "libsecp256k1", "log", "multihash", - "multistream-select", - "parity-multiaddr", + "multistream-select 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.2", + "pin-project", + "prost", + "prost-build", + "rand 0.7.3", + "ring", + "rw-stream-sink", + "sha2 0.8.1", + "smallvec 1.4.1", + "thiserror", + "unsigned-varint 0.4.0", + "void", + "zeroize", +] + +[[package]] +name = "libp2p-core" +version = "0.21.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +dependencies = [ + "asn1_der", + "bs58", + "ed25519-dalek", + "either", + "fnv", + "futures 0.3.5", + "futures-timer 3.0.2", + "lazy_static", + "libsecp256k1", + "log", + "multihash", + "multistream-select 0.8.2 (git+https://github.com/libp2p/rust-libp2p)", + "parity-multiaddr 0.9.1 (git+https://github.com/libp2p/rust-libp2p)", "parking_lot 0.10.2", "pin-project", "prost", @@ -2870,9 +2902,8 @@ dependencies = [ [[package]] name = "libp2p-core-derive" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "515c4a7cba5d321bb88ed3ed803997bdd5634ce35c9c5e8e9ace9c512e57eceb" +version = "0.20.2" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "quote", "syn", @@ -2880,23 +2911,21 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751924b6b98e350005e0b87a822beb246792a3fb878c684e088f866158120ac" +version = "0.21.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "futures 0.3.5", - "libp2p-core", + "libp2p-core 0.21.0", "log", ] [[package]] name = "libp2p-identify" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912c00a7bf67e0e765daf0cc37e08f675ea26aba3d6d1fbfaee81f19a4c23049" +version = "0.21.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "futures 0.3.5", - "libp2p-core", + "libp2p-core 0.21.0", "libp2p-swarm", "log", "prost", @@ -2907,9 +2936,8 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44ed3a4c8111c570ab2bffb30c6353178d7603ce3787e3c5f2493c8d3d16d1f0" +version = "0.22.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "arrayvec 0.5.1", "bytes 0.5.4", @@ -2917,7 +2945,7 @@ dependencies = [ "fnv", "futures 0.3.5", "futures_codec", - "libp2p-core", + "libp2p-core 0.21.0", "libp2p-swarm", "log", "multihash", @@ -2934,9 +2962,8 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd004c668160fd922f7268b2cd1e4550ff69165d9c744e9eb5770086eb753d02" +version = "0.21.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "async-std", "data-encoding", @@ -2944,7 +2971,7 @@ dependencies = [ "either", "futures 0.3.5", "lazy_static", - "libp2p-core", + "libp2p-core 0.21.0", "libp2p-swarm", "log", "net2", @@ -2956,15 +2983,14 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ae0ffacd30f073f96cd518b2c9cd2cb18ac27c3d136a4b23cf1af99f33e541" +version = "0.21.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "bytes 0.5.4", "fnv", "futures 0.3.5", "futures_codec", - "libp2p-core", + "libp2p-core 0.21.0", "log", "parking_lot 0.10.2", "unsigned-varint 0.4.0", @@ -2972,15 +2998,14 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e594f2de0c23c2b7ad14802c991a2e68e95315c6a6c7715e53801506f20135d" +version = "0.23.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "bytes 0.5.4", "curve25519-dalek", "futures 0.3.5", "lazy_static", - "libp2p-core", + "libp2p-core 0.21.0", "log", "prost", "prost-build", @@ -2994,12 +3019,11 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70130cf130e4ba6dc177366e72dd9f86f9e3588fa1a0c4145247e676f16affad" +version = "0.21.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "futures 0.3.5", - "libp2p-core", + "libp2p-core 0.21.0", "libp2p-swarm", "log", "rand 0.7.3", @@ -3009,9 +3033,8 @@ dependencies = [ [[package]] name = "libp2p-secio" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ff43513c383f7cdab2736eb98465fc4c5dd5d1988df89749dc8a68950349d56" +version = "0.21.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "aes-ctr", "ctr", @@ -3019,7 +3042,7 @@ dependencies = [ "hmac", "js-sys", "lazy_static", - "libp2p-core", + "libp2p-core 0.21.0", "log", "parity-send-wrapper", "pin-project", @@ -3039,12 +3062,11 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88d5e2a090a2aadf042cd33484e2f015c6dab212567406a59deece5dedbd133" +version = "0.21.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "futures 0.3.5", - "libp2p-core", + "libp2p-core 0.21.0", "log", "rand 0.7.3", "smallvec 1.4.1", @@ -3054,16 +3076,15 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1fa2bbad054020cb875546a577a66a65a5bf42eff55ed5265f92ffee3cc052" +version = "0.21.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "async-std", "futures 0.3.5", "futures-timer 3.0.2", "get_if_addrs", "ipnet", - "libp2p-core", + "libp2p-core 0.21.0", "log", "socket2", ] @@ -3076,7 +3097,20 @@ checksum = "0feb99e32fea20ffb1bbf56a6fb2614bff7325ff44a515728385170b3420d2c3" dependencies = [ "futures 0.3.5", "js-sys", - "libp2p-core", + "libp2p-core 0.20.1", + "parity-send-wrapper", + "wasm-bindgen", + "wasm-bindgen-futures", +] + +[[package]] +name = "libp2p-wasm-ext" +version = "0.21.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +dependencies = [ + "futures 0.3.5", + "js-sys", + "libp2p-core 0.21.0", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", @@ -3084,14 +3118,13 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046a5201f6e471f22b22b394e4d084269ed1e28cf7300f7b49874385db84c7bd" +version = "0.22.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "async-tls", "either", "futures 0.3.5", - "libp2p-core", + "libp2p-core 0.21.0", "log", "quicksink", "rustls", @@ -3104,12 +3137,11 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ae9bf2f7d8a4be9c7e9b61df9de9dc1bd66419d669098f22f81f8d9571029a" +version = "0.21.0" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" dependencies = [ "futures 0.3.5", - "libp2p-core", + "libp2p-core 0.21.0", "parking_lot 0.10.2", "thiserror", "yamux", @@ -3440,6 +3472,19 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce" +[[package]] +name = "multistream-select" +version = "0.8.2" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +dependencies = [ + "bytes 0.5.4", + "futures 0.3.5", + "log", + "pin-project", + "smallvec 1.4.1", + "unsigned-varint 0.4.0", +] + [[package]] name = "multistream-select" version = "0.8.2" @@ -4965,6 +5010,23 @@ dependencies = [ "parking_lot 0.10.2", ] +[[package]] +name = "parity-multiaddr" +version = "0.9.1" +source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +dependencies = [ + "arrayref", + "bs58", + "byteorder", + "data-encoding", + "multihash", + "percent-encoding 2.1.0", + "serde", + "static_assertions", + "unsigned-varint 0.4.0", + "url 2.1.1", +] + [[package]] name = "parity-multiaddr" version = "0.9.1" @@ -8438,7 +8500,7 @@ dependencies = [ "futures-timer 3.0.2", "js-sys", "kvdb-web", - "libp2p-wasm-ext", + "libp2p-wasm-ext 0.20.1", "log", "rand 0.6.5", "rand 0.7.3", diff --git a/bin/node/browser-testing/Cargo.toml b/bin/node/browser-testing/Cargo.toml index 1f5db1053d741..a6df76d1ba9de 100644 --- a/bin/node/browser-testing/Cargo.toml +++ b/bin/node/browser-testing/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" [dependencies] futures-timer = "3.0.2" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } jsonrpc-core = "14.2.0" serde = "1.0.106" serde_json = "1.0.48" diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml index 459df884d6884..7cf7713d7c156 100644 --- a/bin/utils/subkey/Cargo.toml +++ b/bin/utils/subkey/Cargo.toml @@ -33,7 +33,7 @@ derive_more = { version = "0.99.2" } sc-rpc = { version = "2.0.0-rc5", path = "../../../client/rpc" } jsonrpc-core-client = { version = "14.2.0", features = ["http"] } hyper = "0.12.35" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } serde_json = "1.0" [features] diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index 3f3e5b5589473..5946c39b3b6f7 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -21,7 +21,7 @@ codec = { package = "parity-scale-codec", default-features = false, version = "1 derive_more = "0.99.2" futures = "0.3.4" futures-timer = "3.0.1" -libp2p = { version = "0.23.0", default-features = false, features = ["kad"] } +libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false, features = ["kad"] } log = "0.4.8" prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0-rc5"} prost = "0.6.1" diff --git a/client/network-gossip/Cargo.toml b/client/network-gossip/Cargo.toml index 90d606238b6a5..6f58dd37fe5ce 100644 --- a/client/network-gossip/Cargo.toml +++ b/client/network-gossip/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] futures = "0.3.4" futures-timer = "3.0.1" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } log = "0.4.8" lru = "0.4.3" sc-network = { version = "0.8.0-rc5", path = "../network" } diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 39598e2a88755..5fc6f5289d3fe 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -61,7 +61,8 @@ wasm-timer = "0.2" zeroize = "1.0.0" [dependencies.libp2p] -version = "0.23.0" +git = "https://github.com/libp2p/rust-libp2p" +branch = "master" default-features = false features = ["identify", "kad", "mdns", "mplex", "noise", "ping", "tcp-async-std", "websocket", "yamux"] @@ -69,7 +70,7 @@ features = ["identify", "kad", "mdns", "mplex", "noise", "ping", "tcp-async-std" async-std = "1.6.2" assert_matches = "1.3" env_logger = "0.7.0" -libp2p = { version = "0.23.0", default-features = false, features = ["secio"] } +libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false, features = ["secio"] } quickcheck = "0.9.0" rand = "0.7.2" sp-keyring = { version = "2.0.0-rc5", path = "../../primitives/keyring" } diff --git a/client/network/src/service.rs b/client/network/src/service.rs index cc3821a455e9f..674fe90b068d6 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -1581,18 +1581,19 @@ impl Future for NetworkWorker { ConnectedPoint::Listener { .. } => "in", }; let reason = match cause { - ConnectionError::IO(_) => "transport-error", - ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( + Some(ConnectionError::IO(_)) => "transport-error", + Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( EitherError::A(EitherError::A(EitherError::B( - EitherError::A(PingFailure::Timeout)))))))) => "ping-timeout", - ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( + EitherError::A(PingFailure::Timeout))))))))) => "ping-timeout", + Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( EitherError::A(EitherError::A(EitherError::A( - NotifsHandlerError::Legacy(LegacyConnectionKillError)))))))) => "force-closed", - ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( + NotifsHandlerError::Legacy(LegacyConnectionKillError))))))))) => "force-closed", + Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( EitherError::A(EitherError::A(EitherError::A( - NotifsHandlerError::SyncNotificationsClogged))))))) => "sync-notifications-clogged", - ConnectionError::Handler(NodeHandlerWrapperError::Handler(_)) => "protocol-error", - ConnectionError::Handler(NodeHandlerWrapperError::KeepAliveTimeout) => "keep-alive-timeout", + NotifsHandlerError::SyncNotificationsClogged)))))))) => "sync-notifications-clogged", + Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(_))) => "protocol-error", + Some(ConnectionError::Handler(NodeHandlerWrapperError::KeepAliveTimeout)) => "keep-alive-timeout", + None => "actively-closed", }; metrics.connections_closed_total.with_label_values(&[direction, reason]).inc(); diff --git a/client/network/test/Cargo.toml b/client/network/test/Cargo.toml index 7c157ce1c608e..6e9073d0003f9 100644 --- a/client/network/test/Cargo.toml +++ b/client/network/test/Cargo.toml @@ -19,7 +19,7 @@ parking_lot = "0.10.0" futures = "0.3.4" futures-timer = "3.0.1" rand = "0.7.2" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } sp-consensus = { version = "0.8.0-rc5", path = "../../../primitives/consensus/common" } sc-consensus = { version = "0.8.0-rc5", path = "../../../client/consensus/common" } sc-client-api = { version = "2.0.0-rc5", path = "../../api" } diff --git a/client/peerset/Cargo.toml b/client/peerset/Cargo.toml index 8a9aa0adb1807..5511d7ceca0aa 100644 --- a/client/peerset/Cargo.toml +++ b/client/peerset/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] futures = "0.3.4" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } sp-utils = { version = "2.0.0-rc5", path = "../../primitives/utils"} log = "0.4.8" serde_json = "1.0.41" diff --git a/client/telemetry/Cargo.toml b/client/telemetry/Cargo.toml index 4c9cc05b07fec..513bd963eff2d 100644 --- a/client/telemetry/Cargo.toml +++ b/client/telemetry/Cargo.toml @@ -18,7 +18,7 @@ parking_lot = "0.10.0" futures = "0.3.4" futures-timer = "3.0.1" wasm-timer = "0.2.0" -libp2p = { version = "0.23.0", default-features = false, features = ["dns", "tcp-async-std", "wasm-ext", "websocket"] } +libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false, features = ["dns", "tcp-async-std", "wasm-ext", "websocket"] } log = "0.4.8" pin-project = "0.4.6" rand = "0.7.2" diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index d8c5073274d75..770876fbb7774 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] derive_more = "0.99.2" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } log = "0.4.8" sp-core = { path= "../../core", version = "2.0.0-rc5"} sp-inherents = { version = "2.0.0-rc5", path = "../../inherents" } diff --git a/utils/browser/Cargo.toml b/utils/browser/Cargo.toml index 20e04148fafc1..fb05b5062ddd8 100644 --- a/utils/browser/Cargo.toml +++ b/utils/browser/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] futures = { version = "0.3", features = ["compat"] } futures01 = { package = "futures", version = "0.1.29" } log = "0.4.8" -libp2p-wasm-ext = { version = "0.20", features = ["websocket"] } +libp2p-wasm-ext = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", features = ["websocket"] } console_error_panic_hook = "0.1.6" console_log = "0.1.2" js-sys = "0.3.34" From 347efdb8eb5f0c09d93e0345f6a84f9a7d085964 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 19 Aug 2020 09:06:58 +0200 Subject: [PATCH 2/8] Revert "*: Update to next libp2p version (likely v0.24.0)" This reverts commit ffe1545aba6c2557a2843579de331f3fc1c60743. --- Cargo.lock | 182 ++++++++----------------- bin/node/browser-testing/Cargo.toml | 2 +- bin/utils/subkey/Cargo.toml | 2 +- client/authority-discovery/Cargo.toml | 2 +- client/network-gossip/Cargo.toml | 2 +- client/network/Cargo.toml | 5 +- client/network/src/service.rs | 19 ++- client/network/test/Cargo.toml | 2 +- client/peerset/Cargo.toml | 2 +- client/telemetry/Cargo.toml | 2 +- primitives/consensus/common/Cargo.toml | 2 +- utils/browser/Cargo.toml | 2 +- 12 files changed, 80 insertions(+), 144 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6c97ec88f50a8..ec5af8aca4ecf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2804,13 +2804,14 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" version = "0.23.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1ebb6c031584a5af181fe3a1e4b074af5d0b1a3b31663200f0251f4bcff6b5c" dependencies = [ "atomic", "bytes 0.5.4", "futures 0.3.5", "lazy_static", - "libp2p-core 0.21.0", + "libp2p-core", "libp2p-core-derive", "libp2p-dns", "libp2p-identify", @@ -2822,11 +2823,11 @@ dependencies = [ "libp2p-secio", "libp2p-swarm", "libp2p-tcp", - "libp2p-wasm-ext 0.21.0", + "libp2p-wasm-ext", "libp2p-websocket", "libp2p-yamux", "multihash", - "parity-multiaddr 0.9.1 (git+https://github.com/libp2p/rust-libp2p)", + "parity-multiaddr", "parking_lot 0.10.2", "pin-project", "smallvec 1.4.1", @@ -2850,41 +2851,8 @@ dependencies = [ "libsecp256k1", "log", "multihash", - "multistream-select 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.10.2", - "pin-project", - "prost", - "prost-build", - "rand 0.7.3", - "ring", - "rw-stream-sink", - "sha2 0.8.1", - "smallvec 1.4.1", - "thiserror", - "unsigned-varint 0.4.0", - "void", - "zeroize", -] - -[[package]] -name = "libp2p-core" -version = "0.21.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" -dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "either", - "fnv", - "futures 0.3.5", - "futures-timer 3.0.2", - "lazy_static", - "libsecp256k1", - "log", - "multihash", - "multistream-select 0.8.2 (git+https://github.com/libp2p/rust-libp2p)", - "parity-multiaddr 0.9.1 (git+https://github.com/libp2p/rust-libp2p)", + "multistream-select", + "parity-multiaddr", "parking_lot 0.10.2", "pin-project", "prost", @@ -2902,8 +2870,9 @@ dependencies = [ [[package]] name = "libp2p-core-derive" -version = "0.20.2" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "515c4a7cba5d321bb88ed3ed803997bdd5634ce35c9c5e8e9ace9c512e57eceb" dependencies = [ "quote", "syn", @@ -2911,21 +2880,23 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.21.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f751924b6b98e350005e0b87a822beb246792a3fb878c684e088f866158120ac" dependencies = [ "futures 0.3.5", - "libp2p-core 0.21.0", + "libp2p-core", "log", ] [[package]] name = "libp2p-identify" -version = "0.21.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "912c00a7bf67e0e765daf0cc37e08f675ea26aba3d6d1fbfaee81f19a4c23049" dependencies = [ "futures 0.3.5", - "libp2p-core 0.21.0", + "libp2p-core", "libp2p-swarm", "log", "prost", @@ -2936,8 +2907,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.22.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44ed3a4c8111c570ab2bffb30c6353178d7603ce3787e3c5f2493c8d3d16d1f0" dependencies = [ "arrayvec 0.5.1", "bytes 0.5.4", @@ -2945,7 +2917,7 @@ dependencies = [ "fnv", "futures 0.3.5", "futures_codec", - "libp2p-core 0.21.0", + "libp2p-core", "libp2p-swarm", "log", "multihash", @@ -2962,8 +2934,9 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.21.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd004c668160fd922f7268b2cd1e4550ff69165d9c744e9eb5770086eb753d02" dependencies = [ "async-std", "data-encoding", @@ -2971,7 +2944,7 @@ dependencies = [ "either", "futures 0.3.5", "lazy_static", - "libp2p-core 0.21.0", + "libp2p-core", "libp2p-swarm", "log", "net2", @@ -2983,14 +2956,15 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.21.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14ae0ffacd30f073f96cd518b2c9cd2cb18ac27c3d136a4b23cf1af99f33e541" dependencies = [ "bytes 0.5.4", "fnv", "futures 0.3.5", "futures_codec", - "libp2p-core 0.21.0", + "libp2p-core", "log", "parking_lot 0.10.2", "unsigned-varint 0.4.0", @@ -2998,14 +2972,15 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.23.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e594f2de0c23c2b7ad14802c991a2e68e95315c6a6c7715e53801506f20135d" dependencies = [ "bytes 0.5.4", "curve25519-dalek", "futures 0.3.5", "lazy_static", - "libp2p-core 0.21.0", + "libp2p-core", "log", "prost", "prost-build", @@ -3019,11 +2994,12 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.21.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70130cf130e4ba6dc177366e72dd9f86f9e3588fa1a0c4145247e676f16affad" dependencies = [ "futures 0.3.5", - "libp2p-core 0.21.0", + "libp2p-core", "libp2p-swarm", "log", "rand 0.7.3", @@ -3033,8 +3009,9 @@ dependencies = [ [[package]] name = "libp2p-secio" -version = "0.21.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ff43513c383f7cdab2736eb98465fc4c5dd5d1988df89749dc8a68950349d56" dependencies = [ "aes-ctr", "ctr", @@ -3042,7 +3019,7 @@ dependencies = [ "hmac", "js-sys", "lazy_static", - "libp2p-core 0.21.0", + "libp2p-core", "log", "parity-send-wrapper", "pin-project", @@ -3062,11 +3039,12 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.21.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f88d5e2a090a2aadf042cd33484e2f015c6dab212567406a59deece5dedbd133" dependencies = [ "futures 0.3.5", - "libp2p-core 0.21.0", + "libp2p-core", "log", "rand 0.7.3", "smallvec 1.4.1", @@ -3076,15 +3054,16 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.21.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b1fa2bbad054020cb875546a577a66a65a5bf42eff55ed5265f92ffee3cc052" dependencies = [ "async-std", "futures 0.3.5", "futures-timer 3.0.2", "get_if_addrs", "ipnet", - "libp2p-core 0.21.0", + "libp2p-core", "log", "socket2", ] @@ -3097,20 +3076,7 @@ checksum = "0feb99e32fea20ffb1bbf56a6fb2614bff7325ff44a515728385170b3420d2c3" dependencies = [ "futures 0.3.5", "js-sys", - "libp2p-core 0.20.1", - "parity-send-wrapper", - "wasm-bindgen", - "wasm-bindgen-futures", -] - -[[package]] -name = "libp2p-wasm-ext" -version = "0.21.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" -dependencies = [ - "futures 0.3.5", - "js-sys", - "libp2p-core 0.21.0", + "libp2p-core", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", @@ -3118,13 +3084,14 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.22.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046a5201f6e471f22b22b394e4d084269ed1e28cf7300f7b49874385db84c7bd" dependencies = [ "async-tls", "either", "futures 0.3.5", - "libp2p-core 0.21.0", + "libp2p-core", "log", "quicksink", "rustls", @@ -3137,11 +3104,12 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.21.0" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46ae9bf2f7d8a4be9c7e9b61df9de9dc1bd66419d669098f22f81f8d9571029a" dependencies = [ "futures 0.3.5", - "libp2p-core 0.21.0", + "libp2p-core", "parking_lot 0.10.2", "thiserror", "yamux", @@ -3472,19 +3440,6 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce" -[[package]] -name = "multistream-select" -version = "0.8.2" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" -dependencies = [ - "bytes 0.5.4", - "futures 0.3.5", - "log", - "pin-project", - "smallvec 1.4.1", - "unsigned-varint 0.4.0", -] - [[package]] name = "multistream-select" version = "0.8.2" @@ -5010,23 +4965,6 @@ dependencies = [ "parking_lot 0.10.2", ] -[[package]] -name = "parity-multiaddr" -version = "0.9.1" -source = "git+https://github.com/libp2p/rust-libp2p#96484fcd5e65d92c4c9938dfdba1a726ad67799e" -dependencies = [ - "arrayref", - "bs58", - "byteorder", - "data-encoding", - "multihash", - "percent-encoding 2.1.0", - "serde", - "static_assertions", - "unsigned-varint 0.4.0", - "url 2.1.1", -] - [[package]] name = "parity-multiaddr" version = "0.9.1" @@ -8501,7 +8439,7 @@ dependencies = [ "futures-timer 3.0.2", "js-sys", "kvdb-web", - "libp2p-wasm-ext 0.20.1", + "libp2p-wasm-ext", "log", "rand 0.6.5", "rand 0.7.3", diff --git a/bin/node/browser-testing/Cargo.toml b/bin/node/browser-testing/Cargo.toml index a6df76d1ba9de..1f5db1053d741 100644 --- a/bin/node/browser-testing/Cargo.toml +++ b/bin/node/browser-testing/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" [dependencies] futures-timer = "3.0.2" -libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } +libp2p = { version = "0.23.0", default-features = false } jsonrpc-core = "14.2.0" serde = "1.0.106" serde_json = "1.0.48" diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml index 7cf7713d7c156..459df884d6884 100644 --- a/bin/utils/subkey/Cargo.toml +++ b/bin/utils/subkey/Cargo.toml @@ -33,7 +33,7 @@ derive_more = { version = "0.99.2" } sc-rpc = { version = "2.0.0-rc5", path = "../../../client/rpc" } jsonrpc-core-client = { version = "14.2.0", features = ["http"] } hyper = "0.12.35" -libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } +libp2p = { version = "0.23.0", default-features = false } serde_json = "1.0" [features] diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index 5946c39b3b6f7..3f3e5b5589473 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -21,7 +21,7 @@ codec = { package = "parity-scale-codec", default-features = false, version = "1 derive_more = "0.99.2" futures = "0.3.4" futures-timer = "3.0.1" -libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false, features = ["kad"] } +libp2p = { version = "0.23.0", default-features = false, features = ["kad"] } log = "0.4.8" prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0-rc5"} prost = "0.6.1" diff --git a/client/network-gossip/Cargo.toml b/client/network-gossip/Cargo.toml index 6f58dd37fe5ce..90d606238b6a5 100644 --- a/client/network-gossip/Cargo.toml +++ b/client/network-gossip/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] futures = "0.3.4" futures-timer = "3.0.1" -libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } +libp2p = { version = "0.23.0", default-features = false } log = "0.4.8" lru = "0.4.3" sc-network = { version = "0.8.0-rc5", path = "../network" } diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 8f185407d2c67..de4f484535e94 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -62,15 +62,14 @@ wasm-timer = "0.2" zeroize = "1.0.0" [dependencies.libp2p] -git = "https://github.com/libp2p/rust-libp2p" -branch = "master" +version = "0.23.0" default-features = false features = ["identify", "kad", "mdns", "mplex", "noise", "ping", "tcp-async-std", "websocket", "yamux"] [dev-dependencies] assert_matches = "1.3" env_logger = "0.7.0" -libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false, features = ["secio"] } +libp2p = { version = "0.23.0", default-features = false, features = ["secio"] } quickcheck = "0.9.0" rand = "0.7.2" sp-keyring = { version = "2.0.0-rc5", path = "../../primitives/keyring" } diff --git a/client/network/src/service.rs b/client/network/src/service.rs index bf4b4e2f561ec..713357772d417 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -1610,19 +1610,18 @@ impl Future for NetworkWorker { ConnectedPoint::Listener { .. } => "in", }; let reason = match cause { - Some(ConnectionError::IO(_)) => "transport-error", - Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( + ConnectionError::IO(_) => "transport-error", + ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( EitherError::A(EitherError::A(EitherError::B( - EitherError::A(PingFailure::Timeout))))))))) => "ping-timeout", - Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( + EitherError::A(PingFailure::Timeout)))))))) => "ping-timeout", + ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( EitherError::A(EitherError::A(EitherError::A( - NotifsHandlerError::Legacy(LegacyConnectionKillError))))))))) => "force-closed", - Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( + NotifsHandlerError::Legacy(LegacyConnectionKillError)))))))) => "force-closed", + ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( EitherError::A(EitherError::A(EitherError::A( - NotifsHandlerError::SyncNotificationsClogged)))))))) => "sync-notifications-clogged", - Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(_))) => "protocol-error", - Some(ConnectionError::Handler(NodeHandlerWrapperError::KeepAliveTimeout)) => "keep-alive-timeout", - None => "actively-closed", + NotifsHandlerError::SyncNotificationsClogged))))))) => "sync-notifications-clogged", + ConnectionError::Handler(NodeHandlerWrapperError::Handler(_)) => "protocol-error", + ConnectionError::Handler(NodeHandlerWrapperError::KeepAliveTimeout) => "keep-alive-timeout", }; metrics.connections_closed_total.with_label_values(&[direction, reason]).inc(); diff --git a/client/network/test/Cargo.toml b/client/network/test/Cargo.toml index 6e9073d0003f9..7c157ce1c608e 100644 --- a/client/network/test/Cargo.toml +++ b/client/network/test/Cargo.toml @@ -19,7 +19,7 @@ parking_lot = "0.10.0" futures = "0.3.4" futures-timer = "3.0.1" rand = "0.7.2" -libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } +libp2p = { version = "0.23.0", default-features = false } sp-consensus = { version = "0.8.0-rc5", path = "../../../primitives/consensus/common" } sc-consensus = { version = "0.8.0-rc5", path = "../../../client/consensus/common" } sc-client-api = { version = "2.0.0-rc5", path = "../../api" } diff --git a/client/peerset/Cargo.toml b/client/peerset/Cargo.toml index 5511d7ceca0aa..8a9aa0adb1807 100644 --- a/client/peerset/Cargo.toml +++ b/client/peerset/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] futures = "0.3.4" -libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } +libp2p = { version = "0.23.0", default-features = false } sp-utils = { version = "2.0.0-rc5", path = "../../primitives/utils"} log = "0.4.8" serde_json = "1.0.41" diff --git a/client/telemetry/Cargo.toml b/client/telemetry/Cargo.toml index 513bd963eff2d..4c9cc05b07fec 100644 --- a/client/telemetry/Cargo.toml +++ b/client/telemetry/Cargo.toml @@ -18,7 +18,7 @@ parking_lot = "0.10.0" futures = "0.3.4" futures-timer = "3.0.1" wasm-timer = "0.2.0" -libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false, features = ["dns", "tcp-async-std", "wasm-ext", "websocket"] } +libp2p = { version = "0.23.0", default-features = false, features = ["dns", "tcp-async-std", "wasm-ext", "websocket"] } log = "0.4.8" pin-project = "0.4.6" rand = "0.7.2" diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index 770876fbb7774..d8c5073274d75 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] derive_more = "0.99.2" -libp2p = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", default-features = false } +libp2p = { version = "0.23.0", default-features = false } log = "0.4.8" sp-core = { path= "../../core", version = "2.0.0-rc5"} sp-inherents = { version = "2.0.0-rc5", path = "../../inherents" } diff --git a/utils/browser/Cargo.toml b/utils/browser/Cargo.toml index fb05b5062ddd8..20e04148fafc1 100644 --- a/utils/browser/Cargo.toml +++ b/utils/browser/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] futures = { version = "0.3", features = ["compat"] } futures01 = { package = "futures", version = "0.1.29" } log = "0.4.8" -libp2p-wasm-ext = { git = "https://github.com/libp2p/rust-libp2p", branch = "master", features = ["websocket"] } +libp2p-wasm-ext = { version = "0.20", features = ["websocket"] } console_error_panic_hook = "0.1.6" console_log = "0.1.2" js-sys = "0.3.34" From 34f02d70a9ac8d02c65df0ca6fb9edcf55b78a48 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 19 Aug 2020 09:17:35 +0200 Subject: [PATCH 3/8] */Cargo.toml: Update to libp2p v0.24.0 --- Cargo.lock | 64 +++++++++++++------------- bin/node/browser-testing/Cargo.toml | 2 +- bin/utils/subkey/Cargo.toml | 2 +- client/authority-discovery/Cargo.toml | 2 +- client/network-gossip/Cargo.toml | 2 +- client/network/Cargo.toml | 6 +-- client/network/test/Cargo.toml | 2 +- client/peerset/Cargo.toml | 2 +- client/telemetry/Cargo.toml | 2 +- primitives/consensus/common/Cargo.toml | 2 +- utils/browser/Cargo.toml | 2 +- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ec5af8aca4ecf..3042ffee93792 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2803,9 +2803,9 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" -version = "0.23.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1ebb6c031584a5af181fe3a1e4b074af5d0b1a3b31663200f0251f4bcff6b5c" +checksum = "76c101edbb9c06955fd4085b77d2abc31cf3650134d77068b35c44967756ada8" dependencies = [ "atomic", "bytes 0.5.4", @@ -2836,9 +2836,9 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a694fd76d7c33a45a0e6e1525e9b9b5d11127c9c94e560ac0f8abba54ed80af" +checksum = "17cea54ea4a846a7c47e4347db0fc7a4129dcb0fb57f07f57e473820edbfcbde" dependencies = [ "asn1_der", "bs58", @@ -2870,9 +2870,9 @@ dependencies = [ [[package]] name = "libp2p-core-derive" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "515c4a7cba5d321bb88ed3ed803997bdd5634ce35c9c5e8e9ace9c512e57eceb" +checksum = "f753d9324cd3ec14bf04b8a8cd0d269c87f294153d6bf2a84497a63a5ad22213" dependencies = [ "quote", "syn", @@ -2880,9 +2880,9 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751924b6b98e350005e0b87a822beb246792a3fb878c684e088f866158120ac" +checksum = "fce8769cfe677a567d2677dc02a9e5be27a24acf1ff78a59cef425caae009a6a" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2891,9 +2891,9 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912c00a7bf67e0e765daf0cc37e08f675ea26aba3d6d1fbfaee81f19a4c23049" +checksum = "41efcb5b521b65d2c45432a244ce6427cdd3649228cd192f397d1fa67682aef2" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2907,9 +2907,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44ed3a4c8111c570ab2bffb30c6353178d7603ce3787e3c5f2493c8d3d16d1f0" +checksum = "10e775dca5c51e016f4c2af1b321fed0b0557eb7ded7b2cd60081ec5278a5b52" dependencies = [ "arrayvec 0.5.1", "bytes 0.5.4", @@ -2934,9 +2934,9 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd004c668160fd922f7268b2cd1e4550ff69165d9c744e9eb5770086eb753d02" +checksum = "d4fe5614c2c5af74ef5870aad0fce73c9e4707716c4ee7cdf06cf9a0376d3815" dependencies = [ "async-std", "data-encoding", @@ -2956,9 +2956,9 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ae0ffacd30f073f96cd518b2c9cd2cb18ac27c3d136a4b23cf1af99f33e541" +checksum = "df9e79541e71590846f773efce1b6d0538804992ee54ff2f407e05d63a9ddc23" dependencies = [ "bytes 0.5.4", "fnv", @@ -2972,9 +2972,9 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e594f2de0c23c2b7ad14802c991a2e68e95315c6a6c7715e53801506f20135d" +checksum = "0beba6459d06153f5f8e23da3df1d2183798b1f457c7c9468ff99760bcbcc60b" dependencies = [ "bytes 0.5.4", "curve25519-dalek", @@ -2994,9 +2994,9 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70130cf130e4ba6dc177366e72dd9f86f9e3588fa1a0c4145247e676f16affad" +checksum = "670261ef938567b614746b078e049b03b55617538a8d415071c518f97532d043" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -3009,9 +3009,9 @@ dependencies = [ [[package]] name = "libp2p-secio" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ff43513c383f7cdab2736eb98465fc4c5dd5d1988df89749dc8a68950349d56" +checksum = "a04b320cc0394554e8d0adca21f4efd9f8c2da4930211d92e411a19a4dfd769e" dependencies = [ "aes-ctr", "ctr", @@ -3039,9 +3039,9 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88d5e2a090a2aadf042cd33484e2f015c6dab212567406a59deece5dedbd133" +checksum = "57e4a7e64156e9d1a2daae36b5d791f057b9c53c9364a8e75f7f9848b54f9d68" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -3054,9 +3054,9 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1fa2bbad054020cb875546a577a66a65a5bf42eff55ed5265f92ffee3cc052" +checksum = "f0f65400ccfbbf9a356733bceca6c519c9db0deb5fbcc0b81f89837c4cd53997" dependencies = [ "async-std", "futures 0.3.5", @@ -3070,9 +3070,9 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0feb99e32fea20ffb1bbf56a6fb2614bff7325ff44a515728385170b3420d2c3" +checksum = "0f2f7b06d80d036ac5763a811185b7fe6951ad71c00544b17cc378a9069bb7c2" dependencies = [ "futures 0.3.5", "js-sys", @@ -3084,9 +3084,9 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.21.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046a5201f6e471f22b22b394e4d084269ed1e28cf7300f7b49874385db84c7bd" +checksum = "a5b350db65cf0a7c83a539a596ea261caae1552c0df2245df0f916ed2fd04572" dependencies = [ "async-tls", "either", @@ -3104,9 +3104,9 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ae9bf2f7d8a4be9c7e9b61df9de9dc1bd66419d669098f22f81f8d9571029a" +checksum = "b3969ead4ce530efb6f304623924245caf410f3b0b0139bd7007f205933788aa" dependencies = [ "futures 0.3.5", "libp2p-core", diff --git a/bin/node/browser-testing/Cargo.toml b/bin/node/browser-testing/Cargo.toml index 1f5db1053d741..f2cd0e442fb08 100644 --- a/bin/node/browser-testing/Cargo.toml +++ b/bin/node/browser-testing/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" [dependencies] futures-timer = "3.0.2" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { version = "0.24.0", default-features = false } jsonrpc-core = "14.2.0" serde = "1.0.106" serde_json = "1.0.48" diff --git a/bin/utils/subkey/Cargo.toml b/bin/utils/subkey/Cargo.toml index 459df884d6884..664d98e160ed3 100644 --- a/bin/utils/subkey/Cargo.toml +++ b/bin/utils/subkey/Cargo.toml @@ -33,7 +33,7 @@ derive_more = { version = "0.99.2" } sc-rpc = { version = "2.0.0-rc5", path = "../../../client/rpc" } jsonrpc-core-client = { version = "14.2.0", features = ["http"] } hyper = "0.12.35" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { version = "0.24.0", default-features = false } serde_json = "1.0" [features] diff --git a/client/authority-discovery/Cargo.toml b/client/authority-discovery/Cargo.toml index 3f3e5b5589473..a658d526ba012 100644 --- a/client/authority-discovery/Cargo.toml +++ b/client/authority-discovery/Cargo.toml @@ -21,7 +21,7 @@ codec = { package = "parity-scale-codec", default-features = false, version = "1 derive_more = "0.99.2" futures = "0.3.4" futures-timer = "3.0.1" -libp2p = { version = "0.23.0", default-features = false, features = ["kad"] } +libp2p = { version = "0.24.0", default-features = false, features = ["kad"] } log = "0.4.8" prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0-rc5"} prost = "0.6.1" diff --git a/client/network-gossip/Cargo.toml b/client/network-gossip/Cargo.toml index 90d606238b6a5..c0c17d109c45c 100644 --- a/client/network-gossip/Cargo.toml +++ b/client/network-gossip/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] futures = "0.3.4" futures-timer = "3.0.1" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { version = "0.24.0", default-features = false } log = "0.4.8" lru = "0.4.3" sc-network = { version = "0.8.0-rc5", path = "../network" } diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index de4f484535e94..fd281388b4e64 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -62,14 +62,14 @@ wasm-timer = "0.2" zeroize = "1.0.0" [dependencies.libp2p] -version = "0.23.0" +version = "0.24.0" default-features = false -features = ["identify", "kad", "mdns", "mplex", "noise", "ping", "tcp-async-std", "websocket", "yamux"] +features = ["identify", "kad", "mdns-async-std", "mplex", "noise", "ping", "tcp-async-std", "websocket", "yamux"] [dev-dependencies] assert_matches = "1.3" env_logger = "0.7.0" -libp2p = { version = "0.23.0", default-features = false, features = ["secio"] } +libp2p = { version = "0.24.0", default-features = false, features = ["secio"] } quickcheck = "0.9.0" rand = "0.7.2" sp-keyring = { version = "2.0.0-rc5", path = "../../primitives/keyring" } diff --git a/client/network/test/Cargo.toml b/client/network/test/Cargo.toml index 7c157ce1c608e..e8632e4907c4a 100644 --- a/client/network/test/Cargo.toml +++ b/client/network/test/Cargo.toml @@ -19,7 +19,7 @@ parking_lot = "0.10.0" futures = "0.3.4" futures-timer = "3.0.1" rand = "0.7.2" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { version = "0.24.0", default-features = false } sp-consensus = { version = "0.8.0-rc5", path = "../../../primitives/consensus/common" } sc-consensus = { version = "0.8.0-rc5", path = "../../../client/consensus/common" } sc-client-api = { version = "2.0.0-rc5", path = "../../api" } diff --git a/client/peerset/Cargo.toml b/client/peerset/Cargo.toml index 8a9aa0adb1807..1d517b7a82368 100644 --- a/client/peerset/Cargo.toml +++ b/client/peerset/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] futures = "0.3.4" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { version = "0.24.0", default-features = false } sp-utils = { version = "2.0.0-rc5", path = "../../primitives/utils"} log = "0.4.8" serde_json = "1.0.41" diff --git a/client/telemetry/Cargo.toml b/client/telemetry/Cargo.toml index 4c9cc05b07fec..a050b5e5eac84 100644 --- a/client/telemetry/Cargo.toml +++ b/client/telemetry/Cargo.toml @@ -18,7 +18,7 @@ parking_lot = "0.10.0" futures = "0.3.4" futures-timer = "3.0.1" wasm-timer = "0.2.0" -libp2p = { version = "0.23.0", default-features = false, features = ["dns", "tcp-async-std", "wasm-ext", "websocket"] } +libp2p = { version = "0.24.0", default-features = false, features = ["dns", "tcp-async-std", "wasm-ext", "websocket"] } log = "0.4.8" pin-project = "0.4.6" rand = "0.7.2" diff --git a/primitives/consensus/common/Cargo.toml b/primitives/consensus/common/Cargo.toml index d8c5073274d75..ec47af9232a48 100644 --- a/primitives/consensus/common/Cargo.toml +++ b/primitives/consensus/common/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] derive_more = "0.99.2" -libp2p = { version = "0.23.0", default-features = false } +libp2p = { version = "0.24.0", default-features = false } log = "0.4.8" sp-core = { path= "../../core", version = "2.0.0-rc5"} sp-inherents = { version = "2.0.0-rc5", path = "../../inherents" } diff --git a/utils/browser/Cargo.toml b/utils/browser/Cargo.toml index 20e04148fafc1..78c1d76edaf6a 100644 --- a/utils/browser/Cargo.toml +++ b/utils/browser/Cargo.toml @@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"] futures = { version = "0.3", features = ["compat"] } futures01 = { package = "futures", version = "0.1.29" } log = "0.4.8" -libp2p-wasm-ext = { version = "0.20", features = ["websocket"] } +libp2p-wasm-ext = { version = "0.21", features = ["websocket"] } console_error_panic_hook = "0.1.6" console_log = "0.1.2" js-sys = "0.3.34" From 77be2e82f1d4110ddece1bf12d25b3f2eaf3abca Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 19 Aug 2020 09:40:20 +0200 Subject: [PATCH 4/8] client/network/src/service: Handle ConnectionClosed returning Option --- client/network/src/service.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/client/network/src/service.rs b/client/network/src/service.rs index 713357772d417..bf4b4e2f561ec 100644 --- a/client/network/src/service.rs +++ b/client/network/src/service.rs @@ -1610,18 +1610,19 @@ impl Future for NetworkWorker { ConnectedPoint::Listener { .. } => "in", }; let reason = match cause { - ConnectionError::IO(_) => "transport-error", - ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( + Some(ConnectionError::IO(_)) => "transport-error", + Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( EitherError::A(EitherError::A(EitherError::B( - EitherError::A(PingFailure::Timeout)))))))) => "ping-timeout", - ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( + EitherError::A(PingFailure::Timeout))))))))) => "ping-timeout", + Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( EitherError::A(EitherError::A(EitherError::A( - NotifsHandlerError::Legacy(LegacyConnectionKillError)))))))) => "force-closed", - ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( + NotifsHandlerError::Legacy(LegacyConnectionKillError))))))))) => "force-closed", + Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A( EitherError::A(EitherError::A(EitherError::A( - NotifsHandlerError::SyncNotificationsClogged))))))) => "sync-notifications-clogged", - ConnectionError::Handler(NodeHandlerWrapperError::Handler(_)) => "protocol-error", - ConnectionError::Handler(NodeHandlerWrapperError::KeepAliveTimeout) => "keep-alive-timeout", + NotifsHandlerError::SyncNotificationsClogged)))))))) => "sync-notifications-clogged", + Some(ConnectionError::Handler(NodeHandlerWrapperError::Handler(_))) => "protocol-error", + Some(ConnectionError::Handler(NodeHandlerWrapperError::KeepAliveTimeout)) => "keep-alive-timeout", + None => "actively-closed", }; metrics.connections_closed_total.with_label_values(&[direction, reason]).inc(); From ad317879782f982cb4a4c76029a72b5b97e82bec Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 19 Aug 2020 16:58:48 +0200 Subject: [PATCH 5/8] Cargo.*: Test kad usize conversion --- Cargo.lock | 54 ++++++++++++++++++------------------------------------ Cargo.toml | 4 ++++ 2 files changed, 22 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3042ffee93792..6a4e8a739df5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2804,8 +2804,7 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c101edbb9c06955fd4085b77d2abc31cf3650134d77068b35c44967756ada8" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "atomic", "bytes 0.5.4", @@ -2837,8 +2836,7 @@ dependencies = [ [[package]] name = "libp2p-core" version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cea54ea4a846a7c47e4347db0fc7a4129dcb0fb57f07f57e473820edbfcbde" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "asn1_der", "bs58", @@ -2871,8 +2869,7 @@ dependencies = [ [[package]] name = "libp2p-core-derive" version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f753d9324cd3ec14bf04b8a8cd0d269c87f294153d6bf2a84497a63a5ad22213" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "quote", "syn", @@ -2881,8 +2878,7 @@ dependencies = [ [[package]] name = "libp2p-dns" version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce8769cfe677a567d2677dc02a9e5be27a24acf1ff78a59cef425caae009a6a" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2892,8 +2888,7 @@ dependencies = [ [[package]] name = "libp2p-identify" version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41efcb5b521b65d2c45432a244ce6427cdd3649228cd192f397d1fa67682aef2" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2908,8 +2903,7 @@ dependencies = [ [[package]] name = "libp2p-kad" version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10e775dca5c51e016f4c2af1b321fed0b0557eb7ded7b2cd60081ec5278a5b52" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "arrayvec 0.5.1", "bytes 0.5.4", @@ -2935,8 +2929,7 @@ dependencies = [ [[package]] name = "libp2p-mdns" version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fe5614c2c5af74ef5870aad0fce73c9e4707716c4ee7cdf06cf9a0376d3815" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "async-std", "data-encoding", @@ -2957,8 +2950,7 @@ dependencies = [ [[package]] name = "libp2p-mplex" version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9e79541e71590846f773efce1b6d0538804992ee54ff2f407e05d63a9ddc23" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "bytes 0.5.4", "fnv", @@ -2973,8 +2965,7 @@ dependencies = [ [[package]] name = "libp2p-noise" version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0beba6459d06153f5f8e23da3df1d2183798b1f457c7c9468ff99760bcbcc60b" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "bytes 0.5.4", "curve25519-dalek", @@ -2995,8 +2986,7 @@ dependencies = [ [[package]] name = "libp2p-ping" version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670261ef938567b614746b078e049b03b55617538a8d415071c518f97532d043" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -3010,8 +3000,7 @@ dependencies = [ [[package]] name = "libp2p-secio" version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a04b320cc0394554e8d0adca21f4efd9f8c2da4930211d92e411a19a4dfd769e" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "aes-ctr", "ctr", @@ -3040,8 +3029,7 @@ dependencies = [ [[package]] name = "libp2p-swarm" version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e4a7e64156e9d1a2daae36b5d791f057b9c53c9364a8e75f7f9848b54f9d68" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -3055,8 +3043,7 @@ dependencies = [ [[package]] name = "libp2p-tcp" version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f65400ccfbbf9a356733bceca6c519c9db0deb5fbcc0b81f89837c4cd53997" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "async-std", "futures 0.3.5", @@ -3071,8 +3058,7 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2f7b06d80d036ac5763a811185b7fe6951ad71c00544b17cc378a9069bb7c2" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "futures 0.3.5", "js-sys", @@ -3085,8 +3071,7 @@ dependencies = [ [[package]] name = "libp2p-websocket" version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b350db65cf0a7c83a539a596ea261caae1552c0df2245df0f916ed2fd04572" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "async-tls", "either", @@ -3105,8 +3090,7 @@ dependencies = [ [[package]] name = "libp2p-yamux" version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3969ead4ce530efb6f304623924245caf410f3b0b0139bd7007f205933788aa" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -3443,8 +3427,7 @@ checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce" [[package]] name = "multistream-select" version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9157e87afbc2ef0d84cc0345423d715f445edde00141c93721c162de35a05e5" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "bytes 0.5.4", "futures 0.3.5", @@ -4968,8 +4951,7 @@ dependencies = [ [[package]] name = "parity-multiaddr" version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc20af3143a62c16e7c9e92ea5c6ae49f7d271d97d4d8fe73afc28f0514a3d0f" +source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" dependencies = [ "arrayref", "bs58", diff --git a/Cargo.toml b/Cargo.toml index f22e3427a70a1..44305eb3e92e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -256,3 +256,7 @@ zeroize = { opt-level = 3 } [profile.release] # Substrate runtime requires unwinding. panic = "unwind" + +[patch.crates-io] +libp2p = {git = 'https://github.com/mxinden/rust-libp2p', branch = 'kad-into-usize'} +libp2p-wasm-ext = {git = 'https://github.com/mxinden/rust-libp2p', branch = 'kad-into-usize'} From b2d4107e41ef7b5746b5ab922458ce3767150114 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 19 Aug 2020 17:51:20 +0200 Subject: [PATCH 6/8] Revert "Cargo.*: Test kad usize conversion" This reverts commit ad317879782f982cb4a4c76029a72b5b97e82bec. --- Cargo.lock | 54 ++++++++++++++++++++++++++++++++++++------------------ Cargo.toml | 4 ---- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a4e8a739df5f..3042ffee93792 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2804,7 +2804,8 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" version = "0.24.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76c101edbb9c06955fd4085b77d2abc31cf3650134d77068b35c44967756ada8" dependencies = [ "atomic", "bytes 0.5.4", @@ -2836,7 +2837,8 @@ dependencies = [ [[package]] name = "libp2p-core" version = "0.21.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17cea54ea4a846a7c47e4347db0fc7a4129dcb0fb57f07f57e473820edbfcbde" dependencies = [ "asn1_der", "bs58", @@ -2869,7 +2871,8 @@ dependencies = [ [[package]] name = "libp2p-core-derive" version = "0.20.2" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f753d9324cd3ec14bf04b8a8cd0d269c87f294153d6bf2a84497a63a5ad22213" dependencies = [ "quote", "syn", @@ -2878,7 +2881,8 @@ dependencies = [ [[package]] name = "libp2p-dns" version = "0.21.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fce8769cfe677a567d2677dc02a9e5be27a24acf1ff78a59cef425caae009a6a" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2888,7 +2892,8 @@ dependencies = [ [[package]] name = "libp2p-identify" version = "0.21.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41efcb5b521b65d2c45432a244ce6427cdd3649228cd192f397d1fa67682aef2" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2903,7 +2908,8 @@ dependencies = [ [[package]] name = "libp2p-kad" version = "0.22.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10e775dca5c51e016f4c2af1b321fed0b0557eb7ded7b2cd60081ec5278a5b52" dependencies = [ "arrayvec 0.5.1", "bytes 0.5.4", @@ -2929,7 +2935,8 @@ dependencies = [ [[package]] name = "libp2p-mdns" version = "0.21.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fe5614c2c5af74ef5870aad0fce73c9e4707716c4ee7cdf06cf9a0376d3815" dependencies = [ "async-std", "data-encoding", @@ -2950,7 +2957,8 @@ dependencies = [ [[package]] name = "libp2p-mplex" version = "0.21.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9e79541e71590846f773efce1b6d0538804992ee54ff2f407e05d63a9ddc23" dependencies = [ "bytes 0.5.4", "fnv", @@ -2965,7 +2973,8 @@ dependencies = [ [[package]] name = "libp2p-noise" version = "0.23.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beba6459d06153f5f8e23da3df1d2183798b1f457c7c9468ff99760bcbcc60b" dependencies = [ "bytes 0.5.4", "curve25519-dalek", @@ -2986,7 +2995,8 @@ dependencies = [ [[package]] name = "libp2p-ping" version = "0.21.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670261ef938567b614746b078e049b03b55617538a8d415071c518f97532d043" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -3000,7 +3010,8 @@ dependencies = [ [[package]] name = "libp2p-secio" version = "0.21.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a04b320cc0394554e8d0adca21f4efd9f8c2da4930211d92e411a19a4dfd769e" dependencies = [ "aes-ctr", "ctr", @@ -3029,7 +3040,8 @@ dependencies = [ [[package]] name = "libp2p-swarm" version = "0.21.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e4a7e64156e9d1a2daae36b5d791f057b9c53c9364a8e75f7f9848b54f9d68" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -3043,7 +3055,8 @@ dependencies = [ [[package]] name = "libp2p-tcp" version = "0.21.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f65400ccfbbf9a356733bceca6c519c9db0deb5fbcc0b81f89837c4cd53997" dependencies = [ "async-std", "futures 0.3.5", @@ -3058,7 +3071,8 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" version = "0.21.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2f7b06d80d036ac5763a811185b7fe6951ad71c00544b17cc378a9069bb7c2" dependencies = [ "futures 0.3.5", "js-sys", @@ -3071,7 +3085,8 @@ dependencies = [ [[package]] name = "libp2p-websocket" version = "0.22.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5b350db65cf0a7c83a539a596ea261caae1552c0df2245df0f916ed2fd04572" dependencies = [ "async-tls", "either", @@ -3090,7 +3105,8 @@ dependencies = [ [[package]] name = "libp2p-yamux" version = "0.21.0" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3969ead4ce530efb6f304623924245caf410f3b0b0139bd7007f205933788aa" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -3427,7 +3443,8 @@ checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce" [[package]] name = "multistream-select" version = "0.8.2" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9157e87afbc2ef0d84cc0345423d715f445edde00141c93721c162de35a05e5" dependencies = [ "bytes 0.5.4", "futures 0.3.5", @@ -4951,7 +4968,8 @@ dependencies = [ [[package]] name = "parity-multiaddr" version = "0.9.1" -source = "git+https://github.com/mxinden/rust-libp2p?branch=kad-into-usize#921aa9cd03a192d46f702c68674a7761f927d840" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc20af3143a62c16e7c9e92ea5c6ae49f7d271d97d4d8fe73afc28f0514a3d0f" dependencies = [ "arrayref", "bs58", diff --git a/Cargo.toml b/Cargo.toml index 44305eb3e92e7..f22e3427a70a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -256,7 +256,3 @@ zeroize = { opt-level = 3 } [profile.release] # Substrate runtime requires unwinding. panic = "unwind" - -[patch.crates-io] -libp2p = {git = 'https://github.com/mxinden/rust-libp2p', branch = 'kad-into-usize'} -libp2p-wasm-ext = {git = 'https://github.com/mxinden/rust-libp2p', branch = 'kad-into-usize'} From 380914ea527480f4dd9d8368cd3a3078367b8913 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Wed, 19 Aug 2020 17:56:09 +0200 Subject: [PATCH 7/8] Cargo.lock: Update to libp2p-kad v0.22.1 --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3042ffee93792..49e82640b4f26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2907,9 +2907,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10e775dca5c51e016f4c2af1b321fed0b0557eb7ded7b2cd60081ec5278a5b52" +checksum = "ca9b4ccc868863317af3f65eb241811ceadd971d133183040140f5496037e0ae" dependencies = [ "arrayvec 0.5.1", "bytes 0.5.4", From 1c49e0082fd48662474f2e290e2649f6a5933256 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Thu, 20 Aug 2020 13:06:24 +0200 Subject: [PATCH 8/8] client/cli/Cargo.toml: Update to libp2p 0.24.0 --- Cargo.lock | 460 +++++++++--------------------------------- client/cli/Cargo.toml | 2 +- 2 files changed, 92 insertions(+), 370 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f2f43d046355a..aa503e4f10e4c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2285,6 +2285,12 @@ dependencies = [ "proc-macro-hack", ] +[[package]] +name = "hex_fmt" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" + [[package]] name = "hmac" version = "0.7.1" @@ -2885,68 +2891,36 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0306a49ee6a89468f96089906f36b0eef82c988dcfc8acf3e2dcd6ad1c859f85" +checksum = "76c101edbb9c06955fd4085b77d2abc31cf3650134d77068b35c44967756ada8" dependencies = [ + "atomic", "bytes 0.5.6", "futures 0.3.5", "lazy_static", - "libp2p-core 0.20.1", + "libp2p-core", "libp2p-core-derive", "libp2p-deflate", - "libp2p-dns 0.20.0", + "libp2p-dns", "libp2p-floodsub", "libp2p-gossipsub", - "libp2p-identify 0.20.0", - "libp2p-kad 0.21.0", - "libp2p-mdns 0.20.0", - "libp2p-mplex 0.20.0", - "libp2p-noise 0.21.0", - "libp2p-ping 0.20.0", + "libp2p-identify", + "libp2p-kad", + "libp2p-mdns", + "libp2p-mplex", + "libp2p-noise", + "libp2p-ping", "libp2p-plaintext", "libp2p-pnet", "libp2p-request-response", - "libp2p-secio 0.20.0", - "libp2p-swarm 0.20.1", - "libp2p-tcp 0.20.0", + "libp2p-secio", + "libp2p-swarm", + "libp2p-tcp", "libp2p-uds", - "libp2p-wasm-ext 0.20.1", - "libp2p-websocket 0.21.1", - "libp2p-yamux 0.20.0", - "multihash", - "parity-multiaddr", - "parking_lot 0.10.2", - "pin-project", - "smallvec 1.4.1", - "wasm-timer", -] - -[[package]] -name = "libp2p" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c101edbb9c06955fd4085b77d2abc31cf3650134d77068b35c44967756ada8" -dependencies = [ - "atomic", - "bytes 0.5.6", - "futures 0.3.5", - "lazy_static", - "libp2p-core 0.21.0", - "libp2p-core-derive", - "libp2p-dns 0.21.0", - "libp2p-identify 0.21.0", - "libp2p-kad 0.22.1", - "libp2p-mdns 0.21.0", - "libp2p-mplex 0.21.0", - "libp2p-noise 0.23.0", - "libp2p-ping 0.21.0", - "libp2p-secio 0.21.0", - "libp2p-swarm 0.21.0", - "libp2p-tcp 0.21.0", - "libp2p-wasm-ext 0.21.0", - "libp2p-websocket 0.22.0", - "libp2p-yamux 0.21.0", + "libp2p-wasm-ext", + "libp2p-websocket", + "libp2p-yamux", "multihash", "parity-multiaddr", "parking_lot 0.10.2", @@ -2955,40 +2929,6 @@ dependencies = [ "wasm-timer", ] -[[package]] -name = "libp2p-core" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a694fd76d7c33a45a0e6e1525e9b9b5d11127c9c94e560ac0f8abba54ed80af" -dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "either", - "fnv", - "futures 0.3.5", - "futures-timer 3.0.2", - "lazy_static", - "libsecp256k1", - "log", - "multihash", - "multistream-select", - "parity-multiaddr", - "parking_lot 0.10.2", - "pin-project", - "prost", - "prost-build", - "rand 0.7.3", - "ring", - "rw-stream-sink", - "sha2 0.8.2", - "smallvec 1.4.1", - "thiserror", - "unsigned-varint 0.4.0", - "void", - "zeroize", -] - [[package]] name = "libp2p-core" version = "0.21.0" @@ -3035,24 +2975,13 @@ dependencies = [ [[package]] name = "libp2p-deflate" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abeff37fa533fead23fc71b14ed0a2aced36c0c65c3d0078aff07821fb71029e" +checksum = "bc6174d6addc9cc5fd84af7099480774035dd1a7cdf48dd31b23dea45cf57638" dependencies = [ "flate2", "futures 0.3.5", - "libp2p-core 0.20.1", -] - -[[package]] -name = "libp2p-dns" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751924b6b98e350005e0b87a822beb246792a3fb878c684e088f866158120ac" -dependencies = [ - "futures 0.3.5", - "libp2p-core 0.20.1", - "log", + "libp2p-core", ] [[package]] @@ -3062,21 +2991,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fce8769cfe677a567d2677dc02a9e5be27a24acf1ff78a59cef425caae009a6a" dependencies = [ "futures 0.3.5", - "libp2p-core 0.21.0", + "libp2p-core", "log", ] [[package]] name = "libp2p-floodsub" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d4f310a02441b681075037ffb41649ee8836619559311b801ef3d5cdbe14cf" +checksum = "2f2342965ac7ea4b85f4df5288089796421f9297ba4020dc9692f4ef728590dc" dependencies = [ "cuckoofilter", "fnv", "futures 0.3.5", - "libp2p-core 0.20.1", - "libp2p-swarm 0.20.1", + "libp2p-core", + "libp2p-swarm", "prost", "prost-build", "rand 0.7.3", @@ -3085,9 +3014,9 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a70f76b6c53ae9c97c234498c799802e43f91766bcf4a2a1f94f9339617d713b" +checksum = "0828b4f0c76c2edc68da574e391ce981bac5316d65785cddfe8c273d4c9bd4bb" dependencies = [ "base64 0.11.0", "byteorder 1.3.4", @@ -3095,10 +3024,11 @@ dependencies = [ "fnv", "futures 0.3.5", "futures_codec", - "libp2p-core 0.20.1", - "libp2p-swarm 0.20.1", + "hex_fmt", + "libp2p-core", + "libp2p-swarm", "log", - "lru 0.4.3", + "lru_time_cache", "prost", "prost-build", "rand 0.7.3", @@ -3108,22 +3038,6 @@ dependencies = [ "wasm-timer", ] -[[package]] -name = "libp2p-identify" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912c00a7bf67e0e765daf0cc37e08f675ea26aba3d6d1fbfaee81f19a4c23049" -dependencies = [ - "futures 0.3.5", - "libp2p-core 0.20.1", - "libp2p-swarm 0.20.1", - "log", - "prost", - "prost-build", - "smallvec 1.4.1", - "wasm-timer", -] - [[package]] name = "libp2p-identify" version = "0.21.0" @@ -3131,39 +3045,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41efcb5b521b65d2c45432a244ce6427cdd3649228cd192f397d1fa67682aef2" dependencies = [ "futures 0.3.5", - "libp2p-core 0.21.0", - "libp2p-swarm 0.21.0", - "log", - "prost", - "prost-build", - "smallvec 1.4.1", - "wasm-timer", -] - -[[package]] -name = "libp2p-kad" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44ed3a4c8111c570ab2bffb30c6353178d7603ce3787e3c5f2493c8d3d16d1f0" -dependencies = [ - "arrayvec 0.5.1", - "bytes 0.5.6", - "either", - "fnv", - "futures 0.3.5", - "futures_codec", - "libp2p-core 0.20.1", - "libp2p-swarm 0.20.1", + "libp2p-core", + "libp2p-swarm", "log", - "multihash", "prost", "prost-build", - "rand 0.7.3", - "sha2 0.8.2", "smallvec 1.4.1", - "uint", - "unsigned-varint 0.4.0", - "void", "wasm-timer", ] @@ -3179,8 +3066,8 @@ dependencies = [ "fnv", "futures 0.3.5", "futures_codec", - "libp2p-core 0.21.0", - "libp2p-swarm 0.21.0", + "libp2p-core", + "libp2p-swarm", "log", "multihash", "prost", @@ -3194,28 +3081,6 @@ dependencies = [ "wasm-timer", ] -[[package]] -name = "libp2p-mdns" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd004c668160fd922f7268b2cd1e4550ff69165d9c744e9eb5770086eb753d02" -dependencies = [ - "async-std", - "data-encoding", - "dns-parser", - "either", - "futures 0.3.5", - "lazy_static", - "libp2p-core 0.20.1", - "libp2p-swarm 0.20.1", - "log", - "net2", - "rand 0.7.3", - "smallvec 1.4.1", - "void", - "wasm-timer", -] - [[package]] name = "libp2p-mdns" version = "0.21.0" @@ -3228,8 +3093,8 @@ dependencies = [ "either", "futures 0.3.5", "lazy_static", - "libp2p-core 0.21.0", - "libp2p-swarm 0.21.0", + "libp2p-core", + "libp2p-swarm", "log", "net2", "rand 0.7.3", @@ -3238,22 +3103,6 @@ dependencies = [ "wasm-timer", ] -[[package]] -name = "libp2p-mplex" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ae0ffacd30f073f96cd518b2c9cd2cb18ac27c3d136a4b23cf1af99f33e541" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures 0.3.5", - "futures_codec", - "libp2p-core 0.20.1", - "log", - "parking_lot 0.10.2", - "unsigned-varint 0.4.0", -] - [[package]] name = "libp2p-mplex" version = "0.21.0" @@ -3264,34 +3113,12 @@ dependencies = [ "fnv", "futures 0.3.5", "futures_codec", - "libp2p-core 0.21.0", + "libp2p-core", "log", "parking_lot 0.10.2", "unsigned-varint 0.4.0", ] -[[package]] -name = "libp2p-noise" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f353f8966bbaaf7456535fffd3f366f153148773a0cf04b2ec3860955cb720e" -dependencies = [ - "bytes 0.5.6", - "curve25519-dalek", - "futures 0.3.5", - "lazy_static", - "libp2p-core 0.20.1", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "sha2 0.8.2", - "snow", - "static_assertions", - "x25519-dalek", - "zeroize", -] - [[package]] name = "libp2p-noise" version = "0.23.0" @@ -3302,7 +3129,7 @@ dependencies = [ "curve25519-dalek", "futures 0.3.5", "lazy_static", - "libp2p-core 0.21.0", + "libp2p-core", "log", "prost", "prost-build", @@ -3314,21 +3141,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "libp2p-ping" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70130cf130e4ba6dc177366e72dd9f86f9e3588fa1a0c4145247e676f16affad" -dependencies = [ - "futures 0.3.5", - "libp2p-core 0.20.1", - "libp2p-swarm 0.20.1", - "log", - "rand 0.7.3", - "void", - "wasm-timer", -] - [[package]] name = "libp2p-ping" version = "0.21.0" @@ -3336,8 +3148,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "670261ef938567b614746b078e049b03b55617538a8d415071c518f97532d043" dependencies = [ "futures 0.3.5", - "libp2p-core 0.21.0", - "libp2p-swarm 0.21.0", + "libp2p-core", + "libp2p-swarm", "log", "rand 0.7.3", "void", @@ -3346,14 +3158,14 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f0308a97f6fdd37a2bc388070e471c3ce9d92aa45c99d75c87c2dc5d5cac96" +checksum = "b3a61dfd53d1264ddff1206e4827193efaa72bab27782dfcd63c0dec120a1875" dependencies = [ "bytes 0.5.6", "futures 0.3.5", "futures_codec", - "libp2p-core 0.20.1", + "libp2p-core", "log", "prost", "prost-build", @@ -3378,46 +3190,19 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f48682b48a96545a323edd150c1d64fc1e250240bba02866e9f902e3dc032a9" +checksum = "4af0de0e56a11d46c5191a61019733b5618dc955c0a36f82866bb6d5d81a7f8f" dependencies = [ "async-trait", "futures 0.3.5", - "libp2p-core 0.20.1", - "libp2p-swarm 0.20.1", - "smallvec 1.4.1", - "wasm-timer", -] - -[[package]] -name = "libp2p-secio" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ff43513c383f7cdab2736eb98465fc4c5dd5d1988df89749dc8a68950349d56" -dependencies = [ - "aes-ctr", - "ctr", - "futures 0.3.5", - "hmac", - "js-sys", - "lazy_static", - "libp2p-core 0.20.1", + "libp2p-core", + "libp2p-swarm", "log", - "parity-send-wrapper", - "pin-project", - "prost", - "prost-build", - "quicksink", + "lru 0.6.0", "rand 0.7.3", - "ring", - "rw-stream-sink", - "sha2 0.8.2", - "static_assertions", - "twofish", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", + "smallvec 1.4.1", + "wasm-timer", ] [[package]] @@ -3432,7 +3217,7 @@ dependencies = [ "hmac", "js-sys", "lazy_static", - "libp2p-core 0.21.0", + "libp2p-core", "log", "parity-send-wrapper", "pin-project", @@ -3450,21 +3235,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "libp2p-swarm" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88d5e2a090a2aadf042cd33484e2f015c6dab212567406a59deece5dedbd133" -dependencies = [ - "futures 0.3.5", - "libp2p-core 0.20.1", - "log", - "rand 0.7.3", - "smallvec 1.4.1", - "void", - "wasm-timer", -] - [[package]] name = "libp2p-swarm" version = "0.21.0" @@ -3472,7 +3242,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57e4a7e64156e9d1a2daae36b5d791f057b9c53c9364a8e75f7f9848b54f9d68" dependencies = [ "futures 0.3.5", - "libp2p-core 0.21.0", + "libp2p-core", "log", "rand 0.7.3", "smallvec 1.4.1", @@ -3480,22 +3250,6 @@ dependencies = [ "wasm-timer", ] -[[package]] -name = "libp2p-tcp" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1fa2bbad054020cb875546a577a66a65a5bf42eff55ed5265f92ffee3cc052" -dependencies = [ - "async-std", - "futures 0.3.5", - "futures-timer 3.0.2", - "get_if_addrs", - "ipnet", - "libp2p-core 0.20.1", - "log", - "socket2", -] - [[package]] name = "libp2p-tcp" version = "0.21.0" @@ -3507,37 +3261,23 @@ dependencies = [ "futures-timer 3.0.2", "get_if_addrs", "ipnet", - "libp2p-core 0.21.0", + "libp2p-core", "log", "socket2", ] [[package]] name = "libp2p-uds" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9db9fce9e3588c3118475d9ca761c5c133b639a624a7341e2a61e4b28c376b8" +checksum = "95bc8b0ca1dda4cccb1bb156d47a32e45cfa447ef18f737209f014a63f94a4a2" dependencies = [ "async-std", "futures 0.3.5", - "libp2p-core 0.20.1", + "libp2p-core", "log", ] -[[package]] -name = "libp2p-wasm-ext" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0feb99e32fea20ffb1bbf56a6fb2614bff7325ff44a515728385170b3420d2c3" -dependencies = [ - "futures 0.3.5", - "js-sys", - "libp2p-core 0.20.1", - "parity-send-wrapper", - "wasm-bindgen", - "wasm-bindgen-futures", -] - [[package]] name = "libp2p-wasm-ext" version = "0.21.0" @@ -3546,32 +3286,12 @@ checksum = "0f2f7b06d80d036ac5763a811185b7fe6951ad71c00544b17cc378a9069bb7c2" dependencies = [ "futures 0.3.5", "js-sys", - "libp2p-core 0.21.0", + "libp2p-core", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", ] -[[package]] -name = "libp2p-websocket" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046a5201f6e471f22b22b394e4d084269ed1e28cf7300f7b49874385db84c7bd" -dependencies = [ - "async-tls", - "either", - "futures 0.3.5", - "libp2p-core 0.20.1", - "log", - "quicksink", - "rustls", - "rw-stream-sink", - "soketto", - "url 2.1.1", - "webpki", - "webpki-roots 0.18.0", -] - [[package]] name = "libp2p-websocket" version = "0.22.0" @@ -3581,7 +3301,7 @@ dependencies = [ "async-tls", "either", "futures 0.3.5", - "libp2p-core 0.21.0", + "libp2p-core", "log", "quicksink", "rustls", @@ -3592,19 +3312,6 @@ dependencies = [ "webpki-roots 0.18.0", ] -[[package]] -name = "libp2p-yamux" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ae9bf2f7d8a4be9c7e9b61df9de9dc1bd66419d669098f22f81f8d9571029a" -dependencies = [ - "futures 0.3.5", - "libp2p-core 0.20.1", - "parking_lot 0.10.2", - "thiserror", - "yamux", -] - [[package]] name = "libp2p-yamux" version = "0.21.0" @@ -3612,7 +3319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3969ead4ce530efb6f304623924245caf410f3b0b0139bd7007f205933788aa" dependencies = [ "futures 0.3.5", - "libp2p-core 0.21.0", + "libp2p-core", "parking_lot 0.10.2", "thiserror", "yamux", @@ -3747,6 +3454,21 @@ dependencies = [ "hashbrown 0.6.3", ] +[[package]] +name = "lru" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "111b945ac72ec09eb7bc62a0fbdc3cc6e80555a7245f52a69d3921a75b53b153" +dependencies = [ + "hashbrown 0.8.1", +] + +[[package]] +name = "lru_time_cache" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb241df5c4caeb888755363fc95f8a896618dc0d435e9e775f7930cb099beab" + [[package]] name = "mach" version = "0.3.2" @@ -4061,7 +3783,7 @@ dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", "jsonrpc-core", - "libp2p 0.24.0", + "libp2p", "node-cli", "sc-rpc-api", "serde", @@ -6635,7 +6357,7 @@ dependencies = [ "env_logger", "futures 0.3.5", "futures-timer 3.0.2", - "libp2p 0.24.0", + "libp2p", "log", "parity-scale-codec", "prost", @@ -6739,7 +6461,7 @@ dependencies = [ "futures 0.3.5", "hex", "lazy_static", - "libp2p 0.22.0", + "libp2p", "log", "names", "nix", @@ -7305,7 +7027,7 @@ dependencies = [ "futures_codec", "hex", "ip_network", - "libp2p 0.24.0", + "libp2p", "linked-hash-map", "linked_hash_set", "log", @@ -7352,7 +7074,7 @@ dependencies = [ "async-std", "futures 0.3.5", "futures-timer 3.0.2", - "libp2p 0.24.0", + "libp2p", "log", "lru 0.4.3", "quickcheck", @@ -7370,7 +7092,7 @@ dependencies = [ "env_logger", "futures 0.3.5", "futures-timer 3.0.2", - "libp2p 0.24.0", + "libp2p", "log", "parking_lot 0.10.2", "rand 0.7.3", @@ -7427,7 +7149,7 @@ name = "sc-peerset" version = "2.0.0-rc5" dependencies = [ "futures 0.3.5", - "libp2p 0.24.0", + "libp2p", "log", "rand 0.7.3", "serde_json", @@ -7655,7 +7377,7 @@ version = "2.0.0-rc5" dependencies = [ "futures 0.3.5", "futures-timer 3.0.2", - "libp2p 0.24.0", + "libp2p", "log", "parking_lot 0.10.2", "pin-project", @@ -8324,7 +8046,7 @@ dependencies = [ "derive_more", "futures 0.3.5", "futures-timer 3.0.2", - "libp2p 0.24.0", + "libp2p", "log", "parity-scale-codec", "parking_lot 0.10.2", @@ -9021,7 +8743,7 @@ dependencies = [ "futures-timer 3.0.2", "js-sys", "kvdb-web", - "libp2p-wasm-ext 0.21.0", + "libp2p-wasm-ext", "log", "rand 0.6.5", "rand 0.7.3", diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 2fe1b30ab14d6..666746cc81b22 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -23,7 +23,7 @@ lazy_static = "1.4.0" tokio = { version = "0.2.21", features = [ "signal", "rt-core", "rt-threaded", "blocking" ] } futures = "0.3.4" fdlimit = "0.1.4" -libp2p = "0.22" +libp2p = "0.24.0" parity-scale-codec = "1.3.0" hex = "0.4.2" rand = "0.7.3"