Quorum

Trait Quorum 

Source
pub trait Quorum: Sync {
    // Required method
    fn verify_static<V: StaticVersionType + 'static>(
        &self,
        qc: &Certificate,
    ) -> impl Send + Future<Output = Result<()>>;

    // Provided methods
    fn verify(
        &self,
        cert: &Certificate,
        version: Version,
    ) -> impl Send + Future<Output = Result<()>> { ... }
    fn verify_qc_chain_and_get_version<'a>(
        &self,
        leaf: &Leaf2,
        certs: impl Send + IntoIterator<Item = &'a Certificate, IntoIter: Send>,
    ) -> impl Send + Future<Output = Result<Version>> { ... }
}

Required Methods§

Source

fn verify_static<V: StaticVersionType + 'static>( &self, qc: &Certificate, ) -> impl Send + Future<Output = Result<()>>

Same as verify, but with the version as a type-level parameter.

Provided Methods§

Source

fn verify( &self, cert: &Certificate, version: Version, ) -> impl Send + Future<Output = Result<()>>

Check a threshold signature on a quorum certificate.

Source

fn verify_qc_chain_and_get_version<'a>( &self, leaf: &Leaf2, certs: impl Send + IntoIterator<Item = &'a Certificate, IntoIter: Send>, ) -> impl Send + Future<Output = Result<Version>>

Verify that QCs are signed, form a chain starting from leaf, with a particular protocol version.

This check forms the bulk of the commit rule for both HotStuff and HotStuff2.

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§