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

Rust implementation of the MultiPairingCheck calldata builder #202

Merged

Conversation

raugfer
Copy link
Collaborator

@raugfer raugfer commented Sep 20, 2024

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Testing
  • Other (please describe):

Issue Number: #191

Does this introduce a breaking change?

  • Yes
  • No

@raugfer raugfer marked this pull request as ready for review September 30, 2024 20:06
@raugfer
Copy link
Collaborator Author

raugfer commented Sep 30, 2024

I think I reached a good point with this PR. I might have missed some obvious improvements/simplifications though. Please, let me know.

@raugfer
Copy link
Collaborator Author

raugfer commented Sep 30, 2024

I also intend to remove file test_mpc.py from the merge. It has been useful but in the end it can be removed.

Copy link
Collaborator

@feltroidprime feltroidprime left a comment

Choose a reason for hiding this comment

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

Good Job.
We can indeed optimize and clean here and there but overall it's good and it's better to move forward.

On top of the suggestions on a file-to-file basis and fixing conflicts with main, please make sure the wasm binding handles panics caused by rust asserts gracefully for the following cases (similarly to the msm calldata builder with the Result usage)

  1. Points are not on curve // deserialization of bigints fails
  2. Parameters are stupids (n_fixed_g2 > len(pairs))
  3. Mpc final result is != Polynomial::One. In that case return something " pairing check is not == 1 " .

tools/garaga_rs/src/algebra/extf_mul.rs Outdated Show resolved Hide resolved
tools/garaga_rs/src/multi_miller_loop.rs Show resolved Hide resolved
tools/garaga_rs/src/multi_miller_loop.rs Outdated Show resolved Hide resolved
tools/npm/garaga_ts/src/node/api.ts Outdated Show resolved Hide resolved
@raugfer
Copy link
Collaborator Author

raugfer commented Oct 3, 2024

All requests resolved @feltroidprime, please check it out. Thanks

@feltroidprime feltroidprime merged commit 1ed6697 into keep-starknet-strange:main Oct 3, 2024
27 checks passed
@raugfer raugfer deleted the mpc-calldata-builder branch October 3, 2024 16:53
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