From c65a4b2ca91f52e804a3bd3b62455250c04eb4ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Anda=20Estensen?= Date: Wed, 18 Sep 2024 16:45:26 +0200 Subject: [PATCH] cli: replace reth-primitive imports with alloy-eips --- Cargo.lock | 1 + crates/cli/commands/Cargo.toml | 1 + crates/cli/commands/src/p2p/mod.rs | 2 +- crates/cli/commands/src/stage/run.rs | 2 +- crates/cli/commands/src/stage/unwind.rs | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3afbb3dbbe76..482d26a4e08a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6462,6 +6462,7 @@ name = "reth-cli-commands" version = "1.0.6" dependencies = [ "ahash", + "alloy-eips", "alloy-primitives", "arbitrary", "backon", diff --git a/crates/cli/commands/Cargo.toml b/crates/cli/commands/Cargo.toml index 58f6ed86c145..dd300229ff9a 100644 --- a/crates/cli/commands/Cargo.toml +++ b/crates/cli/commands/Cargo.toml @@ -44,6 +44,7 @@ reth-trie = { workspace = true, features = ["metrics"] } reth-trie-db = { workspace = true, features = ["metrics"] } # ethereum +alloy-eips.workspace = true alloy-primitives.workspace = true itertools.workspace = true diff --git a/crates/cli/commands/src/p2p/mod.rs b/crates/cli/commands/src/p2p/mod.rs index 4622c638b0c3..e8eadddbd906 100644 --- a/crates/cli/commands/src/p2p/mod.rs +++ b/crates/cli/commands/src/p2p/mod.rs @@ -2,6 +2,7 @@ use std::{path::PathBuf, sync::Arc}; +use alloy_eips::BlockHashOrNumber; use backon::{ConstantBuilder, Retryable}; use clap::{Parser, Subcommand}; use reth_chainspec::ChainSpec; @@ -14,7 +15,6 @@ use reth_node_core::{ args::{DatabaseArgs, DatadirArgs, NetworkArgs}, utils::get_single_header, }; -use reth_primitives::BlockHashOrNumber; mod rlpx; diff --git a/crates/cli/commands/src/stage/run.rs b/crates/cli/commands/src/stage/run.rs index b80c2724c4df..afa732659a8a 100644 --- a/crates/cli/commands/src/stage/run.rs +++ b/crates/cli/commands/src/stage/run.rs @@ -3,6 +3,7 @@ //! Stage debugging tool use crate::common::{AccessRights, Environment, EnvironmentArgs}; +use alloy_eips::BlockHashOrNumber; use clap::Parser; use reth_beacon_consensus::EthBeaconConsensus; use reth_chainspec::ChainSpec; @@ -21,7 +22,6 @@ use reth_network_p2p::HeadersClient; use reth_node_builder::NodeTypesWithEngine; use reth_node_core::{ args::{NetworkArgs, StageEnum}, - primitives::BlockHashOrNumber, version::{ BUILD_PROFILE_NAME, CARGO_PKG_VERSION, VERGEN_BUILD_TIMESTAMP, VERGEN_CARGO_FEATURES, VERGEN_CARGO_TARGET_TRIPLE, VERGEN_GIT_SHA, diff --git a/crates/cli/commands/src/stage/unwind.rs b/crates/cli/commands/src/stage/unwind.rs index 1b0a99caae36..6c7bdebd1184 100644 --- a/crates/cli/commands/src/stage/unwind.rs +++ b/crates/cli/commands/src/stage/unwind.rs @@ -1,6 +1,7 @@ //! Unwinding a certain block range use crate::common::{AccessRights, Environment, EnvironmentArgs}; +use alloy_eips::BlockHashOrNumber; use alloy_primitives::{BlockNumber, B256}; use clap::{Parser, Subcommand}; use reth_beacon_consensus::EthBeaconConsensus; @@ -14,7 +15,6 @@ use reth_evm::noop::NoopBlockExecutorProvider; use reth_exex::ExExManagerHandle; use reth_node_builder::{NodeTypesWithDB, NodeTypesWithEngine}; use reth_node_core::args::NetworkArgs; -use reth_primitives::BlockHashOrNumber; use reth_provider::{ BlockExecutionWriter, BlockNumReader, ChainSpecProvider, FinalizedBlockReader, FinalizedBlockWriter, ProviderFactory, StaticFileProviderFactory,