From bcd2f274f979a6b6d038cfc56ad63e9051d9221c Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 19 Jul 2018 15:22:07 +0200 Subject: [PATCH] Network improvements (#374) * Ping active connections * Bump rust-libp2p * Deny connection attempts if we're already connected * Properly check max_peers against custom connections * Fix set_until not immediately called * Clean up unusued connections and stop pinging them * Disconnect Kad connections after 20 seconds of inactivity --- substrate/Cargo.lock | 272 +++++++++--------- substrate/substrate/network-libp2p/Cargo.toml | 2 +- .../network-libp2p/src/network_state.rs | 90 ++++-- .../substrate/network-libp2p/src/service.rs | 223 +++++++++++--- .../substrate/network-libp2p/src/transport.rs | 2 +- 5 files changed, 386 insertions(+), 203 deletions(-) diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock index c4d04d2aa5..02df3a1450 100644 --- a/substrate/Cargo.lock +++ b/substrate/Cargo.lock @@ -252,17 +252,17 @@ dependencies = [ [[package]] name = "cid" version = "0.2.3" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "integer-encoding 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "multibase 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", ] [[package]] name = "circular-buffer" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "smallvec 0.6.0 (git+https://github.com/Vurich/rust-smallvec.git?branch=array-zero)", ] @@ -409,7 +409,7 @@ dependencies = [ [[package]] name = "datastore" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "base64 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "chashmap 2.2.1 (git+https://github.com/redox-os/tfs)", @@ -475,7 +475,7 @@ version = "0.1.0" dependencies = [ "pretty_assertions 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-primitives 0.1.0", "substrate-runtime-primitives 0.1.0", @@ -493,7 +493,7 @@ dependencies = [ "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 0.1.0", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-keyring 0.1.0", "substrate-primitives 0.1.0", @@ -699,7 +699,7 @@ dependencies = [ "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -992,7 +992,7 @@ dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1148,26 +1148,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libp2p" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-dns 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-floodsub 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-kad 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-mplex 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-ratelimit 0.1.1 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-relay 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-secio 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-tcp-transport 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-transport-timeout 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-websocket 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-yamux 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-dns 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-floodsub 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-kad 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-mplex 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-ratelimit 0.1.1 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-relay 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-secio 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-tcp-transport 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-transport-timeout 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-websocket 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-yamux 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "stdweb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1177,16 +1177,16 @@ dependencies = [ [[package]] name = "libp2p-core" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "bs58 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 1.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1197,12 +1197,12 @@ dependencies = [ [[package]] name = "libp2p-dns" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "tokio-dns-unofficial 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1210,127 +1210,127 @@ dependencies = [ [[package]] name = "libp2p-floodsub" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "bs58 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", ] [[package]] name = "libp2p-identify" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf-codegen-pure 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", ] [[package]] name = "libp2p-kad" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "bigint 4.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", ] [[package]] name = "libp2p-mplex" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "circular-buffer 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "circular-buffer 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "futures-mutex 0.3.0 (git+https://github.com/paritytech/futures-mutex)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", ] [[package]] name = "libp2p-peerstore" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "bs58 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-ping" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-ratelimit" version = "0.1.1" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "aio-limited 0.1.0 (git+https://github.com/paritytech/aio-limited.git)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1339,37 +1339,37 @@ dependencies = [ [[package]] name = "libp2p-relay" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "protobuf 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", ] [[package]] name = "libp2p-secio" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "asn1_der 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "eth-secp256k1 0.5.7 (git+https://github.com/paritytech/rust-secp256k1)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf-codegen-pure 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1377,12 +1377,12 @@ dependencies = [ [[package]] name = "libp2p-tcp-transport" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1390,10 +1390,10 @@ dependencies = [ [[package]] name = "libp2p-transport-timeout" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1401,13 +1401,13 @@ dependencies = [ [[package]] name = "libp2p-websocket" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", - "rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", + "rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "stdweb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.20.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1416,11 +1416,11 @@ dependencies = [ [[package]] name = "libp2p-yamux" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "yamux 0.1.0 (git+https://github.com/paritytech/yamux)", @@ -1556,10 +1556,10 @@ dependencies = [ [[package]] name = "multiaddr" version = "0.3.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cid 0.2.3 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "cid 0.2.3 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "integer-encoding 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1574,7 +1574,7 @@ dependencies = [ [[package]] name = "multihash" version = "0.8.1-pre" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "sha1 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1584,14 +1584,14 @@ dependencies = [ [[package]] name = "multistream-select" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", ] [[package]] @@ -1966,7 +1966,7 @@ version = "0.1.0" dependencies = [ "pretty_assertions 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-primitives 0.1.0", "substrate-runtime-primitives 0.1.0", @@ -1984,7 +1984,7 @@ dependencies = [ "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 0.1.0", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-keyring 0.1.0", "substrate-primitives 0.1.0", @@ -2388,7 +2388,7 @@ dependencies = [ [[package]] name = "rw-stream-sink" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2466,7 +2466,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.64" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2716,7 +2716,7 @@ dependencies = [ "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-primitives 0.1.0", "substrate-runtime-io 0.1.0", @@ -2738,7 +2738,7 @@ dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "transaction-pool 1.12.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2761,7 +2761,7 @@ dependencies = [ "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", "subtle 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2818,7 +2818,7 @@ dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "ipnetwork 0.12.8 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)", + "libp2p 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2839,7 +2839,7 @@ dependencies = [ "pretty_assertions 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.0.0 (git+https://github.com/rphmeier/rustc-hex.git)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-runtime-std 0.1.0", "substrate-serializer 0.1.0", @@ -2889,7 +2889,7 @@ version = "0.1.0" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-primitives 0.1.0", "substrate-runtime-io 0.1.0", @@ -2920,7 +2920,7 @@ dependencies = [ "integer-sqrt 0.1.0 (git+https://github.com/paritytech/integer-sqrt-rs.git)", "safe-mix 0.1.0", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-keyring 0.1.0", "substrate-primitives 0.1.0", @@ -2943,7 +2943,7 @@ dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 0.1.0", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-primitives 0.1.0", "substrate-runtime-consensus 0.1.0", @@ -2963,7 +2963,7 @@ version = "0.1.0" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-primitives 0.1.0", "substrate-runtime-consensus 0.1.0", @@ -2999,7 +2999,7 @@ dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-primitives 0.1.0", @@ -3028,7 +3028,7 @@ dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 0.1.0", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-keyring 0.1.0", "substrate-primitives 0.1.0", @@ -3048,7 +3048,7 @@ dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 0.1.0", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-keyring 0.1.0", "substrate-primitives 0.1.0", @@ -3081,7 +3081,7 @@ dependencies = [ "ed25519 0.1.0", "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-primitives 0.1.0", "substrate-runtime-io 0.1.0", @@ -3095,7 +3095,7 @@ dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "safe-mix 0.1.0", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-primitives 0.1.0", "substrate-runtime-io 0.1.0", @@ -3110,7 +3110,7 @@ version = "0.1.0" dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-primitives 0.1.0", "substrate-runtime-consensus 0.1.0", @@ -3126,7 +3126,7 @@ name = "substrate-runtime-version" version = "0.1.0" dependencies = [ "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-runtime-std 0.1.0", "substrate-runtime-support 0.1.0", @@ -3151,7 +3151,7 @@ dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-client 0.1.0", @@ -3232,7 +3232,7 @@ dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-codec 0.1.0", "substrate-keyring 0.1.0", "substrate-primitives 0.1.0", @@ -3701,7 +3701,7 @@ dependencies = [ [[package]] name = "varint" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7#727e0e099b53a4032a7e2330994c819fe866add7" +source = "git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7#38c9238a74504a6149909eb80f73608f63ab46c7" dependencies = [ "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3737,7 +3737,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", "wabt-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3905,8 +3905,8 @@ dependencies = [ "checksum cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "405216fd8fe65f718daa7102ea808a946b6ce40c742998fbfd3463645552de18" "checksum chashmap 2.2.1 (git+https://github.com/redox-os/tfs)" = "" "checksum chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cce36c92cb605414e9b824f866f5babe0a0368e39ea07393b9b63cf3844c0e6" -"checksum cid 0.2.3 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum circular-buffer 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" +"checksum cid 0.2.3 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum circular-buffer 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" "checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "95470235c31c726d72bf2e1f421adc1e65b9d561bf5529612cbe1a72da1467b3" @@ -3923,7 +3923,7 @@ dependencies = [ "checksum crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d636a8b3bcc1b409d7ffd3facef8f21dcb4009626adbd0c5e6c4305c07253c7b" "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" "checksum ctrlc 1.1.1 (git+https://github.com/paritytech/rust-ctrlc.git)" = "" -"checksum datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" +"checksum datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" "checksum difference 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3304d19798a8e067e48d8e69b2c37f0b5e9b4e462504ad9e27e9f3fce02bba8" "checksum digest 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3cae2388d706b52f2f2f9afe280f9d768be36544bd71d1b8120cb34ea6450b55" "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" @@ -3994,22 +3994,22 @@ dependencies = [ "checksum lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e6412c5e2ad9584b0b8e979393122026cdd6d2a80b933f890dcd694ddbe73739" "checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" "checksum libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)" = "ac8ebf8343a981e2fa97042b14768f02ed3e1d602eac06cae6166df3c8ced206" -"checksum libp2p 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-dns 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-floodsub 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-kad 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-mplex 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-ratelimit 0.1.1 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-relay 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-secio 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-tcp-transport 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-transport-timeout 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-websocket 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum libp2p-yamux 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" +"checksum libp2p 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-dns 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-floodsub 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-kad 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-mplex 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-ratelimit 0.1.1 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-relay 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-secio 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-tcp-transport 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-transport-timeout 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-websocket 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum libp2p-yamux 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" "checksum linked-hash-map 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e" "checksum local-encoding 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1ceb20f39ff7ae42f3ff9795f3986b1daad821caaa1e1732a0944103a5a1a66" "checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54" @@ -4025,10 +4025,10 @@ dependencies = [ "checksum mime 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0b28683d0b09bbc20be1c9b3f6f24854efb1356ffcffee08ea3f6e65596e85fa" "checksum mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "6d771e3ef92d58a8da8df7d6976bfca9371ed1de6619d9d5a5ce5b1f29b85bfe" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" +"checksum multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" "checksum multibase 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b9c35dac080fd6e16a99924c8dfdef0af89d797dd851adab25feaffacf7850d6" -"checksum multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" -"checksum multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" +"checksum multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" +"checksum multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" "checksum names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" "checksum nan-preserving-float 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34d4f00fcc2f4c9efa8cc971db0da9e28290e28e97af47585e48691ef10ff31f" "checksum native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f74dbadc8b43df7864539cedb7bc91345e532fdd913cfdc23ad94f4d2d40fbc0" @@ -4091,7 +4091,7 @@ dependencies = [ "checksum rustc-hex 2.0.0 (git+https://github.com/rphmeier/rustc-hex.git)" = "" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a54aa04a10c68c1c4eacb4337fd883b435997ede17a9385784b990777686b09a" -"checksum rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" +"checksum rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" "checksum schannel 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "85fd9df495640643ad2d00443b3d78aae69802ad488debab4f1dd52fc1806ade" "checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" @@ -4101,7 +4101,7 @@ dependencies = [ "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)" = "0c3adf19c07af6d186d91dae8927b83b0553d07ca56cbf7f2f32560455c91920" -"checksum serde_derive 1.0.64 (registry+https://github.com/rust-lang/crates.io-index)" = "79e4620ba6fbe051fc7506fab6f84205823564d55da18d55b695160fb3479cd8" +"checksum serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)" = "3525a779832b08693031b8ecfb0de81cd71cfd3812088fafe9a7496789572124" "checksum serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "84b8035cabe9b35878adec8ac5fe03d5f6bc97ff6edd7ccb96b44c1276ba390e" "checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" "checksum sha1 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "171698ce4ec7cbb93babeb3190021b4d72e96ccb98e33d277ae4ea959d6f2d9e" @@ -4173,7 +4173,7 @@ dependencies = [ "checksum url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" "checksum varint 0.1.0 (git+https://github.com/libp2p/rust-libp2p)" = "" -"checksum varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=727e0e099b53a4032a7e2330994c819fe866add7)" = "" +"checksum varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=38c9238a74504a6149909eb80f73608f63ab46c7)" = "" "checksum vcpkg 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ed0f6789c8a85ca41bbc1c9d175422116a9869bd1cf31bb08e1493ecce60380" "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" "checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" diff --git a/substrate/substrate/network-libp2p/Cargo.toml b/substrate/substrate/network-libp2p/Cargo.toml index a13bd03d98..43b826c350 100644 --- a/substrate/substrate/network-libp2p/Cargo.toml +++ b/substrate/substrate/network-libp2p/Cargo.toml @@ -11,7 +11,7 @@ bytes = "0.4" error-chain = { version = "0.12", default-features = false } fnv = "1.0" futures = "0.1" -libp2p = { git = "https://github.com/tomaka/libp2p-rs", rev = "727e0e099b53a4032a7e2330994c819fe866add7", default-features = false, features = ["libp2p-secio", "libp2p-secio-secp256k1"] } +libp2p = { git = "https://github.com/tomaka/libp2p-rs", rev = "38c9238a74504a6149909eb80f73608f63ab46c7", default-features = false, features = ["libp2p-secio", "libp2p-secio-secp256k1"] } ethcore-io = { git = "https://github.com/paritytech/parity.git" } ethkey = { git = "https://github.com/paritytech/parity.git" } ethereum-types = "0.3" diff --git a/substrate/substrate/network-libp2p/src/network_state.rs b/substrate/substrate/network-libp2p/src/network_state.rs index 387ac0503c..6ca22e1fd4 100644 --- a/substrate/substrate/network-libp2p/src/network_state.rs +++ b/substrate/substrate/network-libp2p/src/network_state.rs @@ -23,6 +23,7 @@ use libp2p::kad::KadConnecController; use libp2p::peerstore::{Peerstore, PeerAccess}; use libp2p::peerstore::json_peerstore::JsonPeerstore; use libp2p::peerstore::memory_peerstore::MemoryPeerstore; +use libp2p::ping::Pinger; use libp2p::secio; use {Error, ErrorKind, NetworkConfiguration, NonReservedPeerMode}; use {PeerId, ProtocolId, SessionInfo}; @@ -99,6 +100,9 @@ struct PeerConnectionInfo { /// The Kademlia connection to this node. kad_connec: UniqueConnec, + /// The ping connection to this node. + ping_connec: UniqueConnec, + /// Id of the peer. id: PeerstorePeerId, @@ -245,8 +249,7 @@ impl NetworkState { /// Reports the ping of the peer. Returned later by `session_info()`. /// No-op if the `peer_id` is not valid/expired. - #[allow(dead_code)] - pub fn report_ping(&self, peer_id: PeerId, ping: Duration) { + pub fn report_ping_duration(&self, peer_id: PeerId, ping: Duration) { let connections = self.connections.read(); let info = match connections.info_by_peer.get(&peer_id) { Some(info) => info, @@ -426,19 +429,7 @@ impl NetworkState { /// Returns the number of open and pending connections with /// custom protocols. pub fn num_open_custom_connections(&self) -> u32 { - self.connections - .read() - .info_by_peer - .values() - .filter(|info| - info.protocols.iter().any(|&(_, ref connec)| - match connec.state() { - UniqueConnecState::Pending | UniqueConnecState::Full => true, - _ => false - } - ) - ) - .count() as u32 + num_open_custom_connections(&self.connections.read()) } /// Returns the number of new outgoing custom connections to peers to @@ -457,7 +448,7 @@ impl NetworkState { connections.peer_by_nodeid.contains_key(node_id) } - /// Obtains the `UniqueConnec` corresponding to the Kademlia connect to a peer. + /// Obtains the `UniqueConnec` corresponding to the Kademlia connection to a peer. pub fn kad_connection( &self, node_id: PeerstorePeerId @@ -473,6 +464,46 @@ impl NetworkState { Ok((peer_id, connec)) } + /// Obtains the `UniqueConnec` corresponding to the Ping connection to a peer. + pub fn ping_connection( + &self, + node_id: PeerstorePeerId + ) -> Result<(PeerId, UniqueConnec), IoError> { + let mut connections = self.connections.write(); + let peer_id = accept_connection(&mut connections, &self.next_peer_id, + node_id, Endpoint::Listener)?; + let infos = connections.info_by_peer.get_mut(&peer_id) + .expect("Newly-created peer id is always valid"); + let connec = infos.ping_connec.clone(); + Ok((peer_id, connec)) + } + + /// Cleans up inactive connections and returns a list of + /// connections to ping. + pub fn cleanup_and_prepare_ping( + &self + ) -> Vec<(PeerId, PeerstorePeerId, UniqueConnec)> { + let mut connections = self.connections.write(); + let connections = &mut *connections; + let peer_by_nodeid = &mut connections.peer_by_nodeid; + let info_by_peer = &mut connections.info_by_peer; + + let mut ret = Vec::with_capacity(info_by_peer.len()); + info_by_peer.retain(|&peer_id, infos| { + // Remove the peer if neither Kad nor any protocol is alive. + if !infos.kad_connec.is_alive() && + !infos.protocols.iter().any(|(_, conn)| conn.is_alive()) + { + peer_by_nodeid.remove(&infos.id); + return false; + } + + ret.push((peer_id, infos.id.clone(), infos.ping_connec.clone())); + true + }); + ret + } + /// Try to add a new connection to a node in the list. /// /// Returns a `PeerId` to allow further interfacing with this connection. @@ -503,16 +534,15 @@ impl NetworkState { let peer_id = accept_connection(&mut connections, &self.next_peer_id, node_id.clone(), endpoint)?; - let connections = &mut *connections; - let info_by_peer = &mut connections.info_by_peer; - let peer_by_nodeid = &mut connections.peer_by_nodeid; - let infos = info_by_peer.get_mut(&peer_id) + let num_open_connections = num_open_custom_connections(&connections); + + let infos = connections.info_by_peer.get_mut(&peer_id) .expect("Newly-created peer id is always valid"); let node_is_reserved = self.reserved_peers.read().contains(&infos.id); if !node_is_reserved { if self.reserved_only.load(atomic::Ordering::Relaxed) || - peer_by_nodeid.len() >= self.max_peers as usize + num_open_connections >= self.max_peers { debug!(target: "sub-libp2p", "Refusing node {:?} because we \ reached the max number of peers", node_id); @@ -660,6 +690,7 @@ fn accept_connection( info_by_peer.insert(new_id, PeerConnectionInfo { protocols: Vec::new(), // TODO: Vec::with_capacity(num_registered_protocols), kad_connec: UniqueConnec::empty(), + ping_connec: UniqueConnec::empty(), id: node_id.clone(), originated: endpoint == Endpoint::Dialer, ping: Mutex::new(None), @@ -691,6 +722,23 @@ fn is_peer_disabled( } } +/// Returns the number of open and pending connections with +/// custom protocols. +fn num_open_custom_connections(connections: &Connections) -> u32 { + connections + .info_by_peer + .values() + .filter(|info| + info.protocols.iter().any(|&(_, ref connec)| + match connec.state() { + UniqueConnecState::Pending | UniqueConnecState::Full => true, + _ => false + } + ) + ) + .count() as u32 +} + /// Parses an address of the form `/ip4/x.x.x.x/tcp/x/p2p/xxxxxx`, and adds it /// to the given peerstore. Returns the corresponding peer ID. fn parse_and_add_to_peerstore(addr_str: &str, peerstore: &PeersStorage) diff --git a/substrate/substrate/network-libp2p/src/service.rs b/substrate/substrate/network-libp2p/src/service.rs index 50dea88aa3..1595636fbb 100644 --- a/substrate/substrate/network-libp2p/src/service.rs +++ b/substrate/substrate/network-libp2p/src/service.rs @@ -27,7 +27,7 @@ use libp2p::identify::{IdentifyInfo, IdentifyOutput, IdentifyTransportOutcome}; use libp2p::identify::{IdentifyProtocolConfig, PeerIdTransport}; use libp2p::core::{upgrade, Transport, MuxedTransport, ConnectionUpgrade}; use libp2p::core::{Endpoint, PeerId as PeerstorePeerId, PublicKey}; -use libp2p::core::SwarmController; +use libp2p::core::{SwarmController, UniqueConnecState}; use libp2p::ping; use libp2p::transport_timeout::TransportTimeout; use {PacketId, SessionInfo, ConnectionFilter, TimerToken}; @@ -43,7 +43,7 @@ use futures::{future, Future, Stream, IntoFuture}; use futures::sync::{mpsc, oneshot}; use tokio_core::reactor::{Core, Handle}; use tokio_io::{AsyncRead, AsyncWrite}; -use tokio_timer; +use tokio_timer::{Interval, Deadline}; use custom_proto::{RegisteredProtocol, RegisteredProtocols}; use custom_proto::RegisteredProtocolOutput; @@ -445,10 +445,10 @@ fn init_thread( move |out, endpoint, client_addr| { let original_addr = out.original_addr; let listener_upgrade = upgrade::or(upgrade::or(upgrade::or( - upgrade::map(shared.kad_upgrade.clone(), FinalUpgrade::Kad), + upgrade::map_with_addr(shared.kad_upgrade.clone(), |(c, f), a| FinalUpgrade::Kad(c, f, a.clone())), upgrade::map(IdentifyProtocolConfig, |id| FinalUpgrade::Identify(id, original_addr))), - upgrade::map(ping::Ping, |(p, f)| FinalUpgrade::Ping(p, f))), - upgrade::map(DelayedProtosList(shared), FinalUpgrade::Custom)); + upgrade::map_with_addr(ping::Ping, |(p, f), addr| FinalUpgrade::Ping(p, f, addr.clone()))), + upgrade::map_with_addr(DelayedProtosList(shared), |c, a| FinalUpgrade::Custom(c, a.clone()))); upgrade::apply(out.socket, listener_upgrade, endpoint, client_addr) } }) @@ -457,8 +457,8 @@ fn init_thread( libp2p::core::swarm( upgraded_transport, - move |(upgrade, endpoint), client_addr| - listener_handle(shared.clone(), upgrade, endpoint, client_addr) + move |(upgrade, endpoint), _client_addr| + listener_handle(shared.clone(), upgrade, endpoint) ) }; @@ -523,12 +523,16 @@ fn init_thread( }); // Start the process of periodically discovering nodes to connect to. - let discovery = start_kademlia_discovery(shared.clone(), transport, - swarm_controller); + let discovery = start_kademlia_discovery(shared.clone(), + transport.clone(), swarm_controller.clone()); + + // Start the process of pinging the active nodes on the network. + let pinger = start_pinger(shared.clone(), transport, swarm_controller); // Merge all the futures into one! Ok(swarm_future .select(discovery).map_err(|(err, _)| err).and_then(|(_, rest)| rest) + .select(pinger).map_err(|(err, _)| err).and_then(|(_, rest)| rest) .select(timeouts).map_err(|(err, _)| err).and_then(|(_, rest)| rest) .select(close_rx.then(|_| Ok(()))).map(|_| ()).map_err(|(err, _)| err) @@ -549,33 +553,30 @@ struct TransportOutput { /// Enum of all the possible protocols our service handles. enum FinalUpgrade { - Kad((KadConnecController, Box>)), + Kad(KadConnecController, Box>, Multiaddr), /// The remote identification system, and the multiaddress we see the remote as. Identify(IdentifyOutput, Multiaddr), - Ping(ping::Pinger, Box>), + Ping(ping::Pinger, Box>, Multiaddr), /// `Custom` means anything not in the core libp2p and is handled /// by `CustomProtoConnectionUpgrade`. - Custom(RegisteredProtocolOutput>), + Custom(RegisteredProtocolOutput>, Multiaddr), } /// Called whenever we successfully open a multistream with a remote. -fn listener_handle<'a, C, F>( +fn listener_handle<'a, C>( shared: Arc, upgrade: FinalUpgrade, endpoint: Endpoint, - client_addr: F, ) -> Box + 'a> - where C: AsyncRead + AsyncWrite + 'a, - F: Future + 'a { + where C: AsyncRead + AsyncWrite + 'a { match upgrade { - FinalUpgrade::Kad((controller, kademlia_stream)) => { + FinalUpgrade::Kad(controller, kademlia_stream, client_addr) => { trace!(target: "sub-libp2p", "Opened kademlia substream with \ - remote as {:?}", endpoint); - - let shared = shared.clone(); - Box::new(client_addr.and_then(move |client_addr| - handle_kademlia_connection(shared, client_addr, controller, kademlia_stream) - ).flatten()) + {:?} as {:?}", client_addr, endpoint); + match handle_kademlia_connection(shared, client_addr, controller, kademlia_stream) { + Ok(fut) => Box::new(fut) as Box<_>, + Err(err) => Box::new(future::err(err)) as Box<_>, + } }, FinalUpgrade::Identify(IdentifyOutput::Sender { sender }, original_addr) => { @@ -597,13 +598,23 @@ fn listener_handle<'a, C, F>( FinalUpgrade::Identify(IdentifyOutput::RemoteInfo { .. }, _) => unreachable!("We are never dialing with the identify protocol"), - FinalUpgrade::Ping(_pinger, future) => future, + FinalUpgrade::Ping(pinger, future, client_addr) => { + let node_id = p2p_multiaddr_to_node_id(client_addr); + match shared.network_state.ping_connection(node_id.clone()) { + Ok((_, ping_connec)) => { + trace!(target: "sub-libp2p", "Successfully opened ping \ + substream with {:?}", node_id); + let fut = ping_connec.set_until(pinger, future); + Box::new(fut) as Box<_> + }, + Err(err) => Box::new(future::err(err)) as Box<_> + } + }, - FinalUpgrade::Custom(custom_proto_out) => { + FinalUpgrade::Custom(custom_proto_out, client_addr) => { // A "custom" protocol is one that is part of substrate and not part of libp2p. let shared = shared.clone(); - let fut = client_addr.and_then(move |client_addr| - handle_custom_connection(shared, client_addr, endpoint, custom_proto_out)); + let fut = handle_custom_connection(shared, client_addr, endpoint, custom_proto_out); Box::new(fut) as Box<_> }, } @@ -619,19 +630,31 @@ fn handle_kademlia_connection( let node_id = p2p_multiaddr_to_node_id(client_addr); let (_peer_id, kad_connec) = shared.network_state .kad_connection(node_id.clone())?; - - let future = kademlia_stream.for_each({ + + let future = future::loop_fn(kademlia_stream, move |kademlia_stream| { let shared = shared.clone(); - move |req| { - let shared = shared.clone(); - shared.kad_system.update_kbuckets(node_id.clone()); - match req { - KadIncomingRequest::FindNode { searched, responder } => - responder.respond(build_kademlia_response(&shared, &searched)), - KadIncomingRequest::PingPong => (), - } - Ok(()) - } + let node_id = node_id.clone(); + + let next = kademlia_stream + .into_future() + .map_err(|(err, _)| err); + let deadline = Instant::now() + Duration::from_secs(20); + + Deadline::new(next, deadline) + .map_err(|err| + // TODO: improve the error reporting here, but tokio-timer's API is bad + IoError::new(IoErrorKind::Other, err) + ) + .and_then(move |(req, rest)| { + shared.kad_system.update_kbuckets(node_id); + match req { + Some(KadIncomingRequest::FindNode { searched, responder }) => + responder.respond(build_kademlia_response(&shared, &searched)), + Some(KadIncomingRequest::PingPong) => (), + None => return Ok(future::Loop::Break(())) + } + Ok(future::Loop::Continue(rest)) + }) }); Ok(kad_connec.set_until(controller, future)) @@ -709,6 +732,12 @@ fn handle_custom_connection( Err(err) => return future::Either::A(future::err(err.into())), }; + if let UniqueConnecState::Full = unique_connec.state() { + debug!(target: "sub-libp2p", "Interrupting connection attempt to {:?} \ + with {:?} because we're already connected", node_id, custom_proto_out.protocol_id); + return future::Either::A(future::ok(())) + } + struct ProtoDisconnectGuard { inner: Arc, peer_id: PeerId, @@ -820,7 +849,7 @@ fn start_kademlia_discovery(shared: Arc, transport: T, ) }); - let discovery = tokio_timer::Interval::new(Instant::now(), Duration::from_secs(30)) + let discovery = Interval::new(Instant::now(), Duration::from_secs(30)) // TODO: add a timeout to the lookups .map_err(|err| IoError::new(IoErrorKind::Other, err)) .and_then({ @@ -1011,7 +1040,10 @@ fn open_peer_custom_proto( ) }) .and_then(move |out, endpoint, client_addr| - future::ok(((FinalUpgrade::Custom(out), endpoint), client_addr)) + client_addr.map(move |client_addr| { + let out = FinalUpgrade::Custom(out, client_addr.clone()); + ((out, endpoint), future::ok(client_addr)) + }) ); let with_timeout = TransportTimeout::new(with_proto, @@ -1048,9 +1080,12 @@ fn obtain_kad_connection(shared: Arc, upgrade::apply(out.socket, kad_upgrade.clone(), endpoint, client_addr) ) - .map(move |(kad_ctrl, stream), _| - (FinalUpgrade::Kad((kad_ctrl, stream)), Endpoint::Dialer) - ); + .and_then(move |(ctrl, fut), _, client_addr| { + client_addr.map(|client_addr| { + let out = FinalUpgrade::Kad(ctrl, fut, client_addr.clone()); + ((out, Endpoint::Dialer), future::ok(client_addr)) + }) + }); shared.network_state .kad_connection(peer_id.clone()) @@ -1103,6 +1138,106 @@ fn process_identify_info( Ok(()) } +/// Returns a future that regularly pings every peer we're connected to. +/// If a peer doesn't respond after a while, we disconnect it. +fn start_pinger( + shared: Arc, + transport: T, + swarm_controller: SwarmController +) -> impl Future + where T: MuxedTransport> + Clone + 'static, + T::MultiaddrFuture: 'static, + To: AsyncRead + AsyncWrite + 'static, + St: MuxedTransport, Endpoint)> + Clone + 'static, + C: 'static { + let transport = transport + .and_then(move |out, endpoint, client_addr| + upgrade::apply(out.socket, ping::Ping, endpoint, client_addr) + ) + .and_then(move |(ctrl, fut), _, client_addr| { + client_addr.map(|client_addr| { + let out = FinalUpgrade::Ping(ctrl, fut, client_addr.clone()); + ((out, Endpoint::Dialer), future::ok(client_addr)) + }) + }); + + let fut = Interval::new(Instant::now(), Duration::from_secs(30)) + .map_err(|err| IoError::new(IoErrorKind::Other, err)) + .for_each(move |_| + ping_all(shared.clone(), transport.clone(), &swarm_controller)) + .then(|val| { + warn!(target: "sub-libp2p", "Pinging stream has stopped: {:?}", val); + val + }); + + // Note that we use a Box in order to speed compilation time. + Box::new(fut) as Box> +} + +/// Pings all the nodes we're connected to and disconnects any node that +/// doesn't respond. Returns a `Future` when all the pings have either +/// suceeded or timed out. +fn ping_all( + shared: Arc, + transport: T, + swarm_controller: &SwarmController +) -> impl Future + where T: MuxedTransport, Endpoint)> + Clone + 'static, + T::MultiaddrFuture: 'static, + St: MuxedTransport, Endpoint)> + Clone + 'static, + C: 'static { + let mut ping_futures = Vec::new(); + + for (peer, peer_id, pinger) in shared.network_state.cleanup_and_prepare_ping() { + let shared = shared.clone(); + + let addr = Multiaddr::from(AddrComponent::P2P(peer_id.clone().into_bytes())); + let fut = pinger + .get_or_dial(&swarm_controller, &addr, transport.clone()) + .and_then(move |mut p| { + trace!(target: "sub-libp2p", + "Pinging active connection with #{} {:?}", peer, peer_id); + p.ping() + .map(|()| peer_id) + .map_err(|err| IoError::new(IoErrorKind::Other, err)) + }); + let ping_start_time = Instant::now(); + let fut = Deadline::new(fut, ping_start_time + Duration::from_secs(30)) + .then(move |val| + match val { + Err(err) => { + trace!(target: "sub-libp2p", + "Error while pinging #{:?} => {:?}", peer, err); + shared.network_state.disconnect_peer(peer); + // Return Ok, otherwise we would close the ping service + Ok(()) + }, + Ok(peer_id) => { + let elapsed = ping_start_time.elapsed(); + trace!(target: "sub-libp2p", "Pong from #{:?} in {:?}", + peer, elapsed); + shared.network_state.report_ping_duration(peer, elapsed); + shared.kad_system.update_kbuckets(peer_id); + Ok(()) + } + } + ); + ping_futures.push(fut); + } + + future::loop_fn(ping_futures, |ping_futures| { + if ping_futures.is_empty() { + let fut = future::ok(future::Loop::Break(())); + return future::Either::A(fut) + } + + let fut = future::select_all(ping_futures) + .map(|((), _, rest)| future::Loop::Continue(rest)) + .map_err(|(err, _, _)| err); + future::Either::B(fut) + }) +} + /// Expects a multiaddr of the format `/p2p/` and returns the node ID. /// Panics if the format is not correct. fn p2p_multiaddr_to_node_id(client_addr: Multiaddr) -> PeerstorePeerId { diff --git a/substrate/substrate/network-libp2p/src/transport.rs b/substrate/substrate/network-libp2p/src/transport.rs index 594137f497..c4f72b566c 100644 --- a/substrate/substrate/network-libp2p/src/transport.rs +++ b/substrate/substrate/network-libp2p/src/transport.rs @@ -35,7 +35,7 @@ pub fn build_transport( let mut plaintext = upgrade::toggleable(upgrade::PlainTextConfig); match unencrypted_allowed { - UnencryptedAllowed::Allowed => plaintext.disable(), + UnencryptedAllowed::Allowed => (),//plaintext.disable(), UnencryptedAllowed::Denied => (), };