diff --git a/Cargo.lock b/Cargo.lock index 5e9692c796da9..d0148be8b079f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -444,7 +444,7 @@ dependencies = [ [[package]] name = "datastore" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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)", @@ -1160,27 +1160,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libp2p" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-dns 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-floodsub 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-identify 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-kad 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-mplex 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-peerstore 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-ping 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-ratelimit 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-relay 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-secio 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-tcp-transport 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-transport-timeout 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-uds 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-websocket 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-yamux 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-dns 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-floodsub 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-kad 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-mplex 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-ratelimit 0.1.1 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-relay 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-secio 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-tcp-transport 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-transport-timeout 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-uds 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-websocket 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-yamux 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "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-current-thread 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1190,20 +1190,20 @@ dependencies = [ [[package]] name = "libp2p-core" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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.5 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "multihash 0.8.1-pre (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "multistream-select 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "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)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "smallvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1211,12 +1211,12 @@ dependencies = [ [[package]] name = "libp2p-dns" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "tokio-dns-unofficial 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1224,60 +1224,60 @@ dependencies = [ [[package]] name = "libp2p-floodsub" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "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)", "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.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-identify" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-peerstore 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "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)", "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-kad" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-identify 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-ping 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "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)", "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1285,35 +1285,35 @@ dependencies = [ "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-mplex" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.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.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-peerstore" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" dependencies = [ "bs58 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "datastore 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "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.70 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1322,14 +1322,14 @@ dependencies = [ [[package]] name = "libp2p-ping" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "multistream-select 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "parking_lot 0.6.2 (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)", @@ -1339,11 +1339,11 @@ dependencies = [ [[package]] name = "libp2p-ratelimit" version = "0.1.1" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1352,25 +1352,25 @@ dependencies = [ [[package]] name = "libp2p-relay" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "libp2p-peerstore 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "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.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-secio" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" dependencies = [ "aes-ctr 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "asn1_der 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1378,12 +1378,12 @@ dependencies = [ "ctr 0.1.0 (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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.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.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "twofish 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1392,12 +1392,12 @@ dependencies = [ [[package]] name = "libp2p-tcp-transport" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "tk-listen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1406,10 +1406,10 @@ dependencies = [ [[package]] name = "libp2p-transport-timeout" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1417,38 +1417,38 @@ dependencies = [ [[package]] name = "libp2p-uds" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "tokio-uds 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-websocket" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" dependencies = [ "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", - "rw-stream-sink 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", + "rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "stdweb 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "websocket 0.20.2 (registry+https://github.com/rust-lang/crates.io-index)", + "websocket 0.20.3 (git+https://github.com/tomaka/rust-websocket?branch=send)", ] [[package]] name = "libp2p-yamux" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1595,19 +1595,19 @@ dependencies = [ [[package]] name = "multiaddr" version = "0.3.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" dependencies = [ "bs58 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "integer-encoding 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "multihash 0.8.1-pre (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "multihash" version = "0.8.1-pre" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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)", @@ -1617,14 +1617,14 @@ dependencies = [ [[package]] name = "multistream-select" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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.5 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2222,7 +2222,7 @@ dependencies = [ "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (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]] @@ -2407,7 +2407,7 @@ dependencies = [ [[package]] name = "rw-stream-sink" version = "0.1.0" -source = "git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88#e2960b4317b22d64c4fca7fa77c6124a44a92f88" +source = "git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5#8ac9b65e669ebbd9deeffa9d4566c95f631cfed5" 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)", @@ -2872,7 +2872,7 @@ dependencies = [ "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)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)", + "libp2p 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common.git)", "parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2883,7 +2883,7 @@ dependencies = [ "tokio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unsigned-varint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3792,7 +3792,7 @@ dependencies = [ [[package]] name = "unsigned-varint" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3910,6 +3910,27 @@ dependencies = [ "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "websocket" +version = "0.20.3" +source = "git+https://github.com/tomaka/rust-websocket?branch=send#28ea5eb82b573bf3ace2fc75c36d791bcedf08b1" +dependencies = [ + "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 0.9.1 (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)", + "futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.2.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-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -4044,7 +4065,7 @@ dependencies = [ "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" "checksum ctr 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50ac3add446ec1f8fe3dc007cd838f5b22bbf33186394feac505451ecc43c018" "checksum ctrlc 1.1.1 (git+https://github.com/paritytech/rust-ctrlc.git)" = "" -"checksum datastore 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" +"checksum datastore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" "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" @@ -4112,23 +4133,23 @@ 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.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" -"checksum libp2p 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-core 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-dns 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-floodsub 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-identify 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-kad 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-mplex 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-peerstore 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-ping 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-ratelimit 0.1.1 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-relay 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-secio 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-tcp-transport 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-transport-timeout 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-uds 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-websocket 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum libp2p-yamux 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" +"checksum libp2p 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-core 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-dns 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-floodsub 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-identify 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-kad 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-mplex 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-peerstore 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-ping 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-ratelimit 0.1.1 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-relay 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-secio 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-tcp-transport 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-transport-timeout 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-uds 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-websocket 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum libp2p-yamux 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" "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" @@ -4145,9 +4166,9 @@ dependencies = [ "checksum mio 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "6d771e3ef92d58a8da8df7d6976bfca9371ed1de6619d9d5a5ce5b1f29b85bfe" "checksum mio-uds 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "84c7b5caa3a118a6e34dbac36504503b1e8dc5835e833306b9d6af0e05929f79" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum multiaddr 0.3.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum multihash 0.8.1-pre (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" -"checksum multistream-select 0.1.0 (git+https://github.com/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" +"checksum multiaddr 0.3.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum multihash 0.8.1-pre (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" +"checksum multistream-select 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" "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" @@ -4210,7 +4231,7 @@ dependencies = [ "checksum rustc-hex 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b03280c2813907a030785570c577fb27d3deec8da4c18566751ade94de0ace" "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/libp2p/rust-libp2p?rev=e2960b4317b22d64c4fca7fa77c6124a44a92f88)" = "" +"checksum rw-stream-sink 0.1.0 (git+https://github.com/tomaka/libp2p-rs?rev=8ac9b65e669ebbd9deeffa9d4566c95f631cfed5)" = "" "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" @@ -4293,7 +4314,7 @@ dependencies = [ "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum unsigned-varint 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9d184b340077c4fdf63bc884a71c3c7d01e905167daf9003eb8131aaddb605" +"checksum unsigned-varint 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb8abc4b7d8158bdfbbaaccc35331ed3c30c2673e99000d7ae665a2eb6576f4" "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" @@ -4307,6 +4328,7 @@ dependencies = [ "checksum want 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a05d9d966753fa4b5c8db73fcab5eed4549cfe0e1e4e66911e5564a0085c35d1" "checksum wasmi 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b4a6d379e9332b1b1f52c5a87f2481c85c7c931d8ec411963dfb8f26b1ec1e3" "checksum websocket 0.20.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eb277e7f4c23dc49176f74ae200e77651764efb2c25f56ad2d22623b63826369" +"checksum websocket 0.20.3 (git+https://github.com/tomaka/rust-websocket?branch=send)" = "" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/substrate/network-libp2p/Cargo.toml b/substrate/network-libp2p/Cargo.toml index d3292f0faea1c..0cfdaddcef8c7 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/libp2p/rust-libp2p", rev = "e2960b4317b22d64c4fca7fa77c6124a44a92f88", default-features = false, features = ["libp2p-secio", "libp2p-secio-secp256k1"] } +libp2p = { git = "https://github.com/tomaka/libp2p-rs", rev = "8ac9b65e669ebbd9deeffa9d4566c95f631cfed5", default-features = false, features = ["libp2p-secio", "libp2p-secio-secp256k1"] } ethcore-io = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" } ethkey = { git = "https://github.com/paritytech/parity.git", rev = "202c54d42398fc4b49d67ffbf9070522e38f9360" } ethereum-types = "0.3" @@ -25,7 +25,7 @@ serde_json = "1.0.24" tokio = "0.1" tokio-io = "0.1" tokio-timer = "0.2" -unsigned-varint = { version = "0.2", features = ["codec"] } +unsigned-varint = { version = "0.2.1", features = ["codec"] } [dev-dependencies] assert_matches = "1.2" diff --git a/substrate/network-libp2p/src/custom_proto.rs b/substrate/network-libp2p/src/custom_proto.rs index 4fe2ee65a0d9b..72807f21e8f2e 100644 --- a/substrate/network-libp2p/src/custom_proto.rs +++ b/substrate/network-libp2p/src/custom_proto.rs @@ -64,7 +64,7 @@ pub struct RegisteredProtocolOutput { /// Stream where incoming messages are received. The stream ends whenever /// either side is closed. - pub incoming: Box>, + pub incoming: Box + Send>, } impl RegisteredProtocol { @@ -101,8 +101,8 @@ impl RegisteredProtocol { // `Maf` is short for `MultiaddressFuture` impl ConnectionUpgrade for RegisteredProtocol -where C: AsyncRead + AsyncWrite + 'static, // TODO: 'static :-/ - Maf: Future + 'static, // TODO: 'static :( +where C: AsyncRead + AsyncWrite + Send + 'static, // TODO: 'static :-/ + Maf: Future + Send + 'static, // TODO: 'static :( { type NamesIter = VecIntoIter<(Bytes, Self::UpgradeIdentifier)>; type UpgradeIdentifier = u8; // Protocol version @@ -252,8 +252,8 @@ impl Default for RegisteredProtocols { } impl ConnectionUpgrade for RegisteredProtocols -where C: AsyncRead + AsyncWrite + 'static, // TODO: 'static :-/ - Maf: Future + 'static, // TODO: 'static :( +where C: AsyncRead + AsyncWrite + Send + 'static, // TODO: 'static :-/ + Maf: Future + Send + 'static, // TODO: 'static :( { type NamesIter = VecIntoIter<(Bytes, Self::UpgradeIdentifier)>; type UpgradeIdentifier = (usize, diff --git a/substrate/network-libp2p/src/service.rs b/substrate/network-libp2p/src/service.rs index beea3728067ae..0384508d11709 100644 --- a/substrate/network-libp2p/src/service.rs +++ b/substrate/network-libp2p/src/service.rs @@ -395,7 +395,7 @@ fn init_thread( }); let shared = shared.clone(); - base.and_then(move |(peer_id, stream), endpoint, remote_addr| { + Transport::and_then(base, move |(peer_id, stream), endpoint, remote_addr| { remote_addr.and_then(move |remote_addr| { if &peer_id == shared.kad_system.local_peer_id() { // TODO: this happens very frequently for now and floods the logs @@ -570,13 +570,13 @@ struct TransportOutput { /// Enum of all the possible protocols our service handles. enum FinalUpgrade { - Kad(NodeIndex, KadConnecController, Box>), + Kad(NodeIndex, KadConnecController, Box + Send>), /// The remote identification system, and the multiaddress we see the remote as. IdentifyListener(NodeIndex, IdentifySender, Multiaddr), /// The remote information about the address they see us as. IdentifyDialer(NodeIndex, IdentifyInfo, Multiaddr), - PingDialer(NodeIndex, ping::Pinger, Box>), - PingListener(NodeIndex, Box>), + PingDialer(NodeIndex, ping::Pinger, Box + Send>), + PingListener(NodeIndex, Box + Send>), /// `Custom` means anything not in the core libp2p and is handled /// by `CustomProtoConnectionUpgrade`. Custom(NodeIndex, RegisteredProtocolOutput>), @@ -608,8 +608,8 @@ impl From<(NodeIndex, IdentifyOutput, Multiaddr)> for FinalUpgrade { fn listener_handle<'a, C>( shared: Arc, upgrade: FinalUpgrade, -) -> Box + 'a> - where C: AsyncRead + AsyncWrite + 'a { +) -> Box + Send + 'a> + where C: AsyncRead + AsyncWrite + Send + 'a { match upgrade { FinalUpgrade::Kad(node_index, controller, kademlia_stream) => { trace!(target: "sub-libp2p", "Opened kademlia substream with #{:?}", node_index); @@ -669,7 +669,7 @@ fn handle_kademlia_connection( shared: Arc, node_index: NodeIndex, controller: KadConnecController, - kademlia_stream: Box> + kademlia_stream: Box + Send> ) -> Result, IoError> { let kad_connec = match shared.network_state.kad_connection(node_index) { Some(kad) => kad, @@ -762,7 +762,7 @@ fn handle_custom_connection( shared: Arc, node_index: NodeIndex, custom_proto_out: RegisteredProtocolOutput> -) -> impl Future { +) -> Box + Send> { let handler = custom_proto_out.custom_data; let protocol_id = custom_proto_out.protocol_id; @@ -776,7 +776,7 @@ fn handle_custom_connection( protocol_id, ) { Some(c) => c, - None => return future::Either::A(future::err(IoErrorKind::Other.into())), + None => return Box::new(future::err(IoErrorKind::Other.into())) as Box<_>, }; if let UniqueConnecState::Full = unique_connec.state() { @@ -785,7 +785,7 @@ fn handle_custom_connection( node_index, custom_proto_out.protocol_id ); - return future::Either::A(future::ok(())) + return Box::new(future::ok(())) as Box<_> } struct ProtoDisconnectGuard { @@ -868,7 +868,7 @@ fn handle_custom_connection( current_peer: Some(node_index), }, &node_index); - future::Either::B(final_fut) + Box::new(final_fut) as Box<_> } /// Randomly discovers peers to connect to. @@ -878,13 +878,24 @@ fn handle_custom_connection( fn start_kademlia_discovery( shared: Arc, transport: T, - swarm_controller: SwarmController>> -) -> impl Future - where T: MuxedTransport> + Clone + 'static, - T::MultiaddrFuture: 'static, - To: AsyncRead + AsyncWrite + 'static, - St: MuxedTransport> + Clone + 'static, - C: 'static { + swarm_controller: SwarmController + Send>> +) -> Box + Send> + where T: MuxedTransport> + Clone + Send + 'static, + T::Dial: Send, + T::MultiaddrFuture: Send + 'static, + T::Listener: Send, + T::ListenerUpgrade: Send, + T::Incoming: Send, + T::IncomingUpgrade: Send, + To: AsyncRead + AsyncWrite + Send + 'static, + St: MuxedTransport> + Clone + Send + 'static, + St::Dial: Send, + St::MultiaddrFuture: Send, + St::Listener: Send, + St::ListenerUpgrade: Send, + St::Incoming: Send, + St::IncomingUpgrade: Send, + C: Send + 'static { let kad_init = shared.kad_system.perform_initialization({ let shared = shared.clone(); let transport = transport.clone(); @@ -918,7 +929,7 @@ fn start_kademlia_discovery( .and_then(|(_, rest)| rest); // Note that we use a Box in order to speed compilation time. - Box::new(final_future) as Box> + Box::new(final_future) as Box + Send> } /// Performs a kademlia request to a random node. @@ -927,13 +938,24 @@ fn start_kademlia_discovery( fn perform_kademlia_query( shared: Arc, transport: T, - swarm_controller: SwarmController>> -) -> impl Future - where T: MuxedTransport> + Clone + 'static, - T::MultiaddrFuture: 'static, - To: AsyncRead + AsyncWrite + 'static, - St: MuxedTransport> + Clone + 'static, - C: 'static { + swarm_controller: SwarmController + Send>> +) -> Box + Send> + where T: MuxedTransport> + Clone + Send + 'static, + T::MultiaddrFuture: Send + 'static, + T::Dial: Send, + T::Listener: Send, + T::ListenerUpgrade: Send, + T::Incoming: Send, + T::IncomingUpgrade: Send, + To: AsyncRead + AsyncWrite + Send + 'static, + St: MuxedTransport> + Send + Clone + 'static, + St::Dial: Send, + St::MultiaddrFuture: Send, + St::Listener: Send, + St::ListenerUpgrade: Send, + St::Incoming: Send, + St::IncomingUpgrade: Send, + C: Send + 'static { // Query the node IDs that are closest to a random ID. // Note that the randomness doesn't have to be secure, as this only // influences which nodes we end up being connected to. @@ -969,20 +991,31 @@ fn perform_kademlia_query( .map(|_| ()); // Note that we use a `Box` in order to speed up compilation. - Box::new(future) as Box> + Box::new(future) as Box + Send> } /// Connects to additional nodes, if necessary. fn connect_to_nodes( shared: Arc, base_transport: T, - swarm_controller: &SwarmController>> + swarm_controller: &SwarmController + Send>> ) - where T: MuxedTransport> + Clone + 'static, - T::MultiaddrFuture: 'static, - To: AsyncRead + AsyncWrite + 'static, - St: MuxedTransport> + Clone + 'static, - C: 'static { + where T: MuxedTransport> + Clone + Send + 'static, + T::MultiaddrFuture: Send + 'static, + T::Dial: Send, + T::Listener: Send, + T::ListenerUpgrade: Send, + T::Incoming: Send, + T::IncomingUpgrade: Send, + To: AsyncRead + AsyncWrite + Send + 'static, + St: MuxedTransport> + Clone + Send + 'static, + St::Dial: Send, + St::MultiaddrFuture: Send, + St::Listener: Send, + St::ListenerUpgrade: Send, + St::Incoming: Send, + St::IncomingUpgrade: Send, + C: Send + 'static { let (addrs, _will_change) = shared.network_state.outgoing_connections_to_attempt(); for (peer, addr) in addrs.into_iter() { @@ -1016,13 +1049,24 @@ fn open_peer_custom_proto( addr: Multiaddr, expected_peer_id: Option, proto: RegisteredProtocol>, - swarm_controller: &SwarmController>> + swarm_controller: &SwarmController + Send>> ) - where T: MuxedTransport> + Clone + 'static, - T::MultiaddrFuture: 'static, - To: AsyncRead + AsyncWrite + 'static, - St: MuxedTransport> + Clone + 'static, - C: 'static, + where T: MuxedTransport> + Clone + Send + 'static, + T::MultiaddrFuture: Send + 'static, + T::Dial: Send, + T::Listener: Send, + T::ListenerUpgrade: Send, + T::Incoming: Send, + T::IncomingUpgrade: Send, + To: AsyncRead + AsyncWrite + Send + 'static, + St: MuxedTransport> + Clone + Send + 'static, + St::Dial: Send, + St::MultiaddrFuture: Send, + St::Listener: Send, + St::ListenerUpgrade: Send, + St::Incoming: Send, + St::IncomingUpgrade: Send, + C: Send + 'static, { let proto_id = proto.id(); @@ -1078,13 +1122,24 @@ fn obtain_kad_connection( shared: Arc, who: PeerstorePeerId, transport: T, - swarm_controller: SwarmController>> -) -> impl Future - where T: MuxedTransport> + Clone + 'static, - T::MultiaddrFuture: 'static, - To: AsyncRead + AsyncWrite + 'static, - St: MuxedTransport> + Clone + 'static, - C: 'static { + swarm_controller: SwarmController + Send>> +) -> Box + Send> + where T: MuxedTransport> + Clone + Send + 'static, + T::MultiaddrFuture: Send + 'static, + T::Dial: Send, + T::Listener: Send, + T::ListenerUpgrade: Send, + T::Incoming: Send, + T::IncomingUpgrade: Send, + To: AsyncRead + AsyncWrite + Send + 'static, + St: MuxedTransport> + Clone + Send + 'static, + St::Dial: Send, + St::MultiaddrFuture: Send, + St::Listener: Send, + St::ListenerUpgrade: Send, + St::Incoming: Send, + St::IncomingUpgrade: Send, + C: Send + 'static { let kad_upgrade = shared.kad_upgrade.clone(); let transport = transport .and_then(move |out, endpoint, client_addr| { @@ -1116,7 +1171,7 @@ fn obtain_kad_connection( .and_then(|(kad, _)| kad.ok_or_else(|| IoErrorKind::ConnectionRefused.into())); // Note that we use a Box in order to speed up compilation. - Box::new(future) as Box> + Box::new(future) as Box + Send> } /// Processes the identification information that we received about a node. @@ -1165,13 +1220,24 @@ fn process_identify_info( fn start_periodic_updates( shared: Arc, transport: T, - swarm_controller: SwarmController>> -) -> impl Future - where T: MuxedTransport> + Clone + 'static, - T::MultiaddrFuture: 'static, - To: AsyncRead + AsyncWrite + 'static, - St: MuxedTransport> + Clone + 'static, - C: 'static { + swarm_controller: SwarmController + Send>> +) -> Box + Send> + where T: MuxedTransport> + Clone + Send + 'static, + T::MultiaddrFuture: Send + 'static, + T::Dial: Send, + T::Listener: Send, + T::ListenerUpgrade: Send, + T::Incoming: Send, + T::IncomingUpgrade: Send, + To: AsyncRead + AsyncWrite + Send + 'static, + St: MuxedTransport> + Clone + Send + 'static, + St::Dial: Send, + St::MultiaddrFuture: Send, + St::Listener: Send, + St::ListenerUpgrade: Send, + St::Incoming: Send, + St::IncomingUpgrade: Send, + C: Send + 'static { let ping_transport = transport.clone() .and_then(move |out, endpoint, client_addr| { let node_index = out.node_index; @@ -1207,7 +1273,7 @@ fn start_periodic_updates( }); // Note that we use a Box in order to speed compilation time. - Box::new(fut) as Box> + Box::new(fut) as Box + Send> } /// Pings all the nodes we're connected to and disconnects any node that @@ -1217,14 +1283,32 @@ fn periodic_updates( shared: Arc, ping_transport: Tp, identify_transport: Tid, - swarm_controller: &SwarmController>> -) -> impl Future - where Tp: MuxedTransport> + Clone + 'static, - Tp::MultiaddrFuture: 'static, - Tid: MuxedTransport> + Clone + 'static, - Tid::MultiaddrFuture: 'static, - St: MuxedTransport> + Clone + 'static, - C: 'static { + swarm_controller: &SwarmController + Send>> +) -> Box + Send> + where Tp: MuxedTransport> + Clone + Send + 'static, + Tp::MultiaddrFuture: Send + 'static, + Tp::Dial: Send, + Tp::MultiaddrFuture: Send, + Tp::Listener: Send, + Tp::ListenerUpgrade: Send, + Tp::Incoming: Send, + Tp::IncomingUpgrade: Send, + Tid: MuxedTransport> + Clone + Send + 'static, + Tid::MultiaddrFuture: Send + 'static, + Tid::Dial: Send, + Tid::MultiaddrFuture: Send, + Tid::Listener: Send, + Tid::ListenerUpgrade: Send, + Tid::Incoming: Send, + Tid::IncomingUpgrade: Send, + St: MuxedTransport> + Clone + Send + 'static, + St::Dial: Send, + St::MultiaddrFuture: Send, + St::Listener: Send, + St::ListenerUpgrade: Send, + St::Incoming: Send, + St::IncomingUpgrade: Send, + C: Send + 'static { trace!(target: "sub-libp2p", "Periodic update cycle"); let mut ping_futures = Vec::new(); @@ -1282,7 +1366,7 @@ fn periodic_updates( }); // Note that we use a Box in order to speed up compilation. - Box::new(future) as Box> + Box::new(future) as Box + Send> } /// Since new protocols are added after the networking starts, we have to load the protocols list @@ -1291,8 +1375,8 @@ fn periodic_updates( struct DelayedProtosList(Arc); // `Maf` is short for `MultiaddressFuture` impl ConnectionUpgrade for DelayedProtosList -where C: AsyncRead + AsyncWrite + 'static, // TODO: 'static :-/ - Maf: Future + 'static, // TODO: 'static :( +where C: AsyncRead + AsyncWrite + Send + 'static, // TODO: 'static :-/ + Maf: Future + Send + 'static, // TODO: 'static :( { type NamesIter = > as ConnectionUpgrade>::NamesIter; type UpgradeIdentifier = > as ConnectionUpgrade>::UpgradeIdentifier; diff --git a/substrate/network-libp2p/src/transport.rs b/substrate/network-libp2p/src/transport.rs index d193b642e9361..8acb9ecab0828 100644 --- a/substrate/network-libp2p/src/transport.rs +++ b/substrate/network-libp2p/src/transport.rs @@ -15,7 +15,7 @@ // along with Substrate. If not, see . use libp2p::{self, PeerId, Transport, mplex, secio, yamux}; -use libp2p::core::{MuxedTransport, either, upgrade}; +use libp2p::core::{either, upgrade, transport::BoxedMuxed}; use libp2p::transport_timeout::TransportTimeout; use std::time::Duration; use std::usize; @@ -24,7 +24,7 @@ use tokio_io::{AsyncRead, AsyncWrite}; /// Builds the transport that serves as a common ground for all connections. pub fn build_transport( local_private_key: secio::SecioKeyPair -) -> impl MuxedTransport + Clone { +) -> BoxedMuxed<(PeerId, impl AsyncRead + AsyncWrite)> { let mut mplex_config = mplex::MplexConfig::new(); mplex_config.max_buffer_len_behaviour(mplex::MaxBufferBehaviour::Block); mplex_config.max_buffer_len(usize::MAX); @@ -46,4 +46,5 @@ pub fn build_transport( .map(|(key, substream), _| (key.into_peer_id(), substream)); TransportTimeout::new(base, Duration::from_secs(20)) + .boxed_muxed() }