Skip to content

Commit

Permalink
hm
Browse files Browse the repository at this point in the history
  • Loading branch information
jtguibas committed Aug 1, 2024
1 parent 6ed0bb5 commit f29575d
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -760,45 +760,45 @@ pub mod tests {
tracing::info!("setup elf");
let (pk, vk) = prover.setup(elf);

// tracing::info!("prove core");
// let stdin = SP1Stdin::new();
// let core_proof = prover.prove_core(&pk, &stdin, opts, context)?;
// let public_values = core_proof.public_values.clone();
tracing::info!("prove core");
let stdin = SP1Stdin::new();
let core_proof = prover.prove_core(&pk, &stdin, opts, context)?;
let public_values = core_proof.public_values.clone();

// tracing::info!("verify core");
// prover.verify(&core_proof.proof, &vk)?;
tracing::info!("verify core");
prover.verify(&core_proof.proof, &vk)?;

// if test_kind == Test::Core {
// return Ok(());
// }
if test_kind == Test::Core {
return Ok(());
}

// tracing::info!("compress");
// let compressed_proof = prover.compress(&vk, core_proof, vec![], opts)?;
tracing::info!("compress");
let compressed_proof = prover.compress(&vk, core_proof, vec![], opts)?;

// tracing::info!("verify compressed");
// prover.verify_compressed(&compressed_proof, &vk)?;
tracing::info!("verify compressed");
prover.verify_compressed(&compressed_proof, &vk)?;

// if test_kind == Test::Compress {
// return Ok(());
// }
if test_kind == Test::Compress {
return Ok(());
}

// tracing::info!("shrink");
// let shrink_proof = prover.shrink(compressed_proof, opts)?;
tracing::info!("shrink");
let shrink_proof = prover.shrink(compressed_proof, opts)?;

// tracing::info!("verify shrink");
// prover.verify_shrink(&shrink_proof, &vk)?;
tracing::info!("verify shrink");
prover.verify_shrink(&shrink_proof, &vk)?;

// if test_kind == Test::Shrink {
// return Ok(());
// }
if test_kind == Test::Shrink {
return Ok(());
}

// tracing::info!("wrap bn254");
// let wrapped_bn254_proof = prover.wrap_bn254(shrink_proof, opts)?;
// let bytes = bincode::serialize(&wrapped_bn254_proof).unwrap();
tracing::info!("wrap bn254");
let wrapped_bn254_proof = prover.wrap_bn254(shrink_proof, opts)?;
let bytes = bincode::serialize(&wrapped_bn254_proof).unwrap();

// // Save the proof.
// let mut file = File::create("proof-with-pis.bin").unwrap();
// file.write_all(bytes.as_slice()).unwrap();
// Save the proof.
let mut file = File::create("proof-with-pis.bin").unwrap();
file.write_all(bytes.as_slice()).unwrap();

// Load the proof.
let mut file = File::open("proof-with-pis.bin").unwrap();
Expand Down Expand Up @@ -828,7 +828,7 @@ pub mod tests {
let plonk_bn254_proof = prover.wrap_plonk_bn254(wrapped_bn254_proof, &artifacts_dir);
println!("{:?}", plonk_bn254_proof);

// prover.verify_plonk_bn254(&plonk_bn254_proof, &vk, &public_values, &artifacts_dir)?;
prover.verify_plonk_bn254(&plonk_bn254_proof, &vk, &public_values, &artifacts_dir)?;

Ok(())
}
Expand Down

0 comments on commit f29575d

Please sign in to comment.