POST-QUANTUM FIRST (FIPS 204 ML-DSA) · TEPHRA GOSSIP-ABOUT-GOSSIP FINALITY · GEODE KOALABEAR STARK PRIVACY
← SPR Registry · SPR-007 Protocol Engineering Design Scoped / Partial Integration

Authenticated State Commitments & Crash-Safe Generation Switching

Abstract — 16-ary content-addressed BLAKE3 state commitment tree paired with quorum-certified state finality statements and crash-reconcilable local generation switching.

Document / Authors
SPR-007 · Silica Protocol Engineering
Updated 2026-11-19 · State Commitments & Storage
Standards & Deployment
Protocol Engineering Design
Scoped / Partial Integration
Audit & Source Scope
Internal Qualification Suite Only (No 3rd-Party Audit)
silica::storage::authenticated_state · finality::state_statement

§1 · Content-Addressed 16-Ary BLAKE3 State Commitments

Snapshot sync and cold node recovery cannot accept unauthenticated donor manifests for account balances, supply totals, or owner key-binding tombstones (CF_ACCOUNT_OWNERS). Silica commits every canonical state record inside a deterministic 16-ary content-addressed BLAKE3 trie (authenticated_state):

  • Node::Leaf encodes exact key bytes plus a 32-byte value digest (LEAF_OVERHEAD = 39 B); object recovery validates record payloads independently against schema bounds before committing.
  • Node::Branch stores depth (1 B), a 32-byte nibble-aligned prefix, a big-endian u16 child bitmap (2 B), and non-empty 32-byte child digests (EMPTY = [0; 32] reserved sentinel; BRANCH_OVERHEAD = 36 B, MAX_BRANCH_LEN = 548 B).
  • verified_tree enforces caller-pinned node count, leaf count, key width, value width, and total byte budgets prior to persisting any donor subtree.

§2 · Canonical State-Finality Quorum Statement

Quorum finality certificates bind committed post-state roots directly to ordering identity, execution schema version, and nanosecond-precision certified time under exact domain preimage SILICA_DP033_STATE_FINALITY_STATEMENT_V1 (wire version 1, committee cap 1,024 members):

digest = BLAKE3(DOMAIN[40] || version_u16_be(1) || chain_context_hash[32] || shard_id || height || parent_finality_digest[32]
  || ordering_epoch_id[32] || ordering_assignment || proposal_hash[32] || decided_round || roster_id[32]
  || transaction_root[32] || transaction_count || execution_version || state_delta_root[32] || state_schema_id[32]
  || post_state_root[32] || certified_timestamp_seconds || certified_timestamp_nanoseconds)
  • Zero-Root vs. Sentinel Safety: An all-zero post_state_root is valid empty state rather than a missing-field sentinel; non-zero enforcement applies to chain context, proposal, roster, transaction root, and state schema IDs.
  • Strict Boundary Equations: Height-1 statements require zero parent_finality_digest and vice versa ((parent_finality_digest == [0; 32]) == (height == 1)), ordering_assignment ≥ 1, execution_version ≥ 1, and nanoseconds strictly inside 0..1_000_000_000.

§3 · Durable Crash-Intent Generation Switch (INTENT / CURRENT)

Replacing an active offline state generation directory safely requires deterministic recovery whether I/O loss occurs immediately before or immediately after atomically renaming CURRENT. Deleting INTENT unconditionally on startup or guessing target directories violates monotonic finality.

Figure 1 — Durable Switch Sequence & Deterministic Crash Recovery
1. STAGE CURRENT.tmp Write 184 B + fsync file 2. SEAL INTENT (DP33IN01) Rename INTENT.tmp + dir fsync 3. ATOMIC RENAME CURRENT.tmp -> CURRENT 4. CLEANUP fsync dir, rm INTENT, fsync CRASH BEFORE STEP 3 RENAME CURRENT == intent.previous -> reopens previous cleanly ReconciledGeneration::KeptPrevious -> clears INTENT CRASH AFTER STEP 3 RENAME CURRENT == intent.target -> completes target validation ReconciledGeneration::CompletedTarget -> clears INTENT
While INTENT persists on disk, normal reopen and promote calls fail closed (Error::PendingIntent). Corrupt or mismatched states return UnexpectedCurrent without clearing INTENT.

§4 · Canonical Generation Pointer & Switch Intent Byte Formats

Figure 2 — On-Disk CURRENT (184 B) & INTENT (377 B) Binary Layout
184 B Pointer / 377 B Intent
0..8 8 B
INTENT Magic
Fixed ASCII magic DP33IN01 (DP33GN01 for 184 B pointer)
8..9 1 B
has_previous
0 (initial selection, zeros in prev slot) or 1 (promotion)
9..193 184 B
previous pointer
Seq (8B BE) + chain (32B) + domain (32B) + height (8B) + finality + schema + root
193..377 184 B
target pointer
Strict > seq & height, matching chain/domain/schema verified
All directory and file entries enforce symlink_metadata validation and refuse non-regular entries or symlink traversal.

§5 · Security Disclosure, Statement of Work & Verification

  • Deployment Scope: The 16-ary BLAKE3 trie, owner tombstone projection, crash-intent generation switcher, and quorum state-statement verifier are qualified across isolated storage fixtures. Connecting live block execution continuously to cut over primary active chain storage remains gated behind end-to-end live-network cutover validation.
Statement of Work Deliverable Status Verification Evidence
16-Ary BLAKE3 Trie Codec & Crash-Intent Reconciliation (DP33IN01) Delivered cargo test --lib storage::authenticated_state:: passes 31/31 tests (0.09 s)
Quorum State-Finality Statement Frame & Bounded Recent Anchors Delivered cargo test --lib consensus::finality::state_statement:: passes 14/14 tests (0.08 s)
Canonical Account Owner Tombstone & Supply Projection Delivered cargo test --lib storage::ledger::account_projection:: passes 8/8 tests (0.18 s)
Continuous Live-Node State Root Switching & Snap-Sync Cutover Open / Gated Awaits live state-root authority activation milestone & audit
All SPR Specifications ↗