Skip to content

Align delegation circuit with ZIP spec (dom, value=1, remove is_real)#9

Merged
czarcas7ic merged 1 commit into
mainfrom
adam/zip-spec-delegation-alignment
Mar 24, 2026
Merged

Align delegation circuit with ZIP spec (dom, value=1, remove is_real)#9
czarcas7ic merged 1 commit into
mainfrom
adam/zip-spec-delegation-alignment

Conversation

@czarcas7ic

Copy link
Copy Markdown
Collaborator

Summary

Three changes to align with zcash/zips#1199 review:

  • Change 1: Governance nullifier → alternate nullifier with explicit dom public input (14th instance field). dom = Poseidon("governance authorization", vote_round_id) derived out-of-circuit. In-circuit: Poseidon(nk, dom, real_nf) with ConstantLength<3>.
  • Change 2: Dummy signed note value 0 → 1 to match PCZT construction (ZIP §Dummy Signed Note).
  • Change 3: Replace is_note_real with v * (root - anchor) = 0 — Orchard's standard dummy note mechanism (ZIP §Note Padding). Removes condition 15.

Merge order

This PR has no dependencies. Merge first — librustvoting and vote-sdk PRs depend on these changes.

Three changes to align with zcash/zips#1199:

1. Governance nullifier → alternate nullifier with explicit dom public
   input (14th instance field). dom = Poseidon("governance authorization",
   vote_round_id) derived out-of-circuit. In-circuit: Poseidon(nk, dom,
   real_nf) with ConstantLength<3>.

2. Dummy signed note value 0 → 1 to match PCZT construction.

3. Replace is_note_real with v * (root - anchor) = 0 (Orchard standard
   dummy note mechanism). Remove condition 15.
@czarcas7ic czarcas7ic merged commit 7605ae7 into main Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants