Преглед изворни кода

symlink ff library for plonk impl

narodnik пре 5 година
родитељ
комит
b6fe2c5457
3 измењених фајлова са 5 додато и 7 уклоњено
  1. 1 0
      scripts/halo/finite_fields
  2. 1 1
      scripts/halo/misc.py
  3. 3 6
      scripts/halo/test.py

+ 1 - 0
scripts/halo/finite_fields

@@ -0,0 +1 @@
+../finite_fields/

+ 1 - 1
scripts/halo/misc.py

@@ -1,6 +1,6 @@
 import random
 import random
 
 
-def sample_random(fp, seed):
+def sample_random(fp, seed=None):
     rnd = random.Random(seed)
     rnd = random.Random(seed)
     # Range of the field is 0 ... p - 1
     # Range of the field is 0 ... p - 1
     return fp(rnd.randint(0, fp.p - 1))
     return fp(rnd.randint(0, fp.p - 1))

+ 3 - 6
scripts/halo/test.py

@@ -1,6 +1,3 @@
-import sys
-sys.path.append("..")
-
 import random
 import random
 import misc
 import misc
 import pasta
 import pasta
@@ -110,9 +107,9 @@ def setup(wires, gates_matrix):
     # The copy permuation applied to a, b, c
     # The copy permuation applied to a, b, c
     # Returns the permuted index value (corresponding root of unity coset)
     # Returns the permuted index value (corresponding root of unity coset)
     # when evaluated on the domain.
     # when evaluated on the domain.
-    ssigma_1 = PolyEvalRep(ROOT, permuted_domain_a)
-    ssigma_2 = PolyEvalRep(ROOT, permuted_domain_b)
-    ssigma_3 = PolyEvalRep(ROOT, permuted_domain_c)
+    ssigma_1 = PolyEvalRep(ROOTS, permuted_domain_a)
+    ssigma_2 = PolyEvalRep(ROOTS, permuted_domain_b)
+    ssigma_3 = PolyEvalRep(ROOTS, permuted_domain_c)
     copy_permutes = [ssigma_1, ssigma_2, ssigma_3]
     copy_permutes = [ssigma_1, ssigma_2, ssigma_3]
 
 
 setup(wires, gates_matrix)
 setup(wires, gates_matrix)