GM,
This is a new chapter of noir-ckb, so a quick catch-up first. In my direction check (Direction check: should noir-ckb generate CKB Type Scripts from Noir circuits?) I asked whether noir-ckb should generate CKB Type Scripts from Noir circuits. In the follow-up (Noir-CKB update: what I decided after the direction check, what you can try today, and where this is going) I shared what I decided, and since then I’ve posted updates there as the private tally took shape and its setup ceremony ran to the end.
The private tally is now deployed on testnet, and anyone can create their own. A three-minute recording of the full run:
What the private tally is
A CKB Cell that holds a hidden number. Only the holder of a secret key can add to it, and every addition is authorized by a zero-knowledge proof made on their own computer.
- The Cell stores only a commitment: a fingerprint of the number, made with fresh randomness each time, so it reveals nothing about the value.
- You can add any amount, including 0. A “cover update” looks exactly like a real one, so even “did anything change?” stays private.
- There is no signature lock on the tally. The proof is the only authority.
How it works: the proof is bound to one exact transition
A valid proof on its own is not enough. If the Type Script accepted any valid proof, someone could copy one from the mempool and use it on a different Cell. So the Type Script doesn’t trust the proof’s public values. It rebuilds them from the actual transaction:
- the network,
- the exact Cell being consumed,
- the old and the new commitment,
- the lock and capacity of the new Cell,
and it hashes all of that into the proof’s public input. A proof is therefore valid for exactly one transition of exactly one Cell. Used anywhere else, it fails.
Before anything went on testnet, this was tested in CKB-VM with 49 attack cases (all rejected as expected): replaying a proof on another Cell or another network, swapping commitments, wrong or altered verification keys, malformed witnesses and more. 4 mutation tests then removed one safety check at a time to confirm the tests notice when it is missing.
Why there was a ceremony
Groth16 needs a proving key made with secret randomness, and whoever kept that randomness could forge proofs. Because the proof is the only authority here, a key made by me alone would have meant trusting me completely.
So I ran a public phase 2 setup ceremony. Four people contributed, every key was verified, and the result was sealed with the hash of CKB mainnet block 20,870,000. Nobody can forge proofs as long as at least one contributor threw their randomness away. Thank you, truthixify, alienate, and Cecilia. The transcript is public and can be re-checked with one command: [ceremony folder](noir-ckb-verifier/ceremony/private-tally-v2 at main · wamimi/noir-ckb-verifier · GitHub).
The deployed verification key is that ceremony’s key, and the join tool checks this on your own machine before you use it.
What it looks like on testnet
I created a tally, added 7, then added 0.
One of these updates added 7, the other added nothing. On chain they have the same size and shape: one 33-byte commitment replaced by another, plus a proof. The ~117 million cycles are the Groth16 verification running in CKB-VM. The value 7 exists only in my private folder.
| Step | Transaction |
|---|---|
| Deploy (Type Script, ceremony verification key, guard lock) | 0x39ef90b8…47b1f9 |
| Create at 0 | 0x58d64623…6eca67 |
| Add a hidden amount (7) | 0xa93b9ed5…1c4a73 |
| Cover update (0) | 0xbc062ecc…66046c |
A second account then joined the same deployment with its own key and added a hidden amount, the same way you would.
What it does not hide
Anyone can see that a tally exists, when and how often it was updated, and which account paid the fee, and one tally’s updates are linkable to each other. What stays private is the value and every amount added.
Try it
If you’re a developer, you can create your own hidden tally on this deployment and watch it happen on testnet. It costs about 262 testnet CKB (free from the faucet), there is nothing to deploy, and every proof is made on your machine.
After installing git, Python, Node.js and rustup, it is two commands from inside the cloned repository:
```bash
python3 -B scripts/try-private-tally.py install
python3 -B scripts/try-private-tally.py run
```
`install` lists everything it will set up and asks once. `run` rebuilds the proving setup from the ceremony key, checks the deployment, makes a testnet-only account, waits for your faucet payment, then creates your tally and lets you add hidden amounts. It shows every transaction and asks before signing and sending it; your password only ever goes to `ckb-cli`.
Guide: noir-ckb-verifier/docs/try-the-private-tally.md at main · wamimi/noir-ckb-verifier · GitHub
Supported: macOS on Apple silicon and Linux (x86_64, ARM64). The first run takes about 20–30 minutes, most of it downloading and compiling.
What I’d love to hear
1. Did it work on your machine? Where did you get stuck?
2. What would you build with this, and what would you want a proof like this bound to?
The next step for noir-ckb is turning these examples into a toolkit you can install and use for your own Noir circuits, with the CKB binding generated for you. Your answers will shape it.