Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fibonacci default-run bin #756

Merged
merged 2 commits into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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