# pd-max-v1: key ceremony transcript

Everything below is also in `circuit.json` (field `ceremony`). Times are UTC.

| | |
|---|---|
| Circuit | `pd-max-v1` = zk-kit `range_b14_n` (range, {"bits":14,"nonce":true}), 311 constraints |
| circuitId | `0xecd3bd64f76493a763c596d417dcd0fd3d9ee4644546214f5491e131267c8a1a` = keccak256("pd-max-v1") |
| Public signals | `commitment`, `min`, `max`, `nonce` |
| vkHash | `0xcdcbe4c2654a9b82993017d41a1538b8402ba51048ffb60f4d73ce20e85973c0` = keccak256(JCS(verification_key.json)) |
| ceremonyContributions (registry) | 1 |

## Phase 1: public Powers of Tau

The PSE Perpetual Powers of Tau (80 participants, closed with a pre-announced Ethereum randao
beacon), response 0080 prepared for phase 2 and truncated to 2^9.

| | |
|---|---|
| URL | https://pse-trusted-setup-ppot.s3.eu-central-1.amazonaws.com/pot28_0080/ppot_0080_09.ptau |
| Size | 683,154 bytes |
| blake2b-512 | `33ccbcacd7c43238b540f8dd7f68b4acac6be3a1fe2e695d55aea291172d30ddc8056c2851f5660b5e795550f300660042072254813d1558dc4d5a7192eae9b6` |
| sha256 | `67e59e346767e179a5bd88b4789a56ce376708244c01a32b520ee208dbfb2595` |
| Header power | 2^9 (read from the file header) |
| S3 ETag | `69d89d14fb047514a1eb6c82ffd5a718` (last modified Tue, 09 Apr 2024 07:02:55 GMT); md5 matches |
| Downloaded | 2026-09-27T06:12:41.730Z |

PSE publishes no hash list for the prepared files, so the checks above are what could be made: the
header, the byte count, and the S3 multipart ETag recomputed from the bytes (a transport check, not
an authenticity check). snarkjs's full powers-of-tau verification was not run: it did not finish in
10 minutes even for the 2^8 file on the build machine. Download the file yourself and compare the
blake2b-512 before you rely on it.

## Phase 2

1. **Initial key** `_0000` = snarkjs `zkey new` of `pd-max-v1.r1cs` on the phase-1 file. It is
   deterministic; anyone can recreate it (190,984 bytes, blake2b-512
   `b69ead7c16c064a44a0bbeaffd4d8d5b2cc936bacb695e240899d2a98e95521f877293aabe207ce49685734ec8638cf02802810e60e2c7220aaf16e645d77a10`).
2. **Contribution #1: Super Wallet (SeoulLabs) phase-2 contribution**, 2026-09-27T06:13:03.133Z to 2026-09-27T06:13:03.211Z.
   Contribution hash:

   ```
   5b8f9c1958ec0580e5223834c09442989a0bf117e5534c97e20da8569a308a9a517a8ed43f986d9ca017ec4f95e429dcc36c18e62f57748b980d3af328396c62
   ```

   Entropy: 64 bytes from the operating system CSPRNG (`node:crypto` randomBytes), passed in
   memory to snarkjs, which mixes in its own random bytes. It was not written to disk, a log or a
   terminal, and the process has exited. All seven circuits of ceremony batch 2 were contributed in one
   run that finished at 2026-09-27T06:13:03.218Z.
3. **Beacon.** The rule, fixed in `zk-kit/scripts/production-ceremony.ts` before the run: after
   every contribution has finished, take the latest Xphere mainnet block whose timestamp is later
   than that moment, and apply its hash with 2^10 iterations (snarkjs `zkey beacon`).

   | | |
   |---|---|
   | Chain | Xphere mainnet, chain id 20250217 (read from https://en-hkg.x-phere.com) |
   | Block | 49689564 |
   | Block hash | `0xf881b8862fb95d63b2269b5a6e6ae228156d78250e72c9c7129901b460d820de` |
   | Block time | 2026-09-27T06:13:14.000Z (fetched 2026-09-27T06:13:13.528Z) |
   | Iterations | 2^10 |
   | Beacon contribution hash | `e390f021b2fc6daa2c3e64ab490edf445cee74619abca0b0b3019869462b232aa79c988fb998fc295156fe353daf77dd8409ca8e0b7272848f2ed7cbfce7cee8` |

   Check the block: `curl -s -X POST -H 'content-type: application/json' --data '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["0x2f633dc",false]}' https://en-hkg.x-phere.com`
   and compare `hash`, or open https://xp.tamsa.io/block/49689564.

## What this ceremony does and does not give you

A Groth16 phase 2 is sound if **at least one** contributor destroyed their randomness. This key has
**one** contributor, Super Wallet, so its soundness rests on Super Wallet having done so. The public
beacon makes the final key depend on a value nobody knew when the contribution was made, but it is
public and adds no secret: it does not replace a second, independent contributor. The block number
was not announced in advance; the rule for picking it was fixed in the script, and the block came
after the contribution. The registry records `ceremonyContributions = 1` as it is.

**An institution that wants to add its own contribution** takes `pd-max-v1.zkey` (this key; the
contribution chain inside it continues), checks it with `zk-kit verify-ceremony`, runs
`zk-kit contribute`, and hands the result back; Super Wallet then applies a new, pre-announced
beacon with `zk-kit finalize`. The result is a new key and therefore a new circuit id,
`pd-max-v2`, registered alongside this one with ceremonyContributions = 2. A
key is never swapped in under an existing circuit id.

## Result

| | |
|---|---|
| verifyFromR1cs (r1cs + phase-1 file + zkey) | OK |
| Circuit hash (snarkjs) | `d64ca24454666b830b04e3031d6b6da08dce4837e521eb0917804eadd4d0166bb9ca6e326f53fb9893b20827019e3e64a26237ec0959a83299b0a815a5e570c2` |
| `pd-max-v1.zkey` | 191,889 bytes, sha256 `9ca58d3220d5e57cb50a39f5b154a3a2dd89f274c688f7e7a4d73d6be0487699`, blake2b-512 `16dcf5a56978ef87098fa71748f5362539323303b72e2c9703c6594d5071e370775a2546575dec6bb8f813ee3dfcc93dade28504611878dc9ea77bfa49cc1d1e` |
| `pd-max-v1.r1cs` | 128,344 bytes, sha256 `d785e1f5a02a12347eb286f15cbb0f61ebc38f2a12fb4adcb58aa881ef25cbc6` |
| `pd-max-v1.wasm` | 1,753,897 bytes, sha256 `c7167fbfcd15ebb07261d5cbd207bdb4e423198a39ff29efce3308c5e49a7b23` |
| vkHash | `0xcdcbe4c2654a9b82993017d41a1538b8402ba51048ffb60f4d73ce20e85973c0` |
| Verifier.sol runtime keccak256 (solc 0.8.24, optimizer 200, paris) | `0xad0342be09e02181ba7dfaeb2efdb2c2d627cd2bdd187b20802341972a22eaab` |

## Check it yourself

```sh
npm install /path/to/zk-kit          # or: npm install snarkjs@0.7.6 and use snarkjs directly
npx zk-kit ptau --power 9 --public --out ppot_0080_9.ptau   # compare blake2b512 above
npx zk-kit verify-ceremony --r1cs pd-max-v1.r1cs --ptau ppot_0080_9.ptau --zkey pd-max-v1.zkey
# prints: zkey VALID, then #1 Super Wallet (SeoulLabs) phase-2 contribution: 5b8f9c1958ec0580...
#                             #2 Xphere mainnet block 49689564 beacon [beacon f881b8862fb95d63..., 2^10 iterations]
```
