Skip to content

Commit c228c0c

Browse files
committed
debug script
1 parent a7c8dff commit c228c0c

File tree

8 files changed

+220
-4424
lines changed

8 files changed

+220
-4424
lines changed

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ aztec-examples/
5252
bash -i <(curl -s https://install.aztec.network)
5353

5454
# Set specific version (examples may require different versions)
55-
aztec-up 3.0.0-nightly.20251026 # For recursive_verification
55+
aztec-up 3.0.0-devnet.2 # For recursive_verification
5656
aztec-up 2.0.2 # For starter-token
5757
```
5858

@@ -245,7 +245,7 @@ easy_private_state = { git = "https://github.com/AztecProtocol/aztec-packages/",
245245

246246
**Version Compatibility**: Different examples may use different Aztec versions:
247247

248-
- `recursive_verification`: v3.0.0-nightly.20251026
248+
- `recursive_verification`: v3.0.0-devnet.2
249249

250250
### JavaScript/TypeScript Dependencies
251251

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You can find additional examples in the Aztec monorepo [docs examples folder](ht
1616

1717
### 1. [Recursive Verification](./recursive_verification)
1818

19-
**Aztec Version**: 3.0.0-nightly.20251026
19+
**Aztec Version**: 3.0.0-devnet.2
2020

2121
Demonstrates how to verify Noir circuit proofs within Aztec smart contracts using the UltraHonk proving system. This example showcases:
2222

@@ -43,7 +43,7 @@ Demonstrates how to verify Noir circuit proofs within Aztec smart contracts usin
4343
bash -i <(curl -s https://install.aztec.network)
4444

4545
# Set specific Aztec version (if needed)
46-
aztec-up 3.0.0-nightly.20251026
46+
aztec-up 3.0.0-devnet.2
4747
```
4848

4949
### Run the Examples

recursive_verification/CLAUDE.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ 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-nightly.20251026 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.2 to verify Noir proofs within smart contracts on the Aztec network.
88

99
The project consists of:
10+
1011
- A Noir circuit (`hello_circuit`) that proves x ≠ y
1112
- An Aztec smart contract (`ValueNotEqual`) that verifies the proof on-chain
1213
- Scripts to generate proof data and deploy/interact with the contract
1314

1415
## Common Development Commands
1516

1617
### Environment Setup
18+
1719
```bash
1820
# Install dependencies
1921
bun install
@@ -26,6 +28,7 @@ aztec start --sandbox
2628
```
2729

2830
### Circuit Development
31+
2932
```bash
3033
# Compile the Noir circuit
3134
cd circuit && aztec-nargo compile
@@ -38,6 +41,7 @@ cd circuit && nargo test
3841
```
3942

4043
### Contract Development
44+
4145
```bash
4246
# Compile contract, postprocess, and generate TypeScript bindings
4347
bun ccc
@@ -55,11 +59,13 @@ bun recursion
5559
## Architecture
5660

5761
### Circuit (`circuit/`)
62+
5863
- **`src/main.nr`**: Simple circuit that asserts two field values are not equal
5964
- **`target/hello_circuit.json`**: Compiled circuit bytecode and ABI
6065
- Uses UltraHonk proving system for proof generation
6166

6267
### Contract (`contract/`)
68+
6369
- **`src/main.nr`**: Aztec smart contract with:
6470
- `initialize()`: Sets up counter with initial value for an owner
6571
- `increment()`: Verifies a Noir proof and increments the counter
@@ -68,7 +74,9 @@ bun recursion
6874
- Stores private counters using `EasyPrivateUint` from Aztec-nr libraries
6975

7076
### Scripts (`scripts/`)
77+
7178
- **`generate_data.ts`**:
79+
7280
- Executes the circuit with inputs (x=1, y=2)
7381
- Generates UltraHonk proof using Barretenberg backend
7482
- Serializes proof, verification key, and public inputs to `data.json`
@@ -80,17 +88,20 @@ bun recursion
8088
- Verifies the proof on-chain and updates the counter
8189

8290
### Data Flow
91+
8392
1. Circuit compilation produces bytecode (`hello_circuit.json`)
8493
2. `generate_data.ts` creates proof data from circuit execution
8594
3. Contract compilation produces Aztec contract artifact and TypeScript bindings
8695
4. `run_recursion.ts` deploys contract and submits proof for on-chain verification
8796

8897
## Key Dependencies
98+
8999
- `@aztec/aztec.js`: Aztec SDK for contract deployment and interaction
90100
- `@aztec/bb.js`: Barretenberg backend for proof generation
91101
- `@aztec/noir-noir_js`: Noir.js for circuit execution
92102
- `bun`: JavaScript runtime and package manager
93103

94104
## Testing
105+
95106
- Circuit tests: Use `nargo test` in the circuit directory
96-
- Contract verification: Run the full flow with `bun recursion` after starting the sandbox
107+
- Contract verification: Run the full flow with `bun recursion` after starting the sandbox

recursive_verification/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ This project implements:
1111
- **Proof Generation**: Scripts to generate UltraHonk proofs using Barretenberg
1212
- **On-chain Verification**: Deployment and interaction scripts for proof verification on Aztec
1313

14-
**Aztec Version**: `3.0.0-nightly.20251026`
14+
**Aztec Version**: `3.0.0-devnet.2`
1515

1616
## Prerequisites
1717

1818
- [Bun](https://bun.sh/) runtime (v1.0 or higher)
19-
- [Aztec CLI](https://docs.aztec.network/getting_started/quickstart) (version 3.0.0-nightly.20251026)
19+
- [Aztec CLI](https://docs.aztec.network/getting_started/quickstart) (version 3.0.0-devnet.2)
2020
- Linux/macOS (Windows users can use WSL2)
2121
- 8GB+ RAM recommended for proof generation
2222

@@ -61,7 +61,7 @@ bash -i <(curl -s https://install.aztec.network)
6161
### Set Aztec to the correct version:
6262

6363
```bash
64-
aztec-up 3.0.0-nightly.20251026
64+
aztec-up 3.0.0-devnet.2
6565
```
6666

6767
This ensures compatibility with the contract dependencies.
@@ -153,7 +153,7 @@ For a fresh setup, run these commands in order:
153153
bun install
154154

155155
# 2. Setup Aztec
156-
aztec-up 3.0.0-nightly.20251026
156+
aztec-up 3.0.0-devnet.2
157157

158158
# 3. Compile circuit
159159
cd circuit && aztec-nargo compile && cd ..
@@ -199,6 +199,7 @@ This runs the tests defined in `circuit/src/main.nr`. The test verifies that the
199199
### Integration Tests
200200

201201
The test suite (`tests/recursive_verification.test.ts`) includes:
202+
202203
- Contract deployment verification
203204
- Proof verification and counter increment tests
204205
- Multi-user counter management
@@ -227,6 +228,7 @@ The test suite (`tests/recursive_verification.test.ts`) includes:
227228
- Verify the circuit was compiled with `cd circuit && aztec-nargo compile`
228229

229230
5. **Memory issues during proof generation**
231+
230232
- The Barretenberg prover requires significant RAM
231233
- Close other applications or use a machine with more memory
232234

recursive_verification/bun.lockb

-249 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)