From eefb57f2c035be1a398f630dd8cfed8b4ccbe348 Mon Sep 17 00:00:00 2001 From: Kamen Mladenov Date: Wed, 30 Apr 2025 17:25:15 +0300 Subject: feat(zkvms_guest_io): Output proof size In each zkVM we'll write the size to /tmp/proof_size and then guest_io will read that value and place it inside our metrics output. This is not the most elegant, and in certain zkVMs the file output is a part of the benchmark timing, but it will have to do. --- zkvms/jolt/host/src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'zkvms/jolt/host/src/main.rs') diff --git a/zkvms/jolt/host/src/main.rs b/zkvms/jolt/host/src/main.rs index aa6b898..8bb3c86 100644 --- a/zkvms/jolt/host/src/main.rs +++ b/zkvms/jolt/host/src/main.rs @@ -1,6 +1,7 @@ use zkvms_host_io::{ benchmarkable, read_args, RunType::{Execute, Prove, Verify}, + output_proof_size, }; pub fn main() { @@ -16,11 +17,17 @@ pub fn main() { match run_info.run_type { Execute => unreachable!(), Prove => benchmarkable! { - let (output, _) = prove_guest(run_info.input.clone().into()); + let (output, proof) = prove_guest(run_info.input.clone().into()); + + output_proof_size(&proof); + println!("Prove output: {:?}", output); }, Verify => benchmarkable! { let (_, proof) = prove_guest(run_info.input.clone().into()); + + output_proof_size(&proof); + let is_valid = verify_guest(proof); println!("Verify is valid: {:?}", is_valid); }, -- cgit v1.2.3