diff --git a/Cargo.lock b/Cargo.lock index 81e7af5bc..b6495f3a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -61,6 +61,14 @@ dependencies = [ "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ahash" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "const-random 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "aho-corasick" version = "0.7.6" @@ -583,6 +591,24 @@ dependencies = [ "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "const-random" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "const-random-macro 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "const-random-macro" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "constant_time_eq" version = "0.1.4" @@ -970,12 +996,12 @@ dependencies = [ [[package]] name = "enr" version = "0.1.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1080,8 +1106,9 @@ dependencies = [ name = "eth2-libp2p" version = "0.1.0" dependencies = [ + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_ssz 0.1.2", "eth2_ssz_derive 0.1.0", @@ -1089,10 +1116,12 @@ dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "lighthouse_metrics 0.1.0", + "lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "slog-async 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-stdlog 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1472,6 +1501,15 @@ name = "hashbrown" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "hashbrown" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "heapsize" version = "0.4.2" @@ -1836,35 +1874,35 @@ dependencies = [ [[package]] name = "libp2p" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-floodsub 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-identify 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-kad 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-noise 0.11.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-plaintext 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-secio 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-floodsub 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-identify 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-kad 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-noise 0.11.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-plaintext 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-secio 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1876,7 +1914,7 @@ dependencies = [ [[package]] name = "libp2p-core" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "asn1_der 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1888,15 +1926,15 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "multistream-select 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "multistream-select 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1911,7 +1949,7 @@ dependencies = [ [[package]] name = "libp2p-core-derive" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1920,34 +1958,34 @@ dependencies = [ [[package]] name = "libp2p-deflate" version = "0.5.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libp2p-discv5" version = "0.1.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "bigint 4.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "hkdf 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "libsecp256k1 0.3.1 (git+https://github.com/SigP/libsecp256k1?branch=ecdh_generalise)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.10.26 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1962,10 +2000,10 @@ dependencies = [ [[package]] name = "libp2p-dns" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-dns-unofficial 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1973,15 +2011,15 @@ dependencies = [ [[package]] name = "libp2p-floodsub" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "cuckoofilter 0.3.2 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1991,7 +2029,7 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" version = "0.1.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1999,8 +2037,8 @@ dependencies = [ "bytes 0.4.12 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "lru 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2016,14 +2054,14 @@ dependencies = [ [[package]] name = "libp2p-identify" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2035,18 +2073,18 @@ dependencies = [ [[package]] name = "libp2p-kad" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "either 1.5.3 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2062,16 +2100,16 @@ dependencies = [ [[package]] name = "libp2p-mdns" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2084,12 +2122,12 @@ dependencies = [ [[package]] name = "libp2p-mplex" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "bytes 0.4.12 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2100,13 +2138,13 @@ dependencies = [ [[package]] name = "libp2p-noise" version = "0.11.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2120,14 +2158,14 @@ dependencies = [ [[package]] name = "libp2p-ping" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2137,14 +2175,14 @@ dependencies = [ [[package]] name = "libp2p-plaintext" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2152,7 +2190,7 @@ dependencies = [ [[package]] name = "libp2p-secio" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2161,13 +2199,13 @@ dependencies = [ "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2181,10 +2219,10 @@ dependencies = [ [[package]] name = "libp2p-swarm" version = "0.3.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2194,13 +2232,13 @@ dependencies = [ [[package]] name = "libp2p-tcp" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "ipnet 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2210,10 +2248,10 @@ dependencies = [ [[package]] name = "libp2p-uds" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2221,11 +2259,11 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" version = "0.6.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2235,13 +2273,13 @@ dependencies = [ [[package]] name = "libp2p-websocket" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "soketto 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2253,10 +2291,10 @@ dependencies = [ [[package]] name = "libp2p-yamux" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "yamux 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2425,6 +2463,14 @@ dependencies = [ "hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "lru" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "matches" version = "0.1.8" @@ -2559,7 +2605,7 @@ dependencies = [ [[package]] name = "multistream-select" version = "0.6.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2771,14 +2817,14 @@ dependencies = [ [[package]] name = "parity-multiaddr" version = "0.6.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2788,7 +2834,7 @@ dependencies = [ [[package]] name = "parity-multihash" version = "0.2.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "blake2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2929,6 +2975,16 @@ dependencies = [ "uint 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "proc-macro2" version = "0.4.30" @@ -3442,7 +3498,7 @@ dependencies = [ [[package]] name = "rw-stream-sink" version = "0.1.2" -source = "git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701#3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" +source = "git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf#65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5062,6 +5118,7 @@ dependencies = [ "checksum aes-ctr 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2e5b0458ea3beae0d1d8c0f3946564f8e10f90646cf78c06b4351052058d1ee" "checksum aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" "checksum aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" +"checksum ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3" "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" "checksum amcl 0.1.0 (git+https://github.com/sigp/milagro_bls?tag=v0.11.1)" = "" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" @@ -5109,6 +5166,8 @@ dependencies = [ "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum colored 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "433e7ac7d511768127ed85b0c4947f47a254131e37864b2dc13f52aa32cd37e5" "checksum console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" +"checksum const-random 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7b641a8c9867e341f3295564203b1c250eb8ce6cb6126e007941f78c4d2ed7fe" +"checksum const-random-macro 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c750ec12b83377637110d5a57f5ae08e895b06c4b16e2bdbf1a94ef717428c59" "checksum constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120" "checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" "checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" @@ -5147,7 +5206,7 @@ dependencies = [ "checksum ed25519-dalek 1.0.0-pre.2 (registry+https://github.com/rust-lang/crates.io-index)" = "845aaacc16f01178f33349e7c992ecd0cee095aa5e577f0f4dee35971bd36455" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" "checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" -"checksum enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" +"checksum enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" "checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" "checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" @@ -5179,6 +5238,7 @@ dependencies = [ "checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" "checksum hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" +"checksum hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" "checksum heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" @@ -5217,28 +5277,28 @@ dependencies = [ "checksum leveldb-sys 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71f46429bb70612c3e939aaeed27ffd31a24a773d21728a1a426e4089d6778d2" "checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" "checksum libflate 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)" = "d9135df43b1f5d0e333385cb6e7897ecd1a43d7d11b91ac003f4d2c2d2401fdd" -"checksum libp2p 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-floodsub 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-identify 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-kad 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-noise 0.11.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-plaintext 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-secio 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" +"checksum libp2p 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-core 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-floodsub 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-identify 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-kad 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-noise 0.11.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-plaintext 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-secio 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" "checksum libsecp256k1 0.3.1 (git+https://github.com/SigP/libsecp256k1?branch=ecdh_generalise)" = "" "checksum libsecp256k1 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2bd9a7c16c9487e710536b699c962f022266347c94201174aa0a7eb0546051aa" "checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" @@ -5249,6 +5309,7 @@ dependencies = [ "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum lru 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "5d8f669d42c72d18514dfca8115689c5f6370a17d980cb5bd777a67f404594c8" +"checksum lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" @@ -5262,7 +5323,7 @@ dependencies = [ "checksum mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum multistream-select 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" +"checksum multistream-select 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" @@ -5279,8 +5340,8 @@ dependencies = [ "checksum openssl-sys 0.9.53 (registry+https://github.com/rust-lang/crates.io-index)" = "465d16ae7fc0e313318f7de5cecf57b2fbe7511fd213978b457e1c96ff46736f" "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parity-codec 3.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2b9df1283109f542d8852cd6b30e9341acc2137481eb6157d2e62af68b0afec9" -"checksum parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" -"checksum parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" +"checksum parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" +"checksum parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" "checksum parity-scale-codec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f9f9d99dae413590a5f37e43cd99b94d4e62a244160562899126913ea7108673" "checksum parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" @@ -5295,6 +5356,7 @@ dependencies = [ "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" "checksum primitive-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2288eb2a39386c4bc817974cc413afe173010dc80e470fcb1e9a35580869f024" "checksum primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a0253db64c26d8b4e7896dd2063b516d2a1b9e0a5da26b5b78335f236d1e9522" +"checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" "checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" "checksum prometheus 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5567486d5778e2c6455b1b90ff1c558f29e751fc018130fa182e15828e728af1" @@ -5343,7 +5405,7 @@ dependencies = [ "checksum rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "403bb3a286107a04825a5f82e1270acc1e14028d3d554d7a1e08914549575ab8" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" -"checksum rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701)" = "" +"checksum rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=65d413ecf32b7ffaa2b607d9c6ce93640fed50cf)" = "" "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" "checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" diff --git a/beacon_node/eth2-libp2p/Cargo.toml b/beacon_node/eth2-libp2p/Cargo.toml index 16fa5df46..69efac882 100644 --- a/beacon_node/eth2-libp2p/Cargo.toml +++ b/beacon_node/eth2-libp2p/Cargo.toml @@ -8,8 +8,8 @@ edition = "2018" hex = "0.3" # rust-libp2p is presently being sourced from a Sigma Prime fork of the # `libp2p/rust-libp2p` repository. -libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701" } -enr = { git = "https://github.com/SigP/rust-libp2p/", rev = "3f9b030e29c9b31f9fe6f2ed27be4a813e2b3701", features = ["serde"] } +libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "65d413ecf32b7ffaa2b607d9c6ce93640fed50cf" } +enr = { git = "https://github.com/SigP/rust-libp2p/", rev = "65d413ecf32b7ffaa2b607d9c6ce93640fed50cf", features = ["serde"] } types = { path = "../../eth2/types" } serde = "1.0.102" serde_derive = "1.0.102" @@ -27,6 +27,9 @@ lazy_static = "1.4.0" lighthouse_metrics = { path = "../../eth2/utils/lighthouse_metrics" } tokio-io-timeout = "0.3.1" smallvec = "1.0.0" +lru = "0.4.3" +sha2 = "0.8.0" +base64 = "0.11.0" [dev-dependencies] slog-stdlog = "4.0.0" diff --git a/beacon_node/eth2-libp2p/src/behaviour.rs b/beacon_node/eth2-libp2p/src/behaviour.rs index fbb129f5f..251b48296 100644 --- a/beacon_node/eth2-libp2p/src/behaviour.rs +++ b/beacon_node/eth2-libp2p/src/behaviour.rs @@ -1,20 +1,20 @@ -use crate::config::*; use crate::discovery::Discovery; use crate::rpc::{RPCEvent, RPCMessage, RPC}; +use crate::GossipTopic; use crate::{error, NetworkConfig}; use crate::{Topic, TopicHash}; -use crate::{BEACON_ATTESTATION_TOPIC, BEACON_BLOCK_TOPIC}; use futures::prelude::*; use libp2p::{ core::identity::Keypair, discv5::Discv5Event, - gossipsub::{Gossipsub, GossipsubEvent}, + gossipsub::{Gossipsub, GossipsubEvent, MessageId}, identify::{Identify, IdentifyEvent}, ping::{Ping, PingConfig, PingEvent}, swarm::{NetworkBehaviourAction, NetworkBehaviourEventProcess}, tokio_io::{AsyncRead, AsyncWrite}, NetworkBehaviour, PeerId, }; +use lru::LruCache; use slog::{debug, o}; use std::num::NonZeroU32; use std::time::Duration; @@ -39,9 +39,13 @@ pub struct Behaviour { identify: Identify, /// Discovery behaviour. discovery: Discovery, - #[behaviour(ignore)] /// The events generated by this behaviour to be consumed in the swarm poll. + #[behaviour(ignore)] events: Vec, + /// A cache of recently seen gossip messages. This is used to filter out any possible + /// duplicates that may still be seen over gossipsub. + #[behaviour(ignore)] + seen_gossip_messages: LruCache, /// Logger for behaviour actions. #[behaviour(ignore)] log: slog::Logger, @@ -74,6 +78,7 @@ impl Behaviour { discovery: Discovery::new(local_key, net_conf, log)?, ping: Ping::new(ping_config), identify, + seen_gossip_messages: LruCache::new(256), events: Vec::new(), log: behaviour_log, }) @@ -94,18 +99,22 @@ impl NetworkBehaviourEventProcess { - let id = gs_msg.id(); + GossipsubEvent::Message(propagation_source, id, gs_msg) => { let msg = PubsubMessage::from_topics(&gs_msg.topics, gs_msg.data); // Note: We are keeping track here of the peer that sent us the message, not the // peer that originally published the message. - self.events.push(BehaviourEvent::GossipMessage { - id, - source: propagation_source, - topics: gs_msg.topics, - message: msg, - }); + if self.seen_gossip_messages.put(msg.clone(), ()).is_none() { + // if this message isn't a duplicate, notify the network + self.events.push(BehaviourEvent::GossipMessage { + id, + source: propagation_source, + topics: gs_msg.topics, + message: msg, + }); + } else { + debug!(self.log, "A duplicate message was received"; "message" => format!("{:?}", msg)); + } } GossipsubEvent::Subscribed { peer_id, topic } => { self.events @@ -218,7 +227,7 @@ impl Behaviour { /// Forwards a message that is waiting in gossipsub's mcache. Messages are only propagated /// once validated by the beacon chain. - pub fn propagate_message(&mut self, propagation_source: &PeerId, message_id: String) { + pub fn propagate_message(&mut self, propagation_source: &PeerId, message_id: MessageId) { self.gossipsub .propagate_message(&message_id, propagation_source); } @@ -263,7 +272,7 @@ pub enum BehaviourEvent { /// A gossipsub message has been received. GossipMessage { /// The gossipsub message id. Used when propagating blocks after validation. - id: String, + id: MessageId, /// The peer from which we received this message, not the peer that published it. source: PeerId, /// The topics that this message was sent on. @@ -277,7 +286,7 @@ pub enum BehaviourEvent { /// Messages that are passed to and from the pubsub (Gossipsub) behaviour. These are encoded and /// decoded upstream. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum PubsubMessage { /// Gossipsub message providing notification of a new block. Block(Vec), @@ -302,20 +311,14 @@ impl PubsubMessage { */ fn from_topics(topics: &[TopicHash], data: Vec) -> Self { for topic in topics { - // compare the prefix and postfix, then match on the topic - let topic_parts: Vec<&str> = topic.as_str().split('/').collect(); - if topic_parts.len() == 4 - && topic_parts[1] == TOPIC_PREFIX - && topic_parts[3] == TOPIC_ENCODING_POSTFIX - { - match topic_parts[2] { - BEACON_BLOCK_TOPIC => return PubsubMessage::Block(data), - BEACON_ATTESTATION_TOPIC => return PubsubMessage::Attestation(data), - VOLUNTARY_EXIT_TOPIC => return PubsubMessage::VoluntaryExit(data), - PROPOSER_SLASHING_TOPIC => return PubsubMessage::ProposerSlashing(data), - ATTESTER_SLASHING_TOPIC => return PubsubMessage::AttesterSlashing(data), - _ => {} - } + match GossipTopic::from(topic.as_str()) { + GossipTopic::BeaconBlock => return PubsubMessage::Block(data), + GossipTopic::BeaconAttestation => return PubsubMessage::Attestation(data), + GossipTopic::VoluntaryExit => return PubsubMessage::VoluntaryExit(data), + GossipTopic::ProposerSlashing => return PubsubMessage::ProposerSlashing(data), + GossipTopic::AttesterSlashing => return PubsubMessage::AttesterSlashing(data), + GossipTopic::Shard => return PubsubMessage::Unknown(data), + GossipTopic::Unknown(_) => continue, } } PubsubMessage::Unknown(data) diff --git a/beacon_node/eth2-libp2p/src/config.rs b/beacon_node/eth2-libp2p/src/config.rs index 2eb7b78da..0645be0f2 100644 --- a/beacon_node/eth2-libp2p/src/config.rs +++ b/beacon_node/eth2-libp2p/src/config.rs @@ -1,22 +1,12 @@ +use crate::topics::GossipTopic; use enr::Enr; -use libp2p::gossipsub::{GossipsubConfig, GossipsubConfigBuilder}; +use libp2p::gossipsub::{GossipsubConfig, GossipsubConfigBuilder, GossipsubMessage, MessageId}; use libp2p::Multiaddr; use serde_derive::{Deserialize, Serialize}; +use sha2::{Digest, Sha256}; use std::path::PathBuf; use std::time::Duration; -/// The gossipsub topic names. -// These constants form a topic name of the form /TOPIC_PREFIX/TOPIC/ENCODING_POSTFIX -// For example /eth2/beacon_block/ssz -pub const TOPIC_PREFIX: &str = "eth2"; -pub const TOPIC_ENCODING_POSTFIX: &str = "ssz"; -pub const BEACON_BLOCK_TOPIC: &str = "beacon_block"; -pub const BEACON_ATTESTATION_TOPIC: &str = "beacon_attestation"; -pub const VOLUNTARY_EXIT_TOPIC: &str = "voluntary_exit"; -pub const PROPOSER_SLASHING_TOPIC: &str = "proposer_slashing"; -pub const ATTESTER_SLASHING_TOPIC: &str = "attester_slashing"; -pub const SHARD_TOPIC_PREFIX: &str = "shard"; - #[derive(Clone, Debug, Serialize, Deserialize)] #[serde(default)] /// Network configuration for lighthouse. @@ -59,7 +49,7 @@ pub struct Config { pub client_version: String, /// List of extra topics to initially subscribe to as strings. - pub topics: Vec, + pub topics: Vec, /// Introduces randomization in network propagation of messages. This should only be set for /// testing purposes and will likely be removed in future versions. @@ -73,6 +63,25 @@ impl Default for Config { let mut network_dir = dirs::home_dir().unwrap_or_else(|| PathBuf::from(".")); network_dir.push(".lighthouse"); network_dir.push("network"); + + // The default topics that we will initially subscribe to + let topics = vec![ + GossipTopic::BeaconBlock, + GossipTopic::BeaconAttestation, + GossipTopic::VoluntaryExit, + GossipTopic::ProposerSlashing, + GossipTopic::AttesterSlashing, + ]; + + // The function used to generate a gossipsub message id + // We use base64(SHA256(data)) for content addressing + let gossip_message_id = |message: &GossipsubMessage| { + MessageId(base64::encode_config( + &Sha256::digest(&message.data), + base64::URL_SAFE, + )) + }; + Config { network_dir, listen_address: "127.0.0.1".parse().expect("valid ip address"), @@ -87,11 +96,12 @@ impl Default for Config { .max_transmit_size(1_048_576) .heartbeat_interval(Duration::from_secs(20)) // TODO: Reduce for mainnet .manual_propagation(true) // require validation before propagation + .message_id_fn(gossip_message_id) .build(), boot_nodes: vec![], libp2p_nodes: vec![], client_version: version::version(), - topics: Vec::new(), + topics, propagation_percentage: None, } } diff --git a/beacon_node/eth2-libp2p/src/lib.rs b/beacon_node/eth2-libp2p/src/lib.rs index 4b4935818..4f05fd9cb 100644 --- a/beacon_node/eth2-libp2p/src/lib.rs +++ b/beacon_node/eth2-libp2p/src/lib.rs @@ -12,14 +12,12 @@ pub mod error; mod metrics; pub mod rpc; mod service; +mod topics; pub use behaviour::PubsubMessage; -pub use config::{ - Config as NetworkConfig, BEACON_ATTESTATION_TOPIC, BEACON_BLOCK_TOPIC, SHARD_TOPIC_PREFIX, - TOPIC_ENCODING_POSTFIX, TOPIC_PREFIX, -}; +pub use config::Config as NetworkConfig; pub use libp2p::enr::Enr; -pub use libp2p::gossipsub::{Topic, TopicHash}; +pub use libp2p::gossipsub::{MessageId, Topic, TopicHash}; pub use libp2p::multiaddr; pub use libp2p::Multiaddr; pub use libp2p::{ @@ -29,3 +27,4 @@ pub use libp2p::{ pub use rpc::RPCEvent; pub use service::Libp2pEvent; pub use service::Service; +pub use topics::GossipTopic; diff --git a/beacon_node/eth2-libp2p/src/service.rs b/beacon_node/eth2-libp2p/src/service.rs index 0fb19a4ab..55c599826 100644 --- a/beacon_node/eth2-libp2p/src/service.rs +++ b/beacon_node/eth2-libp2p/src/service.rs @@ -1,5 +1,4 @@ use crate::behaviour::{Behaviour, BehaviourEvent, PubsubMessage}; -use crate::config::*; use crate::error; use crate::multiaddr::Protocol; use crate::rpc::RPCEvent; @@ -11,6 +10,7 @@ use libp2p::core::{ identity::Keypair, multiaddr::Multiaddr, muxing::StreamMuxerBox, nodes::Substream, transport::boxed::Boxed, ConnectedPoint, }; +use libp2p::gossipsub::MessageId; use libp2p::{core, secio, swarm::NetworkBehaviour, PeerId, Swarm, Transport}; use slog::{crit, debug, error, info, trace, warn}; use std::fs::File; @@ -123,38 +123,18 @@ impl Service { } } - // subscribe to default gossipsub topics - let mut topics = vec![]; - - /* Here we subscribe to all the required gossipsub topics required for interop. - * The topic builder adds the required prefix and postfix to the hardcoded topics that we - * must subscribe to. - */ - let topic_builder = |topic| { - Topic::new(format!( - "/{}/{}/{}", - TOPIC_PREFIX, topic, TOPIC_ENCODING_POSTFIX, - )) - }; - topics.push(topic_builder(BEACON_BLOCK_TOPIC)); - topics.push(topic_builder(BEACON_ATTESTATION_TOPIC)); - topics.push(topic_builder(VOLUNTARY_EXIT_TOPIC)); - topics.push(topic_builder(PROPOSER_SLASHING_TOPIC)); - topics.push(topic_builder(ATTESTER_SLASHING_TOPIC)); - - // Add any topics specified by the user - topics.append(&mut config.topics.iter().cloned().map(Topic::new).collect()); - - let mut subscribed_topics = vec![]; - for topic in topics { - if swarm.subscribe(topic.clone()) { - trace!(log, "Subscribed to topic"; "topic" => format!("{}", topic)); - subscribed_topics.push(topic); + let mut subscribed_topics: Vec = vec![]; + for topic in config.topics { + let raw_topic: Topic = topic.into(); + let topic_string = raw_topic.no_hash(); + if swarm.subscribe(raw_topic.clone()) { + trace!(log, "Subscribed to topic"; "topic" => format!("{}", topic_string)); + subscribed_topics.push(topic_string.as_str().into()); } else { - warn!(log, "Could not subscribe to topic"; "topic" => format!("{}", topic)); + warn!(log, "Could not subscribe to topic"; "topic" => format!("{}",topic_string)); } } - info!(log, "Subscribed to topics"; "topics" => format!("{:?}", subscribed_topics.iter().map(|t| format!("{}", t)).collect::>())); + info!(log, "Subscribed to topics"; "topics" => format!("{:?}", subscribed_topics)); Ok(Service { local_peer_id, @@ -337,7 +317,7 @@ pub enum Libp2pEvent { PeerDisconnected(PeerId), /// Received pubsub message. PubsubMessage { - id: String, + id: MessageId, source: PeerId, topics: Vec, message: PubsubMessage, diff --git a/beacon_node/eth2-libp2p/src/topics.rs b/beacon_node/eth2-libp2p/src/topics.rs new file mode 100644 index 000000000..6a7ed5881 --- /dev/null +++ b/beacon_node/eth2-libp2p/src/topics.rs @@ -0,0 +1,71 @@ +use libp2p::gossipsub::Topic; +use serde_derive::{Deserialize, Serialize}; + +/// The gossipsub topic names. +// These constants form a topic name of the form /TOPIC_PREFIX/TOPIC/ENCODING_POSTFIX +// For example /eth2/beacon_block/ssz +pub const TOPIC_PREFIX: &str = "eth2"; +pub const TOPIC_ENCODING_POSTFIX: &str = "ssz"; +pub const BEACON_BLOCK_TOPIC: &str = "beacon_block"; +pub const BEACON_ATTESTATION_TOPIC: &str = "beacon_attestation"; +pub const VOLUNTARY_EXIT_TOPIC: &str = "voluntary_exit"; +pub const PROPOSER_SLASHING_TOPIC: &str = "proposer_slashing"; +pub const ATTESTER_SLASHING_TOPIC: &str = "attester_slashing"; +pub const SHARD_TOPIC_PREFIX: &str = "shard"; + +/// Enum that brings these topics into the rust type system. +#[derive(Clone, Debug, Serialize, Deserialize)] +pub enum GossipTopic { + BeaconBlock, + BeaconAttestation, + VoluntaryExit, + ProposerSlashing, + AttesterSlashing, + Shard, + Unknown(String), +} + +impl From<&str> for GossipTopic { + fn from(topic: &str) -> GossipTopic { + let topic_parts: Vec<&str> = topic.split('/').collect(); + if topic_parts.len() == 4 + && topic_parts[1] == TOPIC_PREFIX + && topic_parts[3] == TOPIC_ENCODING_POSTFIX + { + match topic_parts[2] { + BEACON_BLOCK_TOPIC => GossipTopic::BeaconBlock, + BEACON_ATTESTATION_TOPIC => GossipTopic::BeaconAttestation, + VOLUNTARY_EXIT_TOPIC => GossipTopic::VoluntaryExit, + PROPOSER_SLASHING_TOPIC => GossipTopic::ProposerSlashing, + ATTESTER_SLASHING_TOPIC => GossipTopic::AttesterSlashing, + unknown_topic => GossipTopic::Unknown(unknown_topic.into()), + } + } else { + GossipTopic::Unknown(topic.into()) + } + } +} + +impl Into for GossipTopic { + fn into(self) -> Topic { + Topic::new(self.into()) + } +} + +impl Into for GossipTopic { + fn into(self) -> String { + match self { + GossipTopic::BeaconBlock => topic_builder(BEACON_BLOCK_TOPIC), + GossipTopic::BeaconAttestation => topic_builder(BEACON_ATTESTATION_TOPIC), + GossipTopic::VoluntaryExit => topic_builder(VOLUNTARY_EXIT_TOPIC), + GossipTopic::ProposerSlashing => topic_builder(PROPOSER_SLASHING_TOPIC), + GossipTopic::AttesterSlashing => topic_builder(ATTESTER_SLASHING_TOPIC), + GossipTopic::Shard => topic_builder(SHARD_TOPIC_PREFIX), + GossipTopic::Unknown(topic) => topic, + } + } +} + +fn topic_builder(topic: &'static str) -> String { + format!("/{}/{}/{}", TOPIC_PREFIX, topic, TOPIC_ENCODING_POSTFIX,) +} diff --git a/beacon_node/network/src/lib.rs b/beacon_node/network/src/lib.rs index b805c1d75..83d4935ca 100644 --- a/beacon_node/network/src/lib.rs +++ b/beacon_node/network/src/lib.rs @@ -1,9 +1,11 @@ /// This crate provides the network server for Lighthouse. pub mod error; pub mod message_handler; +pub mod message_processor; pub mod service; pub mod sync; pub use eth2_libp2p::NetworkConfig; +pub use message_processor::MessageProcessor; pub use service::NetworkMessage; pub use service::Service; diff --git a/beacon_node/network/src/message_handler.rs b/beacon_node/network/src/message_handler.rs index 206d3c01e..4b1215287 100644 --- a/beacon_node/network/src/message_handler.rs +++ b/beacon_node/network/src/message_handler.rs @@ -1,12 +1,12 @@ #![allow(clippy::unit_arg)] use crate::error; use crate::service::NetworkMessage; -use crate::sync::MessageProcessor; +use crate::MessageProcessor; use beacon_chain::{BeaconChain, BeaconChainTypes}; use eth2_libp2p::{ behaviour::PubsubMessage, rpc::{RPCError, RPCErrorResponse, RPCRequest, RPCResponse, RequestId, ResponseTermination}, - PeerId, RPCEvent, + MessageId, PeerId, RPCEvent, }; use futures::future::Future; use futures::stream::Stream; @@ -41,7 +41,7 @@ pub enum HandlerMessage { RPC(PeerId, RPCEvent), /// A gossip message has been received. The fields are: message id, the peer that sent us this /// message and the message itself. - PubsubMessage(String, PeerId, PubsubMessage), + PubsubMessage(MessageId, PeerId, PubsubMessage), } impl MessageHandler { @@ -220,7 +220,7 @@ impl MessageHandler { } /// Handle RPC messages - fn handle_gossip(&mut self, id: String, peer_id: PeerId, gossip_message: PubsubMessage) { + fn handle_gossip(&mut self, id: MessageId, peer_id: PeerId, gossip_message: PubsubMessage) { match gossip_message { PubsubMessage::Block(message) => match self.decode_gossip_block(message) { Ok(block) => { @@ -292,7 +292,7 @@ impl MessageHandler { } /// Informs the network service that the message should be forwarded to other peers. - fn propagate_message(&mut self, message_id: String, propagation_source: PeerId) { + fn propagate_message(&mut self, message_id: MessageId, propagation_source: PeerId) { self.network_send .try_send(NetworkMessage::Propagate { propagation_source, diff --git a/beacon_node/network/src/sync/message_processor.rs b/beacon_node/network/src/message_processor.rs similarity index 98% rename from beacon_node/network/src/sync/message_processor.rs rename to beacon_node/network/src/message_processor.rs index f0c4ced58..39520f242 100644 --- a/beacon_node/network/src/sync/message_processor.rs +++ b/beacon_node/network/src/message_processor.rs @@ -1,5 +1,5 @@ -use super::manager::SyncMessage; use crate::service::NetworkMessage; +use crate::sync::SyncMessage; use beacon_chain::{ AttestationProcessingOutcome, BeaconChain, BeaconChainTypes, BlockProcessingOutcome, }; @@ -77,7 +77,7 @@ impl MessageProcessor { let sync_logger = log.new(o!("service"=> "sync")); // spawn the sync thread - let (sync_send, _sync_exit) = super::manager::spawn( + let (sync_send, _sync_exit) = crate::sync::manager::spawn( executor, Arc::downgrade(&beacon_chain), network_send.clone(), @@ -503,7 +503,9 @@ impl MessageProcessor { self.log, "Processed attestation"; "source" => "gossip", - "outcome" => format!("{:?}", outcome) + "outcome" => format!("{:?}", outcome), + "peer" => format!("{:?}",peer_id), + "data" => format!("{:?}", msg.data) ); } AttestationProcessingOutcome::UnknownHeadBlock { beacon_block_root } => { diff --git a/beacon_node/network/src/service.rs b/beacon_node/network/src/service.rs index a8bbca172..458129ea0 100644 --- a/beacon_node/network/src/service.rs +++ b/beacon_node/network/src/service.rs @@ -4,7 +4,7 @@ use crate::NetworkConfig; use beacon_chain::{BeaconChain, BeaconChainTypes}; use core::marker::PhantomData; use eth2_libp2p::Service as LibP2PService; -use eth2_libp2p::{rpc::RPCRequest, Enr, Libp2pEvent, Multiaddr, PeerId, Swarm, Topic}; +use eth2_libp2p::{rpc::RPCRequest, Enr, Libp2pEvent, MessageId, Multiaddr, PeerId, Swarm, Topic}; use eth2_libp2p::{PubsubMessage, RPCEvent}; use futures::prelude::*; use futures::Stream; @@ -263,7 +263,7 @@ fn network_service( id, source, message, - .. + topics: _, } => { message_handler_send .try_send(HandlerMessage::PubsubMessage(id, source, message)) @@ -302,7 +302,7 @@ pub enum NetworkMessage { /// Propagate a received gossipsub message. Propagate { propagation_source: PeerId, - message_id: String, + message_id: MessageId, }, /// Disconnect and bans a peer id. Disconnect { peer_id: PeerId }, diff --git a/beacon_node/network/src/sync/manager.rs b/beacon_node/network/src/sync/manager.rs index 0bea170c2..71c707250 100644 --- a/beacon_node/network/src/sync/manager.rs +++ b/beacon_node/network/src/sync/manager.rs @@ -58,9 +58,9 @@ //! if an attestation references an unknown block) this manager can search for the block and //! subsequently search for parents if needed. -use super::message_processor::PeerSyncInfo; use super::network_context::SyncNetworkContext; use super::range_sync::RangeSync; +use crate::message_processor::PeerSyncInfo; use crate::service::NetworkMessage; use beacon_chain::{BeaconChain, BeaconChainTypes, BlockProcessingOutcome}; use eth2_libp2p::rpc::methods::*; diff --git a/beacon_node/network/src/sync/mod.rs b/beacon_node/network/src/sync/mod.rs index 372511f6a..e9bc70e55 100644 --- a/beacon_node/network/src/sync/mod.rs +++ b/beacon_node/network/src/sync/mod.rs @@ -1,14 +1,13 @@ //! Syncing for lighthouse. //! //! Stores the various syncing methods for the beacon chain. -mod manager; -mod message_processor; +pub mod manager; mod network_context; mod range_sync; -pub use message_processor::MessageProcessor; - /// Currently implemented sync methods. pub enum SyncMethod { SimpleSync, } + +pub use manager::SyncMessage; diff --git a/beacon_node/network/src/sync/network_context.rs b/beacon_node/network/src/sync/network_context.rs index 5a491eb2f..67d53a095 100644 --- a/beacon_node/network/src/sync/network_context.rs +++ b/beacon_node/network/src/sync/network_context.rs @@ -1,7 +1,7 @@ //! Provides network functionality for the Syncing thread. This fundamentally wraps a network //! channel and stores a global RPC ID to perform requests. -use super::message_processor::status_message; +use crate::message_processor::status_message; use crate::service::NetworkMessage; use beacon_chain::{BeaconChain, BeaconChainTypes}; use eth2_libp2p::rpc::methods::*; diff --git a/beacon_node/network/src/sync/range_sync/chain.rs b/beacon_node/network/src/sync/range_sync/chain.rs index 333fcd723..6bd725027 100644 --- a/beacon_node/network/src/sync/range_sync/chain.rs +++ b/beacon_node/network/src/sync/range_sync/chain.rs @@ -1,4 +1,4 @@ -use crate::sync::message_processor::FUTURE_SLOT_TOLERANCE; +use crate::message_processor::FUTURE_SLOT_TOLERANCE; use crate::sync::network_context::SyncNetworkContext; use beacon_chain::{BeaconChain, BeaconChainTypes, BlockProcessingOutcome}; use eth2_libp2p::rpc::methods::*; diff --git a/beacon_node/network/src/sync/range_sync/chain_collection.rs b/beacon_node/network/src/sync/range_sync/chain_collection.rs index 9af96b8e4..db5ff5811 100644 --- a/beacon_node/network/src/sync/range_sync/chain_collection.rs +++ b/beacon_node/network/src/sync/range_sync/chain_collection.rs @@ -1,5 +1,5 @@ use super::chain::{ChainSyncingState, ProcessingResult, SyncingChain}; -use crate::sync::message_processor::PeerSyncInfo; +use crate::message_processor::PeerSyncInfo; use crate::sync::network_context::SyncNetworkContext; use beacon_chain::{BeaconChain, BeaconChainTypes}; use eth2_libp2p::PeerId; diff --git a/beacon_node/network/src/sync/range_sync/range.rs b/beacon_node/network/src/sync/range_sync/range.rs index d2db90932..f5ed03c79 100644 --- a/beacon_node/network/src/sync/range_sync/range.rs +++ b/beacon_node/network/src/sync/range_sync/range.rs @@ -1,6 +1,6 @@ use super::chain::ProcessingResult; use super::chain_collection::{ChainCollection, SyncState}; -use crate::sync::message_processor::PeerSyncInfo; +use crate::message_processor::PeerSyncInfo; use crate::sync::network_context::SyncNetworkContext; use beacon_chain::{BeaconChain, BeaconChainTypes}; use eth2_libp2p::rpc::RequestId; diff --git a/beacon_node/rest_api/src/helpers.rs b/beacon_node/rest_api/src/helpers.rs index 811c89805..b6b897e42 100644 --- a/beacon_node/rest_api/src/helpers.rs +++ b/beacon_node/rest_api/src/helpers.rs @@ -1,10 +1,8 @@ use crate::{ApiError, ApiResult}; use beacon_chain::{BeaconChain, BeaconChainTypes}; use bls::PublicKeyBytes; -use eth2_libp2p::{PubsubMessage, Topic}; -use eth2_libp2p::{ - BEACON_ATTESTATION_TOPIC, BEACON_BLOCK_TOPIC, TOPIC_ENCODING_POSTFIX, TOPIC_PREFIX, -}; +use eth2_libp2p::GossipTopic; +use eth2_libp2p::PubsubMessage; use hex; use http::header; use hyper::{Body, Request}; @@ -238,16 +236,12 @@ pub fn publish_beacon_block_to_network( block: BeaconBlock, ) -> Result<(), ApiError> { // create the network topic to send on - let topic_string = format!( - "/{}/{}/{}", - TOPIC_PREFIX, BEACON_BLOCK_TOPIC, TOPIC_ENCODING_POSTFIX - ); - let topic = Topic::new(topic_string); + let topic = GossipTopic::BeaconBlock; let message = PubsubMessage::Block(block.as_ssz_bytes()); // Publish the block to the p2p network via gossipsub. if let Err(e) = chan.write().try_send(NetworkMessage::Publish { - topics: vec![topic], + topics: vec![topic.into()], message, }) { return Err(ApiError::ServerError(format!( @@ -264,16 +258,12 @@ pub fn publish_attestation_to_network( attestation: Attestation, ) -> Result<(), ApiError> { // create the network topic to send on - let topic_string = format!( - "/{}/{}/{}", - TOPIC_PREFIX, BEACON_ATTESTATION_TOPIC, TOPIC_ENCODING_POSTFIX - ); - let topic = Topic::new(topic_string); + let topic = GossipTopic::BeaconAttestation; let message = PubsubMessage::Attestation(attestation.as_ssz_bytes()); // Publish the attestation to the p2p network via gossipsub. if let Err(e) = chan.write().try_send(NetworkMessage::Publish { - topics: vec![topic], + topics: vec![topic.into()], message, }) { return Err(ApiError::ServerError(format!(