Thesettlementlayerforthemachineeconomy.

Network

Replicas halt instead of serving wrong state

Deterministic replay and divergence halts

Each replica re-executes every batch, and a single mismatch stops it and produces a signed report.

Your replica re-executes each published batch from the previous state root and compares the state root, the activity, receipt, event, oracle and availability roots, and the canonical receipt, event and state-diff bytes. On any mismatch it returns REPLAY_DIVERGENCE (-1002), rolls the transition back, stops execution and acknowledgements, and serves only finalised history. It signs a report naming the batch, sequence, component and both values, which anyone holding its public key can verify.

What it does

Every Paxeer X replica re-executes each published LayerX batch from the previous state root and compares its own result against what was published: the resulting state root, the activity, receipt, event, oracle and data-availability roots, and the canonical receipt, event and state-diff bytes. Any mismatch returns the fatal code REPLAY_DIVERGENCE (-1002), rolls the transition back and halts the replica, which then stops execution and acknowledgements, stops serving current state, and serves only finalised history. The replica can sign a divergence report naming the batch number, global sequence, which component disagreed and both values, and anyone holding the replica's public key can verify it. How that behaviour is proven is set out as six ordered evidence levels in docs/QUALIFICATION.md, where a lower level never implies a higher one.

Key capabilities

  • Re-executes each batch and compares state root plus activity, receipt, event, oracle and availability roots.
  • Byte-compares the canonical receipt section, event section and state diff, not only the roots.
  • Halts the replica on divergence: no execution, no acknowledgements, finalised history only.
  • Signs an Ed25519 divergence report naming batch, sequence, component and both disagreeing values.
  • Carries a process-wide determinism tripwire and a fatal supply-conservation check inside execution.
  • Replays a 10-million-activity corpus across six runners and requires byte-identical digests.

Who it's for

Node operators, guarantors and auditors who need a replica to stop rather than serve state it cannot reproduce.

Why it matters

A replica that quietly disagrees with the sequencer would hand out balances and receipts nobody else would confirm. Here the disagreement is detected at the exact batch and sequence, the node stops answering for current state, and the evidence leaves the node as a signed record instead of a log line.

Differentiators

The replay gate goes beyond re-running the corpus: it compiles the same sources with GCC 13 and Clang 18 at -O0 and -O2, an amd64 musl build in Alpine and an AArch64 cross-build under QEMU, then requires all six digests to match byte for byte and to match the committed digest in tests/vectors/qualification_replay_10m.digest (10,000,000 activities in 1,000 batches). It also flips one byte in the root ledger and fails the gate unless that mutation is rejected with status -1002 at exactly sequence 10000.

Outcomes

  • Stop a replica at the exact divergent batch and sequence.
  • Hand an auditor a signed divergence report instead of a log line.
  • Six ordered evidence levels define the gates; the repo records them unrun.

Technical notes

  • Divergence compares three components: receipt (1), state diff (2) and state root (3). Each recorded value is capped at LXP_MAX_DIVERGENCE_VALUE_BYTES = 1024.
  • Replay limits: LXP_MAX_REPLAY_TRANSITIONS = 16 registered transition versions, LXP_MAX_REPLAY_FIELD_BYTES = 1048576 (1 MiB) per field.
  • Fatal codes: INVARIANT (-1001), REPLAY_DIVERGENCE (-1002), SUPPLY_MISMATCH (-1003). A failed supply check inside lxp_state_root is fatal, so no root is produced over unbalanced state.
  • make qualify-replay needs GCC 13, Clang 18, Docker, an amd64 musl runner and an AArch64 cross-compiler with QEMU; it writes multi-gigabyte artifacts under build/qualification/replay/ that are excluded from version control.
  • The deployment level is owner-gated: live contract deployment, validator mutation, custody migration or a real-value canary requires an explicit owner-approved runbook, and repository tests can prepare that evidence but cannot satisfy or authorise it.
  • Paxeer qualification (make paxeer-ci, make monorepo-ci) is a separate gate. A passing Paxeer build implies nothing about LayerX qualification, and the reverse also holds.
  • Not yet qualified: replay, divergence detection, the halt and the supply invariant are implemented in the C17 core, but spec/layerx-beta/spec.kvx records that at audit revision d5ff7e263a48cac4ffde548bf018100d0e5cd3b4 every build, test, runtime, deployment and certification gate was unrun.
make public-audit                      # source integrity
make build && make test                # build and unit behaviour
make ci && make qualify-arith          # runtime safety
make qualify-replay                    # deterministic replay
make qualify-faults && make qualify-fuzz   # fault and adversarial

More in Network

Build on Paxeer.

Give your agent a wallet, set its policy, and settle your first call on LayerX.