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

Commit

Permalink
Improve single fixed query check
Browse files Browse the repository at this point in the history
  • Loading branch information
alxkzmn committed Jul 21, 2024
1 parent f453930 commit 4b077b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plonkish/backend/halo2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ impl<F: PrimeField + From<u64> + Hash> ChiquitoHalo2<F> {
for expr in &lookup.exprs {
let dest = &expr.1;
if dest.involves(column) {
// The lookup destination may involve this column, but not be a single query
has_only_single_queries = matches!(dest, PolyExpr::Query((_, _, _), _));
}
}
Expand Down Expand Up @@ -269,7 +270,9 @@ impl<F: PrimeField + From<u64> + Hash> ChiquitoHalo2<F> {
for (idx, (_, dest)) in lookup.exprs.iter().enumerate() {
match dest {
PolyExpr::Query((column, _, _), _) => {
if column.ctype == cFixed || column.ctype == Halo2Fixed {
if column.ctype == cFixed
|| column.ctype == Halo2Fixed && self.has_single_fixed_query(column)
{
single_fixed_queries.push((
lookup.exprs[idx].clone().0,
// Get the corresponding TableColumn
Expand Down

0 comments on commit 4b077b2

Please sign in to comment.