You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(docs): integrate recursive verification tutorial into docs/examples (#20025)
## Summary
- Integrate the recursive verification tutorial code from aztec-examples
repo into `docs/examples/` so it can be validated by CI and won't go
stale
- Update the tutorial to use `#include_code` macros to pull code from
the example files
- Add support for vanilla Noir circuits in the docs examples bootstrap
## Changes
**New example files:**
- `docs/examples/circuits/hello_circuit/` - Vanilla Noir circuit that
proves x != y
- `docs/examples/contracts/recursive_verification_contract/` - Aztec
contract with proof verification
- `docs/examples/ts/recursive_verification/` - TypeScript files for
proof generation and deployment
**Infrastructure updates:**
- `docs/examples/bootstrap.sh` - Added `compile-circuits` function for
vanilla Noir circuits
- `docs/examples/ts/bootstrap.sh` - Added support for `link:`
dependencies (bb.js, noir-noir_js)
- `docs/Nargo.toml` - Added recursive_verification_contract to workspace
**Tutorial updates:**
- Updated `recursive_verification.md` to use `#include_code` macros for:
- Circuit code and Nargo.toml
- Full contract code
- TypeScript generate_data.ts and sponsored_fpc.ts
- Updated links to point to docs/examples in the main repo
## Test plan
- [ ] Verify circuit compiles: `cd docs/examples/circuits && nargo
compile --workspace`
- [ ] Verify contract compiles: `cd docs && nargo compile` (for
recursive_verification_contract)
- [ ] Verify docs build with include_code macros
- [ ] Run full `docs/examples/bootstrap.sh` (note: may have pre-existing
issues with bob_token_contract)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Copy file name to clipboardExpand all lines: docs/docs-developers/docs/tutorials/contract_tutorials/recursive_verification.md
+7-174Lines changed: 7 additions & 174 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This is called "recursive" verification because the proof is verified inside an
12
12
:::
13
13
14
14
:::tip Full Working Example
15
-
The complete code for this tutorial is available at [aztec-examples/recursive_verification](https://github.com/AztecProtocol/aztec-examples/tree/v3.0.0-devnet.6-patch.1/recursive_verification). Clone it to follow along or use it as a reference.
15
+
The complete code for this tutorial is available in the [docs/examples](https://github.com/AztecProtocol/aztec-packages/tree/#include_aztec_version/docs/examples) directory. Clone it to follow along or use it as a reference.
16
16
:::
17
17
18
18
## Prerequisites
@@ -131,16 +131,7 @@ circuit/
131
131
132
132
Replace the contents of `circuit/src/main.nr` with:
This is intentionally minimal to focus on the verification pattern. In production, you would replace `assert(x != y)` with meaningful computations like:
146
137
@@ -170,14 +161,7 @@ For example, you could create a zkpassport proof demonstrating that you are over
170
161
171
162
Update `circuit/Nargo.toml` (see [Noir crates and packages](https://noir-lang.org/docs/noir/modules_packages_crates/crates_and_packages) for more details):
**Note**: This is a vanilla Noir circuit, not an Aztec contract. It has `type = "bin"` (binary) and no Aztec dependencies. The circuit is compiled with `nargo`, not `aztec compile`. This distinction is important—you can verify proofs from _any_ Noir circuit inside Aztec contracts.
This utility computes the address of the pre-deployed sponsored FPC contract. The salt ensures we get the same address every time. For more information about fee payment options, see [Paying Fees](../../aztec-js/how_to_pay_fees.md).
921
754
@@ -955,7 +788,7 @@ The counter starts at 10 (set during deployment), and after successful proof ver
955
788
956
789
## Quick Reference
957
790
958
-
If you want to run all commands at once, or if you're starting fresh, here's the complete workflow. You can also clone the [full working example](https://github.com/AztecProtocol/aztec-examples/tree/main/recursive_verification) to get started quickly.
791
+
If you want to run all commands at once, or if you're starting fresh, here's the complete workflow. You can also reference the [full working example](https://github.com/AztecProtocol/aztec-packages/tree/#include_aztec_version/docs/examples) in the main repository.
959
792
960
793
```bash
961
794
# Install dependencies (after creating package.json and tsconfig.json)
0 commit comments