Skip to content

Commit

Permalink
turn on first row check for setup
Browse files Browse the repository at this point in the history
  • Loading branch information
luffykai committed Jan 10, 2025
1 parent 928ab04 commit 42d8191
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions crates/circuits/mod-builder/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ impl<AB: InteractionBuilder> SubAir<AB> for FieldExpr {
if self.builder.needs_setup() {
let is_setup = flags.iter().fold(is_valid.into(), |acc, &x| acc - x);
builder.assert_bool(is_setup.clone());
// TODO: turn back on once we also support this in ecc and everywhere
builder.when_first_row().assert_one(is_setup.clone());
for i in 0..inputs[0].len().max(self.builder.prime_limbs.len()) {
let lhs = if i < inputs[0].len() {
inputs[0][i].into()
Expand Down Expand Up @@ -318,9 +320,6 @@ impl<AB: InteractionBuilder> SubAir<AB> for FieldExpr {
})
.collect();

// TODO: turn back on once we also support this in ecc and everywhere
// builder.when_first_row().assert_one(is_setup);

for flag in flags.iter() {
builder.assert_bool(*flag);
}
Expand Down

0 comments on commit 42d8191

Please sign in to comment.