Update to libp2p 0.18 (#5602)

* Update to libp2p 0.18

* Update Cargo.lock

* Also bump in browser-utils
This commit is contained in:
Pierre Krieger
2020-04-09 18:41:21 +02:00
committed by GitHub
parent 98b2f46a89
commit ac9a852028
11 changed files with 74 additions and 96 deletions
@@ -18,7 +18,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.17.0", default-features = false, features = ["secp256k1", "libp2p-websocket"] }
libp2p = { version = "0.18.0", default-features = false, features = ["secp256k1", "libp2p-websocket"] }
log = "0.4.8"
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0-alpha.5"}
prost = "0.6.1"
+1 -1
View File
@@ -13,7 +13,7 @@ documentation = "https://docs.rs/sc-network-gossip"
[dependencies]
futures = "0.3.4"
futures-timer = "3.0.1"
libp2p = { version = "0.17.0", default-features = false, features = ["websocket"] }
libp2p = { version = "0.18.0", default-features = false, features = ["websocket"] }
log = "0.4.8"
lru = "0.4.3"
sc-network = { version = "0.8.0-alpha.5", path = "../network" }
+2 -2
View File
@@ -59,7 +59,7 @@ void = "1.0.2"
zeroize = "1.0.0"
[dependencies.libp2p]
version = "0.17.0"
version = "0.18.0"
default-features = false
features = ["websocket", "kad", "mdns", "ping", "identify", "mplex", "yamux", "noise"]
@@ -67,7 +67,7 @@ features = ["websocket", "kad", "mdns", "ping", "identify", "mplex", "yamux", "n
async-std = "1.5"
assert_matches = "1.3"
env_logger = "0.7.0"
libp2p = { version = "0.17.0", default-features = false, features = ["secio"] }
libp2p = { version = "0.18.0", default-features = false, features = ["secio"] }
quickcheck = "0.9.0"
rand = "0.7.2"
sp-keyring = { version = "2.0.0-alpha.5", path = "../../primitives/keyring" }
+2 -2
View File
@@ -1133,8 +1133,6 @@ impl<B: BlockT + 'static, H: ExHashT> Future for NetworkWorker<B, H> {
match cause {
ConnectionError::IO(_) =>
metrics.connections_closed_total.with_label_values(&["transport-error"]).inc(),
ConnectionError::ConnectionLimit(_) =>
metrics.connections_closed_total.with_label_values(&["limit-reached"]).inc(),
ConnectionError::Handler(NodeHandlerWrapperError::Handler(EitherError::A(EitherError::A(
EitherError::A(EitherError::B(EitherError::A(PingFailure::Timeout))))))) =>
metrics.connections_closed_total.with_label_values(&["ping-timeout"]).inc(),
@@ -1180,6 +1178,8 @@ impl<B: BlockT + 'static, H: ExHashT> Future for NetworkWorker<B, H> {
if let Some(metrics) = this.metrics.as_ref() {
match error {
PendingConnectionError::ConnectionLimit(_) =>
metrics.pending_connections_errors_total.with_label_values(&["limit-reached"]).inc(),
PendingConnectionError::InvalidPeerId =>
metrics.pending_connections_errors_total.with_label_values(&["invalid-peer-id"]).inc(),
PendingConnectionError::Transport(_) | PendingConnectionError::IO(_) =>
+1 -1
View File
@@ -16,7 +16,7 @@ parking_lot = "0.10.0"
futures = "0.3.4"
futures-timer = "3.0.1"
rand = "0.7.2"
libp2p = { version = "0.17.0", default-features = false, features = ["libp2p-websocket"] }
libp2p = { version = "0.18.0", default-features = false, features = ["libp2p-websocket"] }
sp-consensus = { version = "0.8.0-alpha.5", path = "../../../primitives/consensus/common" }
sc-client = { version = "0.8.0-alpha.5", path = "../../" }
sc-client-api = { version = "2.0.0-alpha.5", path = "../../api" }
+1 -1
View File
@@ -12,7 +12,7 @@ documentation = "https://docs.rs/sc-peerset"
[dependencies]
futures = "0.3.4"
libp2p = { version = "0.17.0", default-features = false }
libp2p = { version = "0.18.0", default-features = false }
sp-utils = { version = "2.0.0-alpha.5", path = "../../primitives/utils"}
log = "0.4.8"
serde_json = "1.0.41"
+1 -1
View File
@@ -16,7 +16,7 @@ parking_lot = "0.10.0"
futures = "0.3.4"
futures-timer = "3.0.1"
wasm-timer = "0.2.0"
libp2p = { version = "0.17.0", default-features = false, features = ["websocket", "wasm-ext", "tcp", "dns"] }
libp2p = { version = "0.18.0", default-features = false, features = ["websocket", "wasm-ext", "tcp", "dns"] }
log = "0.4.8"
pin-project = "0.4.6"
rand = "0.7.2"