chore: avoid opaque "Program simulation failed" - #362
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33e317bc56
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ProofType::Plonk => prover.prove(&proving_key, stdin).plonk(), | ||
| ProofType::Stark => prover.prove(&proving_key, stdin).compressed(), | ||
| } | ||
| .skip_simulation(true) |
There was a problem hiding this comment.
Preserve the simulated public-values hash
When this runs against the network, setting skip_simulation(true) makes the SP1 SDK bypass its get_execution_limits simulation path; in v6.2.2 that path is the only place that attaches the simulated committed_value_digest as public_values_hash to the proof request. This patch still executes locally but discards that digest, so a reserved/network prover can return any valid proof for the same program and the subsequent verify(&proof, &verification_key, None) will not check that its public values match the stdin that was just executed. Please either let the SDK simulation run or pass the locally computed public-values hash through to the network request.
Useful? React with 👍 / 👎.
Context
This opaque error happens time to time in testnet
This is a failure of the program execution prior to be submitted to the proving cluster.
Most of the time it is hard to understand the failure.
Approach
skip_simulation(true)to avoid redundant local execution.