Skip to content

Re-derive versus reload

A starting node builds its state from two sources. A small set of records is read back from its volume, because the node is the only holder of them. The rest is derived again from the control plane, the kernel and the node's own configuration, because a peer holds the authoritative copy.

This page covers the split, the rule behind it, and what each category costs.

The split

flowchart TB
  subgraph VOL["NODE VOLUME"]
    direction TB
    ID[("Identity state and seed")]
    CUR[("Watch cursor")]
    CS[("Closure content store")]
  end
  subgraph PEERS["PEERS THAT HOLD THE TRUTH"]
    direction TB
    LED[("Assignment ledger")]
    KST[("Kernel continuity store")]
  end
  CFG(["Node configuration"])
  subgraph PROC["STARTING XRATUD PROCESS"]
    direction TB
    CHK{{"Digest, binding and<br/>continuity checks"}}
    REG[("Runtime state registry")]
    WRK[("Claims and dedupe records")]
    SES[("Kernel session table")]
    SPL[("Spools")]
  end
  ID -->|"reloaded"| CHK
  CUR -->|"reloaded"| CHK
  CS -->|"reloaded per entry"| CHK
  CHK -.->|"a cursor that fails is<br/>restored by resync"| LED
  CFG -->|"defaults"| REG
  LED -->|"leased assignments"| WRK
  LED -->|"ownership, through reconciliation"| SES
  KST -->|"replay"| SPL

Everything from NODE VOLUME passes Digest, binding and continuity checks before it is used, and a cursor that fails is restored from Assignment ledger. The process stores that start empty are filled from configuration or from PEERS THAT HOLD THE TRUTH.

The rule

A record is reloaded when the node is its only holder. A record is re-derived when a peer holds the authoritative copy.

Record Treatment Why
Enrollment identity and seed Reloaded The node's identity continuity across re-enrollment
Runtime cache Reloaded Lets the node start before reaching the control plane
Assignment watch cursor Reloaded The node is the only holder of its stream position
Closure content store Reloaded, and each entry verified again before reuse Content-addressed, so reuse is checkable
Runtime state registry Re-derived from configuration Every entry has a declared default
Spools Re-derived as empty Each record's source still holds what it described
Local claims and dedupe records Re-derived The control plane's ledger lease is the authority
Kernel session table Re-derived through deployment reconciliation The control plane assigns ownership
Probe state Re-derived It describes the live process

Reload carries a check with it

Every reloaded record is checked. The cursor record is validated against its digest, its stream key and its identity binding, and a record that fails is treated as a corruption condition and restored from the control plane. Closure store entries are verified against their digests before reuse. The enrollment identity state is checked for seed continuity.

A reload that cannot be proven becomes a re-derivation. See The watch cursor.

What each category costs

A reload costs a check. The node reads a file, validates it, and continues from where it was. No peer is involved and no work is repeated.

A re-derivation costs a round trip, and sometimes a repetition. The registry and the spools start empty, and the session table costs a reconciliation cycle. The dedupe records are the expensive one: with them gone, an assignment the node had completed and not yet reported is dispatched again and the work runs a second time. See Resuming assignment processing after a crash.