-
Notifications
You must be signed in to change notification settings - Fork 583
feat(docs): Add recursion tutorial #19687
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
Conversation
sklppy88
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very nice ! Lots of code in here though and honestly curious what would be the best way to maintain. Have sent a message with a few ideas
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
Outdated
Show resolved
Hide resolved
ciaranightingale
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ABSOLUTE BANGER!!! Loved it
Main point is the same as Esau - can we use #include_code macro or something so it doesn't (quickly) become stale. Additionally, we should add to the devnet docs and consider not hardcoding to be for devnet only.
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
Outdated
Show resolved
Hide resolved
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
Show resolved
Hide resolved
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
Show resolved
Hide resolved
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
Outdated
Show resolved
Hide resolved
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
Outdated
Show resolved
Hide resolved
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
Show resolved
Hide resolved
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
Show resolved
Hide resolved
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
Outdated
Show resolved
Hide resolved
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
Show resolved
Hide resolved
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
Outdated
Show resolved
Hide resolved
03fdc8f to
3548ea1
Compare
## Summary Adds a comprehensive tutorial for verifying Noir proofs inside Aztec contracts using recursive verification. This pattern enables developers to bypass Aztec's input constraints by performing complex computations offchain and verifying only the proof onchain. ## What's Included ### Tutorial Content - **Part 1: Architecture** - Explains the recursive verification pattern, why it's needed (input limits, privacy, batching), and the dual proof generation UX - **Part 2: Noir Circuit** - Creating and compiling a simple circuit with private/public inputs - **Part 3: Aztec Contract** - Writing a contract that stores VK hash and verifies proofs using `verify_honk_proof` - **Part 4: TypeScript Setup & Proof Generation** - Project configuration (package.json, tsconfig.json), contract compilation, and proof data generation - **Part 5: Deployment** - Starting local network and running the verification ### Key Topics Covered - Input limits in Aztec contracts and how recursion helps - Private vs public inputs in Noir circuits - UX considerations for multiple proof generation phases - Storage patterns (`PublicImmutable` for VK hash, `PublicMutable` for counters) - Private-to-public function flow with `enqueue_self` - Sponsored fee payment for testing - Complete code examples with detailed comments ### Documentation Quality - Links to related docs (limitations, efficient contracts, fee payment, etc.) - Quick reference section with all commands - Expected outputs for each step - Matches the [full working example](https://github.com/AztecProtocol/aztec-examples/tree/main/recursive_verification) ## Changes - `docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md` - New tutorial (932 lines) - `docs/docs-words.txt` - Added `deflatten` and `deflattenFields` to cSpell dictionary ## Test Plan - [ ] Tutorial renders correctly in Docusaurus - [ ] All internal links resolve - [ ] Code examples match the reference repository - [ ] Spellcheck passes 🤖 Generated with [Claude Code](https://claude.ai/code)
3548ea1 to
83747fe
Compare
Flakey Tests🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
## Summary Adds a comprehensive tutorial for verifying Noir proofs inside Aztec contracts using recursive verification. This pattern enables developers to bypass Aztec's input constraints by performing complex computations offchain and verifying only the proof onchain. ## What's Included ### Tutorial Content - **Part 1: Architecture** - Explains the recursive verification pattern, why it's needed (input limits, privacy, batching), and the dual proof generation UX - **Part 2: Noir Circuit** - Creating and compiling a simple circuit with private/public inputs - **Part 3: Aztec Contract** - Writing a contract that stores VK hash and verifies proofs using `verify_honk_proof` - **Part 4: TypeScript Setup & Proof Generation** - Project configuration (package.json, tsconfig.json), contract compilation, and proof data generation - **Part 5: Deployment** - Starting local network and running the verification ### Key Topics Covered - Input limits in Aztec contracts and how recursion helps - Private vs public inputs in Noir circuits - UX considerations for multiple proof generation phases - Storage patterns (`PublicImmutable` for VK hash, `PublicMutable` for counters) - Private-to-public function flow with `enqueue_self` - Sponsored fee payment for testing - Complete code examples with detailed comments ### Documentation Quality - Links to related docs (limitations, efficient contracts, fee payment, etc.) - Quick reference section with all commands - Expected outputs for each step - Matches the [full working example](https://github.com/AztecProtocol/aztec-examples/tree/main/recursive_verification) ## Changes - `docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md` - New tutorial (932 lines) - `docs/docs-words.txt` - Added `deflatten` and `deflattenFields` to cSpell dictionary ## Test Plan - [ ] Tutorial renders correctly in Docusaurus - [ ] All internal links resolve - [ ] Code examples match the reference repository - [ ] Spellcheck passes 🤖 Generated with [Claude Code](https://claude.ai/code)
Summary
Adds a comprehensive tutorial for verifying Noir proofs inside Aztec contracts using recursive verification. This pattern enables developers to bypass Aztec's input constraints by performing complex computations offchain and verifying only the proof onchain.
What's Included
Tutorial Content
verify_honk_proofKey Topics Covered
PublicImmutablefor VK hash,PublicMutablefor counters)enqueue_selfDocumentation Quality
Changes
docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md- New tutorial (932 lines)docs/docs-words.txt- AddeddeflattenanddeflattenFieldsto cSpell dictionaryTest Plan
🤖 Generated with Claude Code