Skip to content

Commit

Permalink
fix: remove stdin from SP1ProofWithPublicValues (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtguibas authored Oct 30, 2024
1 parent ff8f482 commit 4451903
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 59 deletions.
44 changes: 22 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 21 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace.package]
version = "3.0.0"
version = "3.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/succinctlabs/sp1"
Expand Down Expand Up @@ -46,26 +46,26 @@ debug-assertions = true

[workspace.dependencies]
# sp1
sp1-build = { path = "crates/build", version = "3.0.0" }
sp1-cli = { path = "crates/cli", version = "3.0.0", default-features = false }
sp1-core-machine = { path = "crates/core/machine", version = "3.0.0" }
sp1-core-executor = { path = "crates/core/executor", version = "3.0.0" }
sp1-curves = { path = "crates/curves", version = "3.0.0" }
sp1-derive = { path = "crates/derive", version = "3.0.0" }
sp1-eval = { path = "crates/eval", version = "3.0.0" }
sp1-helper = { path = "crates/helper", version = "3.0.0", default-features = false }
sp1-primitives = { path = "crates/primitives", version = "3.0.0" }
sp1-prover = { path = "crates/prover", version = "3.0.0" }
sp1-recursion-compiler = { path = "crates/recursion/compiler", version = "3.0.0" }
sp1-recursion-core = { path = "crates/recursion/core", version = "3.0.0", default-features = false }
sp1-recursion-derive = { path = "crates/recursion/derive", version = "3.0.0", default-features = false }
sp1-recursion-gnark-ffi = { path = "crates/recursion/gnark-ffi", version = "3.0.0", default-features = false }
sp1-recursion-circuit = { path = "crates/recursion/circuit", version = "3.0.0", default-features = false }
sp1-sdk = { path = "crates/sdk", version = "3.0.0" }
sp1-cuda = { path = "crates/cuda", version = "3.0.0" }
sp1-stark = { path = "crates/stark", version = "3.0.0" }
sp1-lib = { path = "crates/zkvm/lib", version = "3.0.0", default-features = false }
sp1-zkvm = { path = "crates/zkvm/entrypoint", version = "3.0.0", default-features = false }
sp1-build = { path = "crates/build", version = "3.1.0" }
sp1-cli = { path = "crates/cli", version = "3.1.0", default-features = false }
sp1-core-machine = { path = "crates/core/machine", version = "3.1.0" }
sp1-core-executor = { path = "crates/core/executor", version = "3.1.0" }
sp1-curves = { path = "crates/curves", version = "3.1.0" }
sp1-derive = { path = "crates/derive", version = "3.1.0" }
sp1-eval = { path = "crates/eval", version = "3.1.0" }
sp1-helper = { path = "crates/helper", version = "3.1.0", default-features = false }
sp1-primitives = { path = "crates/primitives", version = "3.1.0" }
sp1-prover = { path = "crates/prover", version = "3.1.0" }
sp1-recursion-compiler = { path = "crates/recursion/compiler", version = "3.1.0" }
sp1-recursion-core = { path = "crates/recursion/core", version = "3.1.0", default-features = false }
sp1-recursion-derive = { path = "crates/recursion/derive", version = "3.1.0", default-features = false }
sp1-recursion-gnark-ffi = { path = "crates/recursion/gnark-ffi", version = "3.1.0", default-features = false }
sp1-recursion-circuit = { path = "crates/recursion/circuit", version = "3.1.0", default-features = false }
sp1-sdk = { path = "crates/sdk", version = "3.1.0" }
sp1-cuda = { path = "crates/cuda", version = "3.1.0" }
sp1-stark = { path = "crates/stark", version = "3.1.0" }
sp1-lib = { path = "crates/zkvm/lib", version = "3.1.0", default-features = false }
sp1-zkvm = { path = "crates/zkvm/entrypoint", version = "3.1.0", default-features = false }

# p3
p3-air = "0.1.4-succinct"
Expand Down
2 changes: 0 additions & 2 deletions crates/core/executor/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,6 @@ impl<'a> Executor<'a> {
let instruction = self.fetch();

// Log the current state of the runtime.
#[cfg(debug_assertions)]
self.log(&instruction);

// Execute the instruction.
Expand Down Expand Up @@ -1661,7 +1660,6 @@ impl<'a> Executor<'a> {
}

#[inline]
#[cfg(debug_assertions)]
fn log(&mut self, _: &Instruction) {
// Write the current program counter to the trace buffer for the cycle tracer.
if let Some(ref mut buf) = self.trace_buf {
Expand Down
2 changes: 0 additions & 2 deletions crates/sdk/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::{fmt::Debug, fs::File, path::Path};
use anyhow::Result;
use serde::{Deserialize, Serialize};
use sp1_core_executor::SP1ReduceProof;
use sp1_core_machine::io::SP1Stdin;
use sp1_primitives::io::SP1PublicValues;
use strum_macros::{EnumDiscriminants, EnumTryAs};

Expand All @@ -26,7 +25,6 @@ pub enum SP1Proof {
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SP1ProofWithPublicValues {
pub proof: SP1Proof,
pub stdin: SP1Stdin,
pub public_values: SP1PublicValues,
pub sp1_version: String,
}
Expand Down
4 changes: 0 additions & 4 deletions crates/sdk/src/provers/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ impl Prover<DefaultProverComponents> for CpuProver {
if kind == SP1ProofKind::Core {
return Ok(SP1ProofWithPublicValues {
proof: SP1Proof::Core(proof.proof.0),
stdin: proof.stdin,
public_values: proof.public_values,
sp1_version: self.version().to_string(),
});
Expand All @@ -72,7 +71,6 @@ impl Prover<DefaultProverComponents> for CpuProver {
if kind == SP1ProofKind::Compressed {
return Ok(SP1ProofWithPublicValues {
proof: SP1Proof::Compressed(Box::new(reduce_proof)),
stdin,
public_values,
sp1_version: self.version().to_string(),
});
Expand All @@ -97,7 +95,6 @@ impl Prover<DefaultProverComponents> for CpuProver {

return Ok(SP1ProofWithPublicValues {
proof: SP1Proof::Plonk(proof),
stdin,
public_values,
sp1_version: self.version().to_string(),
});
Expand All @@ -114,7 +111,6 @@ impl Prover<DefaultProverComponents> for CpuProver {
let proof = self.prover.wrap_groth16_bn254(outer_proof, &groth16_bn254_artifacts);
return Ok(SP1ProofWithPublicValues {
proof: SP1Proof::Groth16(proof),
stdin,
public_values,
sp1_version: self.version().to_string(),
});
Expand Down
4 changes: 0 additions & 4 deletions crates/sdk/src/provers/cuda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ impl Prover<DefaultProverComponents> for CudaProver {
if kind == SP1ProofKind::Core {
return Ok(SP1ProofWithPublicValues {
proof: SP1Proof::Core(proof.proof.0),
stdin: proof.stdin,
public_values: proof.public_values,
sp1_version: self.version().to_string(),
});
Expand All @@ -67,7 +66,6 @@ impl Prover<DefaultProverComponents> for CudaProver {
if kind == SP1ProofKind::Compressed {
return Ok(SP1ProofWithPublicValues {
proof: SP1Proof::Compressed(Box::new(reduce_proof)),
stdin,
public_values,
sp1_version: self.version().to_string(),
});
Expand All @@ -91,7 +89,6 @@ impl Prover<DefaultProverComponents> for CudaProver {
let proof = self.prover.wrap_plonk_bn254(outer_proof, &plonk_bn254_artifacts);
return Ok(SP1ProofWithPublicValues {
proof: SP1Proof::Plonk(proof),
stdin,
public_values,
sp1_version: self.version().to_string(),
});
Expand All @@ -108,7 +105,6 @@ impl Prover<DefaultProverComponents> for CudaProver {
let proof = self.prover.wrap_groth16_bn254(outer_proof, &groth16_bn254_artifacts);
return Ok(SP1ProofWithPublicValues {
proof: SP1Proof::Groth16(proof),
stdin,
public_values,
sp1_version: self.version().to_string(),
});
Expand Down
4 changes: 0 additions & 4 deletions crates/sdk/src/provers/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ impl Prover<DefaultProverComponents> for MockProver {
let (public_values, _) = self.prover.execute(&pk.elf, &stdin, context)?;
Ok(SP1ProofWithPublicValues {
proof: SP1Proof::Core(vec![]),
stdin,
public_values,
sp1_version: self.version().to_string(),
})
Expand Down Expand Up @@ -102,7 +101,6 @@ impl Prover<DefaultProverComponents> for MockProver {

Ok(SP1ProofWithPublicValues {
proof,
stdin,
public_values,
sp1_version: self.version().to_string(),
})
Expand All @@ -119,7 +117,6 @@ impl Prover<DefaultProverComponents> for MockProver {
raw_proof: "".to_string(),
plonk_vkey_hash: [0; 32],
}),
stdin,
public_values,
sp1_version: self.version().to_string(),
})
Expand All @@ -136,7 +133,6 @@ impl Prover<DefaultProverComponents> for MockProver {
raw_proof: "".to_string(),
groth16_vkey_hash: [0; 32],
}),
stdin,
public_values,
sp1_version: self.version().to_string(),
})
Expand Down

0 comments on commit 4451903

Please sign in to comment.