plonk::keygen: Handle dynamic table tags in keygen_vk, keygen_pk

Co-authored-by: Avi Dessauer <avi.dessauer@platonic.systems>
This commit is contained in:
therealyingtong 2023-02-23 10:40:03 +08:00
parent cc26963337
commit f32fd2a4a0
1 changed files with 18 additions and 0 deletions

View File

@ -244,6 +244,15 @@ where
.map(|poly| domain.lagrange_from_vec(poly)),
);
#[cfg(feature = "unstable-dynamic-lookups")]
let (cs, dynamic_table_polys) = cs.compress_dynamic_table_tags(assembly.dynamic_tables);
#[cfg(feature = "unstable-dynamic-lookups")]
fixed.extend(
dynamic_table_polys
.into_iter()
.map(|poly| domain.lagrange_from_vec(poly)),
);
let permutation_vk = assembly
.permutation
.build_vk(params, &domain, &cs.permutation);
@ -307,6 +316,15 @@ where
.map(|poly| vk.domain.lagrange_from_vec(poly)),
);
#[cfg(feature = "unstable-dynamic-lookups")]
let (cs, dynamic_table_polys) = cs.compress_dynamic_table_tags(assembly.dynamic_tables);
#[cfg(feature = "unstable-dynamic-lookups")]
fixed.extend(
dynamic_table_polys
.into_iter()
.map(|poly| vk.domain.lagrange_from_vec(poly)),
);
let fixed_polys: Vec<_> = fixed
.iter()
.map(|poly| vk.domain.lagrange_to_coeff(poly.clone()))