diff --git a/crates/evm/execution-types/Cargo.toml b/crates/evm/execution-types/Cargo.toml index 36b36fc02166..c7fbad673db1 100644 --- a/crates/evm/execution-types/Cargo.toml +++ b/crates/evm/execution-types/Cargo.toml @@ -14,7 +14,7 @@ workspace = true reth-primitives.workspace = true reth-primitives-traits.workspace = true reth-execution-errors.workspace = true -reth-trie-common.workspace = true +reth-trie-common = { workspace = true, optional = true } reth-trie.workspace = true revm.workspace = true @@ -43,14 +43,15 @@ serde = [ "alloy-eips/serde", "alloy-primitives/serde", "reth-primitives-traits/serde", - "alloy-consensus/serde", - "reth-trie-common/serde", + "alloy-consensus/serde", "reth-trie/serde", + "reth-trie-common?/serde" ] serde-bincode-compat = [ + "serde", + "reth-trie-common/serde-bincode-compat", "reth-primitives/serde-bincode-compat", "reth-primitives-traits/serde-bincode-compat", - "reth-trie-common/serde-bincode-compat", "serde_with", "alloy-eips/serde-bincode-compat", "alloy-consensus/serde-bincode-compat", diff --git a/crates/evm/execution-types/src/chain.rs b/crates/evm/execution-types/src/chain.rs index 339a188166dc..1767a7f43f65 100644 --- a/crates/evm/execution-types/src/chain.rs +++ b/crates/evm/execution-types/src/chain.rs @@ -520,7 +520,7 @@ pub enum ChainSplit { } /// Bincode-compatible [`Chain`] serde implementation. -#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))] +#[cfg(feature = "serde-bincode-compat")] pub(super) mod serde_bincode_compat { use crate::ExecutionOutcome; use alloc::borrow::Cow; diff --git a/crates/evm/execution-types/src/lib.rs b/crates/evm/execution-types/src/lib.rs index f98ebfe73a5f..fb872cd596e4 100644 --- a/crates/evm/execution-types/src/lib.rs +++ b/crates/evm/execution-types/src/lib.rs @@ -26,7 +26,7 @@ pub use execution_outcome::*; /// all fields are serialized. /// /// Read more: -#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))] +#[cfg(feature = "serde-bincode-compat")] pub mod serde_bincode_compat { pub use super::chain::serde_bincode_compat::*; }