/recursion-demo

A minimal example of recursion in Noir.

Primary LanguageRoffMIT LicenseMIT

recursion-demo

UPDATE: This repo is outdated. Refer to https://github.com/noir-lang/noir-examples for the most recent examples.

A collection of simple examples demonstrating how to do recursion in Noir.

CLI

Setup

  1. Install Node.js ≥v18 (tested on v18.17.0)
  2. Install Nargo via nix with the instructions here (tested on commit ea80de5)
  3. Install bb.js by running npm i -g @aztec/bb.js (tested on v0.3.3)

Prove and verify the example code

  1. https://github.com/Savio-Sou/recursion-demo.git
  2. cd recursion-demo
  3. nargo compile main
  4. nargo execute witness
  5. bb.js prove -o proof
  6. bb.js write_vk -o vk
  7. bb.js verify -k vk -p proof

In Next.js

Setup

  1. TBC

Prove and verify the example code

  1. TBC