kona_derive::stages

Struct L1Traversal

Source
pub struct L1Traversal<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: ChainProvider> L1Traversal<F>

Source

pub fn new(data_source: F, cfg: Arc<RollupConfig>) -> Self

Creates a new L1Traversal instance.

Trait Implementations§

Source§

impl<Provider: Clone + ChainProvider> Clone for L1Traversal<Provider>

Source§

fn clone(&self) -> L1Traversal<Provider>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Provider: Debug + ChainProvider> Debug for L1Traversal<Provider>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<F: ChainProvider + Send> L1RetrievalProvider for L1Traversal<F>

Source§

fn batcher_addr(&self) -> Address

Returns the batcher Address from the op_alloy_genesis::SystemConfig.
Source§

fn next_l1_block<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = PipelineResult<Option<BlockInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the next L1 BlockInfo in the L1Traversal stage, if the stage is not complete. This function can only be called once while the stage is in progress, and will return 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: ChainProvider + Send> OriginAdvancer for L1Traversal<F>

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,

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: ChainProvider> OriginProvider for L1Traversal<F>

Source§

fn origin(&self) -> Option<BlockInfo>

Returns the optional L1 BlockInfo origin.
Source§

impl<F: ChainProvider + Send> SignalReceiver for L1Traversal<F>

Source§

fn signal<'life0, 'async_trait>( &'life0 mut self, signal: Signal, ) -> Pin<Box<dyn Future<Output = PipelineResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Receives a signal from the driver.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more