Trait ThresholdSupervisor

Source
pub trait ThresholdSupervisor: Supervisor {
    type Seed;
    type Identity;
    type Share;

    // Required methods
    fn leader(
        &self,
        index: Self::Index,
        seed: Self::Seed,
    ) -> Option<Self::PublicKey>;
    fn identity(&self, index: Self::Index) -> Option<&Self::Identity>;
    fn share(&self, index: Self::Index) -> Option<&Self::Share>;
}
Expand description

ThresholdSupervisor is the interface responsible for managing which identity (typically a group polynomial with a fixed constant factor) and share for a participant is active at a given time.

§Synchronization

The same considerations for Supervisor apply here.

Required Associated Types§

Source

type Seed

Seed is some random value used to bias the leader selection process.

Source

type Identity

Identity is the type against which partial signatures are verified.

Source

type Share

Share is the type used to generate a partial signature that can be verified against Identity.

Required Methods§

Source

fn leader( &self, index: Self::Index, seed: Self::Seed, ) -> Option<Self::PublicKey>

Return the leader at a given index over the provided seed.

Source

fn identity(&self, index: Self::Index) -> Option<&Self::Identity>

Returns the identity (typically a group polynomial with a fixed constant factor) at the given index. This is used to verify partial signatures from participants enumerated in Supervisor::participants.

Source

fn share(&self, index: Self::Index) -> Option<&Self::Share>

Returns share to sign with at a given index. After resharing, the share may change (and old shares may be deleted).

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§