From 97ffe854bbee2caf46ff3f46a4c09d324636f894 Mon Sep 17 00:00:00 2001 From: Junyu <83873214+junyu0312@users.noreply.github.com> Date: Fri, 21 Jun 2024 15:48:55 +0800 Subject: [PATCH] set default k as 22 (#271) --- crates/cli/src/app_builder.rs | 8 ++------ crates/zkwasm/src/circuits/config.rs | 2 +- test_cli.sh | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/crates/cli/src/app_builder.rs b/crates/cli/src/app_builder.rs index c5da469bb..db30789c2 100644 --- a/crates/cli/src/app_builder.rs +++ b/crates/cli/src/app_builder.rs @@ -139,12 +139,8 @@ fn setup_command() -> Command<'static> { .about("Setup a new zkWasm circuit for provided Wasm image") .arg( arg!(-k "Size of the circuit.") - .default_value(if cfg!(feature = "continuation") { - "22" - } else { - "18" - }) - .value_parser(value_parser!(u32).range(18..)) + .default_value("22") + .value_parser(value_parser!(u32).range(18..23)) .required(false), ) .arg( diff --git a/crates/zkwasm/src/circuits/config.rs b/crates/zkwasm/src/circuits/config.rs index 903e9de1f..0a1753b31 100644 --- a/crates/zkwasm/src/circuits/config.rs +++ b/crates/zkwasm/src/circuits/config.rs @@ -3,7 +3,7 @@ use std::sync::Mutex; pub const POW_TABLE_POWER_START: u64 = 128; pub const MIN_K: u32 = 18; -const MAX_K: u32 = 25; +const MAX_K: u32 = 22; lazy_static! { static ref ZKWASM_K: Mutex> = Mutex::new(None); diff --git a/test_cli.sh b/test_cli.sh index b9741e7de..172aa1b40 100755 --- a/test_cli.sh +++ b/test_cli.sh @@ -28,7 +28,7 @@ test_uniform_circuit_cli() { test_continuation_cli() { cargo build --release --features continuation $CUDA rm -rf params/*.data params/*.config output - $CLI --params ./params fibonacci setup -k 22 + $CLI --params ./params fibonacci setup $CLI --params ./params fibonacci dry-run --wasm crates/zkwasm/wasm/fibonacci.wasm --public 25:i64 --output ./output $CLI --params ./params fibonacci prove --wasm crates/zkwasm/wasm/fibonacci.wasm --public 25:i64 --output ./output $CLI --params ./params fibonacci verify --output ./output