Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Add initial constraint z polynomial (0xPolygonZero#1440)
Browse files Browse the repository at this point in the history
  • Loading branch information
LindaGuiga authored Jan 2, 2024
1 parent ef07eab commit 6cf4df7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions evm/src/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ pub(crate) fn eval_packed_lookups_generic<F, FE, P, S, const D: usize, const D2:
.fold(P::ZEROS, |acc, x| acc + *x)
* table_with_challenge
- lookup.frequencies_column.eval(local_values);
// Check that in the first row, z = 0;
yield_constr.constraint_first_row(z);
yield_constr.constraint((next_z - z) * table_with_challenge - y);
start += num_helper_columns;
}
Expand Down Expand Up @@ -299,6 +301,8 @@ pub(crate) fn eval_ext_lookups_circuit<
y = builder.mul_extension(y, table_with_challenge);
y = builder.sub_extension(y, frequencies_column);

// Check that in the first row, z = 0;
yield_constr.constraint_first_row(builder, z);
let mut constraint = builder.sub_extension(next_z, z);
constraint = builder.mul_extension(constraint, table_with_challenge);
constraint = builder.sub_extension(constraint, y);
Expand Down

0 comments on commit 6cf4df7

Please sign in to comment.