diff --git a/crates/derive/src/pipeline/mod.rs b/crates/derive/src/pipeline/mod.rs index 71a168ba0..f5b555b7d 100644 --- a/crates/derive/src/pipeline/mod.rs +++ b/crates/derive/src/pipeline/mod.rs @@ -3,7 +3,7 @@ /// Re-export trait arguments. pub use crate::traits::{ ChainProvider, DataAvailabilityProvider, L2ChainProvider, NextAttributes, OriginAdvancer, - OriginProvider, Pipeline, PreviousStage, ResetProvider, ResettableStage, StepResult, + OriginProvider, Pipeline, ResetProvider, ResettableStage, StepResult, }; /// Re-export stage types that are needed as inputs. diff --git a/crates/derive/src/stages/attributes_queue.rs b/crates/derive/src/stages/attributes_queue.rs index 6c79c31f3..6b40d2c19 100644 --- a/crates/derive/src/stages/attributes_queue.rs +++ b/crates/derive/src/stages/attributes_queue.rs @@ -1,7 +1,7 @@ //! Contains the logic for the `AttributesQueue` stage. use crate::{ - traits::{NextAttributes, OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}, + traits::{NextAttributes, OriginAdvancer, OriginProvider, ResettableStage}, types::{ BlockInfo, L2AttributesWithParent, L2BlockInfo, L2PayloadAttributes, ResetError, RollupConfig, SingleBatch, StageError, StageResult, SystemConfig, @@ -45,7 +45,7 @@ pub trait AttributesProvider { #[derive(Debug)] pub struct AttributesQueue where - P: AttributesProvider + PreviousStage + Debug, + P: AttributesProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, AB: AttributesBuilder + Debug, { /// The rollup config. @@ -62,7 +62,7 @@ where impl AttributesQueue where - P: AttributesProvider + PreviousStage + Debug, + P: AttributesProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, AB: AttributesBuilder + Debug, { /// Create a new [AttributesQueue] stage. @@ -153,20 +153,10 @@ where } } -impl PreviousStage for AttributesQueue -where - P: AttributesProvider + PreviousStage + Send + Debug, - AB: AttributesBuilder + Send + Debug, -{ - fn previous(&self) -> Option> { - Some(Box::new(&self.prev)) - } -} - #[async_trait] impl OriginAdvancer for AttributesQueue where - P: AttributesProvider + PreviousStage + Debug + Send, + P: AttributesProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug + Send, AB: AttributesBuilder + Debug + Send, { async fn advance_origin(&mut self) -> StageResult<()> { @@ -177,7 +167,7 @@ where #[async_trait] impl NextAttributes for AttributesQueue where - P: AttributesProvider + PreviousStage + Debug + Send, + P: AttributesProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug + Send, AB: AttributesBuilder + Debug + Send, { async fn next_attributes( @@ -190,7 +180,7 @@ where impl OriginProvider for AttributesQueue where - P: AttributesProvider + PreviousStage + Debug, + P: AttributesProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, AB: AttributesBuilder + Debug, { fn origin(&self) -> Option { @@ -201,7 +191,7 @@ where #[async_trait] impl ResettableStage for AttributesQueue where - P: AttributesProvider + PreviousStage + Send + Debug, + P: AttributesProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, AB: AttributesBuilder + Send + Debug, { async fn reset( diff --git a/crates/derive/src/stages/batch_queue.rs b/crates/derive/src/stages/batch_queue.rs index 19299e67a..26f5f2eb0 100644 --- a/crates/derive/src/stages/batch_queue.rs +++ b/crates/derive/src/stages/batch_queue.rs @@ -2,7 +2,7 @@ use crate::{ stages::attributes_queue::AttributesProvider, - traits::{L2ChainProvider, OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}, + traits::{L2ChainProvider, OriginAdvancer, OriginProvider, ResettableStage}, types::{ Batch, BatchValidity, BatchWithInclusionBlock, BlockInfo, L2BlockInfo, RollupConfig, SingleBatch, StageError, StageResult, SystemConfig, @@ -43,7 +43,7 @@ pub trait BatchQueueProvider { #[derive(Debug)] pub struct BatchQueue where - P: BatchQueueProvider + PreviousStage + Debug, + P: BatchQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, BF: L2ChainProvider + Debug, { /// The rollup config. @@ -75,7 +75,7 @@ where impl BatchQueue where - P: BatchQueueProvider + PreviousStage + Debug, + P: BatchQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, BF: L2ChainProvider + Debug, { /// Creates a new [BatchQueue] stage. @@ -248,7 +248,7 @@ where #[async_trait] impl OriginAdvancer for BatchQueue where - P: BatchQueueProvider + PreviousStage + Send + Debug, + P: BatchQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, BF: L2ChainProvider + Send + Debug, { async fn advance_origin(&mut self) -> StageResult<()> { @@ -259,7 +259,7 @@ where #[async_trait] impl AttributesProvider for BatchQueue where - P: BatchQueueProvider + PreviousStage + Send + Debug, + P: BatchQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, BF: L2ChainProvider + Send + Debug, { /// Returns the next valid batch upon the given safe head. @@ -417,7 +417,7 @@ where impl OriginProvider for BatchQueue where - P: BatchQueueProvider + PreviousStage + Debug, + P: BatchQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, BF: L2ChainProvider + Debug, { fn origin(&self) -> Option { @@ -425,20 +425,10 @@ where } } -impl PreviousStage for BatchQueue -where - P: BatchQueueProvider + PreviousStage + Send + Debug, - BF: L2ChainProvider + Send + Debug, -{ - fn previous(&self) -> Option> { - Some(Box::new(&self.prev)) - } -} - #[async_trait] impl ResettableStage for BatchQueue where - P: BatchQueueProvider + PreviousStage + Send + Debug, + P: BatchQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, BF: L2ChainProvider + Send + Debug, { async fn reset(&mut self, base: BlockInfo, system_config: &SystemConfig) -> StageResult<()> { diff --git a/crates/derive/src/stages/channel_bank.rs b/crates/derive/src/stages/channel_bank.rs index f44f95629..03f188181 100644 --- a/crates/derive/src/stages/channel_bank.rs +++ b/crates/derive/src/stages/channel_bank.rs @@ -3,7 +3,7 @@ use crate::{ params::{ChannelID, MAX_CHANNEL_BANK_SIZE}, stages::ChannelReaderProvider, - traits::{OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}, + traits::{OriginAdvancer, OriginProvider, ResettableStage}, types::{BlockInfo, Channel, Frame, RollupConfig, StageError, StageResult, SystemConfig}, }; use alloc::{boxed::Box, collections::VecDeque, sync::Arc}; @@ -37,7 +37,7 @@ pub trait ChannelBankProvider { #[derive(Debug)] pub struct ChannelBank

where - P: ChannelBankProvider + PreviousStage + Debug, + P: ChannelBankProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, { /// The rollup configuration. cfg: Arc, @@ -51,7 +51,7 @@ where impl

ChannelBank

where - P: ChannelBankProvider + PreviousStage + Debug, + P: ChannelBankProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, { /// Create a new [ChannelBank] stage. pub fn new(cfg: Arc, prev: P) -> Self { @@ -192,7 +192,7 @@ where #[async_trait] impl

OriginAdvancer for ChannelBank

where - P: ChannelBankProvider + PreviousStage + Send + Debug, + P: ChannelBankProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, { async fn advance_origin(&mut self) -> StageResult<()> { self.prev.advance_origin().await @@ -202,7 +202,7 @@ where #[async_trait] impl

ChannelReaderProvider for ChannelBank

where - P: ChannelBankProvider + PreviousStage + Send + Debug, + P: ChannelBankProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, { async fn next_data(&mut self) -> StageResult> { crate::timer!(START, STAGE_ADVANCE_RESPONSE_TIME, &["channel_bank"], timer); @@ -234,26 +234,17 @@ where impl

OriginProvider for ChannelBank

where - P: ChannelBankProvider + PreviousStage + Debug, + P: ChannelBankProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, { fn origin(&self) -> Option { self.prev.origin() } } -impl

PreviousStage for ChannelBank

-where - P: ChannelBankProvider + PreviousStage + Debug + Send, -{ - fn previous(&self) -> Option> { - Some(Box::new(&self.prev)) - } -} - #[async_trait] impl

ResettableStage for ChannelBank

where - P: ChannelBankProvider + PreviousStage + Send + Debug, + P: ChannelBankProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, { async fn reset( &mut self, diff --git a/crates/derive/src/stages/channel_reader.rs b/crates/derive/src/stages/channel_reader.rs index 85aa34d57..b42be1145 100644 --- a/crates/derive/src/stages/channel_reader.rs +++ b/crates/derive/src/stages/channel_reader.rs @@ -2,7 +2,7 @@ use crate::{ stages::{decompress_brotli, BatchQueueProvider}, - traits::{OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}, + traits::{OriginAdvancer, OriginProvider, ResettableStage}, types::{Batch, BlockInfo, RollupConfig, StageError, StageResult, SystemConfig}, }; @@ -37,7 +37,7 @@ pub trait ChannelReaderProvider { #[derive(Debug)] pub struct ChannelReader

where - P: ChannelReaderProvider + PreviousStage + Debug, + P: ChannelReaderProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, { /// The previous stage of the derivation pipeline. prev: P, @@ -49,7 +49,7 @@ where impl

ChannelReader

where - P: ChannelReaderProvider + PreviousStage + Debug, + P: ChannelReaderProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, { /// Create a new [ChannelReader] stage. pub fn new(prev: P, cfg: Arc) -> Self { @@ -76,7 +76,7 @@ where #[async_trait] impl

OriginAdvancer for ChannelReader

where - P: ChannelReaderProvider + PreviousStage + Send + Debug, + P: ChannelReaderProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, { async fn advance_origin(&mut self) -> StageResult<()> { self.prev.advance_origin().await @@ -86,7 +86,7 @@ where #[async_trait] impl

BatchQueueProvider for ChannelReader

where - P: ChannelReaderProvider + PreviousStage + Send + Debug, + P: ChannelReaderProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, { async fn next_batch(&mut self) -> StageResult { crate::timer!(START, STAGE_ADVANCE_RESPONSE_TIME, &["channel_reader"], timer); @@ -115,7 +115,7 @@ where impl

OriginProvider for ChannelReader

where - P: ChannelReaderProvider + PreviousStage + Debug, + P: ChannelReaderProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, { fn origin(&self) -> Option { self.prev.origin() @@ -125,7 +125,7 @@ where #[async_trait] impl

ResettableStage for ChannelReader

where - P: ChannelReaderProvider + PreviousStage + Debug + Send, + P: ChannelReaderProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug + Send, { async fn reset(&mut self, base: BlockInfo, cfg: &SystemConfig) -> StageResult<()> { self.prev.reset(base, cfg).await?; @@ -135,15 +135,6 @@ where } } -impl

PreviousStage for ChannelReader

-where - P: ChannelReaderProvider + PreviousStage + Send + Debug, -{ - fn previous(&self) -> Option> { - Some(Box::new(&self.prev)) - } -} - /// Batch Reader provides a function that iteratively consumes batches from the reader. /// The L1Inclusion block is also provided at creation time. /// Warning: the batch reader can read every batch-type. diff --git a/crates/derive/src/stages/frame_queue.rs b/crates/derive/src/stages/frame_queue.rs index 3a37ab83b..048a2abe4 100644 --- a/crates/derive/src/stages/frame_queue.rs +++ b/crates/derive/src/stages/frame_queue.rs @@ -2,7 +2,7 @@ use crate::{ stages::ChannelBankProvider, - traits::{OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}, + traits::{OriginAdvancer, OriginProvider, ResettableStage}, types::{into_frames, BlockInfo, Frame, StageError, StageResult, SystemConfig}, }; use alloc::{boxed::Box, collections::VecDeque}; @@ -31,7 +31,7 @@ pub trait FrameQueueProvider { #[derive(Debug)] pub struct FrameQueue

where - P: FrameQueueProvider + PreviousStage + Debug, + P: FrameQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, { /// The previous stage in the pipeline. pub prev: P, @@ -41,7 +41,7 @@ where impl

FrameQueue

where - P: FrameQueueProvider + PreviousStage + Debug, + P: FrameQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, { /// Create a new [FrameQueue] stage with the given previous [L1Retrieval] stage. /// @@ -55,7 +55,7 @@ where #[async_trait] impl

OriginAdvancer for FrameQueue

where - P: FrameQueueProvider + PreviousStage + Send + Debug, + P: FrameQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, { async fn advance_origin(&mut self) -> StageResult<()> { self.prev.advance_origin().await @@ -65,7 +65,7 @@ where #[async_trait] impl

ChannelBankProvider for FrameQueue

where - P: FrameQueueProvider + PreviousStage + Send + Debug, + P: FrameQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, { async fn next_frame(&mut self) -> StageResult { if self.queue.is_empty() { @@ -100,26 +100,17 @@ where impl

OriginProvider for FrameQueue

where - P: FrameQueueProvider + PreviousStage + Debug, + P: FrameQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Debug, { fn origin(&self) -> Option { self.prev.origin() } } -impl

PreviousStage for FrameQueue

-where - P: FrameQueueProvider + PreviousStage + Send + Debug, -{ - fn previous(&self) -> Option> { - Some(Box::new(&self.prev)) - } -} - #[async_trait] impl

ResettableStage for FrameQueue

where - P: FrameQueueProvider + PreviousStage + Send + Debug, + P: FrameQueueProvider + OriginAdvancer + OriginProvider + ResettableStage + Send + Debug, { async fn reset( &mut self, diff --git a/crates/derive/src/stages/l1_retrieval.rs b/crates/derive/src/stages/l1_retrieval.rs index b77cdbe30..a65eb8b63 100644 --- a/crates/derive/src/stages/l1_retrieval.rs +++ b/crates/derive/src/stages/l1_retrieval.rs @@ -3,8 +3,7 @@ use crate::{ stages::FrameQueueProvider, traits::{ - AsyncIterator, DataAvailabilityProvider, OriginAdvancer, OriginProvider, PreviousStage, - ResettableStage, + AsyncIterator, DataAvailabilityProvider, OriginAdvancer, OriginProvider, ResettableStage, }, types::{BlockInfo, StageError, StageResult, SystemConfig}, }; @@ -40,7 +39,7 @@ pub trait L1RetrievalProvider { pub struct L1Retrieval where DAP: DataAvailabilityProvider, - P: L1RetrievalProvider + PreviousStage, + P: L1RetrievalProvider + OriginAdvancer + OriginProvider + ResettableStage, { /// The previous stage in the pipeline. pub prev: P, @@ -53,7 +52,7 @@ where impl L1Retrieval where DAP: DataAvailabilityProvider, - P: L1RetrievalProvider + PreviousStage, + P: L1RetrievalProvider + OriginAdvancer + OriginProvider + ResettableStage, { /// Creates a new [L1Retrieval] stage with the previous [L1Traversal] stage and given /// [DataAvailabilityProvider]. @@ -69,7 +68,7 @@ where impl OriginAdvancer for L1Retrieval where DAP: DataAvailabilityProvider + Send, - P: L1RetrievalProvider + PreviousStage + Send, + P: L1RetrievalProvider + OriginAdvancer + OriginProvider + ResettableStage + Send, { async fn advance_origin(&mut self) -> StageResult<()> { self.prev.advance_origin().await @@ -80,7 +79,7 @@ where impl FrameQueueProvider for L1Retrieval where DAP: DataAvailabilityProvider + Send, - P: L1RetrievalProvider + PreviousStage + Send, + P: L1RetrievalProvider + OriginAdvancer + OriginProvider + ResettableStage + Send, { type Item = DAP::Item; @@ -108,28 +107,18 @@ where impl OriginProvider for L1Retrieval where DAP: DataAvailabilityProvider, - P: L1RetrievalProvider + PreviousStage, + P: L1RetrievalProvider + OriginAdvancer + OriginProvider + ResettableStage, { fn origin(&self) -> Option { self.prev.origin() } } -impl PreviousStage for L1Retrieval -where - DAP: DataAvailabilityProvider + Send, - P: L1RetrievalProvider + PreviousStage + Send, -{ - fn previous(&self) -> Option> { - Some(Box::new(&self.prev)) - } -} - #[async_trait] impl ResettableStage for L1Retrieval where DAP: DataAvailabilityProvider + Send, - P: L1RetrievalProvider + PreviousStage + Send, + P: L1RetrievalProvider + OriginAdvancer + OriginProvider + ResettableStage + Send, { async fn reset(&mut self, base: BlockInfo, cfg: &SystemConfig) -> StageResult<()> { self.prev.reset(base, cfg).await?; diff --git a/crates/derive/src/stages/l1_traversal.rs b/crates/derive/src/stages/l1_traversal.rs index b2e9df1f8..95e087c4d 100644 --- a/crates/derive/src/stages/l1_traversal.rs +++ b/crates/derive/src/stages/l1_traversal.rs @@ -2,7 +2,7 @@ use crate::{ stages::L1RetrievalProvider, - traits::{ChainProvider, OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}, + traits::{ChainProvider, OriginAdvancer, OriginProvider, ResettableStage}, types::{BlockInfo, RollupConfig, StageError, StageResult, SystemConfig}, }; use alloc::{boxed::Box, sync::Arc}; @@ -118,12 +118,6 @@ impl OriginProvider for L1Traversal { } } -impl PreviousStage for L1Traversal { - fn previous(&self) -> Option> { - None - } -} - #[async_trait] impl ResettableStage for L1Traversal { async fn reset(&mut self, base: BlockInfo, cfg: &SystemConfig) -> StageResult<()> { diff --git a/crates/derive/src/stages/test_utils/attributes_queue.rs b/crates/derive/src/stages/test_utils/attributes_queue.rs index e85a806f5..062c5236f 100644 --- a/crates/derive/src/stages/test_utils/attributes_queue.rs +++ b/crates/derive/src/stages/test_utils/attributes_queue.rs @@ -2,7 +2,7 @@ use crate::{ stages::attributes_queue::{AttributesBuilder, AttributesProvider}, - traits::{OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}, + traits::{OriginAdvancer, OriginProvider, ResettableStage}, types::{ BlockID, BlockInfo, BuilderError, L2BlockInfo, L2PayloadAttributes, SingleBatch, StageError, StageResult, SystemConfig, @@ -63,12 +63,6 @@ impl ResettableStage for MockAttributesProvider { } } -impl PreviousStage for MockAttributesProvider { - fn previous(&self) -> Option> { - Some(Box::new(self)) - } -} - #[async_trait] impl AttributesProvider for MockAttributesProvider { async fn next_batch(&mut self, _parent: L2BlockInfo) -> StageResult { diff --git a/crates/derive/src/stages/test_utils/batch_queue.rs b/crates/derive/src/stages/test_utils/batch_queue.rs index 6d345a5a1..569b9e802 100644 --- a/crates/derive/src/stages/test_utils/batch_queue.rs +++ b/crates/derive/src/stages/test_utils/batch_queue.rs @@ -2,7 +2,7 @@ use crate::{ stages::batch_queue::BatchQueueProvider, - traits::{OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}, + traits::{OriginAdvancer, OriginProvider, ResettableStage}, types::{Batch, BlockInfo, StageError, StageResult, SystemConfig}, }; use alloc::{boxed::Box, vec::Vec}; @@ -50,9 +50,3 @@ impl ResettableStage for MockBatchQueueProvider { Ok(()) } } - -impl PreviousStage for MockBatchQueueProvider { - fn previous(&self) -> Option> { - Some(Box::new(self)) - } -} diff --git a/crates/derive/src/stages/test_utils/channel_bank.rs b/crates/derive/src/stages/test_utils/channel_bank.rs index c525280a5..357ae9e76 100644 --- a/crates/derive/src/stages/test_utils/channel_bank.rs +++ b/crates/derive/src/stages/test_utils/channel_bank.rs @@ -2,7 +2,7 @@ use crate::{ stages::ChannelBankProvider, - traits::{OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}, + traits::{OriginAdvancer, OriginProvider, ResettableStage}, types::{BlockInfo, Frame, StageError, StageResult, SystemConfig}, }; use alloc::{boxed::Box, vec::Vec}; @@ -50,9 +50,3 @@ impl ResettableStage for MockChannelBankProvider { Ok(()) } } - -impl PreviousStage for MockChannelBankProvider { - fn previous(&self) -> Option> { - Some(Box::new(self)) - } -} diff --git a/crates/derive/src/stages/test_utils/channel_reader.rs b/crates/derive/src/stages/test_utils/channel_reader.rs index a300cdad6..23fe1dbfc 100644 --- a/crates/derive/src/stages/test_utils/channel_reader.rs +++ b/crates/derive/src/stages/test_utils/channel_reader.rs @@ -2,7 +2,7 @@ use crate::{ stages::ChannelReaderProvider, - traits::{OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}, + traits::{OriginAdvancer, OriginProvider, ResettableStage}, types::{BlockInfo, StageError, StageResult, SystemConfig}, }; use alloc::{boxed::Box, vec::Vec}; @@ -51,9 +51,3 @@ impl ResettableStage for MockChannelReaderProvider { Ok(()) } } - -impl PreviousStage for MockChannelReaderProvider { - fn previous(&self) -> Option> { - Some(Box::new(self)) - } -} diff --git a/crates/derive/src/stages/test_utils/frame_queue.rs b/crates/derive/src/stages/test_utils/frame_queue.rs index 21d1b6aa5..f0b65cec5 100644 --- a/crates/derive/src/stages/test_utils/frame_queue.rs +++ b/crates/derive/src/stages/test_utils/frame_queue.rs @@ -2,7 +2,7 @@ use crate::{ stages::FrameQueueProvider, - traits::{OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}, + traits::{OriginAdvancer, OriginProvider, ResettableStage}, types::{BlockInfo, StageError, StageResult, SystemConfig}, }; use alloc::{boxed::Box, vec::Vec}; @@ -51,9 +51,3 @@ impl ResettableStage for MockFrameQueueProvider { Ok(()) } } - -impl PreviousStage for MockFrameQueueProvider { - fn previous(&self) -> Option> { - Some(Box::new(self)) - } -} diff --git a/crates/derive/src/traits/mod.rs b/crates/derive/src/traits/mod.rs index 59d3075d4..c65259ea4 100644 --- a/crates/derive/src/traits/mod.rs +++ b/crates/derive/src/traits/mod.rs @@ -17,7 +17,7 @@ mod providers; pub use providers::{ChainProvider, L2ChainProvider}; mod stages; -pub use stages::{OriginAdvancer, OriginProvider, PreviousStage, ResettableStage}; +pub use stages::{OriginAdvancer, OriginProvider, ResettableStage}; #[cfg(any(test, feature = "test-utils"))] pub mod test_utils; diff --git a/crates/derive/src/traits/stages.rs b/crates/derive/src/traits/stages.rs index bc849be48..29c955731 100644 --- a/crates/derive/src/traits/stages.rs +++ b/crates/derive/src/traits/stages.rs @@ -24,9 +24,3 @@ pub trait OriginAdvancer { /// This method is the equivalent of the reference implementation `advance_l1_block`. async fn advance_origin(&mut self) -> StageResult<()>; } - -/// Provides a method for accessing a previous stage. -pub trait PreviousStage: ResettableStage + OriginAdvancer + OriginProvider { - /// Returns the previous stage. - fn previous(&self) -> Option>; -}