Skip to main content

FORMAT_VERSION

Constant FORMAT_VERSION 

Source
pub const FORMAT_VERSION: u32 = 3;
Expand description

Current on-disk layout version. Bump on any incompatible change.

Version 2 switched field-element encoding from canonical form to Montgomery form so that the on-disk bytes match Fp’s in-memory layout exactly. That lets the reader construct Vec<F> via Vec::from_raw_parts pointing into the mmap (zero-copy), instead of running a per-element Montgomery reduction on load.

Version 3 added the GateCoeffs section. The prover never reads CircuitGate::coeffs (they are folded into coefficients8), but the debug-build ProverIndex::verify gate check does, so they must be preserved for a cached index to prove under debug_assertions.