- Run the Zokrates docker image mapping the local folder cotaining the Zokrates source file (.code) to the /root/zkfact folder of the docker image
docker run -it -v <local folder>:/root/zkfact zokrates
cd zkfact
- Compile the Zokrates code, generate the keys and the verifier contract
- Compile the Zokrate factorial source file (zkfact.code)
../ZoKrates/target/release/zokrates compile -i zkFact.code
- Generate the prover and verifier keys. Please note tha this repo already contains the set of prover and verifier keys used to gnerated the verifier.sol verifier contract included in the repo. Once the setup command is execute, the prover an verifier keys will be replaced with new keys and the verifier.sol contract will have to be generated again as explained below
../ZoKrates/target/release/zokrates setup
- Generate the Verifier contract (verifier.sol)
../ZoKrates/target/release/zokrates export-verifier
- Compile the Zokrate factorial source file (zkfact.code)
- Generate the zk proof
- Execute the compiled code provide the
main
input vlauee.g.../ZoKrates/target/release/zokrates compute-witness -a <input value>
../ZoKrates/target/release/zokrates compute-witness -a 4
- Generate the zk proof for the input value just provided
../ZoKrates/target/release/zokrates compute-witness -a 4
- Copy the lines from
A = ...
toK = ...
to the Dapp Zokrates Proof field
- Execute the compiled code provide the
- The Dapp can be accessed from the following link: https://rawgit.com/saltiniroberto/zkFact/master/dapp/index.html#
-
Notifications
You must be signed in to change notification settings - Fork 0
saltiniroberto/zkFact
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published