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: Generate the full_proof_with_hints #278

Open
esdras-sena opened this issue Dec 22, 2024 · 6 comments
Open

feat: Generate the full_proof_with_hints #278

esdras-sena opened this issue Dec 22, 2024 · 6 comments
Labels
enhancement Enhancement of the code, not introducing new features.

Comments

@esdras-sena
Copy link

Feature Request

Describe the Feature Request

How to generate the full proof with hints, is there a Javascript or Rust package to make it?

@esdras-sena esdras-sena added the enhancement Enhancement of the code, not introducing new features. label Dec 22, 2024
@feltroidprime
Copy link
Collaborator

which proof system are you referring to ?

in all cases, you can use the garaga calldata command after installing the pip package

@esdras-sena
Copy link
Author

which proof system are you referring to ?

in all cases, you can use the garaga calldata command after installing the pip package

i'm using javascript, is there a way to extract the "full_proof_with_hints" from the call data?

@feltroidprime
Copy link
Collaborator

feltroidprime commented Dec 30, 2024

which proof system are you referring to ?
in all cases, you can use the garaga calldata command after installing the pip package

i'm using javascript, is there a way to extract the "full_proof_with_hints" from the call data?

Please answer the first question. The garaga npm package might already contain what you need if you're using groth16 or risc0.

To answer, the full_proof_with_hints IS the output of the calldata command.

@esdras-sena
Copy link
Author

esdras-sena commented Dec 30, 2024

which proof system are you referring to ?
in all cases, you can use the garaga calldata command after installing the pip package

i'm using javascript, is there a way to extract the "full_proof_with_hints" from the call data?

Please answer the first question. The garaga npm package might already contain what you need if you're using groth16 or risc0.

To answer, the full_proof_with_hints IS the output of the calldata command.

sure, i'm using groth16 and using garaga to get the calldata in a react frontend to pass to my contract

@feltroidprime
Copy link
Collaborator

feltroidprime commented Jan 1, 2025

export function getGroth16CallData(proof: Groth16Proof, verifyingKey: Groth16VerifyingKey, curveId: CurveId){

You can use this function from the garaga npm package https://felt.gitbook.io/garaga/installation/npm-package

@esdras-sena
Copy link
Author

export function getGroth16CallData(proof: Groth16Proof, verifyingKey: Groth16VerifyingKey, curveId: CurveId){

You can use this function from the garaga npm package https://felt.gitbook.io/garaga/installation/npm-package

i'm passing the calldata generated by the function getGroth16CallData directly to the function verify_groth16_proof_bn254 of the Verifier contract generated by garaga, but i'm getting this error Execution failed. Failure reason: 0x4f7074696f6e3a3a756e77726170206661696c65642e ('Option::unwrap failed.'). do i need to make some changes in the calldata before passing as full_proof_with_hints?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of the code, not introducing new features.
Projects
None yet
Development

No branches or pull requests

2 participants