From 5122b2c13a6c49dd0fb947aec32fad2688c5a72c Mon Sep 17 00:00:00 2001 From: Age Manning Date: Wed, 27 May 2020 06:34:15 +1000 Subject: [PATCH] Allow discovery to be more lenient in enr eth2 fields (#1201) * Allow discovery to be more lenient in enr eth2 fields * Correct web3 dep * Discovery bug fixes --- Cargo.lock | 285 ++++++++++--------- account_manager/Cargo.toml | 2 +- beacon_node/eth1/Cargo.toml | 2 +- beacon_node/eth2-libp2p/Cargo.toml | 14 +- beacon_node/eth2-libp2p/src/discovery/mod.rs | 13 +- lcli/Cargo.toml | 2 +- testing/eth1_test_rig/Cargo.toml | 2 +- validator_client/Cargo.toml | 2 +- 8 files changed, 171 insertions(+), 151 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 176864b43..b30cf4003 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,13 +25,22 @@ dependencies = [ "slog-async", "slog-term", "tempdir", - "tokio 0.2.20", + "tokio 0.2.21", "types", "validator_client", "validator_dir", "web3", ] +[[package]] +name = "addr2line" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a49806b9dadc843c61e7c97e72490ad7f7220ae249012fbda9ad0609457c0543" +dependencies = [ + "gimli", +] + [[package]] name = "adler32" version = "1.0.4" @@ -110,9 +119,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.28" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff" +checksum = "85bb70cc08ec97ca5450e6eba421deeea5f172c0fc61f78b5357b2a8e8be195f" [[package]] name = "arbitrary" @@ -212,26 +221,17 @@ checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" [[package]] name = "backtrace" -version = "0.3.46" +version = "0.3.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e692897359247cc6bb902933361652380af0f1b7651ae5c5013407f30e109e" +checksum = "0df2f85c8a2abbe3b7d7e748052fdd9b76a0458fdeb16ad4223f5eca78c7c130" dependencies = [ - "backtrace-sys", + "addr2line", "cfg-if", "libc", + "object", "rustc-demangle", ] -[[package]] -name = "backtrace-sys" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fbebbe1c9d1f383a9cc7e8ccdb471b91c8d024ee9c2ca5b5346121fe8b4399" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "base-x" version = "0.2.6" @@ -297,7 +297,7 @@ dependencies = [ "state_processing", "store", "tempfile", - "tokio 0.2.20", + "tokio 0.2.21", "tree_hash", "types", "websocket_server", @@ -330,7 +330,7 @@ dependencies = [ "slog-async", "slog-term", "store", - "tokio 0.2.20", + "tokio 0.2.21", "toml", "types", "version", @@ -468,9 +468,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.2.1" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" +checksum = "5356f1d23ee24a1f785a56d1d1a5f0fd5b0f6a0c0fb2412ce11da71649ab78f6" [[package]] name = "byte-slice-cast" @@ -636,7 +636,7 @@ dependencies = [ "store", "time 0.2.16", "timer", - "tokio 0.2.20", + "tokio 0.2.21", "toml", "tree_hash", "types", @@ -919,9 +919,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c0346158a19b3627234e15596f5e465c360fcdb97d817bcb255e0510f5a788" +checksum = "72aa14c04dfae8dd7d8a2b1cb7ca2152618cd01336dbfe704b8dcbf8d41dbd69" [[package]] name = "db-key" @@ -965,9 +965,9 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.5" +version = "0.99.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2323f3f47db9a0e77ce7a300605d8d2098597fc451ed1a97bb1f6411bb550a7" +checksum = "2127768764f1556535c01b5326ef94bd60ff08dcfbdc544d53e69ed155610f5d" dependencies = [ "proc-macro2", "quote", @@ -1031,7 +1031,7 @@ dependencies = [ "rlp", "sha2", "smallvec 1.4.0", - "tokio 0.2.20", + "tokio 0.2.21", "uint", "zeroize", ] @@ -1086,18 +1086,18 @@ checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" [[package]] name = "encoding_rs" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" +checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" dependencies = [ "cfg-if", ] [[package]] name = "enr" -version = "0.1.0-alpha.7" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c26f4eec6f07787274ddb813bb91355eeea7c094113d2d81ddd6330af1334" +checksum = "ca3cd1bccf1bd78eee44d89c0f81b60008b40153db2b99c0fc01abf353781e13" dependencies = [ "base64 0.12.1", "bs58", @@ -1143,7 +1143,7 @@ dependencies = [ "slog-json", "slog-term", "sloggers", - "tokio 0.2.20", + "tokio 0.2.21", "types", ] @@ -1154,7 +1154,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d371106cc88ffdfb1eabd7111e432da544f16f3e2d7bf1dfe8bf575f1df045cd" dependencies = [ "backtrace", - "version_check 0.9.1", + "version_check 0.9.2", ] [[package]] @@ -1179,7 +1179,7 @@ dependencies = [ "slog", "sloggers", "state_processing", - "tokio 0.2.20", + "tokio 0.2.21", "toml", "tree_hash", "types", @@ -1193,7 +1193,7 @@ dependencies = [ "deposit_contract", "futures 0.3.5", "serde_json", - "tokio 0.2.20", + "tokio 0.2.21", "types", "web3", ] @@ -1230,7 +1230,7 @@ dependencies = [ "snap", "tempdir", "tiny-keccak 2.0.2", - "tokio 0.2.20", + "tokio 0.2.21", "tokio-io-timeout", "tokio-util", "types", @@ -1389,9 +1389,9 @@ dependencies = [ [[package]] name = "ethbloom" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "befe713756981dbbda28e23f5c65c85de512915db695284342cc2ee36b7a184f" +checksum = "71a6567e6fd35589fea0c63b94b4cf2e55573e413901bdbe60ab15cf0e25e5df" dependencies = [ "crunchy", "fixed-hash", @@ -1402,9 +1402,9 @@ dependencies = [ [[package]] name = "ethereum-types" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8616dc6a7bc7d81ab8a6425635299ee3582975d4ddeb9312b8b0b8ea54dfecf8" +checksum = "473aecff686bd8e7b9db0165cbbb53562376b39bf35b427f0c60446a9e1634b0" dependencies = [ "ethbloom", "fixed-hash", @@ -1497,9 +1497,9 @@ dependencies = [ [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foreign-types" @@ -1703,7 +1703,7 @@ dependencies = [ "serde_derive", "slog", "state_processing", - "tokio 0.2.20", + "tokio 0.2.21", "tree_hash", "types", ] @@ -1741,6 +1741,12 @@ dependencies = [ "wasi", ] +[[package]] +name = "gimli" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" + [[package]] name = "h2" version = "0.1.26" @@ -1774,7 +1780,7 @@ dependencies = [ "indexmap", "log 0.4.8", "slab 0.4.2", - "tokio 0.2.20", + "tokio 0.2.21", "tokio-util", ] @@ -1793,7 +1799,7 @@ name = "hashset_delay" version = "0.2.0" dependencies = [ "futures 0.3.5", - "tokio 0.2.20", + "tokio 0.2.21", ] [[package]] @@ -1807,9 +1813,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61565ff7aaace3525556587bd2dc31d4a07071957be715e63ce7b1eccf51a8f4" +checksum = "91780f809e750b0a89f5544be56617ff6b1227ee485bcb06ebe10cdf89bd3b71" dependencies = [ "libc", ] @@ -1984,7 +1990,7 @@ dependencies = [ "net2", "pin-project", "time 0.1.43", - "tokio 0.2.20", + "tokio 0.2.21", "tower-service", "want 0.3.0", ] @@ -2011,7 +2017,7 @@ dependencies = [ "bytes 0.5.4", "hyper 0.13.5", "native-tls", - "tokio 0.2.20", + "tokio 0.2.21", "tokio-tls 0.3.1", ] @@ -2210,7 +2216,7 @@ dependencies = [ "serde_yaml", "simple_logger", "state_processing", - "tokio 0.2.20", + "tokio 0.2.21", "tree_hash", "types", "validator_dir", @@ -2239,9 +2245,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.69" +version = "0.2.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" +checksum = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f" [[package]] name = "libflate" @@ -2269,9 +2275,9 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" -version = "0.18.1" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ea742c86405b659c358223a8f0f9f5a9eb27bb6083894c6340959b05269662" +checksum = "057eba5432d3e740e313c6e13c9153d0cb76b4f71bfc2e5242ae5bdb7d41af67" dependencies = [ "bytes 0.5.4", "futures 0.3.5", @@ -2297,9 +2303,9 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d2c17158c4dca984a77a5927aac6f0862d7f50c013470a415f93be498b5739" +checksum = "4f5e30dcd8cb13a02ad534e214da234eca1595a76b5788b645dfa5c734d2124b" dependencies = [ "asn1_der", "bs58", @@ -2331,9 +2337,9 @@ dependencies = [ [[package]] name = "libp2p-core-derive" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "329127858e4728db5ab60c33d5ae352a999325fdf190ed022ec7d3a4685ae2e6" +checksum = "f09548626b737ed64080fde595e06ce1117795b8b9fc4d2629fa36561c583171" dependencies = [ "quote", "syn", @@ -2341,9 +2347,9 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0d0993481203d68e5ce2f787d033fb0cac6b850659ed6c784612db678977c71" +checksum = "3cc186d9a941fd0207cf8f08ef225a735e2d7296258f570155e525f6ee732f87" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2352,9 +2358,9 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f7f3f79f060864db0317cc47641b7d35276dee52a0ffa91553fbd0c153863a3" +checksum = "1675c23765e37ddbf6bf05fb520be8f7df3f5f4981d68f185bb95f9b047c576a" dependencies = [ "base64 0.11.0", "byteorder", @@ -2377,9 +2383,9 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a38ca3eb807789e26f41c82ca7cd2b3843c66c5587b8b5f709a2f421f3061414" +checksum = "6438ed8ca240c7635c9caa3be6c5258bc0058553ae97ba81737f04e5d33804f5" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2393,9 +2399,9 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0832882b06619b2e81d74e71447753ea3c068164a0bca67847d272e856a04a02" +checksum = "34ce63313ad4bce2d76e54c292a1293ea47a0ebbe16708f1513fa62184992f53" dependencies = [ "bytes 0.5.4", "fnv", @@ -2409,9 +2415,9 @@ dependencies = [ [[package]] name = "libp2p-noise" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "918e94a649e1139c24ee9f1f8c1f2adaba6d157b9471af787f2d9beac8c29c77" +checksum = "84fd504e27b0eadd451e06b67694ef714bd8374044e7db339bb0cdb83755ddf4" dependencies = [ "curve25519-dalek", "futures 0.3.5", @@ -2430,9 +2436,9 @@ dependencies = [ [[package]] name = "libp2p-secio" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a0509a7e47245259954fef58b85b81bf4d29ae33a4365e38d718a866698774" +checksum = "7b73f0cc119c83a5b619d6d11074a319fdb4aa4daf8088ade00d511418566e28" dependencies = [ "aes-ctr", "ctr", @@ -2460,9 +2466,9 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44ab289ae44cc691da0a6fe96aefa43f26c86c6c7813998e203f6d80f1860f18" +checksum = "b4a8101a0e0d5f04562137a476bf5f5423cd5bdab2f7e43a75909668e63cb102" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2475,9 +2481,9 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.18.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b37ea44823d3ed223e4605da94b50177bc520f05ae2452286700549a32d81669" +checksum = "309f95fce9bec755eff5406f8b822fd3969990830c2b54f752e1fc181d5ace3e" dependencies = [ "futures 0.3.5", "futures-timer", @@ -2485,14 +2491,15 @@ dependencies = [ "ipnet", "libp2p-core", "log 0.4.8", - "tokio 0.2.20", + "socket2", + "tokio 0.2.21", ] [[package]] name = "libp2p-websocket" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6874c9069ce93d899df9dc7b29f129c706b2a0fdc048f11d878935352b580190" +checksum = "085fbe4c05c4116c2164ab4d5a521eb6e00516c444f61b3ee9f68c7b1e53580b" dependencies = [ "async-tls", "bytes 0.5.4", @@ -2511,9 +2518,9 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f91aea50f6571e0bc6c058dc0e9b270afd41ec28dd94e9e4bf607e78b9ab87" +checksum = "0b305d3a8981e68f11c0e17f2d11d5c52fae95e0d7c283f9e462b5b2dab413b2" dependencies = [ "futures 0.3.5", "libp2p-core", @@ -2579,7 +2586,7 @@ dependencies = [ "slog-term", "sloggers", "tempfile", - "tokio 0.2.20", + "tokio 0.2.21", "types", "validator_client", "validator_dir", @@ -2638,9 +2645,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" +checksum = "9e488db3a9e108382265a30764f43cfc87517322e5d04ae0603b32a33461dca3" dependencies = [ "hashbrown", ] @@ -2778,7 +2785,7 @@ checksum = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" dependencies = [ "log 0.4.8", "mio", - "miow 0.3.3", + "miow 0.3.4", "winapi 0.3.8", ] @@ -2807,9 +2814,9 @@ dependencies = [ [[package]] name = "miow" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" +checksum = "22dfdd1d51b2639a5abd17ed07005c3af05fb7a2a3b1a1d0d7af1000a520c1c7" dependencies = [ "socket2", "winapi 0.3.8", @@ -2817,9 +2824,9 @@ dependencies = [ [[package]] name = "multihash" -version = "0.10.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47fbc227f7e2b1cb701f95404579ecb2668abbdd3c7ef7a6cbb3cc0d3b236869" +checksum = "f75db05d738947aa5389863aadafbcf2e509d7ba099dc2ddcdf4fc66bf7a9e03" dependencies = [ "blake2b_simd", "blake2s_simd", @@ -2838,9 +2845,9 @@ checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce" [[package]] name = "multistream-select" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74cdcf7cfb3402881e15a1f95116cb033d69b33c83d481e1234777f5ef0c3d2c" +checksum = "991c33683908c588b8f2cf66c221d8f390818c1bdcd13fce55208408e027a796" dependencies = [ "bytes 0.5.4", "futures 0.3.5", @@ -2905,7 +2912,7 @@ dependencies = [ "smallvec 1.4.0", "store", "tempfile", - "tokio 0.2.20", + "tokio 0.2.21", "tree_hash", "types", ] @@ -3025,12 +3032,18 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.3.1" +name = "object" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b" +checksum = "9cbca9424c482ee628fa549d9c812e2cd22f1180b9222c9200fdfa6eb31aecb2" + +[[package]] +name = "once_cell" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" dependencies = [ - "parking_lot 0.9.0", + "parking_lot 0.10.2", ] [[package]] @@ -3067,9 +3080,9 @@ checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-sys" -version = "0.9.56" +version = "0.9.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02309a7f127000ed50594f0b50ecc69e7c654e16d41b4e8156d1b3df8e0b52e" +checksum = "7410fef80af8ac071d4f63755c0ab89ac3df0fd1ea91f1d1f37cf5cec4395990" dependencies = [ "autocfg 1.0.0", "cc", @@ -3096,9 +3109,9 @@ dependencies = [ [[package]] name = "parity-multiaddr" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4db35e222f783ef4e6661873f6c165c4eb7b65e0c408349818517d5705c2d7d3" +checksum = "12ca96399f4a01aa89c59220c4f52ac371940eb4e53e3ce990da796f364bdf69" dependencies = [ "arrayref", "bs58", @@ -3204,9 +3217,9 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "petgraph" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c127eea4a29ec6c85d153c59dc1213f33ec74cead30fe4730aecc88cc1fd92" +checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" dependencies = [ "fixedbitset", "indexmap", @@ -3214,18 +3227,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d480cb4e89522ccda96d0eed9af94180b7a5f93fb28f66e1fd7d68431663d1" +checksum = "edc93aeee735e60ecb40cf740eb319ff23eab1c5748abfdb5c180e4ce49f7791" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82996f11efccb19b685b14b5df818de31c1edcee3daa256ab5775dd98e72feb" +checksum = "e58db2081ba5b4c93bd6be09c40fd36cb9193a8336c384f3b40012e531aa7e40" dependencies = [ "proc-macro2", "quote", @@ -3264,9 +3277,9 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" +checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" [[package]] name = "primitive-types" @@ -3283,9 +3296,9 @@ dependencies = [ [[package]] name = "proc-macro-hack" -version = "0.5.15" +version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d659fe7c6d27f25e9d80a1a094c223f5246f6a6596453e09d7229bf42750b63" +checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4" [[package]] name = "proc-macro-nested" @@ -3295,9 +3308,9 @@ checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" [[package]] name = "proc-macro2" -version = "1.0.12" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319" +checksum = "1502d12e458c49a4c9cbff560d0fe0060c252bc29799ed94ca2ed4bb665a0101" dependencies = [ "unicode-xid", ] @@ -3429,9 +3442,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7" +checksum = "54a21852a652ad6f610c9510194f398ff6f8692e334fd1145fed931f7fbe44ea" dependencies = [ "proc-macro2", ] @@ -3695,7 +3708,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "time 0.1.43", - "tokio 0.2.20", + "tokio 0.2.21", "tokio-tls 0.3.1", "url 2.1.1", "wasm-bindgen", @@ -3737,7 +3750,7 @@ dependencies = [ "slot_clock", "state_processing", "store", - "tokio 0.2.20", + "tokio 0.2.21", "tree_hash", "types", "url 2.1.1", @@ -4115,9 +4128,9 @@ checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" [[package]] name = "sha2" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" +checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" dependencies = [ "block-buffer", "digest", @@ -4172,7 +4185,7 @@ dependencies = [ "node_test_rig", "parking_lot 0.10.2", "rayon", - "tokio 0.2.20", + "tokio 0.2.21", "types", "validator_client", ] @@ -4558,9 +4571,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.20" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd1b5e337360b1fae433c59fcafa0c6b77c605e92540afa5221a7b81a9eca91d" +checksum = "f14a640819f79b72a710c0be059dce779f9339ae046c8bef12c361d56702146f" dependencies = [ "proc-macro2", "quote", @@ -4653,18 +4666,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d12a1dae4add0f0d568eebc7bf142f145ba1aa2544cafb195c76f0f409091b60" +checksum = "b13f926965ad00595dd129fa12823b04bbf866e9085ab0a5f2b05b850fbfc344" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f34e0c1caaa462fd840ec6b768946ea1e7842620d94fe29d5b847138f521269" +checksum = "893582086c2f98cde18f906265a65b5030a074b1046c674ae898be6519a7f479" dependencies = [ "proc-macro2", "quote", @@ -4701,7 +4714,7 @@ dependencies = [ "standback", "stdweb", "time-macros", - "version_check 0.9.1", + "version_check 0.9.2", "winapi 0.3.8", ] @@ -4737,7 +4750,7 @@ dependencies = [ "parking_lot 0.10.2", "slog", "slot_clock", - "tokio 0.2.20", + "tokio 0.2.21", "types", ] @@ -4811,9 +4824,9 @@ dependencies = [ [[package]] name = "tokio" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c1d570eb1a36f0345a5ce9c6c6e665b70b73d11236912c0b477616aeec47b1" +checksum = "d099fa27b9702bed751524694adbe393e18b36b204da91eb1cbbbbb4a5ee2d58" dependencies = [ "bytes 0.5.4", "fnv", @@ -4923,7 +4936,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9390a43272c8a6ac912ed1d1e2b6abeafd5047e05530a2fa304deee041a06215" dependencies = [ "bytes 0.5.4", - "tokio 0.2.20", + "tokio 0.2.21", ] [[package]] @@ -5037,7 +5050,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" dependencies = [ "native-tls", - "tokio 0.2.20", + "tokio 0.2.21", ] [[package]] @@ -5102,7 +5115,7 @@ dependencies = [ "futures-sink", "log 0.4.8", "pin-project-lite", - "tokio 0.2.20", + "tokio 0.2.21", ] [[package]] @@ -5264,7 +5277,7 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check 0.9.1", + "version_check 0.9.2", ] [[package]] @@ -5394,7 +5407,7 @@ dependencies = [ "slog-term", "slot_clock", "tempdir", - "tokio 0.2.20", + "tokio 0.2.21", "tree_hash", "types", "validator_dir", @@ -5445,9 +5458,9 @@ checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" [[package]] name = "version_check" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] name = "void" @@ -5613,8 +5626,8 @@ dependencies = [ [[package]] name = "web3" -version = "0.10.0" -source = "git+https://github.com/tomusdrw/rust-web3#b6c81f978ede4e5c250b2d6f93399f31f7ac2a48" +version = "0.11.0" +source = "git+https://github.com/tomusdrw/rust-web3#a3e5a5315f0a6bf907183322844f7d6650fa8da7" dependencies = [ "arrayvec 0.5.1", "base64 0.12.1", @@ -5702,7 +5715,7 @@ dependencies = [ "serde_derive", "serde_json", "slog", - "tokio 0.2.20", + "tokio 0.2.21", "types", "ws", ] diff --git a/account_manager/Cargo.toml b/account_manager/Cargo.toml index eadb2ad6b..005ff2878 100644 --- a/account_manager/Cargo.toml +++ b/account_manager/Cargo.toml @@ -24,7 +24,7 @@ hex = "0.4.2" validator_client = { path = "../validator_client" } rayon = "1.3.0" eth2_testnet_config = { path = "../common/eth2_testnet_config" } -web3 = "0.10.0" +web3 = "0.11.0" futures = { version = "0.3.5", features = ["compat"] } clap_utils = { path = "../common/clap_utils" } eth2_wallet = { path = "../crypto/eth2_wallet" } diff --git a/beacon_node/eth1/Cargo.toml b/beacon_node/eth1/Cargo.toml index e1b5dfbbb..695bdb1cb 100644 --- a/beacon_node/eth1/Cargo.toml +++ b/beacon_node/eth1/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" eth1_test_rig = { path = "../../testing/eth1_test_rig" } environment = { path = "../../lighthouse/environment" } toml = "0.5.6" -web3 = "0.10.0" +web3 = "0.11.0" sloggers = "1.0.0" [dependencies] diff --git a/beacon_node/eth2-libp2p/Cargo.toml b/beacon_node/eth2-libp2p/Cargo.toml index dcf327117..c7cdf150a 100644 --- a/beacon_node/eth2-libp2p/Cargo.toml +++ b/beacon_node/eth2-libp2p/Cargo.toml @@ -15,18 +15,18 @@ eth2_ssz = "0.1.2" eth2_ssz_derive = "0.1.0" slog = { version = "2.5.2", features = ["max_level_trace"] } version = { path = "../version" } -tokio = { version = "0.2.20", features = ["time"] } +tokio = { version = "0.2.21", features = ["time"] } futures = "0.3.5" error-chain = "0.12.2" dirs = "2.0.2" -fnv = "1.0.6" +fnv = "1.0.7" unsigned-varint = { git = "https://github.com/sigp/unsigned-varint", branch = "latest-codecs", features = ["codec"] } lazy_static = "1.4.0" lighthouse_metrics = { path = "../../common/lighthouse_metrics" } smallvec = "1.4.0" -lru = "0.4.3" +lru = "0.4.5" parking_lot = "0.10.2" -sha2 = "0.8.1" +sha2 = "0.8.2" base64 = "0.12.1" snap = "1.0.0" void = "1.0.2" @@ -35,16 +35,16 @@ tokio-util = { version = "0.3.1", features = ["codec", "compat"] } # Patched for quick updates discv5 = { git = "https://github.com/sigp/discv5", rev = "7b3bd40591b62b8c002ffdb85de008aa9f82e2e5" } tiny-keccak = "2.0.2" -libp2p-tcp = { version = "0.18.0", default-features = false, features = ["tokio"] } +libp2p-tcp = { version = "0.19.1", default-features = false, features = ["tokio"] } [dependencies.libp2p] -version = "0.18.1" +version = "0.19.1" default-features = false features = ["websocket", "identify", "mplex", "yamux", "noise", "secio", "gossipsub", "dns"] [dev-dependencies] -tokio = { version = "0.2.20", features = ["full"] } +tokio = { version = "0.2.21", features = ["full"] } slog-stdlog = "4.0.0" slog-term = "2.5.0" slog-async = "2.5.0" diff --git a/beacon_node/eth2-libp2p/src/discovery/mod.rs b/beacon_node/eth2-libp2p/src/discovery/mod.rs index 7800848b9..7349fe5ba 100644 --- a/beacon_node/eth2-libp2p/src/discovery/mod.rs +++ b/beacon_node/eth2-libp2p/src/discovery/mod.rs @@ -36,6 +36,8 @@ use types::{EnrForkId, EthSpec, SubnetId}; const MAX_TIME_BETWEEN_PEER_SEARCHES: u64 = 120; /// Initial delay between peer searches. const INITIAL_SEARCH_DELAY: u64 = 5; +/// The number of peers we must be connected to before increasing the discovery delay. +const MINIMUM_PEERS_BEFORE_DELAY_INCREASE: usize = 5; /// Local ENR storage filename. pub const ENR_FILENAME: &str = "enr.dat"; /// Number of peers we'd like to have connected to a given long-lived subnet. @@ -361,7 +363,9 @@ impl Discovery { } }; // predicate for finding nodes with a matching fork - let eth2_fork_predicate = move |enr: &Enr| enr.eth2() == Ok(enr_fork_id.clone()); + let eth2_fork_predicate = move |enr: &Enr| { + enr.eth2().map(|enr| enr.fork_digest) == Ok(enr_fork_id.fork_digest.clone()) + }; let predicate = move |enr: &Enr| eth2_fork_predicate(enr) && enr_predicate(enr); // general predicate @@ -476,10 +480,13 @@ impl NetworkBehaviour for Discovery { Discv5Event::FindNodeResult { closer_peers, .. } => { debug!(self.log, "Discovery query completed"; "peers_found" => closer_peers.len()); // update the time to the next query - if self.past_discovery_delay < MAX_TIME_BETWEEN_PEER_SEARCHES { + if self.past_discovery_delay < MAX_TIME_BETWEEN_PEER_SEARCHES + && self.network_globals.connected_or_dialing_peers() + > MINIMUM_PEERS_BEFORE_DELAY_INCREASE + { self.past_discovery_delay *= 2; } - let delay = std::cmp::max( + let delay = std::cmp::min( self.past_discovery_delay, MAX_TIME_BETWEEN_PEER_SEARCHES, ); diff --git a/lcli/Cargo.toml b/lcli/Cargo.toml index c895cb8cb..9bc1bbdd3 100644 --- a/lcli/Cargo.toml +++ b/lcli/Cargo.toml @@ -21,7 +21,7 @@ regex = "1.3.7" eth1_test_rig = { path = "../testing/eth1_test_rig" } futures = { version = "0.3.5", features = ["compat"] } environment = { path = "../lighthouse/environment" } -web3 = "0.10.0" +web3 = "0.11.0" eth2_testnet_config = { path = "../common/eth2_testnet_config" } dirs = "2.0.2" genesis = { path = "../beacon_node/genesis" } diff --git a/testing/eth1_test_rig/Cargo.toml b/testing/eth1_test_rig/Cargo.toml index e2f951e9b..e93c98288 100644 --- a/testing/eth1_test_rig/Cargo.toml +++ b/testing/eth1_test_rig/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Paul Hauner "] edition = "2018" [dependencies] -web3 = "0.10.0" +web3 = "0.11.0" tokio = { version = "0.2.20", features = ["time"] } futures = { version = "0.3.5", features = ["compat"] } types = { path = "../../consensus/types"} diff --git a/validator_client/Cargo.toml b/validator_client/Cargo.toml index 306dca6d8..d5ba403e4 100644 --- a/validator_client/Cargo.toml +++ b/validator_client/Cargo.toml @@ -44,6 +44,6 @@ bls = { path = "../crypto/bls" } remote_beacon_node = { path = "../common/remote_beacon_node" } tempdir = "0.3.7" rayon = "1.3.0" -web3 = "0.10.0" +web3 = "0.11.0" validator_dir = { path = "../common/validator_dir" } clap_utils = { path = "../common/clap_utils" }