From 701843aaa043e6334b215946813ef66709a56507 Mon Sep 17 00:00:00 2001 From: blacktemplar Date: Mon, 14 Dec 2020 02:28:19 +0000 Subject: [PATCH] Update dependencies (#2084) ## Issue Addressed Partially addresses dependencies mentioned in issue #1712. ## Proposed Changes Updates dependencies (including an update avoiding a vulnerability) + add tokio compatibility to `remote_signer_test` --- Cargo.lock | 132 ++++++++++++++---- beacon_node/eth1/Cargo.toml | 2 +- common/eth2/Cargo.toml | 2 +- common/remote_signer_consumer/Cargo.toml | 2 +- crypto/eth2_hashing/Cargo.toml | 2 +- crypto/eth2_key_derivation/Cargo.toml | 2 +- remote_signer/client/Cargo.toml | 2 +- testing/eth1_test_rig/Cargo.toml | 2 +- testing/eth1_test_rig/src/lib.rs | 3 +- testing/remote_signer_test/Cargo.toml | 3 +- .../remote_signer_test/src/api_test_signer.rs | 5 +- testing/remote_signer_test/src/consumer.rs | 10 +- validator_client/Cargo.toml | 2 +- 13 files changed, 120 insertions(+), 49 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5912a6236..25701fe05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -190,9 +190,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6789e291be47ace86a60303502173d84af8327e3627ecf334356ee0f87a164c" +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" [[package]] name = "aho-corasick" @@ -243,9 +243,9 @@ dependencies = [ [[package]] name = "arc-swap" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" +checksum = "dabe5a181f83789739c194cbe5a897dde195078fac08568d09221fd6137a7ba8" [[package]] name = "arrayref" @@ -371,9 +371,9 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e9e7a929bd34c68a82d58a4de7f86fffdaf97fb2af850162a7bb19dd7269b33" dependencies = [ - "async-std", "native-tls", "thiserror", + "tokio 0.2.24", "url", ] @@ -521,6 +521,12 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" +[[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" + [[package]] name = "base64" version = "0.12.3" @@ -969,9 +975,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.41" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dae9c4b8fedcae85592ba623c4fd08cfdab3e3b72d6df780c6ead964a69bfff" +checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" [[package]] name = "cfg-if" @@ -3009,6 +3015,24 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-proxy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ec5be69758dfc06b9b29efa9d6e9306e387c85eb362c603912eead2ad98c7" +dependencies = [ + "bytes 0.5.6", + "futures 0.3.8", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.9", + "hyper-tls", + "native-tls", + "tokio 0.2.24", + "tokio-tls", + "tower-service", + "typed-headers", +] + [[package]] name = "hyper-tls" version = "0.4.3" @@ -3215,9 +3239,9 @@ dependencies = [ [[package]] name = "jsonrpc-core" -version = "14.2.0" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0747307121ffb9703afd93afbd0fb4f854c38fb873f2c8b90e0e902f27c7b62" +checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa" dependencies = [ "futures 0.1.30", "log", @@ -3984,6 +4008,29 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "mio-named-pipes" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" +dependencies = [ + "log", + "mio 0.6.23", + "miow 0.3.6", + "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" @@ -4631,10 +4678,11 @@ dependencies = [ [[package]] name = "poly1305" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ce46de8e53ee414ca4d02bfefac75d8c12fba948b76622a40b4be34dfce980" +checksum = "4b7456bc1ad2d4cf82b3a016be4c2ac48daf11bf990c1603ebd447fe6f30fca8" dependencies = [ + "cpuid-bool 0.2.0", "universal-hash", ] @@ -5235,7 +5283,7 @@ dependencies = [ "clap", "environment", "futures 0.3.8", - "hyper 0.14.0-dev", + "hyper 0.13.9", "lazy_static", "regex", "remote_signer_backend", @@ -5254,7 +5302,7 @@ dependencies = [ "remote_signer_test", "reqwest", "serde", - "tokio 0.2.24", + "tokio 0.3.5", "types", ] @@ -5272,7 +5320,8 @@ dependencies = [ "serde", "serde_json", "tempdir", - "tokio 0.2.24", + "tokio 0.3.5", + "tokio-compat-02", "types", ] @@ -5324,13 +5373,13 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.12" +version = "0.16.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba5a8ec64ee89a76c98c549af81ff14813df09c3e6dc4766c3856da48597a0c" +checksum = "024a1e66fea74c66c66624ee5622a7ff0e4b73a13b4f5c326ddb50c708944226" dependencies = [ "cc", - "lazy_static", "libc", + "once_cell", "spin", "untrusted", "web-sys", @@ -5529,18 +5578,18 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.17.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2932dc07acd2066ff2e3921a4419606b220ba6cd03a9935123856cc534877056" +checksum = "c6179428c22c73ac0fbb7b5579a56353ce78ba29759b3b8575183336ea74cdfb" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.1.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab2c26f0d3552a0f12e639ae8a64afc2e3db9c52fe32f5fc6c289d38519f220" +checksum = "11553d210db090930f4432bea123b31f70bbf693ace14504ea2a35e796c28dd2" dependencies = [ "cc", ] @@ -6547,12 +6596,17 @@ dependencies = [ "futures-core", "iovec", "lazy_static", + "libc", "memchr", "mio 0.6.23", + "mio-named-pipes", + "mio-uds", "num_cpus", "pin-project-lite 0.1.11", + "signal-hook-registry", "slab", "tokio-macros 0.2.6", + "winapi 0.3.9", ] [[package]] @@ -6682,6 +6736,7 @@ checksum = "3137de2b078e95274b696cc522e87f22c9a753fe3ef3344116ffb94f104f10a3" dependencies = [ "bytes 0.6.0", "futures-core", + "futures-io", "futures-sink", "log", "pin-project-lite 0.2.0", @@ -6865,6 +6920,19 @@ dependencies = [ "memchr", ] +[[package]] +name = "typed-headers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3179a61e9eccceead5f1574fd173cf2e162ac42638b9bf214c6ad0baf7efa24a" +dependencies = [ + "base64 0.11.0", + "bytes 0.5.6", + "chrono", + "http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mime", +] + [[package]] name = "typenum" version = "1.12.0" @@ -7115,9 +7183,9 @@ dependencies = [ [[package]] name = "vcpkg" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" +checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" [[package]] name = "vec-arena" @@ -7345,40 +7413,44 @@ dependencies = [ [[package]] name = "web3" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d03f64be59921dbc5791f05af61a87594bb454518fe4e97d827405422279a0" +checksum = "3c736dcabf7a4d4b9e724ff6696914e205cb37f111a54903b17f76c20d59f7e6" dependencies = [ "arrayvec", "async-native-tls", - "async-std", - "base64 0.12.3", + "base64 0.13.0", "derive_more", "ethabi", "ethereum-types", "futures 0.3.8", "futures-timer", + "hex", "hyper 0.13.9", + "hyper-proxy", "hyper-tls", "jsonrpc-core", "log", "native-tls", "parking_lot", + "pin-project 1.0.2", "rlp", - "rustc-hex", "secp256k1", "serde", "serde_json", "soketto", "tiny-keccak 2.0.2", + "tokio 0.2.24", + "tokio-util 0.5.1", + "typed-headers", "url", ] [[package]] name = "webpki" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ "ring", "untrusted", diff --git a/beacon_node/eth1/Cargo.toml b/beacon_node/eth1/Cargo.toml index 2244ccf5b..0ee75381b 100644 --- a/beacon_node/eth1/Cargo.toml +++ b/beacon_node/eth1/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dev-dependencies] eth1_test_rig = { path = "../../testing/eth1_test_rig" } toml = "0.5.6" -web3 = "0.13.0" +web3 = "0.14.0" sloggers = "1.0.1" environment = { path = "../../lighthouse/environment" } tokio-compat-02 = "0.1" diff --git a/common/eth2/Cargo.toml b/common/eth2/Cargo.toml index 547150353..d7eddd7df 100644 --- a/common/eth2/Cargo.toml +++ b/common/eth2/Cargo.toml @@ -18,7 +18,7 @@ serde_utils = { path = "../../consensus/serde_utils" } zeroize = { version = "1.1.1", features = ["zeroize_derive"] } eth2_keystore = { path = "../../crypto/eth2_keystore" } libsecp256k1 = "0.3.5" -ring = "0.16.12" +ring = "0.16.19" bytes = "0.5.6" account_utils = { path = "../../common/account_utils" } eth2_ssz = "0.1.2" diff --git a/common/remote_signer_consumer/Cargo.toml b/common/remote_signer_consumer/Cargo.toml index 1f952b6e3..c11c2170d 100644 --- a/common/remote_signer_consumer/Cargo.toml +++ b/common/remote_signer_consumer/Cargo.toml @@ -11,5 +11,5 @@ remote_signer_test = { path = "../../testing/remote_signer_test" } [dependencies] reqwest = { version = "0.10.8", features = ["json"] } serde = { version = "1.0.116", features = ["derive"] } -tokio = { version = "0.2.22", features = ["time"] } +tokio = { version = "0.3.5", features = ["time"] } types = { path = "../../consensus/types" } diff --git a/crypto/eth2_hashing/Cargo.toml b/crypto/eth2_hashing/Cargo.toml index 21d1a9e9f..7fd4bbdd7 100644 --- a/crypto/eth2_hashing/Cargo.toml +++ b/crypto/eth2_hashing/Cargo.toml @@ -10,7 +10,7 @@ description = "Hashing primitives used in Ethereum 2.0" lazy_static = { version = "1.4.0", optional = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -ring = "0.16.12" +ring = "0.16.19" [target.'cfg(target_arch = "wasm32")'.dependencies] sha2 = "0.9.1" diff --git a/crypto/eth2_key_derivation/Cargo.toml b/crypto/eth2_key_derivation/Cargo.toml index fea5eb67e..1220bd2c7 100644 --- a/crypto/eth2_key_derivation/Cargo.toml +++ b/crypto/eth2_key_derivation/Cargo.toml @@ -10,7 +10,7 @@ edition = "2018" sha2 = "0.9.1" zeroize = { version = "1.1.1", features = ["zeroize_derive"] } num-bigint-dig = { version = "0.6.0", features = ["zeroize"] } -ring = "0.16.12" +ring = "0.16.19" bls = { path = "../bls" } [dev-dependencies] diff --git a/remote_signer/client/Cargo.toml b/remote_signer/client/Cargo.toml index ff6ad10a2..dac014790 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 = { git = "https://github.com/sigp/hyper", branch = "lighthouse" } +hyper = "0.13.8" lazy_static = "1.4.0" regex = "1.3.9" serde = { version = "1.0.116", features = ["derive"] } diff --git a/testing/eth1_test_rig/Cargo.toml b/testing/eth1_test_rig/Cargo.toml index dc7bf4f5d..49188c469 100644 --- a/testing/eth1_test_rig/Cargo.toml +++ b/testing/eth1_test_rig/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] tokio = { version = "0.3.2", features = ["time"] } tokio-compat-02 = "0.1" -web3 = "0.13.0" +web3 = "0.14.0" futures = "0.3.7" types = { path = "../../consensus/types"} serde_json = "1.0.58" diff --git a/testing/eth1_test_rig/src/lib.rs b/testing/eth1_test_rig/src/lib.rs index f8d146f13..e222de05e 100644 --- a/testing/eth1_test_rig/src/lib.rs +++ b/testing/eth1_test_rig/src/lib.rs @@ -287,8 +287,7 @@ async fn deploy_deposit_contract( gas: Some(U256::from(CONTRACT_DEPLOY_GAS)), ..Options::default() }) - .execute(bytecode, (), deploy_address) - .map_err(|e| format!("Failed to execute deployment: {:?}", e))?; + .execute(bytecode, (), deploy_address); pending_contract .compat() diff --git a/testing/remote_signer_test/Cargo.toml b/testing/remote_signer_test/Cargo.toml index 789186012..2190735e0 100644 --- a/testing/remote_signer_test/Cargo.toml +++ b/testing/remote_signer_test/Cargo.toml @@ -15,5 +15,6 @@ reqwest = { version = "0.10.8", features = ["blocking", "json"] } serde = { version = "1.0.116", features = ["derive"] } serde_json = "1.0.58" tempdir = "0.3.7" -tokio = { version = "0.2.22", features = ["time"] } +tokio = { version = "0.3.5", 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 a1a924daf..264997916 100644 --- a/testing/remote_signer_test/src/api_test_signer.rs +++ b/testing/remote_signer_test/src/api_test_signer.rs @@ -26,7 +26,10 @@ impl ApiTestSigner { let client = environment .runtime() - .block_on(Client::new(runtime_context, &matches)) + .block_on(tokio_compat_02::FutureExt::compat(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 c072f6d5a..83f828691 100644 --- a/testing/remote_signer_test/src/consumer.rs +++ b/testing/remote_signer_test/src/consumer.rs @@ -28,19 +28,15 @@ pub fn do_sign_request( test_client: &RemoteSignerHttpConsumer, test_input: RemoteSignerTestData, ) -> Result { - let mut runtime = Builder::new() - .basic_scheduler() - .enable_all() - .build() - .unwrap(); + let runtime = Builder::new_multi_thread().enable_all().build().unwrap(); - runtime.block_on(test_client.sign( + runtime.block_on(tokio_compat_02::FutureExt::compat(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/validator_client/Cargo.toml b/validator_client/Cargo.toml index 69f95b7de..0af1dccee 100644 --- a/validator_client/Cargo.toml +++ b/validator_client/Cargo.toml @@ -58,7 +58,7 @@ warp = { git = "https://github.com/sigp/warp ", branch = "lighthouse" } hyper = "0.13.8" serde_utils = { path = "../consensus/serde_utils" } libsecp256k1 = "0.3.5" -ring = "0.16.12" +ring = "0.16.19" rand = "0.7.3" scrypt = { version = "0.5.0", default-features = false } lighthouse_metrics = { path = "../common/lighthouse_metrics" }