Skip to content

Commit

Permalink
fix rest of examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam committed Dec 20, 2024
1 parent 6ddeeef commit c88e254
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion book/docs/generating-proofs/proof-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ the size of the execution. Use this in settings where you don't care about **ver

```rust,noplayground
let client = ProverClient::from_env();
client.prove(&pk, stdin).run().unwrap();
client.prove(&pk, &stdin).run().unwrap();
```

## Compressed
Expand Down
2 changes: 1 addition & 1 deletion book/docs/generating-proofs/prover-network/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To use the prover network to generate a proof, you can run your script that uses
// Generate the proof for the given program.
let client = ProverClient::from_env();
let (pk, vk) = client.setup(ELF);
let mut proof = client.prove(&pk, stdin).run().unwrap();
let mut proof = client.prove(&pk, &stdin).run().unwrap();
```

```sh
Expand Down
2 changes: 1 addition & 1 deletion book/static/examples_fibonacci_script_bin_execute.rs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn main() {

// Only execute the program and get a `SP1PublicValues` object.
let client = ProverClient::new();
let (mut public_values, execution_report) = client.execute(ELF, stdin).run().unwrap();
let (mut public_values, execution_report) = client.execute(ELF, &stdin).run().unwrap();

// Print the total number of cycles executed and the full execution report with a breakdown of
// the RISC-V opcode and syscall counts.
Expand Down
2 changes: 1 addition & 1 deletion book/static/examples_fibonacci_script_src_main.rs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn main() {

// Generate the proof for the given program and input.
let (pk, vk) = client.setup(ELF);
let mut proof = client.prove(&pk, stdin).run().unwrap();
let mut proof = client.prove(&pk, &stdin).run().unwrap();

println!("generated proof");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ the size of the execution. Use this in settings where you don't care about **ver

```rust
let client = ProverClient::new();
client.prove(&pk, stdin).run().unwrap();
client.prove(&pk, &stdin).run().unwrap();
```

## Compressed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To use the prover network to generate a proof, you can run your script that uses
// Generate the proof for the given program.
let client = ProverClient::new();
let (pk, vk) = client.setup(ELF);
let mut proof = client.prove(&pk, stdin).run().unwrap();
let mut proof = client.prove(&pk, &stdin).run().unwrap();
```

```sh
Expand Down
2 changes: 1 addition & 1 deletion examples/bls12381/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
let stdin = SP1Stdin::new();

let client = ProverClient::from_env();
let (_public_values, report) = client.execute(ELF, stdin).run().expect("failed to prove");
let (_public_values, report) = client.execute(ELF, &stdin).run().expect("failed to prove");

println!("executed: {}", report);
}
2 changes: 1 addition & 1 deletion examples/bn254/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
let stdin = SP1Stdin::new();

let client = ProverClient::from_env();
let (_public_values, report) = client.execute(ELF, stdin).run().expect("failed to prove");
let (_public_values, report) = client.execute(ELF, &stdin).run().expect("failed to prove");

println!("executed: {}", report);
}
2 changes: 1 addition & 1 deletion examples/chess/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {

let client = ProverClient::from_env();
let (pk, vk) = client.setup(ELF);
let mut proof = client.prove(&pk, stdin).run().unwrap();
let mut proof = client.prove(&pk, &stdin).run().unwrap();

// Read output.
let is_valid_move = proof.public_values.read::<bool>();
Expand Down
2 changes: 1 addition & 1 deletion examples/io/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn main() {
// Generate the proof for the given program.
let client = ProverClient::from_env();
let (pk, vk) = client.setup(ELF);
let mut proof = client.prove(&pk, stdin).run().unwrap();
let mut proof = client.prove(&pk, &stdin).run().unwrap();

// Read the output.
let r = proof.public_values.read::<MyPointUnaligned>();
Expand Down
2 changes: 1 addition & 1 deletion examples/is-prime/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn main() {
// Generate and verify the proof
let client = ProverClient::from_env();
let (pk, vk) = client.setup(ELF);
let mut proof = client.prove(&pk, stdin).run().unwrap();
let mut proof = client.prove(&pk, &stdin).run().unwrap();

let is_prime = proof.public_values.read::<bool>();
println!("Is 29 prime? {}", is_prime);
Expand Down
2 changes: 1 addition & 1 deletion examples/json/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn main() {

let client = ProverClient::from_env();
let (pk, vk) = client.setup(JSON_ELF);
let mut proof = client.prove(&pk, stdin).run().expect("proving failed");
let mut proof = client.prove(&pk, &stdin).run().expect("proving failed");

// Read output.
let val = proof.public_values.read::<String>();
Expand Down
2 changes: 1 addition & 1 deletion examples/patch-testing/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub fn main() {
let stdin = SP1Stdin::new();

let client = ProverClient::from_env();
let (_, report) = client.execute(PATCH_TEST_ELF, stdin).run().expect("executing failed");
let (_, report) = client.execute(PATCH_TEST_ELF, &stdin).run().expect("executing failed");

// Confirm there was at least 1 SHA_COMPUTE syscall.
assert_ne!(report.syscall_counts[sp1_core_executor::syscalls::SyscallCode::SHA_COMPRESS], 0);
Expand Down
2 changes: 1 addition & 1 deletion examples/regex/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn main() {
// Generate the proof for the given program and input.
let client = ProverClient::from_env();
let (pk, vk) = client.setup(REGEX_IO_ELF);
let mut proof = client.prove(&pk, stdin).run().expect("proving failed");
let mut proof = client.prove(&pk, &stdin).run().expect("proving failed");

// Read the output.
let res = proof.public_values.read::<bool>();
Expand Down
2 changes: 1 addition & 1 deletion examples/rsa/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn main() {
// Generate the proof for the given program and input.
let client = ProverClient::from_env();
let (pk, vk) = client.setup(RSA_ELF);
let proof = client.prove(&pk, stdin).run().expect("proving failed");
let proof = client.prove(&pk, &stdin).run().expect("proving failed");

// Verify proof.
client.verify(&proof, &vk).expect("verification failed");
Expand Down
2 changes: 1 addition & 1 deletion examples/rsp/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn main() {
// It is strongly recommended you use the network prover given the size of these programs.
if args.prove {
println!("Starting proof generation.");
let proof = client.prove(&pk, stdin).run().expect("Proving should work.");
let proof = client.prove(&pk, &stdin).run().expect("Proving should work.");
println!("Proof generation finished.");

client.verify(&proof, &vk).expect("proof verification should succeed");
Expand Down
2 changes: 1 addition & 1 deletion examples/ssz-withdrawals/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn main() {
let stdin = SP1Stdin::new();
let client = ProverClient::from_env();
let (pk, vk) = client.setup(ELF);
let proof = client.prove(&pk, stdin).run().expect("proving failed");
let proof = client.prove(&pk, &stdin).run().expect("proving failed");

// Verify proof.
client.verify(&proof, &vk).expect("verification failed");
Expand Down
2 changes: 1 addition & 1 deletion examples/tendermint/script/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn main() {

client.execute(TENDERMINT_ELF, &stdin).run().expect("proving failed");

let proof = client.prove(&pk, stdin).run().expect("proving failed");
let proof = client.prove(&pk, &stdin).run().expect("proving failed");

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

0 comments on commit c88e254

Please sign in to comment.