pub struct BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
F: L2ChainProvider + Clone + Debug,{ /* private fields */ }
Expand description
The BatchProvider stage is a mux between the BatchQueue and BatchValidator stages.
Rules: When Holocene is not active, the BatchQueue is used. When Holocene is active, the BatchValidator is used.
When transitioning between the two stages, the mux will reset the active stage, but
retain l1_blocks
.
Implementations§
Source§impl<P, F> BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
F: L2ChainProvider + Clone + Debug,
impl<P, F> BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
F: L2ChainProvider + Clone + Debug,
Sourcepub const fn new(cfg: Arc<RollupConfig>, prev: P, provider: F) -> Self
pub const fn new(cfg: Arc<RollupConfig>, prev: P, provider: F) -> Self
Creates a new BatchProvider with the given configuration and previous stage.
Trait Implementations§
Source§impl<P, F> AttributesProvider for BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug + Send,
F: L2ChainProvider + Clone + Send + Debug,
impl<P, F> AttributesProvider for BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug + Send,
F: L2ChainProvider + Clone + Send + Debug,
Source§fn is_last_in_span(&self) -> bool
fn is_last_in_span(&self) -> bool
Returns whether the current batch is the last in its span.
Source§fn next_batch<'life0, 'async_trait>(
&'life0 mut self,
parent: L2BlockInfo,
) -> Pin<Box<dyn Future<Output = PipelineResult<SingleBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_batch<'life0, 'async_trait>(
&'life0 mut self,
parent: L2BlockInfo,
) -> Pin<Box<dyn Future<Output = PipelineResult<SingleBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the next valid batch upon the given safe head.
Source§impl<P, F> Debug for BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug + Debug,
F: L2ChainProvider + Clone + Debug + Debug,
impl<P, F> Debug for BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug + Debug,
F: L2ChainProvider + Clone + Debug + Debug,
Source§impl<P, F> OriginAdvancer for BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Send + Debug,
F: L2ChainProvider + Clone + Send + Debug,
impl<P, F> OriginAdvancer for BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Send + Debug,
F: L2ChainProvider + Clone + Send + Debug,
Source§fn advance_origin<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = PipelineResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn advance_origin<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = PipelineResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Advances the internal state of the lowest stage to the next l1 origin.
This method is the equivalent of the reference implementation
advance_l1_block
.Source§impl<P, F> OriginProvider for BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
F: L2ChainProvider + Clone + Debug,
impl<P, F> OriginProvider for BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
F: L2ChainProvider + Clone + Debug,
Source§impl<P, F> SignalReceiver for BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Send + Debug,
F: L2ChainProvider + Clone + Send + Debug,
impl<P, F> SignalReceiver for BatchProvider<P, F>where
P: NextBatchProvider + OriginAdvancer + OriginProvider + SignalReceiver + Send + Debug,
F: L2ChainProvider + Clone + Send + Debug,
Auto Trait Implementations§
impl<P, F> Freeze for BatchProvider<P, F>
impl<P, F> RefUnwindSafe for BatchProvider<P, F>where
F: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, F> Send for BatchProvider<P, F>
impl<P, F> Sync for BatchProvider<P, F>
impl<P, F> Unpin for BatchProvider<P, F>
impl<P, F> UnwindSafe for BatchProvider<P, F>where
F: UnwindSafe,
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more