Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set default k as 22 #271

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading