From 370c658c7cf13b20116acc15108aa00c4de51959 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Fri, 10 Jan 2020 15:32:10 +1100 Subject: [PATCH] Optimization: reduce BLS decompression (#766) * Add RwLock-style caching for BLS pubkeys * Tidy docker ignore * Remove RwLocks * Merge in master --- .dockerignore | 3 + Cargo.lock | 246 +++++++++--------- .../per_block_processing/signature_sets.rs | 16 +- eth2/types/src/beacon_state.rs | 19 ++ eth2/types/src/validator.rs | 1 - eth2/utils/bls/src/macros.rs | 34 ++- eth2/utils/ssz/src/decode.rs | 2 +- 7 files changed, 182 insertions(+), 139 deletions(-) diff --git a/.dockerignore b/.dockerignore index f5e4c0356f..aa16068886 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,5 @@ tests/ef_tests/eth2.0-spec-tests target/ +*.tar.gz +*.data +.git diff --git a/Cargo.lock b/Cargo.lock index aa8025d977..a2a598c580 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1007,13 +1007,13 @@ dependencies = [ [[package]] name = "enr" version = "0.1.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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)", "clap 2.33.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.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "libsecp256k1 0.3.4 (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)", @@ -1120,7 +1120,7 @@ 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=555d99dbb96017448cb019a4881258ad748d877e)", + "enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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", @@ -1128,7 +1128,7 @@ 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.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "lighthouse_metrics 0.1.0", "lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1894,35 +1894,35 @@ dependencies = [ [[package]] name = "libp2p" version = "0.13.2" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", + "enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-floodsub 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-identify 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-kad 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-noise 0.11.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-plaintext 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-secio 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-floodsub 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-identify 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-kad 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-noise 0.11.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-plaintext 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-secio 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -1934,7 +1934,7 @@ dependencies = [ [[package]] name = "libp2p-core" version = "0.13.2" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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)", @@ -1946,15 +1946,15 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.3.4 (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=555d99dbb96017448cb019a4881258ad748d877e)", - "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "multistream-select 0.6.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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.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=555d99dbb96017448cb019a4881258ad748d877e)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1969,7 +1969,7 @@ dependencies = [ [[package]] name = "libp2p-core-derive" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" dependencies = [ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1978,34 +1978,34 @@ dependencies = [ [[package]] name = "libp2p-deflate" version = "0.5.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", + "enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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=555d99dbb96017448cb019a4881258ad748d877e)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2020,10 +2020,10 @@ dependencies = [ [[package]] name = "libp2p-dns" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", ] @@ -2031,15 +2031,15 @@ dependencies = [ [[package]] name = "libp2p-floodsub" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -2049,7 +2049,7 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" version = "0.1.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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)", @@ -2057,8 +2057,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=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -2074,14 +2074,14 @@ dependencies = [ [[package]] name = "libp2p-identify" version = "0.13.2" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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=555d99dbb96017448cb019a4881258ad748d877e)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -2093,18 +2093,18 @@ dependencies = [ [[package]] name = "libp2p-kad" version = "0.13.2" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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=555d99dbb96017448cb019a4881258ad748d877e)", - "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2120,16 +2120,16 @@ dependencies = [ [[package]] name = "libp2p-mdns" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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=555d99dbb96017448cb019a4881258ad748d877e)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -2142,12 +2142,12 @@ dependencies = [ [[package]] name = "libp2p-mplex" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -2158,13 +2158,13 @@ dependencies = [ [[package]] name = "libp2p-noise" version = "0.11.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -2178,14 +2178,14 @@ dependencies = [ [[package]] name = "libp2p-ping" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", - "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", + "libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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=555d99dbb96017448cb019a4881258ad748d877e)", + "parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -2195,14 +2195,14 @@ dependencies = [ [[package]] name = "libp2p-plaintext" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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=555d99dbb96017448cb019a4881258ad748d877e)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", ] @@ -2210,7 +2210,7 @@ dependencies = [ [[package]] name = "libp2p-secio" version = "0.13.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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)", @@ -2219,13 +2219,13 @@ dependencies = [ "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.35 (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=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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=555d99dbb96017448cb019a4881258ad748d877e)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "sha2 0.8.1 (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)", @@ -2239,10 +2239,10 @@ dependencies = [ [[package]] name = "libp2p-swarm" version = "0.3.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -2252,13 +2252,13 @@ dependencies = [ [[package]] name = "libp2p-tcp" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -2268,10 +2268,10 @@ dependencies = [ [[package]] name = "libp2p-uds" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", ] @@ -2279,11 +2279,11 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" version = "0.6.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", - "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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.58 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2293,13 +2293,13 @@ dependencies = [ [[package]] name = "libp2p-websocket" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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=555d99dbb96017448cb019a4881258ad748d877e)", + "rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -2311,10 +2311,10 @@ dependencies = [ [[package]] name = "libp2p-yamux" version = "0.13.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", + "libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "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)", @@ -2626,7 +2626,7 @@ dependencies = [ [[package]] name = "multistream-select" version = "0.6.1" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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)", @@ -2838,14 +2838,14 @@ dependencies = [ [[package]] name = "parity-multiaddr" version = "0.6.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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=555d99dbb96017448cb019a4881258ad748d877e)", + "parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2855,7 +2855,7 @@ dependencies = [ [[package]] name = "parity-multihash" version = "0.2.0" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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)", @@ -3519,7 +3519,7 @@ dependencies = [ [[package]] name = "rw-stream-sink" version = "0.1.2" -source = "git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e#555d99dbb96017448cb019a4881258ad748d877e" +source = "git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760#735313ebda6a98604929f6c4606aefac19e00760" 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)", @@ -5231,7 +5231,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 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" +"checksum enr 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" "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" @@ -5303,28 +5303,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.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-floodsub 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-identify 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-kad 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-noise 0.11.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-plaintext 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-secio 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" +"checksum libp2p 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-core 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-core-derive 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-deflate 0.5.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-discv5 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-dns 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-floodsub 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-gossipsub 0.1.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-identify 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-kad 0.13.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-mdns 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-mplex 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-noise 0.11.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-ping 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-plaintext 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-secio 0.13.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-swarm 0.3.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-tcp 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-uds 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-wasm-ext 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-websocket 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum libp2p-yamux 0.13.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" "checksum libsecp256k1 0.3.1 (git+https://github.com/SigP/libsecp256k1?branch=ecdh_generalise)" = "" "checksum libsecp256k1 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "df6edf84fd62aad1c93932b39324eaeda3912c1d26bc18dfaee6293848e49a50" "checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" @@ -5349,7 +5349,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=555d99dbb96017448cb019a4881258ad748d877e)" = "" +"checksum multistream-select 0.6.1 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" "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" @@ -5366,8 +5366,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=555d99dbb96017448cb019a4881258ad748d877e)" = "" -"checksum parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=555d99dbb96017448cb019a4881258ad748d877e)" = "" +"checksum parity-multiaddr 0.6.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" +"checksum parity-multihash 0.2.0 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" "checksum parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f747c06d9f3b2ad387ac881b9667298c81b1243aa9833f086e05996937c35507" "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" @@ -5431,7 +5431,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=555d99dbb96017448cb019a4881258ad748d877e)" = "" +"checksum rw-stream-sink 0.1.2 (git+https://github.com/SigP/rust-libp2p/?rev=735313ebda6a98604929f6c4606aefac19e00760)" = "" "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/eth2/state_processing/src/per_block_processing/signature_sets.rs b/eth2/state_processing/src/per_block_processing/signature_sets.rs index 81e61f2602..09563c66df 100644 --- a/eth2/state_processing/src/per_block_processing/signature_sets.rs +++ b/eth2/state_processing/src/per_block_processing/signature_sets.rs @@ -248,10 +248,14 @@ fn validator_pubkey<'a, T: EthSpec>( .ok_or_else(|| Error::ValidatorUnknown(validator_index as u64))? .pubkey; - pubkey_bytes - .try_into() - .map(|pubkey: PublicKey| Cow::Owned(pubkey.as_raw().point.clone())) - .map_err(|_| Error::BadBlsBytes { - validator_index: validator_index as u64, - }) + if let Some(pubkey) = pubkey_bytes.decompressed() { + Ok(Cow::Borrowed(&pubkey.as_raw().point)) + } else { + pubkey_bytes + .try_into() + .map(|pubkey: PublicKey| Cow::Owned(pubkey.as_raw().point.clone())) + .map_err(|_| Error::BadBlsBytes { + validator_index: validator_index as u64, + }) + } } diff --git a/eth2/types/src/beacon_state.rs b/eth2/types/src/beacon_state.rs index ba29d45658..dd483a7740 100644 --- a/eth2/types/src/beacon_state.rs +++ b/eth2/types/src/beacon_state.rs @@ -62,6 +62,7 @@ pub enum Error { CommitteeCacheUninitialized(Option), SszTypesError(ssz_types::Error), CachedTreeHashError(cached_tree_hash::Error), + InvalidValidatorPubkey(ssz::DecodeError), } /// Control whether an epoch-indexed field can be indexed at the next epoch or not. @@ -784,6 +785,7 @@ impl BeaconState { self.update_pubkey_cache()?; self.build_tree_hash_cache()?; self.exit_cache.build(&self.validators, spec)?; + self.decompress_validator_pubkeys()?; Ok(()) } @@ -945,6 +947,23 @@ impl BeaconState { self.tree_hash_cache = BeaconTreeHashCache::default(); } + /// Iterate through all validators and decompress their public key, unless it has already been + /// decompressed. + /// + /// Does not check the validity of already decompressed keys. + pub fn decompress_validator_pubkeys(&mut self) -> Result<(), Error> { + self.validators.iter_mut().try_for_each(|validator| { + if validator.pubkey.decompressed().is_none() { + validator + .pubkey + .decompress() + .map_err(|e| Error::InvalidValidatorPubkey(e)) + } else { + Ok(()) + } + }) + } + pub fn clone_without_caches(&self) -> Self { BeaconState { genesis_time: self.genesis_time, diff --git a/eth2/types/src/validator.rs b/eth2/types/src/validator.rs index 5ece4cbf44..537c546196 100644 --- a/eth2/types/src/validator.rs +++ b/eth2/types/src/validator.rs @@ -1,5 +1,4 @@ use crate::{test_utils::TestRandom, Epoch, Hash256, PublicKeyBytes}; - use serde_derive::{Deserialize, Serialize}; use ssz_derive::{Decode, Encode}; use test_random_derive::TestRandom; diff --git a/eth2/utils/bls/src/macros.rs b/eth2/utils/bls/src/macros.rs index 6059f08065..6119f355a3 100644 --- a/eth2/utils/bls/src/macros.rs +++ b/eth2/utils/bls/src/macros.rs @@ -83,7 +83,10 @@ macro_rules! bytes_struct { #[doc = $small_name] #[doc = " (e.g., from the deposit contract)."] #[derive(Clone)] - pub struct $name([u8; $byte_size]); + pub struct $name { + bytes: [u8; $byte_size], + decompressed: Option<$type> + } }; ($name: ident, $type: ty, $byte_size: expr, $small_name: expr) => { bytes_struct!($name, $type, $byte_size, $small_name, stringify!($type), @@ -91,15 +94,21 @@ macro_rules! bytes_struct { impl $name { pub fn from_bytes(bytes: &[u8]) -> Result { - Ok(Self(Self::get_bytes(bytes)?)) + Ok(Self { + bytes: Self::get_bytes(bytes)?, + decompressed: None + }) } pub fn empty() -> Self { - Self([0; $byte_size]) + Self { + bytes: [0; $byte_size], + decompressed: None + } } pub fn as_bytes(&self) -> Vec { - self.0.to_vec() + self.bytes.to_vec() } fn get_bytes(bytes: &[u8]) -> Result<[u8; $byte_size], ssz::DecodeError> { @@ -114,23 +123,32 @@ macro_rules! bytes_struct { Ok(result) } } + + pub fn decompress(&mut self) -> Result<(), ssz::DecodeError> { + self.decompressed = Some(<&Self as std::convert::TryInto<$type>>::try_into(self)?); + Ok(()) + } + + pub fn decompressed(&self) -> &Option<$type> { + &self.decompressed + } } impl std::fmt::Debug for $name { fn fmt(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { - self.0[..].fmt(formatter) + self.bytes[..].fmt(formatter) } } impl PartialEq for $name { fn eq(&self, other: &Self) -> bool { - &self.0[..] == &other.0[..] + &self.bytes[..] == &other.bytes[..] } } impl std::hash::Hash for $name { fn hash(&self, state: &mut H) { - self.0.hash(state) + self.bytes.hash(state) } } @@ -140,7 +158,7 @@ macro_rules! bytes_struct { type Error = ssz::DecodeError; fn try_into(self) -> Result<$type, Self::Error> { - <$type>::from_bytes(&self.0[..]) + <$type>::from_bytes(&self.bytes[..]) } } diff --git a/eth2/utils/ssz/src/decode.rs b/eth2/utils/ssz/src/decode.rs index 77144092b1..abcebda073 100644 --- a/eth2/utils/ssz/src/decode.rs +++ b/eth2/utils/ssz/src/decode.rs @@ -3,7 +3,7 @@ use super::*; pub mod impls; /// Returned when SSZ decoding fails. -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] pub enum DecodeError { /// The bytes supplied were too short to be decoded into the specified type. InvalidByteLength { len: usize, expected: usize },