Skip to content

feat: constant value binary decomposition #1510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 6, 2025
Prev Previous commit
Next Next commit
feat: modreduce copied witness in test engine to mimic actual solver
  • Loading branch information
ivokub committed Jun 6, 2025
commit 90866f196acad16dcfaddf5d5df6c665e74b23ee
8 changes: 7 additions & 1 deletion test/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,13 @@ func (e *engine) copyWitness(to, from frontend.Circuit) {

i := 0
setHandler := func(f schema.LeafInfo, tInput reflect.Value) error {
tInput.Set(wValues[i])
wValueIntf := wValues[i].Interface()
val := utils.FromInterface(wValueIntf)
if val.Cmp(e.modulus()) >= 0 {
val.Mod(&val, e.modulus())
}
wValueReduced := reflect.ValueOf(val)
tInput.Set(wValueReduced)
i++
return nil
}
Expand Down