8000 Change RelationUse uses type to u64 by alon-f · Pull Request #935 · starkware-libs/stwo-cairo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Change RelationUse uses type to u64 #935

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 25, 2025

Conversation

alon-f
Copy link
Contributor
@alon-f alon-f commented May 22, 2025

This change is Reviewable

Copy link
Contributor Author
alon-f commented May 22, 2025

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

@alon-f alon-f marked this pull request as ready for review May 22, 2025 13:28
@alon-f alon-f requested a review from ohad-agadi May 22, 2025 13:28
Copy link
Collaborator
@ohad-agadi ohad-agadi 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 9 files reviewed, 2 unresolved discussions


stwo_cairo_prover/crates/cairo-air/src/verifier.rs line 68 at r1 (raw file):

    let mut relation_uses = HashMap::<&'static str, u64>::new();
    claim.accumulate_relation_uses(&mut relation_uses);
    log::info!("relation_uses: {:?}", relation_uses);

debug of hashmap is very ugly
write a function


stwo_cairo_prover/crates/cairo-air/src/verifier.rs line 71 at r1 (raw file):

    for (name, uses) in relation_uses {
        assert!(uses < PRIME.into(), "Relation {} has {} uses.", name, uses);
    }

wdyt?

Suggestion:

    let outstanding_relations = relations.iter().filter(|(_,uses) uses < PRIME).collect();
    match outstanding_relations.len() { 1... => panic with verbose message}

Copy link
Collaborator
8000 ohad-agadi 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 9 files reviewed, 2 unresolved discussions (waiting on @alon-f)


stwo_cairo_prover/crates/cairo-air/src/air.rs line 156 at r1 (raw file):

    }

    pub fn accumulate_relation_uses(&self, relation_counts: &mut HashMap<&'static str, u64>) {

consider typedef

Code quote:

HashMap<&'static str, u64>

@alon-f alon-f force-pushed the 05-22-change_relationuse_uses_type_to_u64 branch from 52f7be5 to e767bc0 Compare May 22, 2025 13:56
@alon-f alon-f force-pushed the 05-22-change_relationuse_uses_type_to_u64 branch from e767bc0 to 0ff768a Compare May 22, 2025 14:51
Copy link
Contributor Author
@alon-f alon-f 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 9 files reviewed, 2 unresolved discussions (waiting on @ohad-agadi)


stwo_cairo_prover/crates/cairo-air/src/air.rs line 156 at r1 (raw file):

Previously, ohad-agadi (Ohad) wrote…

consider typedef

Done


stwo_cairo_prover/crates/cairo-air/src/verifier.rs line 68 at r1 (raw file):

Previously, ohad-agadi (Ohad) wrote…

debug of hashmap is very ugly
write a function 8000

Done.


stwo_cairo_prover/crates/cairo-air/src/verifier.rs line 71 at r1 (raw file):

Previously, ohad-agadi (Ohad) wrote…

wdyt?

Done.

Copy link
Collaborator
@ohad-agadi ohad-agadi left a comment

Choose a reason for hiding this comment

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

Reviewed 9 of 9 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @alon-f)

Copy link
Collaborator
@ohad-agadi ohad-agadi 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @alon-f)

@alon-f alon-f merged commit 911405d into main May 25, 2025
7 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