Enum snarkvm_polycommit::error::Error
source · [−]pub enum Error {
Show 16 variants
MissingPolynomial {
label: String,
},
MissingEvaluation {
label: String,
},
MissingLHS {
label: String,
},
MissingRng,
DegreeIsZero,
TooManyCoefficients {
num_coefficients: usize,
num_powers: usize,
},
HidingBoundIsZero,
HidingBoundToolarge {
hiding_poly_degree: usize,
num_powers: usize,
},
TrimmingDegreeTooLarge,
EmptyDegreeBounds,
EquationHasDegreeBounds(String),
UnsupportedDegreeBound(usize),
IncorrectDegreeBound {
poly_degree: usize,
degree_bound: usize,
supported_degree: usize,
label: String,
},
IncorrectInputLength(String),
MalformedCommitment(String),
Terminated,
}
Expand description
The error type for PolynomialCommitment
.
Variants
MissingPolynomial
Fields
label: String
The label of the missing polynomial.
The query set contains a label for a polynomial that was not provided as
input to the PC::open
.
MissingEvaluation
Fields
label: String
The label of the missing polynomial.
Evaluations
does not contain an evaluation for the polynomial labelled
label
at a particular query.
MissingLHS
Fields
label: String
The label of the equation.
The LHS of the equation is empty.
MissingRng
The provided polynomial was meant to be hiding, but rng
was None
.
DegreeIsZero
The degree provided in setup was too small; degree 0 polynomials are not supported.
TooManyCoefficients
Fields
num_coefficients: usize
The number of coefficients in the polynomial.
num_powers: usize
The maximum number of powers provided in Powers
.
The degree of the polynomial passed to commit
or open
was too large.
HidingBoundIsZero
The hiding bound was not None
, but the hiding bound was zero.
HidingBoundToolarge
The hiding bound was too large for the given Powers
.
TrimmingDegreeTooLarge
The degree provided to trim
was too large.
EmptyDegreeBounds
The provided enforced_degree_bounds
was Some<&[]>
.
EquationHasDegreeBounds(String)
The provided equation contained multiple polynomials, of which least one had a strict degree bound.
UnsupportedDegreeBound(usize)
The required degree bound is not supported by ck/vk
IncorrectDegreeBound
Fields
poly_degree: usize
Degree of the polynomial.
degree_bound: usize
Degree bound.
supported_degree: usize
Maximum supported degree.
label: String
Index of the offending polynomial.
The degree bound for the index
-th polynomial passed to commit
, open
or check
was incorrect, that is, degree_bound >= poly_degree
or
degree_bound <= max_degree
.
IncorrectInputLength(String)
The inputs to commit
, open
or verify
had incorrect lengths.
MalformedCommitment(String)
The commitment was generated incorrectly, tampered with, or doesn’t support the polynomial.
Terminated
Trait Implementations
sourceimpl Error for Error
impl Error for Error
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more