From d7e822f9d64af4a3f1974edb88fa168b48a57d6e Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 29 May 2024 17:05:18 +0200 Subject: [PATCH] chore: rm reth-interfaces from bin reth (#8483) --- Cargo.lock | 3 ++- bin/reth/Cargo.toml | 3 ++- bin/reth/src/commands/debug_cmd/build_block.rs | 2 +- bin/reth/src/commands/debug_cmd/execution.rs | 2 +- bin/reth/src/commands/debug_cmd/in_memory_merkle.rs | 2 +- bin/reth/src/commands/debug_cmd/merkle.rs | 2 +- bin/reth/src/commands/import.rs | 2 +- bin/reth/src/commands/p2p/mod.rs | 2 +- 8 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 161f886c348a..d8ac32984369 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6405,13 +6405,14 @@ dependencies = [ "reth-discv4", "reth-discv5", "reth-downloaders", + "reth-errors", "reth-ethereum-payload-builder", "reth-evm", "reth-exex", "reth-fs-util", - "reth-interfaces", "reth-network", "reth-network-api", + "reth-network-p2p", "reth-nippy-jar", "reth-node-api", "reth-node-builder", diff --git a/bin/reth/Cargo.toml b/bin/reth/Cargo.toml index 35c5c814aa55..4b6657c947ba 100644 --- a/bin/reth/Cargo.toml +++ b/bin/reth/Cargo.toml @@ -23,7 +23,7 @@ reth-provider = { workspace = true } reth-evm.workspace = true reth-revm.workspace = true reth-stages.workspace = true -reth-interfaces = { workspace = true, features = ["clap"] } +reth-errors.workspace = true reth-transaction-pool.workspace = true reth-beacon-consensus.workspace = true reth-cli-runner.workspace = true @@ -35,6 +35,7 @@ reth-rpc-types.workspace = true reth-rpc-types-compat.workspace = true reth-rpc-api = { workspace = true, features = ["client"] } reth-network = { workspace = true, features = ["serde"] } +reth-network-p2p.workspace = true reth-network-api.workspace = true reth-downloaders.workspace = true reth-tracing.workspace = true diff --git a/bin/reth/src/commands/debug_cmd/build_block.rs b/bin/reth/src/commands/debug_cmd/build_block.rs index 7914ec7829de..7760f3a92d69 100644 --- a/bin/reth/src/commands/debug_cmd/build_block.rs +++ b/bin/reth/src/commands/debug_cmd/build_block.rs @@ -21,9 +21,9 @@ use reth_blockchain_tree::{ use reth_cli_runner::CliContext; use reth_consensus::Consensus; use reth_db::{init_db, DatabaseEnv}; +use reth_errors::RethResult; use reth_evm::execute::{BlockExecutionOutput, BlockExecutorProvider, Executor}; use reth_fs_util as fs; -use reth_interfaces::RethResult; use reth_node_api::PayloadBuilderAttributes; use reth_payload_builder::database::CachedReads; use reth_primitives::{ diff --git a/bin/reth/src/commands/debug_cmd/execution.rs b/bin/reth/src/commands/debug_cmd/execution.rs index 628a6cd2621c..87e122b4c061 100644 --- a/bin/reth/src/commands/debug_cmd/execution.rs +++ b/bin/reth/src/commands/debug_cmd/execution.rs @@ -24,9 +24,9 @@ use reth_downloaders::{ }; use reth_exex::ExExManagerHandle; use reth_fs_util as fs; -use reth_interfaces::p2p::{bodies::client::BodiesClient, headers::client::HeadersClient}; use reth_network::{NetworkEvents, NetworkHandle}; use reth_network_api::NetworkInfo; +use reth_network_p2p::{bodies::client::BodiesClient, headers::client::HeadersClient}; use reth_primitives::{ stage::StageId, BlockHashOrNumber, BlockNumber, ChainSpec, PruneModes, B256, }; diff --git a/bin/reth/src/commands/debug_cmd/in_memory_merkle.rs b/bin/reth/src/commands/debug_cmd/in_memory_merkle.rs index 6f7a580a4b70..4a38bec01f8a 100644 --- a/bin/reth/src/commands/debug_cmd/in_memory_merkle.rs +++ b/bin/reth/src/commands/debug_cmd/in_memory_merkle.rs @@ -15,9 +15,9 @@ use clap::Parser; use reth_cli_runner::CliContext; use reth_config::Config; use reth_db::{init_db, DatabaseEnv}; +use reth_errors::BlockValidationError; use reth_evm::execute::{BlockExecutionOutput, BlockExecutorProvider, Executor}; use reth_fs_util as fs; -use reth_interfaces::executor::BlockValidationError; use reth_network::NetworkHandle; use reth_network_api::NetworkInfo; use reth_primitives::{stage::StageId, BlockHashOrNumber, ChainSpec, Receipts}; diff --git a/bin/reth/src/commands/debug_cmd/merkle.rs b/bin/reth/src/commands/debug_cmd/merkle.rs index bfbca46f4ff4..83562d967157 100644 --- a/bin/reth/src/commands/debug_cmd/merkle.rs +++ b/bin/reth/src/commands/debug_cmd/merkle.rs @@ -19,9 +19,9 @@ use reth_consensus::Consensus; use reth_db::{cursor::DbCursorRO, init_db, tables, transaction::DbTx, DatabaseEnv}; use reth_evm::execute::{BatchBlockExecutionOutput, BatchExecutor, BlockExecutorProvider}; use reth_fs_util as fs; -use reth_interfaces::p2p::full_block::FullBlockClient; use reth_network::NetworkHandle; use reth_network_api::NetworkInfo; +use reth_network_p2p::full_block::FullBlockClient; use reth_primitives::{stage::StageCheckpoint, BlockHashOrNumber, ChainSpec, PruneModes}; use reth_provider::{ BlockNumReader, BlockWriter, BundleStateWithReceipts, HeaderProvider, LatestStateProviderRef, diff --git a/bin/reth/src/commands/import.rs b/bin/reth/src/commands/import.rs index 71268fa8e1bb..869bcefbd643 100644 --- a/bin/reth/src/commands/import.rs +++ b/bin/reth/src/commands/import.rs @@ -22,7 +22,7 @@ use reth_downloaders::{ file_client::{ChunkedFileReader, FileClient, DEFAULT_BYTE_LEN_CHUNK_CHAIN_FILE}, headers::reverse_headers::ReverseHeadersDownloaderBuilder, }; -use reth_interfaces::p2p::{ +use reth_network_p2p::{ bodies::downloader::BodyDownloader, headers::downloader::{HeaderDownloader, SyncTarget}, }; diff --git a/bin/reth/src/commands/p2p/mod.rs b/bin/reth/src/commands/p2p/mod.rs index b6710a363a99..8764d448631e 100644 --- a/bin/reth/src/commands/p2p/mod.rs +++ b/bin/reth/src/commands/p2p/mod.rs @@ -14,8 +14,8 @@ use clap::{Parser, Subcommand}; use discv5::ListenConfig; use reth_config::Config; use reth_db::create_db; -use reth_interfaces::p2p::bodies::client::BodiesClient; use reth_network::NetworkConfigBuilder; +use reth_network_p2p::bodies::client::BodiesClient; use reth_primitives::{BlockHashOrNumber, ChainSpec}; use reth_provider::ProviderFactory; use std::{