@aztec/end-to-end 3.0.0-devnet.2 → 3.0.0-devnet.20251212
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/bench/client_flows/benchmark.d.ts +1 -1
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/benchmark.js +2 -2
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +9 -2
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +58 -33
- package/dest/bench/client_flows/config.d.ts +1 -1
- package/dest/bench/client_flows/data_extractor.d.ts +1 -1
- package/dest/bench/client_flows/data_extractor.js +8 -30
- package/dest/bench/utils.d.ts +2 -2
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +2 -2
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +3 -2
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +6 -4
- package/dest/e2e_deploy_contract/deploy_test.d.ts +2 -2
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.d.ts +10 -9
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +11 -9
- package/dest/e2e_fees/bridging_race.notest.d.ts +1 -1
- package/dest/e2e_fees/bridging_race.notest.js +2 -2
- package/dest/e2e_fees/fees_test.d.ts +5 -3
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +14 -10
- package/dest/e2e_l1_publisher/write_json.d.ts +1 -1
- package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
- package/dest/e2e_l1_publisher/write_json.js +5 -4
- package/dest/e2e_multi_validator/utils.d.ts +1 -1
- package/dest/e2e_multi_validator/utils.js +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +4 -3
- package/dest/e2e_p2p/inactivity_slash_test.d.ts +3 -3
- package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
- package/dest/e2e_p2p/inactivity_slash_test.js +6 -2
- package/dest/e2e_p2p/p2p_network.d.ts +218 -11
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +11 -5
- package/dest/e2e_p2p/shared.d.ts +6 -6
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +6 -5
- package/dest/e2e_token_contract/token_contract_test.d.ts +1 -1
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +2 -2
- package/dest/fixtures/e2e_prover_test.d.ts +4 -2
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +18 -14
- package/dest/fixtures/fixtures.d.ts +1 -1
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +1 -1
- package/dest/fixtures/get_acvm_config.d.ts +1 -1
- package/dest/fixtures/get_acvm_config.js +1 -1
- package/dest/fixtures/get_bb_config.d.ts +1 -1
- package/dest/fixtures/get_bb_config.d.ts.map +1 -1
- package/dest/fixtures/index.d.ts +1 -1
- package/dest/fixtures/l1_to_l2_messaging.d.ts +4 -3
- package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
- package/dest/fixtures/l1_to_l2_messaging.js +2 -2
- package/dest/fixtures/logging.d.ts +1 -1
- package/dest/fixtures/setup_l1_contracts.d.ts +475 -4
- package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
- package/dest/fixtures/setup_l1_contracts.js +1 -1
- package/dest/fixtures/setup_p2p_test.d.ts +4 -4
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +18 -10
- package/dest/fixtures/snapshot_manager.d.ts +3 -3
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +6 -4
- package/dest/fixtures/token_utils.d.ts +5 -2
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +7 -4
- package/dest/fixtures/utils.d.ts +453 -7
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +26 -19
- package/dest/fixtures/web3signer.d.ts +1 -1
- package/dest/fixtures/web3signer.js +1 -1
- package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
- package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
- package/dest/fixtures/with_telemetry_utils.js +2 -2
- package/dest/index.d.ts +1 -1
- package/dest/quality_of_service/alert_checker.d.ts +1 -1
- package/dest/quality_of_service/alert_checker.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.d.ts +5 -14
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +1 -1
- package/dest/shared/gas_portal_test_harness.d.ts +2 -12
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +1 -1
- package/dest/shared/index.d.ts +1 -1
- package/dest/shared/jest_setup.d.ts +1 -1
- package/dest/shared/submit-transactions.d.ts +1 -1
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts +3 -2
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +15 -13
- package/dest/simulators/index.d.ts +1 -1
- package/dest/simulators/lending_simulator.d.ts +2 -6
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +5 -3
- package/dest/simulators/token_simulator.d.ts +1 -1
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.d.ts +5 -3
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +45 -10
- package/dest/spartan/tx_metrics.d.ts +39 -0
- package/dest/spartan/tx_metrics.d.ts.map +1 -0
- package/dest/spartan/tx_metrics.js +95 -0
- package/dest/spartan/utils.d.ts +31 -21
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +93 -33
- package/package.json +42 -40
- package/src/bench/client_flows/benchmark.ts +2 -2
- package/src/bench/client_flows/client_flows_benchmark.ts +80 -33
- package/src/bench/client_flows/data_extractor.ts +9 -31
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +2 -2
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +7 -6
- package/src/e2e_deploy_contract/deploy_test.ts +1 -1
- package/src/e2e_epochs/epochs_test.ts +19 -16
- package/src/e2e_fees/bridging_race.notest.ts +2 -2
- package/src/e2e_fees/fees_test.ts +18 -12
- package/src/e2e_l1_publisher/write_json.ts +5 -4
- package/src/e2e_multi_validator/utils.ts +1 -1
- package/src/e2e_nested_contract/nested_contract_test.ts +4 -3
- package/src/e2e_p2p/inactivity_slash_test.ts +9 -3
- package/src/e2e_p2p/p2p_network.ts +15 -12
- package/src/e2e_p2p/shared.ts +13 -6
- package/src/e2e_token_contract/token_contract_test.ts +2 -2
- package/src/fixtures/e2e_prover_test.ts +16 -17
- package/src/fixtures/fixtures.ts +1 -2
- package/src/fixtures/get_acvm_config.ts +1 -1
- package/src/fixtures/l1_to_l2_messaging.ts +4 -2
- package/src/fixtures/setup_l1_contracts.ts +2 -1
- package/src/fixtures/setup_p2p_test.ts +23 -9
- package/src/fixtures/snapshot_manager.ts +7 -10
- package/src/fixtures/token_utils.ts +4 -4
- package/src/fixtures/utils.ts +51 -31
- package/src/fixtures/web3signer.ts +1 -1
- package/src/fixtures/with_telemetry_utils.ts +2 -2
- package/src/guides/up_quick_start.sh +1 -1
- package/src/shared/cross_chain_test_harness.ts +5 -2
- package/src/shared/gas_portal_test_harness.ts +2 -2
- package/src/shared/uniswap_l1_l2.ts +16 -19
- package/src/simulators/lending_simulator.ts +6 -4
- package/src/spartan/DEVELOP.md +7 -0
- package/src/spartan/setup_test_wallets.ts +49 -12
- package/src/spartan/tx_metrics.ts +130 -0
- package/src/spartan/utils.ts +107 -33
package/dest/spartan/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/aztec.js/log';
|
|
2
|
+
import { promiseWithResolvers } from '@aztec/foundation/promise';
|
|
2
3
|
import { makeBackoff, retry } from '@aztec/foundation/retry';
|
|
3
4
|
import { schemas } from '@aztec/foundation/schemas';
|
|
4
5
|
import { sleep } from '@aztec/foundation/sleep';
|
|
@@ -137,9 +138,35 @@ export async function startPortForward({ resource, namespace, containerPort, hos
|
|
|
137
138
|
port
|
|
138
139
|
};
|
|
139
140
|
}
|
|
140
|
-
export function
|
|
141
|
+
export function getExternalIP(namespace, serviceName) {
|
|
142
|
+
const { promise, resolve, reject } = promiseWithResolvers();
|
|
143
|
+
const process1 = spawn('kubectl', [
|
|
144
|
+
'get',
|
|
145
|
+
'service',
|
|
146
|
+
'-n',
|
|
147
|
+
namespace,
|
|
148
|
+
`${namespace}-${serviceName}`,
|
|
149
|
+
'--output',
|
|
150
|
+
"jsonpath='{.status.loadBalancer.ingress[0].ip}'"
|
|
151
|
+
], {
|
|
152
|
+
stdio: 'pipe'
|
|
153
|
+
});
|
|
154
|
+
let ip = '';
|
|
155
|
+
process1.stdout.on('data', (data)=>{
|
|
156
|
+
ip += data;
|
|
157
|
+
});
|
|
158
|
+
process1.on('error', (err)=>{
|
|
159
|
+
reject(err);
|
|
160
|
+
});
|
|
161
|
+
process1.on('exit', ()=>{
|
|
162
|
+
// kubectl prints JSON. Remove the quotes
|
|
163
|
+
resolve(ip.replace(/"|'/g, ''));
|
|
164
|
+
});
|
|
165
|
+
return promise;
|
|
166
|
+
}
|
|
167
|
+
export function startPortForwardForRPC(namespace, index = 0) {
|
|
141
168
|
return startPortForward({
|
|
142
|
-
resource: `
|
|
169
|
+
resource: `pod/${namespace}-rpc-aztec-node-${index}`,
|
|
143
170
|
namespace,
|
|
144
171
|
containerPort: 8080
|
|
145
172
|
});
|
|
@@ -197,6 +224,33 @@ async function execHelmCommand(args) {
|
|
|
197
224
|
const { stdout } = await execAsync(helmCommand);
|
|
198
225
|
return stdout;
|
|
199
226
|
}
|
|
227
|
+
export async function uninstallChaosMesh(instanceName, namespace, logger) {
|
|
228
|
+
// uninstall the helm chart if it exists
|
|
229
|
+
logger.info(`Uninstalling helm chart ${instanceName}`);
|
|
230
|
+
await execAsync(`helm uninstall ${instanceName} --namespace ${namespace} --wait --ignore-not-found`);
|
|
231
|
+
// and delete the chaos-mesh resources created by this release
|
|
232
|
+
const deleteByLabel = async (resource)=>{
|
|
233
|
+
const args = {
|
|
234
|
+
resource,
|
|
235
|
+
namespace: namespace,
|
|
236
|
+
label: `app.kubernetes.io/instance=${instanceName}`
|
|
237
|
+
};
|
|
238
|
+
logger.info(`Deleting ${resource} resources for release ${instanceName}`);
|
|
239
|
+
await deleteResourceByLabel(args).catch((e)=>{
|
|
240
|
+
logger.error(`Error deleting ${resource}: ${e}`);
|
|
241
|
+
logger.info(`Force deleting ${resource}`);
|
|
242
|
+
return deleteResourceByLabel({
|
|
243
|
+
...args,
|
|
244
|
+
force: true
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
await deleteByLabel('podchaos');
|
|
249
|
+
await deleteByLabel('networkchaos');
|
|
250
|
+
await deleteByLabel('podnetworkchaos');
|
|
251
|
+
await deleteByLabel('workflows');
|
|
252
|
+
await deleteByLabel('workflownodes');
|
|
253
|
+
}
|
|
200
254
|
/**
|
|
201
255
|
* Installs a Helm chart with the given parameters.
|
|
202
256
|
* @param instanceName - The name of the Helm chart instance.
|
|
@@ -213,35 +267,14 @@ async function execHelmCommand(args) {
|
|
|
213
267
|
* const stdout = await installChaosMeshChart({ instanceName: 'force-reorg', targetNamespace: 'smoke', valuesFile: 'prover-failure.yaml'});
|
|
214
268
|
* console.log(stdout);
|
|
215
269
|
* ```
|
|
216
|
-
*/ export async function installChaosMeshChart({ instanceName, targetNamespace, valuesFile, helmChartDir,
|
|
270
|
+
*/ export async function installChaosMeshChart({ instanceName, targetNamespace, valuesFile, helmChartDir, timeout = '10m', clean = true, values = {}, logger }) {
|
|
217
271
|
if (clean) {
|
|
218
|
-
|
|
219
|
-
logger.info(`Uninstalling helm chart ${instanceName}`);
|
|
220
|
-
await execAsync(`helm uninstall ${instanceName} --namespace ${chaosMeshNamespace} --wait --ignore-not-found`);
|
|
221
|
-
// and delete the chaos-mesh resources created by this release
|
|
222
|
-
const deleteByLabel = async (resource)=>{
|
|
223
|
-
const args = {
|
|
224
|
-
resource,
|
|
225
|
-
namespace: chaosMeshNamespace,
|
|
226
|
-
label: `app.kubernetes.io/instance=${instanceName}`
|
|
227
|
-
};
|
|
228
|
-
logger.info(`Deleting ${resource} resources for release ${instanceName}`);
|
|
229
|
-
await deleteResourceByLabel(args).catch((e)=>{
|
|
230
|
-
logger.error(`Error deleting ${resource}: ${e}`);
|
|
231
|
-
logger.info(`Force deleting ${resource}`);
|
|
232
|
-
return deleteResourceByLabel({
|
|
233
|
-
...args,
|
|
234
|
-
force: true
|
|
235
|
-
});
|
|
236
|
-
});
|
|
237
|
-
};
|
|
238
|
-
await deleteByLabel('podchaos');
|
|
239
|
-
await deleteByLabel('networkchaos');
|
|
272
|
+
await uninstallChaosMesh(instanceName, targetNamespace, logger);
|
|
240
273
|
}
|
|
241
274
|
return execHelmCommand({
|
|
242
275
|
instanceName,
|
|
243
276
|
helmChartDir,
|
|
244
|
-
namespace:
|
|
277
|
+
namespace: targetNamespace,
|
|
245
278
|
valuesFile,
|
|
246
279
|
timeout,
|
|
247
280
|
values: {
|
|
@@ -313,19 +346,19 @@ export function applyNetworkShaping({ valuesFile, namespace, spartanDir, logger
|
|
|
313
346
|
logger
|
|
314
347
|
});
|
|
315
348
|
}
|
|
316
|
-
export async function
|
|
317
|
-
logger.info(`Waiting for
|
|
349
|
+
export async function awaitCheckpointNumber(rollupCheatCodes, checkpointNumber, timeoutSeconds, logger) {
|
|
350
|
+
logger.info(`Waiting for checkpoint ${checkpointNumber}`);
|
|
318
351
|
let tips = await rollupCheatCodes.getTips();
|
|
319
352
|
const endTime = Date.now() + timeoutSeconds * 1000;
|
|
320
|
-
while(tips.pending <
|
|
321
|
-
logger.info(`At
|
|
353
|
+
while(tips.pending < checkpointNumber && Date.now() < endTime){
|
|
354
|
+
logger.info(`At checkpoint ${tips.pending}`);
|
|
322
355
|
await sleep(1000);
|
|
323
356
|
tips = await rollupCheatCodes.getTips();
|
|
324
357
|
}
|
|
325
|
-
if (tips.pending <
|
|
326
|
-
throw new Error(`Timeout waiting for
|
|
358
|
+
if (tips.pending < checkpointNumber) {
|
|
359
|
+
throw new Error(`Timeout waiting for checkpoint ${checkpointNumber}, only reached ${tips.pending}`);
|
|
327
360
|
} else {
|
|
328
|
-
logger.info(`Reached
|
|
361
|
+
logger.info(`Reached checkpoint ${tips.pending}`);
|
|
329
362
|
}
|
|
330
363
|
}
|
|
331
364
|
export async function restartBot(namespace, logger) {
|
|
@@ -720,3 +753,30 @@ export async function withSequencersAdmin(env, fn) {
|
|
|
720
753
|
throw new Error(`Failed to determine git project root: ${error}`);
|
|
721
754
|
}
|
|
722
755
|
}
|
|
756
|
+
/** Returns a client to the RPC of the given sequencer (defaults to first) */ export async function getNodeClient(env, index = 0) {
|
|
757
|
+
const namespace = env.NAMESPACE;
|
|
758
|
+
const containerPort = 8080;
|
|
759
|
+
const sequencers = await getSequencers(namespace);
|
|
760
|
+
const sequencer = sequencers[index];
|
|
761
|
+
if (!sequencer) {
|
|
762
|
+
throw new Error(`No sequencer found at index ${index} in namespace ${namespace}`);
|
|
763
|
+
}
|
|
764
|
+
const { process: process1, port } = await startPortForward({
|
|
765
|
+
resource: `pod/${sequencer}`,
|
|
766
|
+
namespace,
|
|
767
|
+
containerPort
|
|
768
|
+
});
|
|
769
|
+
const url = `http://localhost:${port}`;
|
|
770
|
+
await retry(()=>fetch(`${url}/status`).then((res)=>res.status === 200), 'forward port', makeBackoff([
|
|
771
|
+
1,
|
|
772
|
+
1,
|
|
773
|
+
2,
|
|
774
|
+
6
|
|
775
|
+
]), logger, true);
|
|
776
|
+
const client = createAztecNodeClient(url);
|
|
777
|
+
return {
|
|
778
|
+
node: client,
|
|
779
|
+
port,
|
|
780
|
+
process: process1
|
|
781
|
+
};
|
|
782
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "3.0.0-devnet.
|
|
3
|
+
"version": "3.0.0-devnet.20251212",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"./package.local.json"
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "yarn clean && tsc
|
|
12
|
-
"build:dev": "tsc
|
|
11
|
+
"build": "yarn clean && ../scripts/tsc.sh",
|
|
12
|
+
"build:dev": "../scripts/tsc.sh --watch",
|
|
13
13
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
14
14
|
"test:with-alerts": "./scripts/test-with-alerts.sh",
|
|
15
15
|
"test:e2e": "LOG_LEVEL=${LOG_LEVEL:-verbose} NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --forceExit",
|
|
@@ -25,42 +25,43 @@
|
|
|
25
25
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aztec/accounts": "3.0.0-devnet.
|
|
29
|
-
"@aztec/archiver": "3.0.0-devnet.
|
|
30
|
-
"@aztec/aztec": "3.0.0-devnet.
|
|
31
|
-
"@aztec/aztec-node": "3.0.0-devnet.
|
|
32
|
-
"@aztec/aztec.js": "3.0.0-devnet.
|
|
33
|
-
"@aztec/bb-prover": "3.0.0-devnet.
|
|
34
|
-
"@aztec/
|
|
35
|
-
"@aztec/blob-
|
|
36
|
-
"@aztec/
|
|
37
|
-
"@aztec/
|
|
38
|
-
"@aztec/
|
|
39
|
-
"@aztec/
|
|
40
|
-
"@aztec/
|
|
41
|
-
"@aztec/
|
|
42
|
-
"@aztec/
|
|
43
|
-
"@aztec/
|
|
44
|
-
"@aztec/
|
|
45
|
-
"@aztec/
|
|
46
|
-
"@aztec/
|
|
47
|
-
"@aztec/
|
|
48
|
-
"@aztec/noir-
|
|
49
|
-
"@aztec/noir-
|
|
50
|
-
"@aztec/noir-
|
|
51
|
-
"@aztec/
|
|
52
|
-
"@aztec/
|
|
53
|
-
"@aztec/
|
|
54
|
-
"@aztec/prover-
|
|
55
|
-
"@aztec/
|
|
56
|
-
"@aztec/
|
|
57
|
-
"@aztec/
|
|
58
|
-
"@aztec/
|
|
59
|
-
"@aztec/
|
|
60
|
-
"@aztec/
|
|
61
|
-
"@aztec/
|
|
62
|
-
"@aztec/
|
|
63
|
-
"@aztec/
|
|
28
|
+
"@aztec/accounts": "3.0.0-devnet.20251212",
|
|
29
|
+
"@aztec/archiver": "3.0.0-devnet.20251212",
|
|
30
|
+
"@aztec/aztec": "3.0.0-devnet.20251212",
|
|
31
|
+
"@aztec/aztec-node": "3.0.0-devnet.20251212",
|
|
32
|
+
"@aztec/aztec.js": "3.0.0-devnet.20251212",
|
|
33
|
+
"@aztec/bb-prover": "3.0.0-devnet.20251212",
|
|
34
|
+
"@aztec/bb.js": "3.0.0-devnet.20251212",
|
|
35
|
+
"@aztec/blob-lib": "3.0.0-devnet.20251212",
|
|
36
|
+
"@aztec/blob-sink": "3.0.0-devnet.20251212",
|
|
37
|
+
"@aztec/bot": "3.0.0-devnet.20251212",
|
|
38
|
+
"@aztec/cli": "3.0.0-devnet.20251212",
|
|
39
|
+
"@aztec/constants": "3.0.0-devnet.20251212",
|
|
40
|
+
"@aztec/entrypoints": "3.0.0-devnet.20251212",
|
|
41
|
+
"@aztec/epoch-cache": "3.0.0-devnet.20251212",
|
|
42
|
+
"@aztec/ethereum": "3.0.0-devnet.20251212",
|
|
43
|
+
"@aztec/foundation": "3.0.0-devnet.20251212",
|
|
44
|
+
"@aztec/kv-store": "3.0.0-devnet.20251212",
|
|
45
|
+
"@aztec/l1-artifacts": "3.0.0-devnet.20251212",
|
|
46
|
+
"@aztec/merkle-tree": "3.0.0-devnet.20251212",
|
|
47
|
+
"@aztec/node-keystore": "3.0.0-devnet.20251212",
|
|
48
|
+
"@aztec/noir-contracts.js": "3.0.0-devnet.20251212",
|
|
49
|
+
"@aztec/noir-noirc_abi": "3.0.0-devnet.20251212",
|
|
50
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-devnet.20251212",
|
|
51
|
+
"@aztec/noir-test-contracts.js": "3.0.0-devnet.20251212",
|
|
52
|
+
"@aztec/p2p": "3.0.0-devnet.20251212",
|
|
53
|
+
"@aztec/protocol-contracts": "3.0.0-devnet.20251212",
|
|
54
|
+
"@aztec/prover-client": "3.0.0-devnet.20251212",
|
|
55
|
+
"@aztec/prover-node": "3.0.0-devnet.20251212",
|
|
56
|
+
"@aztec/pxe": "3.0.0-devnet.20251212",
|
|
57
|
+
"@aztec/sequencer-client": "3.0.0-devnet.20251212",
|
|
58
|
+
"@aztec/simulator": "3.0.0-devnet.20251212",
|
|
59
|
+
"@aztec/slasher": "3.0.0-devnet.20251212",
|
|
60
|
+
"@aztec/stdlib": "3.0.0-devnet.20251212",
|
|
61
|
+
"@aztec/telemetry-client": "3.0.0-devnet.20251212",
|
|
62
|
+
"@aztec/test-wallet": "3.0.0-devnet.20251212",
|
|
63
|
+
"@aztec/validator-client": "3.0.0-devnet.20251212",
|
|
64
|
+
"@aztec/world-state": "3.0.0-devnet.20251212",
|
|
64
65
|
"@iarna/toml": "^2.2.5",
|
|
65
66
|
"@jest/globals": "^30.0.0",
|
|
66
67
|
"@noble/curves": "=1.0.0",
|
|
@@ -97,7 +98,7 @@
|
|
|
97
98
|
"tslib": "^2.4.0",
|
|
98
99
|
"typescript": "^5.3.3",
|
|
99
100
|
"util": "^0.12.5",
|
|
100
|
-
"viem": "npm:@
|
|
101
|
+
"viem": "npm:@aztec/viem@2.38.2",
|
|
101
102
|
"zod": "^3.23.8"
|
|
102
103
|
},
|
|
103
104
|
"devDependencies": {
|
|
@@ -106,6 +107,7 @@
|
|
|
106
107
|
"@types/jest": "^30.0.0",
|
|
107
108
|
"@types/js-yaml": "^4.0.9",
|
|
108
109
|
"@types/lodash.chunk": "^4.2.9",
|
|
110
|
+
"@typescript/native-preview": "7.0.0-dev.20251126.1",
|
|
109
111
|
"concurrently": "^7.6.0",
|
|
110
112
|
"jest": "^30.0.0",
|
|
111
113
|
"jest-extended": "^6.0.0",
|
|
@@ -315,12 +315,12 @@ export async function captureProfile(
|
|
|
315
315
|
|
|
316
316
|
const ivcFolder = process.env.CAPTURE_IVC_FOLDER;
|
|
317
317
|
if (ivcFolder) {
|
|
318
|
-
logger.info(`Capturing
|
|
318
|
+
logger.info(`Capturing chonk execution profile for ${label}`);
|
|
319
319
|
|
|
320
320
|
const resultsDirectory = join(ivcFolder, label);
|
|
321
321
|
logger.info(`Writing private execution steps to ${resultsDirectory}`);
|
|
322
322
|
await mkdir(resultsDirectory, { recursive: true });
|
|
323
|
-
// Write the
|
|
323
|
+
// Write the chonk files read by the prover.
|
|
324
324
|
const ivcInputsPath = join(resultsDirectory, 'ivc-inputs.msgpack');
|
|
325
325
|
await writeFile(ivcInputsPath, serializePrivateExecutionSteps(result.executionSteps));
|
|
326
326
|
await writeFile(join(resultsDirectory, 'logs.json'), JSON.stringify(logs, null, 2));
|
|
@@ -5,11 +5,13 @@ import { type Logger, createLogger } from '@aztec/aztec.js/log';
|
|
|
5
5
|
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
6
6
|
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
7
7
|
import { CheatCodes } from '@aztec/aztec/testing';
|
|
8
|
-
import {
|
|
8
|
+
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
9
|
+
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
10
|
+
import { type DeployL1ContractsArgs, deployL1Contract } from '@aztec/ethereum/deploy-l1-contracts';
|
|
9
11
|
import { ChainMonitor } from '@aztec/ethereum/test';
|
|
10
|
-
import { randomBytes } from '@aztec/foundation/crypto';
|
|
12
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
13
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
11
14
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
12
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
13
15
|
import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi';
|
|
14
16
|
import { TestERC20Bytecode } from '@aztec/l1-artifacts/TestERC20Bytecode';
|
|
15
17
|
import { AMMContract } from '@aztec/noir-contracts.js/AMM';
|
|
@@ -20,6 +22,7 @@ import { TokenContract as BananaCoin, TokenContract } from '@aztec/noir-contract
|
|
|
20
22
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
21
23
|
import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice';
|
|
22
24
|
import { type PXEConfig, getPXEConfig } from '@aztec/pxe/server';
|
|
25
|
+
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
23
26
|
import { GasSettings } from '@aztec/stdlib/gas';
|
|
24
27
|
import { deriveSigningKey } from '@aztec/stdlib/keys';
|
|
25
28
|
import { TestWallet } from '@aztec/test-wallet/server';
|
|
@@ -69,15 +72,21 @@ export class ClientFlowsBenchmark {
|
|
|
69
72
|
public feeJuiceContract!: FeeJuiceContract;
|
|
70
73
|
// Asset in which fees are paid via FPC
|
|
71
74
|
public bananaCoin!: BananaCoin;
|
|
75
|
+
public bananaCoinInstance!: ContractInstanceWithAddress;
|
|
72
76
|
public bananaFPC!: FPCContract;
|
|
77
|
+
public bananaFPCInstance!: ContractInstanceWithAddress;
|
|
73
78
|
// Random asset we want to trade
|
|
74
79
|
public candyBarCoin!: TokenContract;
|
|
80
|
+
public candyBarCoinInstance!: ContractInstanceWithAddress;
|
|
75
81
|
// AMM contract
|
|
76
82
|
public amm!: AMMContract;
|
|
83
|
+
public ammInstance!: ContractInstanceWithAddress;
|
|
77
84
|
// Liquidity token for AMM
|
|
78
85
|
public liquidityToken!: TokenContract;
|
|
86
|
+
public liquidityTokenInstance!: ContractInstanceWithAddress;
|
|
79
87
|
// Sponsored FPC contract
|
|
80
88
|
public sponsoredFPC!: SponsoredFPCContract;
|
|
89
|
+
public sponsoredFPCInstance!: ContractInstanceWithAddress;
|
|
81
90
|
|
|
82
91
|
// PXE and Wallet used by the benchmarking user. It can be set up with client-side proving enabled
|
|
83
92
|
public userWallet!: TestWallet;
|
|
@@ -204,7 +213,7 @@ export class ClientFlowsBenchmark {
|
|
|
204
213
|
this.sequencerAddress = sequencerAddress;
|
|
205
214
|
|
|
206
215
|
const canonicalFeeJuice = await getCanonicalFeeJuice();
|
|
207
|
-
this.feeJuiceContract =
|
|
216
|
+
this.feeJuiceContract = FeeJuiceContract.at(canonicalFeeJuice.address, this.adminWallet);
|
|
208
217
|
this.coinbase = EthAddress.random();
|
|
209
218
|
|
|
210
219
|
const userPXEConfig = getPXEConfig();
|
|
@@ -229,7 +238,7 @@ export class ClientFlowsBenchmark {
|
|
|
229
238
|
async (_data, context) => {
|
|
230
239
|
this.context = context;
|
|
231
240
|
|
|
232
|
-
this.feeJuiceContract =
|
|
241
|
+
this.feeJuiceContract = FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, this.adminWallet);
|
|
233
242
|
|
|
234
243
|
this.feeJuiceBridgeTestHarness = await FeeJuicePortalTestingHarnessFactory.create({
|
|
235
244
|
aztecNode: context.aztecNode,
|
|
@@ -246,14 +255,22 @@ export class ClientFlowsBenchmark {
|
|
|
246
255
|
await this.snapshotManager.snapshot(
|
|
247
256
|
'deploy_banana_token',
|
|
248
257
|
async () => {
|
|
249
|
-
const bananaCoin = await BananaCoin.deploy(
|
|
258
|
+
const { contract: bananaCoin, instance: bananaCoinInstance } = await BananaCoin.deploy(
|
|
259
|
+
this.adminWallet,
|
|
260
|
+
this.adminAddress,
|
|
261
|
+
'BC',
|
|
262
|
+
'BC',
|
|
263
|
+
18n,
|
|
264
|
+
)
|
|
250
265
|
.send({ from: this.adminAddress })
|
|
251
|
-
.
|
|
266
|
+
.wait();
|
|
252
267
|
this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
|
|
253
|
-
return { bananaCoinAddress: bananaCoin.address };
|
|
268
|
+
return { bananaCoinAddress: bananaCoin.address, bananaCoinInstance };
|
|
254
269
|
},
|
|
255
|
-
|
|
256
|
-
this.bananaCoin =
|
|
270
|
+
({ bananaCoinAddress, bananaCoinInstance }) => {
|
|
271
|
+
this.bananaCoin = BananaCoin.at(bananaCoinAddress, this.adminWallet);
|
|
272
|
+
this.bananaCoinInstance = bananaCoinInstance;
|
|
273
|
+
return Promise.resolve();
|
|
257
274
|
},
|
|
258
275
|
);
|
|
259
276
|
}
|
|
@@ -262,14 +279,22 @@ export class ClientFlowsBenchmark {
|
|
|
262
279
|
await this.snapshotManager.snapshot(
|
|
263
280
|
'deploy_candy_bar_token',
|
|
264
281
|
async () => {
|
|
265
|
-
const candyBarCoin = await TokenContract.deploy(
|
|
282
|
+
const { contract: candyBarCoin, instance: candyBarCoinInstance } = await TokenContract.deploy(
|
|
283
|
+
this.adminWallet,
|
|
284
|
+
this.adminAddress,
|
|
285
|
+
'CBC',
|
|
286
|
+
'CBC',
|
|
287
|
+
18n,
|
|
288
|
+
)
|
|
266
289
|
.send({ from: this.adminAddress })
|
|
267
|
-
.
|
|
290
|
+
.wait();
|
|
268
291
|
this.logger.info(`CandyBarCoin deployed at ${candyBarCoin.address}`);
|
|
269
|
-
return { candyBarCoinAddress: candyBarCoin.address };
|
|
292
|
+
return { candyBarCoinAddress: candyBarCoin.address, candyBarCoinInstance };
|
|
270
293
|
},
|
|
271
|
-
|
|
272
|
-
this.candyBarCoin =
|
|
294
|
+
({ candyBarCoinAddress, candyBarCoinInstance }) => {
|
|
295
|
+
this.candyBarCoin = TokenContract.at(candyBarCoinAddress, this.adminWallet);
|
|
296
|
+
this.candyBarCoinInstance = candyBarCoinInstance;
|
|
297
|
+
return Promise.resolve();
|
|
273
298
|
},
|
|
274
299
|
);
|
|
275
300
|
}
|
|
@@ -282,18 +307,24 @@ export class ClientFlowsBenchmark {
|
|
|
282
307
|
expect((await context.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
|
|
283
308
|
|
|
284
309
|
const bananaCoin = this.bananaCoin;
|
|
285
|
-
const bananaFPC = await FPCContract.deploy(
|
|
310
|
+
const { contract: bananaFPC, instance: bananaFPCInstance } = await FPCContract.deploy(
|
|
311
|
+
this.adminWallet,
|
|
312
|
+
bananaCoin.address,
|
|
313
|
+
this.adminAddress,
|
|
314
|
+
)
|
|
286
315
|
.send({ from: this.adminAddress })
|
|
287
|
-
.
|
|
316
|
+
.wait();
|
|
288
317
|
|
|
289
318
|
this.logger.info(`BananaPay deployed at ${bananaFPC.address}`);
|
|
290
319
|
|
|
291
320
|
await this.feeJuiceBridgeTestHarness.bridgeFromL1ToL2(bananaFPC.address, this.adminAddress);
|
|
292
321
|
|
|
293
|
-
return { bananaFPCAddress: bananaFPC.address };
|
|
322
|
+
return { bananaFPCAddress: bananaFPC.address, bananaFPCInstance };
|
|
294
323
|
},
|
|
295
|
-
|
|
296
|
-
this.bananaFPC =
|
|
324
|
+
data => {
|
|
325
|
+
this.bananaFPC = FPCContract.at(data.bananaFPCAddress, this.adminWallet);
|
|
326
|
+
this.bananaFPCInstance = data.bananaFPCInstance;
|
|
327
|
+
return Promise.resolve();
|
|
297
328
|
},
|
|
298
329
|
);
|
|
299
330
|
}
|
|
@@ -302,12 +333,14 @@ export class ClientFlowsBenchmark {
|
|
|
302
333
|
await this.snapshotManager.snapshot(
|
|
303
334
|
'deploy_sponsored_fpc',
|
|
304
335
|
async () => {
|
|
305
|
-
const
|
|
306
|
-
this.logger.info(`SponsoredFPC at ${
|
|
307
|
-
return { sponsoredFPCAddress:
|
|
336
|
+
const sponsoredFPCInstance = await setupSponsoredFPC(this.adminWallet);
|
|
337
|
+
this.logger.info(`SponsoredFPC at ${sponsoredFPCInstance.address}`);
|
|
338
|
+
return { sponsoredFPCAddress: sponsoredFPCInstance.address, sponsoredFPCInstance };
|
|
308
339
|
},
|
|
309
|
-
|
|
310
|
-
this.sponsoredFPC =
|
|
340
|
+
({ sponsoredFPCAddress, sponsoredFPCInstance }) => {
|
|
341
|
+
this.sponsoredFPC = SponsoredFPCContract.at(sponsoredFPCAddress, this.adminWallet);
|
|
342
|
+
this.sponsoredFPCInstance = sponsoredFPCInstance;
|
|
343
|
+
return Promise.resolve();
|
|
311
344
|
},
|
|
312
345
|
);
|
|
313
346
|
}
|
|
@@ -361,24 +394,38 @@ export class ClientFlowsBenchmark {
|
|
|
361
394
|
await this.snapshotManager.snapshot(
|
|
362
395
|
'deploy_amm',
|
|
363
396
|
async () => {
|
|
364
|
-
const liquidityToken = await TokenContract.deploy(
|
|
397
|
+
const { contract: liquidityToken, instance: liquidityTokenInstance } = await TokenContract.deploy(
|
|
398
|
+
this.adminWallet,
|
|
399
|
+
this.adminAddress,
|
|
400
|
+
'LPT',
|
|
401
|
+
'LPT',
|
|
402
|
+
18n,
|
|
403
|
+
)
|
|
365
404
|
.send({ from: this.adminAddress })
|
|
366
|
-
.
|
|
367
|
-
const amm = await AMMContract.deploy(
|
|
405
|
+
.wait();
|
|
406
|
+
const { contract: amm, instance: ammInstance } = await AMMContract.deploy(
|
|
368
407
|
this.adminWallet,
|
|
369
408
|
this.bananaCoin.address,
|
|
370
409
|
this.candyBarCoin.address,
|
|
371
410
|
liquidityToken.address,
|
|
372
411
|
)
|
|
373
412
|
.send({ from: this.adminAddress })
|
|
374
|
-
.
|
|
413
|
+
.wait();
|
|
375
414
|
this.logger.info(`AMM deployed at ${amm.address}`);
|
|
376
415
|
await liquidityToken.methods.set_minter(amm.address, true).send({ from: this.adminAddress }).wait();
|
|
377
|
-
return {
|
|
416
|
+
return {
|
|
417
|
+
ammAddress: amm.address,
|
|
418
|
+
ammInstance,
|
|
419
|
+
liquidityTokenAddress: liquidityToken.address,
|
|
420
|
+
liquidityTokenInstance,
|
|
421
|
+
};
|
|
378
422
|
},
|
|
379
|
-
|
|
380
|
-
this.liquidityToken =
|
|
381
|
-
this.
|
|
423
|
+
({ ammAddress, ammInstance, liquidityTokenAddress, liquidityTokenInstance }) => {
|
|
424
|
+
this.liquidityToken = TokenContract.at(liquidityTokenAddress, this.adminWallet);
|
|
425
|
+
this.liquidityTokenInstance = liquidityTokenInstance;
|
|
426
|
+
this.amm = AMMContract.at(ammAddress, this.adminWallet);
|
|
427
|
+
this.ammInstance = ammInstance;
|
|
428
|
+
return Promise.resolve();
|
|
382
429
|
},
|
|
383
430
|
);
|
|
384
431
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BBNativePrivateKernelProver } from '@aztec/bb-prover/client/native';
|
|
3
|
-
import { BBWASMBundlePrivateKernelProver } from '@aztec/bb-prover/client/wasm/bundle';
|
|
1
|
+
import { BBBundlePrivateKernelProver } from '@aztec/bb-prover/client/bundle';
|
|
4
2
|
import { createLogger, logger } from '@aztec/foundation/log';
|
|
5
3
|
import { Timer } from '@aztec/foundation/timer';
|
|
6
4
|
import { WASMSimulator } from '@aztec/simulator/client';
|
|
@@ -11,26 +9,7 @@ import { Decoder } from 'msgpackr';
|
|
|
11
9
|
import { readFile, readdir, writeFile } from 'node:fs/promises';
|
|
12
10
|
import { join } from 'node:path';
|
|
13
11
|
|
|
14
|
-
import { type Log,
|
|
15
|
-
|
|
16
|
-
type NativeProverConfig = { bbBinaryPath?: string; bbWorkingDirectory?: string };
|
|
17
|
-
|
|
18
|
-
async function createProver(config: NativeProverConfig = {}, log: Logger) {
|
|
19
|
-
const simulator = new WASMSimulator();
|
|
20
|
-
if (!config.bbBinaryPath || !config.bbWorkingDirectory) {
|
|
21
|
-
return { prover: new BBWASMBundlePrivateKernelProver(simulator, 16, log), type: 'wasm' as ProverType };
|
|
22
|
-
} else {
|
|
23
|
-
const bbConfig = config as Required<NativeProverConfig>;
|
|
24
|
-
return {
|
|
25
|
-
prover: await BBNativePrivateKernelProver.new(
|
|
26
|
-
{ bbSkipCleanup: false, numConcurrentIVCVerifiers: 1, bbIVCConcurrency: 1, ...bbConfig },
|
|
27
|
-
simulator,
|
|
28
|
-
log,
|
|
29
|
-
),
|
|
30
|
-
type: 'native' as ProverType,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
}
|
|
12
|
+
import { type Log, ProxyLogger, generateBenchmark } from './benchmark.js';
|
|
34
13
|
|
|
35
14
|
async function main() {
|
|
36
15
|
ProxyLogger.create();
|
|
@@ -41,12 +20,11 @@ async function main() {
|
|
|
41
20
|
}
|
|
42
21
|
const flows = await readdir(ivcFolder);
|
|
43
22
|
logger.info(`Flows in ${ivcFolder}: \n${flows.map(flowName => `\t- ${flowName}`).join('\n')}`);
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
);
|
|
23
|
+
const simulator = new WASMSimulator();
|
|
24
|
+
const log = proxyLogger.createLogger('bb:prover');
|
|
25
|
+
const prover = new BBBundlePrivateKernelProver(simulator, log);
|
|
48
26
|
|
|
49
|
-
const userLog = createLogger('
|
|
27
|
+
const userLog = createLogger('chonk_flows:data_processor');
|
|
50
28
|
|
|
51
29
|
for (const flow of flows) {
|
|
52
30
|
userLog.info(`Processing flow ${flow}`);
|
|
@@ -84,10 +62,10 @@ async function main() {
|
|
|
84
62
|
let provingTime;
|
|
85
63
|
try {
|
|
86
64
|
const provingTimer = new Timer();
|
|
87
|
-
await prover.
|
|
65
|
+
await prover.createChonkProof(privateExecutionSteps);
|
|
88
66
|
provingTime = provingTimer.ms();
|
|
89
67
|
} catch (e) {
|
|
90
|
-
userLog.error(`Failed to generate
|
|
68
|
+
userLog.error(`Failed to generate chonk proof for ${flow}`, e);
|
|
91
69
|
error = (e as Error).message;
|
|
92
70
|
}
|
|
93
71
|
// Extract logs from this run from the proxy and write them to disk unconditionally
|
|
@@ -96,7 +74,7 @@ async function main() {
|
|
|
96
74
|
if (!(profile.stats.timings as ProvingTimings).proving) {
|
|
97
75
|
(profile.stats.timings as ProvingTimings).proving = provingTime;
|
|
98
76
|
}
|
|
99
|
-
const benchmark = generateBenchmark(flow, currentLogs, profile.stats, privateExecutionSteps,
|
|
77
|
+
const benchmark = generateBenchmark(flow, currentLogs, profile.stats, privateExecutionSteps, 'native', error);
|
|
100
78
|
await writeFile(join(ivcFolder, flow, 'benchmark.json'), JSON.stringify(benchmark, null, 2));
|
|
101
79
|
proxyLogger.flushLogs();
|
|
102
80
|
}
|
|
@@ -130,7 +130,7 @@ export class BlacklistTokenContractTest {
|
|
|
130
130
|
},
|
|
131
131
|
async ({ tokenContractAddress, badAccountAddress }) => {
|
|
132
132
|
// Restore the token contract state.
|
|
133
|
-
this.asset =
|
|
133
|
+
this.asset = TokenBlacklistContract.at(tokenContractAddress, this.wallet);
|
|
134
134
|
this.logger.verbose(`Token contract address: ${this.asset.address}`);
|
|
135
135
|
|
|
136
136
|
this.tokenSim = new TokenSimulator(
|
|
@@ -141,7 +141,7 @@ export class BlacklistTokenContractTest {
|
|
|
141
141
|
[this.adminAddress, this.otherAddress, this.blacklistedAddress],
|
|
142
142
|
);
|
|
143
143
|
|
|
144
|
-
this.badAccount =
|
|
144
|
+
this.badAccount = InvalidAccountContract.at(badAccountAddress, this.wallet);
|
|
145
145
|
this.logger.verbose(`Bad account address: ${this.badAccount.address}`);
|
|
146
146
|
|
|
147
147
|
expect(await this.asset.methods.get_roles(this.adminAddress).simulate({ from: this.adminAddress })).toEqual(
|
|
@@ -3,13 +3,13 @@ import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
|
3
3
|
import { type Logger, createLogger } from '@aztec/aztec.js/log';
|
|
4
4
|
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
5
5
|
import { CheatCodes } from '@aztec/aztec/testing';
|
|
6
|
+
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
6
7
|
import {
|
|
7
8
|
type DeployL1ContractsArgs,
|
|
8
9
|
type DeployL1ContractsReturnType,
|
|
9
|
-
type ExtendedViemWalletClient,
|
|
10
|
-
createExtendedL1Client,
|
|
11
10
|
deployL1Contract,
|
|
12
|
-
} from '@aztec/ethereum';
|
|
11
|
+
} from '@aztec/ethereum/deploy-l1-contracts';
|
|
12
|
+
import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
|
|
13
13
|
import { InboxAbi, OutboxAbi, TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-artifacts';
|
|
14
14
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
15
15
|
import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
|
|
@@ -134,9 +134,9 @@ export class CrossChainMessagingTest {
|
|
|
134
134
|
|
|
135
135
|
return this.crossChainTestHarness.toCrossChainContext();
|
|
136
136
|
},
|
|
137
|
-
|
|
138
|
-
this.l2Token =
|
|
139
|
-
this.l2Bridge =
|
|
137
|
+
crossChainContext => {
|
|
138
|
+
this.l2Token = TokenContract.at(crossChainContext.l2Token, this.wallet);
|
|
139
|
+
this.l2Bridge = TokenBridgeContract.at(crossChainContext.l2Bridge, this.wallet);
|
|
140
140
|
|
|
141
141
|
// There is an issue with the reviver so we are getting strings sometimes. Working around it here.
|
|
142
142
|
this.ethAccount = EthAddress.fromString(crossChainContext.ethAccount.toString());
|
|
@@ -172,6 +172,7 @@ export class CrossChainMessagingTest {
|
|
|
172
172
|
this.l1Client = l1Client;
|
|
173
173
|
this.inbox = inbox;
|
|
174
174
|
this.outbox = outbox;
|
|
175
|
+
return Promise.resolve();
|
|
175
176
|
},
|
|
176
177
|
);
|
|
177
178
|
}
|