How it's made
TypeScript monorepo (pnpm, Node 22.13+) with Solidity contracts (Foundry). Apache-2.0.
Kits: QoreChain RDK, QoreChain SDK, qorechain-pqc, QoreSign, QoreSeal, MCP server and qore CLI, QoreScan, create-qorechain-dapp, custody kit (vendored).
Architecture. Services share one SQLite database and never call each other:
- batcher: bonded submitter; plans a batch with the RDK, re-checks it against its own archive, then signs and submits it with the ML-DSA-87 anchor signature.
- watchtower: checks every inbox entry against the chain's hash accumulator, re-executes each batch (state root, withdrawals root, data hash, previous root, inbox range), inspects the ML-DSA-87 layer of every batch transaction with QoreSign, and sends a fraud proof only after the chain's own check passes locally. Also audits the other qledger-v1 rollups read-only.
- receipts: records each anchored final batch in VigilReceipts (pqcKeyStatus + pqcVerify) through a smart account whose key may call only the two record functions; a scoped EVM window is the fallback.
- memo: notes sealed with ML-KEM-1024 (QoreSeal) to the recipient's registered key, bound to the transfer.
- monitor: halts, block-time drift, upgrades and setting changes on testnet and mainnet.
- api, web app, operator console (Sign In With QoreChain), MCP server (QoreChain's 14 tools plus four Vigil tools).
- SettlementGate (examples/settlement-gate, from create-qorechain-dapp): an escrow that pays only once the creator's anchor is recorded; V2 also requires the watchtower's ML-DSA-87 attestation.
On-chain evidence (qorechain-diana, EVM chain 9800). Operator qor107qxkklc0znm38tl0595asa9z73c69w85tsztr: creator of vigil-1, batches, challenges, claims, memos, attestations. Receipts deployer and smart account qor1x2jpzzxspw9yl59uwgxyjtxnx8clehnwt2yt0c. Fraud-drill account qor1hnfd8kf8kjegp8eyjm3shklydy443z7yw6fmuk (posted forged batches 1 and 18).
- vigil-1 created (17 Nov, height 10,234,711): 78336DDE94EEC5157B6E60578443AE00E94ED8A56CA1F83F8342C31BD2F0CAC6
- Batch 0 with ML-DSA-87 anchor: B15BF4B9BACA1DE7ED0E290C8BD9D409AF11A8207D38FD5481066C047092E70E
- Forged batch 18: E6993DBCAE77E735D138E03748A09321899525BAF24C464BEE360C2A9C02BDB4
- Vigil's challenge 5 s later, upheld, 1,000 QOR slashed, 500 burned, 500 paid to Vigil: 349C8DF05F888E2AEB8826101F49FD8960EB3662A47530B37C71307206822330
- VigilReceipts 0xced683ad4319a34873e2c1aa90d18e2fcf1af1d1; batch 0 receipt 0xa4e7838ccc9e11bb03d7650a53579aa99e34f3c7a67177b322f6dfe0cc7b1855
- Window reaching only VigilReceipts: 87F3D1C1BFD5B80CDB016E3E2CE1081B5D1CE69143E695C4184E4F569D1C0C93; batch 27 attestation through it: 0xaefc88412dccc090f52167a8f25669e14a620dfac61712d2c6200404c8e62c6d
- Smart account hot key: FF2A147287FEDCC422209A01B0EDFC752CAE82B427DD9A3EF33D7EF1C6B8E82E; batch 26 attestation through it: 6C37DDE1DFAF4BBA539A11093B86829D8978CBC96C7387F1BD4B2F47C0CF018C
- Withdrawal claims 0.5 QOR: 511A29444A436A13956E9A40D8199B40803EE79197C102A7FD6FBF7967833BE6; 0.3 QOR: EF08E2F0A81C1DC9A8A35770577DFFB2CAF958C3EF80EA5047177CDD5FEE8617
- ML-KEM key: 9409BE3284B456530AE1EDBA7622D04AB1D6B12A6D7C28835FE6000D36FD4CBC; sealed memo: 1D39B55A28FDD65478B4769200156D5785449DA02B33C751D0A067E125BCA674
- IBC exit to Osmosis testnet (channel-1), acknowledged in 21 s: 471BDAC775B1A4A2766BCFF8CDC6B1970CF7D4C67865ED6B5471439871BC6CD5
- SettlementGate v1 0x8f05cd493adb455818ffe63e3eb09ecdd21c89af released 0.1 QOR on batch 29: 0xc80015952bc57f2d48e4cee4034ba2415485ee482d35980cae389463a2f7eb70
- SettlementGateV2 0xcc03488ffa85db2b664a95a173f694616caf9ff3, deploy 0x958204fcc2d2049d1260957ad9f4a92af89f5544a93e4098fab05afceda76264; payout on batch 26: 0x1610167f21848b3b814834e04a8199e5d357e791bb969657b3633d832caa109f
Check from a fresh clone, no key, no .env, no Docker: pnpm install --frozen-lockfile, then pnpm verify:proof, pnpm metrics, ROLLUP_ID=vigil-1 pnpm watchtower --once.
Quality: 252 TypeScript tests, 28 contract tests (17 unit, 6 fuzz, 5 invariant), 24 SettlementGate tests (5 on a testnet fork); forge coverage 100% of lines of VigilReceipts and SettlementGate; pnpm redteam: ten attacks on live data, each refused.
What was hard: no kit watchtower could judge a qledger-v1 batch, and the chain prunes posted data, so Vigil keeps its own verified archive. Local EVMs lack the PQC precompiles, so contracts are also tested on a testnet fork. While our single host slept on 18-19 Nov, batch 29 was forged twice and other teams' bots rejected both, so the watchtower now reports offline gaps and a key-less second watchtower is scheduled on GitHub Actions every 15 minutes.
Built with an AI coding assistant; workflow, generated work and human contribution in AI_USAGE.md.
Limits: testnet software, single host, no professional audit; AI-assisted security reviews checked by the team, findings fixed or documented in docs/THREAT_MODEL.md.