8000 Replace range_check_vector with separate rcs by anatgstarkware · Pull Request #881 · starkware-libs/stwo-cairo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Replace range_check_vector with separate rcs #881

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

Merged
merged 1 commit into from
May 29, 2025

Conversation

anatgstarkware
Copy link
Contributor
@anatgstarkware anatgstarkware commented May 7, 2025

This change is Reviewable

Copy link
Collaborator
@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 32 of 33 files at r1, all commit messages.
Reviewable status: 32 of 33 files reviewed, 2 unresolved discussions (waiting on @andrewmilson)


stwo_cairo_verifier/crates/cairo_air/src/components/range_check_9_9.cairo line 36 at r1 (raw file):

        let preprocessed_log_sizes = array![log_size].span();
        let trace_log_sizes = ArrayImpl::new_repeated(N_TRACE_COLUMNS, log_size).span();
        let interaction_log_sizes = ArrayImpl::new_repeated(4, log_size).span();

use constant

Suggestion:

let interaction_log_sizes = ArrayImpl::new_repeated(QM31_EXTENSION_SOMETHING, log_size).span();

stwo_cairo_verifier/crates/cairo_air/src/components/range_check_9_9.cairo line 42 at r1 (raw file):

    fn mix_into(self: @Claim, ref channel: Channel) {
        channel.mix_u64((LOG_SIZE).into());
    }

It's not what we used to mix for range checks

Code quote:

    fn mix_into(self: @Claim, ref channel: Channel) {
        channel.mix_u64((LOG_SIZE).into());
    }

Copy link
Contributor Author
@anatgstarkware anatgstarkware 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: 15 of 33 files reviewed, 2 unresolved discussions (waiting on @andrewmilson and @shaharsamocha7)


stwo_cairo_verifier/crates/cairo_air/src/components/range_check_9_9.cairo line 42 at r1 (raw file):

Previously, shaharsamocha7 wrote…

It's not what we used to mix for range checks

Irrelevant since we removed the mixing of preprocessed

@anatgstarkware
Copy link
Contributor Author

stwo_cairo_verifier/crates/cairo_air/src/components/range_check_9_9.cairo line 36 at r1 (raw file):

Previously, shaharsamocha7 wrote…

use constant

This is the same as in other components, I'll fix in a different pr

@anatgstarkware anatgstarkware force-pushed the anatg/autogen_part2 branch 2 times, most recently from 3cf47ff to 3cfc6c5 Compare May 26, 2025 14:21
Copy link
Collaborator
@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 17 of 18 files at r2, 3 of 3 files at r3, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @andrewmilson)


stwo_cairo_verifier/crates/cairo_air/src/components/range_check_3_6_6_3.cairo line 101 at r3 (raw file):

        let column_size = m31(pow2(log_size));
        let mut range_check_3_6_6_3_sum_0: QM31 = Zero::zero();
        let rangecheck_3_6_6_3_0 = preprocessed_mask_values

Is this name intended? or do we want to change it?

Code quote:

rangecheck_3_6_6_3_0

stwo_cairo_prover/crates/cairo-air/src/components/range_check_vector.rs line 59 at r3 (raw file):

                #[derive(Clone, Deserialize, Serialize, CairoSerialize)]
                pub struct Claim {
                    pub log_ranges: Vec<u32>,

Why this change? or is it still in use?
Aren't we discarding this file?

Code quote:

pub log_ranges: Vec<u32>,

stwo_cairo_verifier/crates/cairo_air/src/components/range_check_12.cairo line 76 at r1 (raw file):

        let trace_gen = CanonicCosetImpl::new(log_size).coset.step_size;
        let point_offset_neg_1 = point.add_circle_point_m31(-trace_gen.mul(1).to_point());

consider to re-add this empty line

Copy link
Contributor Author
@anatgstarkware anatgstarkware 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: all files reviewed, 3 unresolved discussions (waiting on @andrewmilson and @shaharsamocha7)


stwo_cairo_prover/crates/cairo-air/src/components/range_check_vector.rs line 59 at r3 (raw file):

Previously, shaharsamocha7 wrote…

Why this change? or is it still in use?
Aren't we discarding this file?

this is in the prover


stwo_cairo_verifier/crates/cairo_air/src/components/range_check_3_6_6_3.cairo line 101 at r3 (raw file):

Previously, shaharsamocha7 wrote…

Is this name intended? or do we want to change it?

This is the first column in the preprocessed table. Since we didn't separate column index from the rest of the args to preprocessed columns, we are stuck with this name.

Copy link
Collaborator
@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:

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @anatgstarkware and @andrewmilson)

@anatgstarkware anatgstarkware merged commit 633cf63 into main May 29, 2025
8 checks passed
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
0