-
Notifications
You must be signed in to change notification settings - Fork 95
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
Change the alpha used when folding columns into fri layers. #972
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #972 +/- ##
==========================================
+ Coverage 92.26% 92.28% +0.02%
==========================================
Files 105 105
Lines 14292 14330 +38
Branches 14292 14330 +38
==========================================
+ Hits 13187 13225 +38
Misses 1032 1032
Partials 73 73 ☔ View full report in Codecov by Sentry. |
38e2fe9
to
a329311
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 r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @alon-f)
crates/prover/src/core/fri.rs
line 447 at r2 (raw file):
let first_layer_sparse_evals = self.decommit_first_layer(queries, first_layer_query_evals)?; let inner_layer_queries = queries.fold(CIRCLE_TO_LINE_FOLD_STEP);
This change alone is fine and IMO deserves a separate PR.
crates/prover/src/core/fri.rs
line 470 at r2 (raw file):
fn decommit_inner_layers( &self, inner_layer_queries: &Queries,
inner layer is already mentioned in the function name
Suggestion:
queries: &Queries,
crates/prover/src/core/fri.rs
line 489 at r2 (raw file):
{ // Use the previous layer's folding alpha to fold the column's circle into the // current layer.
Suggestion:
// Use the previous layer's folding alpha to fold the relevant circle evaluations into the current layer.
crates/prover/src/core/fri.rs
line 495 at r2 (raw file):
.fold_circle(previous_folding_alpha, *column_domain); // Mix the folded column evaluations into the current layer's evaluations.
? or more accurate doc, but I feel code is already made clear by the extraction to a function
crates/prover/src/core/fri.rs
line 506 at r2 (raw file):
(layer_queries, layer_query_evals) = layer.verify_and_fold(layer_queries, layer_query_evals)?; previous_folding_alpha = layer.folding_alpha;
very nice!
crates/prover/src/core/fri.rs
line 691 at r2 (raw file):
impl<H: MerkleHasher> FriFirstLayerVerifier<H> { /// Verifies the first layer's merkle decommitment, and returns the evaluations needed for /// folding the columns to their corresponding layer.
the latter part of the sentence sounds weird to me, mixing evals with column might be confusing?
non-blocking
wdyt? Suggestion: // fold max size columns.
while let Some(column) = columns.next_if(|c| folded_size(c) == layer_evaluation.len()) {
B::fold_circle_into_line(&mut layer_evaluation, column, folding_alpha, twiddles);
}
while layer_evaluation.len() > config.last_layer_domain_size() {
let layer = FriInnerLayerProver::new(layer_evaluation);
MC::mix_root(channel, layer.merkle_tree.root());
let folding_alpha = channel.draw_felt();
let folded_layer_evaluation = B::fold_line(&layer.evaluation, folding_alpha, twiddles);
layers.push(layer);
layer_evaluation = folded_layer_evaluation;
// Check for circle polys in the first layer that should be combined in this layer.
while let Some(column) = columns.next_if(|c| folded_size(c) == layer_evaluation.len()) {
B::fold_circle_into_line(&mut layer_evaluation, column, folding_alpha, twiddles);
}
} |
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 1 files reviewed, 5 unresolved discussions (waiting on @ohad-starkware)
crates/prover/src/core/fri.rs
line 447 at r2 (raw file):
Previously, ohad-starkware (Ohad) wrote…
This change alone is fine and IMO deserves a separate PR.
kk
crates/prover/src/core/fri.rs
line 470 at r2 (raw file):
Previously, ohad-starkware (Ohad) wrote…
inner layer is already mentioned in the function name
Done.
crates/prover/src/core/fri.rs
line 495 at r2 (raw file):
Previously, ohad-starkware (Ohad) wrote…
? or more accurate doc, but I feel code is already made clear by the extraction to a function
Done.
crates/prover/src/core/fri.rs
line 506 at r2 (raw file):
Previously, ohad-starkware (Ohad) wrote…
very nice!
:D
crates/prover/src/core/fri.rs
line 691 at r2 (raw file):
Previously, ohad-starkware (Ohad) wrote…
the latter part of the sentence sounds weird to me, mixing evals with column might be confusing?
non-blocking
i can change it to circle evaluations
like you wrote above
crates/prover/src/core/fri.rs
line 489 at r2 (raw file):
{ // Use the previous layer's folding alpha to fold the column's circle into the // current layer.
i don't like relevant, so i'll add the infamous sparse
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 1 files reviewed, 1 unresolved discussion (waiting on @alon-f)
crates/prover/src/core/fri.rs
line 691 at r2 (raw file):
Previously, alon-f wrote…
i can change it to
circle evaluations
like you wrote above
u decide, im not sure my confusion is justified
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 1 files reviewed, 2 unresolved discussions (waiting on @alon-f)
-- commits
line 1 at r3:
squash
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 1 files reviewed, 2 unresolved discussions (waiting on @ilyalesokhin-starkware and @ohad-starkware)
crates/prover/src/core/fri.rs
line 233 at r2 (raw file):
Previously, ilyalesokhin-starkware wrote…
wdyt?
Done.
7778889
to
6cee79f
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 1 files reviewed, 2 unresolved discussions (waiting on @ilyalesokhin-starkware and @ohad-starkware)
Previously, ohad-starkware (Ohad) wrote…
squash
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 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
No description provided.