mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
added zkcircuit values on eval
This commit is contained in:
@@ -2,20 +2,16 @@
|
||||
(def! one "0000000000000000000000000000000000000000000000000000000000000001")
|
||||
(def! bits (unpack-bits x))
|
||||
(defzk! circuit ())
|
||||
|
||||
(def! cvalues (map (fn* [b] (eval
|
||||
(add lc0 one)
|
||||
)) bits))
|
||||
|
||||
;;(map (fn* [b] (zkcons! circuit (
|
||||
;; (add lc0 one)
|
||||
;; (sub lc0 b)
|
||||
;; (add lc1 x))
|
||||
;; )) bits)
|
||||
;; 'reset-coeff-lc
|
||||
;; (sub lc0 x)
|
||||
;; (add lc1 one)
|
||||
;; 'enforce)
|
||||
;; ))
|
||||
(sub lc0 b)
|
||||
(add lc1 x)
|
||||
enforce)
|
||||
) bits))
|
||||
(def! cs (concat cvalues (list
|
||||
'reset-coeff-lc
|
||||
(sub lc0 x)
|
||||
(add lc1 one)
|
||||
'enforce)))
|
||||
(println "bit-dec")
|
||||
(zkcons! circuit cvalues)
|
||||
(zkcons! circuit cs)
|
||||
|
||||
Reference in New Issue
Block a user