From 500f6b53d17c5bc7f3cffb1855800cf1ac8bb159 Mon Sep 17 00:00:00 2001 From: Age Manning Date: Mon, 27 Apr 2020 14:18:30 +1000 Subject: [PATCH] Testnet corrections (#1050) * Correct RPC ping request * Add attestation verification * Add discv5 bug fixes * Reduce gossipsub heartbeat and update metadata * Handle known chain of advanced peer --- Cargo.lock | 242 +++++++++--------- beacon_node/eth2-libp2p/Cargo.toml | 2 +- beacon_node/eth2-libp2p/src/behaviour.rs | 26 +- beacon_node/eth2-libp2p/src/config.rs | 2 +- .../eth2-libp2p/src/peer_manager/mod.rs | 6 + .../network/src/attestation_service/mod.rs | 20 +- beacon_node/network/src/sync/manager.rs | 19 +- 7 files changed, 176 insertions(+), 141 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 95a6cd428..09ae03340 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1008,13 +1008,13 @@ dependencies = [ [[package]] name = "enr" version = "0.1.0-alpha.3" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "base64 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "libsecp256k1 0.3.5 (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.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1134,7 +1134,7 @@ dependencies = [ "hashmap_delay 0.2.0", "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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "lighthouse_metrics 0.2.0", "lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1935,34 +1935,34 @@ dependencies = [ [[package]] name = "libp2p" version = "0.13.2" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-floodsub 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-identify 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-kad 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-noise 0.11.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-plaintext 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-secio 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-floodsub 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-identify 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-kad 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-noise 0.11.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-plaintext 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-secio 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1974,7 +1974,7 @@ dependencies = [ [[package]] name = "libp2p-core" version = "0.13.2" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "asn1_der 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1986,15 +1986,15 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.3.5 (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.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "multistream-select 0.6.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.16.12 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "sha2 0.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-executor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2009,7 +2009,7 @@ dependencies = [ [[package]] name = "libp2p-core-derive" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2018,34 +2018,34 @@ dependencies = [ [[package]] name = "libp2p-deflate" version = "0.5.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "flate2 1.0.14 (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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "tokio-io 0.1.13 (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=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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-alpha.3 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "enr 0.1.0-alpha.3 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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.2 (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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.10.29 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2060,10 +2060,10 @@ dependencies = [ [[package]] name = "libp2p-dns" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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)", ] @@ -2071,15 +2071,15 @@ dependencies = [ [[package]] name = "libp2p-floodsub" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "bs58 0.3.1 (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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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)", @@ -2089,7 +2089,7 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" version = "0.1.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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)", @@ -2097,8 +2097,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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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)", @@ -2114,14 +2114,14 @@ dependencies = [ [[package]] name = "libp2p-identify" version = "0.13.2" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2133,18 +2133,18 @@ dependencies = [ [[package]] name = "libp2p-kad" version = "0.13.2" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2160,16 +2160,16 @@ dependencies = [ [[package]] name = "libp2p-mdns" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "data-encoding 2.2.0 (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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2182,12 +2182,12 @@ dependencies = [ [[package]] name = "libp2p-mplex" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2198,13 +2198,13 @@ dependencies = [ [[package]] name = "libp2p-noise" version = "0.11.1" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2218,14 +2218,14 @@ dependencies = [ [[package]] name = "libp2p-ping" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2235,14 +2235,14 @@ dependencies = [ [[package]] name = "libp2p-plaintext" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2250,7 +2250,7 @@ dependencies = [ [[package]] name = "libp2p-secio" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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)", @@ -2259,13 +2259,13 @@ dependencies = [ "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.37 (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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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.12 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2279,10 +2279,10 @@ dependencies = [ [[package]] name = "libp2p-swarm" version = "0.3.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2292,13 +2292,13 @@ dependencies = [ [[package]] name = "libp2p-tcp" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2308,10 +2308,10 @@ dependencies = [ [[package]] name = "libp2p-uds" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2319,11 +2319,11 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" version = "0.6.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2333,13 +2333,13 @@ dependencies = [ [[package]] name = "libp2p-websocket" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "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=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "soketto 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2351,10 +2351,10 @@ dependencies = [ [[package]] name = "libp2p-yamux" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "yamux 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2617,7 +2617,7 @@ dependencies = [ [[package]] name = "multistream-select" version = "0.6.1" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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)", @@ -2834,14 +2834,14 @@ dependencies = [ [[package]] name = "parity-multiaddr" version = "0.6.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" dependencies = [ "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.4 (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.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2851,7 +2851,7 @@ dependencies = [ [[package]] name = "parity-multihash" version = "0.2.0" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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)", @@ -3564,7 +3564,7 @@ dependencies = [ [[package]] name = "rw-stream-sink" version = "0.1.2" -source = "git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3#37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" +source = "git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add#71cf486b4d992862f5a05f9f4ef5e5c1631f4add" 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)", @@ -5272,7 +5272,7 @@ dependencies = [ "checksum ed25519-dalek 1.0.0-pre.3 (registry+https://github.com/rust-lang/crates.io-index)" = "978710b352437433c97b2bff193f2fb1dfd58a093f863dd95e225a19baa599a2" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" "checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" -"checksum enr 0.1.0-alpha.3 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" +"checksum enr 0.1.0-alpha.3 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" "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.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d371106cc88ffdfb1eabd7111e432da544f16f3e2d7bf1dfe8bf575f1df045cd" @@ -5345,28 +5345,28 @@ dependencies = [ "checksum leveldb-sys 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71f46429bb70612c3e939aaeed27ffd31a24a773d21728a1a426e4089d6778d2" "checksum libc 0.2.69 (registry+https://github.com/rust-lang/crates.io-index)" = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" "checksum libflate 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)" = "d9135df43b1f5d0e333385cb6e7897ecd1a43d7d11b91ac003f4d2c2d2401fdd" -"checksum libp2p 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-floodsub 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-identify 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-kad 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-noise 0.11.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-plaintext 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-secio 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" +"checksum libp2p 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-floodsub 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-identify 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-kad 0.13.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-noise 0.11.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-plaintext 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-secio 0.13.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" "checksum libsecp256k1 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" "checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" @@ -5390,7 +5390,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.1 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" +"checksum multistream-select 0.6.1 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" "checksum native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" @@ -5407,8 +5407,8 @@ dependencies = [ "checksum openssl-sys 0.9.55 (registry+https://github.com/rust-lang/crates.io-index)" = "7717097d810a0f2e2323f9e5d11e71608355e24828410b55b9d4f18aa5f9a5d8" "checksum owning_ref 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" "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=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" -"checksum parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" +"checksum parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" +"checksum parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" "checksum parity-scale-codec 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "329c8f7f4244ddb5c37c103641027a76c530e65e8e4b8240b29f81ea40508b17" "checksum parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" "checksum parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" @@ -5474,7 +5474,7 @@ dependencies = [ "checksum rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" "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=37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3)" = "" +"checksum rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p?rev=71cf486b4d992862f5a05f9f4ef5e5c1631f4add)" = "" "checksum ryu 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535622e6be132bccd223f4bb2b8ac8d53cda3c7a6394944d3b2b33fb974f9d76" "checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" "checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" diff --git a/beacon_node/eth2-libp2p/Cargo.toml b/beacon_node/eth2-libp2p/Cargo.toml index 51802b3d2..f0171a39a 100644 --- a/beacon_node/eth2-libp2p/Cargo.toml +++ b/beacon_node/eth2-libp2p/Cargo.toml @@ -8,7 +8,7 @@ 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 = "37b7e9349cf3e724da02bbd4b5dd6c054c2d56d3" } +libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "71cf486b4d992862f5a05f9f4ef5e5c1631f4add" } types = { path = "../../eth2/types" } hashmap_delay = { path = "../../eth2/utils/hashmap_delay" } eth2_ssz_types = { path = "../../eth2/utils/ssz_types" } diff --git a/beacon_node/eth2-libp2p/src/behaviour.rs b/beacon_node/eth2-libp2p/src/behaviour.rs index 4762e17dc..bc8be5014 100644 --- a/beacon_node/eth2-libp2p/src/behaviour.rs +++ b/beacon_node/eth2-libp2p/src/behaviour.rs @@ -298,14 +298,17 @@ impl Behaviour RPCEvent::Request(id, RPCRequest::Ping(ping)) => { // inform the peer manager and send the response self.peer_manager.ping_request(&peer_id, ping.data); - self.send_ping(id, peer_id); + // send a ping response + self.send_ping(id, peer_id, false); } RPCEvent::Request(id, RPCRequest::MetaData(_)) => { // send the requested meta-data @@ -474,8 +478,8 @@ impl Behaviour { - // send a ping to this peer - self.send_ping(RequestId::from(0usize), peer_id); + // send a ping request to this peer + self.send_ping(RequestId::from(0usize), peer_id, true); } PeerManagerEvent::MetaData(peer_id) => { self.send_meta_data_request(peer_id); diff --git a/beacon_node/eth2-libp2p/src/config.rs b/beacon_node/eth2-libp2p/src/config.rs index be3b11d37..41395cef9 100644 --- a/beacon_node/eth2-libp2p/src/config.rs +++ b/beacon_node/eth2-libp2p/src/config.rs @@ -101,7 +101,7 @@ impl Default for Config { // parameter. let gs_config = GossipsubConfigBuilder::new() .max_transmit_size(GOSSIP_MAX_SIZE) - .heartbeat_interval(Duration::from_secs(20)) // TODO: Reduce for mainnet + .heartbeat_interval(Duration::from_secs(1)) .manual_propagation() // require validation before propagation .no_source_id() .message_id_fn(gossip_message_id) diff --git a/beacon_node/eth2-libp2p/src/peer_manager/mod.rs b/beacon_node/eth2-libp2p/src/peer_manager/mod.rs index 0b9d1b5c4..7060e8224 100644 --- a/beacon_node/eth2-libp2p/src/peer_manager/mod.rs +++ b/beacon_node/eth2-libp2p/src/peer_manager/mod.rs @@ -96,6 +96,7 @@ impl PeerManager { if let Some(peer_info) = self.network_globals.peers.read().peer_info(peer_id) { // received a ping // reset the to-ping timer for this peer + debug!(self.log, "Received a ping request"; "peer_id" => format!("{}", peer_id), "seq_no" => seq); self.ping_peers.insert(peer_id.clone()); // if the sequence number is unknown send update the meta data of the peer. @@ -147,6 +148,7 @@ impl PeerManager { if let Some(known_meta_data) = &peer_info.meta_data { if known_meta_data.seq_number < meta_data.seq_number { debug!(self.log, "Updating peer's metadata"; "peer_id" => format!("{}", peer_id), "known_seq_no" => known_meta_data.seq_number, "new_seq_no" => meta_data.seq_number); + peer_info.meta_data = Some(meta_data); } else { warn!(self.log, "Received old metadata"; "peer_id" => format!("{}", peer_id), "known_seq_no" => known_meta_data.seq_number, "new_seq_no" => meta_data.seq_number); } @@ -320,6 +322,8 @@ impl Stream for PeerManager { error!(self.log, "Failed to check for peers to ping"; "error" => format!("{}",e)); })? { debug!(self.log, "Pinging peer"; "peer_id" => format!("{}", peer_id)); + // add the ping timer back + self.ping_peers.insert(peer_id.clone()); self.events.push(PeerManagerEvent::Ping(peer_id)); } @@ -327,6 +331,8 @@ impl Stream for PeerManager { error!(self.log, "Failed to check for peers to status"; "error" => format!("{}",e)); })? { debug!(self.log, "Sending Status to peer"; "peer_id" => format!("{}", peer_id)); + // add the status timer back + self.status_peers.insert(peer_id.clone()); self.events.push(PeerManagerEvent::Status(peer_id)); } diff --git a/beacon_node/network/src/attestation_service/mod.rs b/beacon_node/network/src/attestation_service/mod.rs index e4c319512..5c21d45a8 100644 --- a/beacon_node/network/src/attestation_service/mod.rs +++ b/beacon_node/network/src/attestation_service/mod.rs @@ -190,10 +190,24 @@ impl AttestationService { pub fn should_process_attestation( &mut self, _message_id: &MessageId, - _peer_id: &PeerId, - _subnet: &SubnetId, - _attestation: &Attestation, + peer_id: &PeerId, + subnet: &SubnetId, + attestation: &Attestation, ) -> bool { + // verify the attestation is on the correct subnet + let expected_subnet = match attestation.subnet_id(&self.beacon_chain.spec) { + Ok(v) => v, + Err(e) => { + warn!(self.log, "Could not obtain attestation subnet_id"; "error" => format!("{:?}", e)); + return false; + } + }; + + if expected_subnet != *subnet { + warn!(self.log, "Received an attestation on the wrong subnet"; "subnet_received" => format!("{:?}", subnet), "subnet_expected" => format!("{:?}",expected_subnet), "peer_id" => format!("{}", peer_id)); + return false; + } + // TODO: Correctly handle validation aggregator checks true } diff --git a/beacon_node/network/src/sync/manager.rs b/beacon_node/network/src/sync/manager.rs index ab603df3a..47fa65d88 100644 --- a/beacon_node/network/src/sync/manager.rs +++ b/beacon_node/network/src/sync/manager.rs @@ -271,10 +271,21 @@ impl SyncManager { "peer_finalized_epoch" => remote.finalized_epoch, "local_finalized_epoch" => local_peer_info.finalized_epoch, ); - // Add the peer to our RangeSync - self.range_sync - .add_peer(&mut self.network, peer_id.clone(), remote); - self.advanced_peer(&peer_id, remote); + + // if we don't know about the peer's chain add it to the range sync, otherwise + // consider it synced (it can be the case that the peer seems ahead of us, but we + // reject its chain). + + if self.chain.fork_choice.contains_block(&remote.head_root) { + self.synced_peer(&peer_id, remote); + // notify the range sync that a peer has been added + self.range_sync.fully_synced_peer_found(); + } else { + // Add the peer to our RangeSync + self.range_sync + .add_peer(&mut self.network, peer_id.clone(), remote); + self.advanced_peer(&peer_id, remote); + } } PeerSyncType::Behind => { self.behind_peer(&peer_id, remote);