-
Notifications
You must be signed in to change notification settings - Fork 71
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
Eval framework asserts #714
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #714 +/- ##
==========================================
+ Coverage 90.42% 90.43% +0.01%
==========================================
Files 79 80 +1
Lines 10274 10328 +54
Branches 10274 10328 +54
==========================================
+ Hits 9290 9340 +50
- Misses 901 904 +3
- Partials 83 84 +1 ☔ View full report in Codecov by Sentry. |
5c6bc7a
to
5408ff6
Compare
05452dd
to
86be1d9
Compare
5408ff6
to
58006ae
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.
Reviewed all commit messages.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @spapinistarkware)
crates/prover/src/constraint_framework/mod.rs
line 2 at r1 (raw file):
/// ! This module contains helpers to express and use constraints for components. mod assert;
Is this uses only for tests?
Code quote:
mod assert;
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.
Reviewable status: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @spapinistarkware)
crates/prover/src/constraint_framework/assert.rs
line 38 at r1 (raw file):
offsets.map(|off| { self.trace[interaction][col_index][(self.row as isize + off) .rem_euclid(self.trace[interaction][col_index].len() as isize)
Can you extract this to a variable col_length
?
I think it will make it more clear
Maybe also add a comment that the mask overflows
Code quote:
self.trace[interaction][col_index].len() as isize
crates/prover/src/constraint_framework/assert.rs
line 48 at r1 (raw file):
{ let res = SecureField::one() * constraint; assert_eq!(res, SecureField::zero(), "row: {}", self.row);
Add a comment that we expect this to be zero because we evaluate directly on the trace points.
Not sure if it belongs here or in the doc of AssertEvaluator
Code quote:
assert_eq!(res, SecureField::zero(), "row: {}", self.row);
58006ae
to
5b06d1d
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.
Reviewable status: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @shaharsamocha7)
crates/prover/src/constraint_framework/assert.rs
line 38 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Can you extract this to a variable
col_length
?
I think it will make it more clearMaybe also add a comment that the mask overflows
Done.
crates/prover/src/constraint_framework/assert.rs
line 48 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Add a comment that we expect this to be zero because we evaluate directly on the trace points.
Not sure if it belongs here or in the doc of AssertEvaluator
Done.
crates/prover/src/constraint_framework/mod.rs
line 2 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Is this uses only for tests?
It won't be on production. But very useful for debugging, from experience.
86be1d9
to
1ee181a
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.
Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @spapinistarkware)
crates/prover/src/constraint_framework/assert.rs
line 50 at r2 (raw file):
// Cast to SecureField. let res = SecureField::one() * constraint; // The constraint should be zero at the given row, since we are evaluating on the trace.
non-blocking
Suggestion:
since we are evaluating on the trace domain.
crates/prover/src/constraint_framework/mod.rs
line 2 at r1 (raw file):
Previously, spapinistarkware (Shahar Papini) wrote…
It won't be on production. But very useful for debugging, from experience.
I suggested adding #[cfg(tests)]
5b06d1d
to
4ab884e
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @shaharsamocha7)
crates/prover/src/constraint_framework/mod.rs
line 2 at r1 (raw file):
Previously, shaharsamocha7 wrote…
I suggested adding #[cfg(tests)]
It's useful as a library, so I don't think I want to gate this.
4ab884e
to
95d86d8
Compare
d1f2d95
to
d4bdc02
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.
Reviewed 1 of 1 files at r4.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @spapinistarkware)
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.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @spapinistarkware)
crates/prover/src/constraint_framework/assert.rs
line 55 at r4 (raw file):
} fn combine_ef(values: [Self::F; 4]) -> Self::EF {
Fix
Suggestion:
fn combine_ef(values: [Self::F; SECURE_EXTENSION_DEGREE]) -> Self::EF {
95d86d8
to
fe24074
Compare
d4bdc02
to
7074467
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.
Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @spapinistarkware)
7074467
to
03ac5c2
Compare
Merge activity
|
03ac5c2
to
ef45c3c
Compare
This change is