diff --git a/crates/sdk/src/cpu/mod.rs b/crates/sdk/src/cpu/mod.rs index a7e4d8328..9008318aa 100644 --- a/crates/sdk/src/cpu/mod.rs +++ b/crates/sdk/src/cpu/mod.rs @@ -114,7 +114,7 @@ impl CpuProver { // If we're in mock mode, return a mock proof. if self.mock { - return self.mock_prove_impl(pk, stdin, mode); + return self.mock_prove_impl(pk, stdin, context, mode); } // Generate the core proof. @@ -186,13 +186,13 @@ impl CpuProver { } } - pub(crate) fn mock_prove_impl( - &self, + pub(crate) fn mock_prove_impl<'a>( + &'a self, pk: &SP1ProvingKey, stdin: &SP1Stdin, + context: SP1Context<'a>, mode: SP1ProofMode, ) -> Result { - let context = SP1Context::default(); let (public_values, _) = self.prover.execute(&pk.elf, stdin, context)?; Ok(SP1ProofWithPublicValues::create_mock_proof(pk, public_values, mode, self.version())) } diff --git a/crates/sdk/src/cpu/prove.rs b/crates/sdk/src/cpu/prove.rs index 2f1330180..d6efa2bed 100644 --- a/crates/sdk/src/cpu/prove.rs +++ b/crates/sdk/src/cpu/prove.rs @@ -288,7 +288,7 @@ impl<'a> CpuProveBuilder<'a> { // Run the prover. if mock { - prover.mock_prove_impl(pk, &stdin, mode) + prover.mock_prove_impl(pk, &stdin, context, mode) } else { prover.prove_impl(pk, &stdin, opts, context, mode) }