mirror of
https://github.com/arnaucube/circomlib.git
synced 2026-02-07 19:26:49 +01:00
working with some errors yet
This commit is contained in:
@@ -55,6 +55,7 @@ a parent with a sibling != 0.
|
||||
*/
|
||||
|
||||
template SMTLevIns(nLevels) {
|
||||
signal input enabled;
|
||||
signal input siblings[nLevels];
|
||||
signal output levIns[nLevels];
|
||||
signal done[nLevels-1]; // Indicates if the insLevel has aready been detecetd.
|
||||
@@ -67,7 +68,7 @@ template SMTLevIns(nLevels) {
|
||||
}
|
||||
|
||||
// The last level must always have a sibling of 0. If not, then it cannot be inserted.
|
||||
isZero[nLevels-2].out === 1;
|
||||
(isZero[nLevels-2].out - 1) * enabled === 0;
|
||||
|
||||
levIns[nLevels-1] <== (1-isZero[nLevels-2].out);
|
||||
done[nLevels-2] <== levIns[nLevels-1];
|
||||
|
||||
Reference in New Issue
Block a user