From 18340d1fb6eceeebe6661445978aaf597be79f00 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Thu, 14 Oct 2021 02:58:11 +0000 Subject: [PATCH] Get arbitrary check passing (2.0) (#2710) ## Issue Addressed NA ## Proposed Changes This is a wholesale rip-off of #2708, see that PR for more of a description. I've made this PR since @realbigsean is offline and I can't merge his PR due to Github's frustrating `target-branch-check` bug. I also changed the branch to `unstable`, since I'm trying to minimize the diff between `merge-f2f`/`unstable`. I'll just rebase `merge-f2f` onto `unstable` after this PR merges. When running `make lint` I noticed the following warning: ``` warning: patch for `fixed-hash` uses the features mechanism. default-features and features will not take effect because the patch dependency does not support this mechanism ``` So, I removed the `features` section from the patch. ## Additional Info NA Co-authored-by: realbigsean --- Cargo.lock | 100 +++++++++++------- Cargo.toml | 1 + consensus/cached_tree_hash/Cargo.toml | 2 +- consensus/merkle_proof/Cargo.toml | 2 +- consensus/ssz/Cargo.toml | 2 +- consensus/ssz_types/Cargo.toml | 2 +- consensus/ssz_types/src/bitfield.rs | 4 +- consensus/ssz_types/src/fixed_vector.rs | 6 +- consensus/ssz_types/src/variable_list.rs | 6 +- consensus/state_processing/Cargo.toml | 2 +- consensus/swap_or_not_shuffle/Cargo.toml | 2 +- consensus/tree_hash/Cargo.toml | 2 +- consensus/types/Cargo.toml | 4 +- .../types/src/beacon_state/committee_cache.rs | 2 +- .../types/src/beacon_state/exit_cache.rs | 2 +- .../types/src/beacon_state/pubkey_cache.rs | 2 +- .../types/src/beacon_state/tree_hash_cache.rs | 2 +- consensus/types/src/pending_attestation.rs | 2 +- crypto/bls/Cargo.toml | 4 +- crypto/bls/src/generic_aggregate_signature.rs | 2 +- crypto/bls/src/generic_public_key.rs | 2 +- crypto/bls/src/generic_public_key_bytes.rs | 2 +- crypto/bls/src/generic_signature.rs | 2 +- crypto/bls/src/generic_signature_bytes.rs | 2 +- testing/ef_tests/Cargo.toml | 2 +- 25 files changed, 93 insertions(+), 68 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 05cb90eedc..30e5ad793e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -107,9 +107,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" +checksum = "991984e3fd003e7ba02eb724f87a0f997b78677c46c0e91f8424ad7394c9886a" dependencies = [ "getrandom 0.2.3", "once_cell", @@ -154,20 +154,14 @@ version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" -[[package]] -name = "arbitrary" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db55d72333851e17d572bec876e390cd3b11eb1ef53ae821dd9f3b653d2b4569" -dependencies = [ - "derive_arbitrary", -] - [[package]] name = "arbitrary" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "577b08a4acd7b99869f863c50011b01eb73424ccc798ecd996f2e24817adfca7" +dependencies = [ + "derive_arbitrary", +] [[package]] name = "arc-swap" @@ -597,12 +591,12 @@ dependencies = [ name = "bls" version = "0.2.0" dependencies = [ - "arbitrary 0.4.7", + "arbitrary", "blst", "eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_ssz", - "ethereum-types 0.11.0", + "ethereum-types 0.12.1", "hex", "milagro_bls", "rand 0.7.3", @@ -614,9 +608,9 @@ dependencies = [ [[package]] name = "blst" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccca1872d592bb8cdf9a48fe8f0ca1695d543511745e3790091b1816549dc93a" +checksum = "1f073f59a150a1dca74aab43d794ae5a7578d52bb1e73121e559f3ee3e6a837e" dependencies = [ "cc", "glob", @@ -743,7 +737,7 @@ dependencies = [ "eth2_ssz", "eth2_ssz_derive", "eth2_ssz_types", - "ethereum-types 0.11.0", + "ethereum-types 0.12.1", "quickcheck", "quickcheck_macros", "smallvec", @@ -889,9 +883,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb6210b637171dfba4cda12e579ac6dc73f5165ad56133e5d72ef3131f320855" +checksum = "b7b858541263efe664aead4a5209a4ae5c5d2811167d4ed4ee0944503f8d2089" dependencies = [ "cc", ] @@ -922,11 +916,11 @@ dependencies = [ [[package]] name = "console_error_panic_hook" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "wasm-bindgen", ] @@ -1305,9 +1299,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "0.4.7" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a012b5e473dc912f0db0546a1c9c6a194ce8494feb66fa0237160926f9e0e6" +checksum = "b24629208e87a2d8b396ff43b15c4afb0a69cea3fbbaa9ed9b92b7c02f0aed73" dependencies = [ "proc-macro2", "quote", @@ -1480,7 +1474,7 @@ dependencies = [ "derivative", "eth2_ssz", "eth2_ssz_derive", - "ethereum-types 0.11.0", + "ethereum-types 0.12.1", "fs2", "hex", "rayon", @@ -1845,7 +1839,7 @@ name = "eth2_ssz" version = "0.4.0" dependencies = [ "eth2_ssz_derive", - "ethereum-types 0.11.0", + "ethereum-types 0.12.1", "smallvec", ] @@ -1863,7 +1857,7 @@ dependencies = [ name = "eth2_ssz_types" version = "0.2.1" dependencies = [ - "arbitrary 0.4.7", + "arbitrary", "eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_ssz", "serde", @@ -1983,6 +1977,20 @@ dependencies = [ "uint 0.9.1", ] +[[package]] +name = "ethereum-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +dependencies = [ + "ethbloom 0.11.1", + "fixed-hash 0.7.0", + "impl-rlp 0.3.0", + "impl-serde", + "primitive-types 0.10.1", + "uint 0.9.1", +] + [[package]] name = "event-listener" version = "2.5.1" @@ -2076,10 +2084,9 @@ dependencies = [ [[package]] name = "fixed-hash" version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +source = "git+https://github.com/paritytech/parity-common?rev=df638ab0885293d21d656dc300d39236b69ce57d#df638ab0885293d21d656dc300d39236b69ce57d" dependencies = [ - "arbitrary 0.4.7", + "arbitrary", "byteorder", "rand 0.8.4", "rustc-hex", @@ -3793,7 +3800,7 @@ name = "merkle_proof" version = "0.2.0" dependencies = [ "eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.11.0", + "ethereum-types 0.12.1", "lazy_static", "quickcheck", "quickcheck_macros", @@ -4564,6 +4571,19 @@ dependencies = [ "uint 0.9.1", ] +[[package]] +name = "primitive-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +dependencies = [ + "fixed-hash 0.7.0", + "impl-codec 0.5.1", + "impl-rlp 0.3.0", + "impl-serde", + "uint 0.9.1", +] + [[package]] name = "proc-macro-crate" version = "1.1.0" @@ -4612,9 +4632,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" +checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70" dependencies = [ "unicode-xid", ] @@ -5466,9 +5486,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740223c51853f3145fe7c90360d2d4232f2b62e3449489c207eccde818979982" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" dependencies = [ "lazy_static", ] @@ -5787,7 +5807,7 @@ dependencies = [ name = "state_processing" version = "0.2.0" dependencies = [ - "arbitrary 0.4.7", + "arbitrary", "beacon_chain", "bls", "env_logger 0.9.0", @@ -5906,7 +5926,7 @@ version = "0.2.0" dependencies = [ "criterion", "eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethereum-types 0.11.0", + "ethereum-types 0.12.1", ] [[package]] @@ -6389,7 +6409,7 @@ dependencies = [ "eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_ssz", "eth2_ssz_derive", - "ethereum-types 0.11.0", + "ethereum-types 0.12.1", "rand 0.7.3", "smallvec", "tree_hash_derive", @@ -6494,7 +6514,7 @@ checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" name = "types" version = "0.2.0" dependencies = [ - "arbitrary 0.4.7", + "arbitrary", "beacon_chain", "bls", "cached_tree_hash", @@ -6508,7 +6528,7 @@ dependencies = [ "eth2_ssz", "eth2_ssz_derive", "eth2_ssz_types", - "ethereum-types 0.11.0", + "ethereum-types 0.12.1", "hex", "int_to_bytes", "itertools", @@ -6558,7 +6578,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f" dependencies = [ - "arbitrary 1.0.2", + "arbitrary", "byteorder", "crunchy", "hex", diff --git a/Cargo.toml b/Cargo.toml index b09406d1ad..3200b02264 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,3 +90,4 @@ eth2_ssz_types = { path = "consensus/ssz_types" } eth2_ssz_derive = { path = "consensus/ssz_derive" } tree_hash = { path = "consensus/tree_hash" } tree_hash_derive = { path = "consensus/tree_hash_derive" } +fixed-hash = { git = "https://github.com/paritytech/parity-common", rev="df638ab0885293d21d656dc300d39236b69ce57d" } diff --git a/consensus/cached_tree_hash/Cargo.toml b/consensus/cached_tree_hash/Cargo.toml index a22b01a90f..2816bba0e6 100644 --- a/consensus/cached_tree_hash/Cargo.toml +++ b/consensus/cached_tree_hash/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Michael Sproul "] edition = "2018" [dependencies] -ethereum-types = "0.11.0" +ethereum-types = "0.12.1" eth2_ssz_types = "0.2.1" eth2_hashing = "0.2.0" eth2_ssz_derive = "0.3.0" diff --git a/consensus/merkle_proof/Cargo.toml b/consensus/merkle_proof/Cargo.toml index 11fdbb5c56..7b2af88ec0 100644 --- a/consensus/merkle_proof/Cargo.toml +++ b/consensus/merkle_proof/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Michael Sproul "] edition = "2018" [dependencies] -ethereum-types = "0.11.0" +ethereum-types = "0.12.1" eth2_hashing = "0.2.0" lazy_static = "1.4.0" safe_arith = { path = "../safe_arith" } diff --git a/consensus/ssz/Cargo.toml b/consensus/ssz/Cargo.toml index a5404a09f1..853fd7232c 100644 --- a/consensus/ssz/Cargo.toml +++ b/consensus/ssz/Cargo.toml @@ -13,7 +13,7 @@ name = "ssz" eth2_ssz_derive = "0.3.0" [dependencies] -ethereum-types = "0.11.0" +ethereum-types = "0.12.1" smallvec = "1.6.1" [features] diff --git a/consensus/ssz_types/Cargo.toml b/consensus/ssz_types/Cargo.toml index 4524b5b57c..2b6de52dd1 100644 --- a/consensus/ssz_types/Cargo.toml +++ b/consensus/ssz_types/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.116" eth2_serde_utils = "0.1.0" eth2_ssz = "0.4.0" typenum = "1.12.0" -arbitrary = { version = "0.4.6", features = ["derive"], optional = true } +arbitrary = { version = "1.0", features = ["derive"], optional = true } [dev-dependencies] serde_json = "1.0.58" diff --git a/consensus/ssz_types/src/bitfield.rs b/consensus/ssz_types/src/bitfield.rs index f0fb8a9fd6..afecd8ce7d 100644 --- a/consensus/ssz_types/src/bitfield.rs +++ b/consensus/ssz_types/src/bitfield.rs @@ -644,7 +644,7 @@ impl tree_hash::TreeHash for Bitfield> { } #[cfg(feature = "arbitrary")] -impl arbitrary::Arbitrary for Bitfield> { +impl arbitrary::Arbitrary<'_> for Bitfield> { fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { let size = N::to_usize(); let mut vec: Vec = vec![0u8; size]; @@ -654,7 +654,7 @@ impl arbitrary::Arbitrary for Bitfield> { } #[cfg(feature = "arbitrary")] -impl arbitrary::Arbitrary for Bitfield> { +impl arbitrary::Arbitrary<'_> for Bitfield> { fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { let max_size = N::to_usize(); let rand = usize::arbitrary(u)?; diff --git a/consensus/ssz_types/src/fixed_vector.rs b/consensus/ssz_types/src/fixed_vector.rs index 242e03cd85..8b8d660fb9 100644 --- a/consensus/ssz_types/src/fixed_vector.rs +++ b/consensus/ssz_types/src/fixed_vector.rs @@ -280,8 +280,10 @@ where } #[cfg(feature = "arbitrary")] -impl arbitrary::Arbitrary for FixedVector { - fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { +impl<'a, T: arbitrary::Arbitrary<'a>, N: 'static + Unsigned> arbitrary::Arbitrary<'a> + for FixedVector +{ + fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result { let size = N::to_usize(); let mut vec: Vec = Vec::with_capacity(size); for _ in 0..size { diff --git a/consensus/ssz_types/src/variable_list.rs b/consensus/ssz_types/src/variable_list.rs index 2e20d0c37c..242a55b2c9 100644 --- a/consensus/ssz_types/src/variable_list.rs +++ b/consensus/ssz_types/src/variable_list.rs @@ -259,8 +259,10 @@ where } #[cfg(feature = "arbitrary")] -impl arbitrary::Arbitrary for VariableList { - fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { +impl<'a, T: arbitrary::Arbitrary<'a>, N: 'static + Unsigned> arbitrary::Arbitrary<'a> + for VariableList +{ + fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result { let max_size = N::to_usize(); let rand = usize::arbitrary(u)?; let size = std::cmp::min(rand, max_size); diff --git a/consensus/state_processing/Cargo.toml b/consensus/state_processing/Cargo.toml index 8f921744b3..216a497685 100644 --- a/consensus/state_processing/Cargo.toml +++ b/consensus/state_processing/Cargo.toml @@ -22,7 +22,7 @@ rayon = "1.4.1" eth2_hashing = "0.2.0" int_to_bytes = { path = "../int_to_bytes" } smallvec = "1.6.1" -arbitrary = { version = "0.4.6", features = ["derive"], optional = true } +arbitrary = { version = "1.0", features = ["derive"], optional = true } lighthouse_metrics = { path = "../../common/lighthouse_metrics", optional = true } lazy_static = { version = "1.4.0", optional = true } diff --git a/consensus/swap_or_not_shuffle/Cargo.toml b/consensus/swap_or_not_shuffle/Cargo.toml index 3086c491f9..619d8336d2 100644 --- a/consensus/swap_or_not_shuffle/Cargo.toml +++ b/consensus/swap_or_not_shuffle/Cargo.toml @@ -13,7 +13,7 @@ criterion = "0.3.3" [dependencies] eth2_hashing = "0.2.0" -ethereum-types = "0.11.0" +ethereum-types = "0.12.1" [features] arbitrary = ["ethereum-types/arbitrary"] diff --git a/consensus/tree_hash/Cargo.toml b/consensus/tree_hash/Cargo.toml index 7b0b9a9b56..e8f6b6f880 100644 --- a/consensus/tree_hash/Cargo.toml +++ b/consensus/tree_hash/Cargo.toml @@ -15,7 +15,7 @@ eth2_ssz = "0.4.0" eth2_ssz_derive = "0.3.0" [dependencies] -ethereum-types = "0.11.0" +ethereum-types = "0.12.1" eth2_hashing = "0.2.0" smallvec = "1.6.1" diff --git a/consensus/types/Cargo.toml b/consensus/types/Cargo.toml index 19e59ff6a1..1f9ea10c64 100644 --- a/consensus/types/Cargo.toml +++ b/consensus/types/Cargo.toml @@ -13,7 +13,7 @@ bls = { path = "../../crypto/bls" } compare_fields = { path = "../../common/compare_fields" } compare_fields_derive = { path = "../../common/compare_fields_derive" } eth2_interop_keypairs = { path = "../../common/eth2_interop_keypairs" } -ethereum-types = "0.11.0" +ethereum-types = "0.12.1" eth2_hashing = "0.2.0" hex = "0.4.2" int_to_bytes = { path = "../int_to_bytes" } @@ -37,7 +37,7 @@ serde_yaml = "0.8.13" tempfile = "3.1.0" derivative = "2.1.1" rusqlite = { version = "0.25.3", features = ["bundled"], optional = true } -arbitrary = { version = "0.4.6", features = ["derive"], optional = true } +arbitrary = { version = "1.0", features = ["derive"], optional = true } eth2_serde_utils = "0.1.0" regex = "1.3.9" lazy_static = "1.4.0" diff --git a/consensus/types/src/beacon_state/committee_cache.rs b/consensus/types/src/beacon_state/committee_cache.rs index a9c3042e0a..8a87cddac8 100644 --- a/consensus/types/src/beacon_state/committee_cache.rs +++ b/consensus/types/src/beacon_state/committee_cache.rs @@ -327,7 +327,7 @@ pub fn get_active_validator_indices(validators: &[Validator], epoch: Epoch) -> V } #[cfg(feature = "arbitrary-fuzz")] -impl arbitrary::Arbitrary for CommitteeCache { +impl arbitrary::Arbitrary<'_> for CommitteeCache { fn arbitrary(_u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { Ok(Self::default()) } diff --git a/consensus/types/src/beacon_state/exit_cache.rs b/consensus/types/src/beacon_state/exit_cache.rs index f1d1b498b7..1c199c0475 100644 --- a/consensus/types/src/beacon_state/exit_cache.rs +++ b/consensus/types/src/beacon_state/exit_cache.rs @@ -62,7 +62,7 @@ impl ExitCache { } #[cfg(feature = "arbitrary-fuzz")] -impl arbitrary::Arbitrary for ExitCache { +impl arbitrary::Arbitrary<'_> for ExitCache { fn arbitrary(_u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { Ok(Self::default()) } diff --git a/consensus/types/src/beacon_state/pubkey_cache.rs b/consensus/types/src/beacon_state/pubkey_cache.rs index 42fc6cc951..d81801e77d 100644 --- a/consensus/types/src/beacon_state/pubkey_cache.rs +++ b/consensus/types/src/beacon_state/pubkey_cache.rs @@ -43,7 +43,7 @@ impl PubkeyCache { } #[cfg(feature = "arbitrary-fuzz")] -impl arbitrary::Arbitrary for PubkeyCache { +impl arbitrary::Arbitrary<'_> for PubkeyCache { fn arbitrary(_u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { Ok(Self::default()) } diff --git a/consensus/types/src/beacon_state/tree_hash_cache.rs b/consensus/types/src/beacon_state/tree_hash_cache.rs index 35c2ac1c3e..39a8b659dd 100644 --- a/consensus/types/src/beacon_state/tree_hash_cache.rs +++ b/consensus/types/src/beacon_state/tree_hash_cache.rs @@ -589,7 +589,7 @@ impl OptionalTreeHashCacheInner { } #[cfg(feature = "arbitrary-fuzz")] -impl arbitrary::Arbitrary for BeaconTreeHashCache { +impl arbitrary::Arbitrary<'_> for BeaconTreeHashCache { fn arbitrary(_u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { Ok(Self::default()) } diff --git a/consensus/types/src/pending_attestation.rs b/consensus/types/src/pending_attestation.rs index df6f47955a..2a65bff66f 100644 --- a/consensus/types/src/pending_attestation.rs +++ b/consensus/types/src/pending_attestation.rs @@ -20,7 +20,7 @@ pub struct PendingAttestation { } #[cfg(feature = "arbitrary-fuzz")] -impl arbitrary::Arbitrary for PendingAttestation { +impl arbitrary::Arbitrary<'_> for PendingAttestation { fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result { Ok(Self { aggregation_bits: >::arbitrary(u)?, diff --git a/crypto/bls/Cargo.toml b/crypto/bls/Cargo.toml index 32aa1e3ec9..ef26fd1f91 100644 --- a/crypto/bls/Cargo.toml +++ b/crypto/bls/Cargo.toml @@ -14,8 +14,8 @@ serde_derive = "1.0.116" eth2_serde_utils = "0.1.0" hex = "0.4.2" eth2_hashing = "0.2.0" -ethereum-types = "0.11.0" -arbitrary = { version = "0.4.6", features = ["derive"], optional = true } +ethereum-types = "0.12.1" +arbitrary = { version = "1.0", features = ["derive"], optional = true } zeroize = { version = "1.4.2", features = ["zeroize_derive"] } blst = "0.3.3" diff --git a/crypto/bls/src/generic_aggregate_signature.rs b/crypto/bls/src/generic_aggregate_signature.rs index b8942e8166..2001de042b 100644 --- a/crypto/bls/src/generic_aggregate_signature.rs +++ b/crypto/bls/src/generic_aggregate_signature.rs @@ -307,7 +307,7 @@ where } #[cfg(feature = "arbitrary")] -impl arbitrary::Arbitrary +impl arbitrary::Arbitrary<'_> for GenericAggregateSignature where Pub: 'static, diff --git a/crypto/bls/src/generic_public_key.rs b/crypto/bls/src/generic_public_key.rs index d3c0047876..847d039c62 100644 --- a/crypto/bls/src/generic_public_key.rs +++ b/crypto/bls/src/generic_public_key.rs @@ -125,6 +125,6 @@ impl fmt::Debug for GenericPublicKey { } #[cfg(feature = "arbitrary")] -impl arbitrary::Arbitrary for GenericPublicKey { +impl arbitrary::Arbitrary<'_> for GenericPublicKey { impl_arbitrary!(PUBLIC_KEY_BYTES_LEN); } diff --git a/crypto/bls/src/generic_public_key_bytes.rs b/crypto/bls/src/generic_public_key_bytes.rs index e8d24f9d48..c2f318ab65 100644 --- a/crypto/bls/src/generic_public_key_bytes.rs +++ b/crypto/bls/src/generic_public_key_bytes.rs @@ -177,6 +177,6 @@ impl fmt::Debug for GenericPublicKeyBytes { } #[cfg(feature = "arbitrary")] -impl arbitrary::Arbitrary for GenericPublicKeyBytes { +impl arbitrary::Arbitrary<'_> for GenericPublicKeyBytes { impl_arbitrary!(PUBLIC_KEY_BYTES_LEN); } diff --git a/crypto/bls/src/generic_signature.rs b/crypto/bls/src/generic_signature.rs index a167da4248..f3aeeb5598 100644 --- a/crypto/bls/src/generic_signature.rs +++ b/crypto/bls/src/generic_signature.rs @@ -166,7 +166,7 @@ impl> fmt::Debug for GenericSignature + 'static> arbitrary::Arbitrary +impl + 'static> arbitrary::Arbitrary<'_> for GenericSignature { impl_arbitrary!(SIGNATURE_BYTES_LEN); diff --git a/crypto/bls/src/generic_signature_bytes.rs b/crypto/bls/src/generic_signature_bytes.rs index c6edece9ed..b5c0284971 100644 --- a/crypto/bls/src/generic_signature_bytes.rs +++ b/crypto/bls/src/generic_signature_bytes.rs @@ -145,6 +145,6 @@ impl fmt::Debug for GenericSignatureBytes { } #[cfg(feature = "arbitrary")] -impl arbitrary::Arbitrary for GenericSignatureBytes { +impl arbitrary::Arbitrary<'_> for GenericSignatureBytes { impl_arbitrary!(SIGNATURE_BYTES_LEN); } diff --git a/testing/ef_tests/Cargo.toml b/testing/ef_tests/Cargo.toml index 33aa68f9c8..ee05f40713 100644 --- a/testing/ef_tests/Cargo.toml +++ b/testing/ef_tests/Cargo.toml @@ -15,7 +15,7 @@ bls = { path = "../../crypto/bls", default-features = false } compare_fields = { path = "../../common/compare_fields" } compare_fields_derive = { path = "../../common/compare_fields_derive" } derivative = "2.1.1" -ethereum-types = "0.11.0" +ethereum-types = "0.12.1" hex = "0.4.2" rayon = "1.4.1" serde = "1.0.116"