Status: draft, implemented in this repo. Normative text is what the tests enforce.
One)| Piece | Algorithm | Notes |
|---|---|---|
| Hash | SHA-512 | Via Web Crypto / runtime |
| Signatures (OTS) | PIX-HASH-OTS-128 | Merkle window of Lamport OTS leaves (32); each sign consumes one leaf |
| Signatures (PQ multi-use) | PIX-ML-DSA-65 | NIST FIPS-204 via @noble/post-quantum; domain-separated |
| Surface | signPixel / verifyPixel |
Scheme id in signature envelope |
| Not used | ECDSA / Ed25519 | Classical ECC is out of scope for Pixel sigs |
Invariant: signature scheme is versioned and crypto-agile.
Invariant: verifyLight (weak) is fail-closed; only scheme verifiers accept.
Invariant: address ↔ public key binding is checked on PoLS proofs (scheme-aware).
Invariant: PIX-HASH-OTS-128 (publicKey, leafIndex) is single-use at consensus (usedOtsLeaves; reuse → OTS_LEAF_REUSED). ML-DSA is multi-use.
Priority: quantum security is critical — see QUANTUM.md.
Leader election (lab): lowest SHA-512(pols-lottery|prevHash|sequence|address) among the electable set bound into the light proof (electable[], committed as el= in the PoLS message). Public-input verifiable; not VRF/BFT. Registry growth after a pixel must not rewrite that pixel’s lottery.
State = {
networkId,
pixels: LedgerPixel[],
utxos: Map<txid:vout, Utxo>,
pending: Transaction[], // superposition
sequencers: { address, publicKey }[],
usedOtsLeaves: Set<`${publicKey}:${leafIndex}`>
}
prevHash, index, sequencetransactions[], merkleRootlightProof (beacon + sequencer sig + fieldDigest)color, illuminated, proximity[]field[] — peer FieldWitness records (sphere combination lock)illuminated = false ⇒ color absent (no RGB meaning)lightProof.fieldDigest matches recomputed digest of peer field; mismatch ⇒ rejectTip custody is not linear prevHash alone. Peers at Chebyshev distance ≤ FIELD_MAX_DISTANCE (2) form a field:
| distance | opacity | color in digest |
|---|---|---|
| 0 | lit |
full peer #rrggbb |
| 1 | translucent |
full peer #rrggbb |
| ≥ 2 | opaque |
empty (no color) |
Canonical fieldDigest = SHA-512(field|peerIndex:distance:opacity:color|…) (peers sorted by index). Bound into the PoLS message as |field=<digest>. acceptBlock / verifyChain recompute from prior pixel colors and reject mismatch.
Invent note: this is verification + continuity of the scene + tip custody — not a rename of prevHash. Evidence: bun run test:field.
metadata (signed)commitment while state = superpositionprivacy ∈ {public, private, selective}electable = current sequencer registry (ordered); bound into the light proof.nextSequencer = argmin SHA-512(pols-lottery|tipHash|sequence|addr) over electable (skip=0).el= commitment and |field=<fieldDigest>); peers acceptPixel with full verify.Invariant: lightProof.electable is the lottery set for that height; every address in it must be in the local registry; join/register after the fact cannot change prior elections.
Invariant: lightProof.fieldDigest is the sphere lock for that tip; wrong neighbor effects ⇒ reject.
If the elected sequencer is silent past POLS_STALL_MS (default 15s) after pending appears:
skipCount advances: elected = rotate skipCount steps from the skip=0 choice.skip=N (pols|…|skip=N).pendingSince or parent tip time + POLS_STALL_MS).skipCount, then lower hash (preferPixel / replaceTipIfBetter).This is not BFT. Assumed: loosely synchronized clocks, honest majority of sequencers over time. Max skip per height: POLS_MAX_SKIP.
Invariants:
n+1 for that skipCountskip=0) always preferred over skip tips at the same heightBRIDGE_CUSTODY_AXIOM, bun run test:bridge-custody)Artifacts register by content digest (any language/host).
States: outside → in_superposition → in_the_light → origin_dark.
No parallel-VM rewrite required.
WebSocket JSON messages:
hello (optional helloSig), tx, pixel, get_pixels, pixels, get_headers, headersHTTP:
POST /rpc JSON-RPC (pix_* including pix_getHeaders, pix_getBalanceProof)GET /health, GET /sync, GET /sync/headers, GET /pixels, GET /balance/:addr[/proof]Does: local + multi-node sequential accept, persist, One API, SISO model, off-chain ULA package, Merkle-window hash-OTS (ledger single-use), diversity policy when ≥7 providers registered, Gate B gossip join, Gate C lab stall-skip, Gate E ULA twin + custody inversion, Gate F headers-first + balance proofs + signed hello scoring (lab), 4-node lab mesh.
Does not yet:
optical-capture channel ships; remote device attestation still thinULAVerifier.sol verifies keccak-OTS twin (IS_STUB=false); public testnet links + audit still open (see BRIDGE-STATUS.md)Frame this honestly: a coherent lab prototype with real running crypto and UTXO settlement — Gate A on the path to an L1 / bridge / sovereignty regime.
Destination and claim unlocks: PATH.md. Do not claim Gates B–J until their evidence exists.