diff options
| author | Kamen Mladenov <kamen@syndamia.com> | 2025-02-10 16:00:55 +0200 |
|---|---|---|
| committer | Kamen Mladenov <kamen@syndamia.com> | 2025-02-10 16:00:55 +0200 |
| commit | 6a310e1ae93acb0cf8943406322b6d01249a4ae4 (patch) | |
| tree | 38ec2c6c74b926bbc45c87d288540b4236a4c226 /zkvms/risc0/host | |
| parent | 85d00444e304974d386134ba1faffd554aac79ad (diff) | |
| download | zkVMs-benchmarks-6a310e1ae93acb0cf8943406322b6d01249a4ae4.tar zkVMs-benchmarks-6a310e1ae93acb0cf8943406322b6d01249a4ae4.tar.gz zkVMs-benchmarks-6a310e1ae93acb0cf8943406322b6d01249a4ae4.zip | |
fix(zkvms/risc0): Revert changes to benchmark only the relevant function calls
Diffstat (limited to 'zkvms/risc0/host')
| -rw-r--r-- | zkvms/risc0/host/src/main.rs | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/zkvms/risc0/host/src/main.rs b/zkvms/risc0/host/src/main.rs index 6b255bd..c214c4e 100644 --- a/zkvms/risc0/host/src/main.rs +++ b/zkvms/risc0/host/src/main.rs @@ -35,42 +35,38 @@ fn main() { let run_info = read_args(); match run_info.run_type { - Execute => { + Execute => benchmarkable! { + // ExecutorEnv does not derive Clone let env = build_env(&run_info.input); let exec = default_executor(); - benchmarkable! { - let output = default_executor() - .execute(env, HELLO_GUEST_ELF) - .unwrap() - .receipt_claim - .unwrap() - .output - .value() - .unwrap(); - println!("{:#?}", output); - } + let output = default_executor() + .execute(env, HELLO_GUEST_ELF) + .unwrap() + .receipt_claim + .unwrap() + .output + .value() + .unwrap(); + println!("{:#?}", output); }, - Prove => { + Prove => benchmarkable! { + // ExecutorEnv does not derive Clone let env = build_env(&run_info.input); - - benchmarkable! { - let receipt = prove(env); - println!("Output from journal: {:?}", journal(receipt)); - } + let receipt = prove(env); + println!("Output from journal: {:?}", journal(receipt)); }, - Verify => { + Verify => benchmarkable!{ // https://github.com/risc0/risc0/blob/881e512732eca72849b2d0e263a1242aba3158af/risc0/build/src/lib.rs#L197-L199 let guest_id: Digest = Digest::from_hex(HELLO_GUEST_ID).unwrap(); + // ExecutorEnv does not derive Clone let env = build_env(&run_info.input); let receipt = prove(env); - benchmarkable! { - receipt.verify(guest_id).unwrap(); - println!("Output from verify: {:?}", journal(receipt)); - } + let receipt = receipt.clone(); + receipt.verify(guest_id.clone()).unwrap(); + println!("Output from verify: {:?}", journal(receipt)); }, } } - |
