Expand description
Partition / packfile management — format v3.
A PartitionStore owns exactly one partition’s on-disk subtree:
<store_root>/<partition_id_hex>/
active/active.pack — currently-open, appendable pack (no trailer)
packs/<xx>/<pack_id>.pack — sealed, immutable, content-addressed packs
packs/<xx>/<pack_id>.idx — derived index, rebuildable, never authoritative
manifests/*.json — manifests ingested into this partitionNo pack file, and no PartitionStore, ever spans more than one
partition — that’s the physical boundary the whole GC and dedup story
relies on.
Modules§
- packfile
- Packfile on-disk layout — format v3, per the 2026-09-23
storage-addressing rulings (the design and security reviews,
Branch A). Entry meta is 54 bytes; the
contextreservation the spec this superseded (the format-reservations spec) carried is withdrawn by both rulings —(hash, context)addressing never lands, so there is no 16-byte slot to grow into.key_epoch(u32, equality-only, single legal value0today) andflags(single legal value0x00, no bit assigned) remain exactly as that spec reserved them.
Structs§
- Partition
Store - The reference
ImmutableStoreimplementation: a single partition’s packfiles on the local filesystem.
Constants§
- SEAL_
CAP_ BYTES - Soft cap: an active pack is sealed once it reaches this size.
Traits§
- Immutable
Store - The full content-addressed storage contract a backend must satisfy: partition-scoped, immutable once written, hash-verified on every read.
- Mutable
Store - Cache-state store for the bitchain protocol layer (e.g. a “latest”
pointer keyed by name) — distinct from
ImmutableStore, which has no notion of a mutable pointer: every address it serves is a stable content hash. Declared per the 2026-06 lock’s target trait shape so the vocabulary exists; no implementation ships with this relocation — bitchain’s manifest protocol treats manifests as immutable, content-addressed artifacts and has no current caller for this trait.
Functions§
- list_
partitions - Enumerate every provisioned partition under
store_root— one with apartition.jsonrecord, not merely a 32-hex-char directory. Used by CLI commands (ls,gc,push) that operate “over every partition” when the caller doesn’t name one explicitly.