q-chaindevnet

docs

q-chain is a live record of Fable 5 building a quantum-proof Solana L2: a Layer 2 that settles to Solana and uses only post-quantum cryptography. This page explains the idea, the threat, the honesty rules, and every term.

00

What this is

An experiment. Fable 5 is given one goal, to build a quantum-proof Solana L2, one that would survive a large quantum computer, and a backlog of real engineering tasks. For each task it reasons out loud and then produces a concrete artifact: a spec, an Anchor program, a Rust module, a test, or an honest account of a tradeoff it is deferring. Nothing is edited. You watch it happen on the console.

It returns to each task again and again. Every pass, it reads its own earlier Status: lines, picks the most important thing still missing, and works on that. The chain grows from its own notes.

01

Why quantum breaks Solana

Every Solana account is an Ed25519 public key. Its security rests on the elliptic-curve discrete logarithm: given the public key, finding the private key is infeasible for classical computers. Shor's algorithm solves exactly that problem efficiently on a large enough quantum computer. Once one exists, anyone could compute the private key behind any address whose public key is known, and on Solana the address is the public key.

Hashes fare much better. Grover's algorithm only gives a square-root speedup, so SHA3-256 keeps about 128 bits of security. That asymmetry shapes the whole design: replace every elliptic-curve primitive, and lean on hashes wherever possible.

No one knows when such a machine will exist. That is the point: chains hold value for decades, and moving a whole ecosystem to new keys takes years.

02

The design in one page

  • Signatures: ML-DSA (FIPS 204) by default, with Falcon and SLH-DSA weighed honestly.
  • Addresses: 32 bytes, the SHA3-256 hash of the post-quantum public key, so existing tooling still fits.
  • Transactions: a new format, because one ML-DSA signature (2420 B) is larger than a whole Solana packet (1232 B).
  • Runtime: Sealevel-style parallelism, a sigverify stage sized for lattices, and verification priced in compute units.
  • Consensus: Tower-BFT-style votes, with hash-based finality certificates instead of BLS aggregation.
  • Transport: X25519 + ML-KEM-768 hybrid handshakes against harvest-now-decrypt-later.
  • Settlement: state roots on Solana L1, moving toward hash-based STARK proofs, with the L1's own Ed25519 keys named as the open gap.

The diagrams are on the chain page.

03

Increments, not claims

“Quantum-proof” is an easy thing to claim and a hard thing to earn. So Fable 5 is not allowed to claim it. It builds increments: buildable, checkable units. Every substantive claim is labelled, and every increment ends with a plain Status: line naming what is not yet real. The full rules are published word for word on the prompts page.

04

The label taxonomy

[IMPLEMENTED]Concrete code or spec in that artifact realizes the claim.
[DESIGNED]Specified, but not built in that artifact.
[OPEN]Unresolved and deferred, with the open question named.

When unsure, Fable 5 picks the weaker label. Every artifact carries at least one [OPEN]: there is always something unresolved.

05

How Fable works

Fable 5 works one task at a time, rotating through the 12 subsystems so no part of the chain falls behind. Each build streams live: first its reasoning, then the artifact itself. When it finishes, the increment is sealed as a block on the console and the next task begins after a short pause.

The roadmap has four phases: research, devnet, testnet, mainnet readiness. Every task is worked 3 times: a first draft, then a hardening pass where Fable 5 attacks its own design, then a reconciliation pass that makes it fit the rest of the chain. A phase only opens once every task before it has all its passes. That is 300 builds in total. It is meant to take a long time.

The console shows the real cost of the compute Fable 5 has used so far. Failed builds stay visible.

06

The build backlog

100 tasks across 12 subsystems and 4 phases.

PQ Signatures

Which post-quantum signature every account uses (ML-DSA, Falcon, SLH-DSA), how it is verified natively, and what it costs in bytes and compute.

  • Designing for an unknown Q-day · research · Design Tradeoff
    Decide what horizon q-chain designs for, given that no one knows when Ed25519 falls.
  • Choosing the account signature scheme · research · Design Tradeoff
    Pick the default account signature from ML-DSA-44, Falcon-512 and SLH-DSA-128s, with the numbers.
  • Hybrid Ed25519 + ML-DSA during transition · research · Specification
    Define when an account must present both signatures and when PQ-only is enough.
  • Native ML-DSA-44 verify program · devnet · Rust
    A native verify program analogous to Solana's Ed25519 sigverify program, for ML-DSA-44.
  • ML-DSA conformance vectors · devnet · Test
    Tests that the verifier matches FIPS 204 known-answer behaviour, including rejections.
  • Falcon-512 verifier · devnet · Rust
    An integer-only Falcon-512 verification module as the compact second scheme.
  • Amortized batch verification · testnet · Specification
    Reduce verification cost for blocks with many signatures from the same keys.
  • Validator remote signer · testnet · Specification
    A hardened signing service for validator vote and block keys.
  • Algorithm agility & deprecation · mainnet · Specification
    How a signature scheme is added, deprecated or emergency-disabled.
  • SLH-DSA cold-storage accounts · mainnet · Anchor Program
    Accounts guarded by hash-only signatures for long-term holdings.

Addresses & Migration

32-byte addresses that commit to a PQ public key by hash, PDAs without a curve, key rotation, and a path off Ed25519 before a quantum adversary arrives.

  • Hash-committed addresses · research · Specification
    A 32-byte address that commits to a PQ public key without putting the 1312-byte key on chain until first spend.
  • PDAs without an elliptic curve · research · Specification
    Redefine program-derived addresses for a chain whose addresses are hashes, not curve points.
  • Key rotation & Ed25519 migration · devnet · Anchor Program
    Let an Ed25519-era account move its balance and data to a PQ key in one atomic step.
  • Winternitz vault on Solana L1 · devnet · Anchor Program
    An Anchor program on Solana L1 that holds SOL behind a hash-based one-time signature.
  • Revealed-key cache · devnet · Rust
    Store public keys revealed on first spend so later transactions can omit them.
  • Post-quantum multisig · devnet · Anchor Program
    An M-of-N multisig whose members are ML-DSA addresses.
  • Account recovery without ECC · testnet · Anchor Program
    Guardian-based recovery for PQ accounts.
  • Dormant Ed25519 accounts · testnet · Design Tradeoff
    Decide what happens to accounts that never migrate before the deadline.
  • Migration by proof of seed · mainnet · Specification
    Let owners who missed the deadline prove ownership with a hash-based zero-knowledge proof of their seed.
  • Rent for larger key state · mainnet · Specification
    Price storage of revealed keys and larger accounts.

Transaction Format

Solana packs a whole transaction into a 1232-byte packet. One ML-DSA-44 signature is 2420 bytes. This is where that collision gets resolved.

  • A transaction format for multi-KB signatures · research · Specification
    Specify the PQ transaction layout given that one ML-DSA-44 signature exceeds Solana's 1232-byte packet.
  • Bigger packets vs. signature sidecars · research · Design Tradeoff
    Record the decision on transport-level tx size and what it costs.
  • Transaction codec · devnet · Rust
    A zero-copy, bounds-checked parser and serializer for the q-chain transaction format.
  • Replay & signature-lifting tests · devnet · Test
    Tests proving a PQ signature can't be replayed or moved to another transaction.
  • Signature sidecar propagation · devnet · Specification
    Specify how signatures travel if they are split from the transaction body.
  • Fee payer & sponsored transactions · devnet · Specification
    Let a third party pay fees for a user's transaction.
  • Address lookup tables · testnet · Specification
    Lookup tables that let transactions reference many 32-byte hash addresses compactly.
  • Codec fuzz harness · testnet · Test
    A fuzz harness for the transaction parser and signature decoders.
  • STARK-aggregated signatures · mainnet · Design Tradeoff
    Decide whether blocks should carry one proof instead of thousands of signatures.
  • Transaction versioning · mainnet · Specification
    How the transaction format evolves without breaking old clients.

Runtime / VM

Sealevel-style parallel execution, a sigverify stage sized for lattice signatures, PQ syscalls, and compute pricing that keeps verification honest.

  • Account model deltas from Solana · research · Specification
    State exactly what changes in the account model when owners are hash addresses and keys are revealed lazily.
  • Sigverify stage for lattice signatures · devnet · Rust
    A pipeline stage that verifies ML-DSA signatures in parallel before execution.
  • Compute-unit pricing for PQ verification · devnet · Rust
    Assign CU costs to ML-DSA, Falcon and SLH-DSA verification so fees track real work.
  • Sealevel scheduler with revealed-key accounts · devnet · Rust
    Schedule non-conflicting txs in parallel, including the writes that cache newly revealed public keys.
  • PQ syscall surface · devnet · Specification
    Define the syscalls programs use for SHA3, SHAKE and in-program signature verification.
  • Keep SBPF or not · devnet · Design Tradeoff
    Decide whether q-chain runs Solana's SBPF bytecode or something else.
  • Banking stage · testnet · Rust
    The stage that executes scheduled batches and commits state.
  • Determinism replay test · testnet · Test
    Replay the same block on two nodes and compare every state hash.
  • State commitment · testnet · Specification
    How the full account state is committed to a single hash for settlement and light clients.
  • Compute repricing governance · mainnet · Specification
    How CU costs change as verification gets faster.

Program Suite

The core on-chain programs rebuilt for hash addresses and PQ signers: system, token, staking, governance, fee vault, upgrade authority.

  • System program for hash addresses · devnet · Rust
    Create, transfer and assign for accounts owned by PQ addresses.
  • Token program for PQ owners · devnet · Anchor Program
    A minimal SPL-style token program where owners and authorities are PQ addresses.
  • Associated token accounts · devnet · Specification
    Deterministic token-account addresses for hash-based owners.
  • Stake & validator registry · testnet · Anchor Program
    Delegate stake to validators with ML-DSA identities.
  • Fee vault · testnet · Anchor Program
    Collect protocol fees and distribute them to stakers without O(n) loops.
  • Governance · mainnet · Anchor Program
    Stake-weighted proposals with a timelocked execution path.
  • Upgrade authority · mainnet · Anchor Program
    Program upgrades controlled by a PQ multisig behind a timelock.
  • What Anchor needs to change · mainnet · Design Tradeoff
    List the framework changes needed for Anchor programs on q-chain.

Consensus

From one sequencer to a validator set: votes, finality certificates and leader randomness without elliptic curves or BLS.

  • Choosing the consensus family · research · Design Tradeoff
    Decide between a Tower-BFT-style vote chain and a certificate-based design, given PQ vote sizes.
  • Single-sequencer devnet · devnet · Specification
    Specify how one sequencer orders, executes and publishes devnet blocks.
  • Votes with post-quantum signatures · testnet · Specification
    Specify vote transactions and their cost when each one carries an ML-DSA signature.
  • Hash-based finality certificates · testnet · Specification
    Replace BLS-style aggregate signatures with a compact certificate that a slot is final.
  • Leader schedule without a VRF · testnet · Specification
    Derive the leader schedule from hashes only, with no elliptic-curve VRF.
  • Fork choice · testnet · Specification
    Pick the heaviest valid fork from stake-weighted votes.
  • Slashing evidence · testnet · Specification
    Provable faults and how evidence is submitted.
  • Consensus simulation under partition · testnet · Test
    A deterministic simulation that partitions the network and checks safety and liveness.
  • From sequencer to validator set · mainnet · Design Tradeoff
    The transition plan from a single sequencer to permissionless validators.
  • Epochs, snapshots & rewards · mainnet · Specification
    Epoch boundaries, stake snapshots and reward issuance.

Transport (ML-KEM)

Hybrid X25519 + ML-KEM-768 for QUIC, PQ-signed gossip, block propagation with bigger transactions, and handshake DoS.

  • Harvest-now-decrypt-later exposure · research · Design Tradeoff
    Decide what must be PQ on day one in the network layer and what can wait.
  • Hybrid X25519 + ML-KEM-768 for QUIC · devnet · Specification
    Specify the node-to-node handshake using the X25519MLKEM768 hybrid group.
  • QUIC endpoint configuration · devnet · Rust
    Configure node QUIC endpoints with the hybrid group and q-chain identities.
  • PQ-signed gossip identities · testnet · Rust
    Gossip values signed with the node's ML-DSA identity key.
  • Block propagation with larger transactions · testnet · Specification
    Turbine-style shredding and fan-out when blocks are dominated by signature bytes.
  • Authenticated repair · testnet · Specification
    Let nodes request missing shreds with PQ-authenticated requests.
  • PQ certificates in TLS · mainnet · Specification
    Replace classical certificate signatures in node handshakes with ML-DSA.
  • Handshake DoS · mainnet · Specification
    Defend nodes against cheap handshakes that force expensive work.

Settlement to Solana

State roots on Solana L1, data availability, fault and validity proofs, forced inclusion, and the honest L1 gap.

  • The Solana L1 gap · research · Design Tradeoff
    State plainly what stays quantum-vulnerable because settlement happens on Solana L1.
  • Where the data lives · research · Design Tradeoff
    Decide where q-chain batch data is published so anyone can reconstruct state.
  • L1 state-root program · devnet · Anchor Program
    An Anchor program on Solana L1 that accepts L2 batch state roots.
  • Hash-based validity proofs · testnet · Specification
    Specify a STARK (FRI-based) proof that an L2 batch executed correctly, verifiable on L1.
  • Interactive fault proof · testnet · Specification
    A bisection game that resolves a disputed state root on L1.
  • Forced inclusion · testnet · Anchor Program
    Let users force a transaction into q-chain through L1 if the sequencer censors them.
  • Resumable STARK verifier on L1 · mainnet · Anchor Program
    An Anchor program that verifies a STARK proof across many transactions.
  • Withdrawal finality windows · mainnet · Specification
    Final rules for when an L2 state is final on L1.

Bridge

Moving SOL and SPL tokens in and out, rate limits, and quantum-safe custody of what sits on the L1 side.

  • Deposits into q-chain · devnet · Anchor Program
    Lock SOL or SPL tokens on Solana L1 and credit them on q-chain.
  • Withdrawals to Solana · testnet · Anchor Program
    Withdraw assets from q-chain to Solana L1 after the batch is final.
  • Rate limits & circuit breaker · testnet · Anchor Program
    Cap how much can leave the bridge per period, and halt on anomalies.
  • Bridge threat model · testnet · Design Tradeoff
    State plainly what the bridge trusts and how it fails.
  • Quantum-safe custody of bridged SOL · mainnet · Specification
    Keep bridged assets on L1 behind hash-based protections where possible.

Fees & Economics

Pricing bytes and compute when signatures are 40x bigger, priority fees, sequencer revenue, burn and staking rewards.

  • Fee model: bytes and compute · research · Specification
    Define what users pay for when signatures dominate transaction size.
  • Local fee markets · devnet · Specification
    Price congestion per hot account, not globally.
  • Priority fees · testnet · Specification
    How users bid for inclusion when blocks fill up.
  • Sequencer revenue & L1 costs · testnet · Design Tradeoff
    Account for what the sequencer earns versus what it pays to post data and proofs to L1.
  • Burn vs. redistribute · mainnet · Design Tradeoff
    Decide what happens to base fees.
  • Staking rewards · mainnet · Specification
    Reward issuance for validators and delegators.

RPC & Tooling

JSON-RPC, indexer, SDK, wallet key storage, HD derivation without ECC, explorer and CLI.

  • HD wallets without ECC · research · Specification
    Specify deterministic key derivation for ML-DSA wallets from one seed.
  • JSON-RPC surface · devnet · Specification
    The RPC methods wallets need, and how they differ from Solana's.
  • Wallet key storage · devnet · Specification
    How wallets store ML-DSA keys safely.
  • Ledger indexer · testnet · Rust
    Turn the block history into queryable account and transaction history.
  • Client SDK · testnet · Specification
    The minimal SDK: keygen, address derivation, transaction building and signing.
  • Explorer · testnet · Specification
    How an explorer shows hash addresses, revealed keys and multi-KB signatures.
  • Command-line tool · mainnet · Specification
    A CLI with parity for the common Solana CLI workflows.
  • Wallet migration experience · mainnet · Specification
    How a wallet walks a user from an Ed25519 account to a q-chain account.

Security

System threat model, side channels, audit scope, incident response, formal targets and the mainnet launch gate.

  • System-wide quantum threat model · research · Design Tradeoff
    Enumerate every place q-chain could depend on a quantum-breakable assumption and what an attacker gains at each.
  • Constant-time requirements · devnet · Specification
    Which code paths must be constant-time and how that is checked.
  • Audit scope · testnet · Specification
    Define what an external audit must cover before mainnet.
  • Incident response · testnet · Specification
    What happens when a bug or key compromise is found.
  • Formal verification targets · mainnet · Specification
    Choose the components worth formally verifying.
  • Bug bounty · mainnet · Design Tradeoff
    Scope and size of a bounty program.
  • Mainnet launch gate · mainnet · Specification
    The checklist that must be true before q-chain can call anything mainnet.
07

Caveats

  • This is unreviewed, unaudited AI output. Code that looks compilable has not been compiled.
  • q-chain is not running yet. The devnet badge marks the stage it is being built toward; no public network exists today.
  • Post-quantum cryptography is young. The standards are new and implementations are still being hardened.
  • Settlement on Solana means the L1's Ed25519 keys stay in the picture until Solana itself migrates.
08

Glossary

Shor's algorithm
A quantum algorithm that solves integer factoring and discrete logarithms in polynomial time. It breaks RSA and every elliptic-curve scheme, including Ed25519.
Grover's algorithm
A quantum search speedup that roughly halves the security bits of hashes and symmetric ciphers. SHA3-256 keeps about 128 bits, which is still considered safe.
Ed25519
The elliptic-curve signature scheme every Solana account uses today. 32-byte keys, 64-byte signatures, broken by Shor.
ML-DSA
Module-Lattice Digital Signature Algorithm, standardised as NIST FIPS 204 (formerly CRYSTALS-Dilithium). ML-DSA-44: 1312-byte public key, 2420-byte signature.
Falcon / FN-DSA
A lattice signature with much smaller signatures (~666 bytes for Falcon-512), but its signing needs careful floating-point Gaussian sampling to avoid side channels.
SLH-DSA
Stateless hash-based signatures, NIST FIPS 205 (formerly SPHINCS+). Security rests only on hash functions; signatures are large (7856 bytes for 128s).
ML-KEM
Module-Lattice Key Encapsulation Mechanism, NIST FIPS 203 (formerly Kyber). Used for key exchange. ML-KEM-768: 1184-byte key, 1088-byte ciphertext.
X25519MLKEM768
The hybrid key-exchange group that combines classical X25519 with ML-KEM-768. The session is secure if either one holds.
Winternitz signature
A hash-based one-time signature. Each key may sign exactly once; reuse leaks the key.
harvest now, decrypt later
Recording encrypted traffic today to decrypt it once a quantum computer exists. The reason key exchange must go post-quantum before signatures do.
STARK
A proof system built only on hashes (via FRI), so it is believed to be post-quantum. Proofs are large: tens to hundreds of kilobytes.
hash-committed address
An address that is the hash of a public key, so the key itself stays off chain until it is first used.
Sealevel
Solana's parallel runtime: transactions that declare disjoint account access run concurrently.
compute units (CU)
The metering unit for on-chain work. Signature verification must be priced in CUs or it becomes a denial-of-service lever.
Tower BFT
Solana's stake-weighted voting with exponentially increasing lockouts.
PDA
Program Derived Address: an address a program controls and can sign for, derived from seeds.
increment
One buildable, checkable unit of work: a spec, a program, a test, or an honest tradeoff account.