-
Notifications
You must be signed in to change notification settings - Fork 89
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
Framework component #761
Framework component #761
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #761 +/- ##
==========================================
- Coverage 93.25% 93.20% -0.06%
==========================================
Files 89 90 +1
Lines 11795 11897 +102
Branches 11795 11897 +102
==========================================
+ Hits 11000 11089 +89
- Misses 694 707 +13
Partials 101 101 ☔ View full report in Codecov by Sentry. |
9982532
to
a276f94
Compare
b40bca7
to
247a5f1
Compare
a276f94
to
d53d91f
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 2 of 4 files at r1, all commit messages.
Reviewable status: 2 of 4 files reviewed, 6 unresolved discussions (waiting on @spapinistarkware)
.gitignore
line 7 at r2 (raw file):
build dist target*
It's a folder, right?
Suggestion:
target/*
crates/prover/src/constraint_framework/component.rs
line 20 at r2 (raw file):
use crate::core::{utils, InteractionElements, LookupValues}; pub trait FrameworkComponent {
Document
This framework supports components that allow only constraints inside the row right? (or lookup)
Also, it assumes that all the rows (for specific interaction) are of the same length, no?
Code quote:
pub trait FrameworkComponent {
crates/prover/src/constraint_framework/component.rs
line 50 at r2 (raw file):
) -> crate::core::pcs::TreeVec< crate::core::ColumnVec< Vec<crate::core::circle::CirclePoint<crate::core::fields::qm31::SecureField>>,
In all of them
Suggestion:
SecureField
crates/prover/src/constraint_framework/component.rs
line 65 at r2 (raw file):
}) .collect() })
You can use this:
stwo/crates/prover/src/core/air/mask.rs
Line 36 in a5e69d9
pub fn shifted_mask_points( |
Code quote:
info.mask_offsets.map(|tree_mask| {
tree_mask
.iter()
.map(|col_mask| {
col_mask
.iter()
.map(|off| point + trace_step.mul_signed(*off).into_ef())
.collect()
})
.collect()
})
crates/prover/src/constraint_framework/component.rs
line 100 at r2 (raw file):
let trace: TreeVec< Vec<Cow<'_, CircleEvaluation<SimdBackend, BaseField, BitReversedOrder>>>, > = if eval_domain.log_size() != self.log_size() + LOG_BLOWUP_FACTOR {
I think you want it only in case that the eval_domain is bigger, no?
Suggestion:
if eval_domain.log_size() > self.log_size() + LOG_BLOWUP_FACTOR
crates/prover/src/constraint_framework/component.rs
line 151 at r2 (raw file):
fn lookup_values(&self, _trace: &ComponentTrace<'_, SimdBackend>) -> LookupValues { LookupValues::default() }
What's that, is it unimplemented?
Code quote:
fn lookup_values(&self, _trace: &ComponentTrace<'_, SimdBackend>) -> LookupValues {
LookupValues::default()
}
247a5f1
to
05ef795
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: 2 of 4 files reviewed, 6 unresolved discussions (waiting on @shaharsamocha7)
.gitignore
line 7 at r2 (raw file):
Previously, shaharsamocha7 wrote…
It's a folder, right?
No, it's another target folder. I'm using targetavx for my avx compilations, so it won't interfere with the IDE.
crates/prover/src/constraint_framework/component.rs
line 20 at r2 (raw file):
Previously, shaharsamocha7 wrote…
Document
This framework supports components that allow only constraints inside the row right? (or lookup)
Also, it assumes that all the rows (for specific interaction) are of the same length, no?
Done.
crates/prover/src/constraint_framework/component.rs
line 50 at r2 (raw file):
Previously, shaharsamocha7 wrote…
In all of them
Done.
crates/prover/src/constraint_framework/component.rs
line 65 at r2 (raw file):
Previously, shaharsamocha7 wrote…
You can use this:
stwo/crates/prover/src/core/air/mask.rs
Line 36 in a5e69d9
pub fn shifted_mask_points(
I'd have to createa a vector of domains though...
crates/prover/src/constraint_framework/component.rs
line 100 at r2 (raw file):
Previously, shaharsamocha7 wrote…
I think you want it only in case that the eval_domain is bigger, no?
Theoretically, yes. But we need to do modifications to reuse the commitment evaluation in that case, which I don't want to write now. The way I wrote now, if , it's correct in that case, although, not as efficient is it could be.
crates/prover/src/constraint_framework/component.rs
line 151 at r2 (raw file):
Previously, shaharsamocha7 wrote…
What's that, is it unimplemented?
Don't need lookup_values in this interface.
d53d91f
to
45a9ab1
Compare
05ef795
to
9ae92ce
Compare
45a9ab1
to
deaefad
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 r3, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @spapinistarkware)
crates/prover/src/constraint_framework/component.rs
line 65 at r2 (raw file):
Previously, spapinistarkware (Shahar Papini) wrote…
I'd have to createa a vector of domains though...
should we change that function to get trace_step instead of domains?
Not necessarily for this pr
crates/prover/src/constraint_framework/component.rs
line 100 at r2 (raw file):
Previously, spapinistarkware (Shahar Papini) wrote…
Theoretically, yes. But we need to do modifications to reuse the commitment evaluation in that case, which I don't want to write now. The way I wrote now, if , it's correct in that case, although, not as efficient is it could be.
Can you add a TODO to consider to optimize that?
crates/prover/src/constraint_framework/component.rs
line 25 at r3 (raw file):
/// Implementing this trait introduces implementations for [Component] and [ComponentProver] for the /// SIMD backend. /// Note that the constraint framework only support components with columns of the size size.
typo
Suggestion:
/// Note that the constraint framework only support components with columns of the same size.
9ae92ce
to
86eb8cb
Compare
deaefad
to
e99fc2c
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, 3 unresolved discussions (waiting on @shaharsamocha7)
crates/prover/src/constraint_framework/component.rs
line 65 at r2 (raw file):
Previously, shaharsamocha7 wrote…
should we change that function to get trace_step instead of domains?
Not necessarily for this pr
Perhaps. It really depends on the concrete use cases of that function. For example, if we'd stop having any uses of it, we could delete it.
crates/prover/src/constraint_framework/component.rs
line 100 at r2 (raw file):
Previously, shaharsamocha7 wrote…
Can you add a TODO to consider to optimize that?
Done.
crates/prover/src/constraint_framework/component.rs
line 25 at r3 (raw file):
Previously, shaharsamocha7 wrote…
typo
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 r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @spapinistarkware)
86eb8cb
to
051d90a
Compare
e99fc2c
to
c08ca54
Compare
051d90a
to
19c7760
Compare
c08ca54
to
0a3a963
Compare
19c7760
to
2150ceb
Compare
0a3a963
to
b931446
Compare
Merge activity
|
b931446
to
a34eb4a
Compare
This change is