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

verify_gnark_proof can cause panic if the proof is wrong #1830

Open
1 of 2 tasks
0xSasaPrsic opened this issue Nov 28, 2024 · 1 comment · May be fixed by #1834
Open
1 of 2 tasks

verify_gnark_proof can cause panic if the proof is wrong #1830

0xSasaPrsic opened this issue Nov 28, 2024 · 1 comment · May be fixed by #1834
Labels
bug Something isn't working good first issue Good for newcomers rust Pull requests that update Rust code sdk Issues or PRs relating to the SP1 SDK

Comments

@0xSasaPrsic
Copy link

Component

sp1-sdk

Have you ensured that all of these are up to date?

  • SP1 SDK
  • cargo prove CLI/sp1up

What version of SP1 SDK are you on?

No response

What version of the cargo prove CLI are you on?

No response

Operating System

None

Describe the bug

The verify_gnark_proof function can cause a panic if the proof is wrong as it uses unwraps.
The function already returns a Result<(), Groth16Error> and in case of wrong proof it should return an error and not panic.
All .unwrap() calls should be removed.

@nhtyy nhtyy added bug Something isn't working good first issue Good for newcomers rust Pull requests that update Rust code sdk Issues or PRs relating to the SP1 SDK labels Nov 28, 2024
@fedemagnani
Copy link

Hi, can I take this?

@fedemagnani fedemagnani linked a pull request Dec 1, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers rust Pull requests that update Rust code sdk Issues or PRs relating to the SP1 SDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants