feat: separate node-builder crate (#6302)

This commit is contained in:
Dan Cline
2024-01-31 13:03:03 -05:00
committed by GitHub
parent 34cda3a99f
commit 1223895466
45 changed files with 191 additions and 100 deletions

61
Cargo.lock generated
View File

@ -2284,7 +2284,7 @@ dependencies = [
"alloy-rlp",
"reth-db",
"reth-interfaces",
"reth-node-builder",
"reth-node-ethereum",
"reth-primitives",
"reth-provider",
"reth-revm",
@ -5760,8 +5760,9 @@ dependencies = [
"reth-network-api",
"reth-nippy-jar",
"reth-node-api",
"reth-node-builder",
"reth-node-core",
"reth-node-ethereum",
"reth-node-optimism",
"reth-optimism-payload-builder",
"reth-payload-builder",
"reth-payload-validator",
@ -5805,7 +5806,7 @@ dependencies = [
"reth-beacon-consensus",
"reth-interfaces",
"reth-node-api",
"reth-node-builder",
"reth-node-ethereum",
"reth-primitives",
"reth-provider",
"reth-revm",
@ -5855,7 +5856,8 @@ dependencies = [
"reth-interfaces",
"reth-metrics",
"reth-node-api",
"reth-node-builder",
"reth-node-ethereum",
"reth-node-optimism",
"reth-payload-builder",
"reth-payload-validator",
"reth-primitives",
@ -5898,7 +5900,8 @@ dependencies = [
"reth-db",
"reth-interfaces",
"reth-metrics",
"reth-node-builder",
"reth-node-ethereum",
"reth-node-optimism",
"reth-primitives",
"reth-provider",
"reth-revm",
@ -6381,17 +6384,6 @@ dependencies = [
"thiserror",
]
[[package]]
name = "reth-node-builder"
version = "0.1.0-alpha.16"
dependencies = [
"reth-node-api",
"reth-payload-builder",
"reth-primitives",
"reth-rpc-types",
"serde",
]
[[package]]
name = "reth-node-core"
version = "0.1.0-alpha.16"
@ -6461,6 +6453,28 @@ dependencies = [
"vergen",
]
[[package]]
name = "reth-node-ethereum"
version = "0.1.0-alpha.16"
dependencies = [
"reth-node-api",
"reth-payload-builder",
"reth-primitives",
"reth-rpc-types",
"serde",
]
[[package]]
name = "reth-node-optimism"
version = "0.1.0-alpha.16"
dependencies = [
"reth-node-api",
"reth-payload-builder",
"reth-primitives",
"reth-rpc-types",
"serde",
]
[[package]]
name = "reth-optimism-payload-builder"
version = "0.1.0-alpha.16"
@ -6624,7 +6638,8 @@ dependencies = [
"reth-consensus-common",
"reth-interfaces",
"reth-node-api",
"reth-node-builder",
"reth-node-ethereum",
"reth-node-optimism",
"reth-primitives",
"reth-provider",
"reth-trie",
@ -6663,7 +6678,8 @@ dependencies = [
"reth-network",
"reth-network-api",
"reth-node-api",
"reth-node-builder",
"reth-node-ethereum",
"reth-node-optimism",
"reth-primitives",
"reth-provider",
"reth-revm",
@ -6730,7 +6746,8 @@ dependencies = [
"reth-metrics",
"reth-network-api",
"reth-node-api",
"reth-node-builder",
"reth-node-ethereum",
"reth-node-optimism",
"reth-payload-builder",
"reth-primitives",
"reth-provider",
@ -6766,7 +6783,8 @@ dependencies = [
"reth-interfaces",
"reth-metrics",
"reth-node-api",
"reth-node-builder",
"reth-node-ethereum",
"reth-node-optimism",
"reth-payload-builder",
"reth-primitives",
"reth-provider",
@ -6862,7 +6880,8 @@ dependencies = [
"reth-eth-wire",
"reth-interfaces",
"reth-metrics",
"reth-node-builder",
"reth-node-ethereum",
"reth-node-optimism",
"reth-primitives",
"reth-provider",
"reth-revm",

View File

@ -36,7 +36,8 @@ members = [
"crates/rpc/rpc-testing-util/",
"crates/rpc/rpc-types/",
"crates/rpc/rpc-types-compat/",
"crates/node-builder/",
"crates/node-ethereum/",
"crates/node-optimism/",
"crates/node-core/",
"crates/node-api/",
"crates/snapshot/",
@ -121,7 +122,8 @@ reth-consensus-common = { path = "crates/consensus/common" }
reth-db = { path = "crates/storage/db" }
reth-discv4 = { path = "crates/net/discv4" }
reth-dns-discovery = { path = "crates/net/dns" }
reth-node-builder = { path = "crates/node-builder" }
reth-node-ethereum = { path = "crates/node-ethereum" }
reth-node-optimism = { path = "crates/node-optimism" }
reth-node-core = { path = "crates/node-core" }
reth-node-api = { path = "crates/node-api" }
reth-downloaders = { path = "crates/net/downloaders" }

View File

@ -54,7 +54,8 @@ reth-snapshot = { workspace = true, features = ["clap"] }
reth-trie.workspace = true
reth-nippy-jar.workspace = true
reth-node-api.workspace = true
reth-node-builder.workspace = true
reth-node-ethereum.workspace = true
reth-node-optimism = { workspace = true, optional = true }
reth-node-core.workspace = true
# crypto
@ -150,7 +151,7 @@ optimism = [
"reth-optimism-payload-builder/optimism",
"reth-ethereum-payload-builder/optimism",
"reth-node-api/optimism",
"reth-node-builder/optimism",
"dep:reth-node-optimism",
"reth-node-core/optimism",
]

View File

@ -24,10 +24,6 @@ use reth_db::{
use reth_interfaces::p2p::either::EitherDownloader;
use reth_network::NetworkEvents;
use reth_network_api::{NetworkInfo, PeersInfo};
#[cfg(not(feature = "optimism"))]
use reth_node_builder::{EthEngineTypes, EthEvmConfig};
#[cfg(feature = "optimism")]
use reth_node_builder::{OptimismEngineTypes, OptimismEvmConfig};
use reth_node_core::{
cli::{
components::{RethNodeComponentsImpl, RethRpcServerHandles},
@ -38,6 +34,10 @@ use reth_node_core::{
dirs::{ChainPath, DataDirPath},
version::SHORT_VERSION,
};
#[cfg(not(feature = "optimism"))]
use reth_node_ethereum::{EthEngineTypes, EthEvmConfig};
#[cfg(feature = "optimism")]
use reth_node_optimism::{OptimismEngineTypes, OptimismEvmConfig};
use reth_payload_builder::PayloadBuilderHandle;
use reth_primitives::DisplayHardforks;
use reth_provider::{providers::BlockchainProvider, ProviderFactory};

View File

@ -15,9 +15,9 @@ use reth_db::{init_db, mdbx::DatabaseArguments, DatabaseEnv};
use reth_interfaces::{consensus::Consensus, RethResult};
use reth_node_api::PayloadBuilderAttributes;
#[cfg(not(feature = "optimism"))]
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
#[cfg(feature = "optimism")]
use reth_node_builder::OptimismEvmConfig;
use reth_node_optimism::OptimismEvmConfig;
use reth_payload_builder::database::CachedReads;
#[cfg(feature = "optimism")]
use reth_payload_builder::OptimismPayloadBuilderAttributes;

View File

@ -27,7 +27,7 @@ use reth_interfaces::{
};
use reth_network::{NetworkEvents, NetworkHandle};
use reth_network_api::NetworkInfo;
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{fs, stage::StageId, BlockHashOrNumber, BlockNumber, ChainSpec, B256};
use reth_provider::{BlockExecutionWriter, HeaderSyncMode, ProviderFactory, StageCheckpointReader};
use reth_stages::{

View File

@ -17,7 +17,7 @@ use reth_db::{init_db, mdbx::DatabaseArguments, DatabaseEnv};
use reth_interfaces::executor::BlockValidationError;
use reth_network::NetworkHandle;
use reth_network_api::NetworkInfo;
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{fs, stage::StageId, BlockHashOrNumber, ChainSpec};
use reth_provider::{
AccountExtReader, BlockWriter, ExecutorFactory, HashingWriter, HeaderProvider,

View File

@ -20,7 +20,7 @@ use reth_db::{
use reth_interfaces::{consensus::Consensus, p2p::full_block::FullBlockClient};
use reth_network::NetworkHandle;
use reth_network_api::NetworkInfo;
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{
fs,
stage::{StageCheckpoint, StageId},

View File

@ -21,9 +21,9 @@ use reth_interfaces::consensus::Consensus;
use reth_network::NetworkHandle;
use reth_network_api::NetworkInfo;
#[cfg(not(feature = "optimism"))]
use reth_node_builder::{EthEngineTypes, EthEvmConfig};
use reth_node_ethereum::{EthEngineTypes, EthEvmConfig};
#[cfg(feature = "optimism")]
use reth_node_builder::{OptimismEngineTypes, OptimismEvmConfig};
use reth_node_optimism::{OptimismEngineTypes, OptimismEvmConfig};
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
use reth_primitives::{fs, ChainSpec};
use reth_provider::{providers::BlockchainProvider, CanonStateSubscriptions, ProviderFactory};

View File

@ -16,7 +16,7 @@ use reth_downloaders::{
headers::reverse_headers::ReverseHeadersDownloaderBuilder,
};
use reth_interfaces::consensus::Consensus;
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{stage::StageId, ChainSpec, B256};
use reth_provider::{HeaderSyncMode, ProviderFactory, StageCheckpointReader};
use reth_stages::{

View File

@ -5,7 +5,7 @@ use reth_db::{
cursor::DbCursorRO, database::Database, table::TableImporter, tables, transaction::DbTx,
DatabaseEnv,
};
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{stage::StageCheckpoint, ChainSpec};
use reth_provider::ProviderFactory;
use reth_revm::EvmProcessorFactory;

View File

@ -2,7 +2,7 @@ use super::setup;
use crate::utils::DbTool;
use eyre::Result;
use reth_db::{database::Database, table::TableImporter, tables, DatabaseEnv};
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{stage::StageCheckpoint, BlockNumber, ChainSpec, PruneModes};
use reth_provider::ProviderFactory;
use reth_stages::{

View File

@ -17,7 +17,7 @@ use reth_beacon_consensus::BeaconConsensus;
use reth_config::Config;
use reth_db::{init_db, mdbx::DatabaseArguments};
use reth_downloaders::bodies::bodies::BodiesDownloaderBuilder;
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::ChainSpec;
use reth_provider::{ProviderFactory, StageCheckpointReader};
use reth_stages::{

View File

@ -45,7 +45,8 @@ reth-interfaces = { workspace = true, features = ["test-utils"] }
reth-primitives = { workspace = true , features = ["test-utils"] }
reth-provider = { workspace = true, features = ["test-utils"] }
reth-revm.workspace = true
reth-node-builder.workspace = true
reth-node-ethereum.workspace = true
reth-node-optimism.workspace = true
parking_lot.workspace = true
assert_matches.workspace = true

View File

@ -1239,7 +1239,7 @@ mod tests {
use linked_hash_set::LinkedHashSet;
use reth_db::{tables, test_utils::TempDatabase, transaction::DbTxMut, DatabaseEnv};
use reth_interfaces::test_utils::TestConsensus;
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{
constants::{EIP1559_INITIAL_BASE_FEE, EMPTY_ROOT_HASH, ETHEREUM_BLOCK_GAS_LIMIT},
keccak256,

View File

@ -21,7 +21,7 @@ reth-stages.workspace = true
reth-revm.workspace = true
reth-transaction-pool.workspace = true
reth-node-api.workspace = true
reth-node-builder.workspace = true
reth-node-ethereum.workspace = true
# async

View File

@ -55,7 +55,8 @@ reth-rpc-types-compat.workspace = true
reth-tracing.workspace = true
reth-revm.workspace = true
reth-downloaders.workspace = true
reth-node-builder.workspace = true
reth-node-ethereum.workspace = true
reth-node-optimism.workspace = true
assert_matches.workspace = true
@ -67,4 +68,5 @@ optimism = [
"reth-rpc-types/optimism",
"reth-payload-builder/optimism",
"reth-blockchain-tree/optimism",
"reth-node-api/optimism",
]

View File

@ -22,7 +22,7 @@ use reth_interfaces::{
sync::NoopSyncStateUpdater,
test_utils::{NoopFullBlockClient, TestConsensus},
};
use reth_node_builder::{EthEngineTypes, EthEvmConfig};
use reth_node_ethereum::{EthEngineTypes, EthEvmConfig};
use reth_payload_builder::test_utils::spawn_test_payload_service;
use reth_primitives::{BlockNumber, ChainSpec, PruneModes, Receipt, B256, U256};
use reth_provider::{

View File

@ -0,0 +1,21 @@
[package]
name = "reth-node-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.workspace = true
reth-payload-builder.workspace = true
reth-rpc-types.workspace = true
reth-node-api.workspace = true
# io
serde.workspace = true

View File

@ -1,4 +1,4 @@
//! Standalone crate for Reth configuration and builder types.
//! Standalone crate for ethereum-specific Reth configuration and builder types.
#![doc(
html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
@ -16,9 +16,3 @@ pub use engine::EthEngineTypes;
/// trait.
pub mod evm;
pub use evm::EthEvmConfig;
/// Exports optimism-specific types that implement traits in [reth_node_api].
#[cfg(feature = "optimism")]
pub mod optimism;
#[cfg(feature = "optimism")]
pub use optimism::{OptimismEngineTypes, OptimismEvmConfig};

View File

@ -1,5 +1,5 @@
[package]
name = "reth-node-builder"
name = "reth-node-optimism"
version.workspace = true
edition.workspace = true
rust-version.workspace = true

View File

@ -0,0 +1,26 @@
use reth_node_api::{
optimism_validate_version_specific_fields, AttributesValidationError, EngineApiMessageVersion,
EngineTypes, PayloadOrAttributes,
};
use reth_payload_builder::{EthBuiltPayload, OptimismPayloadBuilderAttributes};
use reth_primitives::ChainSpec;
use reth_rpc_types::engine::OptimismPayloadAttributes;
/// The types used in the optimism beacon consensus engine.
#[derive(Debug, Default, Clone)]
#[non_exhaustive]
pub struct OptimismEngineTypes;
impl EngineTypes for OptimismEngineTypes {
type PayloadAttributes = OptimismPayloadAttributes;
type PayloadBuilderAttributes = OptimismPayloadBuilderAttributes;
type BuiltPayload = EthBuiltPayload;
fn validate_version_specific_fields(
chain_spec: &ChainSpec,
version: EngineApiMessageVersion,
payload_or_attrs: PayloadOrAttributes<'_, OptimismPayloadAttributes>,
) -> Result<(), AttributesValidationError> {
optimism_validate_version_specific_fields(chain_spec, version, payload_or_attrs)
}
}

View File

@ -1,34 +1,9 @@
#![cfg(feature = "optimism")]
use reth_node_api::{
optimism_validate_version_specific_fields, AttributesValidationError, EngineApiMessageVersion,
EngineTypes, EvmEnvConfig, PayloadOrAttributes,
};
use reth_payload_builder::{EthBuiltPayload, OptimismPayloadBuilderAttributes};
use reth_node_api::EvmEnvConfig;
use reth_primitives::{
revm::{config::revm_spec, env::fill_op_tx_env},
revm_primitives::{AnalysisKind, CfgEnv, TxEnv},
Address, Bytes, ChainSpec, Head, Header, Transaction, U256,
};
use reth_rpc_types::engine::OptimismPayloadAttributes;
/// The types used in the optimism beacon consensus engine.
#[derive(Debug, Default, Clone)]
#[non_exhaustive]
pub struct OptimismEngineTypes;
impl EngineTypes for OptimismEngineTypes {
type PayloadAttributes = OptimismPayloadAttributes;
type PayloadBuilderAttributes = OptimismPayloadBuilderAttributes;
type BuiltPayload = EthBuiltPayload;
fn validate_version_specific_fields(
chain_spec: &ChainSpec,
version: EngineApiMessageVersion,
payload_or_attrs: PayloadOrAttributes<'_, OptimismPayloadAttributes>,
) -> Result<(), AttributesValidationError> {
optimism_validate_version_specific_fields(chain_spec, version, payload_or_attrs)
}
}
/// Optimism-related EVM configuration.
#[derive(Debug, Default, Clone, Copy)]
@ -70,3 +45,29 @@ impl EvmEnvConfig for OptimismEvmConfig {
cfg_env.optimism = chain_spec.is_optimism();
}
}
#[cfg(test)]
mod tests {
use super::*;
use reth_primitives::revm_primitives::BlockEnv;
#[test]
#[ignore]
fn test_fill_cfg_and_block_env() {
let mut cfg_env = CfgEnv::default();
let mut block_env = BlockEnv::default();
let header = Header::default();
let chain_spec = ChainSpec::default();
let total_difficulty = U256::ZERO;
OptimismEvmConfig::fill_cfg_and_block_env(
&mut cfg_env,
&mut block_env,
&chain_spec,
&header,
total_difficulty,
);
assert_eq!(cfg_env.chain_id, chain_spec.chain().id());
}
}

View File

@ -0,0 +1,20 @@
//! Standalone crate for Optimism-specific Reth configuration and builder types.
#![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(docsrs, feature(doc_cfg, doc_auto_cfg))]
// The `optimism` feature must be enabled to use this crate.
#![cfg(feature = "optimism")]
/// Exports optimism-specific implementations of the [EngineTypes](reth_node_api::EngineTypes)
/// trait.
pub mod engine;
pub use engine::OptimismEngineTypes;
/// Exports optimism-specific implementations of the [EvmEnvConfig](reth_node_api::EvmEnvConfig)
/// trait.
pub mod evm;
pub use evm::OptimismEvmConfig;

View File

@ -28,7 +28,8 @@ tracing.workspace = true
[dev-dependencies]
reth-trie.workspace = true
reth-node-builder.workspace = true
reth-node-ethereum.workspace = true
reth-node-optimism.workspace = true
[features]
optimism = [

View File

@ -556,7 +556,7 @@ pub fn verify_receipt<'a>(
mod tests {
use super::*;
use reth_interfaces::provider::ProviderResult;
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{
bytes,
constants::{BEACON_ROOTS_ADDRESS, SYSTEM_ADDRESS},

View File

@ -26,7 +26,8 @@ reth-tasks.workspace = true
reth-transaction-pool.workspace = true
reth-rpc-types-compat.workspace = true
reth-node-api.workspace = true
reth-node-builder.workspace = true
reth-node-optimism = { workspace = true, optional = true }
reth-node-ethereum.workspace = true
# rpc/net
jsonrpsee = { workspace = true, features = ["server"] }
@ -53,7 +54,6 @@ reth-network-api.workspace = true
reth-interfaces = { workspace = true, features = ["test-utils"] }
reth-beacon-consensus.workspace = true
reth-payload-builder = { workspace = true, features = ["test-utils"] }
reth-node-builder.workspace = true
tokio = { workspace = true, features = ["rt", "rt-multi-thread"] }
serde_json.workspace = true

View File

@ -168,7 +168,7 @@ use jsonrpsee::{
Methods, RpcModule,
};
use reth_node_api::{EngineTypes, EvmEnvConfig};
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use serde::{Deserialize, Serialize, Serializer};
use strum::{AsRefStr, EnumIter, EnumVariantNames, IntoStaticStr, ParseError, VariantNames};
use tower::layer::util::{Identity, Stack};

View File

@ -2,7 +2,7 @@
use crate::utils::launch_auth;
use jsonrpsee::core::client::{ClientT, SubscriptionClientT};
use reth_node_builder::EthEngineTypes;
use reth_node_ethereum::EthEngineTypes;
use reth_primitives::{Block, U64};
use reth_rpc::JwtSecret;
use reth_rpc_api::clients::EngineApiClient;

View File

@ -1,6 +1,6 @@
use reth_beacon_consensus::BeaconConsensusEngineHandle;
use reth_network_api::noop::NoopNetwork;
use reth_node_builder::{EthEngineTypes, EthEvmConfig};
use reth_node_ethereum::{EthEngineTypes, EthEvmConfig};
use reth_payload_builder::test_utils::spawn_test_payload_service;
use reth_primitives::MAINNET;
use reth_provider::test_utils::{NoopProvider, TestCanonStateSubscriptions};

View File

@ -41,7 +41,8 @@ serde.workspace = true
[dev-dependencies]
alloy-rlp.workspace = true
reth-node-builder.workspace = true
reth-node-ethereum.workspace = true
reth-node-optimism.workspace = true
reth-interfaces = { workspace = true, features = ["test-utils"] }
reth-provider = { workspace = true, features = ["test-utils"] }
reth-payload-builder = { workspace = true, features = ["test-utils"] }

View File

@ -687,7 +687,7 @@ mod tests {
use assert_matches::assert_matches;
use reth_beacon_consensus::BeaconEngineMessage;
use reth_interfaces::test_utils::generators::random_block;
use reth_node_builder::EthEngineTypes;
use reth_node_ethereum::EthEngineTypes;
use reth_payload_builder::test_utils::spawn_test_payload_service;
use reth_primitives::{SealedBlock, B256, MAINNET};
use reth_provider::test_utils::MockEthProvider;

View File

@ -83,7 +83,8 @@ jsonrpsee = { workspace = true, features = ["client"] }
assert_matches.workspace = true
tempfile.workspace = true
reth-interfaces = { workspace = true, features = ["test-utils"] }
reth-node-builder.workspace = true
reth-node-ethereum.workspace = true
reth-node-optimism.workspace = true
[features]
optimism = [

View File

@ -404,7 +404,7 @@ mod tests {
use jsonrpsee::types::error::INVALID_PARAMS_CODE;
use reth_interfaces::test_utils::{generators, generators::Rng};
use reth_network_api::noop::NoopNetwork;
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{
basefee::calculate_next_block_base_fee, constants::ETHEREUM_BLOCK_GAS_LIMIT, BaseFeeParams,
Block, BlockNumberOrTag, Header, TransactionSigned, B256, U256,

View File

@ -133,7 +133,7 @@ mod tests {
},
BlockingTaskPool,
};
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{constants::ETHEREUM_BLOCK_GAS_LIMIT, StorageKey, StorageValue};
use reth_provider::test_utils::{ExtendedAccount, MockEthProvider, NoopProvider};
use reth_transaction_pool::test_utils::testing_pool;

View File

@ -1295,7 +1295,7 @@ mod tests {
BlockingTaskPool, EthApi,
};
use reth_network_api::noop::NoopNetwork;
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{constants::ETHEREUM_BLOCK_GAS_LIMIT, hex_literal::hex, Bytes};
use reth_provider::test_utils::NoopProvider;
use reth_transaction_pool::{test_utils::testing_pool, TransactionPool};

View File

@ -62,7 +62,8 @@ reth-db = { workspace = true, features = ["test-utils", "mdbx"] }
reth-interfaces = { workspace = true, features = ["test-utils"] }
reth-downloaders.workspace = true
reth-eth-wire.workspace = true # TODO(onbjerg): We only need this for [BlockBody]
reth-node-builder.workspace = true
reth-node-ethereum.workspace = true
reth-node-optimism.workspace = true
reth-blockchain-tree.workspace = true
reth-revm.workspace = true
reth-trie = { workspace = true, features = ["test-utils"] }

View File

@ -22,7 +22,7 @@
//! # use reth_stages::Pipeline;
//! # use reth_stages::sets::DefaultStages;
//! # use tokio::sync::watch;
//! # use reth_node_builder::EthEvmConfig;
//! # use reth_node_ethereum::EthEvmConfig;
//! # use reth_provider::ProviderFactory;
//! # use reth_provider::HeaderSyncMode;
//! # use reth_provider::test_utils::create_test_provider_factory;

View File

@ -14,7 +14,7 @@
//! # use reth_stages::sets::{OfflineStages};
//! # use reth_revm::EvmProcessorFactory;
//! # use reth_primitives::MAINNET;
//! # use reth_node_builder::EthEvmConfig;
//! # use reth_node_ethereum::EthEvmConfig;
//! # use reth_provider::test_utils::create_test_provider_factory;
//!
//! # let executor_factory = EvmProcessorFactory::new(MAINNET.clone(), EthEvmConfig::default());
@ -27,7 +27,7 @@
//! # use reth_stages::Pipeline;
//! # use reth_stages::{StageSet, sets::OfflineStages};
//! # use reth_revm::EvmProcessorFactory;
//! # use reth_node_builder::EthEvmConfig;
//! # use reth_node_ethereum::EthEvmConfig;
//! # use reth_primitives::MAINNET;
//! // Build a pipeline with all offline stages and a custom stage at the end.
//! # let executor_factory = EvmProcessorFactory::new(MAINNET.clone(), EthEvmConfig::default());

View File

@ -502,7 +502,7 @@ mod tests {
use assert_matches::assert_matches;
use reth_db::{models::AccountBeforeTx, test_utils::create_test_rw_db};
use reth_interfaces::executor::BlockValidationError;
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{
address, hex_literal::hex, keccak256, stage::StageUnitCheckpoint, Account, Bytecode,
ChainSpecBuilder, PruneModes, SealedBlock, StorageEntry, B256, MAINNET, U256,

View File

@ -55,7 +55,7 @@ mod tests {
AccountHistory, DatabaseEnv,
};
use reth_interfaces::test_utils::generators::{self, random_block};
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{
address, hex_literal::hex, keccak256, Account, Bytecode, ChainSpecBuilder, PruneMode,
PruneModes, SealedBlock, U256,

View File

@ -21,7 +21,7 @@ reth-provider.workspace = true
reth-stages.workspace = true
reth-interfaces.workspace = true
reth-revm.workspace = true
reth-node-builder.workspace = true
reth-node-ethereum.workspace = true
alloy-rlp.workspace = true
tokio = "1.28.1"

View File

@ -6,7 +6,7 @@ use crate::{
};
use alloy_rlp::Decodable;
use reth_db::test_utils::create_test_rw_db;
use reth_node_builder::EthEvmConfig;
use reth_node_ethereum::EthEvmConfig;
use reth_primitives::{BlockBody, SealedBlock};
use reth_provider::{BlockWriter, HashingWriter, ProviderFactory};
use reth_stages::{stages::ExecutionStage, ExecInput, Stage};