Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add recursive example #4969

Closed
wants to merge 46 commits into from
Closed

chore: add recursive example #4969

wants to merge 46 commits into from

Conversation

jzaki
Copy link
Contributor

@jzaki jzaki commented May 3, 2024

Description

Adds new examples directory with recursive example from dev-rel repo.

Problem

Examples in dev-rel are not kept strictly up to date with each noir language update, so when referred to in the docs would be out of date. This code will likely need updating before automating any test as part of noir repo's CI.

Resolves #4410

Summary

There were some quirks/workarounds at the time of writing, and fixes in Noir will likely resolve those quirks (if not already).

Additional Context

A future restructure would have a new docs directory created, with the current docs moving to subfolder in that, alongside examples. So structure could be something like docs/docs and docs/examples.
PS. I presume the prettier was on default cargo fmt settings.

Documentation

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. We just need to hook it up into JS workspace + tested in CI

examples/recursive-proofs/package.json Outdated Show resolved Hide resolved
examples/recursive-proofs/tsconfig.json Outdated Show resolved Hide resolved
examples/recursive-proofs/package.json Outdated Show resolved Hide resolved
examples/recursive-proofs/package.json Outdated Show resolved Hide resolved
examples/recursive-proofs/package.json Outdated Show resolved Hide resolved
examples/recursive-proofs/package.json Outdated Show resolved Hide resolved
@TomAFrench TomAFrench self-assigned this May 3, 2024
@TomAFrench
Copy link
Member

Assigning myself just for tracking me supporting these efforts in the Noir board.

@TomAFrench
Copy link
Member

Also it would be good to experiment with inlining some of the text to be shown in the docs in amongst the code and using snippets to populate the doc. This would make it easier for us to keep text + code in sync.

jzaki and others added 2 commits May 3, 2024 14:50
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
@jzaki jzaki changed the title Jz/add recursive example chore: add recursive example May 3, 2024
@jzaki jzaki marked this pull request as draft May 8, 2024 10:35
@jzaki jzaki self-assigned this May 13, 2024
Maddiaa0 pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Jun 5, 2024
This PR adds an example script which does recursive verification using
`nargo` and the `bb` binary as based on @jzaki's javascript example
noir-lang/noir#4969.
@jzaki jzaki marked this pull request as ready for review July 2, 2024 13:19
jzaki and others added 2 commits July 16, 2024 15:12
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
@TomAFrench
Copy link
Member

TomAFrench commented Oct 1, 2024

I'm closing this PR as we have an example which shows recursion in the examples folder. Feel free to reopen if this PR adds anything extra compared to what's in master.

@TomAFrench TomAFrench closed this Oct 1, 2024
@TomAFrench TomAFrench deleted the jz/add-recursive-example branch October 1, 2024 17:53
@jzaki
Copy link
Contributor Author

jzaki commented Oct 2, 2024

There are examples of the noir program which are shared, and examples of how to use them, and expected results. That is:

Noir Program Tools to use Expected output
in recursion nargo(+bb) Success
in recursion_js noir.js(+bb.js) Coming soon with optimisations

Perhaps the Noir program should be shared, but the tools to use sit outside of that alongside eachother. Eg:

examples/recursion/  (Nargo.toml, src/, etc)
examples/recursion/nargo/ (generate_recursive_proof.sh)
examples/recursion/noir.js/ (package.json ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bring nested recursion example into noir-lang/noir
3 participants