Skip to content

Getting "adding a plonk constraint with qM set but xa or xb == 0 (wire 0)" . Should I be worried? #1171

Answered by ivokub
Scratch-net asked this question in Q&A
Discussion options

You must be logged in to vote

I was testing the new version of my circuit and this message popped up. Is this smth I should debug and fix? This happened when I called api.Xor() which I do a lot in my code Log is as follows:

=== RUN   TestCipher/bn254/plonk
21:43:51 INF compiling circuit
21:43:51 INF parsed circuit inputs nbPublic=1056 nbSecret=352
21:43:51 WRN adding a plonk constraint with qM set but xa or xb == 0 (wire 0)
21:43:51 INF building constraint builder nbConstraints=45351

Hi, you shouldn't be concerned about the warning, gnark is currently being overly sceptical.

The issue is that in some cases we can deduce that some variable is 0 a la:

...
y := api.Sub(x, x)
z := api.Mul(w, y)
...

where y is always 0

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Scratch-net
Comment options

Answer selected by Scratch-net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants