pub trait BuilderDataSource<TYPES: NodeType> {
// Required methods
fn available_blocks<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
for_parent: &'life1 VidCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
) -> Pin<Box<dyn Future<Output = Result<Vec<AvailableBlockInfo<TYPES>>, BuildError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn claim_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_hash: &'life1 BuilderCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
) -> Pin<Box<dyn Future<Output = Result<AvailableBlockData<TYPES>, BuildError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn claim_block_with_num_nodes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_hash: &'life1 BuilderCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
num_nodes: usize,
) -> Pin<Box<dyn Future<Output = Result<AvailableBlockData<TYPES>, BuildError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn claim_block_header_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_hash: &'life1 BuilderCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
) -> Pin<Box<dyn Future<Output = Result<AvailableBlockHeaderInput<TYPES>, BuildError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn builder_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TYPES::BuilderSignatureKey, BuildError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
sourcefn available_blocks<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
for_parent: &'life1 VidCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
) -> Pin<Box<dyn Future<Output = Result<Vec<AvailableBlockInfo<TYPES>>, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn available_blocks<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
for_parent: &'life1 VidCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
) -> Pin<Box<dyn Future<Output = Result<Vec<AvailableBlockInfo<TYPES>>, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
To get the list of available blocks
sourcefn claim_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_hash: &'life1 BuilderCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
) -> Pin<Box<dyn Future<Output = Result<AvailableBlockData<TYPES>, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn claim_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_hash: &'life1 BuilderCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
) -> Pin<Box<dyn Future<Output = Result<AvailableBlockData<TYPES>, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
To claim a block from the list of provided available blocks
sourcefn claim_block_with_num_nodes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_hash: &'life1 BuilderCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
num_nodes: usize,
) -> Pin<Box<dyn Future<Output = Result<AvailableBlockData<TYPES>, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn claim_block_with_num_nodes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_hash: &'life1 BuilderCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
num_nodes: usize,
) -> Pin<Box<dyn Future<Output = Result<AvailableBlockData<TYPES>, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
To claim a block from the list of provided available blocks and provide the number of nodes information to the builder for VID computation.
sourcefn claim_block_header_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_hash: &'life1 BuilderCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
) -> Pin<Box<dyn Future<Output = Result<AvailableBlockHeaderInput<TYPES>, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn claim_block_header_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
block_hash: &'life1 BuilderCommitment,
view_number: u64,
sender: TYPES::SignatureKey,
signature: &'life2 <TYPES::SignatureKey as SignatureKey>::PureAssembledSignatureType,
) -> Pin<Box<dyn Future<Output = Result<AvailableBlockHeaderInput<TYPES>, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
To claim a block header input
sourcefn builder_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TYPES::BuilderSignatureKey, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn builder_address<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TYPES::BuilderSignatureKey, BuildError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
To get the builder’s address