Skip to content

fix(sdk): classify malformed Groth16 exit codes correctly - #2968

Open
gluedtea wants to merge 1 commit into
succinctlabs:mainfrom
gluedtea:main
Open

gluedtea wants to merge 1 commit into
succinctlabs:mainfrom
gluedtea:main

Conversation

@gluedtea

Copy link
Copy Markdown

Motivation

verify_proof parses the exit code from public_inputs[2] for Plonk and Groth16 proofs.

In the Groth16 branch, parsing errors are incorrectly mapped to SP1VerificationError::Plonk due to a copy-paste error. This causes callers to receive the wrong public error category when classifying verification failures.

This does not affect cryptographic verification correctness. It only affects the SDK's error classification and downstream logging, retry, and diagnostic logic.

Solution

  • Map malformed Groth16 exit-code parsing errors to SP1VerificationError::Groth16.
  • Add a regression test that constructs a Groth16 proof with public_inputs[2] = "invalid-exit-code" and verifies that the SDK returns the Groth16 error variant.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Signed-off-by: gluedtea <gluedtea@outlook.com>

This branch has not been deployed

No deployments
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.

1 participant