From c47a2393e3f6a58271cfb4d9bc2dde3de11c649a Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 9 Nov 2023 14:31:27 +0100 Subject: [PATCH] chore: fix a bunch of features (#5369) --- crates/consensus/beacon/Cargo.toml | 2 ++ crates/net/downloaders/Cargo.toml | 2 +- crates/net/network/Cargo.toml | 2 +- crates/payload/builder/Cargo.toml | 4 +++- crates/primitives/Cargo.toml | 2 +- crates/primitives/src/transaction/mod.rs | 6 ++---- crates/rpc/rpc/Cargo.toml | 2 ++ crates/stages/Cargo.toml | 2 +- crates/transaction-pool/Cargo.toml | 1 + 9 files changed, 14 insertions(+), 9 deletions(-) diff --git a/crates/consensus/beacon/Cargo.toml b/crates/consensus/beacon/Cargo.toml index c650d1078..44e5fc644 100644 --- a/crates/consensus/beacon/Cargo.toml +++ b/crates/consensus/beacon/Cargo.toml @@ -58,4 +58,6 @@ optimism = [ "reth-interfaces/optimism", "reth-provider/optimism", "reth-rpc-types/optimism", + "reth-rpc-types-compat/optimism", + "reth-payload-builder/optimism", ] diff --git a/crates/net/downloaders/Cargo.toml b/crates/net/downloaders/Cargo.toml index f6b372892..cdb3317db 100644 --- a/crates/net/downloaders/Cargo.toml +++ b/crates/net/downloaders/Cargo.toml @@ -50,4 +50,4 @@ itertools.workspace = true tempfile.workspace = true [features] -test-utils = ["dep:alloy-rlp", "dep:tempfile", "dep:itertools"] +test-utils = ["dep:alloy-rlp", "dep:tempfile", "dep:itertools", "reth-interfaces/test-utils"] diff --git a/crates/net/network/Cargo.toml b/crates/net/network/Cargo.toml index fe71a9d3e..b63b6637f 100644 --- a/crates/net/network/Cargo.toml +++ b/crates/net/network/Cargo.toml @@ -92,7 +92,7 @@ tempfile.workspace = true [features] default = ["serde"] serde = ["dep:serde", "dep:humantime-serde", "secp256k1/serde", "enr?/serde", "dep:serde_json"] -test-utils = ["reth-provider/test-utils", "dep:enr", "dep:tempfile"] +test-utils = ["reth-provider/test-utils", "dep:enr", "dep:tempfile", "reth-transaction-pool/test-utils"] geth-tests = [] optimism = [ "reth-primitives/optimism", diff --git a/crates/payload/builder/Cargo.toml b/crates/payload/builder/Cargo.toml index 3537c3d18..056629ce6 100644 --- a/crates/payload/builder/Cargo.toml +++ b/crates/payload/builder/Cargo.toml @@ -42,5 +42,7 @@ test-utils = [] optimism = [ "reth-primitives/optimism", "reth-rpc-types/optimism", - "reth-interfaces/optimism" + "reth-rpc-types-compat/optimism", + "reth-interfaces/optimism", + "reth-transaction-pool/optimism" ] diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index a7245fa7f..9bd00d6ee 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -90,7 +90,7 @@ arbitrary = ["revm-primitives/arbitrary", "reth-rpc-types/arbitrary", "dep:arbit c-kzg = ["revm-primitives/c-kzg", "dep:c-kzg"] test-utils = ["dep:plain_hasher", "dep:hash-db", "dep:ethers-core"] clap = ["dep:clap"] -optimism = ["reth-codecs/optimism"] +optimism = ["reth-codecs/optimism", "revm-primitives/optimism", "revm/optimism"] [[bench]] name = "recover_ecdsa_crit" diff --git a/crates/primitives/src/transaction/mod.rs b/crates/primitives/src/transaction/mod.rs index eb1f2ef9b..40b37085f 100644 --- a/crates/primitives/src/transaction/mod.rs +++ b/crates/primitives/src/transaction/mod.rs @@ -54,8 +54,6 @@ mod optimism; #[cfg(feature = "optimism")] pub use optimism::TxDeposit; #[cfg(feature = "optimism")] -use revm_primitives::U256; -#[cfg(feature = "optimism")] pub use tx_type::DEPOSIT_TX_TYPE_ID; // Expected number of transactions where we can expect a speed-up by recovering the senders in @@ -1357,7 +1355,7 @@ impl proptest::arbitrary::Arbitrary for TransactionSigned { #[cfg(feature = "optimism")] let sig = if transaction.is_deposit() { - Signature { r: U256::ZERO, s: U256::ZERO, odd_y_parity: false } + Signature { r: crate::U256::ZERO, s: crate::U256::ZERO, odd_y_parity: false } } else { sig }; @@ -1386,7 +1384,7 @@ impl<'a> arbitrary::Arbitrary<'a> for TransactionSigned { #[cfg(feature = "optimism")] let signature = if transaction.is_deposit() { - Signature { r: U256::ZERO, s: U256::ZERO, odd_y_parity: false } + Signature { r: crate::U256::ZERO, s: crate::U256::ZERO, odd_y_parity: false } } else { signature }; diff --git a/crates/rpc/rpc/Cargo.toml b/crates/rpc/rpc/Cargo.toml index d32e5a3d8..7c90ed1c7 100644 --- a/crates/rpc/rpc/Cargo.toml +++ b/crates/rpc/rpc/Cargo.toml @@ -81,4 +81,6 @@ optimism = [ "reth-primitives/optimism", "reth-rpc-types-compat/optimism", "reth-network-api/optimism", + "reth-provider/optimism", + "reth-transaction-pool/optimism", ] diff --git a/crates/stages/Cargo.toml b/crates/stages/Cargo.toml index 2eb4a8e07..08e04fdaf 100644 --- a/crates/stages/Cargo.toml +++ b/crates/stages/Cargo.toml @@ -77,7 +77,7 @@ criterion = { version = "0.5", features = ["async_futures"] } serde_json.workspace = true [features] -test-utils = ["reth-interfaces/test-utils"] +test-utils = ["reth-interfaces/test-utils", "reth-db/test-utils"] [[bench]] name = "criterion" diff --git a/crates/transaction-pool/Cargo.toml b/crates/transaction-pool/Cargo.toml index 8aa44b598..c8578e1e0 100644 --- a/crates/transaction-pool/Cargo.toml +++ b/crates/transaction-pool/Cargo.toml @@ -65,6 +65,7 @@ test-utils = ["rand", "paste", "serde"] arbitrary = ["proptest", "reth-primitives/arbitrary"] optimism = [ "dep:reth-revm", + "reth-revm?/optimism", "reth-primitives/optimism", "reth-provider/test-utils", "reth-provider/optimism",