You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each output in a ZK circuit is represented by 2 variables even and odd. To test for determinism, we assemble the following polynomial that can't be satisfied if any even is different from its corresponding odd (a is a newly introduced variable):
The obvious problem with this approach is that the number of terms in this polynomial grows exponentially with n, making it impractical for anything with more than a few outputs.
This encoding must obviously be fixed. The way Picus does it is that the solver is executed n times, one time for each output variable. Maybe there is a better way, I can think of some alternatives, like:
running for 2 or 3 output variables at a time;
doing a full GB without the different output constraints, and checking if each (even[i] - odd[i]) individually belongs to the radical ideal;
maybe it is feasible to split the huge polynomial above into n+1 small polynomials, one for each output: a[i]*(even[i] - odd[i]) - b[i], and one multiplying all b[i] together (we would still have a very high degree polynomial). I think polynomial b[0]*b[1]*...*b[n-1] can only be zero if at least one even[i] != odd[i].
The text was updated successfully, but these errors were encountered:
In branch parallel_or I fixed this using the first idea: running for a few output variables at a time. I also went further and ran them in parallel, over different processes. Now I believe this is a very silly idea, and would prefer to test each set of output variables sequentially, and save parallelism for issue #12.
Each output in a ZK circuit is represented by 2 variables
even
andodd
. To test for determinism, we assemble the following polynomial that can't be satisfied if anyeven
is different from its correspondingodd
(a
is a newly introduced variable):The obvious problem with this approach is that the number of terms in this polynomial grows exponentially with
n
, making it impractical for anything with more than a few outputs.This encoding must obviously be fixed. The way Picus does it is that the solver is executed
n
times, one time for each output variable. Maybe there is a better way, I can think of some alternatives, like:(even[i] - odd[i])
individually belongs to the radical ideal;a[i]*(even[i] - odd[i]) - b[i]
, and one multiplying allb[i]
together (we would still have a very high degree polynomial). I think polynomialb[0]*b[1]*...*b[n-1]
can only be zero if at least oneeven[i] != odd[i]
.The text was updated successfully, but these errors were encountered: