-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patherror.rs
More file actions
39 lines (38 loc) · 1.67 KB
/
error.rs
File metadata and controls
39 lines (38 loc) · 1.67 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
use alloy_primitives::{Address, FixedBytes};
use mpt::Error as MptError;
use reth_consensus::ConsensusError;
use reth_evm::execute::BlockExecutionError;
use revm_primitives::U256;
#[derive(Debug, thiserror::Error)]
pub enum ClientError {
#[error("Failed to recover senders from signatures")]
SignatureRecoveryFailed,
#[error("Mismatched state root after executing the block")]
MismatchedStateRoot,
#[error("Mismatched storage root after executing the block")]
MismatchedStorageRoot,
#[error("unknown chain ID: {}", .0)]
UnknownChainId(u64),
#[error("Missing bytecode for account {}", .0)]
MissingBytecode(Address),
#[error("Missing trie for address {}", .0)]
MissingTrie(Address),
#[error("Invalid block number found in headers \n expected: {} found: {}", .0, .1)]
InvalidHeaderBlockNumber(u64, u64),
#[error("Invalid parent header found for block \n expected: {}, found: {}", .0, .1)]
InvalidHeaderParentHash(FixedBytes<32>, FixedBytes<32>),
#[error("Failed to validate post exectution state {}", 0)]
PostExecutionError(#[from] ConsensusError),
#[error("Block Execution Failed: {}", .0)]
BlockExecutionError(#[from] BlockExecutionError),
#[error("Mpt Error: {}", .0)]
MptError(#[from] MptError),
#[error("Failed to read the genesis file: {}", .0)]
FailedToReadGenesisFile(#[from] std::io::Error),
#[error("Failed to deserialize the genesis file: {}", .0)]
FailedToDeserializeGenesisFile(#[from] serde_json::Error),
#[error("Failed to check slot and value: {}", .0)]
FailedToCheckSlotAndValue(U256),
#[error("Failed to fetch slot and value: {}", .0)]
FailedToFetchSlotAndValue(U256),
}