-
Notifications
You must be signed in to change notification settings - Fork 808
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
Add base conversion lookup table #215
Conversation
8983bb5
to
601f1af
Compare
@ChihChengLiang feel free to ask for a new review when is ready! :) Will wait until you ask. |
sure, I'm still on the flag and the selector. Will ask for a rereview once complete. |
999c834
to
0f74dc9
Compare
0f74dc9
to
c22d84a
Compare
c22d84a
to
269da24
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.
LGTM. But would like to see @therealyingtong 's opinion on the if/else
containing constraints.
if offset == 0 { | ||
// bind first acc to first coef | ||
region | ||
.constrain_equal(input_acc_cell, input_coef_cell)?; | ||
region.constrain_equal( | ||
output_acc_cell, | ||
output_coef_cell, | ||
)?; | ||
} else if offset == input_coefs.len() - 1 { | ||
region.constrain_equal(input_acc_cell, input.0)?; | ||
return Ok((output_acc_cell, output_acc)); | ||
} |
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.
There's a length missmatch here. 2 constraints in one branch of the if
and 1 in the else
.
Could you confirm if this is an issue @therealyingtong ??
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.
This branches on the offset. Just want a difference on offset 0 and the last offset.
I think what might matter is how can we be sure the prover and the verifier can drive the same number of rows. The answer is they should have exactly bi.slice_count()
rows. input_coefs.len() == output_coefs.len() == bi.slice_count()
. But not sure how to express that here is better.
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.
Branching on the offset looks good to me, since we can deterministically compute that.
e423a07
to
47dbe4b
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.
LGTM
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.
LGTM! Brillian job @ChihChengLiang 😄
Thank you @CPerezz and @therealyingtong for the review! |
Fix #211
TODO