voting_example icon indicating copy to clipboard operation
voting_example copied to clipboard

Bug in the circuit

Open curryrasul opened this issue 2 years ago • 0 comments

Hey. I don't know if this example/repo is relevant, but I found the bug in the circuit, when was trying to implement my own merkle-tree based on this implementation. The bug is here: https://github.com/jbaylina/voting_example/blob/main/circuits/mt2.circom#L49

To fix we need to do:

levels[i].selector <== n2b.out[nLevels - i - 1];

instead of:

levels[i].selector <== n2b.out[i];

Thanks!

curryrasul avatar Nov 04 '22 16:11 curryrasul