From 1cd3d203c55235ac6d30c05977ff35cffe26c167 Mon Sep 17 00:00:00 2001 From: Kobi Gurkan Date: Mon, 24 Aug 2020 10:46:37 +0300 Subject: [PATCH] fix LessThan and adds assert --- circuits/comparators.circom | 3 +- package-lock.json | 175 +++++++++++++++++++++++++++--------- package.json | 2 +- 3 files changed, 135 insertions(+), 45 deletions(-) diff --git a/circuits/comparators.circom b/circuits/comparators.circom index 3eaa3d8..e3de809 100644 --- a/circuits/comparators.circom +++ b/circuits/comparators.circom @@ -86,10 +86,11 @@ template LessThan(n) { */ template LessThan(n) { + assert(n <= 252); signal input in[2]; signal output out; - component n2b = Num2Bits(n*2+1); + component n2b = Num2Bits(n+1); n2b.in <== in[0]+ (1<