Repository navigation
Privacy and binding hardening of the original demos (ADR-0009) - #10
Merged
Merged
Conversation
Ballots were Poseidon(vote, nullifier) with a public nullifier, so every vote could be decoded from chain data. Replace them with exponential ElGamal on Jubjub under an election key shared n-of-n by three trustees (ADR-0005). The ballot proof shows eligibility, the nullifier, and that (A, B) encrypts 0 or 1; the sum of all ballots is decrypted once, after an on-chain deadline, with a Groth16 DLEQ proof per trustee share. Also closes binding gaps found while redesigning: - G1: election id, voter root and election key are script parameters - G2: the list key is the nullifier; the stored ballot is the proved one; exactly one unit of the nullifier token may exist in the outputs - G3: an insert spends exactly one list node; node values are exact - G4: ballots must be valid no later than the voting deadline - G5: the list root is one-shot (seed output) The tally walks the list from its root and fails closed, publishes a ballot-set digest, and re-verifies the manifest, script hashes, key proofs, share proofs and the total from public data. Tests: host ElGamal vs an independent Python reference, circuit negatives, Plutus VM mutations for every gap, DevKit E2E election. Builds against a local ZeroJ 0.1.0-pre13 snapshot (bloxbean/zeroj#73). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- P1: the continuing anchor's datum and the list root are now exact on-chain. A field-by-field read accepted ListElement with an extra field, which the off-chain walk rejects, so anyone copying a mempool ballot could make the election untallyable. Off-chain parsing mirrors on-chain acceptance (constructor 0, exactly two fields). - Tests: the pre-minted copy placed after the node (the order a "last holder wins" read would accept), N + p nullifier names, foreign election id / key, staked outputs, non-root anchors (order violation, duplicate key, dropped nullifier), exact root. Removing the one-unit rule or the exact anchor datum now fails a VM test (checked). - DevKit: the double vote and the post-deadline ballot are forced past the client and rejected by the scripts on the ledger path. - Manifest: full verification keys and parameter-applied scripts; the seed is bound to chain data (root token minted once, by the seed's spender). - Tally reads chain time before ballots; the ballot-set digest is domain-separated and bound to the election id and list policy; status no longer deploys scripts; creating an election is refused once one is finalized; key caches are keyed by an R1CS digest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New usecase project (ADR-0006) with Pedersen commitment demos on Yaci DevKit. A. Confidential points: notes whose amounts are pedersen-jubjub-v1 commitments. PointsLedger (one multi-validator: policy + note address) issues notes (issuer-signed), splits a note with a proof of in = out1 + out2 over hidden 64-bit amounts, and redeems a public price with a proof of in = change + price; a redemption mints a receipt token named after the redeemed note, so receipts cannot be forged or replayed. B. Committed credential gate: a bureau commits to a credit profile (income, credit_score, birth_year, country) as one vector commitment and records the issuance on-chain (token name binds u, v, σ, holder). CreditGatePolicy mints a badge, paid to the holder, for a proof of income >= min and credit_score >= min against the record, revealing nothing else. Tests: circuit honest/negative cases, Plutus VM mutation tests for every invariant (P1-P8, C1-C5), and DevKit end-to-end runs with on-ledger script rejections. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
C. Solvency with hidden liabilities (Provisions-style): one commitment per customer balance, a proof that the hidden total is at most the reserve locked in SolvencyVault, a per-customer inclusion check by opening, and an auditor opening of the total by homomorphism. The vault keeps the reserve and the attestation fixed until unlockAfter (release burns the token), so reserves cannot back two attestations or be swapped out. Also: the ./gradlew run walkthrough of all three demos on DevKit, the project README, and registration in build.gradle, build-all.sh and the repository README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- P0 (solvency): the same reserves could back attestations one after another (attest, let customers check, release, re-attest for others). Attestations are now bound to a public period: each period has its own vault script; attest only with a validity range ending by periodStart, release only from periodEnd, vault output at the exact enterprise address. Every attestation of a period is locked for the whole period at once (ADR-0006 r3, S7). - Customer check: derive the period's vault script, read every live attestation at its address, require the entry exactly once across all of them. ADR states the id-uniqueness and trusted-setup requirements. - Points: the receipt names the spender, not the change owner (wallet bug); the price binding is now isolated in the VM test (redeemer and receipt agree, only the proof rejects); new mint-side negatives (Split with no note spent, Receipt with zero or two notes or a short name); the two-token note mutation is isolated. - Credential: the non-canonical u mutation is isolated (record built for the same u + p). - Removing Split's one-input rule or the vault's period-start bound now fails a VM test (checked). Circuit allows N <= 16 (on-chain budget). - Wording: test rejections are scripts failing in local Julc evaluation, as the node would run them; rejected transactions are not submitted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd 2) The guarantee is per period: each period's attestations must cover the whole book, customers check every period they rely on, the schedule publishes every vault parameter set for a period, and periodStart < periodEnd is enforced where customers derive the vault. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turn the module into a Spring Boot app (port 8093) like the other usecases. Thin services drive the existing engine (ConfidentialPoints, CreditGate, SolvencyAttestation) on Yaci DevKit: they create and fund the demo wallets, hold the openings on the users' behalf, and expose the private and the on-chain view of each demo plus its actions, including the "try to cheat" ones. A false statement maps to "no proof possible" (422); a validator rejection maps to an onChainValidation body (403). Circuits and wallets warm up in the background; /api/status reports readiness. The CLI walkthrough moves to `./gradlew walkthrough`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Svelte 5 + Vite (native fetch, no axios), built into src/main/resources/static with -PwithFrontend. Each tab shows the private side (openings held by the demo server) next to the on-chain side, with actions and "try to cheat" cases: - points: issue, transfer, redeem; overspend (no proof), spend someone else's note (rejected); - credential: issue and record, claim a badge; threshold above the profile (no proof), impostor claim (rejected); - solvency: book, attest for a period with a countdown, customer checks, auditor opening, release; insolvent (no proof), a second attestation or a release inside the period (rejected). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`./demo.sh pedersen` (alias of pedersen-commitments, port 8093) with a --run happy path, a compose.demo.yml service and volume, and a demo-cache manifest (no setup files committed; setups are generated on first start). The README documents the UI, its tabs and configuration; the root README lists the demo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The demo's prototype ElGamal (JubjubElGamal, JubjubElGamalGadget) is replaced by ZeroJ's elgamal-jubjub-v1 profile from zeroj PR #76: - PrivateBallotProof v3 encrypts with ZkElGamal under a verifier-fixed key (vote @uint(bits=1)); TrusteeShareProof v2 is ZkElGamal's DLEQ relation. New circuit versions, so new setups and scripts; the DLEQ R1CS digest equals the prototype's. - Services use the safe host API: ballots are admitted with a delegated EncryptionStatementVerifier backed by the chain (width, ballot policy, key, ciphertext match), and decryption shares are accepted only as VerifiedDecryptionShare built from verified DLEQ proofs. - ElGamalCompatibilityTest shows the prototype's vectors decrypt identically. - ADR-0005 r4 records the move; zerojVersion pinned to the local snapshot 0.1.0-pre13-8a5078a-SNAPSHOT (zeroj #76 head) until a release. Unit, circuit and Plutus VM tests pass, and the DevKit E2E tallies YES=2, NO=1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Local publishToMavenLocal of bloxbean/zeroj main at 1e78c6f, which adds confidential-note-jubjub-v1 (ADR-0055). Existing pedersen-commitments and private-voting tests pass unchanged. Move to the public release before merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…8 sealed-bid auction ADR-0007 is ZeroJ ADR-0055's milestone M3: on-chain opening delivery and D3a enforced auditor amounts for the points demo (NoteLedger), an auditor registry with on-chain-verified, context-bound possession proofs, an exact-address policy, wallets and auditors that recover notes from chain data, solvency entries with deliveries, and a confidential payroll with proof-enforced issuance (ADR-0055 Q9 (b)). ADR-0008 is a sealed-bid auction whose bids are encrypted to the auctioneer under elgamal-jubjub-v1 with a bid proof, and settled with a proof that names the earliest highest bid without publishing the losing ones. r2 of both responds to a design review (adversarial Claude reviewer F1-F17, Codex C1-C10; no P0). ADR-0006 gains an r4 note pointing to both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s (ADR-0007 M2) AuditorRegistry is a singleton key registry: a one-shot REG token minted by spending a seed, moved forward on rotation under the old and the new auditor's signatures, so a ledger always reads the current generation (ZeroJ ADR-0055 spec §8.1). Each entry holds the auditor's elgamal-jubjub-v1 key and confidential-note viewing key, as coordinates bound on-chain to their encodings, with u != 0. Both Groth16 DLEQ possession proofs are verified on-chain at Init and Rotate (about 7.8e9 steps), bound to the key type, the registry and the registrant, so no registered key can freeze notes or be refused by honest senders, and a copied proof never registers. Host side: KeyPossession (context-bound proofs, 192-byte compressed codec), AuditorKeys, RegistryEntry, AdmittedAuditor (the only way to obtain a key context for limb encryption: ADR-0055 M3 criterion (b)), Registry (Init, Rotate, current entry), and a minimum-ADA helper. Tests: VM mutations for every shape, signature, generation, address, token, encoding and possession rule (each guard checked by reverting it), with a positive control for the identity key's valid proof; admission refusals including key-type binding in isolation and cross-registry replay. Reviewed by Claude and Codex (no P0/P1; findings fixed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ency (ADR-0007 M3a-M5; ZeroJ ADR-0055 M3) NoteLedger replaces PointsLedger. A note is Note(owner, u, v, generation, audit, deliveries): the Pedersen commitment, the registry generation, two elgamal-jubjub-v1 limb ciphertexts of the amount to the auditor (D3a) and confidential-note-jubjub-v1 deliveries to the owner and the auditor. - Address policy (ADR-0055 M3 criterion (a)): every output under the ledger's payment credential must be a note at the exact enterprise address, holding exactly lovelace and one note token, of the current generation. - D3a direct layout (spec 8.2): transfer and redeem prove each created note's limbs encrypt the amount that opens its commitment, PK_a from exactly one registry reference input, distinct handles. Complete transactions in the Julc VM: transfer 76.5% of the step limit, redeem 58.0% (DevKit: 76.8%, 58.3%), within the 80% gate; circuits equal ZeroJ's reference (34,184 and 18,366 constraints). - Payroll: proof-enforced issuance (Q9 (b)), NoteIssueProof for one or two notes (50.8% / 71.8%); an employer that under-reports has no proof. - Verification keys are pinned by blake2b(serialiseData(vk)) and carried in the redeemer (VkLib); the ledger is deployed as a reference script. - Wallets (NoteWallet) recover notes from chain data with their viewing key; owned-but-unopenable notes are reported, notes readable but owned by others are not counted. The auditor (AuditorView) reads every amount with the keys of the note's generation and labels it proof-enforced or issuer-claimed. Senders encrypt limbs only with ElGamal.encryptWithOpening under an admitted registry key (M3 criterion (b)). - Solvency: each entry carries its customer's delivery and the attestation the auditor's aggregate delivery; customers and the auditor check from chain. - UI: points tab reworked (chain-scanned wallets, auditor panel, rotation, garbage-delivery / under-report / retired-key / stake-variant cheats), new payroll tab, solvency tab with on-chain openings. CLI walkthrough updated. Tests: NoteLedger VM mutations (every ADR-0006 P1-P8 and ADR-0055 D3a/D8 case, stake-variant output, reused handles, stale generation, registry mutations, under-reported proved issuance), guards checked by reverting them; I12 invalid witnesses; DevKit E2E for points (issue, transfer, redeem, recovery by owner and auditor, unopenable garbage delivery, rotation with stale limbs refused); solvency VM and unit tests for deliveries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d solvency (ADR-0007) - AuditorView: per-note failures are reported instead of aborting the scan; origin (proof-enforced / issuer-claimed) counts only ledger inputs holding a note token; HTTP failures are not cached; payroll reads issued notes from the mint history. - NoteWallet balances are BigInteger; the retired-key cheat targets the current generation; rotation stores the new keys before submitting. - DevKit: the evaluator's padding is shared out with BigInteger arithmetic (a long overflow under-provisioned the registry transactions), capped at the protocol maximum; budgets are thread-local. - Solvency: the auditor check requires a live attestation; non-404 lookup failures are errors. - Tests: the 80% gate is asserted on realistic VM transactions; rogue verification keys, receipt-mint negatives, limb-at-2^32, wallet readable-not-mine/unopenable, no secret-path scalarMul in main code, padding arithmetic, and a payroll DevKit E2E. - Payroll tab: payslip history panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…R-0008 M6) A lot UTxO collects up to three sealed bids. Each bid is an elgamal-jubjub-v1 encryption to the auctioneer's possession-verified registry key with a Groth16 proof that reserve <= bid <= deposit, bound to the bidder's key hash, so a bidder cannot withhold its bid. After the window the auctioneer proves in zero knowledge that it decrypted every bid and names the earliest highest one at its price; losing bids are never published. Payouts are tagged (policy, lot token) and paid to exact enterprise addresses; after the settlement deadline anyone can refund. - SealedBidAuction (Julc): open / bid / settle / refund / no-bids, one-shot lot token, vks pinned by hash, deployed as a reference script. - BidProof (7,011 constraints) and SettleProof n = 1..3 (6,950 / 13,330 / 19,710); the decryption relation reuses ZkElGamal.encrypt with the auctioneer's secret (flagged for external review in ADR-0008). - Circuit negatives, VM mutation tests and a DevKit E2E (late bid, copied bid, wrong winner, payouts, refund). Budgets: settle of 3 bids 65.6% VM / 65.8% DevKit of the step limit. - Auction tab, service and endpoints; README, demo.sh, rebuilt bundle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The root build.gradle registers the aggregate tasks (buildAllUsecases, testAllUsecases, ...) but the repository had no root wrapper, so they needed a locally installed Gradle. The wrapper matches the modules' Gradle 9.2.0; gradle-wrapper.jar is the official one (sha256 423cb469…e8d9, as published at services.gradle.org). README: use ./gradlew, and ./gradlew -p <module> for one module's tasks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hot repository ZeroJ's bloxbean-snapshot workflow (run 38048405332, main 458bfb1) publishes commit snapshots to https://repo.bloxbean.org/maven/snapshots. Every usecase build now lists that repository, restricted to snapshots of the org.zeroj group, so the pin resolves without a local ZeroJ publish. 458bfb1 differs from the previous pin 1e78c6f only in ZeroJ's snapshot workflow. The published jars' classes are identical to the 1e78c6f build; the only resource difference is the order of validators in zeroj-onchain-julc's plutus.json (same compiled code and hashes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… stuck "starting")
- bootRun: optimizedLaunch = false. Spring Boot's -XX:TieredStopAtLevel=1
disabled C2, so ZeroJ's point-by-point validation of the cached keys ran
several times slower (note-transfer: 531 s vs 125 s). Other modules in this
repository already set it.
- KeyedCircuit: each cached key file is loaded and validated once per process
and shared (points/payroll share note-transfer and note-redeem, four demos
share key-possession); compileAll loads a demo's circuits in parallel.
Validation itself is unchanged.
- Funding: faucet top-ups are serialized and retried; concurrent demos made
DevKit refuse one ("Topup failed") and payroll failed to start.
- Starting banner: says cached keys are re-validated on every start.
Measured on DevKit: all five demos ready 144 s after Tomcat started (was
~24 min for payroll); payroll and points pay/issue/transfer still prove and
verify with the shared keys.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…what any script accepts Measured on Yaci DevKit (mainnet protocol parameters), before -> after: auction bid 1.184 -> 0.897 ADA, settle (3 bids) 1.377 -> 1.028, open 0.745 -> 0.512, refund 0.678 -> 0.526; note transfer 1.415 -> 1.163, redeem 1.167 -> 0.984; payroll pay run 1.345 -> 1.111; registry init 1.381 -> 1.216. - Key carrier (ADR-0007 r3): the Groth16 verification keys move from every proof redeemer to the inline datum of an output at the script's own address without a reference script (deployed once, separately, because script plus keys exceed the transaction size limit). VkLib reads key i from the reference input at the script's payment credential; the hash check against the pinned parameter is unchanged. The transaction is 1.1-1.6 KB smaller. New VM mutations: no carrier, a carrier of another script, a wrong or rogue key in the carrier. - Constant-cost datum access: typed views (LotFields, EntryFields, CustomerFields) replace loop-based field(d, i); fixed-length checks in isNoteDatum and isLot are unrolled. Same accepted shapes; auction memory about -50%, registry -28%, notes -10 to -29%. - Evaluator margin 25% -> 5% (evaluation is deterministic; the margin is paid on every transaction). - CostProfiler (tests, ZEROJ_PROFILE=true): per-line cost of each validator's honest transaction, from Julc's source-mapped trace. All VM mutation suites and every DevKit E2E pass. The verifier's double point decompression is ZeroJ #84 (PR bloxbean/zeroj#85). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er lags The carrier transaction spends the payer's change from the reference-script deployment confirmed just before it; a stale UTxO view made it fail once on DevKit (payroll E2E). It is retried up to four times, and the E2E tests now print the deployment's failure reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he Jubjub note PRESENTATION.md still described the issue #7 design (Poseidon(vote, nullifier), tallied by trying 0 and 1). JUBJUB_ON_CARDANO.md gave it as "today" and proposed a Pedersen tally, which nobody could decrypt. Both now describe ADR-0005's ElGamal ballot and homomorphic tally. PRESENTATION.pdf is regenerated once the remaining demo sections are updated (ADR-0009 M7). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Audit findings F1–F11 across DPP, NFT gate, airdrop, proof of reserves, voting, vouchers, solvency and the issuer keys, with decisions D1–D11: auditor-co-signed Pedersen passports (the one case where the new primitives help), a sound one-shot nullifier list with a hidden token, holder-chosen personhood ids, salted reserves leaves with locked proof-checked attestations, outref-tagged voucher payments, fresh solvency re-attestation, random persisted role keys, and operator-view APIs. Six review rounds (Codex F-R1–F-R34, Claude F-C1–F-C25); no open P0–P2. Design only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The snapshot of ZeroJ main 6a89f8a (PRs #85/#86, on-chain verifier decompression, on top of everything since pre12), published to the BloxBean snapshot repository by the snapshot workflow, run 38113510199. Verified on this branch: ./gradlew test in all 14 modules (139 tests, 0 failures) and every DevKit E2E (private-voting, pedersen-commitments x6, proof-of-reserves, reusable-kyc, both PlonK examples, the account-ownership prove/verify flow) green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… fix/demo-privacy-hardening
…0009 M5) D2: the list root is one-shot (seed UTxO); a list input is spent only as an InsertNode anchor (exactly one list input, exactly one list mint of quantity 1, no burns); tokens sit in their datum outputs with no reference script; the continuing anchor keeps its lovelace. The new list key is slice(1, 31, n) of the exactly-one 32-byte ZK token, which sits in the new node. ZkProofMintingPolicy takes snapshotRoot and contextId as script parameters. Circuit v2: nullifier = Poseidon(Poseidon(secretKey, tokenName), contextId), 252-bit holder secrets. Registration: one per token, CIP-8 over the domain-tagged (contextId, tokenName, leaf) from the holding address's payment key, freeze at build. D11: random persisted custody wallet. D10: no CORS, no cached witness, operator-view API. VM mutations for every list/ZK rule (each verified to depend on its rule), circuit negatives, registration negatives; unit tests 27/27, DevKit E2E green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…attestations (ADR-0009 M2) D6 (reusable-kyc, account-ownership): both voucher validators pay only outputs whose inline datum is the spent voucher's TxOutRef - the refund to the recipient and the remainder (less at most maxFee) back to the funder; ADA-only vouchers, range-checked terms, combined sum when funder = recipient, 28-byte key hashes; the wallet refuses a remainder below min-UTxO. Closes front-running of the remainder and double satisfaction across vouchers of either validator. D11: identity-kyc and selective-disclosure issuer keys, the solvency exchange wallet and the voting keys are SecureRandom, persisted atomically and owner-only (with a directory fsync), and fail closed on a missing, corrupt or mismatched key. Credentials signed with the old published seeds are refused (VM tests). D5 (private-voting): random full-field voter keys, kept across restarts. D7 (solvency): every attestation redraws salts and blindings and shuffles the entries; the public /api/solvency view no longer pairs customers with their entries (operator view is separate). D8/D10: README limitations (cash-out amounts, auction bounds, custody, replayable gates, account-ownership path privacy), no permissive CORS, compose ports on 127.0.0.1. All module tests and DevKit E2E green (voting, KYC voucher, account-ownership prove/verify, pedersen-commitments x6). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chain-side customer check (ADR-0009 M4)
D4: leaves are Poseidon(Poseidon(idTag, salt), balance), with a fresh
252-bit salt per account per snapshot and a length-prefixed, chunked
idTag fold (vectors for the empty id, 31/32 bytes, leading zeros); the
SolvencyProof circuit and its keys are unchanged (its accountIds
witness is the salted id). ReserveAttestation (multi-validator) mints
exactly {I2OSP8(period): 1} into its own enterprise address with a
strict datum, only if the proof verifies against [reserves, root,
liabilities, 1] from that datum and the custodian signs; the only spend
is a custodian burn after the period ends (bounded validity). The
customer page recomputes the root in the browser (independent JS
Poseidon, same vectors as ZeroJ) and compares it with the attestation
read from Yaci Store, refusing duplicates, burns and stale periods,
failing closed. The attested snapshot survives restarts. D11: random
persisted custodian key. D10: no CORS, operator-view API.
Unit 61, npm 31, DevKit E2E green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… M6)
D1: the old design hashed each measurement with a secret every
manufacturer had to hold (777777 in the source), so a 16-bit value fell
to a 65,536-value search over the mint datum, and the policy let the
manufacturer pick its own threshold. Now the auditor commits each claim
with a pedersen-jubjub-vector-v1 commitment and a fresh 252-bit
blinding and hands the opening to the manufacturer; four annotation
circuits (carbon <=, recycled >=, EU origin, ordered approved
inspections; 2,192/2,192/3,344/5,094 constraints, sentinel-padded
trees) prove each rule against its commitment. DppPassport
(multi-validator) mints exactly {productId: 1} into a locked output at
its own address whose datum holds every attested commitment, with the
manufacturer's and auditor's signatures and the carbon proof against
the pinned threshold (Issue 27.9% CPU); the only spend is an
auditor-signed Revoke burn. The auditor's co-sign guard reserves a
product atomically before signing (TTL, chain-history check, refuses
its own inputs), so one product gets at most one passport. Readers
take sigma from their registry and refuse duplicate passports. D11:
random persisted manufacturer and auditor keys. D10: no measurements in
public endpoints, no CORS, H2 console off. Stale demo-cache setups for
the removed circuits are deleted.
Circuit negatives (constraint-failure asserted, aliased openings), 32
mint and 7 spend VM mutations, brute-force regression, concurrency
tests; 40 tests incl. DevKit E2E green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce faucet (ADR-0009 M3) D3: the holder samples a 252-bit personhoodId and sends the issuer only Poseidon(pid, 0), so the issuer can no longer compute anyone's nullifier; the issuer records each person before signing and refuses a second issuance (circuit unchanged). policyEpoch is a domain tag over the deployment (the full seed TxOutRef) and the round; the policy refuses epoch 0 and epochs >= r. FaucetMintingPolicy requires exactly one mint entry (the proved receipt, quantity 1), the receipt at the exact receipt address (no stake credential), and a payout of at least `payout` to the key hash the proof names. The faucet records each paid nullifier durably before signing, refuses one already recorded or already minted anywhere (asset mint history), and releases a reservation only on a definite rejection with the tx absent from the chain. D11: random persisted issuer and faucet admin keys. D10: no names next to nullifiers, no CORS. VM mutations (payout, recipient, script credential, epoch, extra mint entries of any quantity, stake receipt, old-seed credential), pay-once fault injection, restart tests; 39 tests incl. DevKit E2E green. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PRESENTATION.md (and its PDF, regenerated with pandoc and headless Chrome) describes the NFT gate v2, the auditor-co-signed Pedersen passport, the salted reserves tree with locked attestations, the KYC gate's replayability, and adds the cross-demo properties (no guessable published values; demo custody). demo.sh's nft-ownership --run flow mints a ticket, registers it, builds the snapshot and proves with the secret the server returns. ADR-0009's D6 heading matches its tagged payouts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 of 4 tasks
…ion.properties
The Docker demo images passed -PzerojVersion=${ZEROJ_VERSION}, defaulting to 0.1.0-pre12 in
compose.demo.yml and both Dockerfiles, so ./demo.sh ignored version.properties and built
against an older ZeroJ. The images now copy version.properties and pass -PzerojVersion only
when ZEROJ_VERSION is set.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onfidential-notes-m3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # version.properties
…mo-privacy-hardening Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`*.jar` in .gitignore also excluded gradle/wrapper/gradle-wrapper.jar, so on a fresh clone ./gradlew failed in nine modules and ./demo.sh failed inside the Docker build with "Could not find or load main class org.gradle.wrapper.GradleWrapperMain". .gitignore now re-includes gradle-wrapper.jar. The added jar is the official Gradle 9.2.0 wrapper, generated with the 9.2.0 distribution these modules use; its SHA-256 matches services.gradle.org/distributions/gradle-9.2.0-wrapper.jar.sha256: 423cb469ccc0ecc31f0e4e1c309976198ccb734cdcbb7029d4bda0f18f57e8d9 The five modules that already tracked a jar keep the official Gradle 7.5 wrapper (91a23940…), which runs 9.2.0 as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes privacy and binding flaws in the original demos, under ADR-0009. It is stacked on #9, so merge #8, then #9, then this PR.
The review started from private voting's
Poseidon(vote, nullifier): the nullifier is public and a vote is 0 or 1, so anyone could read every vote. That was fixed in #8. This PR checks every other demo for the same class of flaw:Every finding was checked against the code before it was fixed.
777777). A 16-bit value fell to a 65,536-value search over the mint datum. The manufacturer also chose its own threshold.Poseidon(tokenName, ctx)revealed which NFT, and so which wallet.Poseidon(Poseidon(secret, token), ctx). The event is a script parameter. CIP-8 registration.personhoodId, so it could link every claim to a person. The payout wasn't bound to the recipient.Poseidon(pid, 0). One credential per person. Epoch domain tag. Recipient-bound payout and a pay-once ledger.10000 + i.127.0.0.1.Commits
One commit per milestone:
demo.sh.0.1.0-pre13release pin, Docker demos built fromversion.properties, and the missing Gradle wrapper jars.Review
Test plan
0.1.0-pre13-6a89f8a-SNAPSHOT(ZeroJmain). The branch now pins the released0.1.0-pre13, merged from Private ballots with a homomorphic tally (fixes #7) + Pedersen commitment demos #8; its tagff124c2differs from that snapshot only in ZeroJ's version line../demo.sh proof-of-reserves --clean-cache --runbuilt the Docker image with the0.1.0-pre13jars from Maven Central, and minted a solvent attestation on DevKit (txa10314c9…, block 107640).ZEROJ_YACI_E2E=true ./gradlew testinproof-of-reservespassed 61 tests with 0 failures, including the E2E test../gradlew testwithZEROJ_YACI_E2E=truepasses for every changed module:-Dkyc.e2e=true.-Daor.e2e=true.npm testpasses 31../demo.sh <demo> --clean-cache; each README has the details.Points needing a maintainer decision
🤖 Generated with Claude Code