keep-starknet-strange / garaga

State-of-the-art Elliptic Curve operations and SNARKS verification for Cairo & Starknet 🐺.
https://garaga.gitbook.io/
MIT License
196 stars 51 forks source link

fix: handle curve ID bls12381 (snarkjs) #188

Closed m-kus closed 1 month ago

m-kus commented 1 month ago

Pull Request type

Please check the type of change your PR introduces:

What is the current behavior?

garaga gen fails to guess the curve ID given a verification key generated by snarkjs for curve BLS12-381 (snarkjs@0.7.4)

Issue Number: N/A

What is the new behavior?

garaga gen correctly detects the curve

Detected curve: CurveID.BLS12_381

-

-

Does this introduce a breaking change?

Other information

feltroidprime commented 1 month ago

Thanks for the fix!

Would you mind uploading the .jsons for vk, proof, pub inputs of snarkjs bls you got in https://github.com/keep-starknet-strange/garaga/tree/main/hydra/garaga/starknet/groth16_contract_generator/examples

and update the parsing test here https://github.com/keep-starknet-strange/garaga/blob/main/tests/hydra/starknet/test_groth16_vk_proof_parsing.py by adding their path in the parameters ?