-
Notifications
You must be signed in to change notification settings - Fork 55
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
QuotientOps #481
QuotientOps #481
Conversation
Your org has enabled the Graphite merge queue for merging into devAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. You must have a Graphite account in order to use the merge queue. Sign up using this link. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## spapini/03-15-domainaccumulator_allows_accumulating_a_row_at_once #481 +/- ##
=====================================================================================================
+ Coverage 95.06% 95.09% +0.03%
=====================================================================================================
Files 61 62 +1
Lines 9130 9195 +65
Branches 9130 9195 +65
=====================================================================================================
+ Hits 8679 8744 +65
Misses 393 393
Partials 58 58 ☔ View full report in Codecov by Sentry. |
fc7d13f
to
8bca9cc
Compare
b2ab31d
to
eb3cd37
Compare
4277202
to
caf8fdd
Compare
383eb39
to
9ff3956
Compare
caf8fdd
to
cce3b3a
Compare
9ff3956
to
84adff0
Compare
cce3b3a
to
eb61e26
Compare
84adff0
to
47f75b0
Compare
eb61e26
to
a781278
Compare
47f75b0
to
94653ae
Compare
a781278
to
0949943
Compare
94653ae
to
fea9b26
Compare
0949943
to
a237cab
Compare
fea9b26
to
83ecff8
Compare
a237cab
to
c995f42
Compare
83ecff8
to
09f6436
Compare
c995f42
to
552036a
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 4 files at r1, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @andrewmilson and @spapinistarkware)
src/core/backend/cpu/quotients.rs
line 17 at r4 (raw file):
fn accumulate_quotients( domain: CircleDomain, mut accum: ColumnAccumulator<'_, Self>,
Shouldn't it be by reference?
Suggestion:
accum: &mut ColumnAccumulator<'_, Self>,
src/core/backend/cpu/quotients.rs
line 30 at r4 (raw file):
let column = &columns[*column_index]; let value = column[row]; numerator = numerator * random_coeff + (value - *open_value);
This should be a line between the value and it's complex conjugate.
Code quote:
*open_value
src/core/backend/cpu/quotients.rs
line 39 at r4 (raw file):
); row_accumlator *= random_coeff.pow(opening.column_indices_and_values.len() as u128)
This should also be fixed.
Code quote:
opening.column_indices_and_values.len() as u128
src/core/commitment_scheme/quotients.rs
line 9 at r4 (raw file):
pub trait QuotientOps: Backend { fn accumulate_quotients(
Document.
Code quote:
fn accumulate_quotients(
src/core/commitment_scheme/quotients.rs
line 18 at r4 (raw file):
} pub struct BatchedColumnOpenings {
Document.
src/core/commitment_scheme/quotients.rs
line 18 at r4 (raw file):
} pub struct BatchedColumnOpenings {
Can we change all open/opening to oods? opening is overloaded.
Suggestion:
BatchedColumnOods
09f6436
to
7eaa305
Compare
552036a
to
8e046cb
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: 1 of 4 files reviewed, 4 unresolved discussions (waiting on @alonh5 and @andrewmilson)
src/core/backend/cpu/quotients.rs
line 30 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
This should be a line between the value and it's complex conjugate.
Done.
src/core/backend/cpu/quotients.rs
line 39 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
This should also be fixed.
Done.
src/core/commitment_scheme/quotients.rs
line 9 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Document.
Done.
src/core/commitment_scheme/quotients.rs
line 18 at r4 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Document.
Done.
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 r5, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @andrewmilson and @spapinistarkware)
src/core/backend/cpu/quotients.rs
line 24 at r5 (raw file):
let mut res = SecureColumn::zeros(domain.size()); for row in 0..domain.size() { let domain_point = domain.at(bit_reverse_index(row, domain.log_size()));
Not for this PR but do you think we should have a more efficient way to iterate over the domain in bit reverse order? Maybe also store an array of points in the domain?
Code quote:
let domain_point = domain.at(bit_reverse_index(row, domain.log_size()));
src/core/backend/cpu/quotients.rs
line 25 at r5 (raw file):
for row in 0..domain.size() { let domain_point = domain.at(bit_reverse_index(row, domain.log_size())); let row_accumlator =
Suggestion:
row_value
src/core/backend/cpu/quotients.rs
line 91 at r5 (raw file):
); let quot_poly_base_field = CPUCircleEvaluation::new(eval_domain, quot_eval.columns[0].clone()).interpolate();
Why are you only testing the first base filed column is in the fft space?
Code quote:
quot_eval.columns[0]
src/core/commitment_scheme/quotients.rs
line 11 at r5 (raw file):
pub trait QuotientOps: Backend { /// Accumulates the quotients of the columns at the given domain. /// For a column f(x), and a point opening (p,v), the quotient is
Suggestion:
sample/sampling
src/core/commitment_scheme/quotients.rs
line 20 at r5 (raw file):
columns: &[&CircleEvaluation<Self, BaseField, BitReversedOrder>], random_coeff: SecureField, openings: &[ColumnSampleBatch],
Suggestion:
samples/samplings
src/core/commitment_scheme/quotients.rs
line 26 at r5 (raw file):
/// A batch of column samplings at a point. pub struct ColumnSampleBatch { /// The point at which the columns are opened.
Suggestion:
sampled.
7eaa305
to
760ccc2
Compare
8e046cb
to
fed4457
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, 5 unresolved discussions (waiting on @alonh5 and @andrewmilson)
src/core/backend/cpu/quotients.rs
line 24 at r5 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Not for this PR but do you think we should have a more efficient way to iterate over the domain in bit reverse order? Maybe also store an array of points in the domain?
We can, it's not super complicated.
src/core/backend/cpu/quotients.rs
line 91 at r5 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Why are you only testing the first base filed column is in the fft space?
Good enough fot the test
src/core/commitment_scheme/quotients.rs
line 11 at r5 (raw file):
pub trait QuotientOps: Backend { /// Accumulates the quotients of the columns at the given domain. /// For a column f(x), and a point opening (p,v), the quotient is
Done.
src/core/commitment_scheme/quotients.rs
line 20 at r5 (raw file):
columns: &[&CircleEvaluation<Self, BaseField, BitReversedOrder>], random_coeff: SecureField, openings: &[ColumnSampleBatch],
Done.
src/core/commitment_scheme/quotients.rs
line 26 at r5 (raw file):
/// A batch of column samplings at a point. pub struct ColumnSampleBatch { /// The point at which the columns are opened.
Done.
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 2 of 2 files at r6, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @andrewmilson and @spapinistarkware)
src/core/backend/cpu/quotients.rs
line 24 at r5 (raw file):
Previously, spapinistarkware (Shahar Papini) wrote…
We can, it's not super complicated.
Add a TODO? You can put it on me
src/core/backend/cpu/quotients.rs
line 14 at r6 (raw file):
use crate::core::poly::BitReversedOrder; use crate::core::utils::bit_reverse_index;
open(ing)
-> sample
in this file too.
fed4457
to
229a2f9
Compare
Merge activity
|
229a2f9
to
872df22
Compare
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)