Skip to content

Conversation

@critesjosh
Copy link
Contributor

@critesjosh critesjosh commented Jan 16, 2026

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

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

@critesjosh critesjosh requested review from a team and ciaranightingale January 16, 2026 20:13
@critesjosh critesjosh marked this pull request as ready for review January 16, 2026 20:19
Copy link
Contributor

@sklppy88 sklppy88 left a 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

Copy link
Contributor

@ciaranightingale ciaranightingale left a 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.

## 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)
@AztecBot AztecBot force-pushed the jc/docs/recursion-tutorial branch from 3548ea1 to 83747fe Compare January 21, 2026 21:46
@AztecBot AztecBot added this pull request to the merge queue Jan 27, 2026
@AztecBot
Copy link
Collaborator

AztecBot commented Jan 27, 2026

Flakey Tests

🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/25bdfdff9e4cfdac�25bdfdff9e4cfdac8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_high_tps_block_building.test.ts (276s) (code: 1) group:e2e-p2p-epoch-flakes (\033Aztec Bot\033: feat(docs): Add recursion tutorial (#19687))
\033FLAKED\033 (8;;http://ci.aztec-labs.com/33050a05f1615f3e�33050a05f1615f3e8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_p2p/valid_epoch_pruned_slash.test.ts (402s) (code: 1) group:e2e-p2p-epoch-flakes (\033Aztec Bot\033: feat(docs): Add recursion tutorial (#19687))

Merged via the queue into next with commit f680032 Jan 27, 2026
16 checks passed
@AztecBot AztecBot deleted the jc/docs/recursion-tutorial branch January 27, 2026 21:55
github-actions bot pushed a commit that referenced this pull request Jan 27, 2026
## 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)
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.

5 participants