Skip to content

Commit

Permalink
Merge pull request #123 from valida-xyz/morgan/issue/122
Browse files Browse the repository at this point in the history
issue/122: add missing constraints to zero tests
  • Loading branch information
morganthomas authored Mar 18, 2024
2 parents 7e3f1dd + 2453881 commit 04b0436
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions alu_u32/src/com/stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ where
);
builder.assert_bool(local.not_equal);
builder.assert_eq(local.not_equal, local.diff * local.diff_inv);
let equal = AB::Expr::one() - local.not_equal;
builder.assert_zero(equal * local.diff);

builder.assert_bool(local.is_ne);
builder.assert_bool(local.is_eq);
Expand Down
2 changes: 2 additions & 0 deletions cpu/src/stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ impl CpuChip {
);
builder.assert_bool(local.not_equal);
builder.assert_eq(local.not_equal, local.diff * local.diff_inv);
let equal = AB::Expr::one() - local.not_equal;
builder.assert_zero(equal * local.diff);
}
}

Expand Down

0 comments on commit 04b0436

Please sign in to comment.