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