@@ -46,18 +46,20 @@ aztec-examples/
4646## Development Commands
4747
4848### Prerequisites
49+
4950``` bash
5051# Install Aztec tools (required)
5152bash -i <( curl -s https://install.aztec.network)
5253
5354# Set specific version (examples may require different versions)
54- aztec-up 2 .0.3 # For recursive_verification
55+ aztec-up 3 .0.0-nightly.20251026 # For recursive_verification
5556aztec-up 2.0.2 # For starter-token
5657```
5758
5859### Building Contracts
5960
6061From a contract directory containing ` Nargo.toml ` :
62+
6163``` bash
6264# Compile an Aztec contract
6365aztec-nargo compile
@@ -180,19 +182,22 @@ npm start
180182### Aztec Contract Structure
181183
182184Aztec contracts use the ` #[aztec] ` macro and define functions as either:
185+
183186- ` #[private] ` : Executed client-side with zero-knowledge proofs
184187- ` #[public] ` : Executed on-chain by the protocol
185188- ` #[initializer] ` : Constructor-like functions for setup
186189- ` #[unconstrained] ` : View functions that don't modify state
187190
188191Key considerations:
192+
189193- ** Private functions** : Optimize for circuit size (gates), unconstrained functions don't add gates
190194- ** Public functions** : Optimize for gas cost, unconstrained functions do add cost
191195- ** Unconstrained functions** : Used for computation that doesn't need proving, must verify results in constrained context
192196
193197### Proof Verification Pattern (recursive_verification)
194198
195199The recursive verification example demonstrates:
200+
196201- ** Off-chain proof generation** : Noir circuits compiled and executed with Barretenberg
197202- ** On-chain verification** : Using ` std::verify_proof_with_type ` in Aztec contracts
198203- ** UltraHonk proving system** : Generates proofs with 457 field elements, verification keys with 115 fields
@@ -201,6 +206,7 @@ The recursive verification example demonstrates:
201206### Token Pattern (starter-token)
202207
203208The token example showcases:
209+
204210- ** Dual balance system** : Public and private token balances
205211- ** State management** : Using ` PublicMutable ` and ` Map ` for storage
206212- ** Access control** : Owner-based permissions for minting
@@ -209,6 +215,7 @@ The token example showcases:
209215### Testing Pattern
210216
211217Tests use the Testing Execution Environment (TXE):
218+
212219``` noir
213220use dep::aztec::test::helpers::test_environment::TestEnvironment;
214221
@@ -229,19 +236,21 @@ unconstrained fn test_function() {
229236### Aztec Contract Dependencies
230237
231238Aztec contracts specify dependencies in ` Nargo.toml ` :
239+
232240``` toml
233241[dependencies ]
234242aztec = { git = " https://github.com/AztecProtocol/aztec-packages/" , tag = " vX.X.X" , directory = " noir-projects/aztec-nr/aztec" }
235243easy_private_state = { git = " https://github.com/AztecProtocol/aztec-packages/" , tag = " vX.X.X" , directory = " noir-projects/aztec-nr/easy-private-state" }
236244```
237245
238246** Version Compatibility** : Different examples may use different Aztec versions:
239- - ` recursive_verification ` : v2.0.3
240- - ` starter-token ` : v2 .0.2
247+
248+ - ` recursive_verification ` : v3 .0.0-nightly.20251026
241249
242250### JavaScript/TypeScript Dependencies
243251
244252TypeScript projects use:
253+
245254- ` @aztec/aztec.js ` : Aztec SDK for contract deployment and interaction
246255- ` @aztec/accounts ` : Account management for Aztec
247256- ` @aztec/bb.js ` : Barretenberg backend for proof generation (recursive_verification)
@@ -261,11 +270,13 @@ The repository includes GitHub Actions workflows for automated testing:
261270### recursive-verification-tests.yml
262271
263272Runs on:
273+
264274- Push to main branch
265275- Pull requests modifying ` recursive_verification/** `
266276- Manual workflow dispatch
267277
268278Steps:
279+
2692801 . Sets up Node.js (v22) and Bun
2702812 . Installs Aztec CLI
2712823 . Starts Aztec sandbox
@@ -277,18 +288,23 @@ Steps:
277288## Common Issues and Solutions
278289
279290### Issue: "Cannot find module './contract/artifacts/'"
291+
280292** Solution** : Run ` bun ccc ` or ` aztec-nargo compile ` to generate contract artifacts
281293
282294### Issue: "Failed to connect to PXE"
295+
283296** Solution** : Ensure Aztec sandbox is running with ` aztec start --sandbox `
284297
285298### Issue: "Proof verification failed"
299+
286300** Solution** : Regenerate proof data after circuit changes with ` bun data `
287301
288302### Issue: Memory issues during proof generation
303+
289304** Solution** : Close other applications or use a machine with more RAM (8GB+ recommended)
290305
291306### Issue: Version compatibility errors
307+
292308** Solution** : Check the Aztec version required for each example and set with ` aztec-up <version> `
293309
294310## Best Practices
@@ -297,4 +313,4 @@ Steps:
2973132 . ** Testing** : Run tests locally before pushing changes
2983143 . ** Documentation** : Update READMEs when modifying examples
2993154 . ** Clean Builds** : When encountering issues, try removing ` target/ ` , ` artifacts/ ` , and ` node_modules/ ` directories
300- 5 . ** Sandbox Management** : Always ensure sandbox is running when deploying/testing contracts
316+ 5 . ** Sandbox Management** : Always ensure sandbox is running when deploying/testing contracts
0 commit comments