2023-03-21 20:15:46 +01:00
|
|
|
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,
|
2023-09-26 11:13:57 -04:00
|
|
|
InvalidRlp,
|
2022-11-15 09:26:54 -08:00
|
|
|
InvalidJumpDestination,
|
|
|
|
|
InvalidJumpiDestination,
|
|
|
|
|
StackOverflow,
|
2023-02-25 07:59:51 -08:00
|
|
|
KernelPanic,
|
2023-03-21 20:15:46 +01:00
|
|
|
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,
|
2023-09-26 11:13:57 -04:00
|
|
|
ProverInputError(ProverInputError),
|
|
|
|
|
UnknownContractCode,
|
2023-03-21 20:15:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[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
|
|
|
}
|
2023-09-26 11:13:57 -04:00
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
|
pub enum ProverInputError {
|
|
|
|
|
OutOfMptData,
|
|
|
|
|
OutOfRlpData,
|
2023-11-07 12:20:54 +01:00
|
|
|
OutOfWithdrawalData,
|
2023-09-26 11:13:57 -04:00
|
|
|
CodeHashNotFound,
|
|
|
|
|
InvalidMptInput,
|
|
|
|
|
InvalidInput,
|
|
|
|
|
InvalidFunction,
|
2023-11-29 16:43:50 +01:00
|
|
|
NumBitsError,
|
2023-09-26 11:13:57 -04:00
|
|
|
}
|