mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
chore: remove reth-primitives dependency from reth-stages-api (#8902)
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -8133,6 +8133,7 @@ dependencies = [
|
||||
name = "reth-stages-api"
|
||||
version = "1.0.0-rc.1"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"aquamarine",
|
||||
"assert_matches",
|
||||
"auto_impl",
|
||||
@@ -8143,11 +8144,12 @@ dependencies = [
|
||||
"reth-errors",
|
||||
"reth-metrics",
|
||||
"reth-network-p2p",
|
||||
"reth-primitives",
|
||||
"reth-primitives-traits",
|
||||
"reth-provider",
|
||||
"reth-prune",
|
||||
"reth-stages-types",
|
||||
"reth-static-file",
|
||||
"reth-static-file-types",
|
||||
"reth-testing-utils",
|
||||
"reth-tokio-util",
|
||||
"thiserror",
|
||||
|
||||
@@ -12,7 +12,7 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
# reth
|
||||
reth-primitives.workspace = true
|
||||
reth-primitives-traits.workspace = true
|
||||
reth-provider.workspace = true
|
||||
reth-db-api.workspace = true
|
||||
reth-static-file.workspace = true
|
||||
@@ -22,6 +22,9 @@ reth-consensus.workspace = true
|
||||
reth-prune.workspace = true
|
||||
reth-errors.workspace = true
|
||||
reth-stages-types.workspace = true
|
||||
reth-static-file-types.workspace = true
|
||||
|
||||
alloy-primitives.workspace = true
|
||||
|
||||
# metrics
|
||||
reth-metrics.workspace = true
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
use crate::PipelineEvent;
|
||||
use alloy_primitives::{BlockNumber, TxNumber};
|
||||
use reth_consensus::ConsensusError;
|
||||
use reth_errors::{BlockExecutionError, DatabaseError, RethError};
|
||||
use reth_network_p2p::error::DownloadError;
|
||||
use reth_primitives::{BlockNumber, SealedHeader, StaticFileSegment, TxNumber};
|
||||
use reth_primitives_traits::SealedHeader;
|
||||
use reth_provider::ProviderError;
|
||||
use reth_static_file_types::StaticFileSegment;
|
||||
use thiserror::Error;
|
||||
use tokio::sync::broadcast::error::SendError;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use crate::{metrics::SyncMetrics, StageCheckpoint, StageId};
|
||||
use reth_primitives::{constants::MGAS_TO_GAS, BlockNumber};
|
||||
use alloy_primitives::BlockNumber;
|
||||
use reth_primitives_traits::constants::MGAS_TO_GAS;
|
||||
use std::{
|
||||
future::Future,
|
||||
pin::Pin,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{pipeline::BoxedStage, MetricEventsSender, Pipeline, Stage, StageId, StageSet};
|
||||
use alloy_primitives::{BlockNumber, B256};
|
||||
use reth_db_api::database::Database;
|
||||
use reth_primitives::{BlockNumber, B256};
|
||||
use reth_provider::ProviderFactory;
|
||||
use reth_static_file::StaticFileProducer;
|
||||
use tokio::sync::watch;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use reth_primitives::{BlockNumber, SealedHeader};
|
||||
use alloy_primitives::BlockNumber;
|
||||
use reth_primitives_traits::SealedHeader;
|
||||
|
||||
/// Determines the control flow during pipeline execution.
|
||||
///
|
||||
|
||||
@@ -2,7 +2,7 @@ use crate::{
|
||||
stage::{ExecOutput, UnwindInput, UnwindOutput},
|
||||
StageCheckpoint, StageId,
|
||||
};
|
||||
use reth_primitives::BlockNumber;
|
||||
use alloy_primitives::BlockNumber;
|
||||
use std::fmt::{Display, Formatter};
|
||||
|
||||
/// An event emitted by a [Pipeline][crate::Pipeline].
|
||||
|
||||
@@ -2,19 +2,18 @@ mod ctrl;
|
||||
mod event;
|
||||
pub use crate::pipeline::ctrl::ControlFlow;
|
||||
use crate::{PipelineTarget, StageCheckpoint, StageId};
|
||||
use alloy_primitives::{BlockNumber, B256};
|
||||
pub use event::*;
|
||||
use futures_util::Future;
|
||||
use reth_db_api::database::Database;
|
||||
use reth_primitives::{
|
||||
constants::BEACON_CONSENSUS_REORG_UNWIND_DEPTH, static_file::HighestStaticFiles, BlockNumber,
|
||||
B256,
|
||||
};
|
||||
use reth_primitives_traits::constants::BEACON_CONSENSUS_REORG_UNWIND_DEPTH;
|
||||
use reth_provider::{
|
||||
providers::StaticFileWriter, FinalizedBlockReader, FinalizedBlockWriter, ProviderFactory,
|
||||
StageCheckpointReader, StageCheckpointWriter, StaticFileProviderFactory,
|
||||
};
|
||||
use reth_prune::PrunerBuilder;
|
||||
use reth_static_file::StaticFileProducer;
|
||||
use reth_static_file_types::HighestStaticFiles;
|
||||
use reth_tokio_util::{EventSender, EventStream};
|
||||
use std::pin::Pin;
|
||||
use tokio::sync::watch;
|
||||
@@ -237,13 +236,13 @@ where
|
||||
|
||||
/// Run [static file producer](StaticFileProducer) and [pruner](reth_prune::Pruner) to **move**
|
||||
/// all data from the database to static files for corresponding
|
||||
/// [segments](reth_primitives::static_file::StaticFileSegment), according to their [stage
|
||||
/// [segments](reth_static_file_types::StaticFileSegment), according to their [stage
|
||||
/// checkpoints](StageCheckpoint):
|
||||
/// - [`StaticFileSegment::Headers`](reth_primitives::static_file::StaticFileSegment::Headers)
|
||||
/// -> [`StageId::Headers`]
|
||||
/// - [`StaticFileSegment::Receipts`](reth_primitives::static_file::StaticFileSegment::Receipts)
|
||||
/// -> [`StageId::Execution`]
|
||||
/// - [`StaticFileSegment::Transactions`](reth_primitives::static_file::StaticFileSegment::Transactions)
|
||||
/// - [`StaticFileSegment::Headers`](reth_static_file_types::StaticFileSegment::Headers) ->
|
||||
/// [`StageId::Headers`]
|
||||
/// - [`StaticFileSegment::Receipts`](reth_static_file_types::StaticFileSegment::Receipts) ->
|
||||
/// [`StageId::Execution`]
|
||||
/// - [`StaticFileSegment::Transactions`](reth_static_file_types::StaticFileSegment::Transactions)
|
||||
/// -> [`StageId::Bodies`]
|
||||
///
|
||||
/// CAUTION: This method locks the static file producer Mutex, hence can block the thread if the
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::{util::opt, ControlFlow};
|
||||
use reth_primitives::BlockNumber;
|
||||
use alloy_primitives::BlockNumber;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub(crate) struct PipelineProgress {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{error::StageError, StageCheckpoint, StageId};
|
||||
use alloy_primitives::{BlockNumber, TxNumber};
|
||||
use reth_db_api::database::Database;
|
||||
use reth_primitives::{BlockNumber, TxNumber};
|
||||
use reth_provider::{BlockReader, DatabaseProviderRW, ProviderError, TransactionsProvider};
|
||||
use std::{
|
||||
cmp::{max, min},
|
||||
|
||||
Reference in New Issue
Block a user