diff --git a/Cargo.lock b/Cargo.lock index 0bdada0efe7b..38f323b6c32c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6279,34 +6279,26 @@ dependencies = [ name = "reth" version = "1.0.0" dependencies = [ - "ahash", "alloy-rlp", "aquamarine", "arbitrary", - "assert_matches", "backon", "clap", - "comfy-table", "confy", - "crossterm", "discv5", "eyre", "fdlimit", "futures", - "human_bytes", "itertools 0.13.0", - "jsonrpsee", "libc", "metrics-process", "proptest", "proptest-arbitrary-interop", - "rand 0.8.5", - "ratatui", - "rayon", "reth-basic-payload-builder", "reth-beacon-consensus", "reth-blockchain-tree", "reth-chainspec", + "reth-cli-commands", "reth-cli-runner", "reth-config", "reth-consensus", @@ -6315,7 +6307,6 @@ dependencies = [ "reth-db-api", "reth-db-common", "reth-discv4", - "reth-discv5", "reth-downloaders", "reth-engine-util", "reth-errors", @@ -6324,11 +6315,9 @@ dependencies = [ "reth-execution-types", "reth-exex", "reth-fs-util", - "reth-net-banlist", "reth-network", "reth-network-api", "reth-network-p2p", - "reth-nippy-jar", "reth-node-api", "reth-node-builder", "reth-node-core", @@ -6342,7 +6331,6 @@ dependencies = [ "reth-primitives", "reth-provider", "reth-prune", - "reth-prune-types", "reth-revm", "reth-rpc", "reth-rpc-api", @@ -6587,6 +6575,36 @@ dependencies = [ [[package]] name = "reth-cli-commands" version = "1.0.0" +dependencies = [ + "ahash", + "clap", + "comfy-table", + "confy", + "crossterm", + "eyre", + "human_bytes", + "itertools 0.13.0", + "ratatui", + "reth-beacon-consensus", + "reth-chainspec", + "reth-config", + "reth-db", + "reth-db-api", + "reth-db-common", + "reth-downloaders", + "reth-evm", + "reth-fs-util", + "reth-node-core", + "reth-primitives", + "reth-provider", + "reth-stages", + "reth-static-file", + "reth-static-file-types", + "serde", + "serde_json", + "tokio", + "tracing", +] [[package]] name = "reth-cli-runner" diff --git a/bin/reth/Cargo.toml b/bin/reth/Cargo.toml index 65c7c4f5911e..44edb0d9de3e 100644 --- a/bin/reth/Cargo.toml +++ b/bin/reth/Cargo.toml @@ -21,7 +21,7 @@ reth-fs-util.workspace = true reth-db = { workspace = true, features = ["mdbx"] } reth-db-api.workspace = true reth-exex.workspace = true -reth-provider = { workspace = true } +reth-provider.workspace = true reth-evm.workspace = true reth-revm.workspace = true reth-stages.workspace = true @@ -30,6 +30,7 @@ reth-errors.workspace = true reth-transaction-pool.workspace = true reth-beacon-consensus.workspace = true reth-cli-runner.workspace = true +reth-cli-commands.workspace = true reth-consensus-common.workspace = true reth-blockchain-tree.workspace = true reth-rpc-builder.workspace = true @@ -41,34 +42,29 @@ reth-rpc-eth-types.workspace = true reth-rpc-server-types.workspace = true reth-network = { workspace = true, features = ["serde"] } reth-network-p2p.workspace = true -reth-net-banlist.workspace = true reth-network-api.workspace = true reth-downloaders.workspace = true reth-tracing.workspace = true reth-tasks.workspace = true -reth-ethereum-payload-builder.workspace = true reth-payload-builder.workspace = true reth-payload-primitives.workspace = true reth-payload-validator.workspace = true reth-basic-payload-builder.workspace = true -reth-discv4.workspace = true -reth-discv5.workspace = true reth-static-file.workspace = true reth-static-file-types = { workspace = true, features = ["clap"] } reth-trie = { workspace = true, features = ["metrics"] } -reth-nippy-jar.workspace = true reth-node-api.workspace = true -reth-node-ethereum.workspace = true reth-node-optimism = { workspace = true, optional = true, features = [ "optimism", ] } reth-node-core.workspace = true +reth-ethereum-payload-builder.workspace = true reth-db-common.workspace = true +reth-node-ethereum.workspace = true reth-node-builder.workspace = true reth-node-events.workspace = true reth-consensus.workspace = true reth-optimism-primitives.workspace = true -reth-prune-types.workspace = true reth-engine-util.workspace = true reth-prune.workspace = true @@ -92,15 +88,7 @@ metrics-process.workspace = true proptest.workspace = true arbitrary.workspace = true proptest-arbitrary-interop.workspace = true -rand.workspace = true -# tui -comfy-table = "7.1" -crossterm = "0.27.0" -ratatui = { version = "0.27", default-features = false, features = [ - "crossterm", -] } -human_bytes = "0.4.1" # async tokio = { workspace = true, features = [ @@ -119,8 +107,6 @@ tempfile.workspace = true backon.workspace = true similar-asserts.workspace = true itertools.workspace = true -rayon.workspace = true -ahash = "0.8" # p2p discv5.workspace = true @@ -130,8 +116,9 @@ tikv-jemallocator = { version = "0.5.0", optional = true } libc = "0.2" [dev-dependencies] -jsonrpsee.workspace = true -assert_matches = "1.5.0" +reth-discv4.workspace = true + + [features] default = ["jemalloc"] diff --git a/bin/reth/src/cli/mod.rs b/bin/reth/src/cli/mod.rs index 4dd567630756..2d253ea32c81 100644 --- a/bin/reth/src/cli/mod.rs +++ b/bin/reth/src/cli/mod.rs @@ -6,7 +6,7 @@ use crate::{ LogArgs, }, commands::{ - config_cmd, db, debug_cmd, dump_genesis, import, init_cmd, init_state, + config_cmd, debug_cmd, dump_genesis, import, init_cmd, init_state, node::{self, NoArgs}, p2p, prune, recover, stage, test_vectors, }, @@ -14,6 +14,7 @@ use crate::{ }; use clap::{value_parser, Parser, Subcommand}; use reth_chainspec::ChainSpec; +use reth_cli_commands::db; use reth_cli_runner::CliRunner; use reth_db::DatabaseEnv; use reth_node_builder::{NodeBuilder, WithLaunchContext}; diff --git a/bin/reth/src/commands/debug_cmd/build_block.rs b/bin/reth/src/commands/debug_cmd/build_block.rs index 6c1125677815..69e0dc1cf208 100644 --- a/bin/reth/src/commands/debug_cmd/build_block.rs +++ b/bin/reth/src/commands/debug_cmd/build_block.rs @@ -1,9 +1,5 @@ //! Command for debugging block building. - -use crate::{ - commands::common::{AccessRights, Environment, EnvironmentArgs}, - macros::block_executor, -}; +use crate::macros::block_executor; use alloy_rlp::Decodable; use clap::Parser; use eyre::Context; @@ -14,6 +10,7 @@ use reth_beacon_consensus::EthBeaconConsensus; use reth_blockchain_tree::{ BlockchainTree, BlockchainTreeConfig, ShareableBlockchainTree, TreeExternals, }; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_cli_runner::CliContext; use reth_consensus::Consensus; use reth_db::DatabaseEnv; diff --git a/bin/reth/src/commands/debug_cmd/execution.rs b/bin/reth/src/commands/debug_cmd/execution.rs index 2172a2b4c7ba..dc8e01e54f44 100644 --- a/bin/reth/src/commands/debug_cmd/execution.rs +++ b/bin/reth/src/commands/debug_cmd/execution.rs @@ -2,13 +2,13 @@ use crate::{ args::{get_secret_key, NetworkArgs}, - commands::common::{AccessRights, Environment, EnvironmentArgs}, macros::block_executor, utils::get_single_header, }; use clap::Parser; use futures::{stream::select as stream_select, StreamExt}; use reth_beacon_consensus::EthBeaconConsensus; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_cli_runner::CliContext; use reth_config::Config; use reth_consensus::Consensus; 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 8d138d2c2c1b..352d7846e5bc 100644 --- a/bin/reth/src/commands/debug_cmd/in_memory_merkle.rs +++ b/bin/reth/src/commands/debug_cmd/in_memory_merkle.rs @@ -2,12 +2,12 @@ use crate::{ args::{get_secret_key, NetworkArgs}, - commands::common::{AccessRights, Environment, EnvironmentArgs}, macros::block_executor, utils::{get_single_body, get_single_header}, }; use backon::{ConstantBuilder, Retryable}; use clap::Parser; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_cli_runner::CliContext; use reth_config::Config; use reth_db::DatabaseEnv; diff --git a/bin/reth/src/commands/debug_cmd/merkle.rs b/bin/reth/src/commands/debug_cmd/merkle.rs index bd8f690b9a59..e1d044e663e9 100644 --- a/bin/reth/src/commands/debug_cmd/merkle.rs +++ b/bin/reth/src/commands/debug_cmd/merkle.rs @@ -1,14 +1,13 @@ //! Command for debugging merkle trie calculation. - use crate::{ args::{get_secret_key, NetworkArgs}, - commands::common::{AccessRights, Environment, EnvironmentArgs}, macros::block_executor, utils::get_single_header, }; use backon::{ConstantBuilder, Retryable}; use clap::Parser; use reth_beacon_consensus::EthBeaconConsensus; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_cli_runner::CliContext; use reth_config::Config; use reth_consensus::Consensus; diff --git a/bin/reth/src/commands/debug_cmd/replay_engine.rs b/bin/reth/src/commands/debug_cmd/replay_engine.rs index 224a0c993401..429ef625f988 100644 --- a/bin/reth/src/commands/debug_cmd/replay_engine.rs +++ b/bin/reth/src/commands/debug_cmd/replay_engine.rs @@ -1,6 +1,5 @@ use crate::{ args::{get_secret_key, NetworkArgs}, - commands::common::{AccessRights, Environment, EnvironmentArgs}, macros::block_executor, }; use clap::Parser; @@ -10,6 +9,7 @@ use reth_beacon_consensus::{hooks::EngineHooks, BeaconConsensusEngine, EthBeacon use reth_blockchain_tree::{ BlockchainTree, BlockchainTreeConfig, ShareableBlockchainTree, TreeExternals, }; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_cli_runner::CliContext; use reth_config::Config; use reth_consensus::Consensus; diff --git a/bin/reth/src/commands/import.rs b/bin/reth/src/commands/import.rs index 71357e083aaf..bc0f183b0e93 100644 --- a/bin/reth/src/commands/import.rs +++ b/bin/reth/src/commands/import.rs @@ -1,13 +1,9 @@ //! Command that initializes the node by importing a chain from a file. - -use crate::{ - commands::common::{AccessRights, Environment, EnvironmentArgs}, - macros::block_executor, - version::SHORT_VERSION, -}; +use crate::{macros::block_executor, version::SHORT_VERSION}; use clap::Parser; use futures::{Stream, StreamExt}; use reth_beacon_consensus::EthBeaconConsensus; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_config::Config; use reth_consensus::Consensus; use reth_db::tables; diff --git a/bin/reth/src/commands/import_op.rs b/bin/reth/src/commands/import_op.rs index f4b8716fe210..3d308ba0d826 100644 --- a/bin/reth/src/commands/import_op.rs +++ b/bin/reth/src/commands/import_op.rs @@ -1,14 +1,8 @@ //! Command that initializes the node by importing OP Mainnet chain segment below Bedrock, from a //! file. - -use crate::{ - commands::{ - common::{AccessRights, Environment, EnvironmentArgs}, - import::build_import_pipeline, - }, - version::SHORT_VERSION, -}; +use crate::{commands::import::build_import_pipeline, version::SHORT_VERSION}; use clap::Parser; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_consensus::noop::NoopConsensus; use reth_db::tables; use reth_db_api::transaction::DbTx; diff --git a/bin/reth/src/commands/import_receipts_op.rs b/bin/reth/src/commands/import_receipts_op.rs index 7623c626cb02..042b7df6e7b3 100644 --- a/bin/reth/src/commands/import_receipts_op.rs +++ b/bin/reth/src/commands/import_receipts_op.rs @@ -1,8 +1,8 @@ //! Command that imports OP mainnet receipts from Bedrock datadir, exported via //! . -use crate::commands::common::{AccessRights, Environment, EnvironmentArgs}; use clap::Parser; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_db::tables; use reth_db_api::{database::Database, transaction::DbTx}; use reth_downloaders::{ diff --git a/bin/reth/src/commands/init_cmd.rs b/bin/reth/src/commands/init_cmd.rs index 22657f0c0255..df407c0659f0 100644 --- a/bin/reth/src/commands/init_cmd.rs +++ b/bin/reth/src/commands/init_cmd.rs @@ -1,7 +1,7 @@ //! Command that initializes the node from a genesis file. -use crate::commands::common::{AccessRights, Environment, EnvironmentArgs}; use clap::Parser; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_provider::BlockHashReader; use tracing::info; diff --git a/bin/reth/src/commands/init_state.rs b/bin/reth/src/commands/init_state.rs index dbf45e5816a6..4324b7f46882 100644 --- a/bin/reth/src/commands/init_state.rs +++ b/bin/reth/src/commands/init_state.rs @@ -1,7 +1,7 @@ //! Command that initializes the node from a genesis file. -use crate::commands::common::{AccessRights, Environment, EnvironmentArgs}; use clap::Parser; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_config::config::EtlConfig; use reth_db_api::database::Database; use reth_db_common::init::init_from_state_dump; diff --git a/bin/reth/src/commands/mod.rs b/bin/reth/src/commands/mod.rs index 0763ecc2203e..36290922a67c 100644 --- a/bin/reth/src/commands/mod.rs +++ b/bin/reth/src/commands/mod.rs @@ -1,7 +1,6 @@ //! This contains all of the `reth` commands pub mod config_cmd; -pub mod db; pub mod debug_cmd; pub mod dump_genesis; pub mod import; @@ -15,5 +14,3 @@ pub mod prune; pub mod recover; pub mod stage; pub mod test_vectors; - -pub mod common; diff --git a/bin/reth/src/commands/prune.rs b/bin/reth/src/commands/prune.rs index f3b0fcaab966..cd9cfabb26a3 100644 --- a/bin/reth/src/commands/prune.rs +++ b/bin/reth/src/commands/prune.rs @@ -1,7 +1,6 @@ //! Command that runs pruning without any limits. - -use crate::commands::common::{AccessRights, Environment, EnvironmentArgs}; use clap::Parser; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_prune::PrunerBuilder; use reth_static_file::StaticFileProducer; use tracing::info; diff --git a/bin/reth/src/commands/recover/storage_tries.rs b/bin/reth/src/commands/recover/storage_tries.rs index b1dbbfa88ce5..7cab05ff8527 100644 --- a/bin/reth/src/commands/recover/storage_tries.rs +++ b/bin/reth/src/commands/recover/storage_tries.rs @@ -1,5 +1,5 @@ -use crate::commands::common::{AccessRights, Environment, EnvironmentArgs}; use clap::Parser; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_cli_runner::CliContext; use reth_db::tables; use reth_db_api::{ diff --git a/bin/reth/src/commands/stage/drop.rs b/bin/reth/src/commands/stage/drop.rs index ec32af330e97..88f5650d558c 100644 --- a/bin/reth/src/commands/stage/drop.rs +++ b/bin/reth/src/commands/stage/drop.rs @@ -1,11 +1,8 @@ //! Database debugging tool - -use crate::{ - args::StageEnum, - commands::common::{AccessRights, Environment, EnvironmentArgs}, -}; +use crate::args::StageEnum; use clap::Parser; use itertools::Itertools; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_db::{static_file::iter_static_files, tables, DatabaseEnv}; use reth_db_api::transaction::DbTxMut; use reth_db_common::{ diff --git a/bin/reth/src/commands/stage/dump/mod.rs b/bin/reth/src/commands/stage/dump/mod.rs index f1fbdbbdecbd..4cdf3af8d2a3 100644 --- a/bin/reth/src/commands/stage/dump/mod.rs +++ b/bin/reth/src/commands/stage/dump/mod.rs @@ -1,11 +1,7 @@ //! Database debugging tool - -use crate::{ - args::DatadirArgs, - commands::common::{AccessRights, Environment, EnvironmentArgs}, - dirs::DataDirPath, -}; +use crate::{args::DatadirArgs, dirs::DataDirPath}; use clap::Parser; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_db::{init_db, mdbx::DatabaseArguments, tables, DatabaseEnv}; use reth_db_api::{ cursor::DbCursorRO, database::Database, models::ClientVersion, table::TableImporter, diff --git a/bin/reth/src/commands/stage/run.rs b/bin/reth/src/commands/stage/run.rs index 55824bd79c69..101b89e0277a 100644 --- a/bin/reth/src/commands/stage/run.rs +++ b/bin/reth/src/commands/stage/run.rs @@ -1,15 +1,14 @@ //! Main `stage` command //! //! Stage debugging tool - use crate::{ args::{get_secret_key, NetworkArgs, StageEnum}, - commands::common::{AccessRights, Environment, EnvironmentArgs}, macros::block_executor, prometheus_exporter, }; use clap::Parser; use reth_beacon_consensus::EthBeaconConsensus; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_cli_runner::CliContext; use reth_config::config::{HashingConfig, SenderRecoveryConfig, TransactionLookupConfig}; use reth_downloaders::bodies::bodies::BodiesDownloaderBuilder; diff --git a/bin/reth/src/commands/stage/unwind.rs b/bin/reth/src/commands/stage/unwind.rs index e3cb0cc8fcd5..3f8eb59628da 100644 --- a/bin/reth/src/commands/stage/unwind.rs +++ b/bin/reth/src/commands/stage/unwind.rs @@ -1,7 +1,9 @@ //! Unwinding a certain block range +use crate::macros::block_executor; use clap::{Parser, Subcommand}; use reth_beacon_consensus::EthBeaconConsensus; +use reth_cli_commands::common::{AccessRights, Environment, EnvironmentArgs}; use reth_config::Config; use reth_consensus::Consensus; use reth_db_api::database::Database; @@ -24,11 +26,6 @@ use std::{ops::RangeInclusive, sync::Arc}; use tokio::sync::watch; use tracing::info; -use crate::{ - commands::common::{AccessRights, Environment, EnvironmentArgs}, - macros::block_executor, -}; - /// `reth stage unwind` command #[derive(Debug, Parser)] pub struct Command { diff --git a/crates/cli/commands/Cargo.toml b/crates/cli/commands/Cargo.toml index d12abefcd8b0..bc9532b24349 100644 --- a/crates/cli/commands/Cargo.toml +++ b/crates/cli/commands/Cargo.toml @@ -8,3 +8,40 @@ homepage.workspace = true repository.workspace = true [lints] + +[dependencies] +reth-db = { workspace = true, features = ["mdbx"] } +reth-db-api.workspace = true +reth-provider.workspace = true +reth-primitives.workspace = true +reth-node-core.workspace = true +reth-fs-util.workspace = true +reth-db-common.workspace = true +reth-static-file-types.workspace = true +reth-beacon-consensus.workspace = true +reth-chainspec.workspace = true +reth-config.workspace = true +reth-downloaders.workspace = true +reth-evm.workspace = true +reth-stages.workspace = true +reth-static-file.workspace = true + +confy.workspace = true +tokio.workspace = true +itertools.workspace = true + +# misc +ahash = "0.8" +human_bytes = "0.4.1" +eyre.workspace = true +clap = { workspace = true, features = ["derive", "env"] } +serde.workspace = true +serde_json.workspace = true +tracing.workspace = true + +# tui +comfy-table = "7.0" +crossterm = "0.27.0" +ratatui = { version = "0.27", default-features = false, features = [ + "crossterm", +] } \ No newline at end of file diff --git a/bin/reth/src/commands/common.rs b/crates/cli/commands/src/common.rs similarity index 100% rename from bin/reth/src/commands/common.rs rename to crates/cli/commands/src/common.rs diff --git a/bin/reth/src/commands/db/checksum.rs b/crates/cli/commands/src/db/checksum.rs similarity index 98% rename from bin/reth/src/commands/db/checksum.rs rename to crates/cli/commands/src/db/checksum.rs index 9af9a2321637..abc183da4ed4 100644 --- a/bin/reth/src/commands/db/checksum.rs +++ b/crates/cli/commands/src/db/checksum.rs @@ -1,4 +1,4 @@ -use crate::commands::db::get::{maybe_json_value_parser, table_key}; +use crate::db::get::{maybe_json_value_parser, table_key}; use ahash::RandomState; use clap::Parser; use reth_db::{DatabaseEnv, RawKey, RawTable, RawValue, TableViewer, Tables}; diff --git a/bin/reth/src/commands/db/clear.rs b/crates/cli/commands/src/db/clear.rs similarity index 100% rename from bin/reth/src/commands/db/clear.rs rename to crates/cli/commands/src/db/clear.rs diff --git a/bin/reth/src/commands/db/diff.rs b/crates/cli/commands/src/db/diff.rs similarity index 99% rename from bin/reth/src/commands/db/diff.rs rename to crates/cli/commands/src/db/diff.rs index cd9e24c1d761..e025c4648c35 100644 --- a/bin/reth/src/commands/db/diff.rs +++ b/crates/cli/commands/src/db/diff.rs @@ -1,11 +1,11 @@ -use crate::{ - args::DatabaseArgs, - dirs::{DataDirPath, PlatformPath}, -}; use clap::Parser; use reth_db::{open_db_read_only, tables_to_generic, DatabaseEnv, Tables}; use reth_db_api::{cursor::DbCursorRO, database::Database, table::Table, transaction::DbTx}; use reth_db_common::DbTool; +use reth_node_core::{ + args::DatabaseArgs, + dirs::{DataDirPath, PlatformPath}, +}; use std::{ collections::HashMap, fmt::Debug, diff --git a/bin/reth/src/commands/db/get.rs b/crates/cli/commands/src/db/get.rs similarity index 100% rename from bin/reth/src/commands/db/get.rs rename to crates/cli/commands/src/db/get.rs diff --git a/bin/reth/src/commands/db/list.rs b/crates/cli/commands/src/db/list.rs similarity index 100% rename from bin/reth/src/commands/db/list.rs rename to crates/cli/commands/src/db/list.rs diff --git a/bin/reth/src/commands/db/mod.rs b/crates/cli/commands/src/db/mod.rs similarity index 98% rename from bin/reth/src/commands/db/mod.rs rename to crates/cli/commands/src/db/mod.rs index 736d825c31b2..dc247745f5ac 100644 --- a/bin/reth/src/commands/db/mod.rs +++ b/crates/cli/commands/src/db/mod.rs @@ -1,6 +1,4 @@ -//! Database debugging tool - -use crate::commands::common::{AccessRights, Environment, EnvironmentArgs}; +use crate::common::{AccessRights, Environment, EnvironmentArgs}; use clap::{Parser, Subcommand}; use reth_db::version::{get_db_version, DatabaseVersionError, DB_VERSION}; use reth_db_common::DbTool; diff --git a/bin/reth/src/commands/db/stats.rs b/crates/cli/commands/src/db/stats.rs similarity index 99% rename from bin/reth/src/commands/db/stats.rs rename to crates/cli/commands/src/db/stats.rs index b1a979e54918..37f7d617ba47 100644 --- a/bin/reth/src/commands/db/stats.rs +++ b/crates/cli/commands/src/db/stats.rs @@ -1,4 +1,4 @@ -use crate::commands::db::checksum::ChecksumViewer; +use crate::db::checksum::ChecksumViewer; use clap::Parser; use comfy_table::{Cell, Row, Table as ComfyTable}; use eyre::WrapErr; diff --git a/bin/reth/src/commands/db/tui.rs b/crates/cli/commands/src/db/tui.rs similarity index 100% rename from bin/reth/src/commands/db/tui.rs rename to crates/cli/commands/src/db/tui.rs diff --git a/crates/cli/commands/src/lib.rs b/crates/cli/commands/src/lib.rs index 33983bb856db..5f94de798c7f 100644 --- a/crates/cli/commands/src/lib.rs +++ b/crates/cli/commands/src/lib.rs @@ -7,3 +7,6 @@ )] #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] + +pub mod common; +pub mod db;