From 4eea9faf022b04a00d7fa0c76dc749faa33e9b04 Mon Sep 17 00:00:00 2001 From: Kamen Mladenov Date: Wed, 26 Feb 2025 16:35:44 +0200 Subject: feat(zkvms/zkwasm): Move default ZKWASM_OUTPUT and ZKWASM_PARAMS directories to /tmp --- zkvms/README.md | 4 ++-- zkvms/zkwasm/host/src/main.rs | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/zkvms/README.md b/zkvms/README.md index 2ff590d..548f1f5 100644 --- a/zkvms/README.md +++ b/zkvms/README.md @@ -49,8 +49,8 @@ The value for each of these is taken, with this precedence, by the user shell en | | VERIFYING_KEY_PATH | path (string) | /tmp/input | Directory to output the verification key | | zkwasm | ZKWASM_K | integer | 19 | The "K" value for zkWasm. It's value is between 19 and 22 inclusive. For larger inputs you'll need to increment it, but the proving time also increases. You'll need to find the smallest one experimentally.| | | ZKWASM_SCHEME | string | shplonk | Proving system | -| | ZKWASM_OUTPUT | path (string) | ./output | Directory to store output | -| | ZKWASM_PARAMS | path (string) | ./params | Directory to store parameter information | +| | ZKWASM_OUTPUT | path (string) | /tmp/output | Directory to store output | +| | ZKWASM_PARAMS | path (string) | /tmp/params | Directory to store parameter information | > [!NOTE] > Looking through the source code, you may notice other environment variables which are used. diff --git a/zkvms/zkwasm/host/src/main.rs b/zkvms/zkwasm/host/src/main.rs index d04938a..2b19f60 100644 --- a/zkvms/zkwasm/host/src/main.rs +++ b/zkvms/zkwasm/host/src/main.rs @@ -78,9 +78,17 @@ fn main() { foreach_private_input_field )(&run_info); - let output = run_info.env_or("ZKWASM_OUTPUT", "./output"); + let output = run_info + .env_or( + "ZKWASM_OUTPUT", + "/tmp/output", + ); - let params = run_info.env_or("ZKWASM_PARAMS", "./params"); + let params = run_info + .env_or( + "ZKWASM_PARAMS", + "/tmp/params", + ); match run_info.run_type { Execute => benchmarkable! { -- cgit v1.2.3