clone_solana_ledger/blockstore/
error.rs1use {
4 log::*, clone_solana_accounts_db::hardened_unpack::UnpackError, clone_solana_sdk::clock::Slot,
5 thiserror::Error,
6};
7
8#[derive(Error, Debug)]
9pub enum BlockstoreError {
10 #[error("shred for index exists")]
11 ShredForIndexExists,
12 #[error("invalid shred data")]
13 InvalidShredData(bincode::Error),
14 #[error("RocksDB error: {0}")]
15 RocksDb(#[from] rocksdb::Error),
16 #[error("slot is not rooted")]
17 SlotNotRooted,
18 #[error("dead slot")]
19 DeadSlot,
20 #[error("io error: {0}")]
21 Io(#[from] std::io::Error),
22 #[error("serialization error: {0}")]
23 Serialize(#[from] bincode::Error),
24 #[error("fs extra error: {0}")]
25 FsExtraError(#[from] fs_extra::error::Error),
26 #[error("slot cleaned up")]
27 SlotCleanedUp,
28 #[error("unpack error: {0}")]
29 UnpackError(#[from] UnpackError),
30 #[error("unable to set open file descriptor limit")]
31 UnableToSetOpenFileDescriptorLimit,
32 #[error("transaction status slot mismatch")]
33 TransactionStatusSlotMismatch,
34 #[error("empty epoch stakes")]
35 EmptyEpochStakes,
36 #[error("no vote timestamps in range")]
37 NoVoteTimestampsInRange,
38 #[error("protobuf encode error: {0}")]
39 ProtobufEncodeError(#[from] prost::EncodeError),
40 #[error("protobuf decode error: {0}")]
41 ProtobufDecodeError(#[from] prost::DecodeError),
42 #[error("parent entries unavailable")]
43 ParentEntriesUnavailable,
44 #[error("slot unavailable")]
45 SlotUnavailable,
46 #[error("unsupported transaction version")]
47 UnsupportedTransactionVersion,
48 #[error("missing transaction metadata")]
49 MissingTransactionMetadata,
50 #[error("transaction-index overflow")]
51 TransactionIndexOverflow,
52 #[error("invalid erasure config")]
53 InvalidErasureConfig,
54 #[error("last shred index missing slot {0}")]
55 UnknownLastIndex(Slot),
56 #[error("missing shred slot {0}, index {1}")]
57 MissingShred(Slot, u64),
58 #[error("legacy shred slot {0}, index {1}")]
59 LegacyShred(Slot, u64),
60 #[error("unable to read merkle root slot {0}, index {1}")]
61 MissingMerkleRoot(Slot, u64),
62}
63pub type Result<T> = std::result::Result<T, BlockstoreError>;