plonky2/evm/src/witness/errors.rs

40 lines
789 B
Rust
Raw Normal View History

use ethereum_types::U256;
2022-12-01 12:06:29 -08:00
#[derive(Debug)]
2022-11-28 13:19:40 -08:00
pub enum ProgramError {
2022-11-15 09:26:54 -08:00
OutOfGas,
InvalidOpcode,
StackUnderflow,
InvalidRlp,
2022-11-15 09:26:54 -08:00
InvalidJumpDestination,
InvalidJumpiDestination,
StackOverflow,
2023-02-25 07:59:51 -08:00
KernelPanic,
MemoryError(MemoryError),
2023-06-07 14:58:59 -07:00
GasLimitError,
2023-06-07 18:27:23 -07:00
InterpreterError,
2023-09-12 19:23:16 -04:00
IntegerTooLarge,
ProverInputError(ProverInputError),
UnknownContractCode,
}
#[allow(clippy::enum_variant_names)]
#[derive(Debug)]
pub enum MemoryError {
ContextTooLarge { context: U256 },
SegmentTooLarge { segment: U256 },
VirtTooLarge { virt: U256 },
2022-11-15 09:26:54 -08:00
}
#[derive(Debug)]
pub enum ProverInputError {
OutOfMptData,
OutOfRlpData,
OutOfWithdrawalData,
CodeHashNotFound,
InvalidMptInput,
InvalidInput,
InvalidFunction,
NumBitsError,
}