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