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

[refactor] Always check program commitment in each proof generation #75

Merged
merged 3 commits into from
Mar 13, 2025

Conversation

noel2004
Copy link
Member

We can only get program commitment by AppExecutionCommit::compute route (or launch a verifcation progress)

This PR make sanity check by compute thie commitment every time a proof (snark or stark) is generated.

@noel2004 noel2004 requested a review from roynalnaruto as a code owner March 11, 2025 10:59
@github-actions github-actions bot added the crate-prover Updates to the prover crate label Mar 11, 2025
@github-actions github-actions bot added crate-verifier Updates to the verifier crate crate-integration Updates to the integration crate labels Mar 11, 2025
@@ -572,6 +587,9 @@ impl<Type: ProverType> Prover<Type> {
///
/// [evm_proof][openvm_native_recursion::halo2::EvmProof]
fn gen_proof_snark(&self, task: &Type::ProvingTask) -> Result<EvmProof, Error> {
// sanity check
let _ = Self::get_verify_program_commitment(&self.app_committed_exe, &self.app_pk, false);

Copy link
Contributor

Choose a reason for hiding this comment

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

you cannot pick commitments from StarkProof. But it is easy to pick from EvmProof? just instance[0][12] and instance[0][13]?

i want to also check that.

Copy link
Contributor

Choose a reason for hiding this comment

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

in gen_proof_snark, i think we don't do this get_verify_program_commitment. just assert_eq commitments_in_evm_proof == Type::commitment

@lispc lispc merged commit 9383a23 into release/0.1.0-rc.6 Mar 13, 2025
4 checks passed
lispc pushed a commit that referenced this pull request Mar 13, 2025
)

* refactor: always check program commitment in each proof generation

* fmt

* fix issue in bundle e2e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate-integration Updates to the integration crate crate-prover Updates to the prover crate crate-verifier Updates to the verifier crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants