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,
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
.