From fa10e3f06fc951f2972e011fd21af2fa853736f6 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 28 Jul 2018 11:42:26 +0200 Subject: [PATCH 1/5] Switch to the master branch of libp2p (#427) * Switch to the master branch of libp2p * Fixed having to clear manually * Fix TTL of bootstrap nodes * Speed up compilation time * Update libp2p * Remove obsolete comment --- Cargo.lock | 295 ++++++++---------- substrate/network-libp2p/Cargo.toml | 6 +- substrate/network-libp2p/src/lib.rs | 3 +- substrate/network-libp2p/src/network_state.rs | 8 +- substrate/network-libp2p/src/service.rs | 50 +-- substrate/network-libp2p/src/timeouts.rs | 39 +-- substrate/network-libp2p/src/transport.rs | 4 +- 7 files changed, 191 insertions(+), 214 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0a0438f1a7fcb..3b15b294bbe05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -257,11 +257,11 @@ dependencies = [ [[package]] name = "cid" version = "0.2.3" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", ] [[package]] @@ -406,7 +406,7 @@ dependencies = [ [[package]] name = "datastore" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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)", @@ -1136,48 +1136,49 @@ 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-dns 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-floodsub 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-kad 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-mplex 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-ratelimit 0.1.1 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-relay 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-secio 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-tcp-transport 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-transport-timeout 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-websocket 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-yamux 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-dns 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-floodsub 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-kad 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-mplex 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-ratelimit 0.1.1 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-relay 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-secio 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-tcp-transport 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-transport-timeout 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-websocket 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-yamux 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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)", + "tokio-current-thread 0.1.0 (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-core" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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)", + "protobuf 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "smallvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1185,108 +1186,110 @@ dependencies = [ [[package]] name = "libp2p-dns" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "tokio-dns-unofficial 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "tokio-dns-unofficial 0.3.1 (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-floodsub" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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.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-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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", ] [[package]] name = "libp2p-identify" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "parking_lot 0.6.2 (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-codec 0.1.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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", ] [[package]] name = "libp2p-kad" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", ] [[package]] name = "libp2p-mplex" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", ] [[package]] name = "libp2p-peerstore" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.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.70 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1294,27 +1297,28 @@ dependencies = [ [[package]] name = "libp2p-ping" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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)", + "tokio-codec 0.1.0 (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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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)", @@ -1323,37 +1327,37 @@ dependencies = [ [[package]] name = "libp2p-relay" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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-codec 0.1.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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", ] [[package]] name = "libp2p-secio" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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)", ] @@ -1361,23 +1365,23 @@ dependencies = [ [[package]] name = "libp2p-tcp-transport" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-transport-timeout" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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)", ] @@ -1385,13 +1389,13 @@ dependencies = [ [[package]] name = "libp2p-websocket" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", - "rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", + "rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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)", @@ -1400,11 +1404,11 @@ dependencies = [ [[package]] name = "libp2p-yamux" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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)", @@ -1540,10 +1544,10 @@ dependencies = [ [[package]] name = "multiaddr" version = "0.3.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "cid 0.2.3 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "integer-encoding 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1558,7 +1562,7 @@ dependencies = [ [[package]] name = "multihash" version = "0.8.1-pre" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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)", @@ -1568,14 +1572,14 @@ dependencies = [ [[package]] name = "multistream-select" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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.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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", ] [[package]] @@ -2055,33 +2059,11 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "protobuf" -version = "1.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "protobuf" version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "protobuf-codegen" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "protobuf 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "protobuf-codegen-pure" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "protobuf 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf-codegen 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "pulldown-cmark" version = "0.0.3" @@ -2193,7 +2175,7 @@ dependencies = [ "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2373,7 +2355,7 @@ dependencies = [ [[package]] name = "rw-stream-sink" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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)", @@ -2725,7 +2707,7 @@ dependencies = [ "hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "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)", + "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.70 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2830,14 +2812,14 @@ 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)", + "libp2p 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", "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)", - "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.7 (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/libp2p/rust-libp2p)", + "varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)", ] [[package]] @@ -3408,15 +3390,24 @@ dependencies = [ "tokio-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-current-thread" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tokio-dns-unofficial" -version = "0.1.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3709,20 +3700,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "varint" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p#857c6653ecc70e480bbedea5a0f393f74af8f414" -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)", - "futures 0.1.21 (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.2.4 (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 = "varint" -version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67#fad12c89ea2b6f1f6420557db6e9305fb03f9f67" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" 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)", @@ -3936,7 +3914,7 @@ 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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" +"checksum cid 0.2.3 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" "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" @@ -3953,7 +3931,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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" +"checksum datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" "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" @@ -4023,22 +4001,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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-dns 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-floodsub 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-kad 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-mplex 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-ratelimit 0.1.1 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-relay 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-secio 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-tcp-transport 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-transport-timeout 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-websocket 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum libp2p-yamux 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" +"checksum libp2p 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-dns 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-floodsub 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-kad 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-mplex 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-ratelimit 0.1.1 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-relay 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-secio 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-tcp-transport 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-transport-timeout 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-websocket 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum libp2p-yamux 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" "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" @@ -4054,10 +4032,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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" +"checksum multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" -"checksum multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" +"checksum multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" +"checksum multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" "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" @@ -4085,10 +4063,7 @@ dependencies = [ "checksum proc-macro-hack 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ba8d4f9257b85eb6cdf13f055cea3190520aab1409ca2ab43493ea4820c25f0" "checksum proc-macro-hack-impl 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d5cb6f960ad471404618e9817c0e5d10b1ae74cfdf01fab89ea0641fe7fb2892" "checksum proc-macro2 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1fa93823f53cfd0f5ac117b189aed6cfdfb2cfc0a9d82e956dd7927595ed7d46" -"checksum protobuf 1.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "52fbc45bf6709565e44ef31847eb7407b3c3c80af811ee884a04da071dcca12b" "checksum protobuf 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7fec4b8f0fa26c52d29c66e93e8624aad859458ec5e5d4f6ddf923954293436a" -"checksum protobuf-codegen 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9cbd14b640510ad5a4339d8f78ab913a6da1f7b384400fa113616bf216cbdfe8" -"checksum protobuf-codegen-pure 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7fcc3085b0644bcad72ea33f174f267c24e558e56a97115e3ef31a4483581a1b" "checksum pulldown-cmark 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8361e81576d2e02643b04950e487ec172b687180da65c731c03cf336784e6c07" "checksum pwasm-utils 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "efd695333cfae6e9dbe2703a6d040e252b57a6fc3b9a65c712615ac042b2e0c5" "checksum quick-error 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb6ccf8db7bbcb9c2eae558db5ab4f3da1c2a87e4e597ed394726bc8ea6ca1d" @@ -4121,7 +4096,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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" +"checksum rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" "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" @@ -4168,7 +4143,8 @@ dependencies = [ "checksum tokio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8ee337e5f4e501fc32966fec6fe0ca0cc1c237b0b1b14a335f8bfe3c5f06e286" "checksum tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "881e9645b81c2ce95fcb799ded2c29ffb9f25ef5bef909089a420e5961dd8ccb" "checksum tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71" -"checksum tokio-dns-unofficial 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "be509b88bef660929f3066a6ed30260f8c1f3035c5ac80a7c67bb39c9cf28376" +"checksum tokio-current-thread 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f785265962bde425bf3b77dd6abac6674b8c6d5e8831427383aa9c56c5210e1" +"checksum tokio-dns-unofficial 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb9bf62ca2c53bf2f2faec3e48a98b6d8c9577c27011cb0203a4beacdc8ab328" "checksum tokio-executor 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8cac2a7883ff3567e9d66bb09100d09b33d90311feca0206c7ca034bc0c55113" "checksum tokio-fs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "76766830bbf9a2d5bfb50c95350d56a2e79e2c80f675967fff448bc615899708" "checksum tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a5c9635ee806f26d302b8baa1e145689a280d8f5aa8d0552e7344808da54cc21" @@ -4202,8 +4178,7 @@ dependencies = [ "checksum untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f392d7819dbe58833e26872f5f6f0d68b7bbbe90fc3667e98731c4a15ad9a7ae" "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=fad12c89ea2b6f1f6420557db6e9305fb03f9f67)" = "" +"checksum varint 0.1.0 (git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2)" = "" "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 vergen 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c3365f36c57e5df714a34be40902b27a992eeddb9996eca52d0584611cf885d" diff --git a/substrate/network-libp2p/Cargo.toml b/substrate/network-libp2p/Cargo.toml index 6d7197922f5a9..91382a0b0d665 100644 --- a/substrate/network-libp2p/Cargo.toml +++ b/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 = "fad12c89ea2b6f1f6420557db6e9305fb03f9f67", default-features = false, features = ["libp2p-secio", "libp2p-secio-secp256k1"] } +libp2p = { git = "https://github.com/tomaka/libp2p-rs", branch = "polkadot-2", 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" @@ -20,10 +20,10 @@ parking_lot = "0.5" libc = "0.2" log = "0.3" rand = "0.5.0" -tokio-core = "0.1" +tokio = "0.1" tokio-io = "0.1" tokio-timer = "0.2" -varint = { git = "https://github.com/libp2p/rust-libp2p" } +varint = { git = "https://github.com/tomaka/libp2p-rs", branch = "polkadot-2" } [dev-dependencies] assert_matches = "1.2" diff --git a/substrate/network-libp2p/src/lib.rs b/substrate/network-libp2p/src/lib.rs index 5e4b7f3093827..cd00cc4b63fcb 100644 --- a/substrate/network-libp2p/src/lib.rs +++ b/substrate/network-libp2p/src/lib.rs @@ -19,9 +19,8 @@ extern crate parking_lot; extern crate fnv; -#[macro_use] extern crate futures; -extern crate tokio_core; +extern crate tokio; extern crate tokio_io; extern crate tokio_timer; extern crate ethkey; diff --git a/substrate/network-libp2p/src/network_state.rs b/substrate/network-libp2p/src/network_state.rs index 301262a433cbc..c7285590a3180 100644 --- a/substrate/network-libp2p/src/network_state.rs +++ b/substrate/network-libp2p/src/network_state.rs @@ -658,10 +658,6 @@ impl NetworkState { peer_info.id, peer_info.kad_connec.is_alive(), peer_info.protocols.iter().filter(|c| c.1.is_alive()).count()); - // TODO: we manually clear the connections as a work-around for - // networking bugs ; normally it should automatically drop - for c in peer_info.protocols.iter() { c.1.clear(); } - peer_info.kad_connec.clear(); let old = connections.peer_by_nodeid.remove(&peer_info.id); debug_assert_eq!(old, Some(who)); } @@ -852,11 +848,11 @@ fn parse_and_add_to_node_store( NodeStore::Memory(ref node_store) => node_store .peer_or_create(&who) - .add_addr(addr, Duration::from_secs(100000 * 365 * 24 * 3600)), + .set_addr_ttl(addr, Duration::from_secs(100000 * 365 * 24 * 3600)), NodeStore::Json(ref node_store) => node_store .peer_or_create(&who) - .add_addr(addr, Duration::from_secs(100000 * 365 * 24 * 3600)), + .set_addr_ttl(addr, Duration::from_secs(100000 * 365 * 24 * 3600)), } Ok(who) diff --git a/substrate/network-libp2p/src/service.rs b/substrate/network-libp2p/src/service.rs index 93839a74ddfe1..ef86d2b4346b9 100644 --- a/substrate/network-libp2p/src/service.rs +++ b/substrate/network-libp2p/src/service.rs @@ -41,7 +41,7 @@ use std::thread; use std::time::{Duration, Instant}; use futures::{future, Future, Stream, IntoFuture}; use futures::sync::{mpsc, oneshot}; -use tokio_core::reactor::{Core, Handle}; +use tokio::runtime::current_thread; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_timer::{Interval, Deadline}; @@ -118,7 +118,7 @@ impl NetworkService { local_peer_id: local_peer_id.clone(), kbuckets_timeout: Duration::from_secs(600), request_timeout: Duration::from_secs(10), - known_initial_peers: network_state.known_peers().collect(), + known_initial_peers: network_state.known_peers(), }); let shared = Arc::new(Shared { @@ -191,8 +191,8 @@ impl NetworkService { let shared = self.shared.clone(); let join_handle = thread::spawn(move || { - // Tokio core that is going to run everything in this thread. - let mut core = match Core::new() { + // Tokio runtime that is going to run everything in this thread. + let mut runtime = match current_thread::Runtime::new() { Ok(c) => c, Err(err) => { let _ = init_tx.send(Err(err.into())); @@ -200,7 +200,7 @@ impl NetworkService { } }; - let fut = match init_thread(core.handle(), shared, + let fut = match init_thread(shared, timeouts_register_rx, close_rx) { Ok(future) => { debug!(target: "sub-libp2p", "Successfully started networking service"); @@ -213,7 +213,7 @@ impl NetworkService { } }; - match core.run(fut) { + match runtime.block_on(fut) { Ok(()) => debug!(target: "sub-libp2p", "libp2p future finished"), Err(err) => error!(target: "sub-libp2p", "error while running libp2p: {:?}", err), } @@ -395,7 +395,6 @@ impl NetworkContext for NetworkContextImpl { /// - `timeouts_register_rx` should receive newly-registered timeouts. /// - `close_rx` should be triggered when we want to close the network. fn init_thread( - core: Handle, shared: Arc, timeouts_register_rx: mpsc::UnboundedReceiver< (Duration, (Arc, ProtocolId, TimerToken)) @@ -405,7 +404,6 @@ fn init_thread( // Build the transport layer. let transport = { let base = transport::build_transport( - core.clone(), transport::UnencryptedAllowed::Denied, shared.network_state.local_private_key().clone() ); @@ -535,7 +533,7 @@ fn init_thread( // Build the timeouts system for the `register_timeout` function. // (note: this has nothing to do with socket timeouts) - let timeouts = timeouts::build_timeouts_stream(core.clone(), timeouts_register_rx) + let timeouts = timeouts::build_timeouts_stream(timeouts_register_rx) .for_each({ let shared = shared.clone(); move |(handler, protocol_id, timer_token)| { @@ -630,7 +628,7 @@ fn listener_handle<'a, C>( 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); + let fut = ping_connec.tie_or_passthrough(pinger, future); Box::new(fut) as Box<_> }, Err(err) => Box::new(future::err(err)) as Box<_> @@ -687,7 +685,7 @@ fn handle_kademlia_connection( val }); - Ok(kad_connec.set_until(controller, future)) + Ok(kad_connec.tie_or_passthrough(controller, future)) } /// When a remote performs a `FIND_NODE` Kademlia request for `searched`, @@ -823,7 +821,7 @@ fn handle_custom_connection( }); let val = (custom_proto_out.outgoing, custom_proto_out.protocol_version); - let final_fut = unique_connec.set_until(val, fut) + let final_fut = unique_connec.tie_or_stop(val, fut) .then(move |val| { // Makes sure that `dc_guard` is kept alive until here. drop(dc_guard); @@ -950,7 +948,7 @@ fn perform_kademlia_query( let random_peer_id = random_key.into_peer_id(); trace!(target: "sub-libp2p", "Start kademlia discovery for {:?}", random_peer_id); - shared.clone() + let future = shared.clone() .kad_system .find_node(random_peer_id, { let shared = shared.clone(); @@ -974,7 +972,10 @@ fn perform_kademlia_query( ) .into_future() .map_err(|(err, _)| err) - .map(|_| ()) + .map(|_| ()); + + // Note that we use a `Box` in order to speed up compilation. + Box::new(future) as Box> } /// Connects to additional nodes, if necessary. @@ -1163,8 +1164,7 @@ fn open_peer_custom_proto( ); } - // TODO: this future should be used - let _ = unique_connec.get_or_dial(&swarm_controller, &addr, with_err); + unique_connec.dial(&swarm_controller, &addr, with_err); }, Err(err) => { trace!(target: "sub-libp2p", @@ -1200,11 +1200,14 @@ fn obtain_kad_connection(shared: Arc, }) }); - shared.network_state + let future = shared.network_state .kad_connection(who.clone()) .into_future() - .map(move |(_, k)| k.get_or_dial(&swarm_controller, &addr, transport)) - .flatten() + .map(move |(_, k)| k.dial(&swarm_controller, &addr, transport)) + .flatten(); + + // Note that we use a Box in order to speed up compilation. + Box::new(future) as Box> } /// Processes the information about a node. @@ -1305,7 +1308,7 @@ fn ping_all( let addr = Multiaddr::from(AddrComponent::P2P(who.clone().into_bytes())); let fut = pinger - .get_or_dial(&swarm_controller, &addr, transport.clone()) + .dial(&swarm_controller, &addr, transport.clone()) .and_then(move |mut p| { trace!(target: "sub-libp2p", "Pinging peer #{} aka. {:?}", peer, who); p.ping() @@ -1334,7 +1337,7 @@ fn ping_all( ping_futures.push(fut); } - future::loop_fn(ping_futures, |ping_futures| { + let future = future::loop_fn(ping_futures, |ping_futures| { if ping_futures.is_empty() { let fut = future::ok(future::Loop::Break(())); return future::Either::A(fut) @@ -1344,7 +1347,10 @@ fn ping_all( .map(|((), _, rest)| future::Loop::Continue(rest)) .map_err(|(err, _, _)| err); future::Either::B(fut) - }) + }); + + // Note that we use a Box in order to speed up compilation. + Box::new(future) as Box> } /// Expects a multiaddr of the format `/p2p/` and returns the node ID. diff --git a/substrate/network-libp2p/src/timeouts.rs b/substrate/network-libp2p/src/timeouts.rs index eb3fecb2a0f36..acd4ecc2d8c92 100644 --- a/substrate/network-libp2p/src/timeouts.rs +++ b/substrate/network-libp2p/src/timeouts.rs @@ -15,10 +15,10 @@ // along with Substrate. If not, see .? use futures::{Async, future, Future, Poll, stream, Stream, sync::mpsc}; -use std::io::Error as IoError; +use std::io::{Error as IoError, ErrorKind as IoErrorKind}; use std::marker::PhantomData; use std::time::{Duration, Instant}; -use tokio_core::reactor::{Handle, Timeout}; +use tokio_timer::{self, Delay}; /// Builds the timeouts system. /// @@ -27,21 +27,18 @@ use tokio_core::reactor::{Handle, Timeout}; /// `T` can be anything you want, as it is transparently passed from the input /// to the output. Timeouts continue to fire forever, as there is no way to /// unregister them. -pub fn build_timeouts_stream( - core: Handle, +pub fn build_timeouts_stream<'a, T>( timeouts_rx: mpsc::UnboundedReceiver<(Duration, T)> -) -> impl Stream - where T: Clone { +) -> Box + 'a> + where T: Clone + 'a { let next_timeout = next_in_timeouts_stream(timeouts_rx); // The `unfold` function is essentially a loop turned into a stream. The // first parameter is the initial state, and the closure returns the new // state and an item. - stream::unfold(vec![future::Either::A(next_timeout)], move |timeouts| { + let stream = stream::unfold(vec![future::Either::A(next_timeout)], move |timeouts| { // `timeouts` is a `Vec` of futures that produce an `Out`. - let core = core.clone(); - // `select_ok` panics if `timeouts` is empty anyway. if timeouts.is_empty() { return None @@ -53,8 +50,7 @@ pub fn build_timeouts_stream( Out::NewTimeout((Some((duration, item)), next_timeouts)) => { // Received a new timeout request on the channel. let next_timeout = next_in_timeouts_stream(next_timeouts); - let at = Instant::now() + duration; - let timeout = Timeout::new_at(at, &core)?; + let timeout = Delay::new(Instant::now() + duration); let timeout = TimeoutWrapper(timeout, duration, Some(item), PhantomData); timeouts.push(future::Either::B(timeout)); timeouts.push(future::Either::A(next_timeout)); @@ -66,8 +62,7 @@ pub fn build_timeouts_stream( Out::Timeout(duration, item) => { // A timeout has happened. let returned = item.clone(); - let at = Instant::now() + duration; - let timeout = Timeout::new_at(at, &core)?; + let timeout = Delay::new(Instant::now() + duration); let timeout = TimeoutWrapper(timeout, duration, Some(item), PhantomData); timeouts.push(future::Either::B(timeout)); Ok((Some(returned), timeouts)) @@ -75,7 +70,10 @@ pub fn build_timeouts_stream( } ) ) - }).filter_map(|item| item) + }).filter_map(|item| item); + + // Note that we use a `Box` in order to speed up compilation time. + Box::new(stream) as Box> } /// Local enum representing the output of the selection. @@ -97,15 +95,20 @@ fn next_in_timeouts_stream( .map_err(|_| unreachable!("an UnboundedReceiver can never error")) } -/// Does the equivalent to `future.map(move |()| (duration, item))`. +/// Does the equivalent to `future.map(move |()| (duration, item)).map_err(|err| to_io_err(err))`. struct TimeoutWrapper(F, Duration, Option, PhantomData); impl Future for TimeoutWrapper - where F: Future { + where F: Future { type Item = Out; - type Error = F::Error; + type Error = IoError; fn poll(&mut self) -> Poll { - let _ready: () = try_ready!(self.0.poll()); + match self.0.poll() { + Ok(Async::Ready(())) => (), + Ok(Async::NotReady) => return Ok(Async::NotReady), + Err(err) => return Err(IoError::new(IoErrorKind::Other, err.to_string())), + } + let out = Out::Timeout(self.1, self.2.take().expect("poll() called again after success")); Ok(Async::Ready(out)) } diff --git a/substrate/network-libp2p/src/transport.rs b/substrate/network-libp2p/src/transport.rs index 393130ec9babc..95c513ea0c243 100644 --- a/substrate/network-libp2p/src/transport.rs +++ b/substrate/network-libp2p/src/transport.rs @@ -18,16 +18,14 @@ use libp2p::{self, Transport, mplex, secio, yamux}; use libp2p::core::{MuxedTransport, either, upgrade}; use libp2p::transport_timeout::TransportTimeout; use std::time::Duration; -use tokio_core::reactor::Handle; use tokio_io::{AsyncRead, AsyncWrite}; /// Builds the transport that serves as a common ground for all connections. pub fn build_transport( - core: Handle, unencrypted_allowed: UnencryptedAllowed, local_private_key: secio::SecioKeyPair ) -> impl MuxedTransport + Clone { - let base = libp2p::CommonTransport::new(core) + let base = libp2p::CommonTransport::new() .with_upgrade({ let secio = secio::SecioConfig { key: local_private_key, From 12489cdf270d886eb318e91c0d6b55b4c09aeb99 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 28 Jul 2018 15:55:43 +0200 Subject: [PATCH 2/5] Update libp2p (#442) --- Cargo.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3b15b294bbe05..0cb3f075c72ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cid" version = "0.2.3" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -406,7 +406,7 @@ dependencies = [ [[package]] name = "datastore" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1136,7 +1136,7 @@ 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?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1165,7 +1165,7 @@ dependencies = [ [[package]] name = "libp2p-core" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1186,7 +1186,7 @@ dependencies = [ [[package]] name = "libp2p-dns" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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?branch=polkadot-2)", @@ -1199,7 +1199,7 @@ dependencies = [ [[package]] name = "libp2p-floodsub" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1220,7 +1220,7 @@ dependencies = [ [[package]] name = "libp2p-identify" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1239,7 +1239,7 @@ dependencies = [ [[package]] name = "libp2p-kad" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1266,7 +1266,7 @@ dependencies = [ [[package]] name = "libp2p-mplex" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1282,7 +1282,7 @@ dependencies = [ [[package]] name = "libp2p-peerstore" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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?branch=polkadot-2)", @@ -1297,7 +1297,7 @@ dependencies = [ [[package]] name = "libp2p-ping" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1314,7 +1314,7 @@ dependencies = [ [[package]] name = "libp2p-ratelimit" version = "0.1.1" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1327,7 +1327,7 @@ dependencies = [ [[package]] name = "libp2p-relay" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1345,7 +1345,7 @@ dependencies = [ [[package]] name = "libp2p-secio" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1365,7 +1365,7 @@ dependencies = [ [[package]] name = "libp2p-tcp-transport" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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?branch=polkadot-2)", @@ -1378,7 +1378,7 @@ dependencies = [ [[package]] name = "libp2p-transport-timeout" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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?branch=polkadot-2)", @@ -1389,7 +1389,7 @@ dependencies = [ [[package]] name = "libp2p-websocket" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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?branch=polkadot-2)", @@ -1404,7 +1404,7 @@ dependencies = [ [[package]] name = "libp2p-yamux" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1544,7 +1544,7 @@ dependencies = [ [[package]] name = "multiaddr" version = "0.3.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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?branch=polkadot-2)", @@ -1562,7 +1562,7 @@ dependencies = [ [[package]] name = "multihash" version = "0.8.1-pre" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -1572,7 +1572,7 @@ dependencies = [ [[package]] name = "multistream-select" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -2355,7 +2355,7 @@ dependencies = [ [[package]] name = "rw-stream-sink" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", @@ -3700,7 +3700,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "varint" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#42edb329c2927720d3db3a9e6f5f4c0935ba5e4a" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" 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)", From f67968de3041ff93a5c01eb4c7ba44511a443ac9 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 28 Jul 2018 17:33:50 +0200 Subject: [PATCH 3/5] Fix the public key of bootnode 3 (#441) --- polkadot/service/res/krummelanke.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot/service/res/krummelanke.json b/polkadot/service/res/krummelanke.json index 510c1e467c8ce..0e76ea124b98f 100644 --- a/polkadot/service/res/krummelanke.json +++ b/polkadot/service/res/krummelanke.json @@ -43,7 +43,7 @@ "bootNodes": [ "/ip4/104.211.54.233/tcp/30333/p2p/QmRMGcQh69t8a8YwzHkofVo9SFr7ffggUwhAYjVSTChmrd", "/ip4/104.211.48.51/tcp/30333/p2p/QmWCnXrhM1in1qPqVT3rDXQEJHedAzbPDMimdjqy2P9fGn", - "/ip4/104.211.48.247/tcp/30333/p2p/QmYPx99i3H8EKXrvYHTBwqz3jjFC1kBfkvmSKd2h9zwQFr", + "/ip4/104.211.48.247/tcp/30333/p2p/QmY33GW69TnTsdQWjAkxJR1GrWTdeV1PmzzcSmUay4HvAB", "/ip4/40.114.120.164/tcp/30333/p2p/QmWzYU5X1NpFrprD1YZF5Lcj9aE5WF4QEg5FpvQx5XGWG7", "/ip4/40.117.153.33/tcp/30333/p2p/QmSz8qCADMmi92QB8dTqMPu56JYQQKZBAHz7y8KXjvqcvW" ], From ff36d2eae2204f21807b45a9381a6b7d0c589fdd Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Sat, 28 Jul 2018 19:25:51 +0200 Subject: [PATCH 4/5] Update version on git head change (#444) --- build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/build.rs b/build.rs index 493d25315c8f9..efe19e0a8da33 100644 --- a/build.rs +++ b/build.rs @@ -22,4 +22,5 @@ const ERROR_MSG: &'static str = "Failed to generate metadata files"; fn main() { vergen(OutputFns::all()).expect(ERROR_MSG); + println!("cargo:rerun-if-changed=.git/HEAD"); } From a118a85230630e4b9267aa9277448c0a02e8f17d Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sun, 29 Jul 2018 09:56:02 +0200 Subject: [PATCH 5/5] Update libp2p again (#445) --- Cargo.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0cb3f075c72ed..0c6f0cfe49c10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -257,7 +257,7 @@ dependencies = [ [[package]] name = "cid" version = "0.2.3" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -406,7 +406,7 @@ dependencies = [ [[package]] name = "datastore" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1136,7 +1136,7 @@ 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?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1165,7 +1165,7 @@ dependencies = [ [[package]] name = "libp2p-core" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1186,7 +1186,7 @@ dependencies = [ [[package]] name = "libp2p-dns" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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?branch=polkadot-2)", @@ -1199,7 +1199,7 @@ dependencies = [ [[package]] name = "libp2p-floodsub" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1220,7 +1220,7 @@ dependencies = [ [[package]] name = "libp2p-identify" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1239,7 +1239,7 @@ dependencies = [ [[package]] name = "libp2p-kad" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1266,7 +1266,7 @@ dependencies = [ [[package]] name = "libp2p-mplex" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1282,7 +1282,7 @@ dependencies = [ [[package]] name = "libp2p-peerstore" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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?branch=polkadot-2)", @@ -1297,7 +1297,7 @@ dependencies = [ [[package]] name = "libp2p-ping" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1314,7 +1314,7 @@ dependencies = [ [[package]] name = "libp2p-ratelimit" version = "0.1.1" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1327,7 +1327,7 @@ dependencies = [ [[package]] name = "libp2p-relay" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1345,7 +1345,7 @@ dependencies = [ [[package]] name = "libp2p-secio" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1365,7 +1365,7 @@ dependencies = [ [[package]] name = "libp2p-tcp-transport" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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?branch=polkadot-2)", @@ -1378,7 +1378,7 @@ dependencies = [ [[package]] name = "libp2p-transport-timeout" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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?branch=polkadot-2)", @@ -1389,7 +1389,7 @@ dependencies = [ [[package]] name = "libp2p-websocket" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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?branch=polkadot-2)", @@ -1404,7 +1404,7 @@ dependencies = [ [[package]] name = "libp2p-yamux" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1544,7 +1544,7 @@ dependencies = [ [[package]] name = "multiaddr" version = "0.3.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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?branch=polkadot-2)", @@ -1562,7 +1562,7 @@ dependencies = [ [[package]] name = "multihash" version = "0.8.1-pre" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -1572,7 +1572,7 @@ dependencies = [ [[package]] name = "multistream-select" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -2355,7 +2355,7 @@ dependencies = [ [[package]] name = "rw-stream-sink" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)", @@ -3700,7 +3700,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "varint" version = "0.1.0" -source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#0d7efa9a94ee61fbafc6b69d9df5ebcdce22f258" +source = "git+https://github.com/tomaka/libp2p-rs?branch=polkadot-2#725f9f78ebeddc038941316f120a99daaebc9231" 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)",