Skip to content

Commit

Permalink
feat: set deferred prove verification skip in run
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Nov 8, 2024
1 parent a9412b9 commit 09d25a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/sdk/src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ impl<'a> Prove<'a> {
} = self;
let opts = SP1ProverOpts { core_opts, recursion_opts };
let proof_opts = ProofOpts { sp1_prover_opts: opts, timeout };
context_builder.set_skip_deferred_proof_verification(skip_deferred_proof_verification);
let context = context_builder.build();

// Dump the program and stdin to files for debugging if `SP1_DUMP` is set.
Expand Down
2 changes: 2 additions & 0 deletions crates/sdk/src/provers/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ impl Prover<DefaultProverComponents> for MockProver {
})
}
SP1ProofKind::Groth16 => {
// TODO: The issue is that .prove() invokes execution in the Groth16 case, which
// will attempt to verify the proof according to the stdin.
let (public_values, _) = self.prover.execute(&pk.elf, &stdin, context)?;
Ok(SP1ProofWithPublicValues {
proof: SP1Proof::Groth16(Groth16Bn254Proof {
Expand Down
3 changes: 3 additions & 0 deletions crates/stark/src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ impl<SC: StarkGenericConfig, A: MachineAir<Val<SC>>> StarkMachine<SC, A> {
if contains_global_bus {
challenger.observe(shard_proof.commitment.global_main_commit.clone());
}
// TODO: In mock mode, the public values of the compressed proof is vec![]
// This causes a panic because it's trying to index into the slice past the slice's length.
// What's the best way to turn off this check in the veriifer.
challenger.observe_slice(&shard_proof.public_values[0..self.num_pv_elts()]);
});
});
Expand Down

0 comments on commit 09d25a0

Please sign in to comment.