From c88e254530a9935693b5c40c6514712a8d0e6fcf Mon Sep 17 00:00:00 2001 From: mattstam Date: Fri, 20 Dec 2024 12:54:58 -0800 Subject: [PATCH] fix rest of examples --- book/docs/generating-proofs/proof-types.md | 2 +- book/docs/generating-proofs/prover-network/usage.md | 2 +- book/static/examples_fibonacci_script_bin_execute.rs.mdx | 2 +- book/static/examples_fibonacci_script_src_main.rs.mdx | 2 +- .../version-3.4.0/generating-proofs/proof-types.md | 2 +- .../version-3.4.0/generating-proofs/prover-network/usage.md | 2 +- examples/bls12381/script/src/main.rs | 2 +- examples/bn254/script/src/main.rs | 2 +- examples/chess/script/src/main.rs | 2 +- examples/io/script/src/main.rs | 2 +- examples/is-prime/script/src/main.rs | 2 +- examples/json/script/src/main.rs | 2 +- examples/patch-testing/script/src/main.rs | 2 +- examples/regex/script/src/main.rs | 2 +- examples/rsa/script/src/main.rs | 2 +- examples/rsp/script/src/main.rs | 2 +- examples/ssz-withdrawals/script/src/main.rs | 2 +- examples/tendermint/script/src/main.rs | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/book/docs/generating-proofs/proof-types.md b/book/docs/generating-proofs/proof-types.md index 581a751d3..4404fb371 100644 --- a/book/docs/generating-proofs/proof-types.md +++ b/book/docs/generating-proofs/proof-types.md @@ -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 diff --git a/book/docs/generating-proofs/prover-network/usage.md b/book/docs/generating-proofs/prover-network/usage.md index 388c61efd..77eef1f08 100644 --- a/book/docs/generating-proofs/prover-network/usage.md +++ b/book/docs/generating-proofs/prover-network/usage.md @@ -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 diff --git a/book/static/examples_fibonacci_script_bin_execute.rs.mdx b/book/static/examples_fibonacci_script_bin_execute.rs.mdx index 46d2bb875..84175f301 100644 --- a/book/static/examples_fibonacci_script_bin_execute.rs.mdx +++ b/book/static/examples_fibonacci_script_bin_execute.rs.mdx @@ -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. diff --git a/book/static/examples_fibonacci_script_src_main.rs.mdx b/book/static/examples_fibonacci_script_src_main.rs.mdx index f8267ee03..c779c5f94 100644 --- a/book/static/examples_fibonacci_script_src_main.rs.mdx +++ b/book/static/examples_fibonacci_script_src_main.rs.mdx @@ -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"); diff --git a/book/versioned_docs/version-3.4.0/generating-proofs/proof-types.md b/book/versioned_docs/version-3.4.0/generating-proofs/proof-types.md index c6d713e75..d7d56ac67 100644 --- a/book/versioned_docs/version-3.4.0/generating-proofs/proof-types.md +++ b/book/versioned_docs/version-3.4.0/generating-proofs/proof-types.md @@ -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 diff --git a/book/versioned_docs/version-3.4.0/generating-proofs/prover-network/usage.md b/book/versioned_docs/version-3.4.0/generating-proofs/prover-network/usage.md index 12ef4ac4e..f17324113 100644 --- a/book/versioned_docs/version-3.4.0/generating-proofs/prover-network/usage.md +++ b/book/versioned_docs/version-3.4.0/generating-proofs/prover-network/usage.md @@ -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 diff --git a/examples/bls12381/script/src/main.rs b/examples/bls12381/script/src/main.rs index 7e6c02fd4..096c805db 100644 --- a/examples/bls12381/script/src/main.rs +++ b/examples/bls12381/script/src/main.rs @@ -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); } diff --git a/examples/bn254/script/src/main.rs b/examples/bn254/script/src/main.rs index cd9c6e505..7aa091e1f 100644 --- a/examples/bn254/script/src/main.rs +++ b/examples/bn254/script/src/main.rs @@ -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); } diff --git a/examples/chess/script/src/main.rs b/examples/chess/script/src/main.rs index 3a1df33e5..a08496647 100644 --- a/examples/chess/script/src/main.rs +++ b/examples/chess/script/src/main.rs @@ -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::(); diff --git a/examples/io/script/src/main.rs b/examples/io/script/src/main.rs index 008c69e09..fa8812c38 100644 --- a/examples/io/script/src/main.rs +++ b/examples/io/script/src/main.rs @@ -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::(); diff --git a/examples/is-prime/script/src/main.rs b/examples/is-prime/script/src/main.rs index c96577574..1d866645e 100644 --- a/examples/is-prime/script/src/main.rs +++ b/examples/is-prime/script/src/main.rs @@ -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::(); println!("Is 29 prime? {}", is_prime); diff --git a/examples/json/script/src/main.rs b/examples/json/script/src/main.rs index 4c3eaa03a..6c98a6e48 100644 --- a/examples/json/script/src/main.rs +++ b/examples/json/script/src/main.rs @@ -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::(); diff --git a/examples/patch-testing/script/src/main.rs b/examples/patch-testing/script/src/main.rs index 5e85f2b82..7195bfee4 100644 --- a/examples/patch-testing/script/src/main.rs +++ b/examples/patch-testing/script/src/main.rs @@ -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); diff --git a/examples/regex/script/src/main.rs b/examples/regex/script/src/main.rs index 63c8c6fe6..e5ddb0c07 100644 --- a/examples/regex/script/src/main.rs +++ b/examples/regex/script/src/main.rs @@ -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::(); diff --git a/examples/rsa/script/src/main.rs b/examples/rsa/script/src/main.rs index 991a458d7..1b7cae848 100644 --- a/examples/rsa/script/src/main.rs +++ b/examples/rsa/script/src/main.rs @@ -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"); diff --git a/examples/rsp/script/src/main.rs b/examples/rsp/script/src/main.rs index ddc57f83d..f1dabaceb 100644 --- a/examples/rsp/script/src/main.rs +++ b/examples/rsp/script/src/main.rs @@ -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"); diff --git a/examples/ssz-withdrawals/script/src/main.rs b/examples/ssz-withdrawals/script/src/main.rs index 9a6450bc7..0da068396 100644 --- a/examples/ssz-withdrawals/script/src/main.rs +++ b/examples/ssz-withdrawals/script/src/main.rs @@ -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"); diff --git a/examples/tendermint/script/src/main.rs b/examples/tendermint/script/src/main.rs index 30902beb8..43ac8cbef 100644 --- a/examples/tendermint/script/src/main.rs +++ b/examples/tendermint/script/src/main.rs @@ -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");