pub struct AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
AB: AttributesBuilder + Debug,{ /* private fields */ }Expand description
AttributesQueue accepts batches from the BatchQueue stage
and transforms them into OpPayloadAttributes.
The outputted payload attributes cannot be buffered because each batch->attributes transformation pulls in data about the current L2 safe head.
AttributesQueue also buffers batches that have been output because
multiple batches can be created at once.
This stage can be reset by clearing its batch buffer. This stage does not need to retain any references to L1 blocks.
Implementations§
Source§impl<P, AB> AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
AB: AttributesBuilder + Debug,
impl<P, AB> AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
AB: AttributesBuilder + Debug,
Sourcepub const fn new(cfg: Arc<RollupConfig>, prev: P, builder: AB) -> Self
pub const fn new(cfg: Arc<RollupConfig>, prev: P, builder: AB) -> Self
Create a new AttributesQueue stage.
Sourcepub async fn load_batch(
&mut self,
parent: L2BlockInfo,
) -> PipelineResult<SingleBatch>
pub async fn load_batch( &mut self, parent: L2BlockInfo, ) -> PipelineResult<SingleBatch>
Loads a SingleBatch from the AttributesProvider if needed.
Sourcepub async fn next_attributes(
&mut self,
parent: L2BlockInfo,
) -> PipelineResult<OpAttributesWithParent>
pub async fn next_attributes( &mut self, parent: L2BlockInfo, ) -> PipelineResult<OpAttributesWithParent>
Returns the next OpAttributesWithParent from the current batch.
Sourcepub async fn create_next_attributes(
&mut self,
batch: SingleBatch,
parent: L2BlockInfo,
) -> PipelineResult<OpPayloadAttributes>
pub async fn create_next_attributes( &mut self, batch: SingleBatch, parent: L2BlockInfo, ) -> PipelineResult<OpPayloadAttributes>
Creates the next attributes, transforming a SingleBatch into OpPayloadAttributes.
This sets no_tx_pool and appends the batched txs to the attributes tx list.
Trait Implementations§
Source§impl<P, AB> Debug for AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug + Debug,
AB: AttributesBuilder + Debug + Debug,
impl<P, AB> Debug for AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug + Debug,
AB: AttributesBuilder + Debug + Debug,
Source§impl<P, AB> NextAttributes for AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug + Send,
AB: AttributesBuilder + Debug + Send,
impl<P, AB> NextAttributes for AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug + Send,
AB: AttributesBuilder + Debug + Send,
Source§fn next_attributes<'life0, 'async_trait>(
&'life0 mut self,
parent: L2BlockInfo,
) -> Pin<Box<dyn Future<Output = PipelineResult<OpAttributesWithParent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_attributes<'life0, 'async_trait>(
&'life0 mut self,
parent: L2BlockInfo,
) -> Pin<Box<dyn Future<Output = PipelineResult<OpAttributesWithParent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
OpAttributesWithParent from the current batch.Source§impl<P, AB> OriginAdvancer for AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug + Send,
AB: AttributesBuilder + Debug + Send,
impl<P, AB> OriginAdvancer for AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug + Send,
AB: AttributesBuilder + Debug + Send,
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,
advance_l1_block.Source§impl<P, AB> OriginProvider for AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
AB: AttributesBuilder + Debug,
impl<P, AB> OriginProvider for AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Debug,
AB: AttributesBuilder + Debug,
Source§impl<P, AB> SignalReceiver for AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Send + Debug,
AB: AttributesBuilder + Send + Debug,
impl<P, AB> SignalReceiver for AttributesQueue<P, AB>where
P: AttributesProvider + OriginAdvancer + OriginProvider + SignalReceiver + Send + Debug,
AB: AttributesBuilder + Send + Debug,
Auto Trait Implementations§
impl<P, AB> Freeze for AttributesQueue<P, AB>
impl<P, AB> RefUnwindSafe for AttributesQueue<P, AB>where
P: RefUnwindSafe,
AB: RefUnwindSafe,
impl<P, AB> Send for AttributesQueue<P, AB>
impl<P, AB> Sync for AttributesQueue<P, AB>
impl<P, AB> Unpin for AttributesQueue<P, AB>
impl<P, AB> UnwindSafe for AttributesQueue<P, AB>where
P: UnwindSafe,
AB: 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> 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