logo
pub enum Error {
Show 18 variants CreateDatabaseDirectory(PathBufError), DuplicateBlockIndex { height: u64, first: BlockHash, second: BlockHash, }, DuplicateEraIdIndex { era_id: EraId, first: BlockHash, second: BlockHash, }, DuplicateDeployIndex { deploy_hash: DeployHash, first: BlockHash, second: BlockHash, }, InternalStorage(LmdbExtError), 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, hashing_algorithm_version: HashingAlgorithmVersion, block_body: Box<BlockBody>, }, UnexpectedHashingAlgorithmVersion { expected_hashing_algorithm_version: HashingAlgorithmVersion, actual_hashing_algorithm_version: HashingAlgorithmVersion, }, CouldNotFindBlockBodyPart { block_hash: BlockHash, merkle_linked_list_node_hash: Digest, }, SignatureVerification(Error), CorruptedBlockSignatureIndex { raw_key: Vec<u8>, block_hash_bytes: Vec<u8>, }, NonExistentBlockBodyReferredToByHeader(Box<BlockHeader>), NonExistentDeploy { deploy_hash: DeployHash, block: Box<Block>, }, UnexpectedBlockBodyPart { block_body_hash: Digest, part_hash: Digest, }, UnexpectedFinalizedApprovals { deploy_hash: DeployHash, },
}
Expand description

A storage component error.

Variants

CreateDatabaseDirectory(PathBufError)

Failure to create the root database directory.

DuplicateBlockIndex

Fields

height: u64

Height at which duplicate was found.

first: BlockHash

First block hash encountered at height.

second: BlockHash

Second block hash encountered at height.

Found a duplicate block-at-height index entry.

DuplicateEraIdIndex

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.

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

DuplicateDeployIndex

Fields

deploy_hash: DeployHash

Deploy hash at which duplicate was found.

first: BlockHash

First block hash encountered at deploy_hash.

second: BlockHash

Second block hash encountered at deploy_hash.

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

InternalStorage(LmdbExtError)

LMDB error while operating.

UnableToMoveFile

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.

Filesystem error while trying to move file.

MissingStorageFiles

Fields

missing_files: Vec<PathBuf>

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

Mix of missing and found storage files.

BlockValidation(BlockValidationError)

Error when validating a block.

BlockHeaderNotStoredUnderItsHash

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.

A block header was not stored under its hash.

NoBlockHeaderForBlockBody

Fields

block_body_hash: Digest

The block body hash.

hashing_algorithm_version: HashingAlgorithmVersion

The hashing algorithm of the block body.

block_body: Box<BlockBody>

The block body.

Block body did not have a block header.

UnexpectedHashingAlgorithmVersion

Fields

expected_hashing_algorithm_version: HashingAlgorithmVersion

Expected hashing algorithm version.

actual_hashing_algorithm_version: HashingAlgorithmVersion

Actual hashing algorithm version.

Unexpected hashing algorithm version.

CouldNotFindBlockBodyPart

Fields

block_hash: BlockHash

The block hash queried.

merkle_linked_list_node_hash: Digest

The hash of the node in the Merkle linked list.

Could not find block body part.

SignatureVerification(Error)

Could not verify finality signatures for block.

CorruptedBlockSignatureIndex

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.

Corrupted block signature index.

NonExistentBlockBodyReferredToByHeader(Box<BlockHeader>)

Non-existent block body referred to by header.

NonExistentDeploy

Fields

deploy_hash: DeployHash

The missing deploy hash.

block: Box<Block>

The block which has the missing deploy hash.

Non-existent deploy or transfer in block.

UnexpectedBlockBodyPart

Fields

block_body_hash: Digest

The block body with the issue.

part_hash: Digest

The hash of the superfluous body part.

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

UnexpectedFinalizedApprovals

Fields

deploy_hash: DeployHash

The missing deploy hash.

We tried to store finalized approvals for a nonexistent deploy.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

👎Deprecated since 1.42.0:

use the Display impl or to_string()

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

🔬This is a nightly-only experimental API. (error_generic_member_access)

Provides type based access to context intended for error reports. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into a target type. Read more

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. Read more

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

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

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

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

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Returns the argument unchanged.

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

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

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

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

Calls U::from(self).

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

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

🔬This is a nightly-only experimental API. (provide_any)

Data providers should implement this method to provide all values they are able to provide by using demand. Read more

Should always be Self

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

Converts the given value to a String. Read more

Attempts to convert self into a target type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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

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

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