zk/vm: Allow strict and loose checks for less_than.

This commit is contained in:
parazyd
2022-11-21 10:20:04 +01:00
parent 2c7b54c702
commit 1c2613f3f4
12 changed files with 53 additions and 30 deletions

View File

@@ -14,10 +14,4 @@ circuit "Arith" {
difference = base_sub(a, b);
constrain_instance(difference);
#a_gt_b = greater_than(a, b);
#constrain_instance(a_gt_b);
#b_gt_a = greater_than(b, a);
#constrain_instance(b_gt_a);
}

View File

@@ -88,5 +88,5 @@ circuit "Lead" {
term2 = base_mul(term2_1, value);
target = base_add(term1, term2);
#lottery
less_than(y_hash, target);
less_than_loose(y_hash, target);
}

View File

@@ -45,7 +45,8 @@ circuit "Opcodes" {
range_check(64, a);
range_check(253, b);
less_than(a, b);
less_than_strict(a, b);
less_than_loose(a, b);
root = merkle_root(leaf_pos, path, c);
constrain_instance(root);