Appendix: Action Circuit Gate Constraints
This appendix lists every gate of the Orchard Action circuit: 55 source-level gates holding 193 polynomial constraints in total. Each
polynomial P vanishes on every valid assignment: P=0.
Provenance. The gates are read from the Debug rendering of
the freshly configured (pre-compress_selectors)
halo2_proofs::plonk::ConstraintSystem, emitted by the
dump_action_constraint_system test in the orchard crate and
vendored at
onboarding/data/orchard-action-constraint-system.txt. Unlike the
pinned verifying key, this rendering keeps every
meta.create_gate(...) name, the per-constraint labels passed to
Constraints::with_selector, and the original polynomials before
Halo 2's selector-compression pass rewrites them. To regenerate
after a circuit change, run make appendix-gates from the
onboarding/ directory.
Why this shape. Grouping by source-level gate (rather than by
the compressed fixed column of the verifying key) keeps the doc
next to the code: each gate below is one create_gate call, each
named constraint is one proof obligation, and the polynomial is the
exact expression to formalise. This is the obligation list for
verifying the gates one at a time.
Notation.
- Ac, Ac(+r), Ac(−r): advice column c at the
current row, rotated by +r or −r.
- Fc, Ic: fixed and instance column c (with the same
rotation notation).
- Each constraint is enforced only when the gate's selector is
active. That selector factor is peeled off and shown as
"selector qn" in the heading, so the polynomial below is the
constraint body alone.
- Constants are rendered in hex. Values below
0xffff are shown in
full; larger values are truncated to a six-hex-digit head
followed by \ldots to keep KaTeX readable.
Summary
| # | Gate | Constraints | Source |
|---|
| 1 | Orchard circuit checks | 4 | Action (src/circuit.rs) |
| 2 | Field element addition: c = a + b | 1 | AddChip (src/circuit/gadget/add_chip.rs) |
| 3 | Short lookup bitshift | 1 | EccChip / utilities (halo2_gadgets) |
| 4 | witness point | 2 | EccChip / utilities (halo2_gadgets) |
| 5 | witness non-identity point | 1 | EccChip / utilities (halo2_gadgets) |
| 6 | incomplete addition | 2 | EccChip / utilities (halo2_gadgets) |
| 7 | complete addition | 12 | EccChip / utilities (halo2_gadgets) |
| 8 | q_mul_1 == 1 checks | 1 | EccChip / utilities (halo2_gadgets) |
| 9 | q_mul_2 == 1 checks | 6 | EccChip / utilities (halo2_gadgets) |
| 10 | q_mul_3 == 1 checks | 4 | EccChip / utilities (halo2_gadgets) |
| 11 | q_mul_1 == 1 checks | 1 | EccChip / utilities (halo2_gadgets) |
| 12 | q_mul_2 == 1 checks | 6 | EccChip / utilities (halo2_gadgets) |
| 13 | q_mul_3 == 1 checks | 4 | EccChip / utilities (halo2_gadgets) |
| 14 | Decompose scalar for complete bits of variable-base mul | 2 | EccChip / utilities (halo2_gadgets) |
| 15 | overflow checks | 5 | EccChip / utilities (halo2_gadgets) |
| 16 | LSB check | 3 | EccChip / utilities (halo2_gadgets) |
| 17 | range check | 1 | EccChip / utilities (halo2_gadgets) |
| 18 | Running sum coordinates check | 3 | EccChip / utilities (halo2_gadgets) |
| 19 | Full-width fixed-base scalar mul | 4 | EccChip / utilities (halo2_gadgets) |
| 20 | Short fixed-base mul gate | 4 | EccChip / utilities (halo2_gadgets) |
| 21 | Canonicity checks | 8 | EccChip / utilities (halo2_gadgets) |
| 22 | full round | 3 | PoseidonChip (halo2_gadgets) |
| 23 | partial rounds | 4 | PoseidonChip (halo2_gadgets) |
| 24 | pad-and-add | 3 | PoseidonChip (halo2_gadgets) |
| 25 | Initial y_Q | 1 | SinsemillaChip (halo2_gadgets) |
| 26 | Sinsemilla gate | 2 | SinsemillaChip (halo2_gadgets) |
| 27 | a' = b ⋅ swap + a ⋅ (1-swap) | 3 | MerkleChip (halo2_gadgets) |
| 28 | Decomposition check | 4 | MerkleChip (halo2_gadgets) |
| 29 | Initial y_Q | 1 | SinsemillaChip (halo2_gadgets) |
| 30 | Sinsemilla gate | 2 | SinsemillaChip (halo2_gadgets) |
| 31 | a' = b ⋅ swap + a ⋅ (1-swap) | 3 | MerkleChip (halo2_gadgets) |
| 32 | Decomposition check | 4 | MerkleChip (halo2_gadgets) |
| 33 | CommitIvk canonicity check | 14 | CommitIvkChip (src/circuit/commit_ivk.rs) |
| 34 | NoteCommit MessagePiece b | 3 | NoteCommitChip (src/circuit/note_commit.rs) |
| 35 | NoteCommit MessagePiece d | 3 | NoteCommitChip (src/circuit/note_commit.rs) |
| 36 | NoteCommit MessagePiece e | 1 | NoteCommitChip (src/circuit/note_commit.rs) |
| 37 | NoteCommit MessagePiece g | 2 | NoteCommitChip (src/circuit/note_commit.rs) |
| 38 | NoteCommit MessagePiece h | 2 | NoteCommitChip (src/circuit/note_commit.rs) |
| 39 | NoteCommit input g_d | 5 | NoteCommitChip (src/circuit/note_commit.rs) |
| 40 | NoteCommit input pk_d | 4 | NoteCommitChip (src/circuit/note_commit.rs) |
| 41 | NoteCommit input value | 1 | NoteCommitChip (src/circuit/note_commit.rs) |
| 42 | NoteCommit input rho | 4 | NoteCommitChip (src/circuit/note_commit.rs) |
| 43 | NoteCommit input psi | 5 | NoteCommitChip (src/circuit/note_commit.rs) |
| 44 | y coordinate checks | 7 | NoteCommitChip (src/circuit/note_commit.rs) |
| 45 | NoteCommit MessagePiece b | 3 | NoteCommitChip (src/circuit/note_commit.rs) |
| 46 | NoteCommit MessagePiece d | 3 | NoteCommitChip (src/circuit/note_commit.rs) |
| 47 | NoteCommit MessagePiece e | 1 | NoteCommitChip (src/circuit/note_commit.rs) |
| 48 | NoteCommit MessagePiece g | 2 | NoteCommitChip (src/circuit/note_commit.rs) |
| 49 | NoteCommit MessagePiece h | 2 | NoteCommitChip (src/circuit/note_commit.rs) |
| 50 | NoteCommit input g_d | 5 | NoteCommitChip (src/circuit/note_commit.rs) |
| 51 | NoteCommit input pk_d | 4 | NoteCommitChip (src/circuit/note_commit.rs) |
| 52 | NoteCommit input value | 1 | NoteCommitChip (src/circuit/note_commit.rs) |
| 53 | NoteCommit input rho | 4 | NoteCommitChip (src/circuit/note_commit.rs) |
| 54 | NoteCommit input psi | 5 | NoteCommitChip (src/circuit/note_commit.rs) |
| 55 | y coordinate checks | 7 | NoteCommitChip (src/circuit/note_commit.rs) |
Gates by chip
- Action (src/circuit.rs): gates 1
- AddChip (src/circuit/gadget/add_chip.rs): gates 2
- CommitIvkChip (src/circuit/commit_ivk.rs): gates 33
- EccChip / utilities (halo2_gadgets): gates 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21
- MerkleChip (halo2_gadgets): gates 27, 28, 31, 32
- NoteCommitChip (src/circuit/note_commit.rs): gates 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55
- PoseidonChip (halo2_gadgets): gates 22, 23, 24
- SinsemillaChip (halo2_gadgets): gates 25, 26, 29, 30
Gate 1. Orchard circuit checks
Source: Action (src/circuit.rs). 4 constraints.
v_old - v_new = magnitude * sign (selector q0)
A0+−(A1)+−((A2)⋅(A3))=0
Either v_old = 0, or root = anchor (selector q0)
(A0)⋅(A4+−(A5))=0
v_old = 0 or enable_spends = 1 (selector q0)
(A0)⋅(0x1+−(A6))=0
v_new = 0 or enable_outputs = 1 (selector q0)
(A1)⋅(0x1+−(A7))=0
Gate 2. Field element addition: c = a + b
Source: AddChip (src/circuit/gadget/add_chip.rs). 1 constraint.
constraint 1 (selector q1)
A7+A8+−(A6)=0
Gate 3. Short lookup bitshift
Source: EccChip / utilities (halo2_gadgets). 1 constraint.
constraint 1 (selector q4)
(0x400⋅(A9(−1)))⋅(A9(+1))+−(A9)=0
Gate 4. witness point
Source: EccChip / utilities (halo2_gadgets). 2 constraints.
x == 0 v on_curve
((q5)⋅(A0))⋅((A1)⋅(A1)+−(((A0)⋅(A0))⋅(A0))+−(0x5))=0
y == 0 v on_curve
((q5)⋅(A1))⋅((A1)⋅(A1)+−(((A0)⋅(A0))⋅(A0))+−(0x5))=0
Gate 5. witness non-identity point
Source: EccChip / utilities (halo2_gadgets). 1 constraint.
on_curve (selector q6)
(A1)⋅(A1)+−(((A0)⋅(A0))⋅(A0))+−(0x5)=0
Gate 6. incomplete addition
Source: EccChip / utilities (halo2_gadgets). 2 constraints.
x_r (selector q7)
((A2(+1)+A2+A0)⋅(A0+−(A2)))⋅(A0+−(A2))+−((A1+−(A3))⋅(A1+−(A3)))=0
y_r (selector q7)
(A3(+1)+A3)⋅(A0+−(A2))+−((A1+−(A3))⋅(A2+−(A2(+1))))=0
Gate 7. complete addition
Source: EccChip / utilities (halo2_gadgets). 12 constraints.
1 (selector q8)
(A2+−(A0))⋅((A2+−(A0))⋅(A4)+−(A3+−(A1)))=0
2 (selector q8)
(0x1+−((A2+−(A0))⋅(A5)))⋅(((0x2)⋅(A1))⋅(A4)+−((0x3)⋅((A0)⋅(A0))))=0
3a (selector q8)
(((A0)⋅(A2))⋅(A2+−(A0)))⋅((A4)⋅(A4)+−(A0)+−(A2)+−(A2(+1)))=0
3b (selector q8)
(((A0)⋅(A2))⋅(A2+−(A0)))⋅((A4)⋅(A0+−(A2(+1)))+−(A1)+−(A3(+1)))=0
3c (selector q8)
(((A0)⋅(A2))⋅(A3+A1))⋅((A4)⋅(A4)+−(A0)+−(A2)+−(A2(+1)))=0
3d (selector q8)
(((A0)⋅(A2))⋅(A3+A1))⋅((A4)⋅(A0+−(A2(+1)))+−(A1)+−(A3(+1)))=0
4a (selector q8)
(0x1+−((A0)⋅(A6)))⋅(A2(+1)+−(A2))=0
4b (selector q8)
(0x1+−((A0)⋅(A6)))⋅(A3(+1)+−(A3))=0
5a (selector q8)
(0x1+−((A2)⋅(A7)))⋅(A2(+1)+−(A0))=0
5b (selector q8)
(0x1+−((A2)⋅(A7)))⋅(A3(+1)+−(A1))=0
6a (selector q8)
(0x1+−((A2+−(A0))⋅(A5))+−((A3+A1)⋅(A8)))⋅(A2(+1))=0
6b (selector q8)
(0x1+−((A2+−(A0))⋅(A5))+−((A3+A1)⋅(A8)))⋅(A3(+1))=0
Gate 8. q_mul_1 == 1 checks
Source: EccChip / utilities (halo2_gadgets). 1 constraint.
init y_a (selector q9)
A4+−(0x200000…⋅((A4(+1)+A5(+1))⋅(A3(+1)+−((A4(+1))⋅(A4(+1))+−(A3(+1))+−(A0(+1))))))=0
Gate 9. q_mul_2 == 1 checks
Source: EccChip / utilities (halo2_gadgets). 6 constraints.
x_p_check (selector q10)
A0+−(A0(+1))=0
y_p_check (selector q10)
A1+−(A1(+1))=0
bool_check (selector q10)
(A9+−(0x2⋅(A9(−1))))⋅(0x1+−(A9+−(0x2⋅(A9(−1)))))=0
gradient_1 (selector q10)
(A4)⋅(A3+−(A0))+−(0x200000…⋅((A4+A5)⋅(A3+−((A4)⋅(A4)+−(A3)+−(A0)))))+(0x2⋅(A9+−(0x2⋅(A9(−1))))+−(0x1))⋅(A1)=0
secant_line (selector q10)
(A5)⋅(A5)+−(A3(+1))+−((A4)⋅(A4)+−(A3)+−(A0))+−(A3)=0
gradient_2 (selector q10)
(A5)⋅(A3+−(A3(+1)))+−(0x200000…⋅((A4+A5)⋅(A3+−((A4)⋅(A4)+−(A3)+−(A0)))))+−(0x200000…⋅((A4(+1)+A5(+1))⋅(A3(+1)+−((A4(+1))⋅(A4(+1))+−(A3(+1))+−(A0(+1))))))=0
Gate 10. q_mul_3 == 1 checks
Source: EccChip / utilities (halo2_gadgets). 4 constraints.
bool_check (selector q11)
(A9+−(0x2⋅(A9(−1))))⋅(0x1+−(A9+−(0x2⋅(A9(−1)))))=0
gradient_1 (selector q11)
(A4)⋅(A3+−(A0))+−(0x200000…⋅((A4+A5)⋅(A3+−((A4)⋅(A4)+−(A3)+−(A0)))))+(0x2⋅(A9+−(0x2⋅(A9(−1))))+−(0x1))⋅(A1)=0
secant_line (selector q11)
(A5)⋅(A5)+−(A3(+1))+−((A4)⋅(A4)+−(A3)+−(A0))+−(A3)=0
gradient_2 (selector q11)
(A5)⋅(A3+−(A3(+1)))+−(0x200000…⋅((A4+A5)⋅(A3+−((A4)⋅(A4)+−(A3)+−(A0)))))+−(A4(+1))=0
Gate 11. q_mul_1 == 1 checks
Source: EccChip / utilities (halo2_gadgets). 1 constraint.
init y_a (selector q12)
A8+−(0x200000…⋅((A8(+1)+A2(+1))⋅(A7(+1)+−((A8(+1))⋅(A8(+1))+−(A7(+1))+−(A0(+1))))))=0
Gate 12. q_mul_2 == 1 checks
Source: EccChip / utilities (halo2_gadgets). 6 constraints.
x_p_check (selector q13)
A0+−(A0(+1))=0
y_p_check (selector q13)
A1+−(A1(+1))=0
bool_check (selector q13)
(A6+−(0x2⋅(A6(−1))))⋅(0x1+−(A6+−(0x2⋅(A6(−1)))))=0
gradient_1 (selector q13)
(A8)⋅(A7+−(A0))+−(0x200000…⋅((A8+A2)⋅(A7+−((A8)⋅(A8)+−(A7)+−(A0)))))+(0x2⋅(A6+−(0x2⋅(A6(−1))))+−(0x1))⋅(A1)=0
secant_line (selector q13)
(A2)⋅(A2)+−(A7(+1))+−((A8)⋅(A8)+−(A7)+−(A0))+−(A7)=0
gradient_2 (selector q13)
(A2)⋅(A7+−(A7(+1)))+−(0x200000…⋅((A8+A2)⋅(A7+−((A8)⋅(A8)+−(A7)+−(A0)))))+−(0x200000…⋅((A8(+1)+A2(+1))⋅(A7(+1)+−((A8(+1))⋅(A8(+1))+−(A7(+1))+−(A0(+1))))))=0
Gate 13. q_mul_3 == 1 checks
Source: EccChip / utilities (halo2_gadgets). 4 constraints.
bool_check (selector q14)
(A6+−(0x2⋅(A6(−1))))⋅(0x1+−(A6+−(0x2⋅(A6(−1)))))=0
gradient_1 (selector q14)
(A8)⋅(A7+−(A0))+−(0x200000…⋅((A8+A2)⋅(A7+−((A8)⋅(A8)+−(A7)+−(A0)))))+(0x2⋅(A6+−(0x2⋅(A6(−1))))+−(0x1))⋅(A1)=0
secant_line (selector q14)
(A2)⋅(A2)+−(A7(+1))+−((A8)⋅(A8)+−(A7)+−(A0))+−(A7)=0
gradient_2 (selector q14)
(A2)⋅(A7+−(A7(+1)))+−(0x200000…⋅((A8+A2)⋅(A7+−((A8)⋅(A8)+−(A7)+−(A0)))))+−(A8(+1))=0
Gate 14. Decompose scalar for complete bits of variable-base mul
Source: EccChip / utilities (halo2_gadgets). 2 constraints.
bool_check (selector q15)
(A9(+1)+−((0x2)⋅(A9(−1))))⋅(0x1+−(A9(+1)+−((0x2)⋅(A9(−1)))))=0
y_switch (selector q15)
(A9(+1)+−((0x2)⋅(A9(−1))))⋅(A9+−(A1(−1)))+(0x1+−(A9(+1)+−((0x2)⋅(A9(−1)))))⋅(A9+A1(−1))=0
Gate 15. overflow checks
Source: EccChip / utilities (halo2_gadgets). 5 constraints.
s_check (selector q16)
A8+−(A7+(A7(−1))⋅((0x100000…)⋅(0x40)))=0
recovery (selector q16)
A6(−1)+−(A7)+−(0x224698…)=0
lo_zero (selector q16)
(A7(−1))⋅(A6+−(0x100000…))=0
s_minus_lo_130_check (selector q16)
(A7(−1))⋅(A7(+1))=0
canonicity (selector q16)
((0x1+−(A7(−1)))⋅(0x1+−((A6)⋅(A6(+1)))))⋅(A7(+1))=0
Gate 16. LSB check
Source: EccChip / utilities (halo2_gadgets). 3 constraints.
bool_check (selector q17)
(A9(+1)+−(0x2⋅(A9)))⋅(0x1+−(A9(+1)+−(0x2⋅(A9))))=0
lsb_x (selector q17)
(A9(+1)+−(0x2⋅(A9)))⋅(A0)+(0x1+−(A9(+1)+−(0x2⋅(A9))))⋅(A0+−(A0(+1)))=0
lsb_y (selector q17)
(A9(+1)+−(0x2⋅(A9)))⋅(A1)+(0x1+−(A9(+1)+−(0x2⋅(A9))))⋅(A1+A1(+1))=0
Gate 17. range check
Source: EccChip / utilities (halo2_gadgets). 1 constraint.
constraint 1 (selector q18)
(((((((A4+−(0x8⋅(A4(+1))))⋅(0x1+−(A4+−(0x8⋅(A4(+1))))))⋅(0x2+−(A4+−(0x8⋅(A4(+1))))))⋅(0x3+−(A4+−(0x8⋅(A4(+1))))))⋅(0x4+−(A4+−(0x8⋅(A4(+1))))))⋅(0x5+−(A4+−(0x8⋅(A4(+1))))))⋅(0x6+−(A4+−(0x8⋅(A4(+1))))))⋅(0x7+−(A4+−(0x8⋅(A4(+1)))))=0
Gate 18. Running sum coordinates check
Source: EccChip / utilities (halo2_gadgets). 3 constraints.
check x (selector q18)
0+(0x1)⋅(F3)+((0x1)⋅(A4+−(0x8⋅(A4(+1)))))⋅(F4)+(((0x1)⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(F5)+((((0x1)⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(F6)+(((((0x1)⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(F7)+((((((0x1)⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(F8)+(((((((0x1)⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(F9)+((((((((0x1)⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(A4+−(0x8⋅(A4(+1)))))⋅(F10)+−(A0)=0
check y (selector q18)
(A5)⋅(A5)+−(A1)+−(F11)=0
on-curve (selector q18)
(A1)⋅(A1)+−(((A0)⋅(A0))⋅(A0))+−(0x5)=0
Gate 19. Full-width fixed-base scalar mul
Source: EccChip / utilities (halo2_gadgets). 4 constraints.
check x (selector q19)
0+(0x1)⋅(F3)+((0x1)⋅(A4))⋅(F4)+(((0x1)⋅(A4))⋅(A4))⋅(F5)+((((0x1)⋅(A4))⋅(A4))⋅(A4))⋅(F6)+(((((0x1)⋅(A4))⋅(A4))⋅(A4))⋅(A4))⋅(F7)+((((((0x1)⋅(A4))⋅(A4))⋅(A4))⋅(A4))⋅(A4))⋅(F8)+(((((((0x1)⋅(A4))⋅(A4))⋅(A4))⋅(A4))⋅(A4))⋅(A4))⋅(F9)+((((((((0x1)⋅(A4))⋅(A4))⋅(A4))⋅(A4))⋅(A4))⋅(A4))⋅(A4))⋅(F10)+−(A0)=0
check y (selector q19)
(A5)⋅(A5)+−(A1)+−(F11)=0
on-curve (selector q19)
(A1)⋅(A1)+−(((A0)⋅(A0))⋅(A0))+−(0x5)=0
window range check (selector q19)
(((((((A4)⋅(0x1+−(A4)))⋅(0x2+−(A4)))⋅(0x3+−(A4)))⋅(0x4+−(A4)))⋅(0x5+−(A4)))⋅(0x6+−(A4)))⋅(0x7+−(A4))=0
Gate 20. Short fixed-base mul gate
Source: EccChip / utilities (halo2_gadgets). 4 constraints.
last_window_check (selector q20)
(A5)⋅(0x1+−(A5))=0
sign_check (selector q20)
(A4)⋅(A4)+−(0x1)=0
y_check (selector q20)
(A1+−(A3))⋅(A1+A3)=0
negation_check (selector q20)
(A4)⋅(A1)+−(A3)=0
Gate 21. Canonicity checks
Source: EccChip / utilities (halo2_gadgets). 8 constraints.
MSB = 1 => alpha_1 = 0 (selector q21)
(A8)⋅(A7)=0
MSB = 1 => alpha_0_hi_120 = 0 (selector q21)
(A8)⋅(A7(+1)+−((A8(−1))⋅(0x100000…)))=0
MSB = 1 => a_43 = 0 or 1 (selector q21)
(A8)⋅((A8(+1)+−(0x8⋅(A7(+1))))⋅(0x1+−(A8(+1)+−(0x8⋅(A7(+1))))))=0
MSB = 1 => z_13_alpha_0_prime = 0 (selector q21)
(A8)⋅(A6(+1))=0
alpha_1_range_check (selector q21)
(((A7)⋅(0x1+−(A7)))⋅(0x2+−(A7)))⋅(0x3+−(A7))=0
alpha_2_range_check (selector q21)
(A8)⋅(0x1+−(A8))=0
z_84_alpha_check (selector q21)
A8(−1)+−(A7+0x4⋅(A8))=0
alpha_0_prime check (selector q21)
A6+−(A6(−1)+−(0x100000…⋅(A8(−1)))+0x400000…+−(0x224698…))=0
Gate 22. full round
Source: PoseidonChip (halo2_gadgets). 3 constraints.
constraint 1 (selector q22)
0xab5e5b…⋅((((A6+F5)⋅(A6+F5))⋅((A6+F5)⋅(A6+F5)))⋅(A6+F5))+0x319166…⋅((((A7+F6)⋅(A7+F6))⋅((A7+F6)⋅(A7+F6)))⋅(A7+F6))+0x7c045d…⋅((((A8+F7)⋅(A8+F7))⋅((A8+F7)⋅(A8+F7)))⋅(A8+F7))+−(A6(+1))=0
constraint 2 (selector q22)
0x233162…⋅((((A6+F5)⋅(A6+F5))⋅((A6+F5)⋅(A6+F5)))⋅(A6+F5))+0x25cae2…⋅((((A7+F6)⋅(A7+F6))⋅((A7+F6)⋅(A7+F6)))⋅(A7+F6))+0x22f5b5…⋅((((A8+F7)⋅(A8+F7))⋅((A8+F7)⋅(A8+F7)))⋅(A8+F7))+−(A7(+1))=0
constraint 3 (selector q22)
0x2e29dd…⋅((((A6+F5)⋅(A6+F5))⋅((A6+F5)⋅(A6+F5)))⋅(A6+F5))+0x1d1aab…⋅((((A7+F6)⋅(A7+F6))⋅((A7+F6)⋅(A7+F6)))⋅(A7+F6))+0x3bf763…⋅((((A8+F7)⋅(A8+F7))⋅((A8+F7)⋅(A8+F7)))⋅(A8+F7))+−(A8(+1))=0
Gate 23. partial rounds
Source: PoseidonChip (halo2_gadgets). 4 constraints.
constraint 1 (selector q23)
(((A6+F5)⋅(A6+F5))⋅((A6+F5)⋅(A6+F5)))⋅(A6+F5)+−(A5)=0
constraint 2 (selector q23)
(((0xab5e5b…⋅(A5)+0x319166…⋅(A7+F6)+0x7c045d…⋅(A8+F7)+F8)⋅(0xab5e5b…⋅(A5)+0x319166…⋅(A7+F6)+0x7c045d…⋅(A8+F7)+F8))⋅((0xab5e5b…⋅(A5)+0x319166…⋅(A7+F6)+0x7c045d…⋅(A8+F7)+F8)⋅(0xab5e5b…⋅(A5)+0x319166…⋅(A7+F6)+0x7c045d…⋅(A8+F7)+F8)))⋅(0xab5e5b…⋅(A5)+0x319166…⋅(A7+F6)+0x7c045d…⋅(A8+F7)+F8)+−(0x2cc057…⋅(A6(+1))+0x32e7c4…⋅(A7(+1))+0x2eae5d…⋅(A8(+1)))=0
constraint 3 (selector q23)
0x233162…⋅(A5)+0x25cae2…⋅(A7+F6)+0x22f5b5…⋅(A8+F7)+F9+−(0x7bf368…⋅(A6(+1))+0x2aec69…⋅(A7(+1))+0x952e02…⋅(A8(+1)))=0
constraint 4 (selector q23)
0x2e29dd…⋅(A5)+0x1d1aab…⋅(A7+F6)+0x3bf763…⋅(A8+F7)+F10+−(0x2fcbba…⋅(A6(+1))+0x1ec737…⋅(A7(+1))+0xd0c2ef…⋅(A8(+1)))=0
Gate 24. pad-and-add
Source: PoseidonChip (halo2_gadgets). 3 constraints.
constraint 1 (selector q24)
A6(−1)+A6+−(A6(+1))=0
constraint 2 (selector q24)
A7(−1)+A7+−(A7(+1))=0
constraint 3 (selector q24)
A8(−1)+−(A8(+1))=0
Gate 25. Initial y_Q
Source: SinsemillaChip (halo2_gadgets). 1 constraint.
init_y_q_check (selector q26)
0x2⋅(F3)+−((A3+A4)⋅(A0+−((A3)⋅(A3)+−(A0)+−(A1))))=0
Gate 26. Sinsemilla gate
Source: SinsemillaChip (halo2_gadgets). 2 constraints.
Secant line (selector q25)
(A4)⋅(A4)+−(A0(+1)+(A3)⋅(A3)+−(A0)+−(A1)+A0)=0
y check (selector q25)
(0x4⋅(A4))⋅(A0+−(A0(+1)))+−(0x2⋅((A3+A4)⋅(A0+−((A3)⋅(A3)+−(A0)+−(A1))))+(0x2+−((F12)⋅(F12+−(0x1))))⋅((A3(+1)+A4(+1))⋅(A0(+1)+−((A3(+1))⋅(A3(+1))+−(A0(+1))+−(A1(+1)))))+(0x2⋅((F12)⋅(F12+−(0x1))))⋅(A3(+1)))=0
Gate 27. a' = b ⋅ swap + a ⋅ (1-swap)
Source: MerkleChip (halo2_gadgets). 3 constraints.
a check (selector q27)
A2+−((A4)⋅(A1)+(0x1+−(A4))⋅(A0))=0
b check (selector q27)
A3+−((A4)⋅(A0)+(0x1+−(A4))⋅(A1))=0
swap is bool (selector q27)
(A4)⋅(0x1+−(A4))=0
Gate 28. Decomposition check
Source: MerkleChip (halo2_gadgets). 4 constraints.
l_check (selector q28)
A0+−(0x400⋅(A0(+1)))+−(A4(+1))=0
left_check (selector q28)
A0(+1)+0x100000…⋅(A1+−(0x400⋅(A1(+1)))+0x400⋅(A2(+1)))+−(A3)=0
right_check (selector q28)
A3(+1)+0x20⋅(A2)+−(A4)=0
b1_b2_check (selector q28)
A1(+1)+−(A2(+1)+0x20⋅(A3(+1)))=0
Gate 29. Initial y_Q
Source: SinsemillaChip (halo2_gadgets). 1 constraint.
init_y_q_check (selector q30)
0x2⋅(F4)+−((A8+A9)⋅(A5+−((A8)⋅(A8)+−(A5)+−(A6))))=0
Gate 30. Sinsemilla gate
Source: SinsemillaChip (halo2_gadgets). 2 constraints.
Secant line (selector q29)
(A9)⋅(A9)+−(A5(+1)+(A8)⋅(A8)+−(A5)+−(A6)+A5)=0
y check (selector q29)
(0x4⋅(A9))⋅(A5+−(A5(+1)))+−(0x2⋅((A8+A9)⋅(A5+−((A8)⋅(A8)+−(A5)+−(A6))))+(0x2+−((F13)⋅(F13+−(0x1))))⋅((A8(+1)+A9(+1))⋅(A5(+1)+−((A8(+1))⋅(A8(+1))+−(A5(+1))+−(A6(+1)))))+(0x2⋅((F13)⋅(F13+−(0x1))))⋅(A8(+1)))=0
Gate 31. a' = b ⋅ swap + a ⋅ (1-swap)
Source: MerkleChip (halo2_gadgets). 3 constraints.
a check (selector q31)
A7+−((A9)⋅(A6)+(0x1+−(A9))⋅(A5))=0
b check (selector q31)
A8+−((A9)⋅(A5)+(0x1+−(A9))⋅(A6))=0
swap is bool (selector q31)
(A9)⋅(0x1+−(A9))=0
Gate 32. Decomposition check
Source: MerkleChip (halo2_gadgets). 4 constraints.
l_check (selector q32)
A5+−(0x400⋅(A5(+1)))+−(A9(+1))=0
left_check (selector q32)
A5(+1)+0x100000…⋅(A6+−(0x400⋅(A6(+1)))+0x400⋅(A7(+1)))+−(A8)=0
right_check (selector q32)
A8(+1)+0x20⋅(A7)+−(A9)=0
b1_b2_check (selector q32)
A6(+1)+−(A7(+1)+0x20⋅(A8(+1)))=0
Gate 33. CommitIvk canonicity check
Source: CommitIvkChip (src/circuit/commit_ivk.rs). 14 constraints.
b1_bool_check (selector q33)
(A4)⋅(0x1+−(A4))=0
d1_bool_check (selector q33)
(A4(+1))⋅(0x1+−(A4(+1)))=0
b_decomposition_check (selector q33)
A2+−(A3+0x10⋅(A4)+0x20⋅(A5))=0
d_decomposition_check (selector q33)
A2(+1)+−(A3(+1)+0x200⋅(A4(+1)))=0
ak_decomposition_check (selector q33)
A1+0x400000…⋅(A3)+0x400000…⋅(A4)+−(A0)=0
nk_decomposition_check (selector q33)
A5+0x20⋅(A1(+1))+0x200000…⋅(A3(+1))+0x400000…⋅(A4(+1))+−(A0(+1))=0
b0_canon_check (selector q33)
(A4)⋅(A3)=0
z13_a_check (selector q33)
(A4)⋅(A6)=0
a_prime_check (selector q33)
A1+0x400000…+−(0x224698…)+−(A7)=0
z13_a_prime (selector q33)
(A4)⋅(A8)=0
c0_canon_check (selector q33)
(A4(+1))⋅(A3(+1))=0
z13_c_check (selector q33)
(A4(+1))⋅(A6(+1))=0
b2_c_prime_check (selector q33)
A5+0x20⋅(A1(+1))+0x100000…+−(0x224698…)+−(A7(+1))=0
z14_b2_c_prime (selector q33)
(A4(+1))⋅(A8(+1))=0
Gate 34. NoteCommit MessagePiece b
Source: NoteCommitChip (src/circuit/note_commit.rs). 3 constraints.
bool_check b_1 (selector q34)
(A8)⋅(0x1+−(A8))=0
bool_check b_2 (selector q34)
(A7(+1))⋅(0x1+−(A7(+1)))=0
decomposition (selector q34)
A6+−(A7+0x10⋅(A8)+0x20⋅(A7(+1))+0x40⋅(A8(+1)))=0
Gate 35. NoteCommit MessagePiece d
Source: NoteCommitChip (src/circuit/note_commit.rs). 3 constraints.
bool_check d_0 (selector q35)
(A7)⋅(0x1+−(A7))=0
bool_check d_1 (selector q35)
(A8)⋅(0x1+−(A8))=0
decomposition (selector q35)
A6+−(A7+0x2⋅(A8)+0x4⋅(A7(+1))+0x400⋅(A8(+1)))=0
Gate 36. NoteCommit MessagePiece e
Source: NoteCommitChip (src/circuit/note_commit.rs). 1 constraint.
decomposition (selector q36)
A6+−(A7+0x40⋅(A8))=0
Gate 37. NoteCommit MessagePiece g
Source: NoteCommitChip (src/circuit/note_commit.rs). 2 constraints.
bool_check g_0 (selector q37)
(A7)⋅(0x1+−(A7))=0
decomposition (selector q37)
A6+−(A7+0x2⋅(A6(+1))+0x400⋅(A7(+1)))=0
Gate 38. NoteCommit MessagePiece h
Source: NoteCommitChip (src/circuit/note_commit.rs). 2 constraints.
bool_check h_1 (selector q38)
(A8)⋅(0x1+−(A8))=0
decomposition (selector q38)
A6+−(A7+0x20⋅(A8))=0
Source: NoteCommitChip (src/circuit/note_commit.rs). 5 constraints.
decomposition (selector q39)
A8+0x400000…⋅(A7)+0x400000…⋅(A7(+1))+−(A6)=0
a_prime_check (selector q39)
A8+0x400000…+−(0x224698…)+−(A8(+1))=0
b_1 = 1 => b_0 (selector q39)
(A7(+1))⋅(A7)=0
b_1 = 1 => z13_a (selector q39)
(A7(+1))⋅(A9)=0
b_1 = 1 => z13_a_prime (selector q39)
(A7(+1))⋅(A9(+1))=0
Source: NoteCommitChip (src/circuit/note_commit.rs). 4 constraints.
decomposition (selector q40)
A7+0x10⋅(A8)+0x400000…⋅(A7(+1))+−(A6)=0
b3_c_prime_check (selector q40)
A7+0x10⋅(A8)+0x100000…+−(0x224698…)+−(A8(+1))=0
d_0 = 1 => z13_c (selector q40)
(A7(+1))⋅(A9)=0
d_0 = 1 => z14_b3_c_prime (selector q40)
(A7(+1))⋅(A9(+1))=0
Source: NoteCommitChip (src/circuit/note_commit.rs). 1 constraint.
value_check (selector q41)
A7+0x100⋅(A8)+0x400000…⋅(A9)+−(A6)=0
Source: NoteCommitChip (src/circuit/note_commit.rs). 4 constraints.
decomposition (selector q42)
A7+0x10⋅(A8)+0x400000…⋅(A7(+1))+−(A6)=0
e1_f_prime_check (selector q42)
A7+0x10⋅(A8)+0x100000…+−(0x224698…)+−(A8(+1))=0
g_0 = 1 => z13_f (selector q42)
(A7(+1))⋅(A9)=0
g_0 = 1 => z14_e1_f_prime (selector q42)
(A7(+1))⋅(A9(+1))=0
Source: NoteCommitChip (src/circuit/note_commit.rs). 5 constraints.
decomposition (selector q43)
A7+0x200⋅(A8)+0x200000…⋅(A6(+1))+0x400000…⋅(A7(+1))+−(A6)=0
g1_g2_prime_check (selector q43)
A7+0x200⋅(A8)+0x400000…+−(0x224698…)+−(A8(+1))=0
h_1 = 1 => h_0 (selector q43)
(A7(+1))⋅(A6(+1))=0
h_1 = 1 => z13_g (selector q43)
(A7(+1))⋅(A9)=0
h_1 = 1 => z13_g1_g2_prime (selector q43)
(A7(+1))⋅(A9(+1))=0
Gate 44. y coordinate checks
Source: NoteCommitChip (src/circuit/note_commit.rs). 7 constraints.
k3_check (selector q44)
(A9)⋅(0x1+−(A9))=0
j_check (selector q44)
A5(+1)+−(A6+0x2⋅(A7)+0x400⋅(A6(+1)))=0
y_check (selector q44)
A5+−(A5(+1)+0x400000…⋅(A8)+0x400000…⋅(A9))=0
j_prime_check (selector q44)
A5(+1)+0x400000…+−(0x224698…)+−(A8(+1))=0
k_3 = 1 => k_2 = 0 (selector q44)
(A9)⋅(A8)=0
k_3 = 1 => z13_j = 0 (selector q44)
(A9)⋅(A7(+1))=0
k_3 = 1 => z13_j_prime = 0 (selector q44)
(A9)⋅(A9(+1))=0
Gate 45. NoteCommit MessagePiece b
Source: NoteCommitChip (src/circuit/note_commit.rs). 3 constraints.
bool_check b_1 (selector q45)
(A8)⋅(0x1+−(A8))=0
bool_check b_2 (selector q45)
(A7(+1))⋅(0x1+−(A7(+1)))=0
decomposition (selector q45)
A6+−(A7+0x10⋅(A8)+0x20⋅(A7(+1))+0x40⋅(A8(+1)))=0
Gate 46. NoteCommit MessagePiece d
Source: NoteCommitChip (src/circuit/note_commit.rs). 3 constraints.
bool_check d_0 (selector q46)
(A7)⋅(0x1+−(A7))=0
bool_check d_1 (selector q46)
(A8)⋅(0x1+−(A8))=0
decomposition (selector q46)
A6+−(A7+0x2⋅(A8)+0x4⋅(A7(+1))+0x400⋅(A8(+1)))=0
Gate 47. NoteCommit MessagePiece e
Source: NoteCommitChip (src/circuit/note_commit.rs). 1 constraint.
decomposition (selector q47)
A6+−(A7+0x40⋅(A8))=0
Gate 48. NoteCommit MessagePiece g
Source: NoteCommitChip (src/circuit/note_commit.rs). 2 constraints.
bool_check g_0 (selector q48)
(A7)⋅(0x1+−(A7))=0
decomposition (selector q48)
A6+−(A7+0x2⋅(A6(+1))+0x400⋅(A7(+1)))=0
Gate 49. NoteCommit MessagePiece h
Source: NoteCommitChip (src/circuit/note_commit.rs). 2 constraints.
bool_check h_1 (selector q49)
(A8)⋅(0x1+−(A8))=0
decomposition (selector q49)
A6+−(A7+0x20⋅(A8))=0
Source: NoteCommitChip (src/circuit/note_commit.rs). 5 constraints.
decomposition (selector q50)
A8+0x400000…⋅(A7)+0x400000…⋅(A7(+1))+−(A6)=0
a_prime_check (selector q50)
A8+0x400000…+−(0x224698…)+−(A8(+1))=0
b_1 = 1 => b_0 (selector q50)
(A7(+1))⋅(A7)=0
b_1 = 1 => z13_a (selector q50)
(A7(+1))⋅(A9)=0
b_1 = 1 => z13_a_prime (selector q50)
(A7(+1))⋅(A9(+1))=0
Source: NoteCommitChip (src/circuit/note_commit.rs). 4 constraints.
decomposition (selector q51)
A7+0x10⋅(A8)+0x400000…⋅(A7(+1))+−(A6)=0
b3_c_prime_check (selector q51)
A7+0x10⋅(A8)+0x100000…+−(0x224698…)+−(A8(+1))=0
d_0 = 1 => z13_c (selector q51)
(A7(+1))⋅(A9)=0
d_0 = 1 => z14_b3_c_prime (selector q51)
(A7(+1))⋅(A9(+1))=0
Source: NoteCommitChip (src/circuit/note_commit.rs). 1 constraint.
value_check (selector q52)
A7+0x100⋅(A8)+0x400000…⋅(A9)+−(A6)=0
Source: NoteCommitChip (src/circuit/note_commit.rs). 4 constraints.
decomposition (selector q53)
A7+0x10⋅(A8)+0x400000…⋅(A7(+1))+−(A6)=0
e1_f_prime_check (selector q53)
A7+0x10⋅(A8)+0x100000…+−(0x224698…)+−(A8(+1))=0
g_0 = 1 => z13_f (selector q53)
(A7(+1))⋅(A9)=0
g_0 = 1 => z14_e1_f_prime (selector q53)
(A7(+1))⋅(A9(+1))=0
Source: NoteCommitChip (src/circuit/note_commit.rs). 5 constraints.
decomposition (selector q54)
A7+0x200⋅(A8)+0x200000…⋅(A6(+1))+0x400000…⋅(A7(+1))+−(A6)=0
g1_g2_prime_check (selector q54)
A7+0x200⋅(A8)+0x400000…+−(0x224698…)+−(A8(+1))=0
h_1 = 1 => h_0 (selector q54)
(A7(+1))⋅(A6(+1))=0
h_1 = 1 => z13_g (selector q54)
(A7(+1))⋅(A9)=0
h_1 = 1 => z13_g1_g2_prime (selector q54)
(A7(+1))⋅(A9(+1))=0
Gate 55. y coordinate checks
Source: NoteCommitChip (src/circuit/note_commit.rs). 7 constraints.
k3_check (selector q55)
(A9)⋅(0x1+−(A9))=0
j_check (selector q55)
A5(+1)+−(A6+0x2⋅(A7)+0x400⋅(A6(+1)))=0
y_check (selector q55)
A5+−(A5(+1)+0x400000…⋅(A8)+0x400000…⋅(A9))=0
j_prime_check (selector q55)
A5(+1)+0x400000…+−(0x224698…)+−(A8(+1))=0
k_3 = 1 => k_2 = 0 (selector q55)
(A9)⋅(A8)=0
k_3 = 1 => z13_j = 0 (selector q55)
(A9)⋅(A7(+1))=0
k_3 = 1 => z13_j_prime = 0 (selector q55)
(A9)⋅(A9(+1))=0