Skip to content
LimniFS

.format · §5

Manifest.

The manifest is the small signed head of a .lim image. 16-byte header, nine sections, Merkle root. The ManifestRoot it produces is the image's identity — every URL, container ID, content hash, and IPFS CID that references the image resolves to it.

§5.2 – §5.10 · THE NINE SECTIONS

After the header.

Sections appear in the order they're hashed into the Merkle root (see below). Optional sections are FlatBuffers-equivalent tables that may be absent — readers detect presence by section ID. Each section is independently versioned by the manifest header's per-layer versions.

§5.2

Feature flags

required

List of (flag_id: u16, required: bool). Each flag references the feature-flag registry. Required-unknown ⇒ UnsupportedFeature; optional-unknown ⇒ ignore.

§5.3

Metadata reference

required

BLAKE3(metadata blob) + locator. Merkle root commits to this hash directly so an attacker cannot swap the metadata blob.

§5.4

Slab index

required

Every slab referenced by the image, with mirror lists of locator entries. Slabs in the index MUST be referenced by ≥1 drop.

§5.5

Crypto params

required

image_key_id (0x00 = plaintext; else AEAD id) + image_key + recipients[] (HPKE envelopes) + optional sigstore signature_bundle.

§5.6

EC params

optional

k, m, polynomial (default 0x011D for GF(2^8)), per_slab_overrides. Absent ⇒ no EC.

§5.7

DMS policy

optional

Dead Man's Switch / key escrow. v0.1 supports Shamir k-of-n only (time-lock deferred). Absent ⇒ no escrow.

§5.8

Delta linkage

optional

base_root (parent image's ManifestRoot) + tree_ops[]. Absent for non-delta images; readers detect deltas by section presence.

§5.9

History

required

Append-only log of operations: build, delta, flatten, turnover, deepen. Each entry: op, timestamp, inputs[], params.

§5.10

Merkle root

required

BLAKE3 of the Merkle hash list (see below). The image's identity.

§5.10 · MERKLE ROOT CONSTRUCTION

How identity is computed.

The Merkle root is a flat construction (not a deep tree) over the metadata blob hash and the section hashes. A flat construction lets each section be verified individually without loading siblings — important for HTTP range streaming and partial verification.


ManifestRoot = BLAKE3(
  "limnifs/v1"                       // domain separator; prevents cross-protocol confusion
  || H(metadata)                     // the layer-2 metadata blob's BLAKE3
  || H(format_header)                // the 16-byte header
  || H(feature_flags)
  || H(metadata_reference)
  || H(slab_index)
  || H(crypto_params)
  || H(ec_params)                    // empty hash if section absent
  || H(dms_policy)                   // empty hash if section absent
  || H(delta_linkage)                // empty hash if section absent (non-delta image)
  || H(history)
)
      

The domain separator "limnifs/v1" prevents cross-protocol confusion — the same bytes hashed under a different prefix produce a different root, so LimniFS roots can never be confused with another system's hashes. The metadata hash appears directly in the hash list so an attacker cannot swap the metadata blob without invalidating the root.

Why flat, not deep?

A deep Merkle tree over sections would require loading sibling hashes to verify any one section. A flat construction (hash of section hashes) lets each section be verified with just its own bytes plus the root. The trade-off is that updating one section invalidates the root — but LimniFS images are immutable, so that's not a cost we pay.

FULL LAYOUT

The whole manifest, ASCII.


   ┌──────────────────────────────────────────────────────────────────────────────┐
   │ .lim image — manifest section                                                │
   │                                                                              │
   │   ┌────────────────────────────────────────┐  ← offset 0                     │
   │   │ §5.1  MagicHeader (16 B)               │                                 │
   │   │  "LMFS"  │  drop_store_v  │  metadata_v │  manifest_v  │   reserved      │
   │   └────────────────────────────────────────┘                                 │
   │                                                                              │
   │   ┌────────────────────────────────────────┐  ← offset 16                    │
   │   │ §5.2  Feature flags section            │                                 │
   │   │   flag_count: u32 LE                   │                                 │
   │   │   flags[]: (flag_id: u16, req: u8)[]   │                                 │
   │   └────────────────────────────────────────┘                                 │
   │                                                                              │
   │   ┌────────────────────────────────────────┐                                 │
   │   │ §5.3  Metadata reference section       │                                 │
   │   │   H(metadata): 32 B                    │                                 │
   │   │   locator_scheme: u8                   │                                 │
   │   │   locator_data: varint-length string   │                                 │
   │   │   inline_blob: varint-length bytes     │ (when scheme = inline)          │
   │   └────────────────────────────────────────┘                                 │
   │                                                                              │
   │   ┌────────────────────────────────────────┐                                 │
   │   │ §5.4  Slab index section               │                                 │
   │   │   slab_count: u32 LE                   │                                 │
   │   │   slabs[]: (slab_id: 40 B, locators[]) │                                 │
   │   └────────────────────────────────────────┘                                 │
   │                                                                              │
   │   ┌────────────────────────────────────────┐                                 │
   │   │ §5.5  Crypto params section            │                                 │
   │   │   image_key_id: u8                     │                                 │
   │   │   image_key: 32 B (iff key_id != 0)    │                                 │
   │   │   recipients[]: HPKEEnvelope[]         │                                 │
   │   │   signature_bundle: SignatureBundle?   │                                 │
   │   └────────────────────────────────────────┘                                 │
   │                                                                              │
   │   ┌────────────────────────────────────────┐  (optional — present iff EC)   │
   │   │ §5.6  EC params                        │                                 │
   │   └────────────────────────────────────────┘                                 │
   │                                                                              │
   │   ┌────────────────────────────────────────┐  (optional — present iff DMS)  │
   │   │ §5.7  DMS policy                       │                                 │
   │   └────────────────────────────────────────┘                                 │
   │                                                                              │
   │   ┌────────────────────────────────────────┐  (optional — present iff delta)│
   │   │ §5.8  Delta linkage                    │                                 │
   │   └────────────────────────────────────────┘                                 │
   │                                                                              │
   │   ┌────────────────────────────────────────┐                                 │
   │   │ §5.9  History                          │                                 │
   │   │   entry_count: u32 LE                 │                                 │
   │   │   entries[]: HistoryEntry[]            │                                 │
   │   └────────────────────────────────────────┘                                 │
   │                                                                              │
   │   ┌────────────────────────────────────────┐                                 │
   │   │ §5.10 ManifestRoot (32 B)              │                                 │
   │   │   BLAKE3 of the Merkle hash list above │                                 │
   │   └────────────────────────────────────────┘                                 │
   │                                                                              │
   │   Optionally: sigstore signature bundle over ManifestRoot (§15.3)            │
   └──────────────────────────────────────────────────────────────────────────────┘
      

See limnifs/specfor the full multi-file spec (concepts → wire-format → bit-level → algorithms → conformance → adapters).