Closed willemolding closed 1 month ago
Potentially related to #3525.
Hey, looks like this is failing inside the flattening SSA pass. We're aware of some issues related to some of the SSA passes which we're currently looking into.
This now compiles without a stack overflow with N = 52
.
Aim
I'm building a toy project in Noir that implements the ZkShuffle protocol. My implementation can be found here https://github.com/willemolding/noir_shuffle
The main circuit has the form
The
exp_elgamal_remask
function is doing some scalar multiplications and point additions on the baby jubjub curve.As I increase the number of cards the circuit complexity increases. For N=6 cards the output of nargo info is:
Expected Behavior
I expect a more useful error message that might direct my as to how I could get the circuit to compile
Bug
Increasing it any higher (e.g. N=7) results in a compiler crash
To Reproduce
cd noir_shuffle/shuffle_encrypt
main.nr
to anything greater than 6nargo info
Installation Method
Binary
Nargo Version
nargo version = 0.19.4 noirc version = 0.19.4+4d133c50a50f21ca23861a9d1987207bd8783d36 (git version hash: 4d133c50a50f21ca23861a9d1987207bd8783d36, is dirty: false)
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
Can anyone shed light on what might be causing this error? It seems to appear as the circuit complexity increases along with the number of cards being shuffled but as I understand it circuit size at N=6 isn't particularly large.
Any suggestions on how I could successfully implement this for N=52? E.g. using recursive proofs or some other kind of restructuring.
Furthermore it would be great to have the compiler produce more useful error messages in these cases.
Many thanks