Header (24 bytes)
The 24-byte header is the first thing in the MANIFEST. Every open of any store ends by writing it, so a store that was created with the legacy 8-byte header is converted on its first open by a build that writes this one.
Layout
Section titled “Layout”| Offset | Size | Type | Meaning |
|---|---|---|---|
| 0 | 4 | ascii | magic "STMF" |
| 4 | 2 | u16 LE | manifest_format = 1. 0 is Corrupt; greater than 1 is NewerFormat("manifest") |
| 6 | 2 | u16 LE | reserved, 0 |
| 8 | 4 | u32 LE | store_format, the store stamp. 0 is Corrupt; greater than the build’s own stamp is NewerFormat("store") |
| 12 | 8 | u64 LE | generation |
| 20 | 4 | u32 LE | reserved, 0 |
- magic4 B"STMF"
- manifest_format2 B1
- reserved2 B
- store_format4 B
- generation8 B
- reserved4 B
The store stamp
Section titled “The store stamp”store_format is the store stamp. It records which format the store as a whole has been brought to by the newest build that opened it. A build refuses a store whose stamp is higher than its own, before any byte changes (NewerFormat("store")). See Compatibility rules.
The stamp is stored in the header and is part of every record’s AAD, so a record cannot be carried across a stamp. Format pre-4 is the SEAM 1 layout; the numbering of pre-1 to pre-3 is described under pre-release stamps.
Planned for the first public release: SEAM 1 will be stamped 1 on disk, under a new MANIFEST header that carries a “SEAM” marker and the version 1. A store with this 24-byte header and a stamp of 1 to 4 is pre-1 to pre-4 and is migrated automatically on open. This is not yet in the code; builds at the spec commit write store_format = 4.
Generation
Section titled “Generation”generation starts from the value in the previous file and is incremented by one at every open, see Rewrite and format stamp. It is bound into the record AAD, so records cannot be replayed into another generation.