pub struct Supervisor { /* private fields */ }Expand description
Implementation of commonware_consensus::Supervisor.
Implementations§
Source§impl Supervisor
impl Supervisor
Sourcepub fn new(
polynomial: Poly<Evaluation>,
participants: Vec<PublicKey>,
share: Share,
) -> Self
pub fn new( polynomial: Poly<Evaluation>, participants: Vec<PublicKey>, share: Share, ) -> Self
Create a new Supervisor.
Trait Implementations§
Source§impl Clone for Supervisor
impl Clone for Supervisor
Source§fn clone(&self) -> Supervisor
fn clone(&self) -> Supervisor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Coordinator for Supervisor
impl Coordinator for Supervisor
Source§impl Supervisor for Supervisor
impl Supervisor for Supervisor
Source§fn leader(&self, _: Self::Index) -> Option<Self::PublicKey>
fn leader(&self, _: Self::Index) -> Option<Self::PublicKey>
Return the leader at a given index for the provided seed.
Source§fn participants(&self, _: Self::Index) -> Option<&Vec<Self::PublicKey>>
fn participants(&self, _: Self::Index) -> Option<&Vec<Self::PublicKey>>
Get the sorted participants for the given view. This is called when entering a new view before
listening for proposals or votes. If nothing is returned, the view will not be entered.
fn is_participant( &self, _: Self::Index, candidate: &Self::PublicKey, ) -> Option<u32>
Source§impl ThresholdSupervisor for Supervisor
impl ThresholdSupervisor for Supervisor
Source§type Seed = <MinSig as Variant>::Signature
type Seed = <MinSig as Variant>::Signature
Seed is some random value used to bias the leader selection process.
Source§type Identity = <MinSig as Variant>::Public
type Identity = <MinSig as Variant>::Public
Identity is the type against which threshold signatures are verified.
Source§type Polynomial = Vec<<MinSig as Variant>::Public>
type Polynomial = Vec<<MinSig as Variant>::Public>
Polynomial is the group polynomial over which partial signatures are verified.
Share is the type used to generate a partial signature that can be verified
against
Identity.Source§fn leader(&self, _: Self::Index, seed: Self::Seed) -> Option<Self::PublicKey>
fn leader(&self, _: Self::Index, seed: Self::Seed) -> Option<Self::PublicKey>
Return the leader at a given index over the provided seed.
Source§fn identity(&self) -> &Self::Identity
fn identity(&self) -> &Self::Identity
Returns the static identity of the shared secret (typically the constant term
of a polynomial).
Source§fn polynomial(&self, _: Self::Index) -> Option<&Self::Polynomial>
fn polynomial(&self, _: Self::Index) -> Option<&Self::Polynomial>
Returns the polynomial over which partial signatures are verified at a given index.
Returns share to sign with at a given index. After resharing, the share
may change (and old shares may be deleted). Read more
Auto Trait Implementations§
impl Freeze for Supervisor
impl RefUnwindSafe for Supervisor
impl Send for Supervisor
impl Sync for Supervisor
impl Unpin for Supervisor
impl UnwindSafe for Supervisor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more