pub trait BlockVerification<Block, ExtraBlockVerificationDetails>: Send + Syncwhere
Block: GenericOwnedBlock,{
// Required methods
fn verify_concurrent<BCI>(
&self,
parent_header: &<<Block as GenericOwnedBlock>::Header as GenericOwnedBlockHeader>::Header<'_>,
parent_block_mmr_root: &Blake3Hash,
block: &Block,
origin: &BlockOrigin,
beacon_chain_info: &BCI,
) -> impl Future<Output = Result<(), BlockVerificationError>> + Send
where BCI: DeriveConsensusParametersChainInfo + ShardMembershipEntropySourceChainInfo;
fn verify_sequential(
&self,
parent_header: &<<Block as GenericOwnedBlock>::Header as GenericOwnedBlockHeader>::Header<'_>,
parent_block_mmr_root: &Blake3Hash,
block: &Block,
origin: &BlockOrigin,
) -> impl Future<Output = Result<ExtraBlockVerificationDetails, BlockVerificationError>> + Send;
}Expand description
Block verification interface
Required Methods§
Sourcefn verify_concurrent<BCI>(
&self,
parent_header: &<<Block as GenericOwnedBlock>::Header as GenericOwnedBlockHeader>::Header<'_>,
parent_block_mmr_root: &Blake3Hash,
block: &Block,
origin: &BlockOrigin,
beacon_chain_info: &BCI,
) -> impl Future<Output = Result<(), BlockVerificationError>> + Sendwhere
BCI: DeriveConsensusParametersChainInfo + ShardMembershipEntropySourceChainInfo,
fn verify_concurrent<BCI>(
&self,
parent_header: &<<Block as GenericOwnedBlock>::Header as GenericOwnedBlockHeader>::Header<'_>,
parent_block_mmr_root: &Blake3Hash,
block: &Block,
origin: &BlockOrigin,
beacon_chain_info: &BCI,
) -> impl Future<Output = Result<(), BlockVerificationError>> + Sendwhere
BCI: DeriveConsensusParametersChainInfo + ShardMembershipEntropySourceChainInfo,
Verify the provided block, typically as part of the block import, without executing it.
This method can be called concurrently even for interdependent blocks.
Expects (and doesn’t check) that parent_header corresponds to the block’s parent root.
Since verification doesn’t execute the block, the state root is ignored and needs to be checked separately after/if the block is re-executed.
Sourcefn verify_sequential(
&self,
parent_header: &<<Block as GenericOwnedBlock>::Header as GenericOwnedBlockHeader>::Header<'_>,
parent_block_mmr_root: &Blake3Hash,
block: &Block,
origin: &BlockOrigin,
) -> impl Future<Output = Result<ExtraBlockVerificationDetails, BlockVerificationError>> + Send
fn verify_sequential( &self, parent_header: &<<Block as GenericOwnedBlock>::Header as GenericOwnedBlockHeader>::Header<'_>, parent_block_mmr_root: &Blake3Hash, block: &Block, origin: &BlockOrigin, ) -> impl Future<Output = Result<ExtraBlockVerificationDetails, BlockVerificationError>> + Send
Complementary to Self::verify_concurrent() that expects the parent block to be already
successfully imported.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".