Skip to content

chore: avoid opaque "Program simulation failed" - #362

Open
hadjiszs wants to merge 2 commits into
mainfrom
rm-program-sim
Open

chore: avoid opaque "Program simulation failed"#362
hadjiszs wants to merge 2 commits into
mainfrom
rm-program-sim

Conversation

@hadjiszs

Copy link
Copy Markdown
Contributor

Context

This opaque error happens time to time in testnet

AggchainProofBuilderRequestFailed(ProverFailedToExecute(ProverFailed(\"Program simulation failed\")))"}

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

  • Introduce a local execution to surface the error in clear prior to submitting it to the proving cluster
  • Add skip_simulation(true) to avoid redundant local execution.

@hadjiszs
hadjiszs requested a review from a team as a code owner June 30, 2026 12:46

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hadjiszs what do you think?

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.

2 participants