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