Documentation / @etherfold/core / STREAM_FIXTURE_FORMAT
Variable: STREAM_FIXTURE_FORMAT ​
constSTREAM_FIXTURE_FORMAT:2=2
Defined in: packages/core/src/stream/fixture.ts:22
The on-disk format version of a captured stream.
A fixture is a SNAPSHOT, so it is read long after it was written, by code that has moved on. The version is what lets a reader refuse a shape it does not understand instead of half-parsing it.
Why it is 2 ​
Format 1 wrote BigInts as "123n", which is also a legal string for a contract to emit, so a reader could not tell a uint256 argument from a string argument that read like one. Format 2 tags them (utils/bigint.ts). The bump is what makes that change SAFE: a format-1 file parsed by this reader would come back with every BigInt silently turned into a string, and it is refused below instead. The two fixtures committed in this repo were re-encoded; see docs/spikes/tagged-bigint-codec-across-storage-adapters/.