Enum snarkvm_algorithms::polycommit::error::PCError
source · pub enum PCError {
Show 16 variants
AnyhowError(Error),
MissingPolynomial {
label: String,
},
MissingEvaluation {
label: String,
},
MissingRng,
DegreeIsZero,
TooManyCoefficients {
num_coefficients: usize,
num_powers: usize,
},
HidingBoundIsZero,
HidingBoundToolarge {
hiding_poly_degree: usize,
num_powers: usize,
},
LagrangeBasisSizeIsNotPowerOfTwo,
LagrangeBasisSizeIsTooLarge,
TrimmingDegreeTooLarge,
EquationHasDegreeBounds(String),
UnsupportedDegreeBound(usize),
UnsupportedLagrangeBasisSize(usize),
IncorrectDegreeBound {
poly_degree: usize,
degree_bound: usize,
max_degree: usize,
label: String,
},
Terminated,
}
Expand description
The error type for PolynomialCommitment
.
Variants§
AnyhowError(Error)
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.
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
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
.
LagrangeBasisSizeIsNotPowerOfTwo
The lagrange basis is not a power of two.
LagrangeBasisSizeIsTooLarge
The lagrange basis is larger than the supported degree,
TrimmingDegreeTooLarge
The degree provided to trim
was too large.
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
UnsupportedLagrangeBasisSize(usize)
The provided equation contained multiple polynomials, of which least one had a strict degree bound.
IncorrectDegreeBound
Fields
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
.