Settlement receipts
A settlement receipt is a small JSON document that says "batch N of this rollup settled this state root, and the rollup creator signed it with ML-DSA-87", and Qorva verifies it by re-reading every field from the chain. Nothing in the receipt is trusted, and every verification also runs on a tampered copy that has to fail.
How to use it
| Where | What happens |
|---|---|
| /receipt/<rollup>/<batch> | Builds the receipt from chain state, verifies it, verifies a tampered copy, and offers the JSON as a download. |
| /receipt | Paste a receipt (bare, or wrapped as { "receipt": … }) and verify it. |
GET /api/receipt?rollup=&batch= | Build and verify. Returns receipt, verification, tampered and ms. |
POST /api/receipt | Verify a receipt someone handed you. The body is checked with receiptSchemaError first. |
qorva receipt <id> <batch> | CLI: build, verify, tamper-test; --out FILE saves it, exit 1 if not valid. |
qorva verify-receipt <file> | CLI: verify a file; exit 1 if not valid, 3 if the file is not a receipt. |
The six checks
All come from verifySettlementReceipt(receipt, { client }) in @qorechain/rdk 0.9.0, in chain mode, which is the only mode that can return valid.
| Check | Passes when |
|---|---|
| rollupLayerBinding | The chain says this rollup id owns the receipt's layer. |
| batchStateRoot | The settled batch on x/rdk carries exactly this state root. |
| anchorOnChain | An x/multilayer anchor matches every field: root, heights, validator set, signature, time. |
| creatorAuthority | The ML-DSA-87 public key was read from the chain, never from the receipt. |
| pqcSignature | The ML-DSA-87 signature verifies over the canonical v2 anchor bytes. |
| chainBinding | The receipt names the chain that was queried, so it cannot be replayed on another network. |
The tampered copy changes the last hex digit of stateRoot (to 1 if it was 0, otherwise to 0). It is built in src/app/api/receipt/route.ts and verified in parallel with the original.
A real receipt: setoff-1 #113
Built and verified through GET /api/receipt?rollup=setoff-1&batch=113 on 2026-11-30 (2.1 s):
{
"version": 2,
"chainId": "qorechain-diana",
"rollupId": "setoff-1",
"layerId": "setoff-1",
"batchIndex": 113,
"creator": "qor1svla8sel903wmht50367j4m6w8xxuy693ys9k5",
"algorithm": "ML-DSA-87",
"stateRoot": "0ce83fe0c92cfedae97cdb60847969ed1c556100019c7de56c4626b51461836b",
"layerHeight": 113,
"validatorSetHash": "",
"mainChainHeight": 11034883,
"anchoredAt": 1796051510,
"pqcSignature": "3ff81880309f…24292e32",
"batchStateRoot": "0ce83fe0c92cfedae97cdb60847969ed1c556100019c7de56c4626b51461836b",
"transactionCount": 2,
"compressedStateProof": ""
}| Check | Receipt | Tampered copy |
|---|---|---|
| rollupLayerBinding | ok | ok |
| batchStateRoot | ok | fail |
| anchorOnChain | ok | fail |
| creatorAuthority | ok | fail |
| pqcSignature | ok | fail |
| chainBinding | ok | fail |
| valid | true | false |
anchoredAt is a Unix time: 2026-11-30 15:11:50 UTC. The signature is 4,627 bytes, the size of an ML-DSA-87 signature.