diff --git a/Cargo.lock b/Cargo.lock index ec8bbde7d1f..ed028b99716 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,7 +19,7 @@ dependencies = [ "eth2_ssz_derive", "eth2_wallet", "eth2_wallet_manager", - "futures 0.3.8", + "futures 0.3.12", "hex", "libc", "rand 0.7.3", @@ -31,8 +31,7 @@ dependencies = [ "slog-term", "slot_clock", "tempfile", - "tokio 0.3.6", - "tokio-compat-02", + "tokio 1.1.0", "types", "validator_dir", ] @@ -58,9 +57,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c0929d69e78dd9bf5408269919fcbcaeb2e35e5d43e5815517cdc6a8e11a423" +checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" dependencies = [ "gimli", ] @@ -228,9 +227,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.36" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68803225a7b13e47191bab76f2687382b60d259e8cf37f6e1893658b84bb9479" +checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" [[package]] name = "arbitrary" @@ -243,9 +242,9 @@ dependencies = [ [[package]] name = "arc-swap" -version = "0.4.8" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabe5a181f83789739c194cbe5a897dde195078fac08568d09221fd6137a7ba8" +checksum = "d4d7d63395147b81a9e570bcc6243aaf71c017bd666d4909cfef0085bdda8d73" [[package]] name = "arrayref" @@ -325,12 +324,15 @@ dependencies = [ [[package]] name = "async-global-executor" -version = "1.4.3" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73079b49cd26b8fd5a15f68fc7707fc78698dc2a3d61430f2a7a9430230dfa04" +checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" dependencies = [ + "async-channel", "async-executor", "async-io", + "async-mutex", + "blocking", "futures-lite", "num_cpus", "once_cell", @@ -356,6 +358,15 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "async-lock" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1996609732bde4a9988bc42125f55f2af5f3c36370e27c778d5191a4a1b63bfb" +dependencies = [ + "event-listener", +] + [[package]] name = "async-mutex" version = "1.4.0" @@ -377,6 +388,15 @@ dependencies = [ "url", ] +[[package]] +name = "async-object-pool" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb901c30ebc2fc4ab46395bbfbdba9542c16559d853645d75190c3056caf3bc" +dependencies = [ + "async-std", +] + [[package]] name = "async-process" version = "1.0.1" @@ -395,17 +415,16 @@ dependencies = [ [[package]] name = "async-std" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9f84f1280a2b436a2c77c2582602732b6c2f4321d5494d6e799e6c367859a8" +checksum = "d9f06685bad74e0570f5213741bea82158279a4103d988e57bfada11ad230341" dependencies = [ "async-channel", "async-global-executor", "async-io", - "async-mutex", + "async-lock", "async-process", - "blocking", - "crossbeam-utils 0.8.1", + "crossbeam-utils", "futures-channel", "futures-core", "futures-io", @@ -416,7 +435,7 @@ dependencies = [ "memchr", "num_cpus", "once_cell", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "pin-utils", "slab", "wasm-bindgen-futures", @@ -428,19 +447,6 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" -[[package]] -name = "async-tls" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f23d769dbf1838d5df5156e7b1ad404f4c463d1ac2c6aeb6cd943630f8a8400" -dependencies = [ - "futures-core", - "futures-io", - "rustls", - "webpki", - "webpki-roots", -] - [[package]] name = "async-trait" version = "0.1.42" @@ -452,6 +458,19 @@ dependencies = [ "syn", ] +[[package]] +name = "asynchronous-codec" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb4401f0a3622dad2e0763fa79e0eb328bc70fb7dccfdd645341f00d671247d6" +dependencies = [ + "bytes 1.0.1", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite 0.2.4", +] + [[package]] name = "atomic" version = "0.5.0" @@ -473,7 +492,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf13118df3e3dce4b5ac930641343b91b656e4e72c8f8325838b01a4b1c9d45" dependencies = [ - "http 0.2.2", + "http", "log", "url", ] @@ -567,11 +586,11 @@ dependencies = [ "eth2_ssz_types", "exit-future", "fork_choice", - "futures 0.3.8", + "futures 0.3.12", "genesis", "int_to_bytes", "integer-sqrt", - "itertools 0.9.0", + "itertools", "lazy_static", "lighthouse_metrics", "log", @@ -600,7 +619,7 @@ dependencies = [ "strum", "task_executor", "tempfile", - "tokio 0.3.6", + "tokio 1.1.0", "tree_hash", "types", ] @@ -622,10 +641,10 @@ dependencies = [ "eth2_network_config", "eth2_ssz", "exit-future", - "futures 0.3.8", + "futures 0.3.12", "genesis", "hex", - "hyper 0.13.9", + "hyper 0.14.4", "lighthouse_version", "logging", "node_test_rig", @@ -637,8 +656,7 @@ dependencies = [ "slog-term", "store", "task_executor", - "tokio 0.3.6", - "tokio-compat-02", + "tokio 1.1.0", "types", ] @@ -728,17 +746,6 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "blake2s_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e461a7034e85b211a4acb57ee2e6730b32912b06c08cc242243c39fc21ae6a2" -dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", -] - [[package]] name = "block-buffer" version = "0.7.3" @@ -839,7 +846,7 @@ dependencies = [ "eth2_libp2p", "eth2_network_config", "eth2_ssz", - "futures 0.3.8", + "futures 0.3.12", "hex", "log", "logging", @@ -849,7 +856,7 @@ dependencies = [ "slog-stdlog", "slog-term", "sloggers", - "tokio 0.3.6", + "tokio 1.1.0", "types", ] @@ -907,9 +914,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "1.3.4" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" [[package]] name = "bytes" @@ -923,6 +930,12 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0dcbc35f504eb6fc275a6d20e4ebcda18cf50d40ba6fabff8c711fa16cb3b16" +[[package]] +name = "bytes" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" + [[package]] name = "bzip2" version = "0.3.3" @@ -1024,7 +1037,7 @@ dependencies = [ "libc", "num-integer", "num-traits", - "time 0.1.44", + "time 0.1.43", "winapi 0.3.9", ] @@ -1077,7 +1090,7 @@ dependencies = [ "eth2_config", "eth2_libp2p", "eth2_ssz", - "futures 0.3.8", + "futures 0.3.12", "genesis", "http_api", "http_metrics", @@ -1098,24 +1111,15 @@ dependencies = [ "slot_clock", "store", "task_executor", - "time 0.2.23", + "time 0.2.24", "timer", - "tokio 0.3.6", + "tokio 1.1.0", "toml", "tree_hash", "types", "url", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "cmake" version = "0.1.45" @@ -1172,15 +1176,15 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.1.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2d9162b7289a46e86208d6af2c686ca5bfde445878c41a458a9fac706252d0b" +checksum = "c5d82796b70971fbb603900a5edc797a4d9be0f9ec1257f83a1dba0aa374e3e9" [[package]] name = "const_fn" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd51eab21ab4fd6a3bf889e2d0958c0a6e3a61ad04260325e919e652a2a62826" +checksum = "28b9d6de7f49e22cf97ad17fc4036ece69300032f45f78f30b4a4482cdc3f4a6" [[package]] name = "constant_time_eq" @@ -1236,7 +1240,7 @@ dependencies = [ "clap", "criterion-plot", "csv", - "itertools 0.9.0", + "itertools", "lazy_static", "num-traits", "oorandom", @@ -1258,17 +1262,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e022feadec601fba1649cfa83586381a4ad31c6bf3a9ab7d408118b05dd9889d" dependencies = [ "cast", - "itertools 0.9.0", -] - -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", + "itertools", ] [[package]] @@ -1278,7 +1272,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.1", + "crossbeam-utils", ] [[package]] @@ -1289,7 +1283,7 @@ checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", - "crossbeam-utils 0.8.1", + "crossbeam-utils", ] [[package]] @@ -1300,23 +1294,12 @@ checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" dependencies = [ "cfg-if 1.0.0", "const_fn", - "crossbeam-utils 0.8.1", + "crossbeam-utils", "lazy_static", "memoffset", "scopeguard", ] -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg 1.0.1", - "cfg-if 0.1.10", - "lazy_static", -] - [[package]] name = "crossbeam-utils" version = "0.8.1" @@ -1354,16 +1337,6 @@ dependencies = [ "subtle 2.4.0", ] -[[package]] -name = "crypto-mac" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bcd97a54c7ca5ce2f6eb16f6bede5b0ab5f0055fedc17d2f0b4466e21671ca" -dependencies = [ - "generic-array 0.14.4", - "subtle 2.4.0", -] - [[package]] name = "crypto-mac" version = "0.10.0" @@ -1448,9 +1421,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.0.0" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307" +checksum = "f627126b946c25a4638eec0ea634fc52506dea98db118aae985118ce7c3d723f" dependencies = [ "byteorder", "digest 0.9.0", @@ -1505,11 +1478,20 @@ dependencies = [ "types", ] +[[package]] +name = "der" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51f59c66c30bb7445c8320a5f9233e437e3572368099f25532a59054328899b4" +dependencies = [ + "const-oid", +] + [[package]] name = "derivative" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" +checksum = "eaed5874effa6cde088c644ddcdcb4ffd1511391c5be4fdd7a5ccd02c7e4a183" dependencies = [ "proc-macro2", "quote", @@ -1627,9 +1609,9 @@ checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" [[package]] name = "discv5" -version = "0.1.0-beta.2" +version = "0.1.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddad09a9bd70478c581a9f7e608a17962c5561a3ca7b1eb5b75cf1c6c3f124b8" +checksum = "f6f52d2228d51e8f868a37d5b5b25b82c13552b635d5b47c3a5d53855a6fc4f0" dependencies = [ "aes-ctr", "aes-gcm 0.8.0", @@ -1637,21 +1619,21 @@ dependencies = [ "digest 0.9.0", "enr", "fnv", - "futures 0.3.8", + "futures 0.3.12", "hex", "hkdf", "k256", "lazy_static", - "libp2p-core 0.23.1", + "libp2p-core", "lru_time_cache", - "multihash 0.11.4", "parking_lot", "rand 0.7.3", - "rlp", + "rlp 0.5.0", "sha2 0.9.2", "smallvec", - "tokio 0.3.6", - "tokio-util 0.5.1", + "tokio 1.1.0", + "tokio-stream", + "tokio-util 0.6.3", "tracing", "tracing-subscriber", "uint", @@ -1666,12 +1648,12 @@ checksum = "88d7ed2934d741c6b37e33e3832298e8850b53fd2d2bea03873375596c7cea4e" [[package]] name = "ecdsa" -version = "0.8.5" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87bf8bfb05ea8a6f74ddf48c7d1774851ba77bbe51ac984fdfa6c30310e1ff5f" +checksum = "41fbdb4ff710acb4db8ca29f93b897529ea6d6a45626d5183b47e012aa6ae7e4" dependencies = [ "elliptic-curve", - "hmac 0.9.0", + "hmac 0.10.1", "signature", ] @@ -1729,16 +1711,16 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.6.6" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396db09c483e7fca5d4fdb9112685632b3e76c9a607a2649c1bf904404a01366" +checksum = "592b1c857559479c056b73a3053c717108a70e4dce320ad28c79c63f5c2e62ba" dependencies = [ "bitvec 0.18.4", - "const-oid", "digest 0.9.0", "ff", "generic-array 0.14.4", "group", + "pkcs8", "rand_core 0.5.1", "subtle 2.4.0", "zeroize", @@ -1764,18 +1746,19 @@ dependencies = [ [[package]] name = "enr" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08ca9417e6cb1ac2aeb9d5075f4ac74173081969d1a26486f72a14770320e4c4" +checksum = "264237bc285638466aef78b954837d8a05371425cb21447d6e31db89d06d7a1b" dependencies = [ "base64 0.12.3", "bs58 0.3.1", + "bytes 1.0.1", "ed25519-dalek", "hex", "k256", "log", "rand 0.7.3", - "rlp", + "rlp 0.5.0", "serde", "sha3", "zeroize", @@ -1812,7 +1795,7 @@ dependencies = [ "eth2_config", "eth2_network_config", "exit-future", - "futures 0.3.8", + "futures 0.3.12", "logging", "parking_lot", "slog", @@ -1821,7 +1804,7 @@ dependencies = [ "slog-term", "sloggers", "task_executor", - "tokio 0.3.6", + "tokio 1.1.0", "types", ] @@ -1846,7 +1829,7 @@ dependencies = [ "eth2_ssz", "eth2_ssz_derive", "fallback", - "futures 0.3.8", + "futures 0.3.12", "hex", "lazy_static", "libflate", @@ -1860,7 +1843,7 @@ dependencies = [ "sloggers", "state_processing", "task_executor", - "tokio 0.3.6", + "tokio 1.1.0", "tokio-compat-02", "toml", "tree_hash", @@ -1873,9 +1856,9 @@ name = "eth1_test_rig" version = "0.2.0" dependencies = [ "deposit_contract", - "futures 0.3.8", + "futures 0.3.12", "serde_json", - "tokio 0.3.6", + "tokio 1.1.0", "tokio-compat-02", "types", "web3", @@ -1886,12 +1869,12 @@ name = "eth2" version = "0.1.0" dependencies = [ "account_utils", - "bytes 0.5.6", + "bytes 1.0.1", "eth2_keystore", "eth2_libp2p", "eth2_ssz", "eth2_ssz_derive", - "futures 0.3.8", + "futures 0.3.12", "futures-util", "hex", "libsecp256k1", @@ -1991,7 +1974,8 @@ dependencies = [ "eth2_ssz_types", "exit-future", "fnv", - "futures 0.3.8", + "futures 0.3.12", + "futures-io", "hashset_delay", "hex", "lazy_static", @@ -2014,11 +1998,11 @@ dependencies = [ "task_executor", "tempfile", "tiny-keccak 2.0.2", - "tokio 0.3.6", + "tokio 1.1.0", "tokio-io-timeout", - "tokio-util 0.4.0", + "tokio-util 0.6.3", "types", - "unsigned-varint 0.5.1 (git+https://github.com/sigp/unsigned-varint?branch=dep-update)", + "unsigned-varint 0.6.0", "void", ] @@ -2147,7 +2131,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", ] [[package]] @@ -2172,7 +2156,7 @@ checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" name = "fallback" version = "0.1.0" dependencies = [ - "itertools 0.9.0", + "itertools", ] [[package]] @@ -2241,12 +2225,13 @@ dependencies = [ [[package]] name = "flume" -version = "0.9.2" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bebadab126f8120d410b677ed95eee4ba6eb7c6dd8e34a5ec88a08050e26132" +checksum = "0362ef9c4c1fa854ff95b4cb78045a86e810d804dc04937961988b45427104a9" dependencies = [ "futures-core", "futures-sink", + "pin-project 1.0.4", "spinning_top", ] @@ -2307,12 +2292,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -2343,9 +2322,9 @@ checksum = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed" [[package]] name = "futures" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" +checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150" dependencies = [ "futures-channel", "futures-core", @@ -2358,9 +2337,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" +checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846" dependencies = [ "futures-core", "futures-sink", @@ -2368,15 +2347,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" +checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65" [[package]] name = "futures-executor" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65" +checksum = "e9e59fdc009a4b3096bf94f740a0f2424c082521f20a9b08c5c07c48d90fd9b9" dependencies = [ "futures-core", "futures-task", @@ -2386,9 +2365,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" +checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500" [[package]] name = "futures-lite" @@ -2401,15 +2380,15 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "waker-fn", ] [[package]] name = "futures-macro" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" +checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd" dependencies = [ "proc-macro-hack", "proc-macro2", @@ -2417,17 +2396,28 @@ dependencies = [ "syn", ] +[[package]] +name = "futures-rustls" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b" +dependencies = [ + "futures-io", + "rustls", + "webpki", +] + [[package]] name = "futures-sink" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" +checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6" [[package]] name = "futures-task" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" +checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86" dependencies = [ "once_cell", ] @@ -2440,9 +2430,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" +checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b" dependencies = [ "futures-channel", "futures-core", @@ -2451,38 +2441,13 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project 1.0.2", + "pin-project-lite 0.2.4", "pin-utils", "proc-macro-hack", "proc-macro-nested", "slab", ] -[[package]] -name = "futures_codec" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce54d63f8b0c75023ed920d46fd71d0cbbb830b0ee012726b5b4f506fb6dea5b" -dependencies = [ - "bytes 0.5.6", - "futures 0.3.8", - "memchr", - "pin-project 0.4.27", -] - -[[package]] -name = "generator" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cdc09201b2e8ca1b19290cf7e65de2246b8e91fb6874279722189c4de7b94dc" -dependencies = [ - "cc", - "libc", - "log", - "rustc_version", - "winapi 0.3.9", -] - [[package]] name = "generic-array" version = "0.12.3" @@ -2512,7 +2477,7 @@ dependencies = [ "eth2_hashing", "eth2_ssz", "exit-future", - "futures 0.3.8", + "futures 0.3.12", "int_to_bytes", "merkle_proof", "parking_lot", @@ -2521,7 +2486,7 @@ dependencies = [ "serde_derive", "slog", "state_processing", - "tokio 0.3.6", + "tokio 1.1.0", "tokio-compat-02", "tree_hash", "types", @@ -2529,15 +2494,26 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.10.1+wasi-snapshot-preview1", +] + [[package]] name = "ghash" version = "0.3.1" @@ -2617,7 +2593,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http 0.2.2", + "http", "indexmap", "slab", "tokio 0.2.24", @@ -2629,27 +2605,28 @@ dependencies = [ [[package]] name = "h2" version = "0.3.0" -source = "git+https://github.com/agemanning/h2?branch=lighthouse#a59d6eba170ffaa7d9504b95c98b7321f459581b" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" dependencies = [ - "bytes 0.6.0", + "bytes 1.0.1", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.1", + "http", "indexmap", "slab", - "tokio 0.3.6", - "tokio-util 0.5.1", + "tokio 1.1.0", + "tokio-util 0.6.3", "tracing", "tracing-futures", ] [[package]] name = "half" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36fab90f82edc3c747f9d438e06cf0a491055896f2a279638bb5beed6c40177" +checksum = "62aca2aba2d62b4a7f5b33f3712cb1b0692779a56fb510499d5c0aa594daeaf3" [[package]] name = "hashbrown" @@ -2673,40 +2650,25 @@ dependencies = [ name = "hashset_delay" version = "0.2.0" dependencies = [ - "futures 0.3.8", - "tokio 0.3.6", - "tokio-util 0.5.1", + "futures 0.3.12", + "tokio 1.1.0", + "tokio-util 0.6.3", ] [[package]] name = "headers" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed18eb2459bf1a09ad2d6b1547840c3e5e62882fa09b9a6a20b1de8e3228848f" -dependencies = [ - "base64 0.12.3", - "bitflags", - "bytes 0.5.6", - "headers-core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.2.2", - "mime", - "sha-1 0.8.2", - "time 0.1.44", -] - -[[package]] -name = "headers" -version = "0.3.2" -source = "git+https://github.com/blacktemplar/headers?branch=lighthouse#8bffbd8aa2e170745a81e62fc0d7e98c0a23a69a" +checksum = "62689dc57c7456e69712607ffcbd0aa1dfcccf9af73727e9b25bc1825375cac3" dependencies = [ "base64 0.13.0", "bitflags", - "bytes 0.6.0", - "headers-core 0.2.0 (git+https://github.com/blacktemplar/headers?branch=lighthouse)", - "http 0.2.1", + "bytes 1.0.1", + "headers-core", + "http", "mime", "sha-1 0.8.2", - "time 0.1.44", + "time 0.1.43", ] [[package]] @@ -2715,15 +2677,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http 0.2.2", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "git+https://github.com/blacktemplar/headers?branch=lighthouse#8bffbd8aa2e170745a81e62fc0d7e98c0a23a69a" -dependencies = [ - "http 0.2.1", + "http", ] [[package]] @@ -2737,9 +2691,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8" +checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" dependencies = [ "libc", ] @@ -2786,16 +2740,6 @@ dependencies = [ "digest 0.9.0", ] -[[package]] -name = "hmac" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deae6d9dbb35ec2c502d62b8f7b1c000a0822c3b0794ba36b3149c0a1c840dff" -dependencies = [ - "crypto-mac 0.9.1", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.10.1" @@ -2819,21 +2763,11 @@ dependencies = [ [[package]] name = "http" -version = "0.2.1" -source = "git+https://github.com/agemanning/http?branch=lighthouse#144a8ad6334f40bf4f84e26cf582ff164795024a" -dependencies = [ - "bytes 0.6.0", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84129d298a6d57d246960ff8eb831ca4af3f96d29e2e28848dae275408658e26" +checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "fnv", "itoa", ] @@ -2845,16 +2779,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" dependencies = [ "bytes 0.5.6", - "http 0.2.2", + "http", ] [[package]] name = "http-body" -version = "0.3.1" -source = "git+https://github.com/agemanning/http-body?branch=lighthouse#a10365c24eaee8eab881519accad48b695b88ccf" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" dependencies = [ - "bytes 0.6.0", - "http 0.2.1", + "bytes 1.0.1", + "http", ] [[package]] @@ -2870,7 +2805,7 @@ dependencies = [ "eth2_libp2p", "eth2_ssz", "fork_choice", - "futures 0.3.8", + "futures 0.3.12", "hex", "lazy_static", "lighthouse_metrics", @@ -2882,8 +2817,9 @@ dependencies = [ "slot_clock", "state_processing", "store", - "tokio 0.3.6", - "tokio-compat-02", + "tokio 1.1.0", + "tokio-stream", + "tokio-util 0.6.3", "tree_hash", "types", "warp", @@ -2907,8 +2843,7 @@ dependencies = [ "slog", "slot_clock", "store", - "tokio 0.3.6", - "tokio-compat-02", + "tokio 1.1.0", "types", "warp", "warp_utils", @@ -2928,36 +2863,36 @@ checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" [[package]] name = "httpmock" -version = "0.5.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1e098238acaa95e0bb3fd357317817fde35efb9cdedf74b18b24698499eea9d" +checksum = "c3651b042b15370cea138892c0496c195ab77b472548d43e6595284c57da1bf5" dependencies = [ "assert-json-diff", + "async-object-pool", "async-trait", "base64 0.13.0", "basic-cookies", - "crossbeam-utils 0.8.1", + "crossbeam-utils", "difference", "futures-util", - "hyper 0.13.9", + "hyper 0.14.4", "isahc", "lazy_static", "levenshtein", "log", - "puddle", "qstring", "regex", "serde", "serde_json", "serde_regex", - "tokio 0.2.24", + "tokio 1.1.0", ] [[package]] name = "humantime" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" @@ -2970,12 +2905,12 @@ dependencies = [ "futures-core", "futures-util", "h2 0.2.7", - "http 0.2.2", - "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http", + "http-body 0.3.1", "httparse", "httpdate", "itoa", - "pin-project 1.0.2", + "pin-project 1.0.4", "socket2", "tokio 0.2.24", "tower-service", @@ -2985,22 +2920,23 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.0-dev" -source = "git+https://github.com/sigp/hyper?branch=lighthouse#6e24636c115108711fc2ac0c1cf81d4b3dce2277" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8e946c2b1349055e0b72ae281b238baf1a3ea7307c7e9f9d64673bdd9c26ac7" dependencies = [ - "bytes 0.6.0", + "bytes 1.0.1", "futures-channel", "futures-core", "futures-util", "h2 0.3.0", - "http 0.2.1", - "http-body 0.3.1 (git+https://github.com/agemanning/http-body?branch=lighthouse)", + "http", + "http-body 0.4.0", "httparse", "httpdate", "itoa", - "pin-project 1.0.2", + "pin-project 1.0.4", "socket2", - "tokio 0.3.6", + "tokio 1.1.0", "tower-service", "tracing", "want", @@ -3013,10 +2949,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93ec5be69758dfc06b9b29efa9d6e9306e387c85eb362c603912eead2ad98c7" dependencies = [ "bytes 0.5.6", - "futures 0.3.8", - "http 0.2.2", + "futures 0.3.12", + "http", "hyper 0.13.9", - "hyper-tls", + "hyper-tls 0.4.3", "native-tls", "tokio 0.2.24", "tokio-tls", @@ -3037,6 +2973,19 @@ dependencies = [ "tokio-tls", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes 1.0.1", + "hyper 0.14.4", + "native-tls", + "tokio 1.1.0", + "tokio-native-tls", +] + [[package]] name = "idna" version = "0.2.0" @@ -3069,6 +3018,22 @@ dependencies = [ "libc", ] +[[package]] +name = "if-watch" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d7c5e361e6b05c882b4847dd98992534cebc6fcde7f4bc98225bcf10fd6d0d" +dependencies = [ + "async-io", + "futures 0.3.12", + "futures-lite", + "if-addrs", + "ipnet", + "libc", + "log", + "winapi 0.3.9", +] + [[package]] name = "igd" version = "0.11.1" @@ -3097,7 +3062,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f7a72f11830b52333f36e3b09a288333888bf54380fd0ac0790a3c31ab0f3c5" dependencies = [ - "rlp", + "rlp 0.4.6", ] [[package]] @@ -3121,11 +3086,11 @@ dependencies = [ [[package]] name = "input_buffer" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" +checksum = "f97967975f448f1a7ddb12b0bc41069d09ed6a1c161a92687e057325db35d413" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", ] [[package]] @@ -3141,7 +3106,7 @@ dependencies = [ name = "int_to_bytes" version = "0.2.0" dependencies = [ - "bytes 0.6.0", + "bytes 1.0.1", "hex", "yaml-rust", ] @@ -3172,18 +3137,17 @@ checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" [[package]] name = "isahc" -version = "0.9.14" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2948a0ce43e2c2ef11d7edf6816508998d99e13badd1150be0914205df9388a" +checksum = "ff5419136b615bb64a2d0f8ccc91ed2e74c3bcf77e71c1820dbd6663898d1b34" dependencies = [ - "bytes 0.5.6", - "crossbeam-utils 0.8.1", + "crossbeam-utils", "curl", "curl-sys", "encoding_rs", "flume", "futures-lite", - "http 0.2.2", + "http", "log", "mime", "once_cell", @@ -3195,15 +3159,6 @@ dependencies = [ "waker-fn", ] -[[package]] -name = "itertools" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.9.0" @@ -3243,9 +3198,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.5.10" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3934640b1efbc660af5889d041854b6985d403771dc4d5fee984e13e8f82f313" +checksum = "cf02ecc966e1b7e8db1c81ac8f321ba24d1cfab5b634961fab10111f015858e1" dependencies = [ "cfg-if 1.0.0", "ecdsa", @@ -3280,16 +3235,16 @@ dependencies = [ [[package]] name = "lalrpop" -version = "0.19.2" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efcc8a1810b0880931ce6ada8409110c3eea6becdaa9dc891426d129f49c7469" +checksum = "4a71d75b267b3299da9ccff4dd80d73325b5d8adcd76fe97cf92725eb7c6f122" dependencies = [ "ascii-canvas", "atty", "bit-set", "diff", "ena", - "itertools 0.9.0", + "itertools", "lalrpop-util", "petgraph", "pico-args", @@ -3303,9 +3258,9 @@ dependencies = [ [[package]] name = "lalrpop-util" -version = "0.19.2" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b01a98b09a1724a37353d44a62d758e087fb4ae8133108e6dcc51062d15d68" +checksum = "3ebbd90154472db6267a7d28ca08fea7788e5619fef10f2398155cb74c08f77a" dependencies = [ "regex", ] @@ -3336,7 +3291,7 @@ dependencies = [ "eth2_network_config", "eth2_ssz", "eth2_wallet", - "futures 0.3.8", + "futures 0.3.12", "genesis", "hex", "lighthouse_version", @@ -3347,8 +3302,7 @@ dependencies = [ "serde_yaml", "simple_logger", "state_processing", - "tokio 0.3.6", - "tokio-compat-02", + "tokio 1.1.0", "tree_hash", "types", "validator_dir", @@ -3384,9 +3338,9 @@ checksum = "66189c12161c65c0023ceb53e2fccc0013311bcb36a7cbd0f9c5e938b408ac96" [[package]] name = "libc" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb" +checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" [[package]] name = "libflate" @@ -3424,14 +3378,15 @@ dependencies = [ [[package]] name = "libp2p" -version = "0.33.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5133112ce42be9482f6a87be92a605dd6bbc9e93c297aee77d172ff06908f3a" dependencies = [ "atomic", - "bytes 0.5.6", - "futures 0.3.8", + "bytes 1.0.1", + "futures 0.3.12", "lazy_static", - "libp2p-core 0.26.0", + "libp2p-core", "libp2p-core-derive", "libp2p-dns", "libp2p-gossipsub", @@ -3442,67 +3397,34 @@ dependencies = [ "libp2p-tcp", "libp2p-websocket", "libp2p-yamux", - "parity-multiaddr 0.10.0", + "parity-multiaddr", "parking_lot", - "pin-project 1.0.2", + "pin-project 1.0.4", "smallvec", "wasm-timer", ] [[package]] name = "libp2p-core" -version = "0.23.1" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3960524389409633550567e8a9e0684d25a33f4f8408887ff897dd9fdfbdb771" -dependencies = [ - "asn1_der", - "bs58 0.3.1", - "ed25519-dalek", - "either", - "fnv", - "futures 0.3.8", - "futures-timer", - "lazy_static", - "libsecp256k1", - "log", - "multihash 0.11.4", - "multistream-select 0.8.5", - "parity-multiaddr 0.9.6", - "parking_lot", - "pin-project 1.0.2", - "prost", - "prost-build", - "rand 0.7.3", - "ring", - "rw-stream-sink", - "sha2 0.9.2", - "smallvec", - "thiserror", - "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "void", - "zeroize", -] - -[[package]] -name = "libp2p-core" -version = "0.26.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +checksum = "dad04d3cef6c1df366a6ab58c9cf8b06497699e335d83ac2174783946ff847d6" dependencies = [ "asn1_der", "bs58 0.4.0", "ed25519-dalek", "either", "fnv", - "futures 0.3.8", + "futures 0.3.12", "futures-timer", "lazy_static", "libsecp256k1", "log", - "multihash 0.13.2", - "multistream-select 0.9.1", - "parity-multiaddr 0.10.0", + "multihash", + "multistream-select", + "parity-multiaddr", "parking_lot", - "pin-project 1.0.2", + "pin-project 1.0.4", "prost", "prost-build", "rand 0.7.3", @@ -3511,7 +3433,7 @@ dependencies = [ "sha2 0.9.2", "smallvec", "thiserror", - "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.6.0", "void", "zeroize", ] @@ -3519,7 +3441,8 @@ dependencies = [ [[package]] name = "libp2p-core-derive" version = "0.21.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4bc40943156e42138d22ed3c57ff0e1a147237742715937622a99b10fbe0156" dependencies = [ "quote", "syn", @@ -3527,27 +3450,29 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.26.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5153b6db68fd4baa3b304e377db744dd8fea8ff4e4504509ee636abcde88d3e3" dependencies = [ - "futures 0.3.8", - "libp2p-core 0.26.0", + "futures 0.3.12", + "libp2p-core", "log", ] [[package]] name = "libp2p-gossipsub" -version = "0.26.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12451ba9493e87c91baf2a6dffce9ddf1fbc807a0861532d7cf477954f8ebbee" dependencies = [ + "asynchronous-codec", "base64 0.13.0", "byteorder", - "bytes 0.5.6", + "bytes 1.0.1", "fnv", - "futures 0.3.8", - "futures_codec", + "futures 0.3.12", "hex_fmt", - "libp2p-core 0.26.0", + "libp2p-core", "libp2p-swarm", "log", "prost", @@ -3556,17 +3481,18 @@ dependencies = [ "regex", "sha2 0.9.2", "smallvec", - "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.6.0", "wasm-timer", ] [[package]] name = "libp2p-identify" -version = "0.26.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b40fb36a059b7a8cce1514bd8b546fa612e006c9937caa7f5950cb20021fe91e" dependencies = [ - "futures 0.3.8", - "libp2p-core 0.26.0", + "futures 0.3.12", + "libp2p-core", "libp2p-swarm", "log", "prost", @@ -3577,31 +3503,33 @@ dependencies = [ [[package]] name = "libp2p-mplex" -version = "0.26.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2705dc94b01ab9e3779b42a09bbf3712e637ed213e875c30face247291a85af0" dependencies = [ - "bytes 0.5.6", - "futures 0.3.8", - "futures_codec", - "libp2p-core 0.26.0", + "asynchronous-codec", + "bytes 1.0.1", + "futures 0.3.12", + "libp2p-core", "log", "nohash-hasher", "parking_lot", "rand 0.7.3", "smallvec", - "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.6.0", ] [[package]] name = "libp2p-noise" -version = "0.28.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aca322b52a0c5136142a7c3971446fb1e9964923a526c9cc6ef3b7c94e57778" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "curve25519-dalek", - "futures 0.3.8", + "futures 0.3.12", "lazy_static", - "libp2p-core 0.26.0", + "libp2p-core", "log", "prost", "prost-build", @@ -3615,12 +3543,13 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.26.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ea8c69839a0e593c8c6a24282cb234d48ac37be4153183f4914e00f5303e75" dependencies = [ "either", - "futures 0.3.8", - "libp2p-core 0.26.0", + "futures 0.3.12", + "libp2p-core", "log", "rand 0.7.3", "smallvec", @@ -3630,45 +3559,49 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.26.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dbd3d7076a478ac5a6aca55e74bdc250ac539b95de09b9d09915e0b8d01a6b2" dependencies = [ - "futures 0.3.8", + "async-io", + "futures 0.3.12", "futures-timer", "if-addrs", + "if-watch", "ipnet", - "libp2p-core 0.26.0", + "libc", + "libp2p-core", "log", "socket2", - "tokio 0.3.6", + "tokio 1.1.0", ] [[package]] name = "libp2p-websocket" -version = "0.27.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b1c6a3431045da8b925ed83384e4c5163e14b990572307fca9c507435d4d22" dependencies = [ - "async-tls", "either", - "futures 0.3.8", - "libp2p-core 0.26.0", + "futures 0.3.12", + "futures-rustls", + "libp2p-core", "log", "quicksink", - "rustls", "rw-stream-sink", "soketto", "url", - "webpki", "webpki-roots", ] [[package]] name = "libp2p-yamux" -version = "0.29.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490b8b27fc40fe35212df1b6a3d14bffaa4117cbff956fdc2892168a371102ad" dependencies = [ - "futures 0.3.8", - "libp2p-core 0.26.0", + "futures 0.3.12", + "libp2p-core", "parking_lot", "thiserror", "yamux", @@ -3728,7 +3661,7 @@ dependencies = [ "env_logger 0.8.2", "environment", "eth2_network_config", - "futures 0.3.8", + "futures 0.3.12", "lighthouse_version", "logging", "remote_signer", @@ -3738,8 +3671,7 @@ dependencies = [ "slog-term", "sloggers", "tempfile", - "tokio 0.3.6", - "tokio-compat-02", + "tokio 1.1.0", "types", "validator_client", "validator_dir", @@ -3763,9 +3695,9 @@ dependencies = [ [[package]] name = "linked-hash-map" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" +checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" [[package]] name = "lmdb" @@ -3808,9 +3740,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" +checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2" dependencies = [ "cfg-if 0.1.10", ] @@ -3825,19 +3757,6 @@ dependencies = [ "slog-term", ] -[[package]] -name = "loom" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0e8460f2f2121162705187214720353c517b97bdfb3494c0b1e33d83ebe4bed" -dependencies = [ - "cfg-if 0.1.10", - "generator", - "scoped-tls", - "serde", - "serde_json", -] - [[package]] name = "lru" version = "0.6.3" @@ -3856,9 +3775,9 @@ dependencies = [ [[package]] name = "lru_time_cache" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc2beb26938dfd9988fc368548b70bcdfaf955f55aa788e1682198de794a451" +checksum = "78f957950068c53af3b32a1b3a6e69f6dd3c19fa6f0dcc1168b846662d5e10b1" [[package]] name = "mach" @@ -3890,12 +3809,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.3.4" @@ -3991,9 +3904,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f33bc887064ef1fd66020c9adfc45bb9f33d75a42096c81e7c56c65b75dd1a8b" +checksum = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7" dependencies = [ "libc", "log", @@ -4043,23 +3956,8 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" dependencies = [ - "socket2", - "winapi 0.3.9", -] - -[[package]] -name = "multihash" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567122ab6492f49b59def14ecc36e13e64dca4188196dd0cd41f9f3f979f3df6" -dependencies = [ - "blake2b_simd", - "blake2s_simd", - "digest 0.9.0", - "sha-1 0.9.2", - "sha2 0.9.2", - "sha3", - "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2", + "winapi 0.3.9", ] [[package]] @@ -4072,7 +3970,7 @@ dependencies = [ "generic-array 0.14.4", "multihash-derive", "sha2 0.9.2", - "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.5.1", ] [[package]] @@ -4097,9 +3995,9 @@ checksum = "1255076139a83bb467426e7f8d0134968a8118844faa755985e077cf31850333" [[package]] name = "multipart" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8209c33c951f07387a8497841122fc6f712165e3f9bda3e6be4645b58188f676" +checksum = "d050aeedc89243f5347c3e237e3e13dc76fbe4ae3742a57b94dc14f69acf76d4" dependencies = [ "buf_redux", "httparse", @@ -4107,7 +4005,7 @@ dependencies = [ "mime", "mime_guess", "quick-error", - "rand 0.6.5", + "rand 0.7.3", "safemem", "tempfile", "twoway", @@ -4115,36 +4013,23 @@ dependencies = [ [[package]] name = "multistream-select" -version = "0.8.5" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93faf2e41f9ee62fb01680ed48f3cc26652352327aa2e59869070358f6b7dd75" -dependencies = [ - "bytes 0.5.6", - "futures 0.3.8", - "log", - "pin-project 1.0.2", - "smallvec", - "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "multistream-select" -version = "0.9.1" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +checksum = "10ddc0eb0117736f19d556355464fc87efc8ad98b29e3fd84f02531eb6e90840" dependencies = [ - "bytes 0.5.6", - "futures 0.3.8", + "bytes 1.0.1", + "futures 0.3.12", "log", - "pin-project 1.0.2", + "pin-project 1.0.4", "smallvec", - "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.6.0", ] [[package]] name = "native-tls" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fcc7939b5edc4e4f86b1b4a04bb1498afaaf871b1a6691838ed06fcb48d3a3f" +checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" dependencies = [ "lazy_static", "libc", @@ -4190,13 +4075,13 @@ dependencies = [ "eth2_ssz_types", "exit-future", "fnv", - "futures 0.3.8", + "futures 0.3.12", "genesis", "hashset_delay", "hex", "if-addrs", "igd", - "itertools 0.9.0", + "itertools", "lazy_static", "lighthouse_metrics", "logging", @@ -4205,7 +4090,7 @@ dependencies = [ "num_cpus", "parking_lot", "rand 0.7.3", - "rlp", + "rlp 0.5.0", "slog", "slog-async", "slog-term", @@ -4217,7 +4102,8 @@ dependencies = [ "strum", "task_executor", "tempfile", - "tokio 0.3.6", + "tokio 1.1.0", + "tokio-stream", "tree_hash", "types", ] @@ -4261,7 +4147,7 @@ dependencies = [ "environment", "eth2", "eth2_config", - "futures 0.3.8", + "futures 0.3.12", "genesis", "reqwest", "serde", @@ -4457,44 +4343,27 @@ dependencies = [ [[package]] name = "parity-multiaddr" -version = "0.9.6" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43244a26dc1ddd3097216bb12eaa6cf8a07b060c72718d9ebd60fd297d6401df" -dependencies = [ - "arrayref", - "bs58 0.4.0", - "byteorder", - "data-encoding", - "multihash 0.11.4", - "percent-encoding", - "serde", - "static_assertions", - "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url", -] - -[[package]] -name = "parity-multiaddr" -version = "0.10.0" -source = "git+https://github.com/sigp/rust-libp2p?rev=97000533e4710183124abde017c6c3d68287c1ae#97000533e4710183124abde017c6c3d68287c1ae" +checksum = "8bfda2e46fc5e14122649e2645645a81ee5844e0fb2e727ef560cc71a8b2d801" dependencies = [ "arrayref", "bs58 0.4.0", "byteorder", "data-encoding", - "multihash 0.13.2", + "multihash", "percent-encoding", "serde", "static_assertions", - "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unsigned-varint 0.6.0", "url", ] [[package]] name = "parity-scale-codec" -version = "1.3.5" +version = "1.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c740e5fbcb6847058b40ac7e5574766c6388f585e184d769910fe0d3a2ca861" +checksum = "79602888a81ace83e3d1d4b2873286c1f5f906c84db667594e8db8da3506c383" dependencies = [ "arrayvec", "bitvec 0.17.4", @@ -4528,7 +4397,7 @@ dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall", + "redox_syscall 0.1.57", "smallvec", "winapi 0.3.9", ] @@ -4593,11 +4462,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccc2237c2c489783abd8c4c80e5450fc0e98644555b1364da68cc29aa151ca7" +checksum = "95b70b68509f17aa2857863b6fa00bf21fc93674c7a8893de2f469f6aa7ca2f2" dependencies = [ - "pin-project-internal 1.0.2", + "pin-project-internal 1.0.4", ] [[package]] @@ -4613,9 +4482,9 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8e8d2bf0b23038a4424865103a4df472855692821aab4e4f5c3312d461d9e5f" +checksum = "caa25a6393f22ce819b0f50e0be89287292fda8d425be38ee0ca14c4931d9e71" dependencies = [ "proc-macro2", "quote", @@ -4630,9 +4499,9 @@ checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" [[package]] name = "pin-project-lite" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" +checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" [[package]] name = "pin-utils" @@ -4640,6 +4509,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4839a901843f3942576e65857f0ebf2e190ef7024d3c62a94099ba3f819ad1d" +dependencies = [ + "der", +] + [[package]] name = "pkg-config" version = "0.3.19" @@ -4764,9 +4642,9 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" [[package]] name = "proc-macro-nested" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" @@ -4806,23 +4684,23 @@ dependencies = [ [[package]] name = "prost" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" +checksum = "9e6984d2f1a23009bd270b8bb56d0926810a3d483f59c987d77969e9d8e840b2" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "prost-derive", ] [[package]] name = "prost-build" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" +checksum = "32d3ebd75ac2679c2af3a92246639f9fcc8a442ee420719cc4fe195b98dd5fa3" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "heck", - "itertools 0.8.2", + "itertools", "log", "multimap", "petgraph", @@ -4834,12 +4712,12 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" +checksum = "169a15f3008ecb5160cba7d37bcd690a7601b6d30cfb87a117d45e59d52af5d4" dependencies = [ "anyhow", - "itertools 0.8.2", + "itertools", "proc-macro2", "quote", "syn", @@ -4847,11 +4725,11 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" +checksum = "b518d7cdd93dab1d1122cf07fa9a60771836c668dde9d9e2a139f957f0d9f1bb" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "prost", ] @@ -4869,9 +4747,9 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.18.1" +version = "2.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da78e04bc0e40f36df43ecc6575e4f4b180e8156c4efd73f13d5619479b05696" +checksum = "86473d5f16580f10b131a0bf0afb68f8e029d1835d33a00f37281b05694e5312" [[package]] name = "psutil" @@ -4892,15 +4770,6 @@ dependencies = [ "unescape", ] -[[package]] -name = "puddle" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf84452e80b28e2b05e53964d6f5a44a57978ce19b4920be49e1a61079a24d7" -dependencies = [ - "async-std", -] - [[package]] name = "qstring" version = "0.7.2" @@ -4998,32 +4867,13 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift 0.1.1", - "winapi 0.3.9", -] - [[package]] name = "rand" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.16", "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", @@ -5031,13 +4881,15 @@ dependencies = [ ] [[package]] -name = "rand_chacha" -version = "0.1.1" +name = "rand" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e" dependencies = [ - "autocfg 0.1.7", - "rand_core 0.3.1", + "libc", + "rand_chacha 0.3.0", + "rand_core 0.6.1", + "rand_hc 0.3.0", ] [[package]] @@ -5051,36 +4903,31 @@ dependencies = [ ] [[package]] -name = "rand_core" -version = "0.3.1" +name = "rand_chacha" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" dependencies = [ - "rand_core 0.4.2", + "ppv-lite86", + "rand_core 0.6.1", ] -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.16", ] [[package]] -name = "rand_hc" -version = "0.1.0" +name = "rand_core" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5" dependencies = [ - "rand_core 0.3.1", + "getrandom 0.2.2", ] [[package]] @@ -5093,56 +4940,12 @@ dependencies = [ ] [[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi 0.3.9", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi 0.3.9", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" +name = "rand_hc" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" dependencies = [ - "rand_core 0.3.1", + "rand_core 0.6.1", ] [[package]] @@ -5172,27 +4975,27 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" dependencies = [ - "crossbeam-channel 0.5.0", + "crossbeam-channel", "crossbeam-deque", - "crossbeam-utils 0.8.1", + "crossbeam-utils", "lazy_static", "num_cpus", ] [[package]] -name = "rdrand" -version = "0.4.0" +name = "redox_syscall" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.1.57" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +checksum = "05ec8ca9416c5ea37062b502703cd7fcb207736bc294f6e0cf367ac6fc234570" +dependencies = [ + "bitflags", +] [[package]] name = "redox_users" @@ -5200,16 +5003,16 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" dependencies = [ - "getrandom", - "redox_syscall", + "getrandom 0.1.16", + "redox_syscall 0.1.57", "rust-argon2", ] [[package]] name = "regex" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" +checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" dependencies = [ "aho-corasick", "memchr", @@ -5229,9 +5032,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" +checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" [[package]] name = "remote_signer" @@ -5271,8 +5074,8 @@ version = "0.2.0" dependencies = [ "clap", "environment", - "futures 0.3.8", - "hyper 0.13.9", + "futures 0.3.12", + "hyper 0.14.4", "lazy_static", "regex", "remote_signer_backend", @@ -5291,7 +5094,7 @@ dependencies = [ "remote_signer_test", "reqwest", "serde", - "tokio 0.3.6", + "tokio 1.1.0", "types", ] @@ -5309,8 +5112,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "tokio 0.3.6", - "tokio-compat-02", + "tokio 1.1.0", "types", ] @@ -5325,33 +5127,32 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.10.10" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" +checksum = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" dependencies = [ "base64 0.13.0", - "bytes 0.5.6", + "bytes 1.0.1", "encoding_rs", "futures-core", "futures-util", - "http 0.2.2", - "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.13.9", - "hyper-tls", + "http", + "http-body 0.4.0", + "hyper 0.14.4", + "hyper-tls 0.5.0", "ipnet", "js-sys", "lazy_static", "log", "mime", - "mime_guess", "native-tls", "percent-encoding", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "serde", "serde_json", "serde_urlencoded", - "tokio 0.2.24", - "tokio-tls", + "tokio 1.1.0", + "tokio-native-tls", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -5389,11 +5190,21 @@ dependencies = [ "rustc-hex", ] +[[package]] +name = "rlp" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e54369147e3e7796c9b885c7304db87ca3d09a0a98f72843d532868675bbfba8" +dependencies = [ + "bytes 1.0.1", + "rustc-hex", +] + [[package]] name = "rpassword" -version = "5.0.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d755237fc0f99d98641540e66abac8bc46a0652f19148ac9e21de2da06b326c9" +checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" dependencies = [ "libc", "winapi 0.3.9", @@ -5423,7 +5234,7 @@ dependencies = [ "base64 0.13.0", "blake2b_simd", "constant_time_eq", - "crossbeam-utils 0.8.1", + "crossbeam-utils", ] [[package]] @@ -5472,7 +5283,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "pin-project 0.4.27", "static_assertions", ] @@ -5622,9 +5433,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.118" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" +checksum = "166b2349061381baf54a58e4b13c89369feb0ef2eaa57198899e2312aac30aab" dependencies = [ "serde_derive", ] @@ -5641,9 +5452,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.118" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" +checksum = "0ca2a8cb5805ce9e3b95435e3765b7b553cecc762d938d409434338386cb5775" dependencies = [ "proc-macro2", "quote", @@ -5652,9 +5463,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1500e84d27fe482ed1dc791a56eddc2f230046a040fa908c08bda1d9fb615779" +checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a" dependencies = [ "itoa", "ryu", @@ -5706,9 +5517,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7baae0a99f1a324984bcdc5f0718384c1f69775f1c7eec8b859b71b443e3fd7" +checksum = "971be8f6e4d4a47163b405a3df70d14359186f9ab0f3a3ec37df144ca1ce089f" dependencies = [ "dtoa", "linked-hash-map", @@ -5786,12 +5597,11 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4921be914e16899a80adefb821f8ddb7974e3f1250223575a44ed994882127" +checksum = "79c719719ee05df97490f80a45acfc99e5a30ce98a1e4fb67aee422745ae14e3" dependencies = [ "lazy_static", - "loom", ] [[package]] @@ -5844,12 +5654,11 @@ dependencies = [ "env_logger 0.8.2", "eth1", "eth1_test_rig", - "futures 0.3.8", + "futures 0.3.12", "node_test_rig", "parking_lot", "rayon", - "tokio 0.3.6", - "tokio-compat-02", + "tokio 1.1.0", "types", "validator_client", ] @@ -5907,7 +5716,8 @@ dependencies = [ "slot_clock", "state_processing", "task_executor", - "tokio 0.3.6", + "tokio 1.1.0", + "tokio-stream", "types", ] @@ -5937,11 +5747,11 @@ checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" [[package]] name = "slog-async" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b3336ce47ce2f96673499fc07eb85e3472727b9a7a2959964b002c2ce8fbbb" +checksum = "c60813879f820c85dbc4eabf3269befe374591289019775898d56a81a804fbdc" dependencies = [ - "crossbeam-channel 0.4.4", + "crossbeam-channel", "slog", "take_mut", "thread_local", @@ -5971,9 +5781,9 @@ dependencies = [ [[package]] name = "slog-scope" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c44c89dd8b0ae4537d1ae318353eaf7840b4869c536e31c41e963d1ea523ee6" +checksum = "2f95a4b4c3274cd2869549da82b57ccc930859bdbf5bcea0424bc5f140b3c786" dependencies = [ "arc-swap", "lazy_static", @@ -6094,7 +5904,7 @@ dependencies = [ "base64 0.12.3", "bytes 0.5.6", "flate2", - "futures 0.3.8", + "futures 0.3.12", "httparse", "log", "rand 0.7.3", @@ -6118,9 +5928,9 @@ dependencies = [ [[package]] name = "standback" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf906c8b8fc3f6ecd1046e01da1d8ddec83e48c8b08b84dcc02b585a6bedf5a8" +checksum = "c66a8cff4fa24853fdf6b51f75c6d7f8206d7c75cab4e467bcd7f25c2b1febe0" dependencies = [ "version_check", ] @@ -6138,7 +5948,7 @@ dependencies = [ "eth2_ssz_types", "int_to_bytes", "integer-sqrt", - "itertools 0.9.0", + "itertools", "lazy_static", "log", "merkle_proof", @@ -6225,7 +6035,7 @@ dependencies = [ "directory", "eth2_ssz", "eth2_ssz_derive", - "itertools 0.9.0", + "itertools", "lazy_static", "leveldb", "lighthouse_metrics", @@ -6314,9 +6124,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9802ddde94170d186eeee5005b798d9c159fa970403f1be19976d0cfb939b72" +checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5" dependencies = [ "proc-macro2", "quote", @@ -6358,24 +6168,23 @@ name = "task_executor" version = "0.1.0" dependencies = [ "exit-future", - "futures 0.3.8", + "futures 0.3.12", "lazy_static", "lighthouse_metrics", "slog", - "tokio 0.3.6", - "tokio-compat-02", + "tokio 1.1.0", ] [[package]] name = "tempfile" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "libc", - "rand 0.7.3", - "redox_syscall", + "rand 0.8.2", + "redox_syscall 0.2.4", "remove_dir_all", "winapi 0.3.9", ] @@ -6449,9 +6258,9 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +checksum = "bb9bc092d0d51e76b2b19d9d85534ffc9ec2db959a2523cdae0697e2972cd447" dependencies = [ "lazy_static", ] @@ -6467,20 +6276,19 @@ dependencies = [ [[package]] name = "time" -version = "0.1.44" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "wasi 0.10.0+wasi-snapshot-preview1", "winapi 0.3.9", ] [[package]] name = "time" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcdaeea317915d59b2b4cd3b5efcd156c309108664277793f5351700c02ce98b" +checksum = "273d3ed44dca264b0d6b3665e8d48fb515042d42466fad93d2a45b90ec4058f7" dependencies = [ "const_fn", "libc", @@ -6519,12 +6327,12 @@ name = "timer" version = "0.2.0" dependencies = [ "beacon_chain", - "futures 0.3.8", + "futures 0.3.12", "parking_lot", "slog", "slot_clock", "task_executor", - "tokio 0.3.6", + "tokio 1.1.0", "types", ] @@ -6566,9 +6374,9 @@ dependencies = [ [[package]] name = "tinytemplate" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d3dc76004a03cec1c5932bca4cdc2e39aaa798e3f82363dd94f9adf6098c12f" +checksum = "a2ada8616fad06a2d0c455adc530de4ef57605a8120cc65da9653e0e9623ca74" dependencies = [ "serde", "serde_json", @@ -6620,18 +6428,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "720ba21c25078711bf456d607987d95bce90f7c3bea5abe1db587862e7a1e87c" dependencies = [ "autocfg 1.0.1", - "bytes 0.6.0", "futures-core", + "pin-project-lite 0.2.4", +] + +[[package]] +name = "tokio" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8efab2086f17abcddb8f756117665c958feee6b2e39974c2f1600592ab3a4195" +dependencies = [ + "autocfg 1.0.1", + "bytes 1.0.1", "libc", "memchr", - "mio 0.7.6", + "mio 0.7.7", "num_cpus", "once_cell", "parking_lot", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "signal-hook-registry", - "slab", - "tokio-macros 0.3.2", + "tokio-macros 1.0.0", "winapi 0.3.9", ] @@ -6650,11 +6467,12 @@ dependencies = [ [[package]] name = "tokio-io-timeout" -version = "0.5.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6654a6da4326b0b4228000891d44fbcbdaa1904c6ddfa06617230649073be8fb" +checksum = "90c49f106be240de154571dd31fbe48acb10ba6c6dd6f6517ad603abffa42de9" dependencies = [ - "tokio 0.3.6", + "pin-project-lite 0.2.4", + "tokio 1.1.0", ] [[package]] @@ -6670,15 +6488,36 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "0.3.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46dfffa59fc3c8aad216ed61bdc2c263d2b9d87a9c8ac9de0c11a813e51b6db7" +checksum = "42517d2975ca3114b22a16192634e8241dc5cc1f130be194645970cc1c371494" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +dependencies = [ + "native-tls", + "tokio 1.1.0", +] + +[[package]] +name = "tokio-stream" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76066865172052eb8796c686f0b441a93df8b08d40a950b062ffb9a426f00edd" +dependencies = [ + "futures-core", + "pin-project-lite 0.2.4", + "tokio 1.1.0", +] + [[package]] name = "tokio-tls" version = "0.3.1" @@ -6691,14 +6530,14 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0381c1e6e08908317cee104781ca48afe03f37cc857792b85f01f9828fb55ba3" +checksum = "e1a5f475f1b9d077ea1017ecbc60890fda8e54942d680ca0b1d2b47cfa2d861b" dependencies = [ "futures-util", "log", - "pin-project 1.0.2", - "tokio 0.3.6", + "pin-project 1.0.4", + "tokio 1.1.0", "tungstenite", ] @@ -6718,34 +6557,33 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24793699f4665ba0416ed287dc794fe6b11a4aa5e4e95b58624f45f6c46b97d4" +checksum = "3137de2b078e95274b696cc522e87f22c9a753fe3ef3344116ffb94f104f10a3" dependencies = [ - "bytes 0.5.6", + "bytes 0.6.0", "futures-core", "futures-io", "futures-sink", "log", - "pin-project-lite 0.1.11", - "slab", + "pin-project-lite 0.2.4", "tokio 0.3.6", ] [[package]] name = "tokio-util" -version = "0.5.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3137de2b078e95274b696cc522e87f22c9a753fe3ef3344116ffb94f104f10a3" +checksum = "ebb7cb2f00c5ae8df755b252306272cd1790d39728363936e01827e11f0b017b" dependencies = [ - "bytes 0.6.0", + "bytes 1.0.1", "futures-core", "futures-io", "futures-sink", "log", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "slab", - "tokio 0.3.6", + "tokio 1.1.0", ] [[package]] @@ -6771,7 +6609,7 @@ checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" dependencies = [ "cfg-if 1.0.0", "log", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "tracing-attributes", "tracing-core", ] @@ -6898,18 +6736,18 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "tungstenite" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0308d80d86700c5878b9ef6321f020f29b1bb9d5ff3cab25e75e23f3a492a23" +checksum = "8ada8297e8d70872fa9a551d93250a9f407beb9f37ef86494eb20012a2ff7c24" dependencies = [ - "base64 0.12.3", + "base64 0.13.0", "byteorder", - "bytes 0.5.6", - "http 0.2.2", + "bytes 1.0.1", + "http", "httparse", "input_buffer", "log", - "rand 0.7.3", + "rand 0.8.2", "sha-1 0.9.2", "url", "utf-8", @@ -6933,7 +6771,7 @@ dependencies = [ "base64 0.11.0", "bytes 0.5.6", "chrono", - "http 0.2.2", + "http", "mime", ] @@ -6966,7 +6804,7 @@ dependencies = [ "log", "merkle_proof", "rand 0.7.3", - "rand_xorshift 0.2.0", + "rand_xorshift", "rayon", "regex", "rusqlite", @@ -7063,18 +6901,16 @@ name = "unsigned-varint" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35" -dependencies = [ - "bytes 0.5.6", - "futures_codec", -] [[package]] name = "unsigned-varint" -version = "0.5.1" -source = "git+https://github.com/sigp/unsigned-varint?branch=dep-update#b9f8b1ec8b2dbb1d5d27db9601be758065a4d8a6" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35581ff83d4101e58b582e607120c7f5ffb17e632a980b1f38334d76b36908b2" dependencies = [ - "bytes 0.5.6", - "tokio-util 0.4.0", + "asynchronous-codec", + "bytes 1.0.1", + "tokio-util 0.6.3", ] [[package]] @@ -7103,11 +6939,11 @@ checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" [[package]] name = "uuid" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "rand 0.7.3", + "getrandom 0.2.2", "serde", ] @@ -7132,9 +6968,9 @@ dependencies = [ "eth2_ssz_derive", "exit-future", "fallback", - "futures 0.3.8", + "futures 0.3.12", "hex", - "hyper 0.13.9", + "hyper 0.14.4", "lazy_static", "libc", "libsecp256k1", @@ -7158,8 +6994,7 @@ dependencies = [ "slog-term", "slot_clock", "tempfile", - "tokio 0.3.6", - "tokio-compat-02", + "tokio 1.1.0", "tree_hash", "types", "validator_dir", @@ -7244,26 +7079,29 @@ dependencies = [ [[package]] name = "warp" -version = "0.2.5" -source = "git+https://github.com/sigp/warp?branch=lighthouse#21b36a987ecc1b3c50c1314578ded64d12f742c6" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dafd0aac2818a94a34df0df1100a7356c493d8ede4393875fd0b5c51bb6bc80" dependencies = [ - "bytes 0.6.0", - "futures 0.3.8", - "headers 0.3.2 (git+https://github.com/blacktemplar/headers?branch=lighthouse)", - "http 0.2.1", - "hyper 0.14.0-dev", + "bytes 1.0.1", + "futures 0.3.12", + "headers", + "http", + "hyper 0.14.4", "log", "mime", "mime_guess", "multipart", "percent-encoding", - "pin-project 1.0.2", + "pin-project 1.0.4", "scoped-tls", "serde", "serde_json", "serde_urlencoded", - "tokio 0.3.6", + "tokio 1.1.0", + "tokio-stream", "tokio-tungstenite", + "tokio-util 0.6.3", "tower-service", "tracing", "tracing-futures", @@ -7275,13 +7113,13 @@ version = "0.1.0" dependencies = [ "beacon_chain", "eth2", - "headers 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "headers", "lazy_static", "lighthouse_metrics", "safe_arith", "serde", "state_processing", - "tokio 0.3.6", + "tokio 1.1.0", "types", "warp", ] @@ -7294,9 +7132,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.10.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "93c6c3420963c5c64bca373b25e77acb562081b9bb4dd5bb864187742186cea9" [[package]] name = "wasm-bindgen" @@ -7396,7 +7234,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "js-sys", "parking_lot", "pin-utils", @@ -7427,18 +7265,18 @@ dependencies = [ "derive_more", "ethabi", "ethereum-types", - "futures 0.3.8", + "futures 0.3.12", "futures-timer", "hex", "hyper 0.13.9", "hyper-proxy", - "hyper-tls", + "hyper-tls 0.4.3", "jsonrpc-core", "log", "native-tls", "parking_lot", - "pin-project 1.0.2", - "rlp", + "pin-project 1.0.4", + "rlp 0.4.6", "secp256k1", "serde", "serde_json", @@ -7480,11 +7318,12 @@ dependencies = [ [[package]] name = "which" -version = "3.1.1" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" +checksum = "87c14ef7e1b8b8ecfc75d5eca37949410046e66f15d185c01d70824f1f8111ef" dependencies = [ "libc", + "thiserror", ] [[package]] @@ -7583,9 +7422,9 @@ dependencies = [ [[package]] name = "yaml-rust" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" dependencies = [ "linked-hash-map", ] @@ -7596,7 +7435,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aeb8c4043cac71c3c299dff107171c220d179492350ea198e109a414981b83c" dependencies = [ - "futures 0.3.8", + "futures 0.3.12", "log", "nohash-hasher", "parking_lot", @@ -7636,5 +7475,5 @@ dependencies = [ "crc32fast", "flate2", "thiserror", - "time 0.1.44", + "time 0.1.43", ] diff --git a/account_manager/Cargo.toml b/account_manager/Cargo.toml index 24eef147d70..93b06c18aee 100644 --- a/account_manager/Cargo.toml +++ b/account_manager/Cargo.toml @@ -27,14 +27,13 @@ eth2_wallet = { path = "../crypto/eth2_wallet" } eth2_wallet_manager = { path = "../common/eth2_wallet_manager" } rand = "0.7.3" validator_dir = { path = "../common/validator_dir" } -tokio = { version = "0.3.5", features = ["full"] } +tokio = { version = "1.1.0", features = ["full"] } eth2_keystore = { path = "../crypto/eth2_keystore" } account_utils = { path = "../common/account_utils" } slashing_protection = { path = "../validator_client/slashing_protection" } eth2 = {path = "../common/eth2"} safe_arith = {path = "../consensus/safe_arith"} slot_clock = { path = "../common/slot_clock" } -tokio-compat-02 = "0.1" [dev-dependencies] tempfile = "3.1.0" diff --git a/account_manager/src/validator/exit.rs b/account_manager/src/validator/exit.rs index d65e87a9a2f..018483896ff 100644 --- a/account_manager/src/validator/exit.rs +++ b/account_manager/src/validator/exit.rs @@ -12,7 +12,6 @@ use safe_arith::SafeArith; use slot_clock::{SlotClock, SystemTimeSlotClock}; use std::path::PathBuf; use std::time::Duration; -use tokio_compat_02::FutureExt; use types::{ChainSpec, Epoch, EthSpec, Fork, VoluntaryExit}; pub const CMD: &str = "exit"; @@ -77,17 +76,14 @@ pub fn cli_run(matches: &ArgMatches, env: Environment) -> Result< .clone() .expect("network should have a valid config"); - env.runtime().block_on( - publish_voluntary_exit::( - &keystore_path, - password_file_path.as_ref(), - &client, - &spec, - stdin_inputs, - &testnet_config, - ) - .compat(), - )?; + env.runtime().block_on(publish_voluntary_exit::( + &keystore_path, + password_file_path.as_ref(), + &client, + &spec, + stdin_inputs, + &testnet_config, + ))?; Ok(()) } diff --git a/beacon_node/Cargo.toml b/beacon_node/Cargo.toml index f26d99d27ee..e19034d4a13 100644 --- a/beacon_node/Cargo.toml +++ b/beacon_node/Cargo.toml @@ -10,7 +10,6 @@ path = "src/lib.rs" [dev-dependencies] node_test_rig = { path = "../testing/node_test_rig" } -tokio-compat-02 = "0.1" [features] write_ssz_files = ["beacon_chain/write_ssz_files"] # Writes debugging .ssz files to /tmp during block processing. @@ -27,7 +26,7 @@ slog = { version = "2.5.2", features = ["max_level_trace", "release_max_level_tr slog-term = "2.6.0" slog-async = "2.5.0" ctrlc = { version = "3.1.6", features = ["termination"] } -tokio = { version = "0.3.2", features = ["time"] } +tokio = { version = "1.1.0", features = ["time"] } exit-future = "0.2.0" dirs = "3.0.1" logging = { path = "../common/logging" } @@ -41,7 +40,7 @@ eth2_libp2p = { path = "./eth2_libp2p" } eth2_ssz = "0.1.2" serde = "1.0.116" clap_utils = { path = "../common/clap_utils" } -hyper = "0.13.8" +hyper = "0.14.4" lighthouse_version = { path = "../common/lighthouse_version" } hex = "0.4.2" slasher = { path = "../slasher" } diff --git a/beacon_node/beacon_chain/Cargo.toml b/beacon_node/beacon_chain/Cargo.toml index dc6cdae030f..3bc77c245db 100644 --- a/beacon_node/beacon_chain/Cargo.toml +++ b/beacon_node/beacon_chain/Cargo.toml @@ -40,7 +40,7 @@ eth2_ssz_derive = "0.1.0" state_processing = { path = "../../consensus/state_processing" } tree_hash = "0.1.1" types = { path = "../../consensus/types" } -tokio = "0.3.2" +tokio = "1.1.0" eth1 = { path = "../eth1" } futures = "0.3.7" genesis = { path = "../genesis" } diff --git a/beacon_node/client/Cargo.toml b/beacon_node/client/Cargo.toml index 638072b666e..28dea4055d6 100644 --- a/beacon_node/client/Cargo.toml +++ b/beacon_node/client/Cargo.toml @@ -26,10 +26,10 @@ error-chain = "0.12.4" serde_yaml = "0.8.13" slog = { version = "2.5.2", features = ["max_level_trace"] } slog-async = "2.5.0" -tokio = "0.3.2" +tokio = "1.1.0" dirs = "3.0.1" futures = "0.3.7" -reqwest = { version = "0.10.8", features = ["native-tls-vendored"] } +reqwest = { version = "0.11.0", features = ["native-tls-vendored"] } url = "2.1.1" eth1 = { path = "../eth1" } genesis = { path = "../genesis" } diff --git a/beacon_node/client/src/notifier.rs b/beacon_node/client/src/notifier.rs index 2e6300d12fb..e38f5199fc9 100644 --- a/beacon_node/client/src/notifier.rs +++ b/beacon_node/client/src/notifier.rs @@ -1,7 +1,6 @@ use crate::metrics; use beacon_chain::{BeaconChain, BeaconChainTypes}; use eth2_libp2p::NetworkGlobals; -use futures::prelude::*; use parking_lot::Mutex; use slog::{debug, error, info, warn, Logger}; use slot_clock::SlotClock; @@ -64,26 +63,32 @@ pub fn spawn_notifier( } // Perform post-genesis logging. - while interval.next().await.is_some() { + loop { + interval.tick().await; let connected_peer_count = network.connected_peers(); let sync_state = network.sync_state(); - let head_info = beacon_chain.head_info().map_err(|e| { - error!( - log, - "Failed to get beacon chain head info"; - "error" => format!("{:?}", e) - ) - })?; + let head_info = match beacon_chain.head_info() { + Ok(head_info) => head_info, + Err(e) => { + error!(log, "Failed to get beacon chain head info"; "error" => format!("{:?}", e)); + break; + } + }; let head_slot = head_info.slot; - let current_slot = beacon_chain.slot().map_err(|e| { - error!( - log, - "Unable to read current slot"; - "error" => format!("{:?}", e) - ) - })?; + let current_slot = match beacon_chain.slot() { + Ok(slot) => slot, + Err(e) => { + error!( + log, + "Unable to read current slot"; + "error" => format!("{:?}", e) + ); + break; + } + }; + let current_epoch = current_slot.epoch(T::EthSpec::slots_per_epoch()); let finalized_epoch = head_info.finalized_checkpoint.epoch; let finalized_root = head_info.finalized_checkpoint.root; @@ -175,11 +180,10 @@ pub fn spawn_notifier( eth1_logging(&beacon_chain, &log); } - Ok::<(), ()>(()) }; // run the notifier on the current executor - executor.spawn(interval_future.unwrap_or_else(|_| ()), "notifier"); + executor.spawn(interval_future, "notifier"); Ok(()) } diff --git a/beacon_node/eth1/Cargo.toml b/beacon_node/eth1/Cargo.toml index 0ee75381bc0..bf4835d7104 100644 --- a/beacon_node/eth1/Cargo.toml +++ b/beacon_node/eth1/Cargo.toml @@ -13,7 +13,7 @@ environment = { path = "../../lighthouse/environment" } tokio-compat-02 = "0.1" [dependencies] -reqwest = { version = "0.10.8", features = ["native-tls-vendored"] } +reqwest = { version = "0.11.0", features = ["native-tls-vendored"] } futures = "0.3.7" serde_json = "1.0.58" serde = { version = "1.0.116", features = ["derive"] } @@ -26,7 +26,7 @@ tree_hash = "0.1.1" eth2_hashing = "0.1.0" parking_lot = "0.11.0" slog = "2.5.2" -tokio = { version = "0.3.2", features = ["full"] } +tokio = { version = "1.1.0", features = ["full"] } state_processing = { path = "../../consensus/state_processing" } libflate = "1.0.2" lighthouse_metrics = { path = "../../common/lighthouse_metrics"} diff --git a/beacon_node/eth1/src/service.rs b/beacon_node/eth1/src/service.rs index 20e1f5027b8..55aae3b6c3c 100644 --- a/beacon_node/eth1/src/service.rs +++ b/beacon_node/eth1/src/service.rs @@ -9,7 +9,7 @@ use crate::{ inner::{DepositUpdater, Inner}, }; use fallback::{Fallback, FallbackError}; -use futures::{future::TryFutureExt, StreamExt}; +use futures::future::TryFutureExt; use parking_lot::{RwLock, RwLockReadGuard}; use serde::{Deserialize, Serialize}; use slog::{crit, debug, error, info, trace, warn, Logger}; @@ -721,7 +721,8 @@ impl Service { let mut interval = interval_at(Instant::now(), update_interval); let update_future = async move { - while interval.next().await.is_some() { + loop { + interval.tick().await; self.do_update(update_interval).await.ok(); } }; diff --git a/beacon_node/eth2_libp2p/Cargo.toml b/beacon_node/eth2_libp2p/Cargo.toml index 11540bdabd7..6941ed3821c 100644 --- a/beacon_node/eth2_libp2p/Cargo.toml +++ b/beacon_node/eth2_libp2p/Cargo.toml @@ -5,8 +5,8 @@ authors = ["Sigma Prime "] edition = "2018" [dependencies] -discv5 = { version = "0.1.0-beta.2", features = ["libp2p"] } -unsigned-varint = { git = "https://github.com/sigp/unsigned-varint", branch = "dep-update", features = ["codec"] } +discv5 = { version = "0.1.0-beta.3", features = ["libp2p"] } +unsigned-varint = { version = "0.6.0", features = ["codec"] } types = { path = "../../consensus/types" } hashset_delay = { path = "../../common/hashset_delay" } eth2_ssz_types = { path = "../../consensus/ssz_types" } @@ -16,15 +16,16 @@ eth2_ssz = "0.1.2" eth2_ssz_derive = "0.1.0" slog = { version = "2.5.2", features = ["max_level_trace"] } lighthouse_version = { path = "../../common/lighthouse_version" } -tokio = { version = "0.3.2", features = ["time", "macros"] } +tokio = { version = "1.1.0", features = ["time", "macros"] } futures = "0.3.7" +futures-io = "0.3.7" error-chain = "0.12.4" dirs = "3.0.1" fnv = "1.0.7" lazy_static = "1.4.0" lighthouse_metrics = { path = "../../common/lighthouse_metrics" } smallvec = "1.6.1" -tokio-io-timeout = "0.5.0" +tokio-io-timeout = "1.1.1" lru = "0.6.0" parking_lot = "0.11.0" sha2 = "0.9.1" @@ -32,7 +33,7 @@ base64 = "0.13.0" snap = "1.0.1" void = "1.0.2" hex = "0.4.2" -tokio-util = { version = "0.4.0", features = ["codec", "compat", "time"] } +tokio-util = { version = "0.6.2", features = ["codec", "compat", "time"] } tiny-keccak = "2.0.2" task_executor = { path = "../../common/task_executor" } rand = "0.7.3" @@ -41,14 +42,12 @@ regex = "1.3.9" strum = { version = "0.20", features = ["derive"] } [dependencies.libp2p] -#version = "0.23.0" -git = "https://github.com/sigp/rust-libp2p" -rev = "97000533e4710183124abde017c6c3d68287c1ae" +version = "0.34.0" default-features = false features = ["websocket", "identify", "mplex", "yamux", "noise", "gossipsub", "dns", "tcp-tokio"] [dev-dependencies] -tokio = { version = "0.3.2", features = ["full"] } +tokio = { version = "1.1.0", features = ["full"] } slog-term = "2.6.0" slog-async = "2.5.0" tempfile = "3.1.0" diff --git a/beacon_node/eth2_libp2p/src/behaviour/mod.rs b/beacon_node/eth2_libp2p/src/behaviour/mod.rs index 2e10fb686d7..fc0ef8b4857 100644 --- a/beacon_node/eth2_libp2p/src/behaviour/mod.rs +++ b/beacon_node/eth2_libp2p/src/behaviour/mod.rs @@ -832,7 +832,7 @@ impl Behaviour { if let Some((peer_id, reason)) = self.peers_to_dc.pop_front() { return Poll::Ready(NBAction::NotifyHandler { peer_id, - handler: NotifyHandler::All, + handler: NotifyHandler::Any, event: BehaviourHandlerIn::Shutdown( reason.map(|reason| (RequestId::Behaviour, RPCRequest::Goodbye(reason))), ), @@ -893,7 +893,7 @@ impl Behaviour { } // perform gossipsub score updates when necessary - while let Poll::Ready(Some(_)) = self.update_gossipsub_scores.poll_next_unpin(cx) { + while let Poll::Ready(_) = self.update_gossipsub_scores.poll_tick(cx) { self.peer_manager.update_gossipsub_scores(&self.gossipsub); } diff --git a/beacon_node/eth2_libp2p/src/discovery/enr_ext.rs b/beacon_node/eth2_libp2p/src/discovery/enr_ext.rs index daf769ea1bd..dde8b6c2fb2 100644 --- a/beacon_node/eth2_libp2p/src/discovery/enr_ext.rs +++ b/beacon_node/eth2_libp2p/src/discovery/enr_ext.rs @@ -221,8 +221,9 @@ impl CombinedKeyExt for CombinedKey { fn from_libp2p(key: &libp2p::core::identity::Keypair) -> Result { match key { Keypair::Secp256k1(key) => { - let secret = discv5::enr::k256::ecdsa::SigningKey::new(&key.secret().to_bytes()) - .expect("libp2p key must be valid"); + let secret = + discv5::enr::k256::ecdsa::SigningKey::from_bytes(&key.secret().to_bytes()) + .expect("libp2p key must be valid"); Ok(CombinedKey::Secp256k1(secret)) } Keypair::Ed25519(key) => { @@ -277,7 +278,7 @@ mod tests { fn test_secp256k1_peer_id_conversion() { let sk_hex = "df94a73d528434ce2309abb19c16aedb535322797dbd59c157b1e04095900f48"; let sk_bytes = hex::decode(sk_hex).unwrap(); - let secret_key = discv5::enr::k256::ecdsa::SigningKey::new(&sk_bytes).unwrap(); + let secret_key = discv5::enr::k256::ecdsa::SigningKey::from_bytes(&sk_bytes).unwrap(); let libp2p_sk = libp2p::identity::secp256k1::SecretKey::from_bytes(sk_bytes).unwrap(); let secp256k1_kp: libp2p::identity::secp256k1::Keypair = libp2p_sk.into(); diff --git a/beacon_node/eth2_libp2p/src/discovery/mod.rs b/beacon_node/eth2_libp2p/src/discovery/mod.rs index 74df1165176..545ffe8e96b 100644 --- a/beacon_node/eth2_libp2p/src/discovery/mod.rs +++ b/beacon_node/eth2_libp2p/src/discovery/mod.rs @@ -896,7 +896,7 @@ impl Discovery { } EventStream::InActive => {} // ignore checking the stream EventStream::Present(ref mut stream) => { - while let Ok(event) = stream.try_recv() { + while let Poll::Ready(Some(event)) = stream.poll_recv(cx) { match event { // We filter out unwanted discv5 events here and only propagate useful results to // the peer manager. diff --git a/beacon_node/eth2_libp2p/src/peer_manager/mod.rs b/beacon_node/eth2_libp2p/src/peer_manager/mod.rs index 035644e90bf..4da3f69406b 100644 --- a/beacon_node/eth2_libp2p/src/peer_manager/mod.rs +++ b/beacon_node/eth2_libp2p/src/peer_manager/mod.rs @@ -972,7 +972,7 @@ impl Stream for PeerManager { fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { // perform the heartbeat when necessary - while let Poll::Ready(Some(_)) = self.heartbeat.poll_next_unpin(cx) { + while let Poll::Ready(_) = self.heartbeat.poll_tick(cx) { self.heartbeat(); } @@ -1011,8 +1011,10 @@ impl Stream for PeerManager { } } - if !matches!(self.network_globals.sync_state(), SyncState::SyncingFinalized{..}|SyncState::SyncingHead{..}) - { + if !matches!( + self.network_globals.sync_state(), + SyncState::SyncingFinalized { .. } | SyncState::SyncingHead { .. } + ) { loop { match self.status_peers.poll_next_unpin(cx) { Poll::Ready(Some(Ok(peer_id))) => { diff --git a/beacon_node/eth2_libp2p/src/peer_manager/peer_info.rs b/beacon_node/eth2_libp2p/src/peer_manager/peer_info.rs index 759850ef4b7..49546776a8f 100644 --- a/beacon_node/eth2_libp2p/src/peer_manager/peer_info.rs +++ b/beacon_node/eth2_libp2p/src/peer_manager/peer_info.rs @@ -156,7 +156,10 @@ impl PeerInfo { /// Checks if the status is connected. pub fn is_connected(&self) -> bool { - matches!(self.connection_status, PeerConnectionStatus::Connected { .. }) + matches!( + self.connection_status, + PeerConnectionStatus::Connected { .. } + ) } /// Checks if the status is connected. diff --git a/beacon_node/eth2_libp2p/src/peer_manager/peer_sync_status.rs b/beacon_node/eth2_libp2p/src/peer_manager/peer_sync_status.rs index 473741d4fc2..d282c03f0d9 100644 --- a/beacon_node/eth2_libp2p/src/peer_manager/peer_sync_status.rs +++ b/beacon_node/eth2_libp2p/src/peer_manager/peer_sync_status.rs @@ -29,12 +29,20 @@ pub struct SyncInfo { impl std::cmp::PartialEq for PeerSyncStatus { fn eq(&self, other: &Self) -> bool { - matches!((self, other), - (PeerSyncStatus::Synced { .. }, PeerSyncStatus::Synced { .. }) | - (PeerSyncStatus::Advanced { .. }, PeerSyncStatus::Advanced { .. }) | - (PeerSyncStatus::Behind { .. }, PeerSyncStatus::Behind { .. }) | - (PeerSyncStatus::IrrelevantPeer, PeerSyncStatus::IrrelevantPeer) | - (PeerSyncStatus::Unknown, PeerSyncStatus::Unknown)) + matches!( + (self, other), + (PeerSyncStatus::Synced { .. }, PeerSyncStatus::Synced { .. }) + | ( + PeerSyncStatus::Advanced { .. }, + PeerSyncStatus::Advanced { .. } + ) + | (PeerSyncStatus::Behind { .. }, PeerSyncStatus::Behind { .. }) + | ( + PeerSyncStatus::IrrelevantPeer, + PeerSyncStatus::IrrelevantPeer + ) + | (PeerSyncStatus::Unknown, PeerSyncStatus::Unknown) + ) } } diff --git a/beacon_node/eth2_libp2p/src/peer_manager/peerdb.rs b/beacon_node/eth2_libp2p/src/peer_manager/peerdb.rs index b60a55d8314..6803f49ed11 100644 --- a/beacon_node/eth2_libp2p/src/peer_manager/peerdb.rs +++ b/beacon_node/eth2_libp2p/src/peer_manager/peerdb.rs @@ -137,14 +137,20 @@ impl PeerDB { /// If we are connected or currently dialing the peer returns true. pub fn is_connected_or_dialing(&self, peer_id: &PeerId) -> bool { - matches!(self.connection_status(peer_id), Some(PeerConnectionStatus::Connected { .. }) - | Some(PeerConnectionStatus::Dialing { .. })) + matches!( + self.connection_status(peer_id), + Some(PeerConnectionStatus::Connected { .. }) + | Some(PeerConnectionStatus::Dialing { .. }) + ) } /// If we are connected or in the process of disconnecting pub fn is_connected_or_disconnecting(&self, peer_id: &PeerId) -> bool { - matches!(self.connection_status(peer_id), Some(PeerConnectionStatus::Connected { .. }) - | Some(PeerConnectionStatus::Disconnecting { .. })) + matches!( + self.connection_status(peer_id), + Some(PeerConnectionStatus::Connected { .. }) + | Some(PeerConnectionStatus::Disconnecting { .. }) + ) } /// Returns true if the peer is synced at least to our current head. diff --git a/beacon_node/eth2_libp2p/src/rpc/handler.rs b/beacon_node/eth2_libp2p/src/rpc/handler.rs index 38d0391aa3f..6f7aff78b70 100644 --- a/beacon_node/eth2_libp2p/src/rpc/handler.rs +++ b/beacon_node/eth2_libp2p/src/rpc/handler.rs @@ -7,6 +7,7 @@ use super::{RPCReceived, RPCSend}; use crate::rpc::protocol::{InboundFramed, OutboundFramed}; use fnv::FnvHashMap; use futures::prelude::*; +use futures::{Sink, SinkExt}; use libp2p::core::upgrade::{ InboundUpgrade, NegotiationError, OutboundUpgrade, ProtocolError, UpgradeError, }; @@ -133,7 +134,7 @@ enum HandlerState { /// /// While in this state the handler rejects new requests but tries to finish existing ones. /// Once the timer expires, all messages are killed. - ShuttingDown(Sleep), + ShuttingDown(Box), /// The handler is deactivated. A goodbye has been sent and no more messages are sent or /// received. Deactivated, @@ -239,9 +240,9 @@ where self.dial_queue.push((id, req)); } - self.state = HandlerState::ShuttingDown(sleep_until( + self.state = HandlerState::ShuttingDown(Box::new(sleep_until( TInstant::now() + Duration::from_secs(SHUTDOWN_TIMEOUT_SECS as u64), - )); + ))); } } diff --git a/beacon_node/eth2_libp2p/src/rpc/protocol.rs b/beacon_node/eth2_libp2p/src/rpc/protocol.rs index 19a60508831..de74e98dd7a 100644 --- a/beacon_node/eth2_libp2p/src/rpc/protocol.rs +++ b/beacon_node/eth2_libp2p/src/rpc/protocol.rs @@ -9,8 +9,8 @@ use crate::rpc::{ MaxRequestBlocks, MAX_REQUEST_BLOCKS, }; use futures::future::BoxFuture; -use futures::prelude::*; use futures::prelude::{AsyncRead, AsyncWrite}; +use futures::{FutureExt, SinkExt, StreamExt}; use libp2p::core::{InboundUpgrade, OutboundUpgrade, ProtocolName, UpgradeInfo}; use ssz::Encode; use ssz_types::VariableList; @@ -278,7 +278,7 @@ impl ProtocolName for ProtocolId { pub type InboundOutput = (RPCRequest, InboundFramed); pub type InboundFramed = - Framed>, InboundCodec>; + Framed>>>, InboundCodec>; impl InboundUpgrade for RPCProtocol where @@ -304,7 +304,7 @@ where let mut timed_socket = TimeoutStream::new(socket); timed_socket.set_read_timeout(Some(Duration::from_secs(TTFB_TIMEOUT))); - let socket = Framed::new(timed_socket, codec); + let socket = Framed::new(Box::pin(timed_socket), codec); // MetaData requests should be empty, return the stream match protocol_name { diff --git a/beacon_node/eth2_libp2p/src/rpc/rate_limiter.rs b/beacon_node/eth2_libp2p/src/rpc/rate_limiter.rs index bc34ce832e7..8e096f8164d 100644 --- a/beacon_node/eth2_libp2p/src/rpc/rate_limiter.rs +++ b/beacon_node/eth2_libp2p/src/rpc/rate_limiter.rs @@ -1,6 +1,5 @@ use crate::rpc::{Protocol, RPCRequest}; use fnv::FnvHashMap; -use futures::StreamExt; use libp2p::PeerId; use std::convert::TryInto; use std::future::Future; @@ -241,7 +240,7 @@ impl Future for RPCRateLimiter { type Output = (); fn poll(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll { - while let Poll::Ready(Some(_)) = self.prune_interval.poll_next_unpin(cx) { + while let Poll::Ready(_) = self.prune_interval.poll_tick(cx) { self.prune(); } diff --git a/beacon_node/eth2_libp2p/src/types/sync_state.rs b/beacon_node/eth2_libp2p/src/types/sync_state.rs index f5b6a155854..6fdcc2d0871 100644 --- a/beacon_node/eth2_libp2p/src/types/sync_state.rs +++ b/beacon_node/eth2_libp2p/src/types/sync_state.rs @@ -23,12 +23,16 @@ pub enum SyncState { impl PartialEq for SyncState { fn eq(&self, other: &Self) -> bool { - matches!((self, other), - (SyncState::SyncingFinalized { .. }, SyncState::SyncingFinalized { .. }) | - (SyncState::SyncingHead { .. }, SyncState::SyncingHead { .. }) | - (SyncState::Synced, SyncState::Synced) | - (SyncState::Stalled, SyncState::Stalled) | - (SyncState::SyncTransition, SyncState::SyncTransition)) + matches!( + (self, other), + ( + SyncState::SyncingFinalized { .. }, + SyncState::SyncingFinalized { .. } + ) | (SyncState::SyncingHead { .. }, SyncState::SyncingHead { .. }) + | (SyncState::Synced, SyncState::Synced) + | (SyncState::Stalled, SyncState::Stalled) + | (SyncState::SyncTransition, SyncState::SyncTransition) + ) } } diff --git a/beacon_node/eth2_libp2p/tests/rpc_tests.rs b/beacon_node/eth2_libp2p/tests/rpc_tests.rs index e054964e16d..43f054d27f6 100644 --- a/beacon_node/eth2_libp2p/tests/rpc_tests.rs +++ b/beacon_node/eth2_libp2p/tests/rpc_tests.rs @@ -315,7 +315,7 @@ fn test_blocks_by_range_chunked_rpc_terminates_correctly() { // sent in the timeout match futures::future::select( Box::pin(receiver.next_event()), - tokio::time::sleep(Duration::from_secs(1)), + Box::pin(tokio::time::sleep(Duration::from_secs(1))), ) .await { @@ -692,7 +692,7 @@ fn test_blocks_by_root_chunked_rpc_terminates_correctly() { // sent in the timeout match futures::future::select( Box::pin(receiver.next_event()), - tokio::time::sleep(Duration::from_millis(1000)), + Box::pin(tokio::time::sleep(Duration::from_secs(1))), ) .await { diff --git a/beacon_node/genesis/Cargo.toml b/beacon_node/genesis/Cargo.toml index 383c79d904a..ef9f214011c 100644 --- a/beacon_node/genesis/Cargo.toml +++ b/beacon_node/genesis/Cargo.toml @@ -19,7 +19,7 @@ merkle_proof = { path = "../../consensus/merkle_proof" } eth2_ssz = "0.1.2" eth2_hashing = "0.1.0" tree_hash = "0.1.1" -tokio = { version = "0.3.2", features = ["full"] } +tokio = { version = "1.1.0", features = ["full"] } parking_lot = "0.11.0" slog = "2.5.2" exit-future = "0.2.0" diff --git a/beacon_node/http_api/Cargo.toml b/beacon_node/http_api/Cargo.toml index a35d832db94..25b32d33f36 100644 --- a/beacon_node/http_api/Cargo.toml +++ b/beacon_node/http_api/Cargo.toml @@ -5,9 +5,11 @@ authors = ["Paul Hauner "] edition = "2018" [dependencies] -warp = { git = "https://github.com/sigp/warp ", branch = "lighthouse" } +warp = "0.3.0" serde = { version = "1.0.116", features = ["derive"] } -tokio = { version = "0.3.2", features = ["macros","stream","sync"] } +tokio = { version = "1.1.0", features = ["macros","sync"] } +tokio-stream = "0.1.2" +tokio-util = "0.6.3" parking_lot = "0.11.0" types = { path = "../../consensus/types" } hex = "0.4.2" @@ -32,5 +34,4 @@ futures = "0.3.8" store = { path = "../store" } environment = { path = "../../lighthouse/environment" } tree_hash = "0.1.1" -discv5 = { version = "0.1.0-beta.2", features = ["libp2p"] } -tokio-compat-02 = "0.1" +discv5 = { version = "0.1.0-beta.3" } diff --git a/beacon_node/http_api/src/broadcast_stream.rs b/beacon_node/http_api/src/broadcast_stream.rs new file mode 100644 index 00000000000..9e35a556acb --- /dev/null +++ b/beacon_node/http_api/src/broadcast_stream.rs @@ -0,0 +1,66 @@ +// TODO: this should be replaced with the tokio's `BroadcastStream` once it's added to +// tokio-stream (https://github.com/tokio-rs/tokio/pull/3384) + +use std::fmt; +use std::pin::Pin; +use std::task::{Context, Poll}; +use tokio::sync::broadcast::error::RecvError; +use tokio::sync::broadcast::Receiver; +use tokio_stream::Stream; +use tokio_util::sync::ReusableBoxFuture; + +/// A wrapper around [`tokio::sync::broadcast::Receiver`] that implements [`Stream`]. +/// +/// [`tokio::sync::broadcast::Receiver`]: struct@tokio::sync::broadcast::Receiver +/// [`Stream`]: trait@crate::Stream +pub struct BroadcastStream { + inner: ReusableBoxFuture<(Result, Receiver)>, +} + +/// An error returned from the inner stream of a [`BroadcastStream`]. +#[derive(Debug, PartialEq)] +pub enum BroadcastStreamRecvError { + /// The receiver lagged too far behind. Attempting to receive again will + /// return the oldest message still retained by the channel. + /// + /// Includes the number of skipped messages. + Lagged(u64), +} + +async fn make_future(mut rx: Receiver) -> (Result, Receiver) { + let result = rx.recv().await; + (result, rx) +} + +impl BroadcastStream { + /// Create a new `BroadcastStream`. + pub fn new(rx: Receiver) -> Self { + Self { + inner: ReusableBoxFuture::new(make_future(rx)), + } + } +} + +impl Stream for BroadcastStream { + type Item = Result; + fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { + let (result, rx) = match self.inner.poll(cx) { + std::task::Poll::Ready(t) => t, + std::task::Poll::Pending => return std::task::Poll::Pending, + }; + self.inner.set(make_future(rx)); + match result { + Ok(item) => Poll::Ready(Some(Ok(item))), + Err(RecvError::Closed) => Poll::Ready(None), + Err(RecvError::Lagged(n)) => { + Poll::Ready(Some(Err(BroadcastStreamRecvError::Lagged(n)))) + } + } + } +} + +impl fmt::Debug for BroadcastStream { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("BroadcastStream").finish() + } +} diff --git a/beacon_node/http_api/src/lib.rs b/beacon_node/http_api/src/lib.rs index 70e83068733..707e5fd378c 100644 --- a/beacon_node/http_api/src/lib.rs +++ b/beacon_node/http_api/src/lib.rs @@ -7,6 +7,7 @@ mod beacon_proposer_cache; mod block_id; +mod broadcast_stream; mod metrics; mod state_id; mod validator_inclusion; @@ -18,7 +19,7 @@ use beacon_chain::{ }; use beacon_proposer_cache::BeaconProposerCache; use block_id::BlockId; -use eth2::types::{self as api_types, EventKind, ValidatorId}; +use eth2::types::{self as api_types, ValidatorId}; use eth2_libp2p::{types::SyncState, EnrExt, NetworkGlobals, PeerId, PubsubMessage}; use lighthouse_version::version_with_platform; use network::NetworkMessage; @@ -34,19 +35,17 @@ use std::convert::TryInto; use std::future::Future; use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4}; use std::sync::Arc; -use tokio::stream::{StreamExt, StreamMap}; -use tokio::sync::broadcast::error::RecvError; use tokio::sync::mpsc::UnboundedSender; +use tokio_stream::StreamExt; use types::{ Attestation, AttestationDuty, AttesterSlashing, CloneConfig, CommitteeCache, Epoch, EthSpec, Hash256, ProposerSlashing, PublicKey, PublicKeyBytes, RelativeEpoch, SignedAggregateAndProof, SignedBeaconBlock, SignedVoluntaryExit, Slot, YamlConfig, }; use warp::http::StatusCode; -use warp::sse::ServerSentEvent; +use warp::sse::Event; use warp::Reply; -use warp::{http::Response, Filter, Stream}; -use warp_utils::reject::ServerSentEventError; +use warp::{http::Response, Filter}; use warp_utils::task::{blocking_json_task, blocking_task}; const API_PREFIX: &str = "eth"; @@ -1610,9 +1609,9 @@ pub fn serve( .and(warp::path("duties")) .and(warp::path("proposer")) .and(warp::path::param::().or_else(|_| async { - Err(warp_utils::reject::custom_bad_request( - "Invalid epoch".to_string(), - )) + Err(warp_utils::reject::custom_bad_request( + "Invalid epoch".to_string(), + )) })) .and(warp::path::end()) .and(not_while_syncing_filter.clone()) @@ -1637,7 +1636,7 @@ pub fn serve( if epoch == current_epoch { let dependent_root_slot = current_epoch .start_slot(T::EthSpec::slots_per_epoch()) - 1; - let dependent_root = if dependent_root_slot > chain.best_slot().map_err(warp_utils::reject::beacon_chain_error)? { + let dependent_root = if dependent_root_slot > chain.best_slot().map_err(warp_utils::reject::beacon_chain_error)? { chain.head_beacon_block_root().map_err(warp_utils::reject::beacon_chain_error)? } else { chain @@ -1649,7 +1648,7 @@ pub fn serve( beacon_proposer_cache .lock() .get_proposers(&chain, epoch) - .map(|duties| api_types::DutiesResponse{ data: duties, dependent_root} ) + .map(|duties| api_types::DutiesResponse { data: duties, dependent_root }) } else { let state = StateId::slot(epoch.start_slot(T::EthSpec::slots_per_epoch())) @@ -1657,7 +1656,7 @@ pub fn serve( let dependent_root_slot = state.current_epoch() .start_slot(T::EthSpec::slots_per_epoch()) - 1; - let dependent_root = if dependent_root_slot > chain.best_slot().map_err(warp_utils::reject::beacon_chain_error)? { + let dependent_root = if dependent_root_slot > chain.best_slot().map_err(warp_utils::reject::beacon_chain_error)? { chain.head_beacon_block_root().map_err(warp_utils::reject::beacon_chain_error)? } else { chain @@ -1691,8 +1690,7 @@ pub fn serve( }) .collect::, _>>() .map(|duties| { - - api_types::DutiesResponse{ + api_types::DutiesResponse { dependent_root, data: duties, } @@ -2053,7 +2051,7 @@ pub fn serve( "attestation_slot" => aggregate.message.aggregate.data.slot, ); failures.push(api_types::Failure::new(index, format!("Verification: {:?}", e))); - }, + } } } @@ -2087,7 +2085,7 @@ pub fn serve( if !failures.is_empty() { Err(warp_utils::reject::indexed_bad_request("error processing aggregate and proofs".to_string(), - failures + failures, )) } else { Ok(()) @@ -2358,24 +2356,6 @@ pub fn serve( }) }); - fn merge_streams( - stream_map: StreamMap< - String, - impl Stream, RecvError>> + Unpin + Send + 'static, - >, - ) -> impl Stream> - + Send - + 'static { - // Convert messages into Server-Sent Events and return resulting stream. - stream_map.map(move |(topic_name, msg)| match msg { - Ok(data) => Ok((warp::sse::event(topic_name), warp::sse::json(data)).boxed()), - Err(e) => Err(warp_utils::reject::server_sent_event_error(format!( - "{:?}", - e - ))), - }) - } - let get_events = eth1_v1 .and(warp::path("events")) .and(warp::path::end()) @@ -2385,7 +2365,7 @@ pub fn serve( |topics: api_types::EventQuery, chain: Arc>| { blocking_task(move || { // for each topic subscribed spawn a new subscription - let mut stream_map = StreamMap::with_capacity(topics.topics.0.len()); + let mut receivers = Vec::with_capacity(topics.topics.0.len()); if let Some(event_handler) = chain.event_handler.as_ref() { for topic in topics.topics.0.clone() { @@ -2402,7 +2382,24 @@ pub fn serve( event_handler.subscribe_finalized() } }; - stream_map.insert(topic.to_string(), Box::pin(receiver.into_stream())); + + receivers.push(broadcast_stream::BroadcastStream::new(receiver).map( + |msg| { + match msg { + Ok(data) => Event::default() + .event(data.topic_name()) + .json_data(data) + .map_err(|e| { + warp_utils::reject::server_sent_event_error( + format!("{:?}", e), + ) + }), + Err(e) => Err(warp_utils::reject::server_sent_event_error( + format!("{:?}", e), + )), + } + }, + )); } } else { return Err(warp_utils::reject::custom_server_error( @@ -2410,11 +2407,9 @@ pub fn serve( )); } - let stream = merge_streams(stream_map); + let s = futures::stream::select_all(receivers); - Ok::<_, warp::Rejection>(warp::sse::reply( - warp::sse::keep_alive().stream(stream), - )) + Ok::<_, warp::Rejection>(warp::sse::reply(warp::sse::keep_alive().stream(s))) }) }, ); diff --git a/beacon_node/http_api/tests/tests.rs b/beacon_node/http_api/tests/tests.rs index dedfe400afa..1e3bb9651b3 100644 --- a/beacon_node/http_api/tests/tests.rs +++ b/beacon_node/http_api/tests/tests.rs @@ -15,6 +15,7 @@ use eth2_libp2p::{ Enr, EnrExt, NetworkGlobals, PeerId, }; use futures::stream::{Stream, StreamExt}; +use futures::FutureExt; use http_api::{Config, Context}; use network::NetworkMessage; use state_processing::per_slot_processing; @@ -25,7 +26,6 @@ use std::sync::Arc; use tokio::sync::mpsc; use tokio::sync::oneshot; use tokio::time::Duration; -use tokio_compat_02::FutureExt; use tree_hash::TreeHash; use types::{ test_utils::generate_deterministic_keypairs, AggregateSignature, BeaconState, BitList, Domain, @@ -933,7 +933,7 @@ impl ApiTester { self.client.post_beacon_blocks(next_block).await.unwrap(); assert!( - self.network_rx.try_recv().is_ok(), + self.network_rx.recv().await.is_some(), "valid blocks should be sent to network" ); @@ -947,7 +947,7 @@ impl ApiTester { assert!(self.client.post_beacon_blocks(&next_block).await.is_err()); assert!( - self.network_rx.try_recv().is_ok(), + self.network_rx.recv().await.is_some(), "invalid blocks should be sent to network" ); @@ -997,7 +997,7 @@ impl ApiTester { .unwrap(); assert!( - self.network_rx.try_recv().is_ok(), + self.network_rx.recv().await.is_some(), "valid attestation should be sent to network" ); @@ -1034,7 +1034,7 @@ impl ApiTester { } assert!( - self.network_rx.try_recv().is_ok(), + self.network_rx.recv().await.is_some(), "if some attestations are valid, we should send them to the network" ); @@ -1064,7 +1064,7 @@ impl ApiTester { .unwrap(); assert!( - self.network_rx.try_recv().is_ok(), + self.network_rx.recv().await.is_some(), "valid attester slashing should be sent to network" ); @@ -1081,7 +1081,7 @@ impl ApiTester { .unwrap_err(); assert!( - self.network_rx.try_recv().is_err(), + self.network_rx.recv().now_or_never().is_none(), "invalid attester slashing should not be sent to network" ); @@ -1110,7 +1110,7 @@ impl ApiTester { .unwrap(); assert!( - self.network_rx.try_recv().is_ok(), + self.network_rx.recv().await.is_some(), "valid proposer slashing should be sent to network" ); @@ -1127,7 +1127,7 @@ impl ApiTester { .unwrap_err(); assert!( - self.network_rx.try_recv().is_err(), + self.network_rx.recv().now_or_never().is_none(), "invalid proposer slashing should not be sent to network" ); @@ -1156,7 +1156,7 @@ impl ApiTester { .unwrap(); assert!( - self.network_rx.try_recv().is_ok(), + self.network_rx.recv().await.is_some(), "valid exit should be sent to network" ); @@ -1173,7 +1173,7 @@ impl ApiTester { .unwrap_err(); assert!( - self.network_rx.try_recv().is_err(), + self.network_rx.recv().now_or_never().is_none(), "invalid exit should not be sent to network" ); @@ -1822,7 +1822,7 @@ impl ApiTester { .await .unwrap(); - assert!(self.network_rx.try_recv().is_ok()); + assert!(self.network_rx.recv().await.is_some()); self } @@ -1837,7 +1837,7 @@ impl ApiTester { .await .unwrap_err(); - assert!(self.network_rx.try_recv().is_err()); + assert!(self.network_rx.recv().now_or_never().is_none()); self } @@ -1856,7 +1856,7 @@ impl ApiTester { .await .unwrap(); - self.network_rx.try_recv().unwrap(); + self.network_rx.recv().now_or_never().unwrap(); self } @@ -2127,83 +2127,71 @@ async fn poll_events, eth2::Error>> + Unpin #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn get_events() { - ApiTester::new().test_get_events().compat().await; + ApiTester::new().test_get_events().await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn get_events_from_genesis() { ApiTester::new_from_genesis() .test_get_events_from_genesis() - .compat() .await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn beacon_get() { - async { - ApiTester::new() - .test_beacon_genesis() - .await - .test_beacon_states_root() - .await - .test_beacon_states_fork() - .await - .test_beacon_states_finality_checkpoints() - .await - .test_beacon_states_validators() - .await - .test_beacon_states_validator_balances() - .await - .test_beacon_states_committees() - .await - .test_beacon_states_validator_id() - .await - .test_beacon_headers_all_slots() - .await - .test_beacon_headers_all_parents() - .await - .test_beacon_headers_block_id() - .await - .test_beacon_blocks() - .await - .test_beacon_blocks_attestations() - .await - .test_beacon_blocks_root() - .await - .test_get_beacon_pool_attestations() - .await - .test_get_beacon_pool_attester_slashings() - .await - .test_get_beacon_pool_proposer_slashings() - .await - .test_get_beacon_pool_voluntary_exits() - .await; - } - .compat() - .await; + ApiTester::new() + .test_beacon_genesis() + .await + .test_beacon_states_root() + .await + .test_beacon_states_fork() + .await + .test_beacon_states_finality_checkpoints() + .await + .test_beacon_states_validators() + .await + .test_beacon_states_validator_balances() + .await + .test_beacon_states_committees() + .await + .test_beacon_states_validator_id() + .await + .test_beacon_headers_all_slots() + .await + .test_beacon_headers_all_parents() + .await + .test_beacon_headers_block_id() + .await + .test_beacon_blocks() + .await + .test_beacon_blocks_attestations() + .await + .test_beacon_blocks_root() + .await + .test_get_beacon_pool_attestations() + .await + .test_get_beacon_pool_attester_slashings() + .await + .test_get_beacon_pool_proposer_slashings() + .await + .test_get_beacon_pool_voluntary_exits() + .await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn post_beacon_blocks_valid() { - ApiTester::new() - .test_post_beacon_blocks_valid() - .compat() - .await; + ApiTester::new().test_post_beacon_blocks_valid().await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn post_beacon_blocks_invalid() { - ApiTester::new() - .test_post_beacon_blocks_invalid() - .compat() - .await; + ApiTester::new().test_post_beacon_blocks_invalid().await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn beacon_pools_post_attestations_valid() { ApiTester::new() .test_post_beacon_pool_attestations_valid() - .compat() .await; } @@ -2211,7 +2199,6 @@ async fn beacon_pools_post_attestations_valid() { async fn beacon_pools_post_attestations_invalid() { ApiTester::new() .test_post_beacon_pool_attestations_invalid() - .compat() .await; } @@ -2219,7 +2206,6 @@ async fn beacon_pools_post_attestations_invalid() { async fn beacon_pools_post_attester_slashings_valid() { ApiTester::new() .test_post_beacon_pool_attester_slashings_valid() - .compat() .await; } @@ -2227,7 +2213,6 @@ async fn beacon_pools_post_attester_slashings_valid() { async fn beacon_pools_post_attester_slashings_invalid() { ApiTester::new() .test_post_beacon_pool_attester_slashings_invalid() - .compat() .await; } @@ -2235,7 +2220,6 @@ async fn beacon_pools_post_attester_slashings_invalid() { async fn beacon_pools_post_proposer_slashings_valid() { ApiTester::new() .test_post_beacon_pool_proposer_slashings_valid() - .compat() .await; } @@ -2243,7 +2227,6 @@ async fn beacon_pools_post_proposer_slashings_valid() { async fn beacon_pools_post_proposer_slashings_invalid() { ApiTester::new() .test_post_beacon_pool_proposer_slashings_invalid() - .compat() .await; } @@ -2251,7 +2234,6 @@ async fn beacon_pools_post_proposer_slashings_invalid() { async fn beacon_pools_post_voluntary_exits_valid() { ApiTester::new() .test_post_beacon_pool_voluntary_exits_valid() - .compat() .await; } @@ -2259,7 +2241,6 @@ async fn beacon_pools_post_voluntary_exits_valid() { async fn beacon_pools_post_voluntary_exits_invalid() { ApiTester::new() .test_post_beacon_pool_voluntary_exits_invalid() - .compat() .await; } @@ -2267,13 +2248,10 @@ async fn beacon_pools_post_voluntary_exits_invalid() { async fn config_get() { ApiTester::new() .test_get_config_fork_schedule() - .compat() .await .test_get_config_spec() - .compat() .await .test_get_config_deposit_contract() - .compat() .await; } @@ -2281,10 +2259,8 @@ async fn config_get() { async fn debug_get() { ApiTester::new() .test_get_debug_beacon_states() - .compat() .await .test_get_debug_beacon_heads() - .compat() .await; } @@ -2292,34 +2268,24 @@ async fn debug_get() { async fn node_get() { ApiTester::new() .test_get_node_version() - .compat() .await .test_get_node_syncing() - .compat() .await .test_get_node_identity() - .compat() .await .test_get_node_health() - .compat() .await .test_get_node_peers_by_id() - .compat() .await .test_get_node_peers() - .compat() .await .test_get_node_peer_count() - .compat() .await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn get_validator_duties_attester() { - ApiTester::new() - .test_get_validator_duties_attester() - .compat() - .await; + ApiTester::new().test_get_validator_duties_attester().await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] @@ -2327,16 +2293,12 @@ async fn get_validator_duties_attester_with_skip_slots() { ApiTester::new() .skip_slots(E::slots_per_epoch() * 2) .test_get_validator_duties_attester() - .compat() .await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn get_validator_duties_proposer() { - ApiTester::new() - .test_get_validator_duties_proposer() - .compat() - .await; + ApiTester::new().test_get_validator_duties_proposer().await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] @@ -2344,13 +2306,12 @@ async fn get_validator_duties_proposer_with_skip_slots() { ApiTester::new() .skip_slots(E::slots_per_epoch() * 2) .test_get_validator_duties_proposer() - .compat() .await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn block_production() { - ApiTester::new().test_block_production().compat().await; + ApiTester::new().test_block_production().await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] @@ -2358,16 +2319,12 @@ async fn block_production_with_skip_slots() { ApiTester::new() .skip_slots(E::slots_per_epoch() * 2) .test_block_production() - .compat() .await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn get_validator_attestation_data() { - ApiTester::new() - .test_get_validator_attestation_data() - .compat() - .await; + ApiTester::new().test_get_validator_attestation_data().await; } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] @@ -2375,7 +2332,6 @@ async fn get_validator_attestation_data_with_skip_slots() { ApiTester::new() .skip_slots(E::slots_per_epoch() * 2) .test_get_validator_attestation_data() - .compat() .await; } @@ -2383,7 +2339,6 @@ async fn get_validator_attestation_data_with_skip_slots() { async fn get_validator_aggregate_attestation() { ApiTester::new() .test_get_validator_aggregate_attestation() - .compat() .await; } @@ -2392,7 +2347,6 @@ async fn get_validator_aggregate_attestation_with_skip_slots() { ApiTester::new() .skip_slots(E::slots_per_epoch() * 2) .test_get_validator_aggregate_attestation() - .compat() .await; } @@ -2400,7 +2354,6 @@ async fn get_validator_aggregate_attestation_with_skip_slots() { async fn get_validator_aggregate_and_proofs_valid() { ApiTester::new() .test_get_validator_aggregate_and_proofs_valid() - .compat() .await; } @@ -2409,7 +2362,6 @@ async fn get_validator_aggregate_and_proofs_valid_with_skip_slots() { ApiTester::new() .skip_slots(E::slots_per_epoch() * 2) .test_get_validator_aggregate_and_proofs_valid() - .compat() .await; } @@ -2417,7 +2369,6 @@ async fn get_validator_aggregate_and_proofs_valid_with_skip_slots() { async fn get_validator_aggregate_and_proofs_invalid() { ApiTester::new() .test_get_validator_aggregate_and_proofs_invalid() - .compat() .await; } @@ -2426,7 +2377,6 @@ async fn get_validator_aggregate_and_proofs_invalid_with_skip_slots() { ApiTester::new() .skip_slots(E::slots_per_epoch() * 2) .test_get_validator_aggregate_and_proofs_invalid() - .compat() .await; } @@ -2434,7 +2384,6 @@ async fn get_validator_aggregate_and_proofs_invalid_with_skip_slots() { async fn get_validator_beacon_committee_subscriptions() { ApiTester::new() .test_get_validator_beacon_committee_subscriptions() - .compat() .await; } @@ -2442,33 +2391,23 @@ async fn get_validator_beacon_committee_subscriptions() { async fn lighthouse_endpoints() { ApiTester::new() .test_get_lighthouse_health() - .compat() .await .test_get_lighthouse_syncing() - .compat() .await .test_get_lighthouse_proto_array() - .compat() .await .test_get_lighthouse_validator_inclusion() - .compat() .await .test_get_lighthouse_validator_inclusion_global() - .compat() .await .test_get_lighthouse_eth1_syncing() - .compat() .await .test_get_lighthouse_eth1_block_cache() - .compat() .await .test_get_lighthouse_eth1_deposit_cache() - .compat() .await .test_get_lighthouse_beacon_states_ssz() - .compat() .await .test_get_lighthouse_staking() - .compat() .await; } diff --git a/beacon_node/http_metrics/Cargo.toml b/beacon_node/http_metrics/Cargo.toml index ab2e53206d9..42bf60f0011 100644 --- a/beacon_node/http_metrics/Cargo.toml +++ b/beacon_node/http_metrics/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" [dependencies] prometheus = "0.11.0" -warp = { git = "https://github.com/sigp/warp ", branch = "lighthouse" } +warp = "0.3.0" serde = { version = "1.0.116", features = ["derive"] } slog = "2.5.2" beacon_chain = { path = "../beacon_chain" } @@ -22,8 +22,7 @@ lighthouse_version = { path = "../../common/lighthouse_version" } warp_utils = { path = "../../common/warp_utils" } [dev-dependencies] -tokio = { version = "0.3.2", features = ["sync"] } -reqwest = { version = "0.10.8", features = ["json"] } +tokio = { version = "1.1.0", features = ["sync"] } +reqwest = { version = "0.11.0", features = ["json"] } environment = { path = "../../lighthouse/environment" } types = { path = "../../consensus/types" } -tokio-compat-02 = "0.1" diff --git a/beacon_node/http_metrics/tests/tests.rs b/beacon_node/http_metrics/tests/tests.rs index cd0420f4bd1..db161c6d68b 100644 --- a/beacon_node/http_metrics/tests/tests.rs +++ b/beacon_node/http_metrics/tests/tests.rs @@ -5,7 +5,6 @@ use reqwest::StatusCode; use std::net::Ipv4Addr; use std::sync::Arc; use tokio::sync::oneshot; -use tokio_compat_02::FutureExt; use types::MainnetEthSpec; type Context = http_metrics::Context>; @@ -46,6 +45,5 @@ async fn returns_200_ok() { assert_eq!(reqwest::get(&url).await.unwrap().status(), StatusCode::OK); } - .compat() .await } diff --git a/beacon_node/network/Cargo.toml b/beacon_node/network/Cargo.toml index cef863da674..5f8470c2fb8 100644 --- a/beacon_node/network/Cargo.toml +++ b/beacon_node/network/Cargo.toml @@ -30,12 +30,13 @@ eth2_ssz_types = { path = "../../consensus/ssz_types" } tree_hash = "0.1.1" futures = "0.3.7" error-chain = "0.12.4" -tokio = { version = "0.3.2", features = ["full"] } +tokio = { version = "1.1.0", features = ["full"] } +tokio-stream = "0.1.2" parking_lot = "0.11.0" smallvec = "1.6.1" rand = "0.7.3" fnv = "1.0.7" -rlp = "0.4.6" +rlp = "0.5.0" lazy_static = "1.4.0" lighthouse_metrics = { path = "../../common/lighthouse_metrics" } task_executor = { path = "../../common/task_executor" } diff --git a/beacon_node/network/src/persisted_dht.rs b/beacon_node/network/src/persisted_dht.rs index c11fcd44852..59b0bd9ab24 100644 --- a/beacon_node/network/src/persisted_dht.rs +++ b/beacon_node/network/src/persisted_dht.rs @@ -38,7 +38,7 @@ impl StoreItem for PersistedDht { } fn as_store_bytes(&self) -> Vec { - rlp::encode_list(&self.enrs) + rlp::encode_list(&self.enrs).to_vec() } fn from_store_bytes(bytes: &[u8]) -> Result { diff --git a/beacon_node/network/src/router/mod.rs b/beacon_node/network/src/router/mod.rs index 56332f7dee6..8d9b1cd6247 100644 --- a/beacon_node/network/src/router/mod.rs +++ b/beacon_node/network/src/router/mod.rs @@ -19,6 +19,7 @@ use processor::Processor; use slog::{debug, o, trace}; use std::sync::Arc; use tokio::sync::mpsc; +use tokio_stream::wrappers::UnboundedReceiverStream; use types::EthSpec; /// Handles messages received from the network and client and organises syncing. This @@ -101,7 +102,7 @@ impl Router { executor.spawn( async move { debug!(log, "Network message router started"); - handler_recv + UnboundedReceiverStream::new(handler_recv) .for_each(move |msg| future::ready(handler.handle_message(msg))) .await; }, diff --git a/beacon_node/network/src/service.rs b/beacon_node/network/src/service.rs index be5876a2a66..2a68d5b02e7 100644 --- a/beacon_node/network/src/service.rs +++ b/beacon_node/network/src/service.rs @@ -266,7 +266,7 @@ fn spawn_service( info!(service.log, "Network service shutdown"); return; } - _ = service.metrics_update.next() => { + _ = service.metrics_update.tick() => { // update various network metrics metric_update_counter +=1; if metric_update_counter % T::EthSpec::default_spec().seconds_per_slot == 0 { @@ -283,7 +283,7 @@ fn spawn_service( metrics::update_sync_metrics(&service.network_globals); } - _ = service.gossipsub_parameter_update.next() => { + _ = service.gossipsub_parameter_update.tick() => { if let Ok(slot) = service.beacon_chain.slot() { if let Some(active_validators) = service.beacon_chain.with_head(|head| { Ok::<_, BeaconChainError>( diff --git a/beacon_node/tests/test.rs b/beacon_node/tests/test.rs index 011209a1437..0d5c6c9fb34 100644 --- a/beacon_node/tests/test.rs +++ b/beacon_node/tests/test.rs @@ -1,14 +1,11 @@ #![cfg(test)] -//TODO: Drop compat library once reqwest and other libraries update to tokio 0.3 - use beacon_chain::StateSkipConfig; use node_test_rig::{ environment::{Environment, EnvironmentBuilder}, eth2::types::StateId, testing_client_config, LocalBeaconNode, }; -use tokio_compat_02::FutureExt; use types::{EthSpec, MinimalEthSpec, Slot}; fn env_builder() -> EnvironmentBuilder { @@ -44,11 +41,7 @@ fn http_server_genesis_state() { let api_state = env .runtime() - .block_on( - remote_node - .get_debug_beacon_states(StateId::Slot(Slot::new(0))) - .compat(), - ) + .block_on(remote_node.get_debug_beacon_states(StateId::Slot(Slot::new(0)))) .expect("should fetch state from http api") .unwrap() .data; diff --git a/beacon_node/timer/Cargo.toml b/beacon_node/timer/Cargo.toml index 07bfc8c0e3a..d45a214b388 100644 --- a/beacon_node/timer/Cargo.toml +++ b/beacon_node/timer/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" beacon_chain = { path = "../beacon_chain" } types = { path = "../../consensus/types" } slot_clock = { path = "../../common/slot_clock" } -tokio = { version = "0.3.2", features = ["full"] } +tokio = { version = "1.1.0", features = ["full"] } slog = "2.5.2" parking_lot = "0.11.0" futures = "0.3.7" diff --git a/beacon_node/timer/src/lib.rs b/beacon_node/timer/src/lib.rs index 639b81b7de9..d0f449bab83 100644 --- a/beacon_node/timer/src/lib.rs +++ b/beacon_node/timer/src/lib.rs @@ -3,7 +3,6 @@ //! This service allows task execution on the beacon node for various functionality. use beacon_chain::{BeaconChain, BeaconChainTypes}; -use futures::stream::StreamExt; use slog::info; use slot_clock::SlotClock; use std::sync::Arc; @@ -26,7 +25,8 @@ pub fn spawn_timer( // Warning: `interval_at` panics if `seconds_per_slot` = 0. let mut interval = interval_at(start_instant, Duration::from_secs(seconds_per_slot)); let timer_future = async move { - while interval.next().await.is_some() { + loop { + interval.tick().await; beacon_chain.per_slot_task(); } }; diff --git a/boot_node/Cargo.toml b/boot_node/Cargo.toml index 3a69ba39add..2179c0f60c7 100644 --- a/boot_node/Cargo.toml +++ b/boot_node/Cargo.toml @@ -13,7 +13,7 @@ eth2_network_config = { path = "../common/eth2_network_config" } eth2_ssz = "0.1.2" slog = "2.5.2" sloggers = "1.0.1" -tokio = "0.3.2" +tokio = "1.1.0" log = "0.4.11" slog-term = "2.6.0" logging = { path = "../common/logging" } diff --git a/boot_node/src/server.rs b/boot_node/src/server.rs index 14f37113690..b1efd805ce7 100644 --- a/boot_node/src/server.rs +++ b/boot_node/src/server.rs @@ -5,7 +5,6 @@ use eth2_libp2p::{ discv5::{enr::NodeId, Discv5, Discv5ConfigBuilder, Discv5Event}, EnrExt, Eth2Enr, }; -use futures::prelude::*; use slog::info; use types::EthSpec; @@ -78,7 +77,7 @@ pub async fn run(config: BootNodeConfig, log: slog::Logger) { // listen for events loop { tokio::select! { - _ = metric_interval.next() => { + _ = metric_interval.tick() => { // display server metrics let metrics = discv5.metrics(); info!(log, "Server metrics"; "connected_peers" => discv5.connected_peers(), "active_sessions" => metrics.active_sessions, "requests/s" => format!("{:.2}", metrics.unsolicited_requests_per_second)); diff --git a/common/deposit_contract/Cargo.toml b/common/deposit_contract/Cargo.toml index 1a6f8439514..6c27d124857 100644 --- a/common/deposit_contract/Cargo.toml +++ b/common/deposit_contract/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" build = "build.rs" [build-dependencies] -reqwest = { version = "0.10.8", features = ["blocking", "json", "native-tls-vendored"] } +reqwest = { version = "0.11.0", features = ["blocking", "json", "native-tls-vendored"] } serde_json = "1.0.58" sha2 = "0.9.1" hex = "0.4.2" diff --git a/common/eth2/Cargo.toml b/common/eth2/Cargo.toml index d7eddd7dffa..72b18d13fef 100644 --- a/common/eth2/Cargo.toml +++ b/common/eth2/Cargo.toml @@ -11,7 +11,7 @@ serde = { version = "1.0.116", features = ["derive"] } serde_json = "1.0.58" types = { path = "../../consensus/types" } hex = "0.4.2" -reqwest = { version = "0.10.8", features = ["json","stream"] } +reqwest = { version = "0.11.0", features = ["json","stream"] } eth2_libp2p = { path = "../../beacon_node/eth2_libp2p" } proto_array = { path = "../../consensus/proto_array", optional = true } serde_utils = { path = "../../consensus/serde_utils" } @@ -19,7 +19,7 @@ zeroize = { version = "1.1.1", features = ["zeroize_derive"] } eth2_keystore = { path = "../../crypto/eth2_keystore" } libsecp256k1 = "0.3.5" ring = "0.16.19" -bytes = "0.5.6" +bytes = "1.0.1" account_utils = { path = "../../common/account_utils" } eth2_ssz = "0.1.2" eth2_ssz_derive = "0.1.0" diff --git a/common/eth2/src/types.rs b/common/eth2/src/types.rs index 49719a4c294..f905025be04 100644 --- a/common/eth2/src/types.rs +++ b/common/eth2/src/types.rs @@ -682,6 +682,16 @@ pub enum EventKind { } impl EventKind { + pub fn topic_name(&self) -> &str { + match self { + EventKind::Head(_) => "head", + EventKind::Block(_) => "block", + EventKind::Attestation(_) => "attestation", + EventKind::VoluntaryExit(_) => "voluntary_exit", + EventKind::FinalizedCheckpoint(_) => "finalized_checkpoint", + } + } + pub fn from_sse_bytes(message: &[u8]) -> Result { let s = from_utf8(message) .map_err(|e| ServerError::InvalidServerSentEvent(format!("{:?}", e)))?; diff --git a/common/eth2_network_config/Cargo.toml b/common/eth2_network_config/Cargo.toml index 1407833fa57..b11f93672ef 100644 --- a/common/eth2_network_config/Cargo.toml +++ b/common/eth2_network_config/Cargo.toml @@ -19,4 +19,4 @@ serde_yaml = "0.8.13" types = { path = "../../consensus/types"} eth2_ssz = "0.1.2" eth2_config = { path = "../eth2_config"} -enr = { version = "0.4.0", features = ["ed25519", "k256"] } +enr = { version = "0.5.0", features = ["ed25519", "k256"] } diff --git a/common/hashset_delay/Cargo.toml b/common/hashset_delay/Cargo.toml index c9a450ae78c..80e5e9e2b6e 100644 --- a/common/hashset_delay/Cargo.toml +++ b/common/hashset_delay/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" [dependencies] futures = "0.3.7" -tokio-util = { version = "0.5.0", features = ["time"] } +tokio-util = { version = "0.6.2", features = ["time"] } [dev-dependencies] -tokio = { version = "0.3.2", features = ["time", "rt-multi-thread", "macros"] } +tokio = { version = "1.1.0", features = ["time", "rt-multi-thread", "macros"] } diff --git a/common/remote_signer_consumer/Cargo.toml b/common/remote_signer_consumer/Cargo.toml index c11c2170d34..67279715c98 100644 --- a/common/remote_signer_consumer/Cargo.toml +++ b/common/remote_signer_consumer/Cargo.toml @@ -9,7 +9,7 @@ rand = "0.7.3" remote_signer_test = { path = "../../testing/remote_signer_test" } [dependencies] -reqwest = { version = "0.10.8", features = ["json"] } +reqwest = { version = "0.11.0", features = ["json"] } serde = { version = "1.0.116", features = ["derive"] } -tokio = { version = "0.3.5", features = ["time"] } +tokio = { version = "1.1.0", features = ["time"] } types = { path = "../../consensus/types" } diff --git a/common/rest_types/Cargo.toml b/common/rest_types/Cargo.toml index 9b6b828568f..3d4c70c1c33 100644 --- a/common/rest_types/Cargo.toml +++ b/common/rest_types/Cargo.toml @@ -14,8 +14,8 @@ state_processing = { path = "../../consensus/state_processing" } bls = { path = "../../crypto/bls" } serde = { version = "1.0.110", features = ["derive"] } rayon = "1.3.0" -hyper = "0.13.5" -tokio = { version = "0.3.5", features = ["sync"] } +hyper = "0.14.4" +tokio = { version = "1.1.0", features = ["sync"] } environment = { path = "../../lighthouse/environment" } store = { path = "../../beacon_node/store" } beacon_chain = { path = "../../beacon_node/beacon_chain" } diff --git a/common/task_executor/Cargo.toml b/common/task_executor/Cargo.toml index 1c5efc67701..5f142522c52 100644 --- a/common/task_executor/Cargo.toml +++ b/common/task_executor/Cargo.toml @@ -5,10 +5,9 @@ authors = ["Sigma Prime "] edition = "2018" [dependencies] -tokio = { version = "0.3.2", features = ["rt"] } +tokio = { version = "1.1.0", features = ["rt"] } slog = "2.5.2" futures = "0.3.7" exit-future = "0.2.0" lazy_static = "1.4.0" lighthouse_metrics = { path = "../lighthouse_metrics" } -tokio-compat-02 = "0.1" diff --git a/common/task_executor/src/lib.rs b/common/task_executor/src/lib.rs index e5a263ae394..f2de8b93995 100644 --- a/common/task_executor/src/lib.rs +++ b/common/task_executor/src/lib.rs @@ -5,7 +5,6 @@ use futures::prelude::*; use slog::{debug, o, trace}; use std::sync::Weak; use tokio::runtime::Runtime; -use tokio_compat_02::FutureExt; /// A wrapper over a runtime handle which can spawn async and blocking tasks. #[derive(Clone)] @@ -63,7 +62,7 @@ impl TaskExecutor { if let Some(int_gauge) = metrics::get_int_gauge(&metrics::ASYNC_TASKS_COUNT, &[name]) { // Task is shutdown before it completes if `exit` receives let int_gauge_1 = int_gauge.clone(); - let future = future::select(Box::pin(task.compat()), exit).then(move |either| { + let future = future::select(Box::pin(task), exit).then(move |either| { match either { future::Either::Left(_) => trace!(log, "Async task completed"; "task" => name), future::Either::Right(_) => { @@ -99,12 +98,10 @@ impl TaskExecutor { ) { if let Some(int_gauge) = metrics::get_int_gauge(&metrics::ASYNC_TASKS_COUNT, &[name]) { let int_gauge_1 = int_gauge.clone(); - let future = task - .then(move |_| { - int_gauge_1.dec(); - futures::future::ready(()) - }) - .compat(); + let future = task.then(move |_| { + int_gauge_1.dec(); + futures::future::ready(()) + }); int_gauge.inc(); if let Some(runtime) = self.runtime.upgrade() { @@ -186,7 +183,7 @@ impl TaskExecutor { int_gauge.inc(); if let Some(runtime) = self.runtime.upgrade() { - Some(runtime.spawn(future.compat())) + Some(runtime.spawn(future)) } else { debug!(self.log, "Couldn't spawn task. Runtime shutting down"); None diff --git a/common/warp_utils/Cargo.toml b/common/warp_utils/Cargo.toml index 84f25d5ae03..d227f5e1e7b 100644 --- a/common/warp_utils/Cargo.toml +++ b/common/warp_utils/Cargo.toml @@ -7,14 +7,14 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -warp = { git = "https://github.com/sigp/warp ", branch = "lighthouse" } +warp = "0.3.0" eth2 = { path = "../eth2" } types = { path = "../../consensus/types" } beacon_chain = { path = "../../beacon_node/beacon_chain" } state_processing = { path = "../../consensus/state_processing" } safe_arith = { path = "../../consensus/safe_arith" } serde = { version = "1.0.116", features = ["derive"] } -tokio = { version = "0.3.2", features = ["sync"] } +tokio = { version = "1.1.0", features = ["sync"] } headers = "0.3.2" lighthouse_metrics = { path = "../lighthouse_metrics" } lazy_static = "1.4.0" diff --git a/consensus/fork_choice/tests/tests.rs b/consensus/fork_choice/tests/tests.rs index 70513177bac..32675002aab 100644 --- a/consensus/fork_choice/tests/tests.rs +++ b/consensus/fork_choice/tests/tests.rs @@ -635,12 +635,7 @@ fn invalid_block_future_slot() { |block, _| { block.slot = block.slot + 1; }, - |err| { - assert_invalid_block!( - err, - InvalidBlock::FutureSlot { .. } - ) - }, + |err| assert_invalid_block!(err, InvalidBlock::FutureSlot { .. }), ); } diff --git a/consensus/int_to_bytes/Cargo.toml b/consensus/int_to_bytes/Cargo.toml index e4f3389ba33..81fd49b4f26 100644 --- a/consensus/int_to_bytes/Cargo.toml +++ b/consensus/int_to_bytes/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Paul Hauner "] edition = "2018" [dependencies] -bytes = "0.6.0" +bytes = "1.0.1" [dev-dependencies] yaml-rust = "0.4.4" diff --git a/consensus/types/src/eth_spec.rs b/consensus/types/src/eth_spec.rs index 9eeee557f89..3cd5555a2c2 100644 --- a/consensus/types/src/eth_spec.rs +++ b/consensus/types/src/eth_spec.rs @@ -56,7 +56,7 @@ pub trait EthSpec: 'static + Default + Sync + Send + Clone + Debug + PartialEq + /* * Misc */ - type MaxValidatorsPerCommittee: Unsigned + Clone + Sync + Send + Debug + PartialEq + Eq; + type MaxValidatorsPerCommittee: Unsigned + Clone + Sync + Send + Debug + PartialEq + Eq + Unpin; /* * Time parameters */ diff --git a/lcli/Cargo.toml b/lcli/Cargo.toml index 6d5470f6465..a61fbaa8df0 100644 --- a/lcli/Cargo.toml +++ b/lcli/Cargo.toml @@ -27,7 +27,7 @@ dirs = "3.0.1" genesis = { path = "../beacon_node/genesis" } deposit_contract = { path = "../common/deposit_contract" } tree_hash = "0.1.1" -tokio = { version = "0.3.2", features = ["full"] } +tokio = { version = "1.1.0", features = ["full"] } clap_utils = { path = "../common/clap_utils" } eth2_libp2p = { path = "../beacon_node/eth2_libp2p" } validator_dir = { path = "../common/validator_dir", features = ["insecure_keys"] } @@ -37,4 +37,3 @@ lighthouse_version = { path = "../common/lighthouse_version" } directory = { path = "../common/directory" } account_utils = { path = "../common/account_utils" } eth2_wallet = { path = "../crypto/eth2_wallet" } -tokio-compat-02 = "0.1" diff --git a/lcli/src/eth1_genesis.rs b/lcli/src/eth1_genesis.rs index bd064abe68d..530295021e0 100644 --- a/lcli/src/eth1_genesis.rs +++ b/lcli/src/eth1_genesis.rs @@ -6,7 +6,6 @@ use ssz::Encode; use std::cmp::max; use std::path::PathBuf; use std::time::Duration; -use tokio_compat_02::FutureExt; use types::EthSpec; /// Interval between polling the eth1 node for genesis information. @@ -62,22 +61,19 @@ pub fn run(mut env: Environment, matches: &ArgMatches<'_>) -> Res let genesis_service = Eth1GenesisService::new(config, env.core_context().log().clone(), spec.clone()); - env.runtime().block_on( - async { - let _ = genesis_service - .wait_for_genesis_state::(ETH1_GENESIS_UPDATE_INTERVAL, spec) - .await - .map(move |genesis_state| { - eth2_network_config.genesis_state_bytes = Some(genesis_state.as_ssz_bytes()); - eth2_network_config.force_write_to_file(testnet_dir) - }) - .map_err(|e| format!("Failed to find genesis: {}", e))?; + env.runtime().block_on(async { + let _ = genesis_service + .wait_for_genesis_state::(ETH1_GENESIS_UPDATE_INTERVAL, spec) + .await + .map(move |genesis_state| { + eth2_network_config.genesis_state_bytes = Some(genesis_state.as_ssz_bytes()); + eth2_network_config.force_write_to_file(testnet_dir) + }) + .map_err(|e| format!("Failed to find genesis: {}", e))?; - info!("Starting service to produce genesis BeaconState from eth1"); - info!("Connecting to eth1 http endpoints: {:?}", endpoints); + info!("Starting service to produce genesis BeaconState from eth1"); + info!("Connecting to eth1 http endpoints: {:?}", endpoints); - Ok(()) - } - .compat(), - ) + Ok(()) + }) } diff --git a/lighthouse/Cargo.toml b/lighthouse/Cargo.toml index 4e0f05e4b50..d2ec5bb39f9 100644 --- a/lighthouse/Cargo.toml +++ b/lighthouse/Cargo.toml @@ -20,7 +20,7 @@ spec-v12 = [] [dependencies] beacon_node = { "path" = "../beacon_node" } -tokio = "0.3.2" +tokio = "1.1.0" slog = { version = "2.5.2", features = ["max_level_trace"] } sloggers = "1.0.1" types = { "path" = "../consensus/types" } @@ -41,7 +41,6 @@ directory = { path = "../common/directory" } lighthouse_version = { path = "../common/lighthouse_version" } account_utils = { path = "../common/account_utils" } remote_signer = { "path" = "../remote_signer" } -tokio-compat-02 = "0.1" [dev-dependencies] tempfile = "3.1.0" diff --git a/lighthouse/environment/Cargo.toml b/lighthouse/environment/Cargo.toml index 9260b9cfd4c..6e0556a6d2d 100644 --- a/lighthouse/environment/Cargo.toml +++ b/lighthouse/environment/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Paul Hauner "] edition = "2018" [dependencies] -tokio = { version = "0.3.2", features = ["macros", "rt", "rt-multi-thread" ] } +tokio = { version = "1.1.0", features = ["macros", "rt", "rt-multi-thread" ] } slog = { version = "2.5.2", features = ["max_level_trace"] } sloggers = "1.0.1" types = { "path" = "../../consensus/types" } diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index a3344d124a4..53f3f2c1058 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -7,7 +7,6 @@ use lighthouse_version::VERSION; use slog::{crit, info, warn}; use std::path::PathBuf; use std::process::exit; -use tokio_compat_02::FutureExt; use types::{EthSpec, EthSpecId}; use validator_client::ProductionValidatorClient; @@ -281,19 +280,16 @@ fn run( &context.eth2_config().spec, context.log().clone(), )?; - environment.runtime().spawn( - async move { - if let Err(e) = ProductionBeaconNode::new(context.clone(), config).await { - crit!(log, "Failed to start beacon node"; "reason" => e); - // Ignore the error since it always occurs during normal operation when - // shutting down. - let _ = executor - .shutdown_sender() - .try_send("Failed to start beacon node"); - } + environment.runtime().spawn(async move { + if let Err(e) = ProductionBeaconNode::new(context.clone(), config).await { + crit!(log, "Failed to start beacon node"; "reason" => e); + // Ignore the error since it always occurs during normal operation when + // shutting down. + let _ = executor + .shutdown_sender() + .try_send("Failed to start beacon node"); } - .compat(), - ); + }); } ("validator_client", Some(matches)) => { let context = environment.core_context(); @@ -301,26 +297,23 @@ fn run( let executor = context.executor.clone(); let config = validator_client::Config::from_cli(&matches, context.log()) .map_err(|e| format!("Unable to initialize validator config: {}", e))?; - environment.runtime().spawn( - async move { - let run = async { - ProductionValidatorClient::new(context, config) - .await? - .start_service()?; + environment.runtime().spawn(async move { + let run = async { + ProductionValidatorClient::new(context, config) + .await? + .start_service()?; - Ok::<(), String>(()) - }; - if let Err(e) = run.await { - crit!(log, "Failed to start validator client"; "reason" => e); - // Ignore the error since it always occurs during normal operation when - // shutting down. - let _ = executor - .shutdown_sender() - .try_send("Failed to start validator client"); - } + Ok::<(), String>(()) + }; + if let Err(e) = run.await { + crit!(log, "Failed to start validator client"; "reason" => e); + // Ignore the error since it always occurs during normal operation when + // shutting down. + let _ = executor + .shutdown_sender() + .try_send("Failed to start validator client"); } - .compat(), - ); + }); } ("remote_signer", Some(matches)) => { if let Err(e) = remote_signer::run(&mut environment, matches) { diff --git a/remote_signer/client/Cargo.toml b/remote_signer/client/Cargo.toml index dac014790e3..7b6b3f24782 100644 --- a/remote_signer/client/Cargo.toml +++ b/remote_signer/client/Cargo.toml @@ -9,7 +9,7 @@ clap = "2.33.3" client_backend = { path = "../backend", package = "remote_signer_backend" } environment = { path = "../../lighthouse/environment" } futures = "0.3.6" -hyper = "0.13.8" +hyper = "0.14.4" lazy_static = "1.4.0" regex = "1.3.9" serde = { version = "1.0.116", features = ["derive"] } diff --git a/slasher/service/Cargo.toml b/slasher/service/Cargo.toml index 0326734f831..ddc32119603 100644 --- a/slasher/service/Cargo.toml +++ b/slasher/service/Cargo.toml @@ -14,5 +14,6 @@ slog = "2.5.2" slot_clock = { path = "../../common/slot_clock" } state_processing = { path = "../../consensus/state_processing" } task_executor = { path = "../../common/task_executor" } -tokio = { version = "0.3.5", features = ["full"] } +tokio = { version = "1.1.0", features = ["full"] } +tokio-stream = "0.1.2" types = { path = "../../consensus/types" } diff --git a/slasher/service/src/service.rs b/slasher/service/src/service.rs index 18ca063ecff..96a157adc7f 100644 --- a/slasher/service/src/service.rs +++ b/slasher/service/src/service.rs @@ -19,7 +19,6 @@ use state_processing::{ use std::sync::mpsc::{sync_channel, Receiver, SyncSender, TrySendError}; use std::sync::Arc; use task_executor::TaskExecutor; -use tokio::stream::StreamExt; use tokio::sync::mpsc::UnboundedSender; use tokio::time::{interval_at, Duration, Instant}; use types::{AttesterSlashing, Epoch, EthSpec, ProposerSlashing}; @@ -83,7 +82,8 @@ impl SlasherService { // https://github.com/sigp/lighthouse/issues/1861 let mut interval = interval_at(Instant::now(), Duration::from_secs(update_period)); - while interval.next().await.is_some() { + loop { + interval.tick().await; if let Some(current_slot) = beacon_chain.slot_clock.now() { let current_epoch = current_slot.epoch(T::EthSpec::slots_per_epoch()); if let Err(TrySendError::Disconnected(_)) = notif_sender.try_send(current_epoch) { diff --git a/testing/eth1_test_rig/Cargo.toml b/testing/eth1_test_rig/Cargo.toml index 49188c4697a..7f0ad6daf9f 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] -tokio = { version = "0.3.2", features = ["time"] } +tokio = { version = "1.1.0", features = ["time"] } tokio-compat-02 = "0.1" web3 = "0.14.0" futures = "0.3.7" diff --git a/testing/node_test_rig/Cargo.toml b/testing/node_test_rig/Cargo.toml index 93eb8a2301d..0a7fd1a98cf 100644 --- a/testing/node_test_rig/Cargo.toml +++ b/testing/node_test_rig/Cargo.toml @@ -10,7 +10,7 @@ beacon_node = { path = "../../beacon_node" } types = { path = "../../consensus/types" } eth2_config = { path = "../../common/eth2_config" } tempfile = "3.1.0" -reqwest = { version = "0.10.8", features = ["native-tls-vendored"] } +reqwest = { version = "0.11.0", features = ["native-tls-vendored"] } url = "2.1.1" serde = "1.0.116" futures = "0.3.7" diff --git a/testing/remote_signer_test/Cargo.toml b/testing/remote_signer_test/Cargo.toml index f0f795262e4..08dd0b5387f 100644 --- a/testing/remote_signer_test/Cargo.toml +++ b/testing/remote_signer_test/Cargo.toml @@ -11,10 +11,9 @@ hex = "0.4.2" httpmock = "0.5.1" remote_signer_client = { path = "../../remote_signer/client" } remote_signer_consumer = { path = "../../common/remote_signer_consumer" } -reqwest = { version = "0.10.8", features = ["blocking", "json"] } +reqwest = { version = "0.11.0", features = ["blocking", "json"] } serde = { version = "1.0.116", features = ["derive"] } serde_json = "1.0.58" tempfile = "3.1.0" -tokio = { version = "0.3.5", features = ["time"] } +tokio = { version = "1.1.0", features = ["time"] } types = { path = "../../consensus/types" } -tokio-compat-02 = "0.1" diff --git a/testing/remote_signer_test/src/api_test_signer.rs b/testing/remote_signer_test/src/api_test_signer.rs index 68d1f6a3859..8c9b6dc44b0 100644 --- a/testing/remote_signer_test/src/api_test_signer.rs +++ b/testing/remote_signer_test/src/api_test_signer.rs @@ -26,10 +26,7 @@ impl ApiTestSigner { let client = environment .runtime() - .block_on(tokio_compat_02::FutureExt::compat(Client::new( - runtime_context, - &matches, - ))) + .block_on(Client::new(runtime_context, &matches)) .map_err(|e| format!("Failed to init Rest API: {}", e)) .unwrap(); diff --git a/testing/remote_signer_test/src/consumer.rs b/testing/remote_signer_test/src/consumer.rs index 83f828691fa..cdca7cecae9 100644 --- a/testing/remote_signer_test/src/consumer.rs +++ b/testing/remote_signer_test/src/consumer.rs @@ -30,13 +30,13 @@ pub fn do_sign_request( ) -> Result { let runtime = Builder::new_multi_thread().enable_all().build().unwrap(); - runtime.block_on(tokio_compat_02::FutureExt::compat(test_client.sign( + runtime.block_on(test_client.sign( &test_input.public_key, test_input.bls_domain, test_input.data, test_input.fork, test_input.genesis_validators_root, - ))) + )) } #[derive(Serialize)] diff --git a/testing/simulator/Cargo.toml b/testing/simulator/Cargo.toml index 491a801cff9..549520c5a0a 100644 --- a/testing/simulator/Cargo.toml +++ b/testing/simulator/Cargo.toml @@ -13,9 +13,8 @@ types = { path = "../../consensus/types" } validator_client = { path = "../../validator_client" } parking_lot = "0.11.0" futures = "0.3.7" -tokio = "0.3.2" +tokio = "1.1.0" eth1_test_rig = { path = "../eth1_test_rig" } env_logger = "0.8.2" clap = "2.33.3" rayon = "1.4.1" -tokio-compat-02 = "0.1" diff --git a/testing/simulator/src/eth1_sim.rs b/testing/simulator/src/eth1_sim.rs index 9d4f40011b3..2172aebcbce 100644 --- a/testing/simulator/src/eth1_sim.rs +++ b/testing/simulator/src/eth1_sim.rs @@ -90,7 +90,8 @@ pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> { // Start a timer that produces eth1 blocks on an interval. tokio::spawn(async move { let mut interval = tokio::time::interval(eth1_block_time); - while interval.next().await.is_some() { + loop { + interval.tick().await; let _ = ganache.evm_mine().await; } }); @@ -219,9 +220,7 @@ pub fn run_eth1_sim(matches: &ArgMatches) -> Result<(), String> { Ok::<(), String>(()) }; - env.runtime() - .block_on(tokio_compat_02::FutureExt::compat(main_future)) - .unwrap(); + env.runtime().block_on(main_future).unwrap(); env.fire_signal(); env.shutdown_on_idle(); diff --git a/testing/simulator/src/no_eth1_sim.rs b/testing/simulator/src/no_eth1_sim.rs index c20c1261191..48b9c318bcc 100644 --- a/testing/simulator/src/no_eth1_sim.rs +++ b/testing/simulator/src/no_eth1_sim.rs @@ -158,9 +158,7 @@ pub fn run_no_eth1_sim(matches: &ArgMatches) -> Result<(), String> { Ok::<(), String>(()) }; - env.runtime() - .block_on(tokio_compat_02::FutureExt::compat(main_future)) - .unwrap(); + env.runtime().block_on(main_future).unwrap(); env.fire_signal(); env.shutdown_on_idle(); diff --git a/testing/simulator/src/sync_sim.rs b/testing/simulator/src/sync_sim.rs index db2140c5123..9da52a35c99 100644 --- a/testing/simulator/src/sync_sim.rs +++ b/testing/simulator/src/sync_sim.rs @@ -130,9 +130,7 @@ fn syncing_sim( Ok::<(), String>(()) }; - env.runtime() - .block_on(tokio_compat_02::FutureExt::compat(main_future)) - .unwrap(); + env.runtime().block_on(main_future).unwrap(); env.fire_signal(); env.shutdown_on_idle(); @@ -217,7 +215,8 @@ pub async fn verify_one_node_sync( // limited to at most `sync_timeout` epochs let mut interval = tokio::time::interval(epoch_duration); let mut count = 0; - while interval.next().await.is_some() { + loop { + interval.tick().await; if count >= sync_timeout || !check_still_syncing(&network_c).await? { break; } @@ -254,7 +253,8 @@ pub async fn verify_two_nodes_sync( // limited to at most `sync_timeout` epochs let mut interval = tokio::time::interval(epoch_duration); let mut count = 0; - while interval.next().await.is_some() { + loop { + interval.tick().await; if count >= sync_timeout || !check_still_syncing(&network_c).await? { break; } @@ -302,7 +302,8 @@ pub async fn verify_in_between_sync( // limited to at most `sync_timeout` epochs let mut interval = tokio::time::interval(epoch_duration); let mut count = 0; - while interval.next().await.is_some() { + loop { + interval.tick().await; if count >= sync_timeout || !check_still_syncing(&network_c).await? { break; } diff --git a/validator_client/Cargo.toml b/validator_client/Cargo.toml index bea10631f86..cb4ae2e2345 100644 --- a/validator_client/Cargo.toml +++ b/validator_client/Cargo.toml @@ -9,9 +9,8 @@ name = "validator_client" path = "src/lib.rs" [dev-dependencies] -tokio = { version = "0.3.2", features = ["time", "rt-multi-thread", "macros"] } +tokio = { version = "1.1.0", features = ["time", "rt-multi-thread", "macros"] } deposit_contract = { path = "../common/deposit_contract" } -tokio-compat-02 = "0.1" [dependencies] eth2_ssz = "0.1.2" @@ -30,7 +29,7 @@ serde_yaml = "0.8.13" slog = { version = "2.5.2", features = ["max_level_trace", "release_max_level_trace"] } slog-async = "2.5.0" slog-term = "2.6.0" -tokio = { version = "0.3.2", features = ["time"] } +tokio = { version = "1.1.0", features = ["time"] } futures = "0.3.7" dirs = "3.0.1" directory = { path = "../common/directory" } @@ -53,8 +52,8 @@ eth2_keystore = { path = "../crypto/eth2_keystore" } account_utils = { path = "../common/account_utils" } lighthouse_version = { path = "../common/lighthouse_version" } warp_utils = { path = "../common/warp_utils" } -warp = { git = "https://github.com/sigp/warp ", branch = "lighthouse" } -hyper = "0.13.8" +warp = "0.3.0" +hyper = "0.14.4" serde_utils = { path = "../consensus/serde_utils" } libsecp256k1 = "0.3.5" ring = "0.16.19" diff --git a/validator_client/src/attestation_service.rs b/validator_client/src/attestation_service.rs index 4fae5b8d685..97d2496b17c 100644 --- a/validator_client/src/attestation_service.rs +++ b/validator_client/src/attestation_service.rs @@ -6,7 +6,6 @@ use crate::{ }; use environment::RuntimeContext; use futures::future::FutureExt; -use futures::StreamExt; use slog::{crit, error, info, trace}; use slot_clock::SlotClock; use std::collections::HashMap; @@ -149,7 +148,8 @@ impl AttestationService { let executor = self.context.executor.clone(); let interval_fut = async move { - while interval.next().await.is_some() { + loop { + interval.tick().await; let log = self.context.log(); if let Err(e) = self.spawn_attestation_tasks(slot_duration) { diff --git a/validator_client/src/duties_service.rs b/validator_client/src/duties_service.rs index 0554ce3492e..0c69a0c2504 100644 --- a/validator_client/src/duties_service.rs +++ b/validator_client/src/duties_service.rs @@ -5,7 +5,7 @@ use crate::{ }; use environment::RuntimeContext; use futures::channel::mpsc::Sender; -use futures::{SinkExt, StreamExt}; +use futures::SinkExt; use parking_lot::RwLock; use slog::{debug, error, trace, warn}; use slot_clock::SlotClock; @@ -490,7 +490,8 @@ impl DutiesService { let executor = self.inner.context.executor.clone(); let interval_fut = async move { - while interval.next().await.is_some() { + loop { + interval.tick().await; self.clone().do_update(&mut block_service_tx, &spec).await; } }; diff --git a/validator_client/src/fork_service.rs b/validator_client/src/fork_service.rs index 0787fa80f8a..2a9bf78efc5 100644 --- a/validator_client/src/fork_service.rs +++ b/validator_client/src/fork_service.rs @@ -3,7 +3,6 @@ use crate::http_metrics::metrics; use environment::RuntimeContext; use eth2::types::StateId; use futures::future::FutureExt; -use futures::StreamExt; use parking_lot::RwLock; use slog::Logger; use slog::{debug, trace}; @@ -164,7 +163,8 @@ impl ForkService { let executor = context.executor.clone(); let interval_fut = async move { - while interval.next().await.is_some() { + loop { + interval.tick().await; self.clone().do_update().await.ok(); } }; diff --git a/validator_client/src/http_api/tests.rs b/validator_client/src/http_api/tests.rs index ce0a1ef6903..f9ebec71a0e 100644 --- a/validator_client/src/http_api/tests.rs +++ b/validator_client/src/http_api/tests.rs @@ -25,7 +25,6 @@ use std::sync::Arc; use tempfile::{tempdir, TempDir}; use tokio::runtime::Runtime; use tokio::sync::oneshot; -use tokio_compat_02::FutureExt; const PASSWORD_BYTES: &[u8] = &[42, 50, 37]; @@ -439,141 +438,126 @@ struct KeystoreValidatorScenario { fn invalid_pubkey() { let runtime = build_runtime(); let weak_runtime = Arc::downgrade(&runtime); - runtime.block_on( - async { - ApiTester::new(weak_runtime) - .await - .invalidate_api_token() - .test_get_lighthouse_version_invalid() - .await; - } - .compat(), - ); + runtime.block_on(async { + ApiTester::new(weak_runtime) + .await + .invalidate_api_token() + .test_get_lighthouse_version_invalid() + .await; + }); } #[test] fn simple_getters() { let runtime = build_runtime(); let weak_runtime = Arc::downgrade(&runtime); - runtime.block_on( - async { - ApiTester::new(weak_runtime) - .await - .test_get_lighthouse_version() - .await - .test_get_lighthouse_health() - .await - .test_get_lighthouse_spec() - .await; - } - .compat(), - ); + runtime.block_on(async { + ApiTester::new(weak_runtime) + .await + .test_get_lighthouse_version() + .await + .test_get_lighthouse_health() + .await + .test_get_lighthouse_spec() + .await; + }); } #[test] fn hd_validator_creation() { let runtime = build_runtime(); let weak_runtime = Arc::downgrade(&runtime); - runtime.block_on( - async { - ApiTester::new(weak_runtime) - .await - .assert_enabled_validators_count(0) - .assert_validators_count(0) - .create_hd_validators(HdValidatorScenario { - count: 2, - specify_mnemonic: true, - key_derivation_path_offset: 0, - disabled: vec![], - }) - .await - .assert_enabled_validators_count(2) - .assert_validators_count(2) - .create_hd_validators(HdValidatorScenario { - count: 1, - specify_mnemonic: false, - key_derivation_path_offset: 0, - disabled: vec![0], - }) - .await - .assert_enabled_validators_count(2) - .assert_validators_count(3) - .create_hd_validators(HdValidatorScenario { - count: 0, - specify_mnemonic: true, - key_derivation_path_offset: 4, - disabled: vec![], - }) - .await - .assert_enabled_validators_count(2) - .assert_validators_count(3); - } - .compat(), - ); + runtime.block_on(async { + ApiTester::new(weak_runtime) + .await + .assert_enabled_validators_count(0) + .assert_validators_count(0) + .create_hd_validators(HdValidatorScenario { + count: 2, + specify_mnemonic: true, + key_derivation_path_offset: 0, + disabled: vec![], + }) + .await + .assert_enabled_validators_count(2) + .assert_validators_count(2) + .create_hd_validators(HdValidatorScenario { + count: 1, + specify_mnemonic: false, + key_derivation_path_offset: 0, + disabled: vec![0], + }) + .await + .assert_enabled_validators_count(2) + .assert_validators_count(3) + .create_hd_validators(HdValidatorScenario { + count: 0, + specify_mnemonic: true, + key_derivation_path_offset: 4, + disabled: vec![], + }) + .await + .assert_enabled_validators_count(2) + .assert_validators_count(3); + }); } #[test] fn validator_enabling() { let runtime = build_runtime(); let weak_runtime = Arc::downgrade(&runtime); - runtime.block_on( - async { - ApiTester::new(weak_runtime) - .await - .create_hd_validators(HdValidatorScenario { - count: 2, - specify_mnemonic: false, - key_derivation_path_offset: 0, - disabled: vec![], - }) - .await - .assert_enabled_validators_count(2) - .assert_validators_count(2) - .set_validator_enabled(0, false) - .await - .assert_enabled_validators_count(1) - .assert_validators_count(2) - .set_validator_enabled(0, true) - .await - .assert_enabled_validators_count(2) - .assert_validators_count(2); - } - .compat(), - ); + runtime.block_on(async { + ApiTester::new(weak_runtime) + .await + .create_hd_validators(HdValidatorScenario { + count: 2, + specify_mnemonic: false, + key_derivation_path_offset: 0, + disabled: vec![], + }) + .await + .assert_enabled_validators_count(2) + .assert_validators_count(2) + .set_validator_enabled(0, false) + .await + .assert_enabled_validators_count(1) + .assert_validators_count(2) + .set_validator_enabled(0, true) + .await + .assert_enabled_validators_count(2) + .assert_validators_count(2); + }); } #[test] fn keystore_validator_creation() { let runtime = build_runtime(); let weak_runtime = Arc::downgrade(&runtime); - runtime.block_on( - async { - ApiTester::new(weak_runtime) - .await - .assert_enabled_validators_count(0) - .assert_validators_count(0) - .create_keystore_validators(KeystoreValidatorScenario { - correct_password: true, - enabled: true, - }) - .await - .assert_enabled_validators_count(1) - .assert_validators_count(1) - .create_keystore_validators(KeystoreValidatorScenario { - correct_password: false, - enabled: true, - }) - .await - .assert_enabled_validators_count(1) - .assert_validators_count(1) - .create_keystore_validators(KeystoreValidatorScenario { - correct_password: true, - enabled: false, - }) - .await - .assert_enabled_validators_count(1) - .assert_validators_count(2); - } - .compat(), - ); + runtime.block_on(async { + ApiTester::new(weak_runtime) + .await + .assert_enabled_validators_count(0) + .assert_validators_count(0) + .create_keystore_validators(KeystoreValidatorScenario { + correct_password: true, + enabled: true, + }) + .await + .assert_enabled_validators_count(1) + .assert_validators_count(1) + .create_keystore_validators(KeystoreValidatorScenario { + correct_password: false, + enabled: true, + }) + .await + .assert_enabled_validators_count(1) + .assert_validators_count(1) + .create_keystore_validators(KeystoreValidatorScenario { + correct_password: true, + enabled: false, + }) + .await + .assert_enabled_validators_count(1) + .assert_validators_count(2); + }); } diff --git a/validator_client/src/notifier.rs b/validator_client/src/notifier.rs index 2dd77312ea3..beaa5b69767 100644 --- a/validator_client/src/notifier.rs +++ b/validator_client/src/notifier.rs @@ -1,5 +1,4 @@ use crate::ProductionValidatorClient; -use futures::StreamExt; use slog::{error, info}; use slot_clock::SlotClock; use tokio::time::{interval_at, Duration, Instant}; @@ -24,7 +23,8 @@ pub fn spawn_notifier(client: &ProductionValidatorClient) -> Resu let interval_fut = async move { let log = context.log(); - while interval.next().await.is_some() { + loop { + interval.tick().await; let num_available = duties_service.beacon_nodes.num_available().await; let num_synced = duties_service.beacon_nodes.num_synced().await; let num_total = duties_service.beacon_nodes.num_total().await;