From 82753f842df8fea3ac40cdc60ad6efeabda2ada7 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Wed, 9 Dec 2020 01:34:58 +0000 Subject: [PATCH] Improve compile time (#1989) ## Issue Addressed Closes #1264 ## Proposed Changes * Milagro BLS: tweak the feature flags so that Milagro doesn't get compiled if we're using BLST. Profiling showed that it was consuming about 1 minute of CPU time out of 60 minutes of CPU time (real time ~15 mins). A 1.6% saving. * Reduce monomorphization: compiling for 3 different `EthSpec` types causes a heck of a lot of generic functions to be instantiated (monomorphized). Removing 2 of 3 cuts the LLVM+linking step from around 250 seconds to 180 seconds, a saving of 70 seconds (real time!). This applies only to `make` and not the CI build, because we test with the minimal spec on CI. * Update `web3` crate to v0.13. This is perhaps the most controversial change, because it requires axing some deposit contract tools from `lcli`. I suspect these tools weren't used much anyway, and could be maintained separately, but I'm also happy to revert this change. However, it does save us a lot of compile time. With #1839, we now have 3 versions of Tokio (and all of Tokio's deps). This change brings us down to 2 versions, but 1 should be achievable once web3 (and reqwest) move to Tokio 0.3. * Remove `lcli` from the Docker image. It's a dev tool and can be built from the repo if required. --- Cargo.lock | 1048 +++++--------------------- Dockerfile | 2 - account_manager/Cargo.toml | 2 +- beacon_node/eth1/Cargo.toml | 4 +- beacon_node/eth1/tests/test.rs | 1 - beacon_node/genesis/tests/tests.rs | 1 - crypto/bls/Cargo.toml | 4 +- crypto/bls/src/impls/mod.rs | 1 + crypto/bls/src/lib.rs | 4 + crypto/bls/tests/tests.rs | 2 +- lcli/Cargo.toml | 3 +- lcli/src/deploy_deposit_contract.rs | 71 -- lcli/src/main.rs | 166 ++-- lcli/src/refund_deposit_contract.rs | 47 -- lighthouse/Cargo.toml | 4 + lighthouse/src/main.rs | 19 +- testing/eth1_test_rig/Cargo.toml | 5 +- testing/eth1_test_rig/src/ganache.rs | 12 +- testing/eth1_test_rig/src/lib.rs | 2 +- validator_client/Cargo.toml | 2 +- 20 files changed, 286 insertions(+), 1114 deletions(-) delete mode 100644 lcli/src/deploy_deposit_contract.rs delete mode 100644 lcli/src/refund_deposit_contract.rs diff --git a/Cargo.lock b/Cargo.lock index 8b85792aa..f01d43344 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -346,7 +346,7 @@ dependencies = [ "fastrand", "futures-lite", "libc", - "log 0.4.11", + "log", "nb-connect", "once_cell", "parking", @@ -365,6 +365,18 @@ dependencies = [ "event-listener", ] +[[package]] +name = "async-native-tls" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9e7a929bd34c68a82d58a4de7f86fffdaf97fb2af850162a7bb19dd7269b33" +dependencies = [ + "async-std", + "native-tls", + "thiserror", + "url", +] + [[package]] name = "async-std" version = "1.7.0" @@ -382,13 +394,13 @@ dependencies = [ "futures-lite", "gloo-timers", "kv-log-macro", - "log 0.4.11", + "log", "memchr", "num_cpus", "once_cell", "pin-project-lite 0.1.11", "pin-utils", - "slab 0.4.2", + "slab", "wasm-bindgen-futures", ] @@ -444,8 +456,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf13118df3e3dce4b5ac930641343b91b656e4e72c8f8325838b01a4b1c9d45" dependencies = [ "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11", - "url 2.2.0", + "log", + "url", ] [[package]] @@ -491,16 +503,6 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" -[[package]] -name = "base64" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -dependencies = [ - "byteorder", - "safemem", -] - [[package]] name = "base64" version = "0.12.3" @@ -548,12 +550,12 @@ dependencies = [ "itertools 0.9.0", "lazy_static", "lighthouse_metrics", - "log 0.4.11", + "log", "lru", "maplit", "merkle_proof", "operation_pool", - "parking_lot 0.11.1", + "parking_lot", "proto_array", "rand 0.7.3", "rand_core 0.5.1", @@ -568,7 +570,7 @@ dependencies = [ "slog", "sloggers", "slot_clock", - "smallvec 1.5.0", + "smallvec", "state_processing", "store", "task_executor", @@ -640,12 +642,6 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" -[[package]] -name = "bitflags" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" - [[package]] name = "bitflags" version = "1.2.1" @@ -820,7 +816,7 @@ dependencies = [ "eth2_ssz", "futures 0.3.8", "hex", - "log 0.4.11", + "log", "logging", "slog", "slog-async", @@ -890,17 +886,6 @@ version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "either", - "iovec", -] - [[package]] name = "bytes" version = "0.5.6" @@ -951,7 +936,7 @@ dependencies = [ "ethereum-types", "quickcheck", "quickcheck_macros", - "smallvec 1.5.0", + "smallvec", "tree_hash", ] @@ -1035,7 +1020,7 @@ checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" dependencies = [ "ansi_term 0.11.0", "atty", - "bitflags 1.2.1", + "bitflags", "strsim 0.8.0", "textwrap", "unicode-width", @@ -1074,7 +1059,7 @@ dependencies = [ "lazy_static", "lighthouse_metrics", "network", - "parking_lot 0.11.1", + "parking_lot", "prometheus", "reqwest", "serde", @@ -1093,7 +1078,7 @@ dependencies = [ "toml", "tree_hash", "types", - "url 2.2.0", + "url", ] [[package]] @@ -1102,7 +1087,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags 1.2.1", + "bitflags", ] [[package]] @@ -1111,7 +1096,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" dependencies = [ - "bitflags 1.2.1", + "bitflags", ] [[package]] @@ -1273,17 +1258,6 @@ dependencies = [ "crossbeam-utils 0.8.1", ] -[[package]] -name = "crossbeam-deque" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" -dependencies = [ - "crossbeam-epoch 0.8.2", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - [[package]] name = "crossbeam-deque" version = "0.8.0" @@ -1291,25 +1265,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" dependencies = [ "cfg-if 1.0.0", - "crossbeam-epoch 0.9.1", + "crossbeam-epoch", "crossbeam-utils 0.8.1", ] -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg 1.0.1", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "lazy_static", - "maybe-uninit", - "memoffset 0.5.6", - "scopeguard", -] - [[package]] name = "crossbeam-epoch" version = "0.9.1" @@ -1320,21 +1279,10 @@ dependencies = [ "const_fn", "crossbeam-utils 0.8.1", "lazy_static", - "memoffset 0.6.1", + "memoffset", "scopeguard", ] -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - [[package]] name = "crossbeam-utils" version = "0.7.2" @@ -1674,11 +1622,11 @@ dependencies = [ "libp2p-core 0.23.1", "lru_time_cache", "multihash 0.11.4", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "rlp", "sha2 0.9.2", - "smallvec 1.5.0", + "smallvec", "tokio 0.3.5", "tokio-util 0.5.1", "tracing", @@ -1791,7 +1739,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7402b94a93c24e742487327a7cd839dc9d36fec9de9fb25b09f2dae459f36c3" dependencies = [ - "log 0.4.11", + "log", ] [[package]] @@ -1814,7 +1762,7 @@ dependencies = [ "ed25519-dalek", "hex", "k256", - "log 0.4.11", + "log", "rand 0.7.3", "rlp", "serde", @@ -1828,7 +1776,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" dependencies = [ - "log 0.4.11", + "log", "regex", ] @@ -1840,7 +1788,7 @@ checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e" dependencies = [ "atty", "humantime", - "log 0.4.11", + "log", "regex", "termcolor", ] @@ -1855,7 +1803,7 @@ dependencies = [ "exit-future", "futures 0.3.8", "logging", - "parking_lot 0.11.1", + "parking_lot", "slog", "slog-async", "slog-json", @@ -1873,7 +1821,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" dependencies = [ "backtrace", - "version_check 0.9.2", + "version_check", ] [[package]] @@ -1893,7 +1841,7 @@ dependencies = [ "libflate", "lighthouse_metrics", "merkle_proof", - "parking_lot 0.11.1", + "parking_lot", "reqwest", "serde", "serde_json", @@ -1917,6 +1865,7 @@ dependencies = [ "futures 0.3.8", "serde_json", "tokio 0.3.5", + "tokio-compat-02", "types", "web3", ] @@ -2040,7 +1989,7 @@ dependencies = [ "lighthouse_metrics", "lighthouse_version", "lru", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "regex", "serde", @@ -2049,7 +1998,7 @@ dependencies = [ "slog", "slog-async", "slog-term", - "smallvec 1.5.0", + "smallvec", "snap", "task_executor", "tempdir", @@ -2082,7 +2031,7 @@ version = "0.1.2" dependencies = [ "eth2_ssz_derive", "ethereum-types", - "smallvec 1.5.0", + "smallvec", ] [[package]] @@ -2334,7 +2283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" dependencies = [ "matches", - "percent-encoding 2.1.0", + "percent-encoding", ] [[package]] @@ -2359,7 +2308,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" dependencies = [ - "bitflags 1.2.1", + "bitflags", "fuchsia-zircon-sys", ] @@ -2412,16 +2361,6 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" -[[package]] -name = "futures-cpupool" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -dependencies = [ - "futures 0.1.30", - "num_cpus", -] - [[package]] name = "futures-executor" version = "0.3.8" @@ -2494,7 +2433,6 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" dependencies = [ - "futures 0.1.30", "futures-channel", "futures-core", "futures-io", @@ -2506,7 +2444,7 @@ dependencies = [ "pin-utils", "proc-macro-hack", "proc-macro-nested", - "slab 0.4.2", + "slab", ] [[package]] @@ -2529,7 +2467,7 @@ checksum = "8cdc09201b2e8ca1b19290cf7e65de2246b8e91fb6874279722189c4de7b94dc" dependencies = [ "cc", "libc", - "log 0.4.11", + "log", "rustc_version", "winapi 0.3.9", ] @@ -2550,7 +2488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" dependencies = [ "typenum", - "version_check 0.9.2", + "version_check", ] [[package]] @@ -2566,7 +2504,7 @@ dependencies = [ "futures 0.3.8", "int_to_bytes", "merkle_proof", - "parking_lot 0.11.1", + "parking_lot", "rayon", "serde", "serde_derive", @@ -2656,24 +2594,6 @@ dependencies = [ "subtle 2.3.0", ] -[[package]] -name = "h2" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -dependencies = [ - "byteorder", - "bytes 0.4.12", - "fnv", - "futures 0.1.30", - "http 0.1.21", - "indexmap", - "log 0.4.11", - "slab 0.4.2", - "string", - "tokio-io", -] - [[package]] name = "h2" version = "0.2.7" @@ -2687,7 +2607,7 @@ dependencies = [ "futures-util", "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap", - "slab 0.4.2", + "slab", "tokio 0.2.23", "tokio-util 0.3.1", "tracing", @@ -2706,7 +2626,7 @@ dependencies = [ "futures-util", "http 0.2.1 (git+https://github.com/agemanning/http?branch=lighthouse)", "indexmap", - "slab 0.4.2", + "slab", "tokio 0.3.5", "tokio-util 0.5.1", "tracing", @@ -2753,11 +2673,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed18eb2459bf1a09ad2d6b1547840c3e5e62882fa09b9a6a20b1de8e3228848f" dependencies = [ "base64 0.12.3", - "bitflags 1.2.1", + "bitflags", "bytes 0.5.6", "headers-core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.16", + "mime", "sha-1 0.8.2", "time 0.1.44", ] @@ -2768,11 +2688,11 @@ version = "0.3.2" source = "git+https://github.com/blacktemplar/headers?branch=lighthouse#8bffbd8aa2e170745a81e62fc0d7e98c0a23a69a" dependencies = [ "base64 0.13.0", - "bitflags 1.2.1", + "bitflags", "bytes 0.6.0", "headers-core 0.2.0 (git+https://github.com/blacktemplar/headers?branch=lighthouse)", "http 0.2.1 (git+https://github.com/agemanning/http?branch=lighthouse)", - "mime 0.3.16", + "mime", "sha-1 0.8.2", "time 0.1.44", ] @@ -2885,17 +2805,6 @@ dependencies = [ "hmac 0.7.1", ] -[[package]] -name = "http" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" -dependencies = [ - "bytes 0.4.12", - "fnv", - "itoa", -] - [[package]] name = "http" version = "0.2.1" @@ -2917,18 +2826,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.30", - "http 0.1.21", - "tokio-buf", -] - [[package]] name = "http-body" version = "0.3.1" @@ -2967,7 +2864,7 @@ dependencies = [ "lighthouse_metrics", "lighthouse_version", "network", - "parking_lot 0.11.1", + "parking_lot", "serde", "slog", "slot_clock", @@ -3034,7 +2931,7 @@ dependencies = [ "isahc", "lazy_static", "levenshtein", - "log 0.4.11", + "log", "puddle", "qstring", "regex", @@ -3050,55 +2947,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a" -[[package]] -name = "hyper" -version = "0.10.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" -dependencies = [ - "base64 0.9.3", - "httparse", - "language-tags", - "log 0.3.9", - "mime 0.2.6", - "num_cpus", - "time 0.1.44", - "traitobject", - "typeable", - "unicase 1.4.2", - "url 1.7.2", -] - -[[package]] -name = "hyper" -version = "0.12.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.30", - "futures-cpupool", - "h2 0.1.26", - "http 0.1.21", - "http-body 0.1.0", - "httparse", - "iovec", - "itoa", - "log 0.4.11", - "net2", - "rustc_version", - "time 0.1.44", - "tokio 0.1.22", - "tokio-buf", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer 0.2.13", - "want 0.2.0", -] - [[package]] name = "hyper" version = "0.13.9" @@ -3120,7 +2968,7 @@ dependencies = [ "tokio 0.2.23", "tower-service", "tracing", - "want 0.3.0", + "want", ] [[package]] @@ -3143,20 +2991,7 @@ dependencies = [ "tokio 0.3.5", "tower-service", "tracing", - "want 0.3.0", -] - -[[package]] -name = "hyper-tls" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.30", - "hyper 0.12.35", - "native-tls", - "tokio-io", + "want", ] [[package]] @@ -3169,18 +3004,7 @@ dependencies = [ "hyper 0.13.9", "native-tls", "tokio 0.2.23", - "tokio-tls 0.3.1", -] - -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", + "tokio-tls", ] [[package]] @@ -3222,9 +3046,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fd32c880165b2f776af0b38d206d1cabaebcf46c166ac6ae004a5d45f7d48ef" dependencies = [ "attohttpc", - "log 0.4.11", + "log", "rand 0.7.3", - "url 2.2.0", + "url", "xmltree", ] @@ -3330,14 +3154,14 @@ dependencies = [ "flume", "futures-lite", "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.11", - "mime 0.3.16", + "log", + "mime", "once_cell", - "slab 0.4.2", + "slab", "sluice", "tracing", "tracing-futures", - "url 2.2.0", + "url", "waker-fn", ] @@ -3381,7 +3205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0747307121ffb9703afd93afbd0fb4f854c38fb873f2c8b90e0e902f27c7b62" dependencies = [ "futures 0.1.30", - "log 0.4.11", + "log", "serde", "serde_derive", "serde_json", @@ -3421,7 +3245,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" dependencies = [ - "log 0.4.11", + "log", ] [[package]] @@ -3455,12 +3279,6 @@ version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6771161eff561647fad8bb7e745e002c304864fb8f436b52b30acda51fca4408" -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - [[package]] name = "lazy_static" version = "1.4.0" @@ -3489,7 +3307,7 @@ dependencies = [ "genesis", "hex", "lighthouse_version", - "log 0.4.11", + "log", "rand 0.7.3", "regex", "serde", @@ -3501,7 +3319,6 @@ dependencies = [ "tree_hash", "types", "validator_dir", - "web3", ] [[package]] @@ -3593,9 +3410,9 @@ dependencies = [ "libp2p-websocket", "libp2p-yamux", "parity-multiaddr 0.9.6 (git+https://github.com/sigp/rust-libp2p?rev=e3caf9e0e5e78c9d51c6dccf0d6277cef553bb25)", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.2", - "smallvec 1.5.0", + "smallvec", "wasm-timer", ] @@ -3614,11 +3431,11 @@ dependencies = [ "futures-timer", "lazy_static", "libsecp256k1", - "log 0.4.11", + "log", "multihash 0.11.4", "multistream-select 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multiaddr 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.2", "prost", "prost-build", @@ -3626,7 +3443,7 @@ dependencies = [ "ring", "rw-stream-sink", "sha2 0.9.2", - "smallvec 1.5.0", + "smallvec", "thiserror", "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "void", @@ -3648,11 +3465,11 @@ dependencies = [ "futures-timer", "lazy_static", "libsecp256k1", - "log 0.4.11", + "log", "multihash 0.13.2", "multistream-select 0.8.5 (git+https://github.com/sigp/rust-libp2p?rev=e3caf9e0e5e78c9d51c6dccf0d6277cef553bb25)", "parity-multiaddr 0.9.6 (git+https://github.com/sigp/rust-libp2p?rev=e3caf9e0e5e78c9d51c6dccf0d6277cef553bb25)", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.2", "prost", "prost-build", @@ -3660,7 +3477,7 @@ dependencies = [ "ring", "rw-stream-sink", "sha2 0.9.2", - "smallvec 1.5.0", + "smallvec", "thiserror", "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "void", @@ -3683,7 +3500,7 @@ source = "git+https://github.com/sigp/rust-libp2p?rev=e3caf9e0e5e78c9d51c6dccf0d dependencies = [ "futures 0.3.8", "libp2p-core 0.25.0", - "log 0.4.11", + "log", ] [[package]] @@ -3700,12 +3517,12 @@ dependencies = [ "hex_fmt", "libp2p-core 0.25.0", "libp2p-swarm", - "log 0.4.11", + "log", "prost", "prost-build", "rand 0.7.3", "sha2 0.9.2", - "smallvec 1.5.0", + "smallvec", "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-timer", ] @@ -3718,10 +3535,10 @@ dependencies = [ "futures 0.3.8", "libp2p-core 0.25.0", "libp2p-swarm", - "log 0.4.11", + "log", "prost", "prost-build", - "smallvec 1.5.0", + "smallvec", "wasm-timer", ] @@ -3734,11 +3551,11 @@ dependencies = [ "futures 0.3.8", "futures_codec", "libp2p-core 0.25.0", - "log 0.4.11", + "log", "nohash-hasher", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", - "smallvec 1.5.0", + "smallvec", "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3752,7 +3569,7 @@ dependencies = [ "futures 0.3.8", "lazy_static", "libp2p-core 0.25.0", - "log 0.4.11", + "log", "prost", "prost-build", "rand 0.7.3", @@ -3771,9 +3588,9 @@ dependencies = [ "either", "futures 0.3.8", "libp2p-core 0.25.0", - "log 0.4.11", + "log", "rand 0.7.3", - "smallvec 1.5.0", + "smallvec", "void", "wasm-timer", ] @@ -3788,7 +3605,7 @@ dependencies = [ "if-addrs", "ipnet", "libp2p-core 0.25.0", - "log 0.4.11", + "log", "socket2", "tokio 0.3.5", ] @@ -3802,12 +3619,12 @@ dependencies = [ "either", "futures 0.3.8", "libp2p-core 0.25.0", - "log 0.4.11", + "log", "quicksink", "rustls", "rw-stream-sink", "soketto", - "url 2.2.0", + "url", "webpki", "webpki-roots", ] @@ -3819,7 +3636,7 @@ source = "git+https://github.com/sigp/rust-libp2p?rev=e3caf9e0e5e78c9d51c6dccf0d dependencies = [ "futures 0.3.8", "libp2p-core 0.25.0", - "parking_lot 0.11.1", + "parking_lot", "thiserror", "yamux", ] @@ -3923,7 +3740,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b0908efb5d6496aa977d96f91413da2635a902e5e31dbef0bfb88986c248539" dependencies = [ - "bitflags 1.2.1", + "bitflags", "libc", "lmdb-sys", ] @@ -3939,15 +3756,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.2" @@ -3965,15 +3773,6 @@ dependencies = [ "tempdir", ] -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -dependencies = [ - "log 0.4.11", -] - [[package]] name = "log" version = "0.4.11" @@ -4001,7 +3800,7 @@ checksum = "a0e8460f2f2121162705187214720353c517b97bdfb3494c0b1e33d83ebe4bed" dependencies = [ "cfg-if 0.1.10", "generator", - "scoped-tls 1.0.0", + "scoped-tls", "serde", "serde_json", ] @@ -4070,15 +3869,6 @@ version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" -[[package]] -name = "memoffset" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg 1.0.1", -] - [[package]] name = "memoffset" version = "0.6.1" @@ -4112,15 +3902,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "mime" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" -dependencies = [ - "log 0.3.9", -] - [[package]] name = "mime" version = "0.3.16" @@ -4133,8 +3914,8 @@ version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" dependencies = [ - "mime 0.3.16", - "unicase 2.6.0", + "mime", + "unicase", ] [[package]] @@ -4168,10 +3949,10 @@ dependencies = [ "iovec", "kernel32-sys", "libc", - "log 0.4.11", + "log", "miow 0.2.2", "net2", - "slab 0.4.2", + "slab", "winapi 0.2.8", ] @@ -4182,23 +3963,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f33bc887064ef1fd66020c9adfc45bb9f33d75a42096c81e7c56c65b75dd1a8b" dependencies = [ "libc", - "log 0.4.11", + "log", "miow 0.3.6", "ntapi", "winapi 0.3.9", ] -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio 0.6.23", -] - [[package]] name = "miow" version = "0.2.2" @@ -4277,8 +4047,8 @@ checksum = "8209c33c951f07387a8497841122fc6f712165e3f9bda3e6be4645b58188f676" dependencies = [ "buf_redux", "httparse", - "log 0.4.11", - "mime 0.3.16", + "log", + "mime", "mime_guess", "quick-error", "rand 0.6.5", @@ -4295,9 +4065,9 @@ checksum = "93faf2e41f9ee62fb01680ed48f3cc26652352327aa2e59869070358f6b7dd75" dependencies = [ "bytes 0.5.6", "futures 0.3.8", - "log 0.4.11", + "log", "pin-project 1.0.2", - "smallvec 1.5.0", + "smallvec", "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4308,9 +4078,9 @@ source = "git+https://github.com/sigp/rust-libp2p?rev=e3caf9e0e5e78c9d51c6dccf0d dependencies = [ "bytes 0.5.6", "futures 0.3.8", - "log 0.4.11", + "log", "pin-project 1.0.2", - "smallvec 1.5.0", + "smallvec", "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4322,7 +4092,7 @@ checksum = "6fcc7939b5edc4e4f86b1b4a04bb1498afaaf871b1a6691838ed06fcb48d3a3f" dependencies = [ "lazy_static", "libc", - "log 0.4.11", + "log", "openssl", "openssl-probe", "openssl-sys", @@ -4377,7 +4147,7 @@ dependencies = [ "lru_cache", "matches", "num_cpus", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "rlp", "slog", @@ -4385,7 +4155,7 @@ dependencies = [ "slog-term", "sloggers", "slot_clock", - "smallvec 1.5.0", + "smallvec", "state_processing", "store", "task_executor", @@ -4407,7 +4177,7 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" dependencies = [ - "bitflags 1.2.1", + "bitflags", "cc", "cfg-if 0.1.10", "libc", @@ -4420,7 +4190,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" dependencies = [ - "bitflags 1.2.1", + "bitflags", "cc", "cfg-if 0.1.10", "libc", @@ -4440,7 +4210,7 @@ dependencies = [ "serde", "tempdir", "types", - "url 2.2.0", + "url", "validator_client", "validator_dir", ] @@ -4492,7 +4262,7 @@ dependencies = [ "num-traits", "rand 0.7.3", "serde", - "smallvec 1.5.0", + "smallvec", "zeroize", ] @@ -4548,7 +4318,7 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" dependencies = [ - "parking_lot 0.11.1", + "parking_lot", ] [[package]] @@ -4575,7 +4345,7 @@ version = "0.10.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" dependencies = [ - "bitflags 1.2.1", + "bitflags", "cfg-if 0.1.10", "foreign-types", "lazy_static", @@ -4619,7 +4389,7 @@ dependencies = [ "eth2_ssz", "eth2_ssz_derive", "int_to_bytes", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "serde", "serde_derive", @@ -4639,11 +4409,11 @@ dependencies = [ "byteorder", "data-encoding", "multihash 0.11.4", - "percent-encoding 2.1.0", + "percent-encoding", "serde", "static_assertions", "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0", + "url", ] [[package]] @@ -4656,11 +4426,11 @@ dependencies = [ "byteorder", "data-encoding", "multihash 0.13.2", - "percent-encoding 2.1.0", + "percent-encoding", "serde", "static_assertions", "unsigned-varint 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.2.0", + "url", ] [[package]] @@ -4681,27 +4451,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.6.2", - "rustc_version", -] - -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - [[package]] name = "parking_lot" version = "0.11.1" @@ -4709,37 +4458,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", - "lock_api 0.4.2", - "parking_lot_core 0.8.0", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi 0.0.3", - "libc", - "redox_syscall", - "rustc_version", - "smallvec 0.6.13", - "winapi 0.3.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi 0.0.3", - "libc", - "redox_syscall", - "smallvec 1.5.0", - "winapi 0.3.9", + "lock_api", + "parking_lot_core", ] [[package]] @@ -4753,7 +4473,7 @@ dependencies = [ "instant", "libc", "redox_syscall", - "smallvec 1.5.0", + "smallvec", "winapi 0.3.9", ] @@ -4775,12 +4495,6 @@ dependencies = [ "crypto-mac 0.10.0", ] -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "percent-encoding" version = "2.1.0" @@ -4896,7 +4610,7 @@ checksum = "a2a7bc6b2a29e632e45451c941832803a18cce6781db04de8a04696cdca8bde4" dependencies = [ "cfg-if 0.1.10", "libc", - "log 0.4.11", + "log", "wepoll-sys", "winapi 0.3.9", ] @@ -4964,7 +4678,7 @@ dependencies = [ "proc-macro2", "quote", "syn", - "version_check 0.9.2", + "version_check", ] [[package]] @@ -4975,7 +4689,7 @@ checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "version_check 0.9.2", + "version_check", ] [[package]] @@ -5020,7 +4734,7 @@ dependencies = [ "cfg-if 1.0.0", "fnv", "lazy_static", - "parking_lot 0.11.1", + "parking_lot", "protobuf", "regex", "thiserror", @@ -5045,7 +4759,7 @@ dependencies = [ "bytes 0.5.6", "heck", "itertools 0.8.2", - "log 0.4.11", + "log", "multimap", "petgraph", "prost", @@ -5129,7 +4843,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" dependencies = [ - "percent-encoding 2.1.0", + "percent-encoding", ] [[package]] @@ -5145,7 +4859,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f" dependencies = [ "env_logger 0.7.1", - "log 0.4.11", + "log", "rand 0.7.3", "rand_core 0.5.1", ] @@ -5187,8 +4901,8 @@ version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" dependencies = [ - "log 0.4.11", - "parking_lot 0.11.1", + "log", + "parking_lot", "scheduled-thread-pool", ] @@ -5233,19 +4947,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "rand" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" -dependencies = [ - "cloudabi 0.0.3", - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "winapi 0.3.9", -] - [[package]] name = "rand" version = "0.6.5" @@ -5409,7 +5110,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" dependencies = [ "autocfg 1.0.1", - "crossbeam-deque 0.8.0", + "crossbeam-deque", "either", "rayon-core", ] @@ -5421,7 +5122,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" dependencies = [ "crossbeam-channel 0.5.0", - "crossbeam-deque 0.8.0", + "crossbeam-deque", "crossbeam-utils 0.8.1", "lazy_static", "num_cpus", @@ -5584,22 +5285,22 @@ dependencies = [ "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.13.9", - "hyper-tls 0.4.3", + "hyper-tls", "ipnet", "js-sys", "lazy_static", - "log 0.4.11", - "mime 0.3.16", + "log", + "mime", "mime_guess", "native-tls", - "percent-encoding 2.1.0", + "percent-encoding", "pin-project-lite 0.2.0", "serde", "serde_json", "serde_urlencoded", "tokio 0.2.23", - "tokio-tls 0.3.1", - "url 2.2.0", + "tokio-tls", + "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-bindgen-test", @@ -5653,13 +5354,13 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e3d4791ab5517217f51216a84a688b53c1ebf7988736469c538d02f46ddba68" dependencies = [ - "bitflags 1.2.1", + "bitflags", "fallible-iterator", "fallible-streaming-iterator", "hashlink", "libsqlite3-sys", "memchr", - "smallvec 1.5.0", + "smallvec", ] [[package]] @@ -5708,7 +5409,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" dependencies = [ "base64 0.12.3", - "log 0.4.11", + "log", "ring", "sct", "webpki", @@ -5775,15 +5476,9 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" dependencies = [ - "parking_lot 0.11.1", + "parking_lot", ] -[[package]] -name = "scoped-tls" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" - [[package]] name = "scoped-tls" version = "1.0.0" @@ -5842,7 +5537,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" dependencies = [ - "bitflags 1.2.1", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -6076,7 +5771,7 @@ dependencies = [ "atty", "chrono", "colored", - "log 0.4.11", + "log", "winapi 0.3.9", ] @@ -6090,7 +5785,7 @@ dependencies = [ "eth1_test_rig", "futures 0.3.8", "node_test_rig", - "parking_lot 0.11.1", + "parking_lot", "rayon", "tokio 0.3.5", "tokio-compat-02", @@ -6104,12 +5799,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7" -[[package]] -name = "slab" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" - [[package]] name = "slab" version = "0.4.2" @@ -6131,7 +5820,7 @@ dependencies = [ "lmdb", "lmdb-sys", "maplit", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "rayon", "safe_arith", @@ -6152,7 +5841,7 @@ dependencies = [ name = "slashing_protection" version = "0.1.0" dependencies = [ - "parking_lot 0.11.1", + "parking_lot", "r2d2", "r2d2_sqlite", "rayon", @@ -6223,7 +5912,7 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8228ab7302adbf4fcb37e66f3cda78003feb521e7fd9e3847ec117a7784d0f5a" dependencies = [ - "log 0.4.11", + "log", "slog", "slog-scope", ] @@ -6266,7 +5955,7 @@ version = "0.2.0" dependencies = [ "lazy_static", "lighthouse_metrics", - "parking_lot 0.11.1", + "parking_lot", "types", ] @@ -6281,15 +5970,6 @@ dependencies = [ "futures-io", ] -[[package]] -name = "smallvec" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" -dependencies = [ - "maybe-uninit", -] - [[package]] name = "smallvec" version = "1.5.0" @@ -6343,7 +6023,7 @@ dependencies = [ "flate2", "futures 0.3.8", "httparse", - "log 0.4.11", + "log", "rand 0.7.3", "sha-1 0.9.2", ] @@ -6360,7 +6040,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e529d73e80d64b5f2631f9035113347c578a1c9c7774b83a2b880788459ab36" dependencies = [ - "lock_api 0.4.2", + "lock_api", ] [[package]] @@ -6369,7 +6049,7 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf906c8b8fc3f6ecd1046e01da1d8ddec83e48c8b08b84dcc02b585a6bedf5a8" dependencies = [ - "version_check 0.9.2", + "version_check", ] [[package]] @@ -6387,7 +6067,7 @@ dependencies = [ "integer-sqrt", "itertools 0.9.0", "lazy_static", - "log 0.4.11", + "log", "merkle_proof", "rayon", "safe_arith", @@ -6477,7 +6157,7 @@ dependencies = [ "leveldb", "lighthouse_metrics", "lru", - "parking_lot 0.11.1", + "parking_lot", "rayon", "serde", "serde_derive", @@ -6499,15 +6179,6 @@ dependencies = [ "generic-array 0.14.4", ] -[[package]] -name = "string" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -dependencies = [ - "bytes 0.4.12", -] - [[package]] name = "string_cache" version = "0.8.1" @@ -6739,7 +6410,7 @@ dependencies = [ "standback", "stdweb", "time-macros", - "version_check 0.9.2", + "version_check", "winapi 0.3.9", ] @@ -6772,7 +6443,7 @@ version = "0.2.0" dependencies = [ "beacon_chain", "futures 0.3.8", - "parking_lot 0.11.1", + "parking_lot", "slog", "slot_clock", "task_executor", @@ -6841,30 +6512,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" -[[package]] -name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.30", - "mio 0.6.23", - "num_cpus", - "tokio-codec", - "tokio-current-thread", - "tokio-executor", - "tokio-fs", - "tokio-io", - "tokio-reactor", - "tokio-sync", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer 0.2.13", - "tokio-udp", - "tokio-uds 0.2.7", -] - [[package]] name = "tokio" version = "0.2.23" @@ -6880,7 +6527,7 @@ dependencies = [ "mio 0.6.23", "num_cpus", "pin-project-lite 0.1.11", - "slab 0.4.2", + "slab", "tokio-macros 0.2.6", ] @@ -6898,36 +6545,14 @@ dependencies = [ "memchr", "mio 0.7.6", "num_cpus", - "parking_lot 0.11.1", + "parking_lot", "pin-project-lite 0.2.0", "signal-hook-registry", - "slab 0.4.2", + "slab", "tokio-macros 0.3.1", "winapi 0.3.9", ] -[[package]] -name = "tokio-buf" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -dependencies = [ - "bytes 0.4.12", - "either", - "futures 0.1.30", -] - -[[package]] -name = "tokio-codec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.30", - "tokio-io", -] - [[package]] name = "tokio-compat-02" version = "0.1.2" @@ -6941,67 +6566,6 @@ dependencies = [ "tokio 0.3.5", ] -[[package]] -name = "tokio-core" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.30", - "iovec", - "log 0.4.11", - "mio 0.6.23", - "scoped-tls 0.1.2", - "tokio 0.1.22", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-timer 0.2.13", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -dependencies = [ - "futures 0.1.30", - "tokio-executor", -] - -[[package]] -name = "tokio-executor" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.30", -] - -[[package]] -name = "tokio-fs" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" -dependencies = [ - "futures 0.1.30", - "tokio-io", - "tokio-threadpool", -] - -[[package]] -name = "tokio-io" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.30", - "log 0.4.11", -] - [[package]] name = "tokio-io-timeout" version = "0.5.0" @@ -7033,99 +6597,6 @@ dependencies = [ "syn", ] -[[package]] -name = "tokio-reactor" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.30", - "lazy_static", - "log 0.4.11", - "mio 0.6.23", - "num_cpus", - "parking_lot 0.9.0", - "slab 0.4.2", - "tokio-executor", - "tokio-io", - "tokio-sync", -] - -[[package]] -name = "tokio-sync" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -dependencies = [ - "fnv", - "futures 0.1.30", -] - -[[package]] -name = "tokio-tcp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.30", - "iovec", - "mio 0.6.23", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-threadpool" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" -dependencies = [ - "crossbeam-deque 0.7.3", - "crossbeam-queue", - "crossbeam-utils 0.7.2", - "futures 0.1.30", - "lazy_static", - "log 0.4.11", - "num_cpus", - "slab 0.4.2", - "tokio-executor", -] - -[[package]] -name = "tokio-timer" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6131e780037787ff1b3f8aad9da83bca02438b72277850dd6ad0d455e0e20efc" -dependencies = [ - "futures 0.1.30", - "slab 0.3.0", -] - -[[package]] -name = "tokio-timer" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.30", - "slab 0.4.2", - "tokio-executor", -] - -[[package]] -name = "tokio-tls" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" -dependencies = [ - "futures 0.1.30", - "native-tls", - "tokio-io", -] - [[package]] name = "tokio-tls" version = "0.3.1" @@ -7143,62 +6614,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0381c1e6e08908317cee104781ca48afe03f37cc857792b85f01f9828fb55ba3" dependencies = [ "futures-util", - "log 0.4.11", + "log", "pin-project 1.0.2", "tokio 0.3.5", "tungstenite", ] -[[package]] -name = "tokio-udp" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.30", - "log 0.4.11", - "mio 0.6.23", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-uds" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ae5d255ce739e8537221ed2942e0445f4b3b813daebac1c0050ddaaa3587f9" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.30", - "iovec", - "libc", - "log 0.3.9", - "mio 0.6.23", - "mio-uds", - "tokio-core", - "tokio-io", -] - -[[package]] -name = "tokio-uds" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.30", - "iovec", - "libc", - "log 0.4.11", - "mio 0.6.23", - "mio-uds", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - [[package]] name = "tokio-util" version = "0.3.1" @@ -7208,7 +6629,7 @@ dependencies = [ "bytes 0.5.6", "futures-core", "futures-sink", - "log 0.4.11", + "log", "pin-project-lite 0.1.11", "tokio 0.2.23", ] @@ -7223,9 +6644,9 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "log 0.4.11", + "log", "pin-project-lite 0.1.11", - "slab 0.4.2", + "slab", "tokio 0.3.5", ] @@ -7238,9 +6659,9 @@ dependencies = [ "bytes 0.6.0", "futures-core", "futures-sink", - "log 0.4.11", + "log", "pin-project-lite 0.2.0", - "slab 0.4.2", + "slab", "tokio 0.3.5", ] @@ -7266,7 +6687,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" dependencies = [ "cfg-if 1.0.0", - "log 0.4.11", + "log", "pin-project-lite 0.2.0", "tracing-attributes", "tracing-core", @@ -7309,7 +6730,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e0f8c7178e13481ff6765bd169b33e8d554c5d2bbede5e32c356194be02b9b9" dependencies = [ "lazy_static", - "log 0.4.11", + "log", "tracing-core", ] @@ -7337,7 +6758,7 @@ dependencies = [ "serde", "serde_json", "sharded-slab", - "smallvec 1.5.0", + "smallvec", "thread_local", "tracing", "tracing-core", @@ -7364,12 +6785,6 @@ dependencies = [ "syn", ] -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" - [[package]] name = "tree_hash" version = "0.1.1" @@ -7379,7 +6794,7 @@ dependencies = [ "ethereum-types", "lazy_static", "rand 0.7.3", - "smallvec 1.5.0", + "smallvec", "tree_hash_derive", "types", ] @@ -7410,10 +6825,10 @@ dependencies = [ "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "httparse", "input_buffer", - "log 0.4.11", + "log", "rand 0.7.3", "sha-1 0.9.2", - "url 2.2.0", + "url", "utf-8", ] @@ -7426,12 +6841,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" - [[package]] name = "typenum" version = "1.12.0" @@ -7458,7 +6867,7 @@ dependencies = [ "hex", "int_to_bytes", "lazy_static", - "log 0.4.11", + "log", "merkle_proof", "rand 0.7.3", "rand_xorshift 0.2.0", @@ -7498,22 +6907,13 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccb97dac3243214f8d8507998906ca3e2e0b900bf9bf4870477f125b82e68f6e" -[[package]] -name = "unicase" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -dependencies = [ - "version_check 0.1.5", -] - [[package]] name = "unicase" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check 0.9.2", + "version_check", ] [[package]] @@ -7587,17 +6987,6 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.2.0" @@ -7605,9 +6994,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" dependencies = [ "form_urlencoded", - "idna 0.2.0", + "idna", "matches", - "percent-encoding 2.1.0", + "percent-encoding", ] [[package]] @@ -7656,7 +7045,7 @@ dependencies = [ "lighthouse_version", "lockfile", "logging", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "rayon", "ring", @@ -7718,12 +7107,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - [[package]] name = "version_check" version = "0.9.2" @@ -7753,24 +7136,13 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "want" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" -dependencies = [ - "futures 0.1.30", - "log 0.4.11", - "try-lock", -] - [[package]] name = "want" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.11", + "log", "try-lock", ] @@ -7784,13 +7156,13 @@ dependencies = [ "headers 0.3.2 (git+https://github.com/blacktemplar/headers?branch=lighthouse)", "http 0.2.1 (git+https://github.com/agemanning/http?branch=lighthouse)", "hyper 0.14.0-dev", - "log 0.4.11", - "mime 0.3.16", + "log", + "mime", "mime_guess", "multipart", - "percent-encoding 2.1.0", + "percent-encoding", "pin-project 1.0.2", - "scoped-tls 1.0.0", + "scoped-tls", "serde", "serde_json", "serde_urlencoded", @@ -7850,7 +7222,7 @@ checksum = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" dependencies = [ "bumpalo", "lazy_static", - "log 0.4.11", + "log", "proc-macro2", "quote", "syn", @@ -7906,7 +7278,7 @@ checksum = "0355fa0c1f9b792a09b6dcb6a8be24d51e71e6d74972f9eb4a44c4c004d24a25" dependencies = [ "console_error_panic_hook", "js-sys", - "scoped-tls 1.0.0", + "scoped-tls", "wasm-bindgen", "wasm-bindgen-futures", "wasm-bindgen-test-macro", @@ -7930,7 +7302,7 @@ checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ "futures 0.3.8", "js-sys", - "parking_lot 0.11.1", + "parking_lot", "pin-utils", "wasm-bindgen", "wasm-bindgen-futures", @@ -7949,35 +7321,33 @@ dependencies = [ [[package]] name = "web3" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a681e8d15deced7c510db88c59133d2eafa7b6298b6e91b545e2a3fed93b3fe" +checksum = "50d03f64be59921dbc5791f05af61a87594bb454518fe4e97d827405422279a0" dependencies = [ "arrayvec", + "async-native-tls", + "async-std", "base64 0.12.3", "derive_more", "ethabi", "ethereum-types", - "futures 0.1.30", - "hyper 0.12.35", - "hyper-tls 0.3.2", + "futures 0.3.8", + "futures-timer", + "hyper 0.13.9", + "hyper-tls", "jsonrpc-core", - "log 0.4.11", + "log", "native-tls", - "parking_lot 0.10.2", + "parking_lot", "rlp", "rustc-hex", "secp256k1", "serde", "serde_json", + "soketto", "tiny-keccak 2.0.2", - "tokio-core", - "tokio-io", - "tokio-timer 0.1.2", - "tokio-uds 0.1.7", - "url 2.2.0", - "websocket", - "zeroize", + "url", ] [[package]] @@ -7999,28 +7369,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "websocket" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9faed2bff8af2ea6b9f8b917d3d00b467583f6781fe3def174a9e33c879703" -dependencies = [ - "base64 0.9.3", - "bitflags 0.9.1", - "byteorder", - "bytes 0.4.12", - "futures 0.1.30", - "hyper 0.10.16", - "native-tls", - "rand 0.5.6", - "sha1", - "tokio-core", - "tokio-io", - "tokio-tls 0.2.1", - "unicase 1.4.2", - "url 1.7.2", -] - [[package]] name = "wepoll-sys" version = "3.0.1" @@ -8149,9 +7497,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aeb8c4043cac71c3c299dff107171c220d179492350ea198e109a414981b83c" dependencies = [ "futures 0.3.8", - "log 0.4.11", + "log", "nohash-hasher", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "static_assertions", ] diff --git a/Dockerfile b/Dockerfile index 52cbdbca2..2d7bca06a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,6 @@ COPY . lighthouse ARG PORTABLE ENV PORTABLE $PORTABLE RUN cd lighthouse && make -RUN cd lighthouse && make install-lcli FROM debian:buster-slim RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -13,4 +12,3 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* COPY --from=builder /usr/local/cargo/bin/lighthouse /usr/local/bin/lighthouse -COPY --from=builder /usr/local/cargo/bin/lcli /usr/local/bin/lcli diff --git a/account_manager/Cargo.toml b/account_manager/Cargo.toml index e2ed1b95e..24eef147d 100644 --- a/account_manager/Cargo.toml +++ b/account_manager/Cargo.toml @@ -20,7 +20,7 @@ eth2_ssz_derive = "0.1.0" hex = "0.4.2" rayon = "1.4.1" eth2_network_config = { path = "../common/eth2_network_config" } -futures = { version = "0.3.7", features = ["compat"] } +futures = "0.3.7" clap_utils = { path = "../common/clap_utils" } directory = { path = "../common/directory" } eth2_wallet = { path = "../crypto/eth2_wallet" } diff --git a/beacon_node/eth1/Cargo.toml b/beacon_node/eth1/Cargo.toml index 8b3f76ac7..2244ccf5b 100644 --- a/beacon_node/eth1/Cargo.toml +++ b/beacon_node/eth1/Cargo.toml @@ -7,14 +7,14 @@ edition = "2018" [dev-dependencies] eth1_test_rig = { path = "../../testing/eth1_test_rig" } toml = "0.5.6" -web3 = "0.11.0" +web3 = "0.13.0" sloggers = "1.0.1" environment = { path = "../../lighthouse/environment" } tokio-compat-02 = "0.1" [dependencies] reqwest = { version = "0.10.8", features = ["native-tls-vendored"] } -futures = { version = "0.3.7", features = ["compat"] } +futures = "0.3.7" serde_json = "1.0.58" serde = { version = "1.0.116", features = ["derive"] } hex = "0.4.2" diff --git a/beacon_node/eth1/tests/test.rs b/beacon_node/eth1/tests/test.rs index ce542d482..db9b79f8e 100644 --- a/beacon_node/eth1/tests/test.rs +++ b/beacon_node/eth1/tests/test.rs @@ -4,7 +4,6 @@ use eth1::http::{get_deposit_count, get_deposit_logs_in_range, get_deposit_root, use eth1::{Config, Service}; use eth1::{DepositCache, DEFAULT_CHAIN_ID, DEFAULT_NETWORK_ID}; use eth1_test_rig::GanacheEth1Instance; -use futures::compat::Future01CompatExt; use merkle_proof::verify_merkle_proof; use slog::Logger; use sloggers::{null::NullLoggerBuilder, Build}; diff --git a/beacon_node/genesis/tests/tests.rs b/beacon_node/genesis/tests/tests.rs index f32366861..c5fd21928 100644 --- a/beacon_node/genesis/tests/tests.rs +++ b/beacon_node/genesis/tests/tests.rs @@ -6,7 +6,6 @@ use environment::{Environment, EnvironmentBuilder}; use eth1::{DEFAULT_CHAIN_ID, DEFAULT_NETWORK_ID}; use eth1_test_rig::{DelayThenDeposit, GanacheEth1Instance}; -use futures::compat::Future01CompatExt; use genesis::{Eth1Config, Eth1GenesisService}; use state_processing::is_valid_genesis_state; use std::time::Duration; diff --git a/crypto/bls/Cargo.toml b/crypto/bls/Cargo.toml index 422bb20c3..4006b714b 100644 --- a/crypto/bls/Cargo.toml +++ b/crypto/bls/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] eth2_ssz = "0.1.2" tree_hash = "0.1.1" -milagro_bls = { git = "https://github.com/sigp/milagro_bls", tag = "v1.4.0" } +milagro_bls = { git = "https://github.com/sigp/milagro_bls", tag = "v1.4.0", optional = true } rand = "0.7.3" serde = "1.0.116" serde_derive = "1.0.116" @@ -22,7 +22,7 @@ blst = "0.3.2" [features] default = ["supranational"] fake_crypto = [] -milagro = [] +milagro = ["milagro_bls"] supranational = [] supranational-portable = ["supranational", "blst/portable"] supranational-force-adx = ["supranational", "blst/force-adx"] diff --git a/crypto/bls/src/impls/mod.rs b/crypto/bls/src/impls/mod.rs index 1bcac20a5..7a99798be 100644 --- a/crypto/bls/src/impls/mod.rs +++ b/crypto/bls/src/impls/mod.rs @@ -1,3 +1,4 @@ pub mod blst; pub mod fake_crypto; +#[cfg(feature = "milagro")] pub mod milagro; diff --git a/crypto/bls/src/lib.rs b/crypto/bls/src/lib.rs index 40a120fba..5aaa4f8c8 100644 --- a/crypto/bls/src/lib.rs +++ b/crypto/bls/src/lib.rs @@ -42,6 +42,7 @@ pub use get_withdrawal_credentials::get_withdrawal_credentials; pub use zeroize_hash::ZeroizeHash; use blst::BLST_ERROR as BlstError; +#[cfg(feature = "milagro")] use milagro_bls::AmclError; pub type Hash256 = ethereum_types::H256; @@ -49,6 +50,7 @@ pub type Hash256 = ethereum_types::H256; #[derive(Clone, Debug, PartialEq)] pub enum Error { /// An error was raised from the Milagro BLS library. + #[cfg(feature = "milagro")] MilagroError(AmclError), /// An error was raised from the Supranational BLST BLS library. BlstError(BlstError), @@ -62,6 +64,7 @@ pub enum Error { InvalidZeroSecretKey, } +#[cfg(feature = "milagro")] impl From for Error { fn from(e: AmclError) -> Error { Error::MilagroError(e) @@ -122,6 +125,7 @@ macro_rules! define_mod { }; } +#[cfg(feature = "milagro")] define_mod!(milagro_implementations, crate::impls::milagro::types); define_mod!(blst_implementations, crate::impls::blst::types); #[cfg(feature = "fake_crypto")] diff --git a/crypto/bls/tests/tests.rs b/crypto/bls/tests/tests.rs index 872049414..3289f0ab2 100644 --- a/crypto/bls/tests/tests.rs +++ b/crypto/bls/tests/tests.rs @@ -498,7 +498,7 @@ mod blst { test_suite!(blst_implementations); } -#[cfg(not(debug_assertions))] +#[cfg(all(feature = "milagro", not(debug_assertions)))] mod milagro { test_suite!(milagro_implementations); } diff --git a/lcli/Cargo.toml b/lcli/Cargo.toml index 7b021ddb1..2e8a7de9b 100644 --- a/lcli/Cargo.toml +++ b/lcli/Cargo.toml @@ -20,9 +20,8 @@ types = { path = "../consensus/types" } state_processing = { path = "../consensus/state_processing" } eth2_ssz = "0.1.2" regex = "1.3.9" -futures = { version = "0.3.7", features = ["compat"] } +futures = "0.3.7" environment = { path = "../lighthouse/environment" } -web3 = "0.11.0" eth2_network_config = { path = "../common/eth2_network_config" } dirs = "3.0.1" genesis = { path = "../beacon_node/genesis" } diff --git a/lcli/src/deploy_deposit_contract.rs b/lcli/src/deploy_deposit_contract.rs deleted file mode 100644 index 33a385fb0..000000000 --- a/lcli/src/deploy_deposit_contract.rs +++ /dev/null @@ -1,71 +0,0 @@ -use clap::ArgMatches; -use deposit_contract::{ - testnet::{ABI, BYTECODE}, - CONTRACT_DEPLOY_GAS, -}; -use environment::Environment; -use futures::compat::Future01CompatExt; -use std::path::PathBuf; -use tokio_compat_02::FutureExt; -use types::EthSpec; -use web3::{ - contract::{Contract, Options}, - transports::Ipc, - types::{Address, U256}, - Web3, -}; - -pub fn run(env: Environment, matches: &ArgMatches<'_>) -> Result<(), String> { - let eth1_ipc_path: PathBuf = clap_utils::parse_required(matches, "eth1-ipc")?; - let from_address: Address = clap_utils::parse_required(matches, "from-address")?; - let confirmations: usize = clap_utils::parse_required(matches, "confirmations")?; - - let (_event_loop_handle, transport) = - Ipc::new(eth1_ipc_path).map_err(|e| format!("Unable to connect to eth1 IPC: {:?}", e))?; - let web3 = Web3::new(transport); - - let bytecode = String::from_utf8(BYTECODE.to_vec()).map_err(|e| { - format!( - "Unable to parse deposit contract bytecode as utf-8: {:?}", - e - ) - })?; - - env.runtime().block_on( - async { - // It's unlikely that this will be the _actual_ deployment block, however it'll be close - // enough to serve our purposes. - // - // We only need the deposit block to put a lower bound on the block number we need to search - // for deposit logs. - let deploy_block = web3 - .eth() - .block_number() - .compat() - .await - .map_err(|e| format!("Failed to get block number: {}", e))?; - - let pending_contract = Contract::deploy(web3.eth(), &ABI) - .map_err(|e| format!("Unable to build contract deployer: {:?}", e))? - .confirmations(confirmations) - .options(Options { - gas: Some(U256::from(CONTRACT_DEPLOY_GAS)), - ..Options::default() - }) - .execute(bytecode, (), from_address) - .map_err(|e| format!("Unable to execute deployment: {:?}", e))?; - - let address = pending_contract - .compat() - .await - .map_err(|e| format!("Unable to await pending contract: {:?}", e))? - .address(); - - println!("deposit_contract_address: {:?}", address); - println!("deposit_contract_deploy_block: {}", deploy_block); - - Ok(()) - } - .compat(), - ) -} diff --git a/lcli/src/main.rs b/lcli/src/main.rs index 8381d8be5..f93857e19 100644 --- a/lcli/src/main.rs +++ b/lcli/src/main.rs @@ -2,14 +2,12 @@ extern crate log; mod change_genesis_time; mod check_deposit_data; -mod deploy_deposit_contract; mod eth1_genesis; mod generate_bootnode_enr; mod insecure_validators; mod interop_genesis; mod new_testnet; mod parse_hex; -mod refund_deposit_contract; mod skip_slots; mod transition_blocks; @@ -35,9 +33,7 @@ fn main() { let matches = App::new("Lighthouse CLI Tool") .version(lighthouse_version::VERSION) - .about( - "Performs various testing-related tasks, including defining testnets.", - ) + .about("Performs various testing-related tasks, including defining testnets.") .arg( Arg::with_name("spec") .short("s") @@ -46,7 +42,7 @@ fn main() { .takes_value(true) .required(true) .possible_values(&["minimal", "mainnet"]) - .default_value("mainnet") + .default_value("mainnet"), ) .arg( Arg::with_name("testnet-dir") @@ -87,7 +83,9 @@ fn main() { ) .subcommand( SubCommand::with_name("skip-slots") - .about("Performs a state transition from some state across some number of skip slots") + .about( + "Performs a state transition from some state across some number of skip slots", + ) .arg( Arg::with_name("pre-state") .value_name("BEACON_STATE") @@ -156,77 +154,9 @@ fn main() { .help("SSZ encoded as 0x-prefixed hex"), ), ) - .subcommand( - SubCommand::with_name("deploy-deposit-contract") - .about( - "Deploy a testing eth1 deposit contract.", - ) - .arg( - Arg::with_name("eth1-ipc") - .long("eth1-ipc") - .short("e") - .value_name("ETH1_IPC_PATH") - .help("Path to an Eth1 JSON-RPC IPC endpoint") - .takes_value(true) - .required(true) - ) - .arg( - Arg::with_name("from-address") - .long("from-address") - .short("f") - .value_name("FROM_ETH1_ADDRESS") - .help("The address that will submit the contract creation. Must be unlocked.") - .takes_value(true) - .required(true) - ) - .arg( - Arg::with_name("confirmations") - .value_name("INTEGER") - .long("confirmations") - .takes_value(true) - .default_value("3") - .help("The number of block confirmations before declaring the contract deployed."), - ) - ) - .subcommand( - SubCommand::with_name("refund-deposit-contract") - .about( - "Calls the steal() function on a testnet eth1 contract.", - ) - .arg( - Arg::with_name("eth1-ipc") - .long("eth1-ipc") - .short("e") - .value_name("ETH1_IPC_PATH") - .help("Path to an Eth1 JSON-RPC IPC endpoint") - .takes_value(true) - .required(true) - ) - .arg( - Arg::with_name("from-address") - .long("from-address") - .short("f") - .value_name("FROM_ETH1_ADDRESS") - .help("The address that will submit the contract creation. Must be unlocked.") - .takes_value(true) - .required(true) - ) - .arg( - Arg::with_name("contract-address") - .long("contract-address") - .short("c") - .value_name("CONTRACT_ETH1_ADDRESS") - .help("The address of the contract to be refunded. Its owner must match - --from-address.") - .takes_value(true) - .required(true) - ) - ) .subcommand( SubCommand::with_name("eth1-genesis") - .about( - "Listens to the eth1 chain and finds the genesis beacon state", - ) + .about("Listens to the eth1 chain and finds the genesis beacon state") .arg( Arg::with_name("eth1-endpoint") .short("e") @@ -241,16 +171,16 @@ fn main() { .value_name("HTTP_SERVER_LIST") .takes_value(true) .conflicts_with("eth1-endpoint") - .help("One or more comma-delimited URLs to eth1 JSON-RPC http APIs. \ + .help( + "One or more comma-delimited URLs to eth1 JSON-RPC http APIs. \ If multiple endpoints are given the endpoints are used as \ - fallback in the given order."), - ) + fallback in the given order.", + ), + ), ) .subcommand( SubCommand::with_name("interop-genesis") - .about( - "Produces an interop-compatible genesis state using deterministic keypairs", - ) + .about("Produces an interop-compatible genesis state using deterministic keypairs") .arg( Arg::with_name("validator-count") .long("validator-count") @@ -273,9 +203,11 @@ fn main() { .long("genesis-fork-version") .value_name("HEX") .takes_value(true) - .help("Used to avoid reply attacks between testnets. Recommended to set to - non-default."), - ) + .help( + "Used to avoid reply attacks between testnets. Recommended to set to + non-default.", + ), + ), ) .subcommand( SubCommand::with_name("change-genesis-time") @@ -297,7 +229,7 @@ fn main() { .takes_value(true) .required(true) .help("The value for state.genesis_time."), - ) + ), ) .subcommand( SubCommand::with_name("new-testnet") @@ -317,8 +249,10 @@ fn main() { .long("min-genesis-time") .value_name("UNIX_SECONDS") .takes_value(true) - .help("The minimum permitted genesis time. For non-eth1 testnets will be - the genesis time. Defaults to now."), + .help( + "The minimum permitted genesis time. For non-eth1 testnets will be + the genesis time. Defaults to now.", + ), ) .arg( Arg::with_name("min-genesis-active-validator-count") @@ -374,8 +308,10 @@ fn main() { .long("genesis-fork-version") .value_name("HEX") .takes_value(true) - .help("Used to avoid reply attacks between testnets. Recommended to set to - non-default."), + .help( + "Used to avoid reply attacks between testnets. Recommended to set to + non-default.", + ), ) .arg( Arg::with_name("deposit-contract-address") @@ -391,15 +327,15 @@ fn main() { .value_name("ETH1_BLOCK_NUMBER") .takes_value(true) .default_value("0") - .help("The block the deposit contract was deployed. Setting this is a huge - optimization for nodes, please do it."), - ) + .help( + "The block the deposit contract was deployed. Setting this is a huge + optimization for nodes, please do it.", + ), + ), ) .subcommand( SubCommand::with_name("check-deposit-data") - .about( - "Checks the integrity of some deposit data.", - ) + .about("Checks the integrity of some deposit data.") .arg( Arg::with_name("deposit-amount") .index(1) @@ -414,15 +350,15 @@ fn main() { .value_name("HEX") .takes_value(true) .required(true) - .help("A 0x-prefixed hex string of the deposit data. Should include the - function signature."), - ) + .help( + "A 0x-prefixed hex string of the deposit data. Should include the + function signature.", + ), + ), ) .subcommand( SubCommand::with_name("generate-bootnode-enr") - .about( - "Generates an ENR address to be used as a pre-genesis boot node.", - ) + .about("Generates an ENR address to be used as a pre-genesis boot node.") .arg( Arg::with_name("ip") .long("ip") @@ -445,7 +381,9 @@ fn main() { .value_name("TCP_PORT") .takes_value(true) .required(true) - .help("The TCP port to be included in the ENR and used for application comms"), + .help( + "The TCP port to be included in the ENR and used for application comms", + ), ) .arg( Arg::with_name("output-dir") @@ -461,15 +399,15 @@ fn main() { .value_name("HEX") .takes_value(true) .required(true) - .help("Used to avoid reply attacks between testnets. Recommended to set to - non-default."), - ) + .help( + "Used to avoid reply attacks between testnets. Recommended to set to + non-default.", + ), + ), ) .subcommand( SubCommand::with_name("insecure-validators") - .about( - "Produces validator directories with INSECURE, deterministic keypairs.", - ) + .about("Produces validator directories with INSECURE, deterministic keypairs.") .arg( Arg::with_name("count") .long("count") @@ -490,7 +428,7 @@ fn main() { .value_name("SECRETS_DIR") .takes_value(true) .help("The directory for storing secrets."), - ) + ), ) .get_matches(); @@ -572,14 +510,6 @@ fn run( ("pretty-hex", Some(matches)) => { run_parse_hex::(matches).map_err(|e| format!("Failed to pretty print hex: {}", e)) } - ("deploy-deposit-contract", Some(matches)) => { - deploy_deposit_contract::run::(env, matches) - .map_err(|e| format!("Failed to run deploy-deposit-contract command: {}", e)) - } - ("refund-deposit-contract", Some(matches)) => { - refund_deposit_contract::run::(env, matches) - .map_err(|e| format!("Failed to run refund-deposit-contract command: {}", e)) - } ("eth1-genesis", Some(matches)) => eth1_genesis::run::(env, matches) .map_err(|e| format!("Failed to run eth1-genesis command: {}", e)), ("interop-genesis", Some(matches)) => interop_genesis::run::(env, matches) diff --git a/lcli/src/refund_deposit_contract.rs b/lcli/src/refund_deposit_contract.rs deleted file mode 100644 index 899437760..000000000 --- a/lcli/src/refund_deposit_contract.rs +++ /dev/null @@ -1,47 +0,0 @@ -use clap::ArgMatches; -use environment::Environment; -use futures::compat::Future01CompatExt; -use std::path::PathBuf; -use tokio_compat_02::FutureExt; -use types::EthSpec; -use web3::{ - transports::Ipc, - types::{Address, TransactionRequest, U256}, - Web3, -}; - -/// `keccak("steal()")[0..4]` -pub const STEAL_FN_SIGNATURE: &[u8] = &[0xcf, 0x7a, 0x89, 0x65]; - -pub fn run(env: Environment, matches: &ArgMatches<'_>) -> Result<(), String> { - let eth1_ipc_path: PathBuf = clap_utils::parse_required(matches, "eth1-ipc")?; - let from: Address = clap_utils::parse_required(matches, "from-address")?; - let contract_address: Address = clap_utils::parse_required(matches, "contract-address")?; - - let (_event_loop_handle, transport) = - Ipc::new(eth1_ipc_path).map_err(|e| format!("Unable to connect to eth1 IPC: {:?}", e))?; - let web3 = Web3::new(transport); - - env.runtime().block_on( - async { - let _ = web3 - .eth() - .send_transaction(TransactionRequest { - from, - to: Some(contract_address), - gas: Some(U256::from(400_000)), - gas_price: None, - value: Some(U256::zero()), - data: Some(STEAL_FN_SIGNATURE.into()), - nonce: None, - condition: None, - }) - .compat() - .await - .map_err(|e| format!("Failed to call steal fn: {:?}", e))?; - - Ok(()) - } - .compat(), - ) -} diff --git a/lighthouse/Cargo.toml b/lighthouse/Cargo.toml index 50a491f69..944b35349 100644 --- a/lighthouse/Cargo.toml +++ b/lighthouse/Cargo.toml @@ -13,6 +13,10 @@ portable = ["bls/supranational-portable"] modern = ["bls/supranational-force-adx"] # Uses the slower Milagro BLS library, which is written in native Rust. milagro = ["bls/milagro"] +# Support minimal spec (used for testing only). +spec-minimal = [] +# Support spec v0.12 (used by Medalla testnet). +spec-v12 = [] [dependencies] beacon_node = { "path" = "../beacon_node" } diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index b53ab43b1..a3344d124 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -38,8 +38,10 @@ fn main() { .long_version( format!( "{}\n\ - BLS Library: {}", - VERSION.replace("Lighthouse/", ""), bls_library_name() + BLS Library: {}\n\ + Specs: mainnet (true), minimal ({}), v0.12.3 ({})", + VERSION.replace("Lighthouse/", ""), bls_library_name(), + cfg!(feature = "spec-minimal"), cfg!(feature = "spec-v12"), ).as_str() ) .arg( @@ -151,11 +153,22 @@ fn main() { } match eth_spec_id { - EthSpecId::Minimal => run(EnvironmentBuilder::minimal(), &matches, testnet_config), EthSpecId::Mainnet => run(EnvironmentBuilder::mainnet(), &matches, testnet_config), + #[cfg(feature = "spec-minimal")] + EthSpecId::Minimal => run(EnvironmentBuilder::minimal(), &matches, testnet_config), + #[cfg(feature = "spec-v12")] EthSpecId::V012Legacy => { run(EnvironmentBuilder::v012_legacy(), &matches, testnet_config) } + #[cfg(any(not(feature = "spec-minimal"), not(feature = "spec-v12")))] + other => { + eprintln!( + "Eth spec `{}` is not supported by this build of Lighthouse", + other + ); + eprintln!("You must compile with a feature flag to enable this spec variant"); + exit(1); + } } }); diff --git a/testing/eth1_test_rig/Cargo.toml b/testing/eth1_test_rig/Cargo.toml index d538d56c1..dc7bf4f5d 100644 --- a/testing/eth1_test_rig/Cargo.toml +++ b/testing/eth1_test_rig/Cargo.toml @@ -6,8 +6,9 @@ edition = "2018" [dependencies] tokio = { version = "0.3.2", features = ["time"] } -web3 = "0.11.0" -futures = { version = "0.3.7", features = ["compat"] } +tokio-compat-02 = "0.1" +web3 = "0.13.0" +futures = "0.3.7" types = { path = "../../consensus/types"} serde_json = "1.0.58" deposit_contract = { path = "../../common/deposit_contract"} diff --git a/testing/eth1_test_rig/src/ganache.rs b/testing/eth1_test_rig/src/ganache.rs index bd8b4c519..7b62db30b 100644 --- a/testing/eth1_test_rig/src/ganache.rs +++ b/testing/eth1_test_rig/src/ganache.rs @@ -1,15 +1,11 @@ -use futures::compat::Future01CompatExt; use serde_json::json; use std::io::prelude::*; use std::io::BufReader; use std::net::TcpListener; use std::process::{Child, Command, Stdio}; -use std::sync::Arc; use std::time::{Duration, Instant}; -use web3::{ - transports::{EventLoopHandle, Http}, - Transport, Web3, -}; +use tokio_compat_02::FutureExt; +use web3::{transports::Http, Transport, Web3}; /// How long we will wait for ganache to indicate that it is ready. const GANACHE_STARTUP_TIMEOUT_MILLIS: u64 = 10_000; @@ -20,7 +16,6 @@ const GANACHE_STARTUP_TIMEOUT_MILLIS: u64 = 10_000; pub struct GanacheInstance { pub port: u16, child: Child, - _event_loop: Arc, pub web3: Web3, network_id: u64, chain_id: u64, @@ -56,7 +51,7 @@ impl GanacheInstance { } }?; - let (event_loop, transport) = Http::new(&endpoint(port)).map_err(|e| { + let transport = Http::new(&endpoint(port)).map_err(|e| { format!( "Failed to start HTTP transport connected to ganache: {:?}", e @@ -69,7 +64,6 @@ impl GanacheInstance { Ok(Self { child, port, - _event_loop: Arc::new(event_loop), web3, network_id, chain_id, diff --git a/testing/eth1_test_rig/src/lib.rs b/testing/eth1_test_rig/src/lib.rs index acac29195..f8d146f13 100644 --- a/testing/eth1_test_rig/src/lib.rs +++ b/testing/eth1_test_rig/src/lib.rs @@ -10,10 +10,10 @@ mod ganache; use deposit_contract::{ encode_eth1_tx_data, testnet, ABI, BYTECODE, CONTRACT_DEPLOY_GAS, DEPOSIT_GAS, }; -use futures::compat::Future01CompatExt; use ganache::GanacheInstance; use std::time::Duration; use tokio::time::sleep; +use tokio_compat_02::FutureExt; use types::DepositData; use types::{test_utils::generate_deterministic_keypair, EthSpec, Hash256, Keypair, Signature}; use web3::contract::{Contract, Options}; diff --git a/validator_client/Cargo.toml b/validator_client/Cargo.toml index f8dab59d2..69f95b7de 100644 --- a/validator_client/Cargo.toml +++ b/validator_client/Cargo.toml @@ -32,7 +32,7 @@ slog = { version = "2.5.2", features = ["max_level_trace", "release_max_level_tr slog-async = "2.5.0" slog-term = "2.6.0" tokio = { version = "0.3.2", features = ["time"] } -futures = { version = "0.3.7", features = ["compat"] } +futures = "0.3.7" dirs = "3.0.1" directory = { path = "../common/directory" } lockfile = { path = "../common/lockfile" }