pub struct BinaryWhirBudget {
pub max_stir_queries: usize,
pub max_proof_bytes: usize,
pub max_grinding_bits: usize,
}Expand description
A ceiling a deployment refuses to prove above.
A schedule is graded against it before any witness is touched.
Fields§
§max_stir_queries: usizeMost codeword positions a verifier will open.
max_proof_bytes: usizeMost bytes a serialized proof may occupy.
max_grinding_bits: usizeHardest grinding a prover will accept.
Implementations§
Source§impl BinaryWhirBudget
impl BinaryWhirBudget
Sourcepub const PRODUCTION: Self
pub const PRODUCTION: Self
The ceiling a deployment of this scheme is expected to hold to.
Two hundred openings keep a verifier inside a few milliseconds of hashing.
A quarter of a megabyte is the size at which a proof stops fitting comfortably on a wire.
Twenty-four grinding bits cost a prover well under a second.
Sourcepub const fn check_shape(
&self,
shape: &ProofShape,
base_element_bytes: usize,
extension_element_bytes: usize,
digest_bytes: usize,
) -> Result<(), BudgetError>
pub const fn check_shape( &self, shape: &ProofShape, base_element_bytes: usize, extension_element_bytes: usize, digest_bytes: usize, ) -> Result<(), BudgetError>
Grade a schedule against the ceiling, before anything is committed.
§Errors
Returns an error naming the first figure the schedule exceeds.
Sourcepub const fn check_bytes(&self, bytes: usize) -> Result<(), BudgetError>
pub const fn check_bytes(&self, bytes: usize) -> Result<(), BudgetError>
Grade a proof that was produced, against the same ceiling.
§Errors
Returns an error when the serialized proof is larger than the ceiling allows.
Trait Implementations§
Source§impl Clone for BinaryWhirBudget
impl Clone for BinaryWhirBudget
impl Copy for BinaryWhirBudget
Source§impl Debug for BinaryWhirBudget
impl Debug for BinaryWhirBudget
impl Eq for BinaryWhirBudget
Source§impl PartialEq for BinaryWhirBudget
impl PartialEq for BinaryWhirBudget
impl StructuralPartialEq for BinaryWhirBudget
Auto Trait Implementations§
impl Freeze for BinaryWhirBudget
impl RefUnwindSafe for BinaryWhirBudget
impl Send for BinaryWhirBudget
impl Sync for BinaryWhirBudget
impl Unpin for BinaryWhirBudget
impl UnsafeUnpin for BinaryWhirBudget
impl UnwindSafe for BinaryWhirBudget
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