mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-11 17:53:12 +00:00
52 lines
1.2 KiB
Rust
52 lines
1.2 KiB
Rust
use std::io;
|
|
|
|
use thiserror::Error;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum NssaError {
|
|
#[error("Invalid input: {0}")]
|
|
InvalidInput(String),
|
|
|
|
#[error("Program violated execution rules")]
|
|
InvalidProgramBehavior,
|
|
|
|
#[error("Serialization error: {0}")]
|
|
InstructionSerializationError(String),
|
|
|
|
#[error("Invalid private key")]
|
|
InvalidPrivateKey,
|
|
|
|
#[error("IO error: {0}")]
|
|
Io(#[from] io::Error),
|
|
|
|
#[error("Invalid Public Key")]
|
|
InvalidPublicKey,
|
|
|
|
#[error("Risc0 error: {0}")]
|
|
ProgramWriteInputFailed(String),
|
|
|
|
#[error("Risc0 error: {0}")]
|
|
ProgramExecutionFailed(String),
|
|
|
|
#[error("Risc0 error: {0}")]
|
|
ProgramProveFailed(String),
|
|
|
|
#[error("Invalid transaction: {0}")]
|
|
TransactionDeserializationError(String),
|
|
|
|
#[error("Core error")]
|
|
Core(#[from] nssa_core::error::NssaCoreError),
|
|
|
|
#[error("Program output deserialization error: {0}")]
|
|
ProgramOutputDeserializationError(String),
|
|
|
|
#[error("Circuit output deserialization error: {0}")]
|
|
CircuitOutputDeserializationError(String),
|
|
|
|
#[error("Invalid privacy preserving execution circuit proof")]
|
|
InvalidPrivacyPreservingProof,
|
|
|
|
#[error("Circuit proving error")]
|
|
CircuitProvingError(String),
|
|
}
|