-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Action circuit #101
Action circuit #101
Conversation
6b443de
to
6bde1a7
Compare
Codecov Report
@@ Coverage Diff @@
## main zcash/orchard#101 +/- ##
==========================================
- Coverage 87.36% 87.13% -0.24%
==========================================
Files 62 63 +1
Lines 6294 7922 +1628
==========================================
+ Hits 5499 6903 +1404
- Misses 795 1019 +224
Continue to review full report at Codecov.
|
d74bf7c
to
73dd71f
Compare
ca15012
to
19bcfa0
Compare
73dd71f
to
e50d757
Compare
8a5f541
to
527963c
Compare
303f6cc
to
645cab3
Compare
2731554
to
8602455
Compare
645cab3
to
ced4d11
Compare
63ecab5
to
6d71190
Compare
ced4d11
to
58fe6fc
Compare
6d71190
to
5c93f76
Compare
58fe6fc
to
cecde82
Compare
f0031b2
to
db607b6
Compare
c9480e5
to
7dd8190
Compare
db607b6
to
312f404
Compare
7dd8190
to
e9393ec
Compare
312f404
to
c100aae
Compare
e9393ec
to
c5a34a1
Compare
5ab9717
to
b3ccd3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flushing comments.
let s = meta.query_selector(selector); | ||
// Addition of two field elements poseidon_hash(nk, rho_old) + psi_old. | ||
let q_add = meta.selector(); | ||
meta.create_gate("poseidon_hash(nk, rho_old) + psi_old", |meta| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could merge this into the same gate as q_orchard
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK for the QEDIT review.
I want to go back and do a more thorough review of the canonicity checks, but that shouldn't block merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One blocking comment, otherwise utACK with various comments and suggestions.
let k_3 = meta.query_advice(advices[5], Rotation::cur()); | ||
|
||
// j = LSB + (2)k_0 + (2^10)k_1 | ||
let j = meta.query_advice(advices[0], Rotation::next()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that we need to witness j
in this region (even though it could be computed here), because we need a cell for this intermediate result that we can constrain to be the input to the decomposition.
Instead of separately witnessing k_1 and equating it to z1_j, we can directly make use of z1_j in the gate. This allows us to fit the region into a 5 x 2 area, improving the layout. Co-authored-by: Jack Grigg <[email protected]>
By rearranging the pieces in the gate, we remove a prev() query and preserve proximity between pieces involved in the same constraint. This commit also includes several minor fixes: - use strict mode for decomposition of j in y-coordinate check; - Name All Polynomial Constraints; - remove point_repr() helper function; - variable renaming and docfixes. Co-authored-by: Jack Grigg <[email protected]>
69957cb
to
7aa3174
Compare
Co-authored-by: Daira Hopwood <[email protected]> Co-authored-by: Jack Grigg <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closes #4. Closes #157. Closes #153.
Canonicity checks for Sinsemilla inputs documented at #134.