zksecurity / noname

Noname: a programming language to write zkapps

Home Page:https://zksecurity.github.io/noname/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wrong gate for public output in double generic mode

katat opened this issue · comments

Currently the public output needs to be calculated at the end and assign to the first column of the witness rows. Each row represents a gate.

When it is single generic gate mode, the output assignment can be done properly in a row (gate) that is reserved for only that public output.

But in double generic gate mode, the gate contains the output wire fails to pass the constraint check.

do you know what is happening here? add_public_output should not use the double generic gate optimization, maybe it does?

oh yeah, it uses add_generic_gate. That is probably the cause.