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

Add verifier #127

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Add verifier #127

merged 1 commit into from
Nov 18, 2024

Conversation

andrewmilson
Copy link
Contributor

@andrewmilson andrewmilson commented Oct 20, 2024

This change is Reviewable

Copy link
Contributor Author

andrewmilson commented Oct 20, 2024

This was referenced Oct 20, 2024
Base automatically changed from 10-13-Compute_FRI_quotients to main October 21, 2024 02:03
@andrewmilson andrewmilson force-pushed the 10-20-Add_verifier branch 3 times, most recently from a88d74d to 07a8ae3 Compare October 22, 2024 17:25
@andrewmilson andrewmilson force-pushed the 10-20-Add_verifier branch 3 times, most recently from f7e027d to c1e9f50 Compare October 24, 2024 03:02
@andrewmilson andrewmilson marked this pull request as ready for review October 24, 2024 03:04
@andrewmilson andrewmilson force-pushed the 10-20-Add_verifier branch 3 times, most recently from d3c1e26 to 8c88a6f Compare October 24, 2024 15:06
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: 29 of 31 files reviewed, 3 unresolved discussions (waiting on @Alon-Ti and @shaharsamocha7)


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

Previously, shaharsamocha7 wrote…

Then I don't think we need this code.
To check if a code has at least x trailing bits you only need one AND op

TODO maybe?

Funnily enough already had a TODO for it https://github.com/starkware-libs/stwo-cairo/pull/127/files#diff-ab0f3eb70a743b91de89fa4b965b564f1b175f2d254fd30703e7345eea5bf9caR141-R143.

Will implement it now though.


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

Previously, shaharsamocha7 wrote…

cool, should we document that?

In the Rust code? As in make it clear the shift is to shift the coset to a canonic coset?


stwo_cairo_verifier/tests/verifier.cairo line 24 at r2 (raw file):

Previously, shaharsamocha7 wrote…

what's that?
We have a last layer bound?

Yeah I'm just saying it's a bug in Cairo to report. When you use this value at runtime log_last_layer_degree_bound is 4 even though it is set to 5. Yes, degree bound for last FRI layer

Copy link
Contributor

@shaharsamocha7 shaharsamocha7 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: 29 of 31 files reviewed, 1 unresolved discussion (waiting on @Alon-Ti and @andrewmilson)


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

Previously, andrewmilson (Andrew Milson) wrote…

In the Rust code? As in make it clear the shift is to shift the coset to a canonic coset?

I thought we should document here that for canonic cosets the shift is identity

Copy link
Contributor

@shaharsamocha7 shaharsamocha7 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 31 files at r1.
Reviewable status: 30 of 31 files reviewed, 2 unresolved discussions (waiting on @Alon-Ti and @andrewmilson)


stwo_cairo_verifier/src/verifier.cairo line 32 at r2 (raw file):

) -> Result<(), VerificationError> {
    let random_coeff = channel.draw_felt();

Please add a TODO to deal with preprocessed columns

Copy link
Contributor

@shaharsamocha7 shaharsamocha7 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: 30 of 31 files reviewed, 4 unresolved discussions (waiting on @Alon-Ti and @andrewmilson)


a discussion (no related file):
We should split this pr


stwo_cairo_verifier/src/pcs/verifier.cairo line 183 at r2 (raw file):

/// Returns all column log bounds deduped and sorted in ascending order.
#[inline]
fn get_column_log_bounds(

can this be replaced with a dict

Code quote:

fn get_column_log_bounds(

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: 24 of 31 files reviewed, 3 unresolved discussions (waiting on @Alon-Ti and @shaharsamocha7)


stwo_cairo_verifier/src/pcs/verifier.cairo line 183 at r2 (raw file):

Previously, shaharsamocha7 wrote…

can this be replaced with a dict

Done.


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

Previously, shaharsamocha7 wrote…

I thought we should document here that for canonic cosets the shift is identity

Resolved offline.


stwo_cairo_verifier/Scarb.toml line 22 at r1 (raw file):

Previously, shaharsamocha7 wrote…

remove

Done.

@andrewmilson andrewmilson force-pushed the 10-20-Add_verifier branch 2 times, most recently from 4dee40b to 965f058 Compare November 14, 2024 18:42
@andrewmilson andrewmilson changed the base branch from main to 11-14-Gen_random_circle_point_from_channel November 14, 2024 18:42
Copy link
Contributor

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 7 of 7 files at r3, 2 of 2 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Alon-Ti)

@andrewmilson andrewmilson force-pushed the 11-14-Gen_random_circle_point_from_channel branch from 2b7ff04 to bdf91e2 Compare November 17, 2024 16:18
@andrewmilson andrewmilson force-pushed the 11-14-Gen_random_circle_point_from_channel branch from bdf91e2 to 9dbf239 Compare November 17, 2024 18:09
@andrewmilson andrewmilson changed the base branch from 11-14-Gen_random_circle_point_from_channel to 11-17-Add_PCS_verifier November 17, 2024 18:09
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: 24 of 31 files reviewed, all discussions resolved (waiting on @Alon-Ti and @shaharsamocha7)


a discussion (no related file):

Previously, shaharsamocha7 wrote…

We should split this pr

Done.

Copy link
Contributor

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 7 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Alon-Ti)

@andrewmilson andrewmilson force-pushed the 11-17-Add_PCS_verifier branch 4 times, most recently from ce45560 to 6ed6d7d Compare November 18, 2024 17:54
Base automatically changed from 11-17-Add_PCS_verifier to main November 18, 2024 17:58
@andrewmilson andrewmilson merged commit c4e6a28 into main Nov 18, 2024
5 checks passed
@andrewmilson andrewmilson deleted the 10-20-Add_verifier branch November 18, 2024 18:01
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