From 25a9f66b9880c86d41616f60607eae9554c6ca39 Mon Sep 17 00:00:00 2001 From: ada Date: Wed, 28 Oct 2020 21:38:41 +0100 Subject: [PATCH] added func zkcons! to enable adding constraints instruction to the zkvm --- lisp/new.lisp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/new.lisp b/lisp/new.lisp index 99a4295e8..4828e8d95 100644 --- a/lisp/new.lisp +++ b/lisp/new.lisp @@ -2,11 +2,11 @@ (defzk! circuit ()) (def! bits (unpack-bits x 256)) ;;zkcons add a constraints instruction to the circuit - (map (fn* [b] (zkcons! - (add 'lc0 'one) - '(sub b) - '(add lc1 x) - 'enforce) + (map (fn* [b] (zkcons! circuit + (add lc0 one) + (sub lc0 b) + (add lc1 x) + enforce) ) bits) (map (fn* [b] (quote '(add lc0 b) 'double-coeff-lc)