Skip to main content

sp1_verifier/plonk/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum PlonkError {
5    #[error("Beyond the modulus")]
6    BeyondTheModulus,
7    #[error("BSB22 Commitment number mismatch")]
8    Bsb22CommitmentMismatch,
9    #[error("Challenge already computed")]
10    ChallengeAlreadyComputed,
11    #[error("Challenge not found")]
12    ChallengeNotFound,
13    #[error("DST too large")]
14    DSTTooLarge,
15    #[error("Ell too large")]
16    EllTooLarge,
17    #[error("Inverse not found")]
18    InverseNotFound,
19    #[error("Invalid number of digests")]
20    InvalidNumberOfDigests,
21    #[error("Invalid verifying key")]
22    InvalidVerifyingKey,
23    #[error("Invalid witness")]
24    InvalidWitness,
25    #[error("Pairing check failed")]
26    PairingCheckFailed,
27    #[error("Previous challenge not computed")]
28    PreviousChallengeNotComputed,
29    #[error("Transcript error")]
30    TranscriptError,
31    #[error("Plonk vkey hash mismatch")]
32    PlonkVkeyHashMismatch,
33    #[error("Vkey root mismatch")]
34    VkeyRootMismatch,
35    #[error("Exit code mismatch")]
36    ExitCodeMismatch,
37    #[error("General error: {0}")]
38    GeneralError(#[from] crate::error::Error),
39}