johnson86tw / zero-knowledge-puzzles

Exercises to learn the syntax of Circom and create EVM compatible zero knowledge programs.

Home Page:https://www.rareskills.io/zk-bootcamp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

npm install 

Solving puzzles.

Write your solution .

Then run the following command

npm run test ./test/<TestName>.js

Be aware it is possible to pass the tests with underconstrained circuits, as testing for underconstraint is extremely difficult to do in general. At the very least, you should check the number of constraints generated and make sure the number makes sense. https://www.rareskills.io/post/circom-tutorial

circom <folder>/<name>.circom --r1cs

Suggested Order for the Puzzles.

Relevant links

Play Sujiko Game using circom proofs

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

  • Go to Frontend directory
  • Install libraries using
npm install
  • Then, start the front end:-
npm run dev

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

About

Exercises to learn the syntax of Circom and create EVM compatible zero knowledge programs.

https://www.rareskills.io/zk-bootcamp

License:GNU General Public License v3.0


Languages

Language:JavaScript 32.2%Language:Circom 20.6%Language:Solidity 20.6%Language:TypeScript 16.8%Language:Shell 6.5%Language:CSS 3.3%