fix(sdk): enforce mock proof exit status#2820
Open
peter941221 wants to merge 1 commit into
Open
Conversation
7734789 to
5d938c3
Compare
This was referenced Jun 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #2817
Failure mechanism
MockProver accepted the same mock proof under different expected exit statuses because the async and blocking mock verify paths ignored the requested status, while mock proof construction hard-coded success semantics.
Semantic change
Propagate the actual execution exit code into mock proofs, enforce expected exit status during async and blocking mock verification, and add regression coverage across Core, Compressed, Plonk, and Groth16 mock proofs.
Preserved invariants
SP1ProofWithPublicValues keeps the same field layout. Plonk and Groth16 mock verification still checks the same vkey and public-values bindings, and Core / Compressed mock proofs stay mock-only.
Testing
cargo +nightly fmt --all
Attempted cargo check -p sp1-sdk and cargo test -p sp1-sdk mock -- --nocapture, but this Windows machine is blocked upstream by a missing protoc binary for sp1-prover-types and by Unix-only sp1-jit imports in crates/core/jit.