-
Notifications
You must be signed in to change notification settings - Fork 93
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
Move SecureColumn #478
Move SecureColumn #478
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## spapini/03-13-Use_only_canonic_domains #478 +/- ##
=======================================================================
Coverage 95.43% 95.43%
=======================================================================
Files 59 59
Lines 8699 8699
Branches 8699 8699
=======================================================================
Hits 8302 8302
Misses 347 347
Partials 50 50 ☔ View full report in Codecov by Sentry. |
42484b9
to
3f034ed
Compare
f99ca0d
to
247bcf4
Compare
5e49e75
to
40d089e
Compare
42092e2
to
7f63d38
Compare
40d089e
to
9f08ca3
Compare
7f63d38
to
69b2fb9
Compare
9f08ca3
to
047bfc4
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: 5 of 8 files reviewed, 1 unresolved discussion (waiting on @alonh5 and @shaharsamocha7)
a discussion (no related file):
Previously, shaharsamocha7 wrote…
Is fields/secure.rs the correct place for that logic?
Seems like this is a different field from qm31.Also the logic here fits under poly dir, WDYT?
It's not just for poly. SecureColumn is for any column of secure fields.
It's the same field as qm31, but it's more of gadgets on top of it.
Not sure where is best to put it
69b2fb9
to
6c0f065
Compare
047bfc4
to
5d7cd1c
Compare
6c0f065
to
38b36f9
Compare
5d7cd1c
to
f8a5bf2
Compare
38b36f9
to
2b184d6
Compare
f8a5bf2
to
07d5de1
Compare
2b184d6
to
4dc88e9
Compare
07d5de1
to
2f3df09
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 3 files at r2, all commit messages.
Reviewable status: 6 of 8 files reviewed, 5 unresolved discussions (waiting on @alonh5 and @spapinistarkware)
src/core/fields/secure.rs
line 12 at r2 (raw file):
pub const SECURE_EXTENSION_DEGREE: usize = <SecureField as ExtensionOf<BaseField>>::EXTENSION_DEGREE;
You have a const here
Line 11 in e3167b0
pub const SECURE_FIELD_EXTENSION_DEGREE: usize = 4; |
Maybe those can be combined?
Code quote:
pub const SECURE_EXTENSION_DEGREE: usize =
<SecureField as ExtensionOf<BaseField>>::EXTENSION_DEGREE;
src/core/fields/secure.rs
line 14 at r2 (raw file):
<SecureField as ExtensionOf<BaseField>>::EXTENSION_DEGREE; pub struct SecureColumn<B: Backend> {
Document
Code quote:
pub struct SecureColumn<B: Backend> {
src/core/fields/secure.rs
line 15 at r2 (raw file):
pub struct SecureColumn<B: Backend> { pub cols: [Col<B, BaseField>; SECURE_EXTENSION_DEGREE],
Suggestion:
pub columns: [Col<B, BaseField>; SECURE_EXTENSION_DEGREE],
src/core/fields/secure.rs
line 45 at r2 (raw file):
} pub struct SecureCirclePoly(pub [CPUCirclePoly; SECURE_EXTENSION_DEGREE]);
I think that the previous place of that part of this file was better.
Code quote:
pub struct SecureCirclePoly(pub [CPUCirclePoly; SECURE_EXTENSION_DEGREE]);
src/core/fields/secure.rs
line 71 at r2 (raw file):
} pub fn combine_secure_value(value: [SecureField; SECURE_EXTENSION_DEGREE]) -> SecureField {
This function should be documented.
Code quote:
pub fn combine_secure_value(value: [SecureField; SECURE_EXTENSION_DEGREE]) -> SecureField {
004de96
to
07a69ae
Compare
1f8868b
to
585aa23
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: 4 of 8 files reviewed, 5 unresolved discussions (waiting on @alonh5 and @shaharsamocha7)
src/core/fields/secure.rs
line 12 at r2 (raw file):
Previously, shaharsamocha7 wrote…
You have a const here
Line 11 in e3167b0
pub const SECURE_FIELD_EXTENSION_DEGREE: usize = 4; Maybe those can be combined?
Done.
src/core/fields/secure.rs
line 14 at r2 (raw file):
Previously, shaharsamocha7 wrote…
Document
Done.
src/core/fields/secure.rs
line 15 at r2 (raw file):
pub struct SecureColumn<B: Backend> { pub cols: [Col<B, BaseField>; SECURE_EXTENSION_DEGREE],
Done.
src/core/fields/secure.rs
line 45 at r2 (raw file):
Previously, shaharsamocha7 wrote…
I think that the previous place of that part of this file was better.
Done.
src/core/fields/secure.rs
line 71 at r2 (raw file):
Previously, shaharsamocha7 wrote…
This function should be documented.
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 10 of 10 files at r4, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @alonh5 and @spapinistarkware)
src/core/channel.rs
line 126 at r4 (raw file):
let felts: [BaseField; FELTS_PER_HASH] = self.draw_base_felts(); SecureField::from_m31_array( felts[..<SecureField as ExtensionOf<BaseField>>::EXTENSION_DEGREE]
Why not using the const that you defined there?
Suggestion:
felts[..SECURE_EXTENSION_DEGREE]
src/core/poly/circle/secure_poly.rs
line 28 at r4 (raw file):
/// Evaluates the polynomial at a point, given evaluations of its composing base field /// polynomials' evaluations at that point.
Suggestion:
/// Evaluates the polynomial at a point, given evaluations of its composing base field
/// polynomials at that point.
src/core/poly/circle/secure_poly.rs
line 29 at r4 (raw file):
/// Evaluates the polynomial at a point, given evaluations of its composing base field /// polynomials' evaluations at that point. pub fn eval_from_partial_evals(value: [SecureField; SECURE_EXTENSION_DEGREE]) -> SecureField {
?
Suggestion:
evals
585aa23
to
e818c42
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: 9 of 11 files reviewed, 2 unresolved discussions (waiting on @alonh5 and @shaharsamocha7)
src/core/channel.rs
line 126 at r4 (raw file):
Previously, shaharsamocha7 wrote…
Why not using the const that you defined there?
Done.
src/core/poly/circle/secure_poly.rs
line 28 at r4 (raw file):
/// Evaluates the polynomial at a point, given evaluations of its composing base field /// polynomials' evaluations at that point.
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 r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @alonh5)
Merge activity
|
e818c42
to
f1ce145
Compare
This change is