/zkdsl-workshop

Noir, Circom, and Halo2 exercises for DSL workshop at ZKSummit10

Primary LanguageRust

ZKSummit10 - Exploring Noir, Circom, halo2 Workshop

Prompt

Write Noir, Halo2 and Circom circuits that constrain integer division i.e decimals are truncated. For example 12 / 5 = 2

Inputs: x, y where x and y are nonnegative integers < 2^32 bits

Outputs: quotient

Instructions

  1. Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Install Nargo (Noir)
curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash

Close terminal, and run

noirup
  1. Fork this repo and git clone
  2. From rootcd circom_intdiv and copy circom code into https://zkrepl.dev/. zkrepl is a great tool to prototype and is faster than installing circom and snarkjs locally
  3. From root cd halo2_intdiv and fill the logic in TODO. To test your solution, run cargo test
  4. From root cd noir_intdiv and fill the logic in TODO. To test your solution, run nargo test