pub struct L1Traversal<Provider>where
Provider: ChainProvider,{
pub block: Option<BlockInfo>,
pub data_source: Provider,
pub done: bool,
pub system_config: SystemConfig,
pub rollup_config: Arc<RollupConfig>,
}
Expand description
The L1Traversal stage of the derivation pipeline.
This stage sits at the bottom of the pipeline, holding a handle to the data source (a ChainProvider implementation) and the current L1 BlockInfo in the pipeline, which are used to traverse the L1 chain. When the L1Traversal stage is advanced, it fetches the next L1 BlockInfo from the data source and updates the SystemConfig with the receipts from the block.
Fields§
§block: Option<BlockInfo>
The current block in the traversal stage.
data_source: Provider
The data source for the traversal stage.
done: bool
Signals whether or not the traversal stage is complete.
system_config: SystemConfig
The system config.
rollup_config: Arc<RollupConfig>
A reference to the rollup config.
Implementations§
Source§impl<F> L1Traversal<F>where
F: ChainProvider,
impl<F> L1Traversal<F>where
F: ChainProvider,
Sourcepub fn new(data_source: F, cfg: Arc<RollupConfig>) -> L1Traversal<F>
pub fn new(data_source: F, cfg: Arc<RollupConfig>) -> L1Traversal<F>
Creates a new L1Traversal instance.
Trait Implementations§
Source§impl<Provider> Clone for L1Traversal<Provider>where
Provider: Clone + ChainProvider,
impl<Provider> Clone for L1Traversal<Provider>where
Provider: Clone + ChainProvider,
Source§fn clone(&self) -> L1Traversal<Provider>
fn clone(&self) -> L1Traversal<Provider>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<Provider> Debug for L1Traversal<Provider>where
Provider: Debug + ChainProvider,
impl<Provider> Debug for L1Traversal<Provider>where
Provider: Debug + ChainProvider,
Source§impl<F> L1RetrievalProvider for L1Traversal<F>where
F: ChainProvider + Send,
impl<F> L1RetrievalProvider for L1Traversal<F>where
F: ChainProvider + Send,
Source§fn batcher_addr(&self) -> Address
fn batcher_addr(&self) -> Address
Source§fn next_l1_block<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockInfo>, PipelineErrorKind>> + Send + 'async_trait>>where
'life0: 'async_trait,
L1Traversal<F>: 'async_trait,
fn next_l1_block<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<BlockInfo>, PipelineErrorKind>> + Send + 'async_trait>>where
'life0: 'async_trait,
L1Traversal<F>: 'async_trait,
None
on subsequent calls unless the stage is reset or complete. If the stage is
complete and the BlockInfo has been consumed, an PipelineError::Eof error is returned.Source§impl<F> OriginAdvancer for L1Traversal<F>where
F: ChainProvider + Send,
impl<F> OriginAdvancer for L1Traversal<F>where
F: ChainProvider + Send,
Source§fn advance_origin<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineErrorKind>> + Send + 'async_trait>>where
'life0: 'async_trait,
L1Traversal<F>: 'async_trait,
fn advance_origin<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineErrorKind>> + Send + 'async_trait>>where
'life0: 'async_trait,
L1Traversal<F>: 'async_trait,
Advances the internal state of the L1Traversal stage to the next L1 block. This function fetches the next L1 BlockInfo from the data source and updates the SystemConfig with the receipts from the block.
Source§impl<F> OriginProvider for L1Traversal<F>where
F: ChainProvider,
impl<F> OriginProvider for L1Traversal<F>where
F: ChainProvider,
Source§impl<F> SignalReceiver for L1Traversal<F>where
F: ChainProvider + Send,
impl<F> SignalReceiver for L1Traversal<F>where
F: ChainProvider + Send,
Auto Trait Implementations§
impl<Provider> Freeze for L1Traversal<Provider>where
Provider: Freeze,
impl<Provider> RefUnwindSafe for L1Traversal<Provider>where
Provider: RefUnwindSafe,
impl<Provider> Send for L1Traversal<Provider>where
Provider: Send,
impl<Provider> Sync for L1Traversal<Provider>where
Provider: Sync,
impl<Provider> Unpin for L1Traversal<Provider>where
Provider: Unpin,
impl<Provider> UnwindSafe for L1Traversal<Provider>where
Provider: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more