chore: move primitives/stage to reth-stages-types (#8749)

This commit is contained in:
joshieDo
2024-06-11 16:38:26 +02:00
committed by GitHub
parent 87c22d22f8
commit b8759733d4
71 changed files with 231 additions and 181 deletions

View File

@ -14,11 +14,11 @@ use reth_node_core::{
},
dirs::{ChainPath, DataDirPath},
};
use reth_primitives::{stage::PipelineTarget, ChainSpec};
use reth_primitives::ChainSpec;
use reth_provider::{
providers::StaticFileProvider, HeaderSyncMode, ProviderFactory, StaticFileProviderFactory,
};
use reth_stages::{sets::DefaultStages, Pipeline};
use reth_stages::{sets::DefaultStages, Pipeline, PipelineTarget};
use reth_static_file::StaticFileProducer;
use std::{path::PathBuf, sync::Arc};
use tracing::{debug, info, warn};

View File

@ -25,7 +25,6 @@ use reth_payload_builder::database::CachedReads;
use reth_primitives::{
constants::eip4844::{LoadKzgSettingsError, MAINNET_KZG_TRUSTED_SETUP},
revm_primitives::KzgSettings,
stage::StageId,
Address, BlobTransaction, BlobTransactionSidecar, Bytes, PooledTransactionsElement,
SealedBlock, SealedBlockWithSenders, Transaction, TransactionSigned, TxEip4844, B256, U256,
};
@ -36,6 +35,7 @@ use reth_provider::{
};
use reth_revm::database::StateProviderDatabase;
use reth_rpc_types::engine::{BlobsBundleV1, PayloadAttributes};
use reth_stages::StageId;
use reth_transaction_pool::{
blobstore::InMemoryBlobStore, BlobStore, EthPooledTransaction, PoolConfig, TransactionOrigin,
TransactionPool, TransactionValidationTaskExecutor,

View File

@ -22,7 +22,7 @@ use reth_exex::ExExManagerHandle;
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, B256};
use reth_primitives::{BlockHashOrNumber, BlockNumber, B256};
use reth_provider::{
BlockExecutionWriter, ChainSpecProvider, HeaderSyncMode, ProviderFactory, StageCheckpointReader,
};
@ -30,7 +30,7 @@ use reth_prune_types::PruneModes;
use reth_stages::{
sets::DefaultStages,
stages::{ExecutionStage, ExecutionStageThresholds},
Pipeline, StageSet,
Pipeline, StageId, StageSet,
};
use reth_static_file::StaticFileProducer;
use reth_tasks::TaskExecutor;

View File

@ -15,13 +15,14 @@ use reth_errors::BlockValidationError;
use reth_evm::execute::{BlockExecutionOutput, BlockExecutorProvider, Executor};
use reth_network::NetworkHandle;
use reth_network_api::NetworkInfo;
use reth_primitives::{stage::StageId, BlockHashOrNumber};
use reth_primitives::BlockHashOrNumber;
use reth_provider::{
AccountExtReader, BundleStateWithReceipts, ChainSpecProvider, HashingWriter, HeaderProvider,
LatestStateProviderRef, OriginalValuesKnown, ProviderFactory, StageCheckpointReader,
StateWriter, StaticFileProviderFactory, StorageReader,
};
use reth_revm::database::StateProviderDatabase;
use reth_stages::StageId;
use reth_tasks::TaskExecutor;
use reth_trie::{updates::TrieKey, StateRoot};
use std::{net::SocketAddr, path::PathBuf, sync::Arc};

View File

@ -18,7 +18,7 @@ use reth_evm::execute::{BatchExecutor, BlockExecutorProvider};
use reth_network::NetworkHandle;
use reth_network_api::NetworkInfo;
use reth_network_p2p::full_block::FullBlockClient;
use reth_primitives::{stage::StageCheckpoint, BlockHashOrNumber};
use reth_primitives::BlockHashOrNumber;
use reth_provider::{
BlockNumReader, BlockWriter, ChainSpecProvider, HeaderProvider, LatestStateProviderRef,
OriginalValuesKnown, ProviderError, ProviderFactory, StateWriter,
@ -27,7 +27,7 @@ use reth_prune_types::PruneModes;
use reth_revm::database::StateProviderDatabase;
use reth_stages::{
stages::{AccountHashingStage, MerkleStage, StorageHashingStage},
ExecInput, Stage,
ExecInput, Stage, StageCheckpoint,
};
use reth_tasks::TaskExecutor;
use std::{net::SocketAddr, path::PathBuf, sync::Arc};

View File

@ -22,13 +22,13 @@ use reth_network_p2p::{
headers::downloader::{HeaderDownloader, SyncTarget},
};
use reth_node_events::node::NodeEvent;
use reth_primitives::{stage::StageId, B256};
use reth_primitives::B256;
use reth_provider::{
BlockNumReader, ChainSpecProvider, HeaderProvider, HeaderSyncMode, ProviderError,
ProviderFactory, StageCheckpointReader,
};
use reth_prune_types::PruneModes;
use reth_stages::{prelude::*, Pipeline, StageSet};
use reth_stages::{prelude::*, Pipeline, StageId, StageSet};
use reth_static_file::StaticFileProducer;
use std::{path::PathBuf, sync::Arc};
use tokio::sync::watch;

View File

@ -16,9 +16,9 @@ use reth_downloaders::file_client::{
ChunkedFileReader, FileClient, DEFAULT_BYTE_LEN_CHUNK_CHAIN_FILE,
};
use reth_optimism_primitives::bedrock_import::is_dup_tx;
use reth_primitives::stage::StageId;
use reth_provider::StageCheckpointReader;
use reth_prune_types::PruneModes;
use reth_stages::StageId;
use reth_static_file::StaticFileProducer;
use std::{path::PathBuf, sync::Arc};
use tracing::{debug, error, info};

View File

@ -11,11 +11,12 @@ use reth_downloaders::{
};
use reth_node_core::version::SHORT_VERSION;
use reth_optimism_primitives::bedrock_import::is_dup_tx;
use reth_primitives::{stage::StageId, Receipts, StaticFileSegment};
use reth_primitives::{Receipts, StaticFileSegment};
use reth_provider::{
BundleStateWithReceipts, OriginalValuesKnown, ProviderFactory, StageCheckpointReader,
StateWriter, StaticFileProviderFactory, StaticFileWriter, StatsReader,
};
use reth_stages::StageId;
use std::path::{Path, PathBuf};
use tracing::{debug, error, info, trace};

View File

@ -10,8 +10,9 @@ use itertools::Itertools;
use reth_db::{static_file::iter_static_files, tables, DatabaseEnv};
use reth_db_api::transaction::DbTxMut;
use reth_db_common::init::{insert_genesis_header, insert_genesis_history, insert_genesis_state};
use reth_primitives::{stage::StageId, static_file::find_fixed_range, StaticFileSegment};
use reth_primitives::{static_file::find_fixed_range, StaticFileSegment};
use reth_provider::{providers::StaticFileWriter, StaticFileProviderFactory};
use reth_stages::StageId;
/// `reth drop-stage` command
#[derive(Debug, Parser)]

View File

@ -5,9 +5,8 @@ use reth_db_api::{
cursor::DbCursorRO, database::Database, table::TableImporter, transaction::DbTx,
};
use reth_node_core::dirs::{ChainPath, DataDirPath};
use reth_primitives::stage::StageCheckpoint;
use reth_provider::{providers::StaticFileProvider, ChainSpecProvider, ProviderFactory};
use reth_stages::{stages::ExecutionStage, Stage, UnwindInput};
use reth_stages::{stages::ExecutionStage, Stage, StageCheckpoint, UnwindInput};
use tracing::info;
pub(crate) async fn dump_execution_stage<DB: Database>(

View File

@ -4,9 +4,9 @@ use eyre::Result;
use reth_db::{tables, DatabaseEnv};
use reth_db_api::{database::Database, table::TableImporter};
use reth_node_core::dirs::{ChainPath, DataDirPath};
use reth_primitives::{stage::StageCheckpoint, BlockNumber};
use reth_primitives::BlockNumber;
use reth_provider::{providers::StaticFileProvider, ProviderFactory};
use reth_stages::{stages::AccountHashingStage, Stage, UnwindInput};
use reth_stages::{stages::AccountHashingStage, Stage, StageCheckpoint, UnwindInput};
use tracing::info;
pub(crate) async fn dump_hashing_account_stage<DB: Database>(

View File

@ -4,9 +4,8 @@ use eyre::Result;
use reth_db::{tables, DatabaseEnv};
use reth_db_api::{database::Database, table::TableImporter};
use reth_node_core::dirs::{ChainPath, DataDirPath};
use reth_primitives::stage::StageCheckpoint;
use reth_provider::{providers::StaticFileProvider, ProviderFactory};
use reth_stages::{stages::StorageHashingStage, Stage, UnwindInput};
use reth_stages::{stages::StorageHashingStage, Stage, StageCheckpoint, UnwindInput};
use tracing::info;
pub(crate) async fn dump_hashing_storage_stage<DB: Database>(

View File

@ -6,7 +6,7 @@ use reth_db::{tables, DatabaseEnv};
use reth_db_api::{database::Database, table::TableImporter};
use reth_exex::ExExManagerHandle;
use reth_node_core::dirs::{ChainPath, DataDirPath};
use reth_primitives::{stage::StageCheckpoint, BlockNumber};
use reth_primitives::BlockNumber;
use reth_provider::{providers::StaticFileProvider, ProviderFactory};
use reth_prune_types::PruneModes;
use reth_stages::{
@ -14,7 +14,7 @@ use reth_stages::{
AccountHashingStage, ExecutionStage, ExecutionStageThresholds, MerkleStage,
StorageHashingStage, MERKLE_STAGE_DEFAULT_CLEAN_THRESHOLD,
},
Stage, UnwindInput,
Stage, StageCheckpoint, UnwindInput,
};
use tracing::info;