# income-over-v1: key ceremony transcript

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

| | |
|---|---|
| Circuit | `income-over-v1` = zk-kit `threshold_b48_n` (threshold, {"bits":48,"nonce":true}), 385 constraints |
| circuitId | `0x2f302f5e16d464bd252d5951bafcbed0cbc398cfe6c4ad46d04469a1eead4323` = keccak256("income-over-v1") |
| Public signals | `commitment`, `threshold`, `nonce` |
| vkHash | `0x543b70decfe8abad980bb3167a556aedb741c9d36946993c55dca2014a22a5ac` = 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 `income-over-v1.r1cs` on the phase-1 file. It is
   deterministic; anyone can recreate it (231,264 bytes, blake2b-512
   `48c2319bfdce23ce37e4982aa475be73461001d83c004ef9e10a5ac87163b85681080e7db8ef4f0b8a79502dc81fa03c1d9529c6b86e04b7e03d1da28933aba3`).
2. **Contribution #1: Super Wallet (SeoulLabs) phase-2 contribution**, 2026-09-27T06:12:51.052Z to 2026-09-27T06:12:51.135Z.
   Contribution hash:

   ```
   23165f053d1e75f6c21472cf68f75df65407ef7cf2299514d1644f93b0e36fe69fbe5f8c978206414795c11f25a6a15c9eeea920bce540a949b37b6ba25bf5bc
   ```

   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 | `310a3a0102e238515d45c883b61569efd6682ca88f2598145f1a6ceabf16c0a06a951fe9198ec3f4864d7f7964c8df50cf4661aec49535624f580d4c148a39ea` |

   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 `income-over-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,
`income-over-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) | `25c36f3565a0a68fd7c7c2e9f50b41cdcaffdf52c0a067958f451d692bd4bb6dbdcfb48e9efa8f2806e556dd1d04fd313c8312d040f233db6c1a3b5216d2973a` |
| `income-over-v1.zkey` | 232,169 bytes, sha256 `9aa57ef2372a0825480e874566f63bb829976e56dc3aba0867a1476fb0caef5f`, blake2b-512 `6d2b0b17df976d544ceb1de3e81ff12a3c01bcf721568332b1c8875c68053de5eec89e7efa109b7d2f90afba2332bed5b941a1d6c84da8bea466c835bd773015` |
| `income-over-v1.r1cs` | 143,188 bytes, sha256 `973822e429ec1fa381f03b41c490a4e027202ceca8add9fb51e2e4d035a0c2b7` |
| `income-over-v1.wasm` | 1,753,150 bytes, sha256 `457b95a870935d7ded980a9c5195d2e43c642505ff2136d80190cd0913306c8c` |
| vkHash | `0x543b70decfe8abad980bb3167a556aedb741c9d36946993c55dca2014a22a5ac` |
| Verifier.sol runtime keccak256 (solc 0.8.24, optimizer 200, paris) | `0xf860b9e8a04ef653d48ba078db430621643b027839361eef754fb6c1aca59103` |

## 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 income-over-v1.r1cs --ptau ppot_0080_9.ptau --zkey income-over-v1.zkey
# prints: zkey VALID, then #1 Super Wallet (SeoulLabs) phase-2 contribution: 23165f053d1e75f6...
#                             #2 Xphere mainnet block 49689564 beacon [beacon f881b8862fb95d63..., 2^10 iterations]
```
