binius_core/ring_switch/
error.rs1use crate::{oracle::OracleId, polynomial, transcript};
4
5#[derive(Debug, thiserror::Error)]
6pub enum Error {
7 #[error("committed oracle {id} tower level exceeds maximum of {max}")]
8 OracleTowerLevelTooHigh { id: OracleId, max: usize },
9 #[error("packing degree {kappa} not supported")]
10 PackingDegreeNotSupported { kappa: usize },
11 #[error("cannot call function when argument tower heights do not match")]
12 TowerLevelMismatch,
13 #[error("invalid arguments: {0}")]
14 InvalidArgs(String),
15 #[error("invalid witness: {0}")]
16 InvalidWitness(String),
17 #[error("the PIOP compiler cannot handle evaluation claim for derived oracle {id}")]
18 EvalcheckClaimForDerivedPoly { id: OracleId },
19 #[error("the committed oracle {id} is missing from the index")]
20 OracleToCommitIndexMissingEntry { id: OracleId },
21 #[error("binius_math error: {0}")]
22 Math(#[from] binius_math::Error),
23 #[error("transcript error: {0}")]
24 Transcript(#[from] transcript::Error),
25 #[error("Polynomial error: {0}")]
26 Polynomial(#[from] polynomial::Error),
27 #[error("HAL error: {0}")]
28 HAL(#[from] binius_hal::Error),
29 #[error("verification error: {0}")]
30 VerificationError(#[from] VerificationError),
31}
32
33#[derive(Debug, thiserror::Error)]
34pub enum VerificationError {
35 #[error("evaluation value is inconsistent with the tensor evaluation")]
36 IncorrectEvaluation,
37 #[error("the claimed row-batched sum is inconsistent with the tensor evaluation")]
38 IncorrectRowBatchedSum,
39 #[error("Transcript error: {0}")]
40 Transcript(#[from] transcript::Error),
41}