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

refactor(prover): Replace hardcoded compression wrapper type with constant #3482

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
9 changes: 6 additions & 3 deletions prover/crates/lib/keystore/src/setup_data_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//! We generate separate set of keys for CPU and for GPU proving.

use std::collections::HashMap;
use std::sync::Arc;

use anyhow::Context as _;
#[cfg(any(feature = "gpu", feature = "gpu-light"))]
Expand Down Expand Up @@ -35,6 +36,9 @@ use {

use crate::{keystore::Keystore, GoldilocksProverSetupData};

// Constants for circuit configuration
const DEFAULT_COMPRESSION_WRAPPER_TYPE: u8 = 5;

/// Internal helper function, that calls the test harness to generate the setup data.
/// It also does a final sanity check to make sure that verification keys didn't change.
pub fn generate_setup_data_common(
Expand Down Expand Up @@ -329,12 +333,11 @@ pub fn get_fflonk_snark_verifier_setup_and_vk(
FflonkSnarkVerifierCircuitVK,
) {
let vk = data_source
.get_compression_for_wrapper_vk(5)
.get_compression_for_wrapper_vk(DEFAULT_COMPRESSION_WRAPPER_TYPE)
.unwrap()
.into_inner();
let fixed_parameters = vk.fixed_parameters.clone();
// todo: do not hardcode this value
let wrapper_function = ZkSyncCompressionWrapper::from_numeric_circuit_type(5);
let wrapper_function = ZkSyncCompressionWrapper::from_numeric_circuit_type(DEFAULT_COMPRESSION_WRAPPER_TYPE);

let circuit = FflonkSnarkVerifierCircuit {
witness: None,
Expand Down
Loading