diff options
| author | Kamen Mladenov <kamen@syndamia.com> | 2025-04-30 17:25:15 +0300 |
|---|---|---|
| committer | Kamen Mladenov <kamen@syndamia.com> | 2025-05-02 15:32:54 +0300 |
| commit | eefb57f2c035be1a398f630dd8cfed8b4ccbe348 (patch) | |
| tree | 598cc4a5d784addf59bad7323018260b977ed6c2 /zkvms/nexus/host/src/main.rs | |
| parent | 400c41f4f408aee6002489633914cd74ca888ff4 (diff) | |
| download | zkVMs-benchmarks-eefb57f2c035be1a398f630dd8cfed8b4ccbe348.tar zkVMs-benchmarks-eefb57f2c035be1a398f630dd8cfed8b4ccbe348.tar.gz zkVMs-benchmarks-eefb57f2c035be1a398f630dd8cfed8b4ccbe348.zip | |
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.
Diffstat (limited to 'zkvms/nexus/host/src/main.rs')
| -rw-r--r-- | zkvms/nexus/host/src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/zkvms/nexus/host/src/main.rs b/zkvms/nexus/host/src/main.rs index 9693d02..68593fc 100644 --- a/zkvms/nexus/host/src/main.rs +++ b/zkvms/nexus/host/src/main.rs @@ -2,6 +2,7 @@ use nexus_sdk::{stwo::seq::Stwo, Local, Prover, Verifiable, Viewable}; use zkvms_host_io::{ benchmarkable, read_args, Input, Return, RunType::{Execute, Prove, Verify}, + output_proof_size, }; fn main() { @@ -20,10 +21,12 @@ fn main() { let prover: Stwo<Local> = Stwo::new_from_file(&elf_path).expect("failed to load guest program"); println!("Proving execution of vm..."); - let (view, _) = prover + let (view, proof) = prover .prove_with_input(&run_info.private_input, &run_info.public_input) .expect("failed to prove program"); + output_proof_size(&proof); + println!( " output is {:?}!", view @@ -44,6 +47,8 @@ fn main() { .prove_with_input(&run_info.private_input, &run_info.public_input) .expect("failed to prove program"); + output_proof_size(&proof); + println!( " output is {:?}!", view.public_output::<Return>() |
