Skip to content

Commit e48f91a

Browse files
authored
Merge pull request #253 from AztecProtocol/josh/update-version-4.1.0
Update Aztec version to 4.1.0
2 parents ce4c66b + 4871d65 commit e48f91a

File tree

13 files changed

+306
-291
lines changed

13 files changed

+306
-291
lines changed

.claude/commands/update-version.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Read these files to understand current state:
3636
- `package.json`
3737
- `config/local-network.json`
3838
- `config/devnet.json`
39+
- `config/testnet.json`
3940
- `README.md`
4041
- `CLAUDE.md`
4142

@@ -54,6 +55,10 @@ aztec = { git = "https://github.com/AztecProtocol/aztec-nr/", tag = "v<VERSION>"
5455

5556
**4. `config/devnet.json`** — Update `settings.version` to the new npm version.
5657

58+
**4b. `config/testnet.json`** — Update `settings.version` to the new npm version.
59+
60+
> **Note:** Only update the config files relevant to the current branch. On `next`, update `local-network.json` and `devnet.json`. On `testnet`, update `local-network.json` and `testnet.json`. Leave other branch configs as-is.
61+
5762
**5. `README.md`** — Update the install command version in the Getting Started section:
5863
```bash
5964
export VERSION=<NEW_VERSION>
@@ -173,7 +178,15 @@ Based on the API research from Step 7 and any changes revealed by `yarn codegen`
173178

174179
### Step 11: Run Noir TXE tests
175180

176-
Run `yarn test:nr` to execute the Noir unit tests in the TXE simulator (no network needed).
181+
Run the Noir unit tests in the TXE simulator (no network needed).
182+
183+
**Known issue:** `yarn test:nr` (which runs `aztec test`) may hang due to a wrapper script issue. If it hangs for more than 30 seconds with no output, use this workaround:
184+
185+
1. Kill any process on port 8081: `lsof -ti:8081 | xargs kill -9 2>/dev/null`
186+
2. Start the TXE server manually: `aztec start --txe --port 8081 &`
187+
3. Wait a few seconds for it to start
188+
4. Run nargo test directly: `nargo test --silence-warnings --oracle-resolver http://localhost:8081`
189+
5. Kill the TXE server when done
177190

178191
If tests fail, diagnose and fix the contract test code. Iterate until tests pass.
179192

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
Aztec Starter — a Pod Racing game contract built with Noir on the Aztec network. Two players allocate points across 5 tracks over 3 rounds with private state; scores are revealed at the end (commit-reveal pattern). The player who wins more tracks (best of 5) wins.
88

9-
**Aztec version: `4.1.0-rc.2`** — pinned across `Nargo.toml`, `package.json`, `config/*.json`, and README. All must stay in sync when updating.
9+
**Aztec version: `4.1.0`** — pinned across `Nargo.toml`, `package.json`, `config/*.json`, and README. All must stay in sync when updating.
1010

1111
## Build & Development Commands
1212

Nargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ authors = [ "" ]
55
compiler_version = ">=0.18.0"
66

77
[dependencies]
8-
aztec = { git = "https://github.com/AztecProtocol/aztec-nr/", tag = "v4.1.0-rc.2", directory = "aztec" }
8+
aztec = { git = "https://github.com/AztecProtocol/aztec-nr/", tag = "v4.1.0", directory = "aztec" }

ONBOARDING.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This guide takes you from "reading code in a browser" to "deploying on devnet"
99
* **Phases 1-2** need only a browser (read code, compile in a Codespace)
1010
* **Phases 3-6** need local tools (deploy, interact, extend, advanced topics)
1111

12-
**Aztec version pinned in this repo:** `4.1.0-rc.2` (check `Nargo.toml` and `package.json` for source of truth)
12+
**Aztec version pinned in this repo:** `4.1.0` (check `Nargo.toml` and `package.json` for source of truth)
1313

1414
**Links:**
1515

@@ -164,7 +164,7 @@ fn create_game(game_id: Field) {
164164
// Ensure this game_id hasn't been used yet (player1 must be zero address)
165165
assert(self.storage.races.at(game_id).read().player1.eq(AztecAddress::zero()));
166166

167-
let player1 = self.msg_sender();
167+
let player1 = self.context.maybe_msg_sender().unwrap();
168168
debug_log_format(
169169
"Creating game {0} by player {1}",
170170
[game_id, player1.to_field()],
@@ -193,7 +193,7 @@ Creates a new game. Checks the game ID isn't taken (player1 must be zero address
193193
fn join_game(game_id: Field) {
194194
let maybe_existing_game = self.storage.races.at(game_id).read();
195195

196-
let player2 = self.msg_sender();
196+
let player2 = self.context.maybe_msg_sender().unwrap();
197197
debug_log_format("Player {0} joining game {1}", [player2.to_field(), game_id]);
198198

199199
// Add the caller as player2 (validates that player1 exists and player2 is empty)
@@ -314,7 +314,7 @@ fn play_round(
314314
// Validate that total points don't exceed 9 (you can't max out all tracks)
315315
assert(track1 + track2 + track3 + track4 + track5 < 10);
316316

317-
let player = self.msg_sender();
317+
let player = self.context.maybe_msg_sender().unwrap();
318318
debug_log_format(
319319
"Player {0} playing round {1} in game {2}",
320320
[player.to_field(), round as Field, game_id],
@@ -336,11 +336,11 @@ fn play_round(
336336

337337
// Enqueue a public function call to update the round counter
338338
// This reveals that a round was played, but not the point allocation
339-
self.enqueue_self.validate_and_play_round(
339+
self.enqueue(PodRacing::at(self.context.this_address()).validate_and_play_round(
340340
player,
341341
game_id,
342342
round,
343-
);
343+
));
344344
}
345345
```
346346

@@ -361,7 +361,7 @@ Three things happen here that have no direct Ethereum equivalent:
361361
// This is the "reveal" phase where private choices become public
362362
#[external("private")]
363363
fn finish_game(game_id: Field) {
364-
let player = self.msg_sender();
364+
let player = self.context.maybe_msg_sender().unwrap();
365365
debug_log_format(
366366
"Player {0} finishing game {1}",
367367
[player.to_field(), game_id],
@@ -394,15 +394,15 @@ fn finish_game(game_id: Field) {
394394

395395
// Enqueue public function to store the revealed totals on-chain
396396
// Now the revealing player's track totals will be publicly visible
397-
self.enqueue_self.validate_finish_game_and_reveal(
397+
self.enqueue(PodRacing::at(self.context.this_address()).validate_finish_game_and_reveal(
398398
player,
399399
game_id,
400400
total_track1,
401401
total_track2,
402402
total_track3,
403403
total_track4,
404404
total_track5,
405-
);
405+
));
406406
}
407407
```
408408

@@ -526,7 +526,7 @@ The `.devcontainer/` configures:
526526

527527
* **Base image:** Ubuntu 24.04 with Node.js v22.15.0
528528
* **Docker-in-Docker** for running the Aztec local network
529-
* **Aztec CLI** installed via `curl -fsSL "https://install.aztec.network/4.1.0-rc.2" | VERSION="4.1.0-rc.2" bash -s`
529+
* **Aztec CLI** installed via `curl -fsSL "https://install.aztec.network/4.1.0" | VERSION="4.1.0" bash -s`
530530
* **VS Code extension:** `noir-lang.vscode-noir` for Noir syntax highlighting
531531
* **Dependencies:** `yarn install` runs automatically
532532

@@ -737,7 +737,7 @@ pub unconstrained fn setup() -> (TestEnvironment, AztecAddress, AztecAddress) {
737737
**Aztec toolkit:**
738738

739739
```bash
740-
export VERSION=4.1.0-rc.2
740+
export VERSION=4.1.0
741741
curl -fsSL "https://install.aztec.network/${VERSION}" | VERSION="${VERSION}" bash -s
742742
```
743743

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Use **Node.js version 22.15.0**.
5050
Install the **Aztec toolkit** (local network, CLI, and other tooling) at the correct version:
5151

5252
```bash
53-
export VERSION=4.1.0-rc.2
53+
export VERSION=4.1.0
5454
curl -fsSL "https://install.aztec.network/${VERSION}" | VERSION="${VERSION}" bash -s
5555
```
5656

config/local-network.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"settings": {
1010
"skipLocalNetwork": false,
11-
"version": "4.1.0-rc.2"
11+
"version": "4.1.0"
1212
},
1313
"timeouts": {
1414
"deployTimeout": 120000,

config/testnet.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"settings": {
1010
"skipLocalNetwork": true,
11-
"version": "4.1.0-rc.2"
11+
"version": "4.1.0"
1212
},
1313
"timeouts": {
1414
"deployTimeout": 1200000,

docs/ONBOARDING.src.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This guide takes you from "reading code in a browser" to "deploying on devnet"
99
- **Phases 1-2** need only a browser (read code, compile in a Codespace)
1010
- **Phases 3-6** need local tools (deploy, interact, extend, advanced topics)
1111

12-
**Aztec version pinned in this repo:** `4.1.0-rc.2` (check `Nargo.toml` and `package.json` for source of truth)
12+
**Aztec version pinned in this repo:** `4.1.0` (check `Nargo.toml` and `package.json` for source of truth)
1313

1414
**Links:**
1515

@@ -262,7 +262,7 @@ The `.devcontainer/` configures:
262262

263263
- **Base image:** Ubuntu 24.04 with Node.js v22.15.0
264264
- **Docker-in-Docker** for running the Aztec local network
265-
- **Aztec CLI** installed via `curl -fsSL "https://install.aztec.network/4.1.0-rc.2" | VERSION="4.1.0-rc.2" bash -s`
265+
- **Aztec CLI** installed via `curl -fsSL "https://install.aztec.network/4.1.0" | VERSION="4.1.0" bash -s`
266266
- **VS Code extension:** `noir-lang.vscode-noir` for Noir syntax highlighting
267267
- **Dependencies:** `yarn install` runs automatically
268268

@@ -357,7 +357,7 @@ And higher-level helpers:
357357
**Aztec toolkit:**
358358

359359
```bash
360-
export VERSION=4.1.0-rc.2
360+
export VERSION=4.1.0
361361
curl -fsSL "https://install.aztec.network/${VERSION}" | VERSION="${VERSION}" bash -s
362362
```
363363

jest.integration.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"preset": "ts-jest/presets/default-esm",
33
"transform": {
4-
"^.+\\.tsx?$": ["ts-jest", { "useESM": true }]
4+
"^.+\\.tsx?$": ["ts-jest", { "useESM": true, "diagnostics": false }]
55
},
66
"moduleNameMapper": {
77
"^(\\.{1,2}/.*)\\.js$": "$1"

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@
4545
"update-readme-version": "node ./.github/scripts/update-readme-version.js"
4646
},
4747
"dependencies": {
48-
"@aztec/accounts": "4.1.0-rc.2",
49-
"@aztec/aztec.js": "4.1.0-rc.2",
50-
"@aztec/constants": "4.1.0-rc.2",
51-
"@aztec/entrypoints": "4.1.0-rc.2",
52-
"@aztec/noir-contracts.js": "4.1.0-rc.2",
53-
"@aztec/protocol-contracts": "4.1.0-rc.2",
54-
"@aztec/pxe": "4.1.0-rc.2",
55-
"@aztec/stdlib": "4.1.0-rc.2",
56-
"@aztec/wallet-sdk": "4.1.0-rc.2",
57-
"@aztec/wallets": "4.1.0-rc.2",
48+
"@aztec/accounts": "4.1.0",
49+
"@aztec/aztec.js": "4.1.0",
50+
"@aztec/constants": "4.1.0",
51+
"@aztec/entrypoints": "4.1.0",
52+
"@aztec/noir-contracts.js": "4.1.0",
53+
"@aztec/protocol-contracts": "4.1.0",
54+
"@aztec/pxe": "4.1.0",
55+
"@aztec/stdlib": "4.1.0",
56+
"@aztec/wallet-sdk": "4.1.0",
57+
"@aztec/wallets": "4.1.0",
5858
"dotenv": "^17.2.2"
5959
},
6060
"devDependencies": {

0 commit comments

Comments
 (0)