Skip to content

Commit

Permalink
set default k as 22 (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
junyu0312 authored Jun 21, 2024
1 parent 8138fd9 commit 97ffe85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions crates/cli/src/app_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,8 @@ fn setup_command() -> Command<'static> {
.about("Setup a new zkWasm circuit for provided Wasm image")
.arg(
arg!(-k <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(
Expand Down
2 changes: 1 addition & 1 deletion crates/zkwasm/src/circuits/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Option<u32>> = Mutex::new(None);
Expand Down
2 changes: 1 addition & 1 deletion test_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 97ffe85

Please sign in to comment.