Skip to main content

The Proof Chain

The domains are registered in batch. Each batch waiting timeout is ~10 minutes. Every batch produces one proof. These proofs form a chain of state transitions from genesis:

genesis_root (empty tree -- known constant)
| +-- "richard.zcash" registered at block 100,
| +-- "john.zcash" registered at block 110,
| ... (could be more registration/update commands)
| ! Proof 1 is generated
| old_root = genesis_root --> new_root_1
| +-- "richard.zcash" put his name on marketplace at block 200,
| +-- "sam.zcash" registered at block 250,
| ... (could be more registration/update commands)
| ! Proof 2 is generated
| old_root = new_root_1 --> new_root_2 (= current root)

Each proof's old_root must equal the previous proof's new_root. The first proof's old_root must equal the known genesis root (an empty Sparse Merkle Tree).

Verifying the Chain​

A verifier checks the entire registration history in five steps:

  1. Get the SP1 verification key - deterministically derived from the guest program binary. A rules change replaces it, so a proof anchored before one verifies against the key in force then
  2. Collect the proofs from BNB Smart Chain - every commitBatch transaction to the anchor contract carries its proof and public values in its calldata; the contract's RootUpdated events lead to them. The indexer API does not serve proofs
  3. Verify each SP1 proof using the verification key
  4. Check the chain -- genesis == P1.old_root, P1.new_root == P2.old_root, ..., PN.new_root == current_root
  5. Spot-check on-chain -- look up any committed txid on a ZCash node and confirm the memo, value, and block match

If all checks pass, the entire registration history is correct - no trust in the indexer needed.

Proof Pipeline​

The registrar runs two processors, one after the other on the same timer:

ZCash Blockchain
|
Block processor (scans each block, pre-checks commands, waits for 20 confirmations)
|
Batch (open for about 10 minutes, then re-checked against the name state)
|
Batch processor (SP1 proof of the batch's state transition)
|
Anchor contract (verifies the proof on BNB Smart Chain; the new root is a checkpoint)
|
Indexers sync to the checkpoint (replay ZCash and must reach the same root)
|
API Server (GET /v1.0/resolve/{name})

The two processors take turns: while a batch is being proven and anchored, new blocks wait to be scanned and are picked up as soon as it is done. No payment is missed — it is only seen a few minutes later.