You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The images in the blog show the results that need to be executed in the process of generating proof. But I don't think the specific program is like that.
use sp1_sdk::{include_elf, utils,ProverClient,SP1Stdin};/// The ELF we want to execute inside the zkVM.constELF:&[u8] = include_elf!("fibonacci-program");fnmain(){// Setup logging.
utils::setup_logger();// Create an input stream and write '500' to it.let n = 500u32;letmut stdin = SP1Stdin::new();
stdin.write(&n);// Generate the constant-sized proof for the given program and input.let client = ProverClient::new();let(pk, vk) = client.setup(ELF);letmut proof = client.prove(&pk, stdin).compressed().run().unwrap();println!("generated proof");// Read and verify the output.let a = proof.public_values.read::<u32>();let b = proof.public_values.read::<u32>();println!("a: {}, b: {}", a, b);// Verify proof and public values
client.verify(&proof,&vk).expect("verification failed");// Save the proof.
proof.save("compressed-proof-with-pis.bin").expect("saving proof failed");println!("successfully generated and verified proof for the program!")}
In this case program, there is no need to execute the program before generating the proof. So how to ensure that the proof meets the execution results
Additional context
No response
The text was updated successfully, but these errors were encountered:
Component
sp1-zkvm
Describe the feature you would like
The images in the blog show the results that need to be executed in the process of generating proof. But I don't think the specific program is like that.
In this case program, there is no need to execute the program before generating the proof. So how to ensure that the proof meets the execution results
Additional context
No response
The text was updated successfully, but these errors were encountered: