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 Coset::at #135

Open
wants to merge 1 commit into
base: 10-23-Refactor_FriVerifier_decommit_inner_layers
Choose a base branch
from

Conversation

andrewmilson
Copy link
Contributor

@andrewmilson andrewmilson commented Oct 24, 2024

Refactored Coset::at() since it accounted for 50% of steps for a verification. New approach reduces to 4%.


This change is Reviewable

@andrewmilson andrewmilson force-pushed the 10-23-Refactor_FriVerifier_decommit_inner_layers branch from 9623734 to 38b73f4 Compare October 24, 2024 02:33
@andrewmilson andrewmilson force-pushed the 10-23-Refactor_FriVerifier_decommit_inner_layers branch from 38b73f4 to 940580e Compare October 24, 2024 02:40
@andrewmilson andrewmilson force-pushed the 10-23-Refactor_FriVerifier_decommit_inner_layers branch from 940580e to 72c02f8 Compare October 24, 2024 03:01
@andrewmilson andrewmilson force-pushed the 10-23-Refactor_FriVerifier_decommit_inner_layers branch from 72c02f8 to 79a0f90 Compare October 24, 2024 03:02
@andrewmilson andrewmilson force-pushed the 10-23-Refactor_FriVerifier_decommit_inner_layers branch from 79a0f90 to 47b090e Compare October 24, 2024 15:04
@andrewmilson andrewmilson force-pushed the 10-23-Refactor_FriVerifier_decommit_inner_layers branch from 47b090e to 166b918 Compare October 24, 2024 15:06
@andrewmilson andrewmilson force-pushed the 10-23-Refactor_FriVerifier_decommit_inner_layers branch from 166b918 to 9cc2ecb Compare October 24, 2024 15:23
@andrewmilson andrewmilson marked this pull request as ready for review October 24, 2024 15:25
@andrewmilson andrewmilson force-pushed the 10-23-Refactor_FriVerifier_decommit_inner_layers branch from 9cc2ecb to 50fa500 Compare October 27, 2024 23:44
@ilyalesokhin-starkware
Copy link
Collaborator

stwo_cairo_verifier/src/pcs/quotients.cairo line 805 at r1 (raw file):

        let p0 = QM31_CIRCLE_GEN;
        let p1 = QM31_CIRCLE_GEN + QM31_CIRCLE_GEN;
        let p2 = QM31_CIRCLE_GEN + QM31_CIRCLE_GEN + QM31_CIRCLE_GEN;

Suggestion:

 let p2 = p2 + QM31_CIRCLE_GEN;

@ilyalesokhin-starkware
Copy link
Collaborator

stwo_cairo_verifier/src/pcs/quotients.cairo line 805 at r1 (raw file):

        let p0 = QM31_CIRCLE_GEN;
        let p1 = QM31_CIRCLE_GEN + QM31_CIRCLE_GEN;
        let p2 = QM31_CIRCLE_GEN + QM31_CIRCLE_GEN + QM31_CIRCLE_GEN;

sorry
let p2 = p1 + QM31_CIRCLE_GEN;

@andrewmilson andrewmilson force-pushed the 10-23-Refactor_FriVerifier_decommit_inner_layers branch from 50fa500 to 728621e Compare October 29, 2024 03:33
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 6 files reviewed, 1 unresolved discussion (waiting on @Alon-Ti and @ilyalesokhin-starkware)


stwo_cairo_verifier/src/pcs/quotients.cairo line 805 at r1 (raw file):

Previously, ilyalesokhin-starkware wrote…

sorry
let p2 = p1 + QM31_CIRCLE_GEN;

Done.

@andrewmilson andrewmilson force-pushed the 10-23-Refactor_FriVerifier_decommit_inner_layers branch from d5170f2 to e5aac08 Compare November 5, 2024 01:21
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