Skip to content

Documentation / @etherfold/processor-entities / SnapshotHead

Type Alias: SnapshotHead ​

SnapshotHead = object

Defined in: packages/state-store/dist/snapshot-document.d.ts:105

A snapshot's small metadata: the first line of its document, and what a mirror publishes separately so a client can CHOOSE between mirrors without downloading any body.

Properties ​

cursor? ​

readonly optional cursor?: CursorWrite

Defined in: packages/state-store/dist/snapshot-document.d.ts:147

The cursor that belongs to the state at takenAt, installed in the SAME unit as the last block.

Opaque here, as everywhere at this seam: it is a serialized LastSync and only the processor above knows that. Optional only so that a store can be seeded with rows in a test without inventing a cursor; a published snapshot without one would have its consumer resume from the start block and index over the rows it just installed.


floor ​

readonly floor: number

Defined in: packages/state-store/dist/snapshot-document.d.ts:136

The HISTORY FLOOR: the number of the document's FIRST block, whose mutations are the rows live at it. The installed store reports it as its floor and refuses a read or a revert under it (ADR-0028). Equal to takenAt.number for a snapshot that carries no history (none).


format ​

readonly format: number

Defined in: packages/state-store/dist/snapshot-document.d.ts:106


processor ​

readonly processor: string

Defined in: packages/state-store/dist/snapshot-document.d.ts:118

WHICH FOLD COMPUTED THESE ROWS: its identity, as the producing deployment's ARRIVAL derived it (ADR-0086) -- the SHA-256 of a bundle's octets where there are bytes.

Checked for EQUALITY against the identity the local deployment was handed, so state computed by different logic is refused rather than trusted. It is never parsed, and nothing here has an opinion about which arrival produced either side, which is what lets a producer and a consumer derive one two different ways and still agree when they are the same fold.


savedAt ​

readonly savedAt: string

Defined in: packages/state-store/dist/snapshot-document.d.ts:120

When the snapshot was produced. Informational; nothing keys off it.


takenAt ​

readonly takenAt: BlockPointer

Defined in: packages/state-store/dist/snapshot-document.d.ts:129

The block the state is AS OF once the document is installed: the pointer of its LAST block (the cut).

A producer points it at a RECORDED block (ADR-0095: the highest recorded block at or below the cut), because only a recorded block has a hash and a timestamp to give.