diff --git a/Cargo.lock b/Cargo.lock index a02801ecc7..9409d04285 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7484,6 +7484,26 @@ dependencies = [ "thiserror 2.0.11", ] +[[package]] +name = "reth-ethereum" +version = "1.1.5" +dependencies = [ + "reth-chainspec", + "reth-consensus", + "reth-consensus-common", + "reth-db", + "reth-ethereum-consensus", + "reth-ethereum-primitives", + "reth-evm", + "reth-evm-ethereum", + "reth-network", + "reth-node-api", + "reth-node-ethereum", + "reth-primitives-traits", + "reth-provider", + "reth-storage-api", +] + [[package]] name = "reth-ethereum-cli" version = "1.1.5" diff --git a/Cargo.toml b/Cargo.toml index ea269093b8..f0c7ef2b8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,6 +37,7 @@ members = [ "crates/ethereum/node", "crates/ethereum/payload/", "crates/ethereum/primitives/", + "crates/ethereum/reth/", "crates/etl/", "crates/evm/", "crates/evm/execution-errors", @@ -341,6 +342,7 @@ reth-ethereum-engine-primitives = { path = "crates/ethereum/engine-primitives", reth-ethereum-forks = { path = "crates/ethereum-forks", default-features = false } reth-ethereum-payload-builder = { path = "crates/ethereum/payload" } reth-ethereum-primitives = { path = "crates/ethereum/primitives", default-features = false } +reth-ethereum = { path = "crates/ethereum/reth" } reth-etl = { path = "crates/etl" } reth-evm = { path = "crates/evm" } reth-evm-ethereum = { path = "crates/ethereum/evm" } diff --git a/crates/ethereum/reth/Cargo.toml b/crates/ethereum/reth/Cargo.toml new file mode 100644 index 0000000000..ad013615c9 --- /dev/null +++ b/crates/ethereum/reth/Cargo.toml @@ -0,0 +1,70 @@ +[package] +name = "reth-ethereum" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true + +[lints] +workspace = true + +[dependencies] +# reth +reth-primitives-traits.workspace = true +reth-chainspec.workspace = true +reth-network = { workspace = true, optional = true } +reth-provider = { workspace = true, optional = true } +reth-db = { workspace = true, optional = true, features = ["mdbx"] } +reth-storage-api = { workspace = true, optional = true } +reth-node-api = { workspace = true, optional = true } +reth-consensus = { workspace = true, optional = true } +reth-consensus-common = { workspace = true, optional = true } +reth-evm = { workspace = true, optional = true } + +# reth-ethereum +reth-ethereum-primitives.workspace = true +reth-ethereum-consensus = { workspace = true, optional = true } +reth-evm-ethereum = { workspace = true, optional = true } +reth-node-ethereum = { workspace = true, optional = true } + +[features] +default = ["std"] +std = [ + "reth-chainspec/std", + "reth-ethereum-primitives/std", + "reth-primitives-traits/std", + "reth-consensus?/std", + "reth-consensus-common?/std", +] +arbitrary = [ + "std", + "reth-chainspec/arbitrary", + "reth-ethereum-primitives/arbitrary", + "reth-primitives-traits/arbitrary", + "reth-db?/arbitrary", +] + +test-utils = [ + "reth-chainspec/test-utils", + "reth-consensus?/test-utils", + "reth-db?/test-utils", + "reth-ethereum-primitives/test-utils", + "reth-evm?/test-utils", + "reth-network?/test-utils", + "reth-node-ethereum?/test-utils", + "reth-primitives-traits/test-utils", + "reth-provider?/test-utils", +] + +full = ["consensus", "evm", "node", "provider"] + +alloy-compat = ["reth-ethereum-primitives/alloy-compat"] +consensus = ["dep:reth-consensus", "dep:reth-consensus-common", "dep:reth-ethereum-consensus"] +evm = ["dep:reth-evm", "dep:reth-evm-ethereum"] +node-api = ["dep:reth-node-api"] +node = ["provider", "consensus", "evm", "node-api", "dep:reth-node-ethereum"] +network = ["dep:reth-network"] +provider = ["storage-api", "dep:reth-provider", "dep:reth-db"] +storage-api = ["dep:reth-storage-api"] diff --git a/crates/ethereum/reth/src/lib.rs b/crates/ethereum/reth/src/lib.rs new file mode 100644 index 0000000000..d0a77a6326 --- /dev/null +++ b/crates/ethereum/reth/src/lib.rs @@ -0,0 +1,78 @@ +//! Ethereum meta crate that provides access to commonly used reth dependencies. + +#![doc( + html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", + html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", + issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +#![cfg_attr(not(feature = "std"), no_std)] + +/// Re-exported ethereum types +#[doc(inline)] +pub use reth_ethereum_primitives::*; + +/// Re-exported reth primitives +pub mod primitives { + #[doc(inline)] + pub use reth_primitives_traits::*; +} + +/// Re-exported consensus types +#[cfg(feature = "consensus")] +pub mod consensus { + #[doc(inline)] + pub use reth_consensus::*; + pub use reth_consensus_common::*; + pub use reth_ethereum_consensus::*; +} + +/// Re-exported from `reth_chainspec` +pub mod chainspec { + #[doc(inline)] + pub use reth_chainspec::*; +} + +/// Re-exported evm types +#[cfg(feature = "evm")] +pub mod evm { + #[doc(inline)] + pub use reth_evm_ethereum::*; + + #[doc(inline)] + pub use reth_evm as primitives; +} + +/// Re-exported reth network types +#[cfg(feature = "network")] +pub mod network { + #[doc(inline)] + pub use reth_network::*; +} + +/// Re-exported reth provider types +#[cfg(feature = "provider")] +pub mod provider { + #[doc(inline)] + pub use reth_provider::*; + + #[doc(inline)] + pub use reth_db as db; +} + +/// Re-exported reth storage api types +#[cfg(feature = "storage-api")] +pub mod storage { + #[doc(inline)] + pub use reth_storage_api::*; +} + +/// Re-exported ethereum node +#[cfg(feature = "node-api")] +pub mod node { + #[doc(inline)] + pub use reth_node_api as api; + #[cfg(feature = "node")] + pub use reth_node_ethereum::*; +}