Businesses want rollups for payments, but they can't put invoices, bank details and counterparties on a public chain, and anything encrypted today with classical key exchange can be harvested now and decrypted after Q-Day. Making the whole rollup private breaks what keeps it honest: anyone must be able to re-execute it and prove fraud.
Bergwacht splits every payment in two and posts both to the same based inbox on QoreChain, in ONE hybrid-signed transaction:
- the L2 transfer (qledger-v1, ML-DSA-44): public amounts, so anyone can re-execute it, prove fraud on it and withdraw from it;
- a sealed instruction (RF creditor reference, memo, IVMS101 Travel Rule data) encrypted with ML-KEM-1024 to the payer, the payee and an auditor, with keys from QoreChain's on-chain KEM registry.
Nobody can attach a note to someone else's payment: seven binding rules, each pinned by a test (THREAT_MODEL T6). A disclosure ticket opens exactly one payment for a regulator; the others stay sealed.
Live on testnet as bergwacht-1 (every hash in evidence/ONCHAIN.md):
- Detection: our operator published three wrong roots on purpose (batches 1, 2, 5). Watchtowers not run by us got all three rejected 1-2 blocks after submission and the operator's bond slashed; our replay agreed each time.
- Fraud proof: our own watchtower's fraud proof was upheld for batch 8 in a drill we set up; the chain named it challenger and paid it 500 QOR of the slashed bond.
- Liveness: the watchtower account submitted batch 3 by hand, then batches 4, 6 and 7 from its own replay after posts had waited 30 or 60 blocks with no operator batch (escape hatch); all four are finalized on chain.
- Hybrid signatures: every batch transaction carries ML-DSA-87 next to secp256k1. With a stolen classical key the chain still refuses a transfer and an inbox post, and a stolen key cannot be smuggled in as a co-signer.
- EVM: a settlement contract checks the batch anchor's ML-DSA-87 signature with the pqcVerify precompile; BergwachtExitVault (0x8049a4d8d44221b4f38dc20109fe723f479a6a15) paid two fast exits on Diana.
- Network board: the same replay re-executed 378 batches on 14 based qledger-v1 rollups, ours included, with the chain's own roots, 0 fraud found.
- Upstream: replaying our batches showed the RDK's generic validator flags honest qledger-v1 batches; reported with a fixture and a regression test as qorechain/qorechain-rdk#6.
Check it in five minutes, read-only, no keys:
- Browser verifier (receipt, disclosure ticket, proof bundle): https://bergwacht.nedovost.org/verify.html
- Live dashboard: https://bergwacht.nedovost.org
- "Judge in 5 minutes" in the README.
How it's made
Node.js 22, ES modules, no build step, on @qorechain/rdk 0.9.0 and @qorechain/sdk, testnet qorechain-diana. Built by two people in about 1.5 days.
Rollup: optimistic, qledger-v1, based sequencing. createRollup, bond, deposits, postRollupData, submitBatch with an ML-DSA-87 anchor, challengeBatch with fraud proofs, executeWithdrawal with Merkle proofs, settlement receipts verified against the chain.
Sealed instructions: RDK sealEnvelope, ML-KEM-1024 to payer, payee and auditor, keys read from the on-chain KEM registry (registerKemKey / getKemKey). Fresh content key, AES-256-GCM, header as AAD. Instruction and L2 tx go as two messages of ONE hybrid-signed tx, so both come from the same poster at consecutive inbox sequences; the verifier binds them by poster and SHA-256, then checks amount and payee.
Watchtower: keeps its own state and re-executes each batch with executeQledger; on a wrong root it builds a fraud proof and calls challengeBatch; if the operator stalls it submits batches itself; it also reports payments not sealed to the auditor. Inbox ranges are checked against the chain's accumulator. It runs as a systemd service on our VPS; anyone can run the keyless replay.
EVM: Solidity settlement contract using the pqcVerify precompile, and BergwachtExitVault for fast exits (quorum of two ML-DSA-87 keys), deployed through scoped EVM windows.
Cryptography: ML-KEM-1024 (envelopes), ML-DSA-44 (L2 accounts), ML-DSA-87 (batch anchors and every L1 tx, hybrid with secp256k1), all listed in a CycloneDX 1.6 CBOM that a test enforces.
What was hard:
- The first design put an ML-DSA-44 signature inside the envelope: 10.2 KB, over the 6 KiB inbox limit. We moved to the atomic pair.
- The RDK's generic transitionRootValidator flags honest qledger-v1 batches, so the watchtower uses an exact replay that reproduces the chain's roots byte for byte. We reported the gap upstream (qorechain/qorechain-rdk#6).
- The chain's batch listing hides rejected batches, so the watchtower probes the gaps to find them.
AI-native process as code: every change is a GitHub issue in its own git worktree; a test is committed red first; a fresh-context reviewer agent sees only the diff and a PR merges on its verdict and green CI; hooks refuse edits outside a taken issue; a jury agent scores the repo and its findings become issues (AI_USAGE.md).
Security: THREAT_MODEL.md covers 20 threats (T1-T20) with residual risks; offline node:test suite; mutation passes on the security code; red-team runner (redteam/).
Honest limits: batches submitted by the escape hatch carry no PQC anchor; the ExitVault quorum is our own two keys and its relayer is a script; the camt.054 export is not validated against the XSD.
914b4ceMerge pull request #240 from M1hairu/worktree-239-source-serif· M1hairu
9f27ec6#239: review — phone header flows (links visible), escrow caption states only what the page knows, 'all re-executed' only when every final batch is, ticket samples named by post, tampered sample descr· M1hairu
87bd55a#239: verifier — samples as a register in three groups (the tampered control in coral), drop zone as an instrument cell, verdict under the glass lens, bracket controls, a two-line lede with the bundle· M1hairu
89adc36#239: the world and the instrument — black canvas with a silk-dot ridge and grain (rlt), instrument cells with corner marks and bracket controls (guap_hack), true-glass lens class; dashboard: three fi· M1hairu
34caa88Merge remote-tracking branch 'origin/main' into worktree-239-source-serif· M1hairu
4a65424#201: verify.html in the Bergwacht identity: brand.css, ridge strip with the mark linking home, gold only for VALID, coral for NOT VALID and warnings· M1hairu
9712db6Merge pull request #203 from M1hairu/worktree-202-check-live-strict· M1hairu
3c918e2Merge origin/main into worktree-202· M1hairu
4a65424#201: verify.html in the Bergwacht identity: brand.css, ridge strip with the mark linking home, gold only for VALID, coral for NOT VALID and warnings· M1hairu
9712db6Merge pull request #203 from M1hairu/worktree-202-check-live-strict· M1hairu
3c918e2Merge origin/main into worktree-202· M1hairu