pub enum ZeroBitConvention {
Elided,
Always,
WhenPhaseRuns,
}Expand description
Whether a protocol describes a grinding step whose difficulty is zero.
A zero-bit grind is free to produce and vacuous to check.
Whether it is described at all is therefore a per-protocol choice.
The choice is not uniform across this workspace, so an absent step cannot be read as zero bits everywhere.
Variants§
Elided
The step is described only when the difficulty is positive.
bits == 0 -> no step at all
bits > 0 -> one step carrying `bits`Always
The step is described whatever the difficulty, zero included.
Used where the witness travels in the proof unconditionally.
The proof layout then does not depend on the difficulty.
WhenPhaseRuns
The step is described, carrying its exact difficulty, only while its challenge’s phase runs at all.
An absent step then means the phase did not run, so nothing was ground.
Nothing is credited either: the term the site would boost is itself absent from the report.
The lookup argument is the case in point: with no interactions it contributes no term.
Trait Implementations§
Source§impl Clone for ZeroBitConvention
impl Clone for ZeroBitConvention
impl Copy for ZeroBitConvention
Source§impl Debug for ZeroBitConvention
impl Debug for ZeroBitConvention
impl Eq for ZeroBitConvention
Source§impl PartialEq for ZeroBitConvention
impl PartialEq for ZeroBitConvention
impl StructuralPartialEq for ZeroBitConvention
Auto Trait Implementations§
impl Freeze for ZeroBitConvention
impl RefUnwindSafe for ZeroBitConvention
impl Send for ZeroBitConvention
impl Sync for ZeroBitConvention
impl Unpin for ZeroBitConvention
impl UnsafeUnpin for ZeroBitConvention
impl UnwindSafe for ZeroBitConvention
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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