Skip to main content

FORMAT_VERSION

Constant FORMAT_VERSION 

Source
pub const FORMAT_VERSION: u32 = 1;
Expand description

The export format’s own version — see Header::version.

One constant, because three readers consume it: the writer stamps it, the verifier refuses what it cannot interpret, and the restore refuses what it cannot faithfully replay. A version that only the writer knew about would be a declaration that does nothing — a reader would parse a future format as far as the lines happened to look familiar, and report findings about a file it never understood.

Two shapes are load-bearing enough to state with the constant, because each was once tempting to do the other way. The case layer is mandatory, never an optional extension: a reader that tolerated its absence could not tell this plane has no cases from the case layer was dropped from this file — and the second is the finding that matters. And every record line carries raw, the exact bytes the chain hashed, which is what verification recomputes over: verifying a re-serialization of the parsed body would hold only while this build’s canonicalization agreed byte-for-byte with the writer’s — the wire-bytes rule the journal itself refuses to bend, bent by its own export.