Skip to content
Draft
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
1 change: 1 addition & 0 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub const INPUT_BYTES: &[u8] = include_bytes!("../../static/proof_input_example.bin");
// pub const INPUT_BYTES: &[u8] = &[42;10_000];
pub const INPUT_BYTES_LENGTH: usize = INPUT_BYTES.len();
11 changes: 9 additions & 2 deletions host/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use chacha20::ChaCha20;
// The ELF is used for proving and the ID is used for verification.
use methods::GUEST_ENCRYPT_ELF;
use risc0_zkvm::sha::rust_crypto::{Digest, Sha256};
use risc0_zkvm::{default_prover, ExecutorEnv};
use risc0_zkvm::{default_prover, ExecutorEnv, ProverOpts, VerifierContext};

use common::INPUT_BYTES;

Expand Down Expand Up @@ -36,7 +36,14 @@ fn main() {

// Proof information by proving the specified ELF binary.
// This struct contains the receipt along with statistics about execution of the guest
let prove_info = prover.prove(env, GUEST_ENCRYPT_ELF).unwrap();
let prove_info = prover
.prove_with_ctx(
env,
&VerifierContext::default(),
GUEST_ENCRYPT_ELF,
&ProverOpts::groth16(),
)
.unwrap();

// extract the receipt.
let receipt = prove_info.receipt;
Expand Down