Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.

Commit 2e33d0f

Browse files
xorsal0xShaitoclaudezkfrov
authored
chore: v3 devnet.2 (#59)
Co-authored-by: shaito <shaito@defi.sucks> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: zkfrov <frov@wonderland.xyz>
1 parent 2686f5b commit 2e33d0f

12 files changed

Lines changed: 2919 additions & 756 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 26 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ on:
44
pull_request:
55
types: [opened, synchronize, reopened]
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
issues: write
15+
716
env:
817
BENCH_DIR: ./benchmarks
918

@@ -69,11 +78,10 @@ jobs:
6978
with:
7079
fetch-depth: 0
7180

72-
- name: Install and cache yarn
81+
- name: Setup Node.js
7382
uses: actions/setup-node@v5
7483
with:
75-
node-version: '22'
76-
cache: 'yarn'
84+
node-version: '22.17.0'
7785

7886
- name: Install Aztec CLI
7987
run: |
@@ -102,34 +110,21 @@ jobs:
102110
run: |
103111
VERSION=${{ steps.basever.outputs.ver }} aztec-up
104112
113+
- name: Manually tag the aztec version as `latest`
114+
run: |
115+
docker tag aztecprotocol/aztec:${{ steps.basever.outputs.ver }} aztecprotocol/aztec:latest
116+
105117
- name: Start sandbox (BASE, background)
106-
run: VERSION=${{ steps.basever.outputs.ver }} aztec start --sandbox &
118+
run: aztec start --sandbox &
107119

108120
- name: Start PXE node (BASE, background)
109121
run: |
110122
VERSION=${{ steps.basever.outputs.ver }} aztec start \
111123
--port 8081 --pxe --pxe.nodeUrl=http://localhost:8080/ \
112124
--pxe.proverEnabled false &
113-
114-
- name: Cache node_modules (BASE)
115-
uses: actions/cache@v4
116-
with:
117-
path: node_modules
118-
key: ${{ runner.os }}-node-modules-${{ steps.basever.outputs.ver }}-${{ hashFiles('yarn.lock') }}
119-
restore-keys: |
120-
${{ runner.os }}-node-modules-${{ steps.basever.outputs.ver }}-
121125
122126
- name: Install deps (BASE)
123-
run: yarn install --frozen-lockfile
124-
125-
- name: Cache Noir compilation artifacts (BASE)
126-
id: cache-noir-base
127-
uses: actions/cache@v4
128-
with:
129-
path: |
130-
target/
131-
src/artifacts/
132-
key: ${{ runner.os }}-noir-${{ steps.basever.outputs.ver }}-${{ hashFiles('src/nr/**/*', 'Nargo.toml') }}
127+
run: yarn --frozen-lockfile
133128

134129
- name: Compile contracts (BASE)
135130
run: yarn compile
@@ -144,7 +139,7 @@ jobs:
144139
# This is required to avoid the benchmark results being removed by the Checkout PR step
145140
- name: Store base benchmark results
146141
run: |
147-
mkdir -p ../benchmarks_base && mv ${{ env.BENCH_DIR }}/* ../benchmarks_base/
142+
mkdir -p ../benchmarks_base && mv ${{ env.BENCH_DIR }}/*.json ../benchmarks_base/
148143
149144
# ──────────────────────────────────────────────────────────────
150145
# 2️⃣ BENCHMARK PR HEAD (github.event.pull_request.head.sha)
@@ -186,11 +181,13 @@ jobs:
186181
run: |
187182
VERSION=${{ steps.prver.outputs.ver }} aztec-up
188183
184+
- name: Manually tag the aztec version as `latest`
185+
run: |
186+
docker tag aztecprotocol/aztec:${{ steps.prver.outputs.ver }} aztecprotocol/aztec:latest
187+
189188
- name: Start sandbox (PR, background)
190189
if: steps.prver.outputs.ver_diff == 'true'
191-
run: |
192-
VERSION=${{ steps.prver.outputs.ver }} aztec start --sandbox &
193-
sleep 60
190+
run: aztec start --sandbox &
194191

195192
- name: Start PXE node (PR, background)
196193
if: steps.prver.outputs.ver_diff == 'true'
@@ -199,28 +196,11 @@ jobs:
199196
--port 8081 --pxe --pxe.nodeUrl=http://localhost:8080/ \
200197
--pxe.proverEnabled false &
201198
202-
- name: Clean project from BASE stage
203-
run: rm -rf node_modules yarn.lock
204-
205-
- name: Cache node_modules (PR)
206-
uses: actions/cache@v4
207-
with:
208-
path: node_modules
209-
key: ${{ runner.os }}-node-modules-${{ steps.prver.outputs.ver }}-${{ hashFiles('yarn.lock') }}
210-
restore-keys: |
211-
${{ runner.os }}-node-modules-${{ steps.prver.outputs.ver }}-
199+
# - name: Clean project from BASE stage
200+
# run: rm -rf node_modules yarn.lock
212201

213202
- name: Install deps (PR)
214-
run: yarn install --frozen-lockfile
215-
216-
- name: Cache Noir compilation artifacts (PR)
217-
id: cache-noir-pr
218-
uses: actions/cache@v4
219-
with:
220-
path: |
221-
target/
222-
src/artifacts/
223-
key: ${{ runner.os }}-noir-${{ steps.prver.outputs.ver }}-${{ hashFiles('src/nr/**/*', 'Nargo.toml') }}
203+
run: yarn --frozen-lockfile
224204

225205
- name: Compile contracts (PR)
226206
run: yarn compile

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,8 @@ jobs:
7373
- name: Run nr tests
7474
run: yarn test:nr
7575

76+
- name: Clear Vite/Vitest cache
77+
run: rm -rf node_modules/.vite node_modules/.vitest
78+
7679
- name: Run js tests
7780
run: yarn test:js

benchmarks/counter.benchmark.ts

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
import { type AccountWallet, type PXE, createPXEClient } from "@aztec/aztec.js";
2-
import { getInitialTestAccountsWallets } from "@aztec/accounts/testing";
3-
4-
// Import types from benchmark package
1+
import { type Wallet } from "@aztec/aztec.js/wallet";
2+
import { AztecAddress } from "@aztec/aztec.js/addresses";
3+
import { createAztecNodeClient, waitForNode } from "@aztec/aztec.js/node";
4+
import { type ContractFunctionInteractionCallIntent } from "@aztec/aztec.js/authorization";
5+
import {
6+
registerInitialSandboxAccountsInWallet,
7+
TestWallet,
8+
} from "@aztec/test-wallet/server";
59
import {
610
Benchmark,
711
type BenchmarkContext,
812
} from "@defi-wonderland/aztec-benchmark";
9-
import { NamedBenchmarkedInteraction } from "@defi-wonderland/aztec-benchmark/dist/types.js";
1013

1114
import { CounterContract } from "../src/artifacts/Counter.js";
12-
import { deployCounter } from "../src/ts/utils.js";
1315

1416
// Extend the BenchmarkContext from the new package
1517
interface CounterBenchmarkContext extends BenchmarkContext {
16-
pxe: PXE;
17-
deployer: AccountWallet;
18-
accounts: AccountWallet[];
18+
wallet: Wallet;
19+
deployer: AztecAddress;
20+
accounts: AztecAddress[];
1921
counterContract: CounterContract;
2022
}
2123

@@ -26,35 +28,38 @@ export default class CounterContractBenchmark extends Benchmark {
2628
* Creates PXE client, gets accounts, and deploys the contract.
2729
*/
2830
async setup(): Promise<CounterBenchmarkContext> {
29-
const { BASE_PXE_URL = "http://localhost" } = process.env;
30-
const pxe = createPXEClient(`${BASE_PXE_URL}:8080`);
31-
const accounts = await getInitialTestAccountsWallets(pxe);
32-
const deployer = accounts[0]!;
33-
const deployedCounterContract = await deployCounter(
34-
deployer,
35-
deployer.getAddress(),
36-
);
37-
const counterContract = await CounterContract.at(
38-
deployedCounterContract.address,
39-
deployer,
40-
);
41-
return { pxe, deployer, accounts, counterContract };
31+
const { NODE_URL = "http://localhost:8080" } = process.env;
32+
const aztecNode = createAztecNodeClient(NODE_URL);
33+
await waitForNode(aztecNode);
34+
35+
const wallet: TestWallet = await TestWallet.create(aztecNode);
36+
const accounts: AztecAddress[] =
37+
await registerInitialSandboxAccountsInWallet(wallet);
38+
39+
const [deployer] = accounts;
40+
41+
const counterContract = await CounterContract.deploy(wallet, deployer)
42+
.send({ from: deployer })
43+
.deployed();
44+
45+
return { wallet, deployer, accounts, counterContract };
4246
}
4347

4448
/**
4549
* Returns the list of CounterContract methods to be benchmarked.
4650
*/
47-
getMethods(context: CounterBenchmarkContext): NamedBenchmarkedInteraction[] {
48-
const { counterContract, accounts } = context;
49-
const [alice] = accounts;
51+
getMethods(
52+
context: CounterBenchmarkContext,
53+
): ContractFunctionInteractionCallIntent[] {
54+
const { counterContract, wallet, deployer } = context;
5055

51-
const methods = [
56+
const methods: ContractFunctionInteractionCallIntent[] = [
5257
{
53-
interaction: counterContract.withWallet(alice).methods.increment(),
54-
name: "increment",
58+
caller: deployer,
59+
action: counterContract.withWallet(wallet).methods.increment(),
5560
},
56-
] as NamedBenchmarkedInteraction[];
61+
];
5762

58-
return methods.filter(Boolean);
63+
return methods;
5964
}
6065
}

package.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aztec-boilerplate",
3-
"version": "0.0.0",
3+
"version": "3.0.0-devnet.2",
44
"repository": "https://github.com/defi-wonderland/aztec-boilerplate.git",
55
"author": "Wonderland",
66
"license": "MIT",
@@ -21,32 +21,38 @@
2121
"*.{js,ts}": "prettier --write -u"
2222
},
2323
"dependencies": {
24-
"@aztec/accounts": "2.0.3",
25-
"@aztec/aztec.js": "2.0.3",
26-
"@aztec/noir-contracts.js": "2.0.3",
27-
"@defi-wonderland/aztec-benchmark": "2.0.0",
24+
"@aztec/accounts": "3.0.0-devnet.2",
25+
"@aztec/aztec.js": "3.0.0-devnet.2",
26+
"@aztec/entrypoints": "3.0.0-devnet.2",
27+
"@aztec/noir-contracts.js": "3.0.0-devnet.2",
28+
"@aztec/pxe": "3.0.0-devnet.2",
29+
"@aztec/stdlib": "3.0.0-devnet.2",
30+
"@aztec/test-wallet": "3.0.0-devnet.2",
31+
"@defi-wonderland/aztec-benchmark": "3.0.0-devnet.2",
2832
"@types/node": "22.5.1"
2933
},
3034
"devDependencies": {
31-
"@types/jest": "30.0.0",
3235
"@commitlint/cli": "20.1.0",
3336
"@commitlint/config-conventional": "20.0.0",
37+
"@types/jest": "30.0.0",
3438
"@types/mocha": "10.0.6",
3539
"@types/node": "22.5.1",
3640
"husky": "9.1.7",
37-
"tsx": "4.20.4",
3841
"lint-staged": "16.2.3",
39-
"tsx": "4.20.5",
4042
"prettier": "3.6.2",
43+
"tsx": "4.9.3",
4144
"typescript": "5.9.3",
4245
"vitest": "3.2.4"
4346
},
4447
"config": {
45-
"aztecVersion": "2.0.3"
48+
"aztecVersion": "3.0.0-devnet.2"
4649
},
4750
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
4851
"engines": {
4952
"node": ">=22.0.0",
5053
"yarn": ">=1.22.0"
54+
},
55+
"resolutions": {
56+
"@noble/hashes": "1.8.0"
5157
}
5258
}

0 commit comments

Comments
 (0)