pub struct Nullification<S: Scheme> {
pub round: Round,
pub certificate: S::Certificate,
}Expand description
Aggregated nullification certificate recovered from nullify votes.
When a view is nullified, consensus moves to the first view of the next
term without finalizing a block (the next view when term_length is 1);
a nullification covers the nullified view and the rest of its term.
Fields§
§round: RoundThe round in which this nullification is made.
certificate: S::CertificateThe recovered certificate for the nullification.
Implementations§
Source§impl<S: Scheme> Nullification<S>
impl<S: Scheme> Nullification<S>
Sourcepub fn max_encode_size(participants: u32) -> usize
pub fn max_encode_size(participants: u32) -> usize
Returns an upper bound on the encoded size of a nullification for a committee of at most
participants.
Sourcepub fn from_owned_nullifies<I>(
scheme: &S,
nullifies: NonEmpty<I>,
strategy: &impl Strategy,
) -> Result<Self, AssemblyError>
pub fn from_owned_nullifies<I>( scheme: &S, nullifies: NonEmpty<I>, strategy: &impl Strategy, ) -> Result<Self, AssemblyError>
Builds a nullification certificate from non-empty owned nullify votes from the same round, consuming the votes to avoid cloning each attestation.
Sourcepub fn from_nullifies<'a, I>(
scheme: &S,
nullifies: NonEmpty<I>,
strategy: &impl Strategy,
) -> Result<Self, AssemblyError>
pub fn from_nullifies<'a, I>( scheme: &S, nullifies: NonEmpty<I>, strategy: &impl Strategy, ) -> Result<Self, AssemblyError>
Builds a nullification certificate from non-empty nullify votes from the same round.
Sourcepub fn verify<R: CryptoRng, D: Digest>(
&self,
rng: &mut R,
scheme: &impl CertificateVerifier<D, Certificate = S::Certificate>,
strategy: &impl Strategy,
) -> bool
pub fn verify<R: CryptoRng, D: Digest>( &self, rng: &mut R, scheme: &impl CertificateVerifier<D, Certificate = S::Certificate>, strategy: &impl Strategy, ) -> bool
Verifies the nullification certificate against the provided signing scheme.
This ensures that the certificate is valid for the claimed round.
Trait Implementations§
Source§impl<S: Clone + Scheme> Clone for Nullification<S>where
S::Certificate: Clone,
impl<S: Clone + Scheme> Clone for Nullification<S>where
S::Certificate: Clone,
Source§impl<S: Debug + Scheme> Debug for Nullification<S>where
S::Certificate: Debug,
impl<S: Debug + Scheme> Debug for Nullification<S>where
S::Certificate: Debug,
Source§impl<S: Scheme> EncodeSize for Nullification<S>
impl<S: Scheme> EncodeSize for Nullification<S>
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Source§fn encode_inline_size(&self) -> usize
fn encode_inline_size(&self) -> usize
BufsMut::push
during Write::write_bufs. Used to size the fixed working buffer for
inline writes, so it must not be less than the bytes written inline.
Override alongside Write::write_bufs for types where large
byte fields go via push, or the working buffer will over-allocate.Source§impl<S: Scheme> Epochable for Nullification<S>
impl<S: Scheme> Epochable for Nullification<S>
impl<S: Scheme> Eq for Nullification<S>
Source§impl<S: Scheme> Hash for Nullification<S>
impl<S: Scheme> Hash for Nullification<S>
Source§impl<S: Scheme> PartialEq for Nullification<S>
impl<S: Scheme> PartialEq for Nullification<S>
Source§impl<S: Scheme> Read for Nullification<S>
impl<S: Scheme> Read for Nullification<S>
Source§impl<S: Scheme> Viewable for Nullification<S>
impl<S: Scheme> Viewable for Nullification<S>
Source§impl<S: Scheme> Write for Nullification<S>
impl<S: Scheme> Write for Nullification<S>
Source§fn write_bufs(&self, buf: &mut impl BufsMut)
fn write_bufs(&self, buf: &mut impl BufsMut)
BufsMut, allowing existing byte chunks to be
appended via BufsMut::push instead of written inline. Must encode
to the same format as Write::write. Defaults to Write::write.Auto Trait Implementations§
impl<S> Freeze for Nullification<S>
impl<S> RefUnwindSafe for Nullification<S>
impl<S> Send for Nullification<S>
impl<S> Sync for Nullification<S>
impl<S> Unpin for Nullification<S>
impl<S> UnsafeUnpin for Nullification<S>
impl<S> UnwindSafe for Nullification<S>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Codec for T
Source§impl<X, U> DecodeRangeExt<X> for U
impl<X, U> DecodeRangeExt<X> for U
Source§fn decode_range(
buf: impl Input,
range: impl RangeBounds<usize>,
) -> Result<Self, Error>
fn decode_range( buf: impl Input, range: impl RangeBounds<usize>, ) -> Result<Self, Error>
Source§impl<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
Source§impl<T> EncodeExt for Twhere
T: EncodeSize + Write,
impl<T> EncodeExt for Twhere
T: EncodeSize + Write,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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> ⓘ
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