diff --git a/crates/consensus/Cargo.toml b/crates/consensus/Cargo.toml index c002bff613d..964d82d6e98 100644 --- a/crates/consensus/Cargo.toml +++ b/crates/consensus/Cargo.toml @@ -22,6 +22,8 @@ c-kzg = { workspace = true, features = ["serde"], optional = true } # arbitrary arbitrary = { workspace = true, features = ["derive"], optional = true } +proptest = { workspace = true, optional = true } +proptest-derive = { workspace = true, optional = true } # serde serde = { workspace = true, features = ["derive"], optional = true } @@ -31,6 +33,8 @@ alloy-primitives = { workspace = true, features = ["arbitrary", "rand"] } alloy-signer.workspace = true arbitrary = { workspace = true, features = ["derive"] } +proptest = { workspace = true } +proptest-derive = { workspace = true } k256.workspace = true tokio = { workspace = true, features = ["macros"] } serde_json.workspace = true @@ -40,5 +44,16 @@ default = ["std"] std = ["alloy-eips/std", "c-kzg?/std"] k256 = ["alloy-primitives/k256"] kzg = ["dep:c-kzg", "alloy-eips/kzg", "std"] -arbitrary = ["std", "dep:arbitrary", "alloy-eips/arbitrary"] -serde = ["dep:serde", "alloy-primitives/serde", "dep:alloy-serde", "alloy-eips/serde"] +arbitrary = [ + "std", + "dep:arbitrary", + "dep:proptest-derive", + "dep:proptest", + "alloy-eips/arbitrary", +] +serde = [ + "dep:serde", + "alloy-primitives/serde", + "dep:alloy-serde", + "alloy-eips/serde", +] diff --git a/crates/consensus/src/request.rs b/crates/consensus/src/request.rs index 1bfbe0e67fc..05810cb657b 100644 --- a/crates/consensus/src/request.rs +++ b/crates/consensus/src/request.rs @@ -10,7 +10,10 @@ use alloy_rlp::{Decodable, Encodable, Header}; /// See also [EIP-7685](https://eips.ethereum.org/EIPS/eip-7685). #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[non_exhaustive] -#[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))] +#[cfg_attr( + any(test, feature = "arbitrary"), + derive(proptest_derive::Arbitrary, arbitrary::Arbitrary) +)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum Request { /// An [EIP-6110] deposit request.