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§
Share is the type used to generate a partial signature that can be verified
against Identity
.
Required Methods§
Sourcefn leader(
&self,
index: Self::Index,
seed: Self::Seed,
) -> Option<Self::PublicKey>
fn leader( &self, index: Self::Index, seed: Self::Seed, ) -> Option<Self::PublicKey>
Return the leader at a given index over the provided seed.
Sourcefn identity(&self, index: Self::Index) -> Option<&Self::Identity>
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
.
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.