Enum casper_node::storage::FatalStorageError
source · pub enum FatalStorageError {
Show 21 variants
CreateDatabaseDirectory(PathBuf, Error),
DuplicateBlockIndex {
height: u64,
first: BlockHash,
second: BlockHash,
},
DuplicateEraIdIndex {
era_id: EraId,
first: BlockHash,
second: BlockHash,
},
DuplicateDeployIndex {
deploy_hash: DeployHash,
first: BlockHashAndHeight,
second: BlockHashAndHeight,
},
InternalStorage(LmdbExtError),
FailedToOverwriteBlock,
UnableToMoveFile {
source_path: PathBuf,
dest_path: PathBuf,
original_error: Error,
},
MissingStorageFiles {
missing_files: Vec<PathBuf>,
},
BlockValidation(BlockValidationError),
BlockHeaderNotStoredUnderItsHash {
queried_block_hash_bytes: Vec<u8>,
found_block_header_hash: BlockHash,
block_header: Box<BlockHeader>,
},
NoBlockHeaderForBlockBody {
block_body_hash: Digest,
block_body: Box<BlockBody>,
},
SignatureVerification(Error),
CorruptedBlockSignatureIndex {
raw_key: Vec<u8>,
block_hash_bytes: Vec<u8>,
},
InvalidSwitchBlock(Box<BlockHeader>),
UnexpectedBlockBodyPart {
block_body_hash: Digest,
part_hash: Digest,
},
StoredItemSerializationFailure(Error),
UnexpectedFinalizedApprovals {
deploy_hash: DeployHash,
},
UnexpectedSerializationFailure(Error),
UnexpectedDeserializationFailure(Error),
ApprovalsHashesLengthMismatch {
block_hash: BlockHash,
expected: usize,
actual: usize,
},
Prometheus(Error),
}
Expand description
A fatal storage component error.
An error of this kinds indicates that storage is corrupted or otherwise irrecoverably broken, at least for the moment. It should usually be followed by swift termination of the node.
Variants§
CreateDatabaseDirectory(PathBuf, Error)
Failure to create the root database directory.
DuplicateBlockIndex
Fields
Found a duplicate block-at-height index entry.
DuplicateEraIdIndex
Fields
Found a duplicate switch-block-at-era-id index entry.
DuplicateDeployIndex
Fields
deploy_hash: DeployHash
Deploy hash at which duplicate was found.
first: BlockHashAndHeight
First block hash encountered at deploy_hash
.
second: BlockHashAndHeight
Second block hash encountered at deploy_hash
.
Found a duplicate switch-block-at-era-id index entry.
InternalStorage(LmdbExtError)
LMDB error while operating.
FailedToOverwriteBlock
An internal DB error - blocks should be overwritten.
UnableToMoveFile
Fields
Filesystem error while trying to move file.
MissingStorageFiles
Mix of missing and found storage files.
BlockValidation(BlockValidationError)
Error when validating a block.
BlockHeaderNotStoredUnderItsHash
Fields
block_header: Box<BlockHeader>
The block header found in storage.
A block header was not stored under its hash.
NoBlockHeaderForBlockBody
Block body did not have a block header.
SignatureVerification(Error)
Could not verify finality signatures for block.
CorruptedBlockSignatureIndex
Fields
Corrupted block signature index.
InvalidSwitchBlock(Box<BlockHeader>)
Switch block does not contain era end.
UnexpectedBlockBodyPart
Fields
A block body was found to have more parts than expected.
StoredItemSerializationFailure(Error)
Failed to serialize an item that was found in local storage.
UnexpectedFinalizedApprovals
Fields
deploy_hash: DeployHash
The missing deploy hash.
We tried to store finalized approvals for a nonexistent deploy.
UnexpectedSerializationFailure(Error)
ToBytes
serialization failure of an item that should never fail to serialize.
UnexpectedDeserializationFailure(Error)
ToBytes
deserialization failure of an item that should never fail to serialize.
ApprovalsHashesLengthMismatch
Fields
Stored finalized approvals hashes count doesn’t match number of deploys.
Prometheus(Error)
Error initializing metrics.
Trait Implementations§
source§impl Debug for FatalStorageError
impl Debug for FatalStorageError
source§impl Display for FatalStorageError
impl Display for FatalStorageError
source§impl Error for FatalStorageError
impl Error for FatalStorageError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<BlockValidationError> for FatalStorageError
impl From<BlockValidationError> for FatalStorageError
source§fn from(source: BlockValidationError) -> Self
fn from(source: BlockValidationError) -> Self
source§impl From<Box<BlockValidationError>> for FatalStorageError
impl From<Box<BlockValidationError>> for FatalStorageError
source§fn from(err: Box<BlockValidationError>) -> Self
fn from(err: Box<BlockValidationError>) -> Self
source§impl From<Error> for FatalStorageError
impl From<Error> for FatalStorageError
Auto Trait Implementations§
impl !RefUnwindSafe for FatalStorageError
impl Send for FatalStorageError
impl Sync for FatalStorageError
impl Unpin for FatalStorageError
impl !UnwindSafe for FatalStorageError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.