mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-04 23:03:08 +00:00
Apply comments
This commit is contained in:
parent
1590c1d0be
commit
59b73c84ee
@ -544,12 +544,11 @@ pub(crate) fn verify_cross_table_lookups<F: RichField + Extendable<D>, const D:
|
||||
{
|
||||
let extra_product_vec = &ctl_extra_looking_products[looked_table.table as usize];
|
||||
for c in 0..config.num_challenges {
|
||||
let mut looking_zs_prod = looking_tables
|
||||
let looking_zs_prod = looking_tables
|
||||
.iter()
|
||||
.map(|table| *ctl_zs_openings[table.table as usize].next().unwrap())
|
||||
.product::<F>();
|
||||
|
||||
looking_zs_prod *= extra_product_vec[c];
|
||||
.product::<F>()
|
||||
* extra_product_vec[c];
|
||||
|
||||
let looked_z = *ctl_zs_openings[looked_table.table as usize].next().unwrap();
|
||||
ensure!(
|
||||
|
||||
@ -466,32 +466,12 @@ where
|
||||
}
|
||||
|
||||
// Extra products to add to the looked last value
|
||||
let mut extra_looking_products = Vec::new();
|
||||
for _ in 0..NUM_TABLES {
|
||||
extra_looking_products.push(Vec::new());
|
||||
}
|
||||
|
||||
// Arithmetic
|
||||
for _ in 0..stark_config.num_challenges {
|
||||
extra_looking_products[Table::Arithmetic as usize].push(builder.constant(F::ONE));
|
||||
}
|
||||
|
||||
// KeccakSponge
|
||||
for _ in 0..stark_config.num_challenges {
|
||||
extra_looking_products[Table::KeccakSponge as usize].push(builder.constant(F::ONE));
|
||||
}
|
||||
|
||||
// Keccak
|
||||
for _ in 0..stark_config.num_challenges {
|
||||
extra_looking_products[Table::Keccak as usize].push(builder.constant(F::ONE));
|
||||
}
|
||||
|
||||
// Logic
|
||||
for _ in 0..stark_config.num_challenges {
|
||||
extra_looking_products[Table::Logic as usize].push(builder.constant(F::ONE));
|
||||
}
|
||||
// Arithmetic, KeccakSponge, Keccak, Logic
|
||||
let mut extra_looking_products =
|
||||
vec![vec![builder.constant(F::ONE); stark_config.num_challenges]; NUM_TABLES - 1];
|
||||
|
||||
// Memory
|
||||
extra_looking_products.push(Vec::new());
|
||||
for c in 0..stark_config.num_challenges {
|
||||
extra_looking_products[Table::Memory as usize].push(
|
||||
Self::get_memory_extra_looking_products_circuit(
|
||||
@ -746,7 +726,7 @@ where
|
||||
builder.connect(row[3], field_target);
|
||||
// values
|
||||
for j in 0..VALUE_LIMBS {
|
||||
builder.connect(row[j + 4], targets[j]);
|
||||
builder.connect(row[4 + j], targets[j]);
|
||||
}
|
||||
// timestamp
|
||||
builder.connect(row[12], timestamp_target);
|
||||
|
||||
@ -164,6 +164,7 @@ pub(crate) fn generate_traces<F: RichField + Extendable<D>, const D: usize>(
|
||||
GenerationOutputs,
|
||||
)> {
|
||||
let mut state = GenerationState::<F>::new(inputs.clone(), &KERNEL.code);
|
||||
|
||||
apply_metadata_memops(&mut state, &inputs.block_metadata);
|
||||
|
||||
generate_bootstrap_kernel::<F>(&mut state);
|
||||
|
||||
@ -112,33 +112,12 @@ where
|
||||
|
||||
let public_values = all_proof.public_values;
|
||||
|
||||
// Extra products to add to the looked last value.
|
||||
let mut extra_looking_products = Vec::new();
|
||||
for _ in 0..NUM_TABLES {
|
||||
extra_looking_products.push(Vec::new());
|
||||
}
|
||||
|
||||
// Arithmetic
|
||||
for _ in 0..config.num_challenges {
|
||||
extra_looking_products[Table::Arithmetic as usize].push(F::ONE);
|
||||
}
|
||||
|
||||
// KeccakSponge
|
||||
for _ in 0..config.num_challenges {
|
||||
extra_looking_products[Table::KeccakSponge as usize].push(F::ONE);
|
||||
}
|
||||
|
||||
// Keccak
|
||||
for _ in 0..config.num_challenges {
|
||||
extra_looking_products[Table::Keccak as usize].push(F::ONE);
|
||||
}
|
||||
|
||||
// Logic
|
||||
for _ in 0..config.num_challenges {
|
||||
extra_looking_products[Table::Logic as usize].push(F::ONE);
|
||||
}
|
||||
// Extra products to add to the looked last value
|
||||
// Arithmetic, KeccakSponge, Keccak, Logic
|
||||
let mut extra_looking_products = vec![vec![F::ONE; config.num_challenges]; NUM_TABLES - 1];
|
||||
|
||||
// Memory
|
||||
extra_looking_products.push(Vec::new());
|
||||
let cpu_trace_len = 1 << all_proof.stark_proofs[1].proof.recover_degree_bits(config);
|
||||
for c in 0..config.num_challenges {
|
||||
extra_looking_products[Table::Memory as usize].push(get_memory_extra_looking_products(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user