aboutsummaryrefslogtreecommitdiff
path: root/zkvms/zkwasm/host/src
diff options
context:
space:
mode:
authorKamen Mladenov <kamen@syndamia.com>2025-04-30 17:25:15 +0300
committerKamen Mladenov <kamen@syndamia.com>2025-05-02 15:32:54 +0300
commiteefb57f2c035be1a398f630dd8cfed8b4ccbe348 (patch)
tree598cc4a5d784addf59bad7323018260b977ed6c2 /zkvms/zkwasm/host/src
parent400c41f4f408aee6002489633914cd74ca888ff4 (diff)
downloadzkVMs-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/zkwasm/host/src')
-rw-r--r--zkvms/zkwasm/host/src/main.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/zkvms/zkwasm/host/src/main.rs b/zkvms/zkwasm/host/src/main.rs
index 288c3a5..6a23504 100644
--- a/zkvms/zkwasm/host/src/main.rs
+++ b/zkvms/zkwasm/host/src/main.rs
@@ -5,6 +5,7 @@ use zkvms_host_io::{
PrivateInput, PublicInput,
RunType::{Execute, Prove, Verify},
RunWith,
+ output_proof_size_raw,
};
static PUBLIC_INPUT_PATH: &str = "public_input.bin";
@@ -94,6 +95,9 @@ fn main() {
.arg("--public").arg(public_input.clone())
.arg("--private").arg(private_input.clone())
.arg("--output").arg(output.clone()));
+
+ let proofSize = std::fs::metadata(output.clone() + "/prog.0.transcript.data").unwrap().len();
+ output_proof_size_raw(proofSize as usize);
},
Verify => {
run(zkwasm_command("prove")
@@ -104,6 +108,9 @@ fn main() {
.arg("--output")
.arg(output.clone()));
+ let proofSize = std::fs::metadata(output.clone() + "/prog.0.transcript.data").unwrap().len();
+ output_proof_size_raw(proofSize as usize);
+
benchmarkable! {
run(Command::new("zkwasm-cli")
.arg("--params").arg(params.clone())