Bug in the circuit
Opened this issue · 0 comments
curryrasul commented
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!