Enum FatalStorageError

Source
pub enum FatalStorageError {
Show 23 variants CreateDatabaseDirectory(PathBuf, Error), DuplicateEraIdIndex { era_id: EraId, first: BlockHash, second: BlockHash, }, FailedToOverwriteBlock, DatabaseNotFound(RecordId), 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 { transaction_hash: TransactionHash, }, UnexpectedSerializationFailure(Error), UnexpectedDeserializationFailure(Error), ApprovalsHashesLengthMismatch { block_hash: BlockHash, expected: usize, actual: usize, }, InvalidExecutionResultsV1Length { deploy_hash: DeployHash, results_length: usize, }, Prometheus(Error), VariantMismatch(VariantMismatch), BlockStoreError(BlockStoreError), UnexpectedRecordId(RecordId),
}
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.

§

DuplicateEraIdIndex

Found a duplicate switch-block-at-era-id index entry.

Fields

§era_id: EraId

Era ID at which duplicate was found.

§first: BlockHash

First block hash encountered at era_id.

§second: BlockHash

Second block hash encountered at era_id.

§

FailedToOverwriteBlock

An internal DB error - blocks should be overwritten.

§

DatabaseNotFound(RecordId)

Record specified in raw request has not been found in the storage module.

§

UnableToMoveFile

Filesystem error while trying to move file.

Fields

§source_path: PathBuf

The path to the file that should have been moved.

§dest_path: PathBuf

The path where the file should have been moved to.

§original_error: Error

The original io::Error from fs::rename.

§

MissingStorageFiles

Mix of missing and found storage files.

Fields

§missing_files: Vec<PathBuf>

The files that were not be found in the storage directory.

§

BlockValidation(BlockValidationError)

Error when validating a block.

§

BlockHeaderNotStoredUnderItsHash

A block header was not stored under its hash.

Fields

§queried_block_hash_bytes: Vec<u8>

The queried block hash.

§found_block_header_hash: BlockHash

The actual header of the block hash.

§block_header: Box<BlockHeader>

The block header found in storage.

§

NoBlockHeaderForBlockBody

Block body did not have a block header.

Fields

§block_body_hash: Digest

The block body hash.

§block_body: Box<BlockBody>

The block body.

§

SignatureVerification(Error)

Could not verify finality signatures for block.

§

CorruptedBlockSignatureIndex

Corrupted block signature index.

Fields

§raw_key: Vec<u8>

The key in the block signature index.

§block_hash_bytes: Vec<u8>

The block hash of the signatures found in the index.

§

InvalidSwitchBlock(Box<BlockHeader>)

Switch block does not contain era end.

§

UnexpectedBlockBodyPart

A block body was found to have more parts than expected.

Fields

§block_body_hash: Digest

The block body with the issue.

§part_hash: Digest

The hash of the superfluous body part.

§

StoredItemSerializationFailure(Error)

Failed to serialize an item that was found in local storage.

§

UnexpectedFinalizedApprovals

We tried to store finalized approvals for a nonexistent transaction.

Fields

§transaction_hash: TransactionHash

The missing transaction hash.

§

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

Stored finalized approvals hashes count doesn’t match number of deploys.

Fields

§block_hash: BlockHash

The block hash.

§expected: usize

The number of deploys in the block.

§actual: usize

The number of approvals hashes.

§

InvalidExecutionResultsV1Length

V1 execution results hashmap doesn’t have exactly one entry.

Fields

§deploy_hash: DeployHash

The deploy hash.

§results_length: usize

The number of execution results.

§

Prometheus(Error)

Error initializing metrics.

§

VariantMismatch(VariantMismatch)

Type mismatch indicating programmer error.

§

BlockStoreError(BlockStoreError)

BlockStoreError

§

UnexpectedRecordId(RecordId)

BlockStoreError

Trait Implementations§

Source§

impl Debug for FatalStorageError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FatalStorageError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for FatalStorageError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<BlockStoreError> for FatalStorageError

Source§

fn from(source: BlockStoreError) -> Self

Converts to this type from the input type.
Source§

impl From<BlockValidationError> for FatalStorageError

Source§

fn from(source: BlockValidationError) -> Self

Converts to this type from the input type.
Source§

impl From<Box<BlockValidationError>> for FatalStorageError

Source§

fn from(err: Box<BlockValidationError>) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for FatalStorageError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<VariantMismatch> for FatalStorageError

Source§

fn from(source: VariantMismatch) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<From, To> FallibleInto<To> for From
where To: TryFrom<From>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcastable for T
where T: Any + Send + Sync + 'static,

Source§

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

upcast ref
Source§

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

upcast mut ref
Source§

fn upcast_any_box(self: Box<T>) -> Box<dyn Any>

upcast boxed dyn
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,