Skip to content

Commit

Permalink
feat: capture O variable in gate for external range checker (#1211)
Browse files Browse the repository at this point in the history
* feat: capture both L,R variables in same gate

* feat: capute O variable in gate
  • Loading branch information
ivokub authored Jul 18, 2024
1 parent 1453c00 commit c2da0b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/cs/scs/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -729,12 +729,14 @@ func (builder *builder) GetWireConstraints(wires []frontend.Variable, addMissing
if _, ok := lookup[int(c.XA)]; ok {
res = append(res, [2]int{nbPub + constraintIdx, 0})
delete(lookup, int(c.XA))
continue
}
if _, ok := lookup[int(c.XB)]; ok {
res = append(res, [2]int{nbPub + constraintIdx, 1})
delete(lookup, int(c.XB))
continue
}
if _, ok := lookup[int(c.XC)]; ok {
res = append(res, [2]int{nbPub + constraintIdx, 2})
delete(lookup, int(c.XC))
}
if len(lookup) == 0 {
// we can break early if we found constraints for all the wires
Expand Down

0 comments on commit c2da0b0

Please sign in to comment.