-
Notifications
You must be signed in to change notification settings - Fork 94
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
[kimchi][proof] add zero-knowledge rows in witness #197
Conversation
@@ -5,7 +5,7 @@ This source file implements Plonk circuit constraint primitive. | |||
*****************************************************************************************************************/ |
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.
if #193 goes first, it'll be easier to review this PR as the formatting changes will be gone
maybe before I start fixing all the tests, some feedback from @imeckler @mrmr1993 on the approach? Because I want to make sure that we're not overwriting rows, when randomizing the last 3 rows, I expect the witness to be passed non-padded. This change means that we have to manually pad the witness when we're creating proofs, or double-checking the witness. |
8ac3715
to
b0fc55e
Compare
|
||
// double-check the witness | ||
if cfg!(test) { | ||
index.cs.verify(&witness).expect("incorrect witness"); |
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.
Does cfg!
work in such a way that in production builds this won't run? How is it controlled?
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.
yeah that should be replaced to false
in production/debug build, and replaced to true
when running test. I can remove it if it looks scary though :o
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.
Approved with some questions and nits
cb7c49c
to
eb2de0c
Compare
rebased, fixing remaining tests now |
2fe31d6
to
7ade0ca
Compare
this was previously done on the OCaml side. This is better because the caller doesn't have to think about doing it. To make sure that the caller didn't mess up this part, we now ask the caller to send the unpadded witness columns.
Codecov Report
@@ Coverage Diff @@
## master #197 +/- ##
==========================================
- Coverage 88.90% 88.90% -0.01%
==========================================
Files 74 74
Lines 18212 18248 +36
==========================================
+ Hits 16192 16223 +31
- Misses 2020 2025 +5
Continue to review full report at Codecov.
|
We currently add zero-knowledge rows to the witness on the OCaml side. This is not great as this library might be used by all sorts of people who might not think about adding the zero-knowledge stuff.