mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
cli: replace reth-primitive imports (#10777)
This commit is contained in:
committed by
GitHub
parent
7a20b413f5
commit
de36c31795
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6428,6 +6428,7 @@ name = "reth-cli-commands"
|
||||
version = "1.0.6"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"alloy-primitives",
|
||||
"arbitrary",
|
||||
"backon",
|
||||
"clap",
|
||||
|
||||
@ -10,6 +10,7 @@ repository.workspace = true
|
||||
[lints]
|
||||
|
||||
[dependencies]
|
||||
# reth
|
||||
reth-beacon-consensus.workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-cli.workspace = true
|
||||
@ -42,6 +43,9 @@ reth-static-file.workspace = true
|
||||
reth-trie = { workspace = true, features = ["metrics"] }
|
||||
reth-trie-db = { workspace = true, features = ["metrics"] }
|
||||
|
||||
# ethereum
|
||||
alloy-primitives.workspace = true
|
||||
|
||||
itertools.workspace = true
|
||||
futures.workspace = true
|
||||
tokio.workspace = true
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
//! Contains common `reth` arguments
|
||||
|
||||
use alloy_primitives::B256;
|
||||
use clap::Parser;
|
||||
use reth_beacon_consensus::EthBeaconConsensus;
|
||||
use reth_chainspec::ChainSpec;
|
||||
@ -14,7 +15,6 @@ use reth_node_core::{
|
||||
args::{DatabaseArgs, DatadirArgs},
|
||||
dirs::{ChainPath, DataDirPath},
|
||||
};
|
||||
use reth_primitives::B256;
|
||||
use reth_provider::{providers::StaticFileProvider, ProviderFactory, StaticFileProviderFactory};
|
||||
use reth_stages::{sets::DefaultStages, Pipeline, PipelineTarget};
|
||||
use reth_static_file::StaticFileProducer;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
use alloy_primitives::BlockHash;
|
||||
use clap::Parser;
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_db::{
|
||||
@ -7,7 +8,7 @@ use reth_db::{
|
||||
use reth_db_api::table::{Decompress, DupSort, Table};
|
||||
use reth_db_common::DbTool;
|
||||
use reth_node_builder::NodeTypesWithDB;
|
||||
use reth_primitives::{BlockHash, Header};
|
||||
use reth_primitives::Header;
|
||||
use reth_provider::StaticFileProviderFactory;
|
||||
use reth_static_file_types::StaticFileSegment;
|
||||
use tracing::error;
|
||||
@ -204,10 +205,10 @@ pub(crate) fn maybe_json_value_parser(value: &str) -> Result<String, eyre::Error
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use alloy_primitives::{Address, B256};
|
||||
use clap::{Args, Parser};
|
||||
use reth_db::{AccountsHistory, HashedAccounts, Headers, StageCheckpoints, StoragesHistory};
|
||||
use reth_db_api::models::{storage_sharded_key::StorageShardedKey, ShardedKey};
|
||||
use reth_primitives::{Address, B256};
|
||||
use std::str::FromStr;
|
||||
|
||||
/// A helper type to parse Args more easily
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
use super::tui::DbListTUI;
|
||||
use alloy_primitives::hex;
|
||||
use clap::Parser;
|
||||
use eyre::WrapErr;
|
||||
use reth_chainspec::ChainSpec;
|
||||
@ -6,7 +7,6 @@ use reth_db::{DatabaseEnv, RawValue, TableViewer, Tables};
|
||||
use reth_db_api::{database::Database, table::Table};
|
||||
use reth_db_common::{DbTool, ListFilter};
|
||||
use reth_node_builder::{NodeTypesWithDBAdapter, NodeTypesWithEngine};
|
||||
use reth_primitives::hex;
|
||||
use std::{cell::RefCell, sync::Arc};
|
||||
use tracing::error;
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
//! Command that initializes the node by importing a chain from a file.
|
||||
use crate::common::{AccessRights, Environment, EnvironmentArgs};
|
||||
use alloy_primitives::B256;
|
||||
use clap::Parser;
|
||||
use futures::{Stream, StreamExt};
|
||||
use reth_beacon_consensus::EthBeaconConsensus;
|
||||
@ -22,7 +23,6 @@ use reth_network_p2p::{
|
||||
use reth_node_builder::{NodeTypesWithDB, NodeTypesWithEngine};
|
||||
use reth_node_core::version::SHORT_VERSION;
|
||||
use reth_node_events::node::NodeEvent;
|
||||
use reth_primitives::B256;
|
||||
use reth_provider::{
|
||||
BlockNumReader, ChainSpecProvider, HeaderProvider, ProviderError, ProviderFactory,
|
||||
StageCheckpointReader,
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
//! Command that initializes the node from a genesis file.
|
||||
|
||||
use crate::common::{AccessRights, Environment, EnvironmentArgs};
|
||||
use alloy_primitives::B256;
|
||||
use clap::Parser;
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_cli::chainspec::ChainSpecParser;
|
||||
use reth_config::config::EtlConfig;
|
||||
use reth_db_common::init::init_from_state_dump;
|
||||
use reth_node_builder::{NodeTypesWithDB, NodeTypesWithEngine};
|
||||
use reth_primitives::B256;
|
||||
use reth_provider::ProviderFactory;
|
||||
|
||||
use std::{fs::File, io::BufReader, path::PathBuf};
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::setup;
|
||||
use alloy_primitives::BlockNumber;
|
||||
use eyre::Result;
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_db::{tables, DatabaseEnv};
|
||||
@ -8,7 +9,6 @@ use reth_db_api::{database::Database, table::TableImporter};
|
||||
use reth_db_common::DbTool;
|
||||
use reth_node_builder::{NodeTypesWithDB, NodeTypesWithDBAdapter};
|
||||
use reth_node_core::dirs::{ChainPath, DataDirPath};
|
||||
use reth_primitives::BlockNumber;
|
||||
use reth_provider::{providers::StaticFileProvider, ProviderFactory};
|
||||
use reth_stages::{stages::AccountHashingStage, Stage, StageCheckpoint, UnwindInput};
|
||||
use tracing::info;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::setup;
|
||||
use alloy_primitives::BlockNumber;
|
||||
use eyre::Result;
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_config::config::EtlConfig;
|
||||
@ -11,7 +12,6 @@ use reth_evm::noop::NoopBlockExecutorProvider;
|
||||
use reth_exex::ExExManagerHandle;
|
||||
use reth_node_builder::{NodeTypesWithDB, NodeTypesWithDBAdapter};
|
||||
use reth_node_core::dirs::{ChainPath, DataDirPath};
|
||||
use reth_primitives::BlockNumber;
|
||||
use reth_provider::{providers::StaticFileProvider, ProviderFactory};
|
||||
use reth_prune::PruneModes;
|
||||
use reth_stages::{
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
//! Unwinding a certain block range
|
||||
|
||||
use crate::common::{AccessRights, Environment, EnvironmentArgs};
|
||||
use alloy_primitives::{BlockNumber, B256};
|
||||
use clap::{Parser, Subcommand};
|
||||
use reth_beacon_consensus::EthBeaconConsensus;
|
||||
use reth_chainspec::ChainSpec;
|
||||
@ -13,7 +14,7 @@ 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, BlockNumber, B256};
|
||||
use reth_primitives::BlockHashOrNumber;
|
||||
use reth_provider::{
|
||||
BlockExecutionWriter, BlockNumReader, ChainSpecProvider, FinalizedBlockReader,
|
||||
FinalizedBlockWriter, ProviderFactory, StaticFileProviderFactory,
|
||||
|
||||
Reference in New Issue
Block a user