Why Proofs?
An indexer scans the Zcash blockchain and builds a registry of names. But why should anyone trust it? What if it:
- Fabricates a registration that never happened on-chain?
- Charges the wrong fee?
- Registers a name twice?
- Tampers with the registry state?
ZK proofs eliminate these questions. Each proof is a cryptographic certificate that the registration was processed correctly. Anyone can verify the proof independently.
What Each Proof Verifies
The ZNS prover uses SP1 -- a RISC-V zero-knowledge virtual machine. For every REGISTER transaction, the prover checks four things inside the zkVM:
- Name validity -- 3-63 characters, lowercase alphanumeric + hyphens
- Fee sufficiency -- the transaction paid enough ZEC for the name length
- Ed25519 signature -- the signature over
"REGISTER:{name}:{address}"is valid - Merkle tree insertion -- the name didn't already exist, and the new state root is correct
If any check fails, the proof cannot be generated.
Public Outputs
Each proof commits 8 values that are permanently bound to it:
| Output | Description |
|---|---|
name | The registered name |
address | The Zcash unified address |
pubkey | The Ed25519 owner public key |
value_zat | The fee paid (in zatoshis) |
block_height | The Zcash block containing the transaction |
txid | The Zcash transaction ID |
old_root | Merkle tree root before this registration |
new_root | Merkle tree root after this registration |
The txid and block_height pin the proof to a specific Zcash blockchain transaction. Anyone can look up the txid on a Zcash node and confirm the memo and value match.