Closed gwdjkspnado closed 11 months ago
In the case of a u32
input, there is a bit decomposition and sum check happening which is the reason why it's considered constrained. Basically, the input is checked to be in the u32
range.
Thanks for your reply! Closing this issue for now.
Description
Zokrates would throw an error if a field input is not used. However, when an unsigned integer input is not used, no error message would be thrown. This kind of behavior is inconsistent and causes confusion. It would be better if Zokrates can make the behavior consistent.
Environment
Steps to Reproduce
Save the following code as
unconstrained.zok
and check that the compiler would complain about the unused field input:Compile with
zokrates compile -i unconstrained.zok
, you would get the following error:However, if you change the type of
a
tou32
, the compiler would not complain about the unused input:Compile with
zokrates compile -i unconstrained.zok
, the compilation succeeds without any error message: