reth_optimism_evm/
error.rs
1use reth_evm::execute::BlockExecutionError;
4
5#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
7pub enum L1BlockInfoError {
8 #[error("could not find l1 block info tx in the L2 block")]
10 MissingTransaction,
11 #[error("invalid l1 block info transaction calldata in the L2 block")]
13 InvalidCalldata,
14 #[error("unexpected l1 block info tx calldata length found")]
16 UnexpectedCalldataLength,
17 #[error("could not convert l1 base fee")]
19 BaseFeeConversion,
20 #[error("could not convert l1 fee overhead")]
22 FeeOverheadConversion,
23 #[error("could not convert l1 fee scalar")]
25 FeeScalarConversion,
26 #[error("could not convert base fee scalar")]
28 BaseFeeScalarConversion,
29 #[error("could not convert l1 blob base fee")]
31 BlobBaseFeeConversion,
32 #[error("could not convert l1 blob base fee scalar")]
34 BlobBaseFeeScalarConversion,
35 #[error("could not convert operator fee scalar")]
37 OperatorFeeScalarConversion,
38 #[error("could not convert operator fee constant")]
40 OperatorFeeConstantConversion,
41 #[error("Optimism hardforks are not active")]
43 HardforksNotActive,
44}
45
46#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
48pub enum OpBlockExecutionError {
49 #[error(transparent)]
51 L1BlockInfo(#[from] L1BlockInfoError),
52 #[error("failed to force create2deployer account code")]
54 ForceCreate2DeployerFail,
55 #[error("failed to load account {_0}")]
57 AccountLoadFailed(alloy_primitives::Address),
58}
59
60impl From<OpBlockExecutionError> for BlockExecutionError {
61 fn from(err: OpBlockExecutionError) -> Self {
62 Self::other(err)
63 }
64}