ZoKrates is a toolbox for zkSNARKs on Ethereum.
This is a proof-of-concept implementation. It has not been tested for production.
curl -LSfs get.zokrat.es | sh
Have a look at the documentation for more information about using ZoKrates.
A getting started tutorial can be found here.
If you run into problems, ZoKrates has a Gitter room. You can come ask for help on Gitter.
ZoKrates is released under the GNU Lesser General Public License v3.
We happily welcome contributions. You can either pick an existing issue, or reach out on Gitter.
Unless you explicitly state otherwise, any contribution you intentionally submit for inclusion in the work shall be licensed as above, without any additional terms or conditions.
Entrypoint script is included as part of the build image. Run the following instruction for usage:
docker run -itd kartheek14/zokrates_dev:081419 help
There are individual commands to substitute for 'help' above: all, compile, compute-witness, export-verifier, generate-proof, output, setup
.
all
: Runs all steps in sequence for compiling code, to proof generation and storing results to a local dir.
Example: docker run -itd kartheek14/zokrates_dev:081419 all
compile
: Runs Zokrates built-in compiler to compile the code in a local dir (/home/zokrates/zok_code
or /home/zokrates/examples
) to saves the output files within the container. Takes in a single argument which is the path to the local code file.
Example: docker run -itd kartheek14/zokrates_dev:081419 compile /examples/factorization.code
compute-witness
: Runs witness generation and saves outputs locally within the container.
Example: docker run -itd kartheek14/zokrates_dev:081419 compute-witness 6 2 3
export-verifier, generate-proof, setup
: These comamnds execute the trusted set up, generation of proofs, and exporting verifier code as output locally within the container.
output
: Moves the files on the root dir of the container to a mountable /home/zokrates/output
within the container.
Note that each of the above commands except for all
, would only result in partial outputs, and would need to be run sequentially either by running the container in -d mode appending something like && tail -f /dev/null
to the entrypoint arguments.