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

corelib: circuit related utils improvements #6482

Merged
merged 5 commits into from
Oct 13, 2024

Conversation

feltroidprime
Copy link
Contributor

@feltroidprime feltroidprime commented Oct 12, 2024

circuit.cairo

  • Implement One for u384
  • Uses panic_with_felt252 instead of panic! macro (this significantly reduces bytecode) in next and done

metaprogramming.cairo

  • Support up to 16 outputs. Useful/needed for Kakarot's ec_pairing.

This change is Reviewable

Copy link
Collaborator

@orizi orizi 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 2 files at r1.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @feltroidprime)


corelib/src/circuit.cairo line 278 at r1 (raw file):

        match self {
            AddInputResult::Done(data) => data,
            AddInputResult::More(_) => panic_with_felt252('Not all inputs have been filled'),

Suggestion:

            ),
            AddInputResult::Done(_) => core::panic_with_felt252('All inputs have been filled'),
        }
    }
    // Inlining to make sure possibly huge `C` won't be in a user function name.
    #[inline]
    fn done(self: AddInputResult<C>) -> CircuitData<C> {
        match self {
            AddInputResult::Done(data) => data,
            AddInputResult::More(_) => core::panic_with_felt252('Not all inputs have been filled'),

Copy link
Collaborator

@orizi orizi 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 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @feltroidprime)

@orizi orizi enabled auto-merge October 13, 2024 07:41
Copy link
Collaborator

@orizi orizi 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, 1 unresolved discussion (waiting on @feltroidprime)

a discussion (no related file):
please run fixer for all tests.
CAIRO_FIX_TESTS=1 cargo t --profile=ci-dev


auto-merge was automatically disabled October 13, 2024 08:09

Head branch was pushed to by a user without write access

Copy link
Collaborator

@orizi orizi 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 r3.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @feltroidprime)

a discussion (no related file):
@ilyalesokhin-starkware for second eye.


Copy link
Contributor

@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 2 files at r1, 1 of 1 files at r2, 7 of 7 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @feltroidprime)

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @feltroidprime)

@orizi orizi added this pull request to the merge queue Oct 13, 2024
@feltroidprime
Copy link
Contributor Author

Thank you!

Merged via the queue into starkware-libs:main with commit 361caaa Oct 13, 2024
44 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.

3 participants