Skip to content

Commit b6d4808

Browse files
authored
Merge pull request #25 from AztecProtocol/migrate-to-yarn
Migrate recursive_verification from bun to yarn
2 parents 4db513e + e3c00b4 commit b6d4808

File tree

11 files changed

+4859
-87
lines changed

11 files changed

+4859
-87
lines changed

.github/workflows/recursive-verification-tests.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
env:
2020
AZTEC_ENV: local-network
21-
AZTEC_VERSION: 3.0.0-devnet.20251212
21+
AZTEC_VERSION: 3.0.0-devnet.6-patch.1
2222

2323
steps:
2424
- name: Checkout repository
@@ -28,11 +28,8 @@ jobs:
2828
uses: actions/setup-node@v4
2929
with:
3030
node-version: "22"
31-
32-
- name: Setup Bun
33-
uses: oven-sh/setup-bun@v2
34-
with:
35-
bun-version: 1.1.36
31+
cache: "yarn"
32+
cache-dependency-path: recursive_verification/yarn.lock
3633

3734
- name: Set up Docker
3835
uses: docker/setup-buildx-action@v3
@@ -71,7 +68,7 @@ jobs:
7168
7269
- name: Install project dependencies
7370
working-directory: recursive_verification
74-
run: bun install --frozen-lockfile
71+
run: yarn install --frozen-lockfile
7572

7673
- name: Install Nargo
7774
uses: noir-lang/[email protected]
@@ -84,7 +81,7 @@ jobs:
8481

8582
- name: Compile contract and generate artifacts
8683
working-directory: recursive_verification
87-
run: bun ccc
84+
run: yarn ccc
8885

8986
- name: Generate proof data
9087
working-directory: recursive_verification
@@ -94,12 +91,12 @@ jobs:
9491
NODE_OPTIONS: "--max-old-space-size=6144"
9592
run: |
9693
echo "Generating proof data with memory optimizations..."
97-
bun data
94+
yarn data
9895
timeout-minutes: 30
9996

100-
- name: Run recursive verification script
97+
- name: Run tests
10198
working-directory: recursive_verification
102-
run: bun recursion
99+
run: yarn test
103100
timeout-minutes: 15
104101

105102
- name: Upload test results if failed

CLAUDE.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ This is a collection of Aztec smart contract examples written in Noir, designed
1313
- **nargo**: The Noir compiler for compiling vanilla Noir circuits (install via [noirup](https://github.com/noir-lang/noirup))
1414
- **aztec compile**: Aztec CLI command for compiling Aztec contracts (includes post-processing)
1515
- **aztec-wallet**: CLI tool for interacting with Aztec contracts
16-
- **Bun**: Fast JavaScript runtime (used in recursive_verification example)
17-
- **Node.js/npm**: JavaScript runtime (used in starter-token example)
16+
- **Node.js/npm/yarn**: JavaScript runtime and package managers (Node.js v22+ recommended)
1817

1918
## Project Structure
2019

@@ -25,7 +24,7 @@ aztec-examples/
2524
│ ├── contract/ # Aztec contract that verifies Noir proofs
2625
│ ├── scripts/ # TypeScript utilities for proof generation and deployment
2726
│ ├── tests/ # Integration test suite
28-
│ ├── data.json # Generated proof data (created by `bun data`)
27+
│ ├── data.json # Generated proof data (created by `yarn data`)
2928
│ ├── README.md # Comprehensive documentation
3029
│ ├── CLAUDE.md # Project-specific AI guidance
3130
│ ├── EXPLAINER.md # Technical deep-dive explanation
@@ -53,8 +52,7 @@ aztec-examples/
5352
bash -i <(curl -s https://install.aztec.network)
5453

5554
# Set specific version (examples may require different versions)
56-
aztec-up 3.0.0-devnet.20251212 # For recursive_verification
57-
aztec-up 2.0.2 # For starter-token
55+
aztec-up 3.0.0-devnet.6-patch.1 # For recursive_verification
5856
```
5957

6058
### Building Contracts
@@ -65,8 +63,8 @@ From a contract directory containing `Nargo.toml`:
6563
# Compile an Aztec contract (includes post-processing)
6664
aztec compile
6765

68-
# For recursive_verification example (using Bun)
69-
bun ccc # Compiles contract and generates TypeScript bindings
66+
# For recursive_verification example (using yarn)
67+
yarn ccc # Compiles contract and generates TypeScript bindings
7068
```
7169

7270
### Building Vanilla Noir Circuits
@@ -110,7 +108,7 @@ nargo test --oracle-resolver http://127.0.0.1:8081 --show-output
110108

111109
# Run integration tests (recursive_verification)
112110
cd recursive_verification
113-
bun test
111+
yarn test
114112

115113
# Run full test suite with compilation
116114
./run-tests.sh
@@ -149,9 +147,9 @@ aztec-wallet profile <function_name> --args <args...> --contract-address <alias>
149147
Complete workflow for the proof verification example:
150148

151149
```bash
152-
# 1. Install dependencies (requires Bun)
150+
# 1. Install dependencies (requires Node.js and yarn)
153151
cd recursive_verification
154-
bun install
152+
yarn install
155153

156154
# 2. Install nargo for vanilla Noir circuit compilation
157155
noirup -v 1.0.0-beta.15
@@ -160,19 +158,19 @@ noirup -v 1.0.0-beta.15
160158
cd circuit && nargo compile && cd ..
161159

162160
# 4. Compile the Aztec contract
163-
bun ccc # Runs: aztec compile && aztec codegen
161+
yarn ccc # Runs: aztec compile && aztec codegen
164162

165163
# 5. Generate proof data (UltraHonk proof, verification key, public inputs)
166-
bun data # Creates data.json with proof for x=1, y=2
164+
yarn data # Creates data.json with proof for x=1, y=2
167165

168166
# 6. Start Aztec local network (in separate terminal)
169167
aztec start --local-network
170168

171169
# 7. Deploy contract and verify proof on-chain
172-
bun recursion # Deploys ValueNotEqual contract and verifies proof
170+
yarn recursion # Deploys ValueNotEqual contract and verifies proof
173171

174172
# 8. Run tests
175-
bun test
173+
yarn test
176174

177175
# Optional: Run circuit tests
178176
cd circuit && nargo test
@@ -263,7 +261,7 @@ easy_private_state = { git = "https://github.com/AztecProtocol/aztec-packages/",
263261

264262
**Version Compatibility**: Different examples may use different Aztec versions:
265263

266-
- `recursive_verification`: v3.0.0-devnet.20251212
264+
- `recursive_verification`: v3.0.0-devnet.6-patch.1
267265

268266
### JavaScript/TypeScript Dependencies
269267

@@ -276,8 +274,9 @@ TypeScript projects use:
276274

277275
### Runtime Requirements
278276

279-
- **Node.js/npm**: For starter-token TypeScript examples (v20+)
280-
- **Bun**: Required for recursive_verification example (faster alternative to Node.js)
277+
- **Node.js**: v22+ for all TypeScript examples
278+
- **yarn**: Package manager for recursive_verification example
279+
- **npm**: Package manager for starter-token example
281280
- **Docker**: Required for running Aztec local network
282281
- **Memory**: 8GB+ RAM recommended for proof generation
283282

@@ -295,7 +294,7 @@ Runs on:
295294

296295
Steps:
297296

298-
1. Sets up Node.js (v22) and Bun
297+
1. Sets up Node.js (v22) and yarn
299298
2. Installs Aztec CLI
300299
3. Starts Aztec local network
301300
4. Compiles circuits and contracts
@@ -307,15 +306,15 @@ Steps:
307306

308307
### Issue: "Cannot find module './contract/artifacts/'"
309308

310-
**Solution**: Run `bun ccc` or `aztec compile` to generate contract artifacts
309+
**Solution**: Run `yarn ccc` or `aztec compile` to generate contract artifacts
311310

312311
### Issue: "Failed to connect to PXE"
313312

314313
**Solution**: Ensure Aztec local network is running with `aztec start --local-network`
315314

316315
### Issue: "Proof verification failed"
317316

318-
**Solution**: Regenerate proof data after circuit changes with `bun data`
317+
**Solution**: Regenerate proof data after circuit changes with `yarn data`
319318

320319
### Issue: Memory issues during proof generation
321320

recursive_verification/CLAUDE.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project Overview
66

7-
This is an Aztec-Noir project that demonstrates proof verification in Aztec contracts. It uses Aztec version 3.0.0-devnet.20251212 to verify Noir proofs within smart contracts on the Aztec network.
7+
This is an Aztec-Noir project that demonstrates proof verification in Aztec contracts. It uses Aztec version 3.0.0-devnet.6-patch.1 to verify Noir proofs within smart contracts on the Aztec network.
88

99
The project consists of:
1010

@@ -18,7 +18,7 @@ The project consists of:
1818

1919
```bash
2020
# Install dependencies
21-
bun install
21+
yarn install
2222

2323
# Install/update Aztec tools
2424
aztec-up
@@ -49,16 +49,16 @@ cd circuit && nargo test
4949

5050
```bash
5151
# Compile contract, postprocess, and generate TypeScript bindings
52-
bun ccc
52+
yarn ccc
5353
# This runs: cd contract && aztec compile && aztec codegen target -o artifacts
5454

5555
# Generate proof data (vk, proof, public inputs) for contract verification
56-
bun data
57-
# This runs: bun run scripts/generate_data.ts
56+
yarn data
57+
# This runs: tsx scripts/generate_data.ts
5858

5959
# Deploy contract and run proof verification
60-
bun recursion
61-
# This runs: bun run scripts/run_recursion.ts
60+
yarn recursion
61+
# This runs: tsx scripts/run_recursion.ts
6262
```
6363

6464
## Architecture
@@ -105,9 +105,10 @@ bun recursion
105105
- `@aztec/aztec.js`: Aztec SDK for contract deployment and interaction
106106
- `@aztec/bb.js`: Barretenberg backend for proof generation
107107
- `@aztec/noir-noir_js`: Noir.js for circuit execution
108-
- `bun`: JavaScript runtime and package manager
108+
- `yarn`: Package manager
109+
- `tsx`: TypeScript execution for Node.js
109110

110111
## Testing
111112

112113
- Circuit tests: Use `nargo test` in the circuit directory
113-
- Contract verification: Run the full flow with `bun recursion` after starting the local network
114+
- Contract verification: Run the full flow with `yarn recursion` after starting the local network

0 commit comments

Comments
 (0)