-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patherror.rs
More file actions
58 lines (49 loc) · 1.85 KB
/
error.rs
File metadata and controls
58 lines (49 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Morph payload builder error types.
use alloy_primitives::B256;
use reth_evm::execute::ProviderError;
use reth_revm::db::bal::EvmDatabaseError;
/// Errors that can occur during Morph payload building.
#[derive(Debug, thiserror::Error)]
pub enum MorphPayloadBuilderError {
/// Blob transactions are not supported on Morph L2.
#[error("blob transactions are not supported")]
BlobTransactionRejected,
/// Failed to recover transaction signer.
#[error("failed to recover transaction signer")]
TransactionEcRecoverFailed,
/// Block gas limit exceeded by sequencer transactions.
#[error(
"block gas limit {gas} exceeded by sequencer transactions, gas spent by tx: {gas_spent_by_tx:?}"
)]
BlockGasLimitExceededBySequencerTransactions {
/// Gas spent by each transaction.
gas_spent_by_tx: Vec<u64>,
/// Block gas limit.
gas: u64,
},
/// Failed to decode transaction from payload attributes.
#[error("failed to decode transaction: {0}")]
TransactionDecodeError(#[from] alloy_rlp::Error),
/// Invalid L1 message queue index.
#[error("invalid L1 message queue index: expected {expected}, got {actual}")]
InvalidL1MessageQueueIndex {
/// Expected queue index.
expected: u64,
/// Actual queue index.
actual: u64,
},
/// L1 message appears after regular transaction.
#[error("L1 message appears after regular transaction")]
L1MessageAfterRegularTx,
/// Invalid transaction hash.
#[error("invalid transaction hash: expected {expected}, got {actual}")]
InvalidTransactionHash {
/// Expected hash.
expected: B256,
/// Actual hash.
actual: B256,
},
/// Database error when reading contract storage.
#[error("database error: {0}")]
Database(#[from] EvmDatabaseError<ProviderError>),
}