snarkvm_algorithms/snark/varuna/ahp/
errors.rs1#[derive(Debug, Error)]
18pub enum AHPError {
19 #[error("{}", _0)]
20 AnyhowError(#[from] anyhow::Error),
21
22 #[error("Batch size was zero; must be at least 1.")]
23 BatchSizeIsZero,
24
25 #[error("An error occurred during constraint generation.")]
26 ConstraintSystemError(crate::r1cs::errors::SynthesisError),
27
28 #[error("The instance generated during proving does not match that in the index.")]
29 InstanceDoesNotMatchIndex,
30
31 #[error("The number of public inputs is incorrect.")]
32 InvalidPublicInputLength,
33
34 #[error("During verification, a required evaluation is missing: {}", _0)]
35 MissingEval(String),
36
37 #[error("Currently we only support square constraint matrices.")]
38 NonSquareMatrix,
39
40 #[error("During synthesis, our polynomials ended up being too high of degree.")]
41 PolyTooLarge,
42}
43
44impl From<crate::r1cs::errors::SynthesisError> for AHPError {
45 fn from(other: crate::r1cs::errors::SynthesisError) -> Self {
46 AHPError::ConstraintSystemError(other)
47 }
48}