RareSkills / zero-knowledge-puzzles

Exercises to learn the syntax of Circom and create EVM compatible zero knowledge programs.
https://www.rareskills.io/zk-bootcamp
GNU General Public License v3.0
273 stars 89 forks source link

zero knowledge puzzles

Zero knowledge puzzles to learn writing circuits in circom lang.

Installation

Rust

Circom compiler requires rust . For MacOs and Linux users,

curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

Circom compiler

Clone the circom repository

git clone https://github.com/iden3/circom.git

Enter the repository

cargo build --release

Install

cargo install --path circom

Libraries

yarn install 

Using Docker for testing

Ensure you have docker installed and running in your system

Then to run a test against the circuit, please pass the relative path to the Javascript test file

yarn run docker:test test/Add.js  

Solving puzzles.

Write your solution .

Then run the following command

yarn test ./test/<TestName>.js

Suggested Order for the Puzzles.

Relevant links

Play Sujiko Game using circom proofs

Congrats on completing all the challenges, you can play Sujiko Game .

npm install

Troubleshoot

Mac users getting this error on circom installation

error: linking with `cc` failed: exit status: 1

Install xcode , then restart your mac .

xcode-select --install

Contributors