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

feat(blockifier): add support for secp256k1 syscall for native #1940

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

varex83
Copy link
Contributor

@varex83 varex83 commented Nov 11, 2024

Should go after #1675 , #1813 , #1546 , #1545

Commit history will be changed in the future, so "feat: add support for keccak syscall" will be removed

@varex83 varex83 added the native integration Related with the integration of Cairo Native into the Blockifier label Nov 11, 2024
@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

Artifacts upload triggered. View details here

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.90%. Comparing base (e3165c4) to head (a4b4fe1).
Report is 544 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1940       +/-   ##
===========================================
+ Coverage   40.10%   68.90%   +28.79%     
===========================================
  Files          26      109       +83     
  Lines        1895    13899    +12004     
  Branches     1895    13899    +12004     
===========================================
+ Hits          760     9577     +8817     
- Misses       1100     3913     +2813     
- Partials       35      409      +374     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link

Artifacts upload triggered. View details here

@PearsonWhite PearsonWhite force-pushed the pwhite/secp256r1 branch 2 times, most recently from b3cfd3f to eee03a4 Compare November 11, 2024 23:32
Copy link

Artifacts upload triggered. View details here

Copy link

Artifacts upload triggered. View details here

Copy link

Artifacts upload triggered. View details here

Copy link

Artifacts upload triggered. View details here

@rodrigo-pino rodrigo-pino changed the title feat: add support for secp256k1 syscall feat(blockifier): add support for secp256k1 syscall for native Nov 18, 2024
Copy link

Artifacts upload triggered. View details here

Copy link
Contributor

@meship-starkware meship-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 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @avi-starkware and @Yoni-Starkware)

Copy link
Contributor

@avi-starkware avi-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 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @varex83)


crates/blockifier/src/execution/native/syscall_handler.rs line 642 at r2 (raw file):

        Secp256Point::new(x, y)
            .map(|op| op.map(|p| p.into()))
            .map_err(|e| self.handle_error(remaining_gas, e))

Let's be consistent with #1675 .

Suggestion:

        Secp256Point::new(x, y)
            .map(|option| option.map(|p| p.into()))
            .map_err(|err| self.handle_error(remaining_gas, err))

crates/blockifier/src/execution/native/syscall_handler.rs line 680 at r2 (raw file):

        Secp256Point::get_point_from_x(x, y_parity)
            .map(|op| op.map(|p| p.into()))
            .map_err(|e| self.handle_error(remaining_gas, e))

Let's be consistent with #1675 .

Suggestion:

        Secp256Point::get_point_from_x(x, y_parity)
            .map(|option| option.map(|p| p.into()))
            .map_err(|err| self.handle_error(remaining_gas, err))

Copy link
Contributor

@avi-starkware avi-starkware 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, 2 unresolved discussions (waiting on @varex83)

Copy link
Contributor

@avi-starkware avi-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 2 of 2 files at r4.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @varex83)

@PearsonWhite PearsonWhite force-pushed the pwhite/secp256r1 branch 2 times, most recently from 68d9518 to a5c6ab0 Compare November 19, 2024 20:24
Copy link

Artifacts upload triggered. View details here

Copy link

Artifacts upload triggered. View details here

Copy link
Contributor

@meship-starkware meship-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 all commit messages.
Reviewable status: 1 of 81 files reviewed, all discussions resolved (waiting on @avi-starkware and @Yoni-Starkware)

Copy link

Artifacts upload triggered. View details here

Copy link

Artifacts upload triggered. View details here

@rodrigo-pino rodrigo-pino changed the base branch from pwhite/secp256r1 to main November 21, 2024 12:16
Copy link

Artifacts upload triggered. View details here

Copy link

Artifacts upload triggered. View details here

Copy link
Collaborator

@Yoni-Starkware Yoni-Starkware 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 2 of 2 files at r8, all commit messages.
Reviewable status: 3 of 81 files reviewed, all discussions resolved (waiting on @avi-starkware and @meship-starkware)

Copy link
Collaborator

@Yoni-Starkware Yoni-Starkware 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: 3 of 81 files reviewed, all discussions resolved (waiting on @avi-starkware and @meship-starkware)

Copy link
Collaborator

@Yoni-Starkware Yoni-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 80 files at r6.
Reviewable status: 4 of 81 files reviewed, all discussions resolved (waiting on @avi-starkware and @meship-starkware)

Copy link
Collaborator

@Yoni-Starkware Yoni-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 77 of 80 files at r6.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @varex83)

@Yoni-Starkware Yoni-Starkware merged commit d97d79c into main Nov 21, 2024
12 checks passed
@Yoni-Starkware Yoni-Starkware deleted the bohdan/secp256k1 branch November 21, 2024 12:40
@github-actions github-actions bot locked and limited conversation to collaborators Nov 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
native integration Related with the integration of Cairo Native into the Blockifier
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants