Skip to content

Commit

Permalink
fix bug again
Browse files Browse the repository at this point in the history
  • Loading branch information
MonkeyKing-1 committed Jan 6, 2025
1 parent 02edf1a commit bd88b99
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extensions/native/compiler/src/constraints/halo2/baby_bear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,15 @@ impl BabyBearChip {
);
// the inner product above must equal `a`
ctx.constrain_equal(&a, &acc);
let mut limbs = Vec::new();
// we fetch the cells to lookup by getting the indices where `limbs` were assigned in `inner_product`. Because `limb_bases[0]` is 1, the progression of indices is 0,1,4,...,4+3*i
limbs.push(ctx.get(row_offset));
self.add_cell_to_lookup(ctx, ctx.get(row_offset));
for i in 0..num_limbs - 1 {
limbs.push(ctx.get(row_offset + 1 + 3 * i as isize));
self.add_cell_to_lookup(ctx, ctx.get(row_offset + 1 + 3 * i as isize));
}

let last_limb = ctx.get(row_offset + 1 + 3 * (num_limbs - 2) as isize);
let r =
self.gate()
Expand Down

0 comments on commit bd88b99

Please sign in to comment.