binius_core/protocols/gkr_exp/
error.rs1use crate::{
4 polynomial::Error as PolynomialError,
5 protocols::{gkr_gpa::Error as GKRError, sumcheck::Error as SumcheckError},
6};
7#[allow(clippy::enum_variant_names)]
8#[derive(Debug, thiserror::Error)]
9pub enum Error {
10 #[error("the number of variables must all be equal")]
11 NumberOfVariablesMismatch,
12 #[error("metas length does not conform to the provided indexed claims")]
13 MetasClaimMismatch,
14 #[error("incorrect witness type")]
15 IncorrectWitnessType,
16 #[error("claims must be sorted by number of variables")]
17 ClaimsOutOfOrder,
18 #[error("vector of exponent is empty")]
19 EmptyExp,
20 #[error("base fild to small")]
21 SmallBaseField,
22 #[error("witneses and claims have mismatched lengths")]
23 MismatchedWitnessClaimLength,
24 #[error("GKR Failure: {0}")]
25 GKRError(#[from] GKRError),
26 #[error("sumcheck failure: {0}")]
27 SumcheckError(#[from] SumcheckError),
28 #[error("polynomial error: {0}")]
29 Polynomial(#[from] PolynomialError),
30 #[error("verification failure: {0}")]
31 Verification(#[from] VerificationError),
32 #[error("math error: {0}")]
33 MathError(#[from] binius_math::Error),
34}
35
36#[derive(Debug, thiserror::Error)]
37pub enum VerificationError {
38 #[error("the proof contains an incorrect evaluation of the eq indicator")]
39 IncorrectEqIndEvaluation,
40}