Skip to content

Commit bf5086a

Browse files
author
AztecBot
committed
Merge branch 'next' into merge-train/barretenberg
2 parents 47358d6 + a9f25fa commit bf5086a

65 files changed

Lines changed: 1357 additions & 332 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/release-docs/SKILL.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ Store the address for updating docs.
9090
**Note:** The Sponsored FPC is only deployed on devnet. For mainnet and testnet releases,
9191
mark the SponsoredFPC row as "Not deployed" in the L2 Contract Addresses table.
9292

93-
### Step 5: Update Version Config
93+
### Step 5: Update Version Configs
9494

95-
**File:** `docs/developer_version_config.json`
95+
**Developer docs:** `docs/developer_version_config.json`
9696

9797
This file maps release types to version strings. Update the entry matching the
9898
release type with the new version (prefixed with `v`):
@@ -111,6 +111,9 @@ For example, for a devnet release of `4.1.0-devnet.1`, update `"devnet": "v4.1.0
111111
The preprocessor (`include_version.js`) reads defaults from this config file, so
112112
updating it is sufficient — you no longer need to edit hardcoded defaults in JS.
113113

114+
**Network/operator docs** are updated separately in Step 13 after the version
115+
snapshot is created (the config update requires the versioned docs directory to exist).
116+
114117
### Step 6: Generate API Reference Docs
115118

116119
Generate the Aztec.nr and TypeScript API documentation for the new version. The
@@ -279,13 +282,21 @@ cd docs
279282
<TAG_VAR>=<new_version> RELEASE_TYPE=<release_type> yarn docusaurus docs:version:developer v<new_version>
280283
```
281284

282-
Then update the versions file:
285+
Then update the versions files:
286+
287+
```bash
288+
scripts/update_docs_versions.sh developer
289+
```
290+
291+
For **mainnet** and **testnet** releases, also cut and configure the network/operator docs:
283292

284293
```bash
285-
docs/scripts/update_docs_versions.sh developer
294+
<TAG_VAR>=<new_version> RELEASE_TYPE=<release_type> yarn docusaurus docs:version:network v<new_version>
295+
scripts/update_docs_versions.sh network <release_type> v<new_version>
286296
```
287297

288-
Verify the new version appears in `docs/developer_version_config.json`.
298+
Verify the new version appears in both `docs/developer_version_config.json` and
299+
`docs/network_version_config.json`.
289300

290301
### Step 14: Review Recent Docs Updates on `next`
291302

docs/CLAUDE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,10 @@ The TypeScript API generation is configured in `scripts/typescript_api_generatio
144144
Uses Docusaurus multi-instance versioning with separate version tracks:
145145

146146
- **Developer docs**: Version config in `developer_version_config.json`, stored in `developer_versioned_docs/`
147-
- **Network docs**: Versions in `network_versions.json`, stored in `network_versioned_docs/`
148-
- Developer version config is an object mapping release type to version string (e.g., `{"mainnet": "v4.2.0", "testnet": "v4.1.0", ...}`)
149-
- `developer_versions.json` is auto-generated from the config file; `network_versions.json` is managed directly
147+
- **Network docs**: Version config in `network_version_config.json`, stored in `network_versioned_docs/`
148+
- Both config files map release types to version strings (e.g., `{"mainnet": "v4.2.0", "testnet": "v4.1.0", ...}`)
149+
- `docusaurus.config.js` auto-generates `*_versions.json` from these configs (filtered to versions with existing directories, plus any extra unmapped directories)
150+
- Use `scripts/update_docs_versions.sh` to update configs and reconcile: `./scripts/update_docs_versions.sh network mainnet v4.2.0`
150151
- Each docs instance has its own version dropdown in the navbar
151152
- Preprocessing macros (`#include_code`, `#release_version`, conditionals, etc.) only work in source folders, not in versioned copies
152153
- Create new versions with: `yarn docusaurus docs:version:<instance-id> <version>`

docs/README.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,21 @@ The legacy `#include_aztec_version` macro uses `COMMIT_TAG`, while `#include_ver
6565

6666
### How do I change the versions that show in the website
6767

68-
The version system uses two approaches:
68+
Both developer and network docs use **version config files** that map release types to version strings:
6969

70-
- **Developer docs**: `developer_version_config.json` maps release types to version strings (e.g., `{"mainnet": "v4.2.0", "testnet": "v4.1.0", ...}`). The Docusaurus-compatible `developer_versions.json` is auto-generated from this config at startup.
71-
- **Network docs**: `network_versions.json` is managed directly as a simple array of version strings.
70+
- **Developer docs**: `developer_version_config.json` (e.g., `{"mainnet": "v4.2.0-aztecnr-rc.2", "testnet": "v4.1.0-rc.2", ...}`)
71+
- **Network docs**: `network_version_config.json` (e.g., `{"mainnet": "v4.1.2", "testnet": "v4.1.0-rc.2"}`)
7272

73-
You can update the developer config manually, or use the `scripts/update_docs_versions.sh` script which reconciles it with the versioned docs directories:
73+
The `docusaurus.config.js` reads these configs and auto-generates the Docusaurus-compatible `*_versions.json` arrays at startup, including only versions that have matching versioned docs directories. Any extra directories not in the config are also included (to preserve newly cut versions before the config is updated).
74+
75+
Use `scripts/update_docs_versions.sh` to update configs and reconcile with versioned docs directories:
7476

7577
```bash
76-
./scripts/update_docs_versions.sh developer # Updates developer_version_config.json
78+
./scripts/update_docs_versions.sh developer # Reconcile developer config
79+
./scripts/update_docs_versions.sh network mainnet v4.2.0 # Set mainnet=v4.2.0, then reconcile
80+
./scripts/update_docs_versions.sh developer nightly v5.0.0-nightly # Set nightly version, then reconcile
7781
```
7882

79-
For network docs, edit `network_versions.json` directly.
80-
8183
To create a new versioned snapshot of the docs:
8284

8385
```bash
@@ -87,33 +89,15 @@ yarn docusaurus docs:version:network v4.2.0 # New network version
8789

8890
### Version Configuration
8991

90-
The `docusaurus.config.js` file reads `developer_version_config.json` which explicitly maps release types to version strings. This replaces fragile substring matching on version strings for developer docs.
91-
92-
**Developer docs** (from `developer_version_config.json`):
93-
94-
```javascript
95-
const mainnetDeveloperVersion = developerVersionConfig.mainnet || null;
96-
const developerTestnetVersion = developerVersionConfig.testnet || null;
97-
const devnetVersion = developerVersionConfig.devnet || null;
98-
const nightlyVersion = developerVersionConfig.nightly || null;
99-
```
100-
101-
**Network docs** (from `network_versions.json`):
102-
103-
```javascript
104-
const ignitionVersion = networkVersions.find((v) => v.includes("ignition"));
105-
const testnetVersion = networkVersions.find((v) => !v.includes("ignition"));
106-
```
92+
The `docusaurus.config.js` file reads both config files to determine version labels, paths, and defaults. The config-based approach replaces fragile substring matching on version strings.
10793

10894
This ensures that:
10995

110-
- Developer doc version types are always correct regardless of the version string format
96+
- Version types are always correct regardless of the version string format
11197
- When nightly versions are removed by the cleanup script, the build doesn't break
11298
- Version configurations are conditionally included only if they exist
11399
- The llms.txt plugin always points to the correct version (mainnet or testnet)
114100

115-
**Why this matters:** The [nightly docs workflow](../.github/workflows/nightly-docs-release.yml) runs `cleanup_nightly_versions.sh` before creating new versioned docs. The config-based approach means version type detection never breaks even when version strings don't follow predictable patterns.
116-
117101
## Releases
118102

119103
A new docs site is published on every merge to the next branch.

docs/developer_versioned_docs/version-v4.1.0-rc.2/ai_tooling.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ This is an Aztec smart contract project. Always use the `aztec` CLI wrapper inst
4040
- Prefer `T` return types over `T | null` when null would indicate a bug rather than a valid state.
4141
- Do not add `.catch(() => defaultValue)` to promises. If something fails, the caller needs to know.
4242

43+
## Version Compatibility
44+
45+
The Aztec developer SDK/aztec-nr version (used for writing and compiling contracts) may differ from the node version (used by operators to run the network). For example, aztec-nr `4.2.0-aztecnr-rc.2` is compatible with node version `4.1.2`. Check the [Networks page](https://docs.aztec.network/networks) for current network versions. When in doubt, use the version from the developer docs you are reading — it is the correct SDK version for contract development on that network.
46+
4347
## Hashing: Default to Poseidon2
4448

4549
When writing Aztec.nr contract code that requires hashing, **always use Poseidon2** unless a specific protocol or interoperability requirement calls for a different hash.

docs/developer_versioned_docs/version-v4.2.0-aztecnr-rc.2/ai_tooling.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ This is an Aztec smart contract project. Always use the `aztec` CLI wrapper inst
4040
- Prefer `T` return types over `T | null` when null would indicate a bug rather than a valid state.
4141
- Do not add `.catch(() => defaultValue)` to promises. If something fails, the caller needs to know.
4242

43+
## Version Compatibility
44+
45+
The Aztec developer SDK/aztec-nr version (used for writing and compiling contracts) may differ from the node version (used by operators to run the network). For example, aztec-nr `4.2.0-aztecnr-rc.2` is compatible with node version `4.1.2`. Check the [Networks page](https://docs.aztec.network/networks) for current network versions. When in doubt, use the version from the developer docs you are reading — it is the correct SDK version for contract development on that network.
46+
4347
## Hashing: Default to Poseidon2
4448

4549
When writing Aztec.nr contract code that requires hashing, **always use Poseidon2** unless a specific protocol or interoperability requirement calls for a different hash.

docs/developer_versioned_docs/version-v4.2.0-aztecnr-rc.2/docs/tutorials/contract_tutorials/counter_contract.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This tutorial is compatible with the Aztec version `4.2.0-aztecnr-rc.2`. Install
2222
Run this to create a new contract project:
2323

2424
```bash
25-
aztec new --contract counter
25+
aztec new counter
2626
```
2727

2828
Your structure should look like this:

docs/developer_versioned_docs/version-v4.2.0-aztecnr-rc.2/docs/tutorials/contract_tutorials/recursive_verification.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ For example, consider a machine learning inference that needs 10,000 input featu
4242

4343
1. Perform the computation offchain in a vanilla Noir circuit with no input limits
4444
2. Generate a proof of correct execution
45-
3. Verify only the proof onchain (115 fields for VK + 457-508 fields for proof + N public inputs)
45+
3. Verify only the proof onchain (115 fields for VK + ~500 fields for proof + N public inputs)
4646

4747
This pattern transforms arbitrarily large computations into fixed-size proof verification.
4848

@@ -68,7 +68,7 @@ flowchart LR
6868

6969
Proof verification enables several patterns:
7070

71-
- **Bypassing Input Limits**: Aztec private functions have strict input constraints. A proof verification call uses ~624 fields (115 VK + 508 proof + 1 public input), but can attest to computations with arbitrarily many inputs. For example, proving membership in a set of 10,000 elements becomes a fixed-size verification.
71+
- **Bypassing Input Limits**: Aztec private functions have strict input constraints. A proof verification call uses ~616 fields (115 VK + ~500 proof + 1 public input), but can attest to computations with arbitrarily many inputs. For example, proving membership in a set of 10,000 elements becomes a fixed-size verification.
7272

7373
- **Cross-System Verification**: Verify proofs generated by external Noir circuits within your Aztec application. This enables composability: your contract can trust computations performed by other systems without those systems needing to be Aztec-native.
7474

@@ -225,10 +225,10 @@ The contract demonstrates several important patterns:
225225

226226
### Create the Contract Project
227227

228-
Use `aztec init` to generate the contract project structure:
228+
Use `aztec new` to generate the contract project structure:
229229

230230
```bash
231-
aztec init --contract contract
231+
aztec new contract --name ValueNotEqual
232232
```
233233

234234
This creates:
@@ -541,7 +541,7 @@ Create `scripts/generate_data.ts`:
541541

542542
```typescript title="generate_data" showLineNumbers
543543
import { Noir } from "@aztec/noir-noir_js";
544-
import circuitJson from "../../../../target/hello_circuit.json" with { type: "json" };
544+
import circuitJson from "../circuit/target/hello_circuit.json" with { type: "json" };
545545
import { Barretenberg, UltraHonkBackend, deflattenFields } from "@aztec/bb.js";
546546
import fs from "fs";
547547
import { exit } from "process";
@@ -597,14 +597,14 @@ if (proofAsFields.length === 0) {
597597
const vkAsFields = recursiveArtifacts.vkAsFields;
598598

599599
console.log(`VK size: ${vkAsFields.length}`); // Should be 115
600-
console.log(`Proof size: ${proofAsFields.length}`); // Should be 508
600+
console.log(`Proof size: ${proofAsFields.length}`); // Should be ~500
601601
console.log(`Public inputs: ${mainProofData.publicInputs.length}`); // Should be 1
602602

603603
// Step 9: Save all data to JSON for contract interaction
604604
const data = {
605605
vkAsFields: vkAsFields, // 115 field elements - the verification key
606606
vkHash: recursiveArtifacts.vkHash, // Hash of VK - stored in contract
607-
proofAsFields: proofAsFields, // 508 field elements - the proof
607+
proofAsFields: proofAsFields, // ~500 field elements - the proof
608608
publicInputs: mainProofData.publicInputs.map((p: string) => p.toString()),
609609
};
610610

@@ -659,7 +659,7 @@ Always verify locally before submitting onchain. Onchain verification costs gas/
659659

660660
#### Field Element Conversion
661661

662-
ZK proofs are arrays of bytes, but Aztec contracts work with field elements. We convert the proof and VK to arrays of 115 and 508 field elements respectively.
662+
ZK proofs are arrays of bytes, but Aztec contracts work with field elements. We convert the proof and VK to arrays of 115 and ~500 field elements respectively.
663663

664664
```typescript
665665
let proofAsFields = recursiveArtifacts.proofAsFields;
@@ -701,7 +701,7 @@ Expected output:
701701
Proof verification: SUCCESS
702702
Using deflattenFields to convert proof...
703703
VK size: 115
704-
Proof size: 508
704+
Proof size: 500
705705
Public inputs: 1
706706
Done
707707
```
@@ -714,7 +714,7 @@ The generated `data.json` contains:
714714
{
715715
"vkAsFields": ["0x...", "0x...", ...], // 115 field elements
716716
"vkHash": "0x...", // Single field element
717-
"proofAsFields": ["0x...", "0x...", ...], // 508 field elements
717+
"proofAsFields": ["0x...", "0x...", ...], // ~500 field elements
718718
"publicInputs": ["2"] // The public input y=2
719719
}
720720
```
@@ -832,7 +832,7 @@ async function main() {
832832
const interaction = await valueNotEqual.methods.increment(
833833
accounts[0].item,
834834
data.vkAsFields as unknown as FieldLike[], // 115 field VK
835-
data.proofAsFields as unknown as FieldLike[], // 508 field proof
835+
data.proofAsFields as unknown as FieldLike[], // ~500 field proof
836836
data.publicInputs as unknown as FieldLike[], // Public inputs
837837
);
838838

@@ -885,7 +885,7 @@ This single line triggers a complex flow:
885885

886886
2. **Proof Generation** (client-side, in PXE):
887887
- Generate a ZK proof that the private execution was correct
888-
- This proof doesn't reveal inputs (including the 508-field proof!)
888+
- This proof doesn't reveal inputs (including the ~500-field proof!)
889889

890890
3. **Transaction Submission**:
891891
- Send the proof + encrypted logs + public function calls to the network

docs/developer_versioned_docs/version-v4.2.0-aztecnr-rc.2/docs/tutorials/contract_tutorials/token_contract.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ cd bob_token
4444
yarn init
4545
# This is to ensure yarn uses node_modules instead of pnp for dependency installation
4646
yarn config set nodeLinker node-modules
47-
yarn add @aztec/aztec.js@4.2.0-aztecnr-rc.2 @aztec/accounts@4.2.0-aztecnr-rc.2 @aztec/test-wallet@4.2.0-aztecnr-rc.2 @aztec/kv-store@4.2.0-aztecnr-rc.2
47+
yarn add @aztec/aztec.js@4.2.0-aztecnr-rc.2 @aztec/accounts@4.2.0-aztecnr-rc.2 @aztec/kv-store@4.2.0-aztecnr-rc.2
4848
aztec init
4949
```
5050

5151
## Contract structure
5252

53-
The `aztec init` command created a workspace with two crates: a `bob_token_contract` crate for your smart contract code and a `bob_token_test` crate for Noir tests. In `bob_token_contract/src/main.nr` we even have a proto-contract. Let's replace it with a simple starting point:
53+
The `aztec init` command created a contract project with `Nargo.toml` and `src/main.nr`. Let's replace the boilerplate in `src/main.nr` with a simple starting point:
5454

5555
```rust
5656
use aztec::macros::aztec;

docs/developer_versioned_docs/version-v4.2.0-aztecnr-rc.2/docs/tutorials/js_tutorials/token_bridge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ const INBOX_ABI = [
830830
type: "event",
831831
name: "MessageSent",
832832
inputs: [
833-
{ name: "l2BlockNumber", type: "uint256", indexed: true },
833+
{ name: "checkpointNumber", type: "uint256", indexed: true },
834834
{ name: "index", type: "uint256", indexed: false },
835835
{ name: "hash", type: "bytes32", indexed: true },
836836
{ name: "rollingHash", type: "bytes16", indexed: false },

docs/docs-developers/ai_tooling.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ This is an Aztec smart contract project. Always use the `aztec` CLI wrapper inst
4040
- Prefer `T` return types over `T | null` when null would indicate a bug rather than a valid state.
4141
- Do not add `.catch(() => defaultValue)` to promises. If something fails, the caller needs to know.
4242

43+
## Version Compatibility
44+
45+
The Aztec developer SDK/aztec-nr version (used for writing and compiling contracts) may differ from the node version (used by operators to run the network). For example, aztec-nr `4.2.0-aztecnr-rc.2` is compatible with node version `4.1.2`. Check the [Networks page](https://docs.aztec.network/networks) for current network versions. When in doubt, use the version from the developer docs you are reading — it is the correct SDK version for contract development on that network.
46+
4347
## Hashing: Default to Poseidon2
4448

4549
When writing Aztec.nr contract code that requires hashing, **always use Poseidon2** unless a specific protocol or interoperability requirement calls for a different hash.

0 commit comments

Comments
 (0)