-
Notifications
You must be signed in to change notification settings - Fork 574
Description
Hi!
We are researchers at Veridise using our tool Picus to check for underconstrained circuits in popular repositories. My collaborator @sorawee ran Picus on your circuit RunningSum under halo2_gadgets/src/utilities/decompose_running_sum.rs, and found it to be underconstrained when WORD_NUM_BITS = 255, NUM_WINDOWS = 85, and WINDOW_NUM_BITS=3, and strict = true. This is a configuration that seems to be supported as it is used within one of your test cases.
When looking at the circuit, we found that the root cause is that the above configuration can represent integers larger than the modulus of the Pallas field. In particular, it can represent any value in
Here is a patch to decompose_running_sum.rs which adds a test case test_underconstrained_running_sum which shows that 0 has two representations: namely the base-8 representation of 0 and the base-8 representation of
Is the fact this circuit is underconstrained known? Do you expect users of the circuit to additionally check for overflows in the decomposition?
Any insight would be appreciated.