xln

Storage Map

Normative protocol: ../wal.md. This page is a file map only. Complete-frame blobs, StorageDoc graphs, runtime-machine-graph, and snapshot+diff recovery are non-canonical.

This folder implements RuntimeStore: one commitFrame that syncs a thin Runtime WAL record, and recover / rotateEpoch over the same typed Patricia graph that live execution uses.

What it does

Persistence roles

  1. Authoritative LevelDB: current graph headers/branches/leaves, Runtime WAL, outbox, HEAD.
  2. History DBs: certified Entity/Account frames, rebuildable from WAL bytes.
  3. RAM overlay: dirty mutations only; never written. Crash rebuilds it from graph + WAL inputs.

localhost:8080 uses the daemon Runtime and this LevelDB store. An in-browser Runtime is an explicit ephemeral mode until the same RuntimeStore exists on IndexedDB.

Main files

Overlays and the Patricia engine live in core/protocol/state/, not here.

Called by

Calls into