Skip to content
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

Optimize decommiting last FRI layer using univariate FFT #133

Open
wants to merge 1 commit into
base: 10-20-Add_verifier
Choose a base branch
from

Conversation

andrewmilson
Copy link
Contributor

@andrewmilson andrewmilson commented Oct 24, 2024

This change is Reviewable

Copy link
Contributor Author

andrewmilson commented Oct 24, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @andrewmilson and the rest of your teammates on Graphite Graphite

@andrewmilson andrewmilson changed the title Optimizations Optimize decommiting last FRI layer using univariate FFT Oct 24, 2024
@andrewmilson andrewmilson marked this pull request as ready for review October 24, 2024 03:26
@andrewmilson andrewmilson force-pushed the 10-22-Optimizations branch 2 times, most recently from 0824fd9 to 32cd8df Compare October 27, 2024 23:43
@ilyalesokhin-starkware
Copy link
Collaborator

stwo_cairo_verifier/src/poly/utils.cairo line 35 at r1 (raw file):

    let lhs_val = fold(values, folding_factors, index, level + 1, n / 2);
    let rhs_val = fold(values, folding_factors, index + n / 2, level + 1, n / 2);
    return lhs_val + rhs_val.mul_m31(*folding_factors[level]);

This change is independent of the other changes, right?

Code quote:

 return lhs_val + rhs_val.mul_m31(*folding_factors[level]);

@ilyalesokhin-starkware
Copy link
Collaborator

stwo_cairo_verifier/src/fri.cairo line 550 at r1 (raw file):

    #[test]
    fn test_fold_line_1() {
        let domain = LineDomainImpl::new_unchecked(

Why not keep the new function and use it here?

Code quote:

  let domain = LineDomainImpl::new_unchecked(

Copy link
Contributor Author

@andrewmilson andrewmilson left a 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 4 files reviewed, 2 unresolved discussions (waiting on @Alon-Ti and @ilyalesokhin-starkware)


stwo_cairo_verifier/src/fri.cairo line 550 at r1 (raw file):

Previously, ilyalesokhin-starkware wrote…

Why not keep the new function and use it here?

Done.


stwo_cairo_verifier/src/poly/utils.cairo line 35 at r1 (raw file):

Previously, ilyalesokhin-starkware wrote…

This change is independent of the other changes, right?

Yes my bad should have put in a seperate PR

@ilyalesokhin-starkware
Copy link
Collaborator

stwo_cairo_verifier/src/poly/line.cairo line 115 at r1 (raw file):

    while domain_i != 0 {
        domain_i -= 1;
        let domain = domains[domain_i];

Suggestion:

    let domains_span = domains.span()
    while Some(domain) = domains_span.pop_back() {

Copy link
Collaborator

@ilyalesokhin-starkware ilyalesokhin-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 4 files at r1.
Reviewable status: 1 of 5 files reviewed, 3 unresolved discussions (waiting on @Alon-Ti, @andrewmilson, and @ilyalesokhin-starkware)

Copy link
Contributor Author

@andrewmilson andrewmilson left a 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 5 files reviewed, 3 unresolved discussions (waiting on @Alon-Ti and @ilyalesokhin-starkware)


stwo_cairo_verifier/src/poly/line.cairo line 115 at r1 (raw file):

    while domain_i != 0 {
        domain_i -= 1;
        let domain = domains[domain_i];

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants