Skip to main content

Module store

Module store 

Source
Expand description

Content-addressed object store (Phase 9).

A .voldoc descriptor’s object table is a single ordered sequence. Each entry is either an inline byte object (OBJECT, tag 0x10) or a reference to an object held by an ObjectStore (EXTERNAL_REF, tag 0x80). Inline and external objects share one id space, so equal bytes are equal ids regardless of which document they came from.

§Two digests, two roles

digestroleauthority
SHA-256whole reconstructed source; archival identityparse/materialize/verify
BLAKE3-256 (Id)one object’s bytes; store namespacerelational/advisory

An Id is an ephemeral, relational name for a shareable object. It is never a substitute for the source digest and never appears in INTEGRITY.

§Verification rule

ObjectStore::get must re-hash the returned bytes and reject with crate::ErrorClass::IntegrityMismatch unless BLAKE3(bytes) == id. ObjectStore::get_range cannot re-verify the whole object; exactness for a store-backed materialization therefore rests on the EXTERNAL_REF declared length and the descriptor’s INTEGRITY SHA-256 checked by materialize.

Structs§

AccountReport
Cohort accounting across the three frozen universes.
EmbeddedStore
A content-addressed directory store.
FsSeedStore
The reference seed substrate: one file per node under root/seed.
GcReport
Outcome of a mark-and-sweep GC pass.
Id
Id is a newtype over the 32 raw bytes of BLAKE3-256(object_bytes), with no domain prefix. Hex is lower-case.
IoCounters
A shared set of physical-read byte counters, one per class.
IoSnapshot
A point-in-time copy of IoCounters. Subtract two to attribute bytes to an interval.
NodeId
NodeId is a newtype over the 32 raw bytes of BLAKE3-256("VOLE:PSEED:v1" || canonical_node_bytes). Hex is lower-case.
NullResolver
A resolver that resolves nothing; used by the standalone materialize.
PackedSeedStore
A packed content-addressed store of canonical procedural seed nodes.
RootAccount
Per-root accounting.
SeedStoreStats
Physical accounting of a seed store.
StoreStats
Size accounting reported by a backend.

Enums§

SyncPolicy
When the packed writer forces appended records to stable storage.

Constants§

SEED_FORMAT_VERSION
Canonical seed-node format version.
SEED_NODE_DOMAIN
Domain-separation prefix for a procedural seed node’s content id.
STORE_FORMAT_VERSION
Current on-disk store format version.
STORE_MAGIC
Store marker magic (VOLDST + 0x1A text-EOF + NUL).

Traits§

ObjectResolver
The resolver consumed by store-backed materialization. A blanket impl makes every ObjectStore a resolver, so callers pass &store.
ObjectStore
A content-addressed store keyed by BLAKE3-256 of the object bytes.
SeedStore
A content-addressed store of canonical procedural seed nodes.

Functions§

account
Compute the three accounting universes for roots, resolving objects and closure through store.
externalize
Inline → external: put every object’s bytes into store, replacing it with an ObjectSource::External reference.
gc
Mark-and-sweep garbage collection over a set of root descriptors.
hydrate
External → inline: resolve every reference through resolver (verifying id and length) and replace it with ObjectSource::Inline. The external feature bit clears automatically because required_features() is derived.
seed_closure
Collect the transitive closure of roots in a seed store, verifying that no dependency is missing. deps_of maps a node’s canonical bytes to its dependency ids; it must be deterministic.