Skip to main content

Module error

Module error 

Source
Expand description

BlockStore error surface (BlockStoreError).

Requirements

§Operational errors without a first-class variant

ERR-001 caps the enum at thirteen cases. Some STR-004 guards (missing read-only path, read-only mutation, double genesis) therefore map to BlockStoreError::Serialization with stable string payloads documented below so integration tests and future refactors can match deterministically. If the taxonomy gains dedicated variants later, these constants become the migration anchor.

Enums§

BlockStoreError
Crate-level error for persistence, chain, and I/O boundaries (ERR-001).

Constants§

ERR_ASYNC_JOIN_PREFIX
Stable BlockStoreError::Serialization payload prefix when a tokio::task::spawn_blocking task panics or is cancelled and tokio::task::JoinError surfaces on .await (BLK-007 AC §6).
ERR_INIT_GENESIS_ALREADY_INITIALIZED
Stable BlockStoreError::Serialization payload when genesis metadata is already present.
ERR_INIT_GENESIS_READ_ONLY
Stable BlockStoreError::Serialization payload when crate::store::BlockStore::init_genesis runs on a read-only handle.
ERR_MUTATION_READ_ONLY
Stable BlockStoreError::Serialization payload for other mutating APIs (crate::store::BlockStore::put) on a read-only handle (BLK-001 precursor).
ERR_OPEN_READONLY_PATH_MISSING_PREFIX
Stable BlockStoreError::Serialization payload prefix when crate::store::BlockStore::open_readonly is called with a path that does not exist on disk.
ERR_UPDATE_STATUS_RECORD_NOT_CACHED_PREFIX
Stable BlockStoreError::Serialization payload prefix when crate::store::BlockStore::update_status runs but the in-memory record cache has no entry for the hash (BLK-010 AC §3).