| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- (def! x "73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000")
- (def! one "0000000000000000000000000000000000000000000000000000000000000001")
- (defzk! circuit ())
- ;;(def! bits (unpack-bits x))
- (def! bits [one x one])
- ;;zkcons add a constraints instruction to the circuit
- ;; (zkcons! circuit (
- ;; (add lc0 one)
- ;; (sub lc0 x)
- ;; )
- ;; )
- (map (fn* [b] (
- (zkcons! circuit (
- (add lc0 one)
- (sub lc0 b)
- (add lc1 x))
- ;; 'enforce)
- ))) bits)
- ;; (zkcons! circuit (map (fn* [b] (
- ;; (add lc0 one)
- ;; (sub lc0 b)
- ;; (add lc1 x)
- ;; 'enforce)
- ;; )) bits))
- ;; (def! enforce-loop-const (map (fn* [b] (
- ;; (add lc0 one)
- ;; (sub lc0 b)
- ;; (add lc1 x)
- ;; 'enforce)
- ;; )) bits))
- ;; (zkcons! circuit enforce-loop-const)
- ;; (zkcons! circuit (
- ;; 'reset-coeff-lc
- ;; '(sub lc0 x)
- ;; '(add lc1 one)
- ;; 'enforce)
- ;; )
- ;;(println circuit)
- ;;(println enforce-loop-const)
|