You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

307 lines
9.0 KiB

  1. [
  2. {
  3. "name": "inout",
  4. "circuit": "inout.circom",
  5. "tv": [
  6. [{
  7. "in1": 1,
  8. "in2": [2,3],
  9. "in3" : [[4,5], [6,7], [8,9]]
  10. }, {
  11. "out1": 1,
  12. "out2": [2,3],
  13. "out3": [[4,5], [6,7],[8,9]]
  14. }]
  15. ]
  16. },
  17. {
  18. "name": "add",
  19. "circuit": "add.circom",
  20. "tv": [
  21. [{"in": [0,0]}, {"out": 0}],
  22. [{"in": [0 ,1]}, {"out": 1}],
  23. [{"in": [1 ,2]}, {"out": 3}],
  24. [{"in": [-1,1]}, {"out": 0}]
  25. ]
  26. },
  27. {
  28. "name": "add constant",
  29. "circuit": "addconst1.circom",
  30. "tv": [
  31. [{"in": 0}, {"out": 15}],
  32. [{"in": 10}, {"out": 25}],
  33. [{"in": -2}, {"out": 13}]
  34. ]
  35. },
  36. {
  37. "name": "for unrolled",
  38. "circuit": "forunrolled.circom",
  39. "tv": [
  40. [{"in": 0}, {"out": [ 0, 1, 2]}],
  41. [{"in": 10}, {"out": [10, 11, 12]}],
  42. [{"in": -2}, {"out": [-2, -1, 0]}]
  43. ]
  44. },
  45. {
  46. "name": "for rolled",
  47. "circuit": "forrolled.circom",
  48. "tv": [
  49. [{"in": 0}, {"out": 0}],
  50. [{"in": 10}, {"out": 10}]
  51. ]
  52. },
  53. {
  54. "name": "while unrolled",
  55. "circuit": "whileunrolled.circom",
  56. "tv": [
  57. [{"in": 0}, {"out": [ 0, 1, 2]}],
  58. [{"in": 10}, {"out": [10, 11, 12]}],
  59. [{"in": -2}, {"out": [-2, -1, 0]}]
  60. ]
  61. },
  62. {
  63. "name": "while rolled",
  64. "circuit": "whilerolled.circom",
  65. "tv": [
  66. [{"in": 0}, {"out": 0}],
  67. [{"in": 10}, {"out": 10}]
  68. ]
  69. },
  70. {
  71. "name": "function1",
  72. "circuit": "function1.circom",
  73. "tv": [
  74. [{"in": 0}, {"out": 3}],
  75. [{"in": 10}, {"out": 13}],
  76. [{"in": -2}, {"out": 1}]
  77. ]
  78. },
  79. {
  80. "name": "function2",
  81. "circuit": "function2.circom",
  82. "tv": [
  83. [{"in": 0 }, {"out": 3}],
  84. [{"in": 10}, {"out": 13}],
  85. [{"in": -2}, {"out": 1}]
  86. ]
  87. },
  88. {
  89. "name": "constants1",
  90. "circuit": "constants1.circom",
  91. "tv": [
  92. [{"in": 0}, {"out": 42}],
  93. [{"in": 10}, {"out": 52}],
  94. [{"in": -2}, {"out": 40}]
  95. ]
  96. },
  97. {
  98. "name": "arrays",
  99. "circuit": "arrays.circom",
  100. "tv": [
  101. [{"in": 0}, {"out": [ 1, 8, 51]}],
  102. [{"in": 10}, {"out": [11, 28, 111]}],
  103. [{"in": -2}, {"out": [-1, 4, 39]}]
  104. ]
  105. },
  106. {
  107. "name": "if unrolled",
  108. "circuit": "ifunrolled.circom",
  109. "tv": [
  110. [{"in": 0}, {"out": [ 1, 3, 6]}],
  111. [{"in": 10}, {"out": [11, 13, 16]}],
  112. [{"in": -2}, {"out": [-1, 1, 4]}]
  113. ]
  114. },
  115. {
  116. "name": "if rolled",
  117. "circuit": "ifrolled.circom",
  118. "tv": [
  119. [{"in": 0}, {"out": [1, 0, 0]}],
  120. [{"in": 1}, {"out": [0, 1, 0]}],
  121. [{"in": 2}, {"out": [0, 0, 1]}],
  122. [{"in": 3}, {"out": [0, 0, 0]}],
  123. [{"in": -2}, {"out": [0, 0, 0]}]
  124. ]
  125. },
  126. {
  127. "name": "inc",
  128. "circuit": "inc.circom",
  129. "tv": [
  130. [{"in": 0}, {"out": [5, 2]}],
  131. [{"in": 1}, {"out": [6, 4]}],
  132. [{"in": 2}, {"out": [7, 6]}],
  133. [{"in": 3}, {"out": [8, 8]}],
  134. [{"in": -2}, {"out": [3,-2]}]
  135. ]
  136. },
  137. {
  138. "name": "dec",
  139. "circuit": "dec.circom",
  140. "tv": [
  141. [{"in": 0}, {"out": [ 1, -2]}],
  142. [{"in": 1}, {"out": [ 2, 0]}],
  143. [{"in": 2}, {"out": [ 3, 2]}],
  144. [{"in": 3}, {"out": [ 4, 4]}],
  145. [{"in": -2}, {"out": [-1, -6]}]
  146. ]
  147. },
  148. {
  149. "name": "ops",
  150. "circuit": "ops.circom",
  151. "tv": [
  152. [{"in": [-2, 2]}, {"add": 0, "sub": -4, "mul": -4}],
  153. [{"in": [-1, 1]}, {"add": 0, "sub": -2, "mul": -1}],
  154. [{"in": [ 0, 0]}, {"add": 0, "sub": 0, "mul": 0}],
  155. [{"in": [ 1,-1]}, {"add": 0, "sub": 2, "mul": -1}],
  156. [{"in": [ 2,-2]}, {"add": 0, "sub": 4, "mul": -4}],
  157. [{"in": [-2,-3]}, {"add": -5, "sub": 1, "mul": 6}],
  158. [{"in": [ 2, 3]}, {"add": 5, "sub": -1, "mul": 6}]
  159. ]
  160. },
  161. {
  162. "name": "ops2",
  163. "circuit": "ops2.circom",
  164. "tv": [
  165. [{"in": [-2, 2]}, {"div": -1, "idiv": "10944121435919637611123202872628637544274182200208017171849102093287904247807", "mod": 1}],
  166. [{"in": [-1, 1]}, {"div": -1, "idiv": -1, "mod": 0}],
  167. [{"in": [ 1,-1]}, {"div": -1, "idiv": 0, "mod": 1}]
  168. ]
  169. },
  170. {
  171. "name": "ops3",
  172. "circuit": "ops3.circom",
  173. "tv": [
  174. [{"in": [-2, 2]}, {"neg1": 2, "neg2": -2, "pow": 4}],
  175. [{"in": [ 0, 1]}, {"neg1": 0, "neg2": -1, "pow": 0}],
  176. [{"in": [ 1,-1]}, {"neg1": -1, "neg2": 1, "pow": 1}]
  177. ]
  178. },
  179. {
  180. "name": "Comparation ops",
  181. "circuit": "opscmp.circom",
  182. "tv": [
  183. [{"in": [ 8, 9]}, {"lt": 1, "leq": 1, "eq":0, "neq":1, "geq": 0, "gt":0}],
  184. [{"in": [-2,-2]}, {"lt": 0, "leq": 1, "eq":1, "neq":0, "geq": 1, "gt":0}],
  185. [{"in": [-1,-2]}, {"lt": 0, "leq": 0, "eq":0, "neq":1, "geq": 1, "gt":1}],
  186. [{"in": [ 1,-1]}, {"lt": 0, "leq": 0, "eq":0, "neq":1, "geq": 1, "gt":1}]
  187. ]
  188. },
  189. {
  190. "name": "Bit ops",
  191. "circuit": "opsbit.circom",
  192. "tv": [
  193. [
  194. {
  195. "in": [ 5, 3]
  196. },
  197. {
  198. "and": 1,
  199. "or": 7,
  200. "xor":6,
  201. "not1": "14474011154664524427946373126085988481658748083205070504932198000989141204986",
  202. "shl": 40,
  203. "shr":0
  204. }
  205. ],
  206. [
  207. {
  208. "in": [ 0, 0]
  209. },
  210. {
  211. "and": 0,
  212. "or": 0,
  213. "xor":0,
  214. "not1":"14474011154664524427946373126085988481658748083205070504932198000989141204991",
  215. "shl": 0,
  216. "shr":0
  217. }
  218. ],
  219. [
  220. {
  221. "in": [-1, 1]
  222. },
  223. {
  224. "and": 0,
  225. "or": "7414231717174750794300032619171286606889616317210963838766006185586667290625",
  226. "xor":"7414231717174750794300032619171286606889616317210963838766006185586667290625",
  227. "not1": "7059779437489773633646340506914701874769131765994106666166191815402473914367",
  228. "shl": "354452279684977160653692112256584732120484551216857172599814370184193376256",
  229. "shr": "10944121435919637611123202872628637544274182200208017171849102093287904247808"
  230. }
  231. ]
  232. ]
  233. },
  234. {
  235. "name": "Logical ops",
  236. "circuit": "opslog.circom",
  237. "tv": [
  238. [{"in": [ 5, 0]}, {"and": 0, "or": 1, "not1":0}],
  239. [{"in": [ 0, 1]}, {"and": 0, "or": 1, "not1":1}],
  240. [{"in": [-1, 9]}, {"and": 1, "or": 1, "not1":0}],
  241. [{"in": [ 0, 0]}, {"and": 0, "or": 0, "not1":1}]
  242. ]
  243. },
  244. {
  245. "name": "Conditional Ternary operator",
  246. "circuit": "condternary.circom",
  247. "tv": [
  248. [{"in": 0}, {"out": 21}],
  249. [{"in": 1}, {"out": 1}],
  250. [{"in": 2}, {"out": 23}],
  251. [{"in":-1}, {"out": 20}]
  252. ]
  253. },
  254. {
  255. "name": "Compute block",
  256. "circuit": "compute.circom",
  257. "tv": [
  258. [{"x": 1}, {"y": 7}],
  259. [{"x": 2}, {"y": 7}],
  260. [{"x": 3}, {"y": 11}],
  261. [{"x":-1}, {"y": -5}]
  262. ]
  263. },
  264. {
  265. "name": "Component array",
  266. "circuit": "componentarray.circom",
  267. "tv": [
  268. [{"in": 1}, {"out": 1}],
  269. [{"in": 2}, {"out": 256}],
  270. [{"in": 3}, {"out": 6561}],
  271. [{"in":-1}, {"out": 1}]
  272. ]
  273. },
  274. {
  275. "name": "Component array 2d",
  276. "circuit": "componentarray2.circom",
  277. "tv": [
  278. [{"in": [1,2]}, {"out": [1, 256]}],
  279. [{"in": [0,3]}, {"out": [0, 6561]}]
  280. ]
  281. },
  282. {
  283. "name": "Constant circuit",
  284. "circuit": "constantcircuit.circom",
  285. "tv": [
  286. [{}, {"out": [1,0,1,0, 0,0,0,1, 0,1,1,1, 0,1,0,1, 1,1,1,0, 0,1,1,0, 1,1,0,1, 1,1,0,1]}]
  287. ]
  288. },
  289. {
  290. "name": "Constant internal circuit",
  291. "circuit": "constantinternalcircuit.circom",
  292. "tv": [
  293. [{"in": 1}, {"out": 5}],
  294. [{"in": 0}, {"out": 4}],
  295. [{"in": -2}, {"out": 2}],
  296. [{"in": 10}, {"out": 14}]
  297. ]
  298. },
  299. {
  300. "name": "include",
  301. "circuit": "include.circom",
  302. "tv": [
  303. [{"in": 3}, {"out": 6}],
  304. [{"in": 6}, {"out": 15}]
  305. ]
  306. }
  307. ]