pub enum Error {
Show 24 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),
InvalidNumberOfVariables,
PolynomialDegreeTooLarge {
poly_degree: usize,
supported_degree: usize,
label: String,
},
InvalidCommitment,
IncorrectCommitmentSize {
encountered: usize,
expected: usize,
},
TranscriptError,
InvalidParameters(String),
HashingError,
EncodingError,
MismatchedLabels {
commitment_label: String,
polynomial_label: String,
},
MismatchedNumVars {
poly_nv: usize,
point_nv: usize,
},
}Expand description
The error type for PolynomialCommitment.
Variants§
MissingPolynomial
The query set contains a label for a polynomial that was not provided as
input to the PC::open.
MissingEvaluation
Evaluations does not contain an evaluation for the polynomial labelled
label at a particular query.
MissingLHS
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
The degree of the polynomial passed to commit or open
was too large.
Fields
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
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.
Fields
IncorrectInputLength(String)
The inputs to commit, open or verify had incorrect lengths.
InvalidNumberOfVariables
An invalid number of variables was provided to setup
PolynomialDegreeTooLarge
The degree of the index-th polynomial passed to commit, open
or check was incorrect, that is, supported_degree <= poly_degree
Fields
InvalidCommitment
This means a failure in verifying the commitment or the opening.
IncorrectCommitmentSize
This means during opening or verification, a commitment of incorrect size (for example, with an insufficient number of entries) was encountered
TranscriptError
For PCS which rely on Fiat-Shamir to be rendered non-interactive, these are errors that result from incorrect transcript manipulation.
InvalidParameters(String)
This means the required soundness error bound is inherently impossible. E.g., the field is not big enough.
HashingError
Error resulting from hashing in linear code - based PCS.
EncodingError
Shows that encoding is not feasible
MismatchedLabels
This means a commitment with a certain label was matched with a a polynomial which has a different label - which shouldn’t happen
Fields
MismatchedNumVars
This means multivariate polynomial with a certain number of variables was matched (for instance, during commitment, opening or verification) to a point with a different number of variables.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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> 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