referrerpolicy=no-referrer-when-downgrade
pub trait ProposerInterface<Block: BlockT> {
    // Required method
    fn propose<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        parent_header: &'life1 Block::Header,
        paras_inherent_data: &'life2 ParachainInherentData,
        other_inherent_data: InherentData,
        inherent_digests: Digest,
        max_duration: Duration,
        block_size_limit: Option<usize>,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Proposal<Block, StorageProof>>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

An interface for proposers.

Required Methods§

source

fn propose<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, parent_header: &'life1 Block::Header, paras_inherent_data: &'life2 ParachainInherentData, other_inherent_data: InherentData, inherent_digests: Digest, max_duration: Duration, block_size_limit: Option<usize>, ) -> Pin<Box<dyn Future<Output = Result<Option<Proposal<Block, StorageProof>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Propose a collation using the supplied InherentData and the provided ParachainInherentData.

Also specify any required inherent digests, the maximum proposal duration, and the block size limit in bytes. See the documentation on [sp_consensus::Proposer::propose] for more details on how to interpret these parameters.

The InherentData and Digest are left deliberately general in order to accommodate all possible collator selection algorithms or inherent creation mechanisms, while the ParachainInherentData is made explicit so it will be constructed appropriately.

If the InherentData passed into this function already has a ParachainInherentData, this should throw an error.

Implementors§

source§

impl<B, T> ProposerInterface<B> for Proposer<B, T>
where B: Block, T: Environment<B> + Send, T::Error: Send + Sync + 'static, T::Proposer: SubstrateProposer<B, ProofRecording = EnableProofRecording, Proof = StorageProof>, <T::Proposer as SubstrateProposer<B>>::Error: Send + Sync + 'static,