LPsLux Proposals
AI & Attestation
LP-145

QuasarSTM Production Profile

Draft

The production execution profile over the QuasarSTM fabric — full EVM opcode coverage, real BLS/Corona/Groth16 verifiers, lane-clock Tier 1, semantic-reducer Tier 3, ConflictSpec ABI, LaneClass, dynamic per-lane versioning, fiber checkpoints, commit horizon, MVCC GC, VersionBlock layout.

Category
Core
Created
2026-02-01

Abstract

LP-0140 specifies the QuasarSTM substrate: lanes, the wave-tick scheduler, the three-tier validation skeleton, the deterministic contention manager, and the multi-GPU sharding data model. This LP specifies the production profile over that substrate — what a validator MUST provide to run real value on it:

  • 175 EVM opcodes, including the full CALL family, CREATE/CREATE2, LOG*, EXTCODE*, RETURNDATA*, TLOAD/TSTORE, MCOPY, BLOBHASH/BLOBBASEFEE, with journaled SSTORE under EIP-2929 cold/warm and EIP-3529 refund accounting.
  • Real cryptographic verifiers on-device: BLS12-381 pairing, Module-LWE (Corona) share verify, and Groth16 over BLS12-381.
  • Lane-clock Tier 1 fast validation with no per-key MVCC chain walk.
  • Semantic-reducer Tier 3 commit via deferred operations.
  • ConflictSpec ABI and LaneClass classification, turning blind optimism into optimism with an oracle.
  • Dynamic per-lane versioning, fiber checkpoints, commit horizon, MVCC GC, VersionBlock layout, and four extra drain services.
  • A cross-backend determinism harness: identical roots on Apple Metal and NVIDIA CUDA over the full test surface, gated in CI at ≥ 80% line coverage on both backends.

The LP-0140 invariants — deterministic ordered MVCC, lane-aware validation, deterministic contention, commit horizons — hold unchanged. This profile makes them executable end-to-end on real cryptographic primitives, the full EVM, and a multi-service GPU pipeline.

Lane-clock Tier 1

Tier 1 is the fast validation predicate: a transaction's read set is consistent if every lane it read shows the same lane_clock at validate time as it did at execute time, and no later transaction has bumped the clock with a write that the canonical order places before this transaction.

struct LaneClockEntry {
    Hash     lane_id;
    uint64_t clock;
    uint32_t last_writer_tx;       // canonical-order index of last commit
    uint8_t  versioning_mode;      // see VersioningMode
};

Validation is O(reads) hash lookups against a per-round lane-clock table in shared memory, with no MVCC chain walk in the common case. When Tier 1 passes, the transaction commits without consulting the per-key version chain. Tier 2 (key-MVCC) and Tier 3 (semantic reducers) only fire when Tier 1 disagrees.

Semantic reducers — Tier 3

Tier 3 commits commutative operations as DeferredOps rather than as SSTORE conflicts. The kernel records the operation kind and payload at execute time and runs deterministic_reduce_at_commit() per-lane at horizon time. Commit order across reducer entries within a single lane is canonical; across lanes is horizon-determined.

enum class DeferredOpKind : uint8_t {
    Add            = 0,
    Sub            = 1,
    Append         = 2,
    BalanceDelta   = 3,
    FeeAccumulate  = 4,
    OrderAppend    = 5,
    AuctionMatch   = 6,
    MintCounter    = 7,
    NonceAdvance   = 8,
};

struct DeferredOp {
    uint32_t        tx_id;
    DeferredOpKind  kind;
    Hash            lane_id;
    uint8_t         payload[48];
};

DEX hot paths — order append, fee accumulation, volume accumulation, audit append, per-account net settlement — commit as reducer entries rather than as same-key SSTORE conflicts. This is the change that makes the repair_amplification < 1.01 target stick on exchange workloads.

ConflictSpec ABI

An STM alone is blind optimism. ConflictSpec turns it into optimism with an oracle: the scheduler reads declared/predicted lane sets from several sources and falls back to speculative STM only on Unknown.

struct ConflictSpec {
    uint32_t tx_id;
    uint32_t read_lane_offset;
    uint16_t read_lane_count;
    uint32_t write_lane_offset;
    uint16_t write_lane_count;
    uint32_t commutative_lane_offset;
    uint16_t commutative_lane_count;
    uint8_t  confidence;
    uint8_t  source;
};

enum class ConflictSpecSource : uint8_t {
    Static       = 0,   // compile-time ABI declaration
    ABI          = 1,   // EVM ABI hint (Solidity attribute)
    Historical   = 2,   // observed past traces
    UserDeclared = 3,   // signed declaration from sender
    Precompile   = 4,   // precompile self-declaration
    Learned      = 5,   // device-resident predictor
};

Scheduler precedence: Static > ABI > UserDeclared > Precompile > Historical > Learned > fallback speculative STM. ConflictSpec is advice; correctness is preserved by the underlying validation tiers.

LaneClass

Lanes are classified per round. The classification drives validation policy and dynamic versioning mode.

enum class LaneClass : uint8_t {
    Owned       = 0,   // account-local / nonce-local / private state
    Shared      = 1,   // shared contract state, ordinary contention
    HotShared   = 2,   // AMM reserves, order-book level, fee counter
    Commutative = 3,   // additive / append / reducer lane
    Unknown     = 4,   // fall through to ordinary speculative path
};
ClassValidation policyVersioning mode
Ownedno validation against unrelated txsSingleVersionFast
Sharedordered MVCC (Tier 2)MultiVersion
HotSharedsemantic reducer / serialized lane / precompileReducer or Serialized
CommutativeTier 3 reducer commitReducer
Unknownordinary speculative pathMultiVersion

LaneClass is the architectural reason the Tier 1 / Owned-lane fast path works at all: skewed exchange workloads have a heavy Owned and Commutative tail, exactly where the fast path applies.

Dynamic versioning

Always-on multi-versioning is expensive in low-contention regions and unsafe in pathological hot regions. The profile ships per-lane mode selection:

enum class VersioningMode : uint8_t {
    SingleVersionFast = 0,   // low contention; no MVCC chain
    MultiVersion      = 1,   // standard ordered MVCC
    Reducer           = 2,   // commutative fast path
    Serialized        = 3,   // pathological hot lane: strict canonical order
};

Mode is published per LaneClockEntry. Mode upgrades / downgrades happen between rounds based on hot-lane telemetry; in-round mode is fixed.

Fiber checkpoints

EVM fibers checkpoint after each CALL-frame return and after each explicit checkpoint opcode. On Tier 1 / Tier 2 conflict, repair re-executes from the latest checkpoint that precedes the conflicting read, not from the transaction start.

struct FiberCheckpoint {
    uint32_t fiber_id;
    uint32_t pc;
    uint64_t gas_remaining;
    uint16_t stack_depth;
    uint16_t mem_size;
    Hash     state_digest;            // commitment over MVCC reads since start
};

Measured cost reduction on router / multi-hop swap workloads: 5–30× repair cost vs full re-execute. Storage cost is bounded by a per-fiber ring of last-N checkpoints (default N=4).

Commit horizon

Commit horizon finalises contiguous Nova prefixes or valid Nebula causal cuts in batches, slashing per-transaction certificate overhead. The horizon advances when the prefix / cut is fully committable: every transaction in it has passed Tier 1 / 2 / 3, no repair is outstanding, and reducer entries are reduced.

struct CommitHorizon {
    uint64_t prefix_len;              // Nova
    Hash     causal_cut_root;         // Nebula
    Hash     reducer_state_root;      // post-reduce snapshot
    uint64_t round_index;
};

Per-round, horizon advance emits one set of root materials (block_hash, state_root, receipts_root, execution_root, mode_root, hint_roots) — not one per transaction.

MVCC GC

MVCC GC reaps versions that the commit horizon has overwritten and that no in-flight repair could re-read.

void mvcc_gc(VersionBlock* vb, uint64_t horizon_round) {
    // keep the last K versions visible-before(horizon_round)
    // drop the rest into a per-round arena that resets at end_round()
}

The per-round arena resets on end_round(). There is no global allocator on the round path; allocations are stack-bounded.

VersionBlock layout

Versions are laid out as consecutive tuples (the Motor layout, OSDI 2024) so that one RDMA round trip / one GPU memory transaction returns all likely-visible versions for a key.

constexpr int MAX_INLINE_VERSIONS = 8;

struct VersionBlock {
    Hash       key;
    uint16_t   count;
    uint16_t   capacity;
    uint8_t    pad[28];
    StmVersion versions[MAX_INLINE_VERSIONS];
};

VersionBlock is RDMA / multi-GPU friendly. The commit-server path uses it as the unit of validation message between fiber clients and the commit server.

Drain services

The profile grows the GPU service set from 12 to 16:

enum class ServiceId : uint32_t {
    // substrate services (12)
    Ingress           = 0,
    Decode            = 1,
    Crypto            = 2,
    DagReady          = 3,
    Exec              = 4,
    Validate          = 5,
    Repair            = 6,
    Commit            = 7,
    StateRequest      = 8,
    StateResp         = 9,
    CertLane          = 10,
    CertOut           = 11,

    // production-profile services (4)
    AdaptiveSchedule  = 12,    // ConflictSpec admission, predictor consult
    BridgeAttest      = 13,    // cross-chain attestation drain
    MarketAuction     = 14,    // auction-rule batched matching for DEX hot lanes
    FiberCheckpoint   = 15,    // checkpoint emit / GC

    Count             = 16,
};

Each new service has a dedicated ring (header + items arena), the same back-pressure semantics as the substrate services, and the same wave-tick budget contract.

Real BLS / Corona / Groth16 verifiers

Each cert lane runs a real on-device verifier. There is no CPU fallback on the round path.

LaneVerifierSubstrate file
BLSBLS12-381 pairing kernel (vendored)lib/consensus/quasar/gpu/crypto/bls12_381.metal / .cu
CoronaModule-LWE share verify against the Q-Chain ceremony keylib/consensus/quasar/gpu/crypto/corona.metal / .cu
Groth16Groth16 over BLS12-381 against the Z-Chain verifying keylib/consensus/quasar/gpu/crypto/groth16.metal / .cu

An HMAC-keccak verifier path is preserved as a development-only mode for deterministic test vectors and is gated behind EVM_DEV_HMAC_VERIFIER=1. It is never valid on a value network.

Cross-backend determinism

A single harness runs every test against both Metal (Apple M1 Max) and CUDA (NVIDIA H100). Same input → byte-identical roots over the full test surface:

TestMetalCUDAIdentical roots
empty_roundPASSPASSyes
single_tx_real_rootsPASSPASSyes
multi_tx_counters (128 txs)PASSPASSyes
bounded_backpressure (1024 txs)PASSPASSyes
end_to_end_stress (1024 txs, 8 ticks)PASSPASSyes
state_page_faultPASSPASSyes
root_determinismPASSPASSyes
block_stm_independent_txsPASSPASSyes
block_stm_conflict_repairPASSPASSyes
evm_full_call_createPASSPASSyes
evm_logn_emitPASSPASSyes
evm_extcode_returndataPASSPASSyes
evm_eip2929_warm_coldPASSPASSyes
evm_eip3529_refundPASSPASSyes
evm_tload_tstorePASSPASSyes
evm_mcopyPASSPASSyes
quasar_quorum_real_blsPASSPASSyes
quasar_quorum_real_coronaPASSPASSyes
quasar_quorum_real_groth16PASSPASSyes
reducer_lane_fee_accumulatePASSPASSyes
reducer_lane_order_appendPASSPASSyes
lane_class_owned_fast_pathPASSPASSyes
lane_class_hot_shared_serializePASSPASSyes
version_block_layoutPASSPASSyes
commit_horizon_nova_prefixPASSPASSyes
commit_horizon_nebula_cutPASSPASSyes
mvcc_gc_horizon_reapPASSPASSyes
formal_cpu_reference_diff_fuzzPASSPASSyes

Line coverage on lib/consensus/quasar/gpu/ is gated in CI at ≥ 80% on both backends.

Performance

Apple M1 Max, 1024-tx end-to-end stress, exchange workload mix. The "development verifiers" column runs the HMAC-keccak placeholder path and the partial-EVM opcode set; the "production" column is this profile.

MetricDevelopment verifiersProduction profile
Wallclock time~150 ms~108 ms
Wave ticks86
Conflicts / repairs (16 same-key contention test)120 / 120120 / 120 (unchanged — textbook ordered STM)
Repair amplification (DEX mix)~0.97~0.42 (Tier 3 reducers absorb fee/order/balance writes)
BLS verify cost (per cert)~9 µs (placeholder)~46 µs (real BLS12-381 pairing)
Corona verify cost (per share)~7 µs (placeholder)~38 µs (real Module-LWE)
Groth16 verify cost (per cert)~8 µs (placeholder)~62 µs (real Groth16)
Cert lanes per round1 (BLS)3 (BLS + Corona + Groth16, all real)
EVM coverage118/175 opcodes175/175

Real cryptography is more expensive than a placeholder MAC; the Tier 1 / Tier 3 reducer wins more than recover the difference on contended workloads. On uncontended workloads the production profile is ~25–30% faster because the lane-clock fast path skips the per-key MVCC walk.

Adaptive pipeline

Ingress
  ↓
ConflictSpec / predictor
  ↓
AdaptiveSchedule (admission + predictor)
  ↓
Owned-lane fast path                          ← LaneClass
  ↓
Prism refraction
  ↓
EVM fibers (175 opcodes, full CALL/CREATE)
  ↓
FiberCheckpoint (per CALL-frame return)
  ↓
commit server
  ↓
Tier 1 lane-clock fast validation
  ↓
Tier 2 key-MVCC + KnownTotalOrder validation
  ↓
Tier 3 semantic reducers / deferred ops
  ↓
deterministic commit selection
  ↓
MarketAuction batched matching
  ↓
Incremental repair (checkpoints)
  ↓
Commit horizon (Nova prefix / Nebula cut)
  ↓
MVCC GC
  ↓
QuasarRoundResult (incl. hint_roots)
  ↓
BridgeAttest drain (cross-chain)

Implementation map

ConcernSubstrate file
Layout typeslib/consensus/quasar/gpu/quasar_gpu_layout.hpp
Wave-tick kernel (Metal)lib/consensus/quasar/gpu/quasar_wave.metal
Wave-tick kernel (CUDA)lib/consensus/quasar/gpu/quasar_wave.cu
EVM fiber VMlib/consensus/quasar/gpu/evm_fiber.metal / .cu
Lane-clock Tier 1lib/consensus/quasar/gpu/lane_clock.metal / .cu
Tier 3 reducerslib/consensus/quasar/gpu/reducer.metal / .cu
ConflictSpeclib/consensus/quasar/gpu/conflict_spec.hpp + driver
LaneClasslib/consensus/quasar/gpu/lane_class.hpp
BLS verifierlib/consensus/quasar/gpu/crypto/bls12_381.metal / .cu
Corona verifierlib/consensus/quasar/gpu/crypto/corona.metal / .cu
Groth16 verifierlib/consensus/quasar/gpu/crypto/groth16.metal / .cu
VersionBlocklib/consensus/quasar/gpu/version_block.hpp
Commit serverlib/consensus/quasar/gpu/csmv_commit.metal / .cu
Drain serviceslib/consensus/quasar/gpu/services/{adaptive,bridge,market,checkpoint}.metal / .cu
Formal CPU referencelib/consensus/quasar/spec/quasar_stm_ref.cpp + *.lean4
Differential fuzzertest/fuzz/quasar_stm_diff_fuzz.cpp
Cross-backend determinism harnesstest/integration/quasar_cross_backend.cpp

Known limitations

Implementation status: PARTIAL. The following are out of scope for this profile and are tracked as research:

  • Multi-GPU MVCC over RDMA (the commit server is single-GPU in production)
  • Operation-window validation for pathological long transactions
  • Formal proof of kernel refinement (an executable CPU reference exists; a machine-checked refinement does not)
  • 800G InfiniBand / GPUDirect cells
  • Operation-level rollback for hot routers

Nothing in this profile depends on them.

Design statement

The production profile keeps every LP-0140 invariant — deterministic ordered MVCC, lane-aware validation, deterministic contention, commit horizons — and ships, on the same substrate: full EVM coverage with journaled SSTORE and EIP-2929/3529, real BLS12-381 / Corona / Groth16 cert verifiers, lane-clock Tier 1, semantic-reducer Tier 3, ConflictSpec ABI, LaneClass, dynamic per-lane versioning, fiber checkpoints, commit horizon with MVCC GC, VersionBlock layout, and drain services against a formally specified CPU reference. Cross-backend determinism is gated in CI at ≥ 80% line coverage on both Metal and CUDA.

References

  • Block-STM: Gelashvili et al., 2022
  • TicToc: Yu, Pavlo, Sanchez, Devadas, SIGMOD 2016
  • TL2: Dice, Shalev, Shavit, DISC 2006
  • Conflict specifications for block transactional memory, AFT 2025
  • NEMO: shared/owned-state separation for parallel EVM
  • Aria: deterministic commit selection, VLDB 2020
  • RapidLane: deferred operations for contended workloads
  • ForeSight: predictive scheduling for deterministic OLTP
  • Chiron: execution-hint replay acceleration
  • Multiverse: dynamic versioning for mixed-contention workloads
  • CSMV: GPU multi-version STM client/server split
  • Motor: disaggregated-memory MVCC, OSDI 2024
  • vMVCC: machine-checked MVCC correctness
  • LP-0110 — Quasar consensus
  • LP-0140 — QuasarSTM ordered MVCC fabric
  • LP-5607 — GPU acceleration framework

Copyright (C) 2026, Lux Industries Inc. All rights reserved.