Sfoglia il codice sorgente

zkrunner: update README.md

x 3 anni fa
parent
commit
ae9801fce1
2 ha cambiato i file con 23 aggiunte e 1 eliminazioni
  1. 22 1
      bin/zkrunner/README.md
  2. 1 0
      bin/zkrunner/zkrunner.py

+ 22 - 1
bin/zkrunner/README.md

@@ -1,3 +1,24 @@
+# What is this?
+
+`zkrunner` is a simple Python script that calls into the Darkfi Python SDK.
+The Python SDK provides APIs such as creating a circuit, assigning the witness to the circuit and more.
+
+`zkrunner` uses the Python SDK to create a developement environment for zkas developer where:
+* the zkas developer provides the witness and assigns it accordingly
+* zkrunner 1) sets up the circuit, 2) creates the proof, 3) creates the public inputs (from the witness) and 4) verifies the proof
+* zkrunner times each step as a basic performance benchmark
+
+This is so developers have an easier time to test their zkas circuit.
+
 # Installation
 
-Follow the guide in src/sdk/python/README.md to install the Python bindings and virtual environment.
+Follow the guide in src/sdk/python/README.md to install the Python bindings and virtual environment.
+
+# Getting Started
+
+* Open up `zkrunner.py`, provide the path to zkas binary code, witness and assign accordingly.
+* After installing Python bindings in your Python installation, simply run `python zkrunner.py [--verbose]`.
+
+# Notes
+
+* "witness" and "witnesses" are used interchangablely.

+ 1 - 0
bin/zkrunner/zkrunner.py

@@ -178,6 +178,7 @@ if __name__ == "__main__":
     vprint("Proving.....")
     start = time()
     proof = Proof.create(proving_key, [zkcircuit], pubins)
+    # TODO: consider persisting the proof for making a transaction
     print(f"Time for proving: {time() - start}")
 
     ##### Verifiying #####