VerifyingApplication

Trait VerifyingApplication 

Source
pub trait VerifyingApplication<E>: Application<E>
where E: Rng + Spawner + Metrics + Clock,
{ // Required method fn verify( &mut self, context: (E, Self::Context), ancestry: AncestorStream<Self::SigningScheme, 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§

Source

fn verify( &mut self, context: (E, Self::Context), ancestry: AncestorStream<Self::SigningScheme, Self::Block>, ) -> impl Future<Output = bool> + Send

Verify a block produced by the application’s proposer, relative to its ancestry.

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.

Implementors§