diff --git a/Cargo.lock b/Cargo.lock index 64bc9c798e..c328e6c56f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6121,7 +6121,6 @@ dependencies = [ "proptest", "proptest-derive", "rand 0.8.5", - "reth-codecs", "serde", "thiserror", ] diff --git a/crates/ethereum-forks/Cargo.toml b/crates/ethereum-forks/Cargo.toml index b0f2d3b97d..ab27355fe2 100644 --- a/crates/ethereum-forks/Cargo.toml +++ b/crates/ethereum-forks/Cargo.toml @@ -12,9 +12,6 @@ description = "Ethereum fork types used in reth." workspace = true [dependencies] -# reth -reth-codecs.workspace = true - # ethereum alloy-chains.workspace = true alloy-primitives = { workspace = true, features = ["rand", "rlp"] } @@ -42,4 +39,4 @@ proptest-derive.workspace = true [features] arbitrary = ["dep:arbitrary", "dep:proptest", "dep:proptest-derive"] -optimism = ["reth-codecs/optimism"] +optimism = [] diff --git a/crates/ethereum-forks/src/forkid.rs b/crates/ethereum-forks/src/forkid.rs index a105748174..39fa8a0c72 100644 --- a/crates/ethereum-forks/src/forkid.rs +++ b/crates/ethereum-forks/src/forkid.rs @@ -5,8 +5,11 @@ use crate::Head; use alloy_primitives::{hex, BlockNumber, B256}; use alloy_rlp::*; +#[cfg(any(test, feature = "arbitrary"))] +use arbitrary::Arbitrary; use crc::*; -use reth_codecs::derive_arbitrary; +#[cfg(any(test, feature = "arbitrary"))] +use proptest_derive::Arbitrary as PropTestArbitrary; use serde::{Deserialize, Serialize}; use std::{ cmp::Ordering, @@ -19,7 +22,7 @@ use thiserror::Error; const CRC_32_IEEE: Crc = Crc::::new(&CRC_32_ISO_HDLC); /// `CRC32` hash of all previous forks starting from genesis block. -#[derive_arbitrary(rlp)] +#[cfg_attr(any(test, feature = "arbitrary"), derive(PropTestArbitrary, Arbitrary))] #[derive( Clone, Copy, @@ -108,7 +111,7 @@ impl From for u64 { /// A fork identifier as defined by EIP-2124. /// Serves as the chain compatibility identifier. -#[derive_arbitrary(rlp)] +#[cfg_attr(any(test, feature = "arbitrary"), derive(PropTestArbitrary, Arbitrary))] #[derive( Clone, Copy,