Nova/src/errors.rs
src/errors.rsRaw
1//! This module defines errors returned by the library.
2use core::fmt::Debug;
3use thiserror::Error;
4
5/// Errors returned by Nova
6#[derive(Clone, Debug, Eq, PartialEq, Error)]
7pub enum NovaError {
8 /// returned if the supplied row or col in (row,col,val) tuple is out of range
9 #[error("InvalidIndex")]
10 InvalidIndex,
11 /// returned if the supplied input is not even-sized
12 #[error("OddInputLength")]
13 OddInputLength,
14 /// returned if the supplied input is not of the right length
15 #[error("InvalidInputLength")]
16 InvalidInputLength,
17 /// returned if the supplied witness is not of the right length
18 #[error("InvalidWitnessLength")]
19 InvalidWitnessLength,
20 /// returned if the supplied witness is not a satisfying witness to a given shape and instance
21 #[error("UnSat")]
22 UnSat,
23 /// returned when the supplied compressed commitment cannot be decompressed
24 #[error("DecompressionError")]
25 DecompressionError,
26 /// returned if proof verification fails
27 #[error("ProofVerifyError")]
28 ProofVerifyError,
29 /// returned if the provided number of steps is zero
30 #[error("InvalidNumSteps")]
31 InvalidNumSteps,
32 /// returned when an invalid inner product argument is provided
33 #[error("InvalidIPA")]
34 InvalidIPA,
35 /// returned when an invalid sum-check proof is provided
36 #[error("InvalidSumcheckProof")]
37 InvalidSumcheckProof,
38 /// returned when the initial input to an incremental computation differs from a previously declared arity
39 #[error("InvalidInitialInputLength")]
40 InvalidInitialInputLength,
41 /// returned when the step execution produces an output whose length differs from a previously declared arity
42 #[error("InvalidStepOutputLength")]
43 InvalidStepOutputLength,
44 /// returned when the transcript engine encounters an overflow of the round number
45 #[error("InternalTranscriptError")]
46 InternalTranscriptError,
47}