From cf8ff9829cca8a16bbed99a2de9e3d85b8dfe92b Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 23 Jun 2025 22:29:25 +0200 Subject: [PATCH] feat: add codec re-exports to reth-op and reth-ethereum (#17020) --- Cargo.lock | 2 ++ crates/ethereum/reth/Cargo.toml | 5 ++++- crates/ethereum/reth/src/lib.rs | 4 ++++ crates/optimism/reth/Cargo.toml | 5 ++++- crates/optimism/reth/src/lib.rs | 4 ++++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d49012d09..78c1d70476 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8131,6 +8131,7 @@ dependencies = [ "alloy-rpc-types-eth", "reth-chainspec", "reth-cli-util", + "reth-codecs", "reth-consensus", "reth-consensus-common", "reth-db", @@ -9026,6 +9027,7 @@ version = "1.4.8" dependencies = [ "reth-chainspec", "reth-cli-util", + "reth-codecs", "reth-consensus", "reth-consensus-common", "reth-db", diff --git a/crates/ethereum/reth/Cargo.toml b/crates/ethereum/reth/Cargo.toml index 45e046b89e..0522e6f84d 100644 --- a/crates/ethereum/reth/Cargo.toml +++ b/crates/ethereum/reth/Cargo.toml @@ -19,6 +19,7 @@ reth-network-api = { workspace = true, optional = true } reth-eth-wire = { workspace = true, optional = true } reth-provider = { workspace = true, optional = true } reth-db = { workspace = true, optional = true, features = ["mdbx"] } +reth-codecs = { workspace = true, optional = true } reth-storage-api = { workspace = true, optional = true } reth-node-api = { workspace = true, optional = true } reth-node-core = { workspace = true, optional = true } @@ -75,6 +76,7 @@ arbitrary = [ "reth-transaction-pool?/arbitrary", "reth-eth-wire?/arbitrary", "alloy-rpc-types-engine?/arbitrary", + "reth-codecs?/arbitrary", ] test-utils = [ @@ -93,6 +95,7 @@ test-utils = [ "reth-evm-ethereum?/test-utils", "reth-node-builder?/test-utils", "reth-trie-db?/test-utils", + "reth-codecs?/test-utils", ] full = [ @@ -139,7 +142,7 @@ rpc = [ tasks = ["dep:reth-tasks"] js-tracer = ["rpc", "reth-rpc/js-tracer"] network = ["dep:reth-network", "tasks", "dep:reth-network-api", "dep:reth-eth-wire"] -provider = ["storage-api", "tasks", "dep:reth-provider", "dep:reth-db"] +provider = ["storage-api", "tasks", "dep:reth-provider", "dep:reth-db", "dep:reth-codecs"] storage-api = ["dep:reth-storage-api"] trie = ["dep:reth-trie"] trie-db = ["trie", "dep:reth-trie-db"] diff --git a/crates/ethereum/reth/src/lib.rs b/crates/ethereum/reth/src/lib.rs index b72e504e21..2a3a613549 100644 --- a/crates/ethereum/reth/src/lib.rs +++ b/crates/ethereum/reth/src/lib.rs @@ -91,6 +91,10 @@ pub mod provider { pub use reth_db as db; } +/// Re-exported codec crate +#[cfg(feature = "provider")] +pub use reth_codecs as codec; + /// Re-exported reth storage api types #[cfg(feature = "storage-api")] pub mod storage { diff --git a/crates/optimism/reth/Cargo.toml b/crates/optimism/reth/Cargo.toml index f199aed7e7..150a50fc84 100644 --- a/crates/optimism/reth/Cargo.toml +++ b/crates/optimism/reth/Cargo.toml @@ -19,6 +19,7 @@ reth-network-api = { workspace = true, optional = true } reth-eth-wire = { workspace = true, optional = true } reth-provider = { workspace = true, optional = true } reth-db = { workspace = true, optional = true, features = ["mdbx", "op"] } +reth-codecs = { workspace = true, optional = true } reth-storage-api = { workspace = true, optional = true } reth-node-api = { workspace = true, optional = true } reth-node-core = { workspace = true, optional = true } @@ -70,6 +71,7 @@ arbitrary = [ "reth-db?/arbitrary", "reth-transaction-pool?/arbitrary", "reth-eth-wire?/arbitrary", + "reth-codecs?/arbitrary", ] test-utils = [ @@ -86,6 +88,7 @@ test-utils = [ "reth-transaction-pool?/test-utils", "reth-node-builder?/test-utils", "reth-trie-db?/test-utils", + "reth-codecs?/test-utils", ] full = ["consensus", "evm", "node", "provider", "rpc", "trie", "pool", "network"] @@ -121,7 +124,7 @@ rpc = [ tasks = ["dep:reth-tasks"] js-tracer = ["rpc", "reth-rpc/js-tracer"] network = ["dep:reth-network", "tasks", "dep:reth-network-api", "dep:reth-eth-wire"] -provider = ["storage-api", "tasks", "dep:reth-provider", "dep:reth-db"] +provider = ["storage-api", "tasks", "dep:reth-provider", "dep:reth-db", "dep:reth-codecs"] pool = ["dep:reth-transaction-pool"] storage-api = ["dep:reth-storage-api"] trie = ["dep:reth-trie"] diff --git a/crates/optimism/reth/src/lib.rs b/crates/optimism/reth/src/lib.rs index f87d90829c..3028b07b23 100644 --- a/crates/optimism/reth/src/lib.rs +++ b/crates/optimism/reth/src/lib.rs @@ -100,6 +100,10 @@ pub mod provider { pub use reth_db as db; } +/// Re-exported codec crate +#[cfg(feature = "provider")] +pub use reth_codecs as codec; + /// Re-exported reth storage api types #[cfg(feature = "storage-api")] pub mod storage {