Skip to content

Commit

Permalink
fix build, use correct VKs
Browse files Browse the repository at this point in the history
  • Loading branch information
Artemka374 committed Oct 31, 2024
1 parent ecae65d commit f849fa8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 48 deletions.
24 changes: 3 additions & 21 deletions crates/zkevm_test_harness/src/compute_setups/full.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,34 +134,16 @@ pub fn generate_circuit_setup_data(
.clone();

create_compression_layer_setup_data(
circuit,
circuit.clone(),
&worker,
circuit.proof_config_for_compression_step().fri_lde_factor,
circuit.clone().proof_config_for_compression_step().fri_lde_factor,
circuit
.proof_config_for_compression_step()
.merkle_tree_cap_size,
)
}
// compression for wrapper circuits
6 => {
let circuit = get_compression_for_wrapper_circuits(source)
.iter()
.find(|circuit| circuit.numeric_circuit_type() == circuit_type)
.expect(&format!(
"Could not find circuit matching {:?}",
circuit_type
))
.clone();

create_compression_for_wrapper_setup_data(
circuit,
&worker,
circuit.proof_config_for_compression_step().fri_lde_factor,
circuit
.proof_config_for_compression_step()
.merkle_tree_cap_size,
)
}
6 => panic!("Full generation of setup for wrapper circuits should be generated with light setup"),
_ => unreachable!("Invalid proving stage"),
};

Expand Down
10 changes: 8 additions & 2 deletions crates/zkevm_test_harness/src/compute_setups/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ pub fn generate_light_circuit_setup_data(
create_light_compression_layer_setup_data(
circuit.clone(),
&worker,
circuit.clone().proof_config_for_compression_step().fri_lde_factor,
circuit
.clone()
.proof_config_for_compression_step()
.fri_lde_factor,
circuit
.proof_config_for_compression_step()
.merkle_tree_cap_size,
Expand All @@ -154,7 +157,10 @@ pub fn generate_light_circuit_setup_data(
create_light_compression_for_wrapper_setup_data(
circuit.clone(),
&worker,
circuit.clone().proof_config_for_compression_step().fri_lde_factor,
circuit
.clone()
.proof_config_for_compression_step()
.fri_lde_factor,
circuit
.proof_config_for_compression_step()
.merkle_tree_cap_size,
Expand Down
36 changes: 11 additions & 25 deletions crates/zkevm_test_harness/src/compute_setups/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ fn get_compression_circuits(
witness: None,
config: CompressionRecursionConfig {
proof_config: CompressionMode1::proof_config_for_compression_step(),
verification_key: source.get_compression_vk(1).unwrap().into_inner(),
// recursion circuit 1 is scheduler
verification_key: source.get_recursion_layer_vk(1).unwrap().into_inner(),
_marker: Default::default(),
},
transcript_params: (),
Expand All @@ -57,7 +58,7 @@ fn get_compression_circuits(
witness: None,
config: CompressionRecursionConfig {
proof_config: CompressionMode2::proof_config_for_compression_step(),
verification_key: source.get_compression_vk(2).unwrap().into_inner(),
verification_key: source.get_compression_vk(1).unwrap().into_inner(),
_marker: Default::default(),
},
transcript_params: (),
Expand All @@ -67,7 +68,7 @@ fn get_compression_circuits(
witness: None,
config: CompressionRecursionConfig {
proof_config: CompressionMode3::proof_config_for_compression_step(),
verification_key: source.get_compression_vk(3).unwrap().into_inner(),
verification_key: source.get_compression_vk(2).unwrap().into_inner(),
_marker: Default::default(),
},
transcript_params: (),
Expand All @@ -77,7 +78,7 @@ fn get_compression_circuits(
witness: None,
config: CompressionRecursionConfig {
proof_config: CompressionMode4::proof_config_for_compression_step(),
verification_key: source.get_compression_vk(4).unwrap().into_inner(),
verification_key: source.get_compression_vk(3).unwrap().into_inner(),
_marker: Default::default(),
},
transcript_params: (),
Expand All @@ -87,7 +88,7 @@ fn get_compression_circuits(
witness: None,
config: CompressionRecursionConfig {
proof_config: CompressionMode5::proof_config_for_compression_step(),
verification_key: source.get_compression_vk(5).unwrap().into_inner(),
verification_key: source.get_compression_vk(4).unwrap().into_inner(),
_marker: Default::default(),
},
transcript_params: (),
Expand All @@ -105,10 +106,7 @@ fn get_compression_for_wrapper_circuits(
witness: None,
config: CompressionRecursionConfig {
proof_config: CompressionMode1::proof_config_for_compression_step(),
verification_key: source
.get_compression_for_wrapper_vk(1)
.unwrap()
.into_inner(),
verification_key: source.get_compression_vk(1).unwrap().into_inner(),
_marker: Default::default(),
},
transcript_params: (),
Expand All @@ -120,10 +118,7 @@ fn get_compression_for_wrapper_circuits(
witness: None,
config: CompressionRecursionConfig {
proof_config: CompressionMode2::proof_config_for_compression_step(),
verification_key: source
.get_compression_for_wrapper_vk(2)
.unwrap()
.into_inner(),
verification_key: source.get_compression_vk(2).unwrap().into_inner(),
_marker: Default::default(),
},
transcript_params: (),
Expand All @@ -135,10 +130,7 @@ fn get_compression_for_wrapper_circuits(
witness: None,
config: CompressionRecursionConfig {
proof_config: CompressionMode3::proof_config_for_compression_step(),
verification_key: source
.get_compression_for_wrapper_vk(3)
.unwrap()
.into_inner(),
verification_key: source.get_compression_vk(3).unwrap().into_inner(),
_marker: Default::default(),
},
transcript_params: (),
Expand All @@ -150,10 +142,7 @@ fn get_compression_for_wrapper_circuits(
witness: None,
config: CompressionRecursionConfig {
proof_config: CompressionMode4::proof_config_for_compression_step(),
verification_key: source
.get_compression_for_wrapper_vk(4)
.unwrap()
.into_inner(),
verification_key: source.get_compression_vk(4).unwrap().into_inner(),
_marker: Default::default(),
},
transcript_params: (),
Expand All @@ -165,10 +154,7 @@ fn get_compression_for_wrapper_circuits(
witness: None,
config: CompressionRecursionConfig {
proof_config: CompressionMode5::proof_config_for_compression_step(),
verification_key: source
.get_compression_for_wrapper_vk(5)
.unwrap()
.into_inner(),
verification_key: source.get_compression_vk(5).unwrap().into_inner(),
_marker: Default::default(),
},
transcript_params: (),
Expand Down

0 comments on commit f849fa8

Please sign in to comment.