pub trait VerifyingApplication<E>: Application<E>{
// Required method
fn verify<A: BlockProvider<Block = Self::Block>>(
&mut self,
context: (E, Self::Context),
ancestry: AncestorStream<A, Self::Block>,
) -> impl Future<Output = bool> + Send;
}Expand description
An extension of Application that provides the ability to implementations to verify blocks.
Some Applications may not require this functionality. When employing erasure coding, for example, verification only serves to verify the integrity of the received shard relative to the consensus commitment, and can therefore be hidden from the application.
Required Methods§
Sourcefn verify<A: BlockProvider<Block = Self::Block>>(
&mut self,
context: (E, Self::Context),
ancestry: AncestorStream<A, Self::Block>,
) -> impl Future<Output = bool> + Send
fn verify<A: BlockProvider<Block = Self::Block>>( &mut self, context: (E, Self::Context), ancestry: AncestorStream<A, Self::Block>, ) -> impl Future<Output = bool> + Send
Verify a block produced by the application’s proposer, relative to its ancestry.
This future should not resolve until the implementation can produce a stable verdict.
Return false only when the block is permanently invalid for the supplied context and
ancestry. If validity may still change as additional information becomes available,
continue waiting instead of returning false.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.