-
Notifications
You must be signed in to change notification settings - Fork 151
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
Add Bn254 Garaga hints to operate #1510
Comments
Happy to guide you closely with this. |
Mainly the hints will require some BigInt lib (signed), as negative values should be also handled. |
Hi Guys! |
I'd be happy to try to do that this week:)! Update: I see you already have a garaga.rs file in your hint processor I suggest to turn it into a feature called "garaga", akin to "test_utils" feature. |
Garaga is a "Efficient pairing library using polynomial representation of field elements, written in Cairo 🐺 (Cairo Zero). It'll soon be audited, and integrated as a syscall on Starknet.
Problem: Garaga relies on specific hints that speed up the computation. These hints are implemented in the old Python-VM and need to be added to the Cairo-VM Rust hint manager.
Note: using this hints doesn't hurt the security, reliability or provability of the computations.
Solution: add the hints to the Cairo-VM in Rust.
Process: in order to refine this issue ->
First file to consider (in the list) is: https://github.com/keep-starknet-strange/garaga/blob/main/src/bn254/fq.cairo
Investigation task: Try to implement the first hint of the list in Cairo-VM Rust. Work hand in hand with @feltroidprime to coordinate the effort with the python implementation and to accelerate the cleaning up of the original hints.
Caveats and how tos:
program_input
andprogram_output
, example:Additional context
This will also be useful for Cairo 1 -> When Starknet wants to use Bn254 operations in the current network (Current version of Cairo compiler), it'll need to call garaga through syscalls, like it is currently doing for P256 (Braavos hardware signer).
The text was updated successfully, but these errors were encountered: