Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions crates/ethereum/reth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ reth-rpc-builder = { workspace = true, optional = true }
reth-exex = { workspace = true, optional = true }
reth-trie = { workspace = true, optional = true }
reth-node-builder = { workspace = true, optional = true }
reth-tasks = { workspace = true, optional = true }

# reth-ethereum
reth-ethereum-primitives.workspace = true
Expand All @@ -44,13 +45,14 @@ reth-node-ethereum = { workspace = true, optional = true }

# alloy
alloy-rpc-types-eth = { workspace = true, optional = true }
alloy-rpc-types-engine = { workspace = true, optional = true }

[features]
default = ["std"]
std = [
"reth-chainspec/std",
"reth-ethereum-primitives/std",
"reth-ethereum-consensus/std",
"reth-ethereum-consensus?/std",
"reth-primitives-traits/std",
"reth-consensus?/std",
"reth-consensus-common?/std",
Expand All @@ -59,6 +61,7 @@ std = [
"reth-evm?/std",
"reth-evm-ethereum?/std",
"reth-revm?/std",
"alloy-rpc-types-engine?/std",
]
arbitrary = [
"std",
Expand All @@ -69,6 +72,7 @@ arbitrary = [
"alloy-rpc-types-eth?/arbitrary",
"reth-transaction-pool?/arbitrary",
"reth-eth-wire?/arbitrary",
"alloy-rpc-types-engine?/arbitrary",
]

test-utils = [
Expand Down Expand Up @@ -121,14 +125,17 @@ node = [
]
pool = ["dep:reth-transaction-pool"]
rpc = [
"tasks",
"dep:reth-rpc",
"dep:reth-rpc-builder",
"dep:reth-rpc-api",
"dep:reth-rpc-eth-types",
"dep:alloy-rpc-types-eth",
"dep:alloy-rpc-types-engine",
]
tasks = ["dep:reth-tasks"]
js-tracer = ["rpc", "reth-rpc/js-tracer"]
network = ["dep:reth-network", "dep:reth-network-api", "dep:reth-eth-wire"]
provider = ["storage-api", "dep:reth-provider", "dep:reth-db"]
network = ["dep:reth-network", "tasks", "dep:reth-network-api", "dep:reth-eth-wire"]
provider = ["storage-api", "tasks", "dep:reth-provider", "dep:reth-db"]
storage-api = ["dep:reth-storage-api"]
trie = ["dep:reth-trie"]
15 changes: 15 additions & 0 deletions crates/ethereum/reth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ pub mod evm {
#[cfg(feature = "exex")]
pub use reth_exex as exex;

/// Re-exported from `tasks`.
#[cfg(feature = "tasks")]
pub mod tasks {
pub use reth_tasks::*;
}

/// Re-exported reth network types
#[cfg(feature = "network")]
pub mod network {
Expand Down Expand Up @@ -119,10 +125,19 @@ pub mod rpc {
pub use reth_rpc_builder as builder;

/// Re-exported eth types
#[allow(ambiguous_glob_reexports)]
pub mod eth {
#[doc(inline)]
pub use alloy_rpc_types_eth as primitives;
#[doc(inline)]
pub use reth_rpc_eth_types::*;

pub use reth_rpc::eth::*;
}

/// Re-exported types
pub mod types {
#[doc(inline)]
pub use alloy_rpc_types_engine as engine;
}
}
7 changes: 5 additions & 2 deletions crates/optimism/reth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ reth-rpc-builder = { workspace = true, optional = true }
reth-transaction-pool = { workspace = true, optional = true }
reth-trie = { workspace = true, optional = true }
reth-node-builder = { workspace = true, optional = true }
reth-tasks = { workspace = true, optional = true }

# reth-op
reth-optimism-primitives.workspace = true
Expand Down Expand Up @@ -105,15 +106,17 @@ node = [
"trie",
]
rpc = [
"tasks",
"dep:reth-rpc",
"dep:reth-rpc-builder",
"dep:reth-rpc-api",
"dep:reth-rpc-eth-types",
"dep:reth-optimism-rpc",
]
tasks = ["dep:reth-tasks"]
js-tracer = ["rpc", "reth-rpc/js-tracer"]
network = ["dep:reth-network", "dep:reth-network-api", "dep:reth-eth-wire"]
provider = ["storage-api", "dep:reth-provider", "dep:reth-db"]
network = ["dep:reth-network", "tasks", "dep:reth-network-api", "dep:reth-eth-wire"]
provider = ["storage-api", "tasks", "dep:reth-provider", "dep:reth-db"]
pool = ["dep:reth-transaction-pool"]
storage-api = ["dep:reth-storage-api"]
trie = ["dep:reth-trie"]
6 changes: 6 additions & 0 deletions crates/optimism/reth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ pub mod evm {
pub use reth_revm as revm;
}

/// Re-exported from `tasks`.
#[cfg(feature = "tasks")]
pub mod tasks {
pub use reth_tasks::*;
}

/// Re-exported reth network types
#[cfg(feature = "network")]
pub mod network {
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc/src/eth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub mod sim_bundle;
/// Implementation of `eth` namespace API.
pub use builder::EthApiBuilder;
pub use bundle::EthBundle;
pub use core::EthApi;
pub use core::{EthApi, EthApiFor};
pub use filter::EthFilter;
pub use pubsub::EthPubSub;

Expand Down
1 change: 0 additions & 1 deletion examples/beacon-api-sidecar-fetcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true
license.workspace = true

[dependencies]
reth.workspace = true
reth-ethereum = { workspace = true, features = ["node", "pool", "cli"] }

alloy-rpc-types-beacon.workspace = true
Expand Down
5 changes: 2 additions & 3 deletions examples/beacon-api-sidecar-fetcher/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ use alloy_primitives::B256;
use clap::Parser;
use futures_util::{stream::FuturesUnordered, StreamExt};
use mined_sidecar::MinedSidecarStream;
use reth::builder::NodeHandle;
use reth_ethereum::{
cli::{chainspec::EthereumChainSpecParser, interface::Cli},
node::EthereumNode,
node::{builder::NodeHandle, EthereumNode},
provider::CanonStateSubscriptions,
};

Expand All @@ -38,7 +37,7 @@ fn main() {
let NodeHandle { node, node_exit_future } =
builder.node(EthereumNode::default()).launch().await?;

let notifications: reth::providers::CanonStateNotificationStream =
let notifications: reth_ethereum::provider::CanonStateNotificationStream =
node.provider.canonical_state_stream();

let pool = node.pool.clone();
Expand Down
6 changes: 3 additions & 3 deletions examples/beacon-api-sidecar-fetcher/src/mined_sidecar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ where
St: Stream<Item = CanonStateNotification> + Send + Unpin + 'static,
P: TransactionPoolExt + Unpin + 'static,
{
fn process_block(&mut self, block: &RecoveredBlock<reth::primitives::Block>) {
fn process_block(&mut self, block: &RecoveredBlock<reth_ethereum::Block>) {
let txs: Vec<_> = block
.body()
.transactions()
Expand Down Expand Up @@ -230,8 +230,8 @@ where
async fn fetch_blobs_for_block(
client: reqwest::Client,
url: String,
block: RecoveredBlock<reth::primitives::Block>,
txs: Vec<(reth::primitives::TransactionSigned, usize)>,
block: RecoveredBlock<reth_ethereum::Block>,
txs: Vec<(reth_ethereum::TransactionSigned, usize)>,
) -> Result<Vec<BlobTransactionEvent>, SideCarError> {
let response = match client.get(url).header("Accept", "application/json").send().await {
Ok(response) => response,
Expand Down
1 change: 0 additions & 1 deletion examples/custom-beacon-withdrawals/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true
license.workspace = true

[dependencies]
reth.workspace = true
reth-ethereum = { workspace = true, features = ["node", "node-api", "evm", "cli"] }

alloy-evm.workspace = true
Expand Down
11 changes: 4 additions & 7 deletions examples/custom-beacon-withdrawals/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ use alloy_evm::{
};
use alloy_sol_macro::sol;
use alloy_sol_types::SolCall;
use reth::{
builder::{components::ExecutorBuilder, BuilderContext},
primitives::SealedBlock,
};
use reth_ethereum::{
chainspec::ChainSpec,
cli::interface::Cli,
Expand All @@ -34,12 +30,13 @@ use reth_ethereum::{
},
node::{
api::{ConfigureEvm, FullNodeTypes, NodeTypes},
builder::{components::ExecutorBuilder, BuilderContext},
node::EthereumAddOns,
EthereumNode,
},
primitives::{Header, SealedHeader},
primitives::{Header, SealedBlock, SealedHeader},
provider::BlockExecutionResult,
EthPrimitives, Receipt, TransactionSigned,
Block, EthPrimitives, Receipt, TransactionSigned,
};
use std::{fmt::Display, sync::Arc};

Expand Down Expand Up @@ -147,7 +144,7 @@ impl ConfigureEvm for CustomEvmConfig {
self.inner.next_evm_env(parent, attributes)
}

fn context_for_block<'a>(&self, block: &'a SealedBlock) -> EthBlockExecutionCtx<'a> {
fn context_for_block<'a>(&self, block: &'a SealedBlock<Block>) -> EthBlockExecutionCtx<'a> {
self.inner.context_for_block(block)
}

Expand Down
1 change: 0 additions & 1 deletion examples/custom-dev-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true
license.workspace = true

[dependencies]
reth.workspace = true
reth-ethereum = { workspace = true, features = ["node", "test-utils"] }
futures-util.workspace = true

Expand Down
6 changes: 2 additions & 4 deletions examples/custom-dev-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,16 @@ use std::sync::Arc;
use alloy_genesis::Genesis;
use alloy_primitives::{b256, hex};
use futures_util::StreamExt;
use reth::{
builder::{NodeBuilder, NodeHandle},
tasks::TaskManager,
};
use reth_ethereum::{
chainspec::ChainSpec,
node::{
builder::{NodeBuilder, NodeHandle},
core::{args::RpcServerArgs, node_config::NodeConfig},
EthereumNode,
},
provider::CanonStateSubscriptions,
rpc::api::eth::helpers::EthTransactions,
tasks::TaskManager,
};

#[tokio::main]
Expand Down
Loading
Loading