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 f29575d commit 1ade34f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
58 changes: 29 additions & 29 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
2 changes: 1 addition & 1 deletion recursion/gnark-ffi/go/sp1/babybear/babybear.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (c *Chip) AddF(a, b Variable) Variable {
}
return c.reduceFast(Variable{
Value: c.api.Add(a.Value, b.Value),
NbBits: maxBits + 1,
NbBits: maxBits,
})
}

Expand Down

0 comments on commit 1ade34f

Please sign in to comment.