Skip to content

Commit

Permalink
fix: fibonacci default-run bin (succinctlabs#756)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam authored May 19, 2024
1 parent 9d41254 commit 4897b0d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
7 changes: 6 additions & 1 deletion examples/fibonacci/script/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
version = "0.1.0"
name = "fibonacci-script"
edition = "2021"
default-run = "fibonacci-script"

[dependencies]
itertools = "0.12.1"
Expand All @@ -21,4 +22,8 @@ path = "bin/compressed.rs"

[[bin]]
name = "execute"
path = "bin/execute.rs"
path = "bin/execute.rs"

[[bin]]
name = "fibonacci-script"
path = "src/main.rs"
6 changes: 4 additions & 2 deletions examples/fibonacci/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn main() {
// Generate the proof for the given program and input.
let client = ProverClient::new();
let (pk, vk) = client.setup(ELF);
let mut proof = client.prove(&pk, stdin).unwrap();
let mut proof = client.prove_compressed(&pk, stdin).unwrap();

println!("generated proof");

Expand All @@ -29,7 +29,9 @@ fn main() {
println!("b: {}", b);

// Verify proof and public values
client.verify(&proof, &vk).expect("verification failed");
client
.verify_compressed(&proof, &vk)
.expect("verification failed");

// Save the proof.
proof
Expand Down
Binary file modified examples/ssz-withdrawals/program/elf/riscv32im-succinct-zkvm-elf
Binary file not shown.
6 changes: 4 additions & 2 deletions examples/ssz-withdrawals/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ fn main() {
let stdin = SP1Stdin::new();
let client = ProverClient::new();
let (pk, vk) = client.setup(ELF);
let proof = client.prove(&pk, stdin).expect("proving failed");
let proof = client.prove_compressed(&pk, stdin).expect("proving failed");

// Verify proof.
client.verify(&proof, &vk).expect("verification failed");
client
.verify_compressed(&proof, &vk)
.expect("verification failed");

// Save proof.
proof
Expand Down
Binary file modified examples/tendermint/program/elf/riscv32im-succinct-zkvm-elf
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/tendermint/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ fn main() {

let client = ProverClient::new();
let (pk, vk) = client.setup(TENDERMINT_ELF);
let proof = client.prove(&pk, stdin).expect("proving failed");
let proof = client.prove_compressed(&pk, stdin).expect("proving failed");

// Verify proof.
client
.verify(&proof, &vk)
.verify_compressed(&proof, &vk)
.expect("verification failed");

// Verify the public values
Expand Down

0 comments on commit 4897b0d

Please sign in to comment.