@aztec/end-to-end 3.0.0-nightly.20250922 → 3.0.0-nightly.20250923
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/client_flows_benchmark.d.ts +0 -1
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +5 -8
- package/dest/bench/utils.d.ts +1 -10
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +0 -25
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +1 -2
- 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 +1 -3
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +1 -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 -8
- package/dest/e2e_deploy_contract/deploy_test.d.ts +3 -3
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.js +2 -3
- package/dest/e2e_fees/fees_test.d.ts +1 -2
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +5 -8
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +1 -2
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +1 -3
- package/dest/e2e_p2p/shared.d.ts +2 -1
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +5 -3
- package/dest/fixtures/e2e_prover_test.d.ts +0 -2
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +6 -9
- package/dest/fixtures/snapshot_manager.d.ts +0 -2
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +2 -4
- package/dest/fixtures/utils.d.ts +12 -14
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +17 -19
- package/dest/shared/cross_chain_test_harness.d.ts +2 -6
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +3 -5
- package/dest/shared/gas_portal_test_harness.d.ts +5 -6
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +5 -5
- package/dest/shared/uniswap_l1_l2.d.ts +1 -3
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +3 -4
- package/dest/spartan/setup_test_wallets.d.ts +5 -5
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +10 -12
- package/package.json +37 -37
- package/src/bench/client_flows/client_flows_benchmark.ts +4 -8
- package/src/bench/utils.ts +1 -28
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +1 -4
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +5 -9
- package/src/e2e_deploy_contract/deploy_test.ts +4 -5
- package/src/e2e_fees/fees_test.ts +6 -9
- package/src/e2e_nested_contract/nested_contract_test.ts +2 -4
- package/src/e2e_p2p/shared.ts +6 -2
- package/src/fixtures/e2e_prover_test.ts +7 -12
- package/src/fixtures/snapshot_manager.ts +3 -6
- package/src/fixtures/utils.ts +21 -30
- package/src/shared/cross_chain_test_harness.ts +0 -5
- package/src/shared/gas_portal_test_harness.ts +4 -6
- package/src/shared/uniswap_l1_l2.ts +1 -7
- package/src/spartan/setup_test_wallets.ts +10 -15
|
@@ -20,7 +20,6 @@ export type BenchmarkingFeePaymentMethod = 'bridged_fee_juice' | 'private_fpc' |
|
|
|
20
20
|
export declare class ClientFlowsBenchmark {
|
|
21
21
|
private snapshotManager;
|
|
22
22
|
logger: Logger;
|
|
23
|
-
private pxe;
|
|
24
23
|
aztecNode: AztecNode;
|
|
25
24
|
cheatCodes: CheatCodes;
|
|
26
25
|
context: SubsystemsContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client_flows_benchmark.d.ts","sourceRoot":"","sources":["../../../src/bench/client_flows/client_flows_benchmark.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,SAAS,EACd,qBAAqB,EACrB,8BAA8B,EAC9B,KAAK,gBAAgB,EACrB,KAAK,MAAM,EAEX,uBAAuB,EACvB,yBAAyB,EACzB,KAAK,MAAM,EAEZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,KAAK,qBAAqB,EAA4D,MAAM,iBAAiB,CAAC;AACvH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAK5F,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,KAAK,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,KAAK,iBAAiB,EAAu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AA4B,EAAE;QAAE,SAAS,EAAE,sBAAsB,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CA0BhH;IAEG,MAAM,EAAE,iBAAiB,CAAC;IAEjC,OAAO,CAAC,WAAW,CAAc;gBAErB,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,GAAE,OAAO,CAAC,YAAY,GAAG,qBAAqB,CAAM;IAazF,KAAK;IAUL,QAAQ;IAKR,qBAAqB,CAAC,OAAO,EAAE,YAAY;IASjD,sFAAsF;IAChF,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY;IAa9D,gCAAgC,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS;IAgBnE,kBAAkB;IAKzB,4BAA4B;IAqC5B,0BAA0B;IAoB1B,8BAA8B;IAgB9B,gCAAgC;IAgBzB,qBAAqB;IAwB5B,+BAA+B;IAcxB,2BAA2B,CAAC,KAAK,EAAE,YAAY;IAwB/C,4CAA4C,CAAC,WAAW,EAAE,WAAW;IAgBrE,sBAAsB;IA0BtB,wCAAwC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY;IAKpF,mCAAmC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY;IAIxE,qCAAqC,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY;IAI5E,iCAAiC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY;CAG/E"}
|
|
@@ -29,7 +29,6 @@ const { E2E_DATA_PATH: dataPath, BENCHMARK_CONFIG } = process.env;
|
|
|
29
29
|
export class ClientFlowsBenchmark {
|
|
30
30
|
snapshotManager;
|
|
31
31
|
logger;
|
|
32
|
-
pxe;
|
|
33
32
|
aztecNode;
|
|
34
33
|
cheatCodes;
|
|
35
34
|
context;
|
|
@@ -150,11 +149,10 @@ export class ClientFlowsBenchmark {
|
|
|
150
149
|
await this.applySetupFeeJuiceSnapshot();
|
|
151
150
|
}
|
|
152
151
|
async applyInitialAccountsSnapshot() {
|
|
153
|
-
await this.snapshotManager.snapshot('initial_accounts', deployAccounts(2, this.logger), async ({ deployedAccounts: [{ address: adminAddress }, { address: sequencerAddress }] }, { wallet,
|
|
154
|
-
this.pxe = pxe;
|
|
152
|
+
await this.snapshotManager.snapshot('initial_accounts', deployAccounts(2, this.logger), async ({ deployedAccounts: [{ address: adminAddress }, { address: sequencerAddress }] }, { wallet, aztecNode, aztecNodeConfig })=>{
|
|
155
153
|
this.adminWallet = wallet;
|
|
156
154
|
this.aztecNode = aztecNode;
|
|
157
|
-
this.cheatCodes = await CheatCodes.create(aztecNodeConfig.l1RpcUrls,
|
|
155
|
+
this.cheatCodes = await CheatCodes.create(aztecNodeConfig.l1RpcUrls, wallet, aztecNode);
|
|
158
156
|
this.adminAddress = adminAddress;
|
|
159
157
|
this.sequencerAddress = sequencerAddress;
|
|
160
158
|
const canonicalFeeJuice = await getCanonicalFeeJuice();
|
|
@@ -182,7 +180,6 @@ export class ClientFlowsBenchmark {
|
|
|
182
180
|
this.feeJuiceBridgeTestHarness = await FeeJuicePortalTestingHarnessFactory.create({
|
|
183
181
|
aztecNode: context.aztecNode,
|
|
184
182
|
aztecNodeAdmin: context.aztecNode,
|
|
185
|
-
pxeService: context.pxe,
|
|
186
183
|
l1Client: context.deployL1ContractsValues.l1Client,
|
|
187
184
|
wallet: this.adminWallet,
|
|
188
185
|
logger: this.logger
|
|
@@ -218,7 +215,7 @@ export class ClientFlowsBenchmark {
|
|
|
218
215
|
async applyFPCSetupSnapshot() {
|
|
219
216
|
await this.snapshotManager.snapshot('fpc_setup', async (context)=>{
|
|
220
217
|
const feeJuiceContract = this.feeJuiceBridgeTestHarness.feeJuice;
|
|
221
|
-
expect((await context.
|
|
218
|
+
expect((await context.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
|
|
222
219
|
const bananaCoin = this.bananaCoin;
|
|
223
220
|
const bananaFPC = await FPCContract.deploy(this.adminWallet, bananaCoin.address, this.adminAddress).send({
|
|
224
221
|
from: this.adminAddress
|
|
@@ -234,7 +231,7 @@ export class ClientFlowsBenchmark {
|
|
|
234
231
|
}
|
|
235
232
|
async applyDeploySponsoredFPCSnapshot() {
|
|
236
233
|
await this.snapshotManager.snapshot('deploy_sponsored_fpc', async ()=>{
|
|
237
|
-
const sponsoredFPC = await setupSponsoredFPC(this.
|
|
234
|
+
const sponsoredFPC = await setupSponsoredFPC(this.adminWallet);
|
|
238
235
|
this.logger.info(`SponsoredFPC at ${sponsoredFPC.address}`);
|
|
239
236
|
return {
|
|
240
237
|
sponsoredFPCAddress: sponsoredFPC.address
|
|
@@ -251,7 +248,7 @@ export class ClientFlowsBenchmark {
|
|
|
251
248
|
l1Client.account.address
|
|
252
249
|
]).then(({ address })=>address);
|
|
253
250
|
this.logger.verbose(`Setting up cross chain harness...`);
|
|
254
|
-
const crossChainTestHarness = await CrossChainTestHarness.new(this.aztecNode,
|
|
251
|
+
const crossChainTestHarness = await CrossChainTestHarness.new(this.aztecNode, l1Client, this.adminWallet, owner, this.logger, underlyingERC20Address);
|
|
255
252
|
this.logger.verbose(`L2 token deployed to: ${crossChainTestHarness.l2Token.address}`);
|
|
256
253
|
return crossChainTestHarness;
|
|
257
254
|
}
|
package/dest/bench/utils.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SentTx, type WaitOpts } from '@aztec/aztec.js';
|
|
2
2
|
import { BenchmarkingContract } from '@aztec/noir-test-contracts.js/Benchmarking';
|
|
3
|
-
import { type PXEService } from '@aztec/pxe/server';
|
|
4
3
|
import type { MetricsType } from '@aztec/telemetry-client';
|
|
5
4
|
import type { BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench';
|
|
6
5
|
import { type EndToEndContext, type SetupOptions } from '../fixtures/utils.js';
|
|
@@ -41,13 +40,5 @@ export type GithubActionBenchmarkResult = {
|
|
|
41
40
|
*/
|
|
42
41
|
export declare function sendTxs(txCount: number, context: EndToEndContext, contract: BenchmarkingContract, heavyPublicCompute?: boolean): Promise<SentTx[]>;
|
|
43
42
|
export declare function waitTxs(txs: SentTx[], context: EndToEndContext, txWaitOpts?: WaitOpts): Promise<void>;
|
|
44
|
-
/**
|
|
45
|
-
* Creates a new PXE
|
|
46
|
-
* @param node - Node to connect the pxe to.
|
|
47
|
-
* @param contract - Benchmark contract to add to the pxe.
|
|
48
|
-
* @param startingBlock - First l2 block to process.
|
|
49
|
-
* @returns The new PXE.
|
|
50
|
-
*/
|
|
51
|
-
export declare function createNewPXE(node: AztecNode, contract: BenchmarkingContract): Promise<PXEService>;
|
|
52
43
|
export {};
|
|
53
44
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/bench/utils.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/bench/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAA4C,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAKxH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAS,MAAM,sBAAsB,CAAC;AAEtF;;GAEG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG;IAC5B,6BAA6B,CAAC,OAAO,EAAE,CAAC,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC;IACtE,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;;;;;GAyBF;AAED,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAGF,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA6DF;;;;;;;;GAQG;AACH,wBAAsB,OAAO,CAC3B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,oBAAoB,EAC9B,kBAAkB,GAAE,OAAe,GAClC,OAAO,CAAC,MAAM,EAAE,CAAC,CAOnB;AAED,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC,EAAE,QAAQ,iBAI3F"}
|
package/dest/bench/utils.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BatchCall } from '@aztec/aztec.js';
|
|
2
2
|
import { mean, stdDev, times } from '@aztec/foundation/collection';
|
|
3
3
|
import { BenchmarkingContract } from '@aztec/noir-test-contracts.js/Benchmarking';
|
|
4
|
-
import { createPXEService } from '@aztec/pxe/server';
|
|
5
4
|
import { mkdirSync, writeFileSync } from 'fs';
|
|
6
5
|
import path from 'path';
|
|
7
6
|
import { setup } from '../fixtures/utils.js';
|
|
@@ -128,30 +127,6 @@ export async function waitTxs(txs, context, txWaitOpts) {
|
|
|
128
127
|
await Promise.all(txs.map((tx)=>tx.wait(txWaitOpts)));
|
|
129
128
|
context.logger.info(`All ${txs.length} txs have been mined`);
|
|
130
129
|
}
|
|
131
|
-
/**
|
|
132
|
-
* Creates a new PXE
|
|
133
|
-
* @param node - Node to connect the pxe to.
|
|
134
|
-
* @param contract - Benchmark contract to add to the pxe.
|
|
135
|
-
* @param startingBlock - First l2 block to process.
|
|
136
|
-
* @returns The new PXE.
|
|
137
|
-
*/ export async function createNewPXE(node, contract) {
|
|
138
|
-
const l1Contracts = await node.getL1ContractAddresses();
|
|
139
|
-
const { l1ChainId, rollupVersion } = await node.getNodeInfo();
|
|
140
|
-
const pxeConfig = {
|
|
141
|
-
l2BlockBatchSize: 50,
|
|
142
|
-
l2BlockPollingIntervalMS: 100,
|
|
143
|
-
dataDirectory: undefined,
|
|
144
|
-
dataStoreMapSizeKB: 1024 * 1024,
|
|
145
|
-
l1Contracts,
|
|
146
|
-
l1ChainId,
|
|
147
|
-
rollupVersion
|
|
148
|
-
};
|
|
149
|
-
// docs:start:PXEcreate
|
|
150
|
-
const pxe = await createPXEService(node, pxeConfig);
|
|
151
|
-
// docs:end:PXEcreate
|
|
152
|
-
await pxe.registerContract(contract);
|
|
153
|
-
return pxe;
|
|
154
|
-
}
|
|
155
130
|
function randomBytesAsBigInts(length) {
|
|
156
131
|
return [
|
|
157
132
|
...Array(length)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AztecAddress, type AztecNode, Fr, type Logger, type
|
|
1
|
+
import { AztecAddress, type AztecNode, Fr, type Logger, type TxHash } from '@aztec/aztec.js';
|
|
2
2
|
import type { CheatCodes } from '@aztec/aztec/testing';
|
|
3
3
|
import { TokenBlacklistContract } from '@aztec/noir-contracts.js/TokenBlacklist';
|
|
4
4
|
import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
|
|
@@ -24,7 +24,6 @@ export declare class BlacklistTokenContractTest {
|
|
|
24
24
|
private snapshotManager;
|
|
25
25
|
logger: Logger;
|
|
26
26
|
wallet: TestWallet;
|
|
27
|
-
pxe: PXE;
|
|
28
27
|
asset: TokenBlacklistContract;
|
|
29
28
|
tokenSim: TokenSimulator;
|
|
30
29
|
badAccount: InvalidAccountContract;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blacklist_token_contract_test.d.ts","sourceRoot":"","sources":["../../src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,SAAS,EACd,EAAE,EACF,KAAK,MAAM,EACX,KAAK,
|
|
1
|
+
{"version":3,"file":"blacklist_token_contract_test.d.ts","sourceRoot":"","sources":["../../src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,SAAS,EACd,EAAE,EACF,KAAK,MAAM,EACX,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAIlE,qBAAa,IAAI;IACf,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAS;IAE9B,SAAS;IAKT,UAAU;IAKV,eAAe;IAKf,YAAY;;;;;CAKb;AAED,qBAAa,0BAA0B;IAErC,MAAM,CAAC,kBAAkB,SAAS;IAElC,OAAO,CAAC,eAAe,CAAmB;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAG,UAAU,CAAC;IACpB,KAAK,EAAG,sBAAsB,CAAC;IAC/B,QAAQ,EAAG,cAAc,CAAC;IAC1B,UAAU,EAAG,sBAAsB,CAAC;IACpC,UAAU,EAAG,UAAU,CAAC;IACxB,SAAS,EAAG,eAAe,CAAC;IAC5B,SAAS,EAAG,SAAS,CAAC;IAEtB,YAAY,EAAG,YAAY,CAAC;IAC5B,YAAY,EAAG,YAAY,CAAC;IAC5B,kBAAkB,EAAG,YAAY,CAAC;gBAEtB,QAAQ,EAAE,MAAM;IAKtB,sBAAsB;IAQ5B;;;;OAIG;IACG,kBAAkB;IAgElB,KAAK;IAIX,QAAQ,GAAI,CAAC,EACX,MAAM,MAAM,EACZ,OAAO,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,EACjD,UAAS,CAAC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAA2B,KAChG,OAAO,CAAC,IAAI,CAAC,CAAwD;IAElE,QAAQ;IAIR,yBAAyB,CAC7B,QAAQ,EAAE,sBAAsB,EAChC,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,EAAE,EACd,MAAM,EAAE,MAAM;IAgBV,iBAAiB;CAmExB"}
|
|
@@ -37,7 +37,6 @@ export class BlacklistTokenContractTest {
|
|
|
37
37
|
snapshotManager;
|
|
38
38
|
logger;
|
|
39
39
|
wallet;
|
|
40
|
-
pxe;
|
|
41
40
|
asset;
|
|
42
41
|
tokenSim;
|
|
43
42
|
badAccount;
|
|
@@ -61,8 +60,7 @@ export class BlacklistTokenContractTest {
|
|
|
61
60
|
*/ async applyBaseSnapshots() {
|
|
62
61
|
// Adding a timeout of 2 minutes in here such that it is propagated to the underlying tests
|
|
63
62
|
jest.setTimeout(120_000);
|
|
64
|
-
await this.snapshotManager.snapshot('3_accounts', deployAccounts(3, this.logger), ({ deployedAccounts }, {
|
|
65
|
-
this.pxe = pxe;
|
|
63
|
+
await this.snapshotManager.snapshot('3_accounts', deployAccounts(3, this.logger), ({ deployedAccounts }, { cheatCodes, aztecNode, sequencer, wallet })=>{
|
|
66
64
|
this.cheatCodes = cheatCodes;
|
|
67
65
|
this.aztecNode = aztecNode;
|
|
68
66
|
this.sequencer = sequencer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AztecNodeConfig } from '@aztec/aztec-node';
|
|
2
|
-
import { AztecAddress, type AztecNode, EthAddress, type Logger
|
|
2
|
+
import { AztecAddress, type AztecNode, EthAddress, type Logger } from '@aztec/aztec.js';
|
|
3
3
|
import { CheatCodes } from '@aztec/aztec/testing';
|
|
4
4
|
import { type DeployL1ContractsArgs, type DeployL1ContractsReturnType, type ExtendedViemWalletClient } from '@aztec/ethereum';
|
|
5
5
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
@@ -13,7 +13,6 @@ export declare class CrossChainMessagingTest {
|
|
|
13
13
|
private snapshotManager;
|
|
14
14
|
logger: Logger;
|
|
15
15
|
aztecNode: AztecNode;
|
|
16
|
-
pxe: PXE;
|
|
17
16
|
aztecNodeConfig: AztecNodeConfig;
|
|
18
17
|
aztecNodeAdmin: AztecNodeAdmin;
|
|
19
18
|
ctx: SubsystemsContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross_chain_messaging_test.d.ts","sourceRoot":"","sources":["../../src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"cross_chain_messaging_test.d.ts","sourceRoot":"","sources":["../../src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,KAAK,MAAM,EAAgB,MAAM,iBAAiB,CAAC;AACtG,OAAO,EAAE,UAA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,CAAC,qBAAqB,CAAM;IAQ3G,YAAY;IAIZ,KAAK;IAUX,QAAQ,GAAI,CAAC,EACX,MAAM,MAAM,EACZ,OAAO,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,EACjD,UAAS,CAAC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAA2B,KAChG,OAAO,CAAC,IAAI,CAAC,CAAwD;IAElE,QAAQ;IAIR,kBAAkB;CAuFzB"}
|
|
@@ -13,7 +13,6 @@ export class CrossChainMessagingTest {
|
|
|
13
13
|
snapshotManager;
|
|
14
14
|
logger;
|
|
15
15
|
aztecNode;
|
|
16
|
-
pxe;
|
|
17
16
|
aztecNodeConfig;
|
|
18
17
|
aztecNodeAdmin;
|
|
19
18
|
ctx;
|
|
@@ -43,9 +42,9 @@ export class CrossChainMessagingTest {
|
|
|
43
42
|
async setup() {
|
|
44
43
|
this.ctx = await this.snapshotManager.setup();
|
|
45
44
|
this.aztecNode = this.ctx.aztecNode;
|
|
46
|
-
this.
|
|
45
|
+
this.wallet = this.ctx.wallet;
|
|
47
46
|
this.aztecNodeConfig = this.ctx.aztecNodeConfig;
|
|
48
|
-
this.cheatCodes = await CheatCodes.create(this.aztecNodeConfig.l1RpcUrls, this.
|
|
47
|
+
this.cheatCodes = await CheatCodes.create(this.aztecNodeConfig.l1RpcUrls, this.wallet, this.aztecNode);
|
|
49
48
|
this.deployL1ContractsValues = this.ctx.deployL1ContractsValues;
|
|
50
49
|
this.aztecNodeAdmin = this.ctx.aztecNode;
|
|
51
50
|
}
|
|
@@ -54,11 +53,10 @@ export class CrossChainMessagingTest {
|
|
|
54
53
|
await this.snapshotManager.teardown();
|
|
55
54
|
}
|
|
56
55
|
async applyBaseSnapshots() {
|
|
57
|
-
// Note that we are using the same `
|
|
56
|
+
// Note that we are using the same `wallet`, `aztecNodeConfig` and `aztecNode` across all snapshots.
|
|
58
57
|
// This is to not have issues with different networks.
|
|
59
|
-
await this.snapshotManager.snapshot('3_accounts', deployAccounts(3, this.logger), ({ deployedAccounts }, {
|
|
58
|
+
await this.snapshotManager.snapshot('3_accounts', deployAccounts(3, this.logger), ({ deployedAccounts }, { wallet, aztecNodeConfig, aztecNode })=>{
|
|
60
59
|
[this.ownerAddress, this.user1Address, this.user2Address] = deployedAccounts.map((a)=>a.address);
|
|
61
|
-
this.pxe = pxe;
|
|
62
60
|
this.wallet = wallet;
|
|
63
61
|
this.aztecNode = aztecNode;
|
|
64
62
|
this.aztecNodeConfig = aztecNodeConfig;
|
|
@@ -80,7 +78,7 @@ export class CrossChainMessagingTest {
|
|
|
80
78
|
this.l1Client.account.address
|
|
81
79
|
]).then(({ address })=>address);
|
|
82
80
|
this.logger.verbose(`Setting up cross chain harness...`);
|
|
83
|
-
this.crossChainTestHarness = await CrossChainTestHarness.new(this.aztecNode, this.
|
|
81
|
+
this.crossChainTestHarness = await CrossChainTestHarness.new(this.aztecNode, this.l1Client, this.wallet, this.ownerAddress, this.logger, underlyingERC20Address);
|
|
84
82
|
this.logger.verbose(`L2 token deployed to: ${this.crossChainTestHarness.l2Token.address}`);
|
|
85
83
|
return this.crossChainTestHarness.toCrossChainContext();
|
|
86
84
|
}, async (crossChainContext)=>{
|
|
@@ -100,7 +98,7 @@ export class CrossChainMessagingTest {
|
|
|
100
98
|
abi: OutboxAbi,
|
|
101
99
|
client: l1Client
|
|
102
100
|
});
|
|
103
|
-
this.crossChainTestHarness = new CrossChainTestHarness(this.aztecNode, this.
|
|
101
|
+
this.crossChainTestHarness = new CrossChainTestHarness(this.aztecNode, this.logger, this.l2Token, this.l2Bridge, this.ethAccount, tokenPortalAddress, crossChainContext.underlying, l1Client, this.aztecNodeConfig.l1Contracts, this.wallet, this.ownerAddress);
|
|
104
102
|
this.l1Client = l1Client;
|
|
105
103
|
this.inbox = inbox;
|
|
106
104
|
this.outbox = outbox;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type AztecAddress, type AztecNode, type ContractArtifact, type ContractBase, Fr, type Logger, type
|
|
1
|
+
import { type AztecAddress, type AztecNode, type ContractArtifact, type ContractBase, Fr, type Logger, type PublicKeys, type Wallet } from '@aztec/aztec.js';
|
|
2
2
|
import type { StatefulTestContract } from '@aztec/noir-test-contracts.js/StatefulTest';
|
|
3
3
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
4
|
+
import type { TestWallet } from '@aztec/test-wallet';
|
|
4
5
|
export declare class DeployTest {
|
|
5
6
|
private snapshotManager;
|
|
6
7
|
logger: Logger;
|
|
7
|
-
|
|
8
|
-
wallet: Wallet;
|
|
8
|
+
wallet: TestWallet;
|
|
9
9
|
defaultAccountAddress: AztecAddress;
|
|
10
10
|
aztecNode: AztecNode;
|
|
11
11
|
aztecNodeAdmin: AztecNodeAdmin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy_test.d.ts","sourceRoot":"","sources":["../../src/e2e_deploy_contract/deploy_test.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,EAAE,EACF,KAAK,MAAM,EACX,KAAK,
|
|
1
|
+
{"version":3,"file":"deploy_test.d.ts","sourceRoot":"","sources":["../../src/e2e_deploy_contract/deploy_test.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,EAAE,EACF,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrD,qBAAa,UAAU;IACrB,OAAO,CAAC,eAAe,CAAmB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAG,UAAU,CAAC;IACpB,qBAAqB,EAAG,YAAY,CAAC;IACrC,SAAS,EAAG,SAAS,CAAC;IACtB,cAAc,EAAG,cAAc,CAAC;gBAE3B,QAAQ,EAAE,MAAM;IAKtB,KAAK;IAQL,QAAQ;YAIA,2BAA2B;IAOnC,gBAAgB,CAAC,CAAC,SAAS,YAAY,EAC3C,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAC1C,IAAI,GAAE;QACJ,IAAI,CAAC,EAAE,EAAE,CAAC;QACV,UAAU,CAAC,EAAE,UAAU,CAAC;QACxB,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;QACjB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,EAAE,YAAY,CAAC;KACpB,GACL,OAAO,CAAC,CAAC,CAAC;IAaP,qBAAqB,IAAI,OAAO,CAAC,YAAY,CAAC;CAIrD;AAED,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;AAElG,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,YAAY,IAAI;IAC1D,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACtD,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC"}
|
|
@@ -4,7 +4,6 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
4
4
|
export class DeployTest {
|
|
5
5
|
snapshotManager;
|
|
6
6
|
logger;
|
|
7
|
-
pxe;
|
|
8
7
|
wallet;
|
|
9
8
|
defaultAccountAddress;
|
|
10
9
|
aztecNode;
|
|
@@ -16,7 +15,7 @@ export class DeployTest {
|
|
|
16
15
|
async setup() {
|
|
17
16
|
await this.applyInitialAccountSnapshot();
|
|
18
17
|
const context = await this.snapshotManager.setup();
|
|
19
|
-
({
|
|
18
|
+
({ aztecNode: this.aztecNode, wallet: this.wallet } = context);
|
|
20
19
|
this.aztecNodeAdmin = context.aztecNode;
|
|
21
20
|
return this;
|
|
22
21
|
}
|
|
@@ -42,7 +41,7 @@ export class DeployTest {
|
|
|
42
41
|
return contractArtifact.at(instance.address, wallet);
|
|
43
42
|
}
|
|
44
43
|
async registerRandomAccount() {
|
|
45
|
-
const completeAddress = await this.
|
|
44
|
+
const completeAddress = await this.wallet.registerAccount(Fr.random(), Fr.random());
|
|
46
45
|
return completeAddress.address;
|
|
47
46
|
}
|
|
48
47
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AztecAddress, type AztecNode, type Logger
|
|
1
|
+
import { type AztecAddress, type AztecNode, type Logger } from '@aztec/aztec.js';
|
|
2
2
|
import { CheatCodes } from '@aztec/aztec/testing';
|
|
3
3
|
import { type DeployL1ContractsArgs, RollupContract } from '@aztec/ethereum';
|
|
4
4
|
import { ChainMonitor } from '@aztec/ethereum/test';
|
|
@@ -29,7 +29,6 @@ export declare class FeesTest {
|
|
|
29
29
|
private snapshotManager;
|
|
30
30
|
private accounts;
|
|
31
31
|
logger: Logger;
|
|
32
|
-
pxe: PXE;
|
|
33
32
|
aztecNode: AztecNode;
|
|
34
33
|
cheatCodes: CheatCodes;
|
|
35
34
|
wallet: TestWallet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fees_test.d.ts","sourceRoot":"","sources":["../../src/e2e_fees/fees_test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"fees_test.d.ts","sourceRoot":"","sources":["../../src/e2e_fees/fees_test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAAuB,MAA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AA8B;IAoB9B,yBAAyB;IAczB,gCAAgC;CAS9C"}
|
|
@@ -33,7 +33,6 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
33
33
|
snapshotManager;
|
|
34
34
|
accounts;
|
|
35
35
|
logger;
|
|
36
|
-
pxe;
|
|
37
36
|
aztecNode;
|
|
38
37
|
cheatCodes;
|
|
39
38
|
wallet;
|
|
@@ -136,14 +135,13 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
136
135
|
await this.applyDeployBananaTokenSnapshot();
|
|
137
136
|
}
|
|
138
137
|
async applyInitialAccountsSnapshot() {
|
|
139
|
-
await this.snapshotManager.snapshot('initial_accounts', deployAccounts(this.numberOfAccounts, this.logger), async ({ deployedAccounts }, { wallet,
|
|
140
|
-
this.pxe = pxe;
|
|
138
|
+
await this.snapshotManager.snapshot('initial_accounts', deployAccounts(this.numberOfAccounts, this.logger), async ({ deployedAccounts }, { wallet, aztecNode, aztecNodeConfig })=>{
|
|
141
139
|
this.wallet = wallet;
|
|
142
140
|
this.aztecNode = aztecNode;
|
|
143
141
|
this.gasSettings = GasSettings.default({
|
|
144
142
|
maxFeesPerGas: (await this.aztecNode.getCurrentBaseFees()).mul(2)
|
|
145
143
|
});
|
|
146
|
-
this.cheatCodes = await CheatCodes.create(aztecNodeConfig.l1RpcUrls,
|
|
144
|
+
this.cheatCodes = await CheatCodes.create(aztecNodeConfig.l1RpcUrls, wallet, aztecNode);
|
|
147
145
|
this.accounts = deployedAccounts.map((a)=>a.address);
|
|
148
146
|
this.accounts.forEach((a, i)=>this.logger.verbose(`Account ${i} address: ${a}`));
|
|
149
147
|
[this.aliceAddress, this.bobAddress, this.sequencerAddress] = this.accounts.slice(0, 3);
|
|
@@ -173,7 +171,6 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
173
171
|
this.feeJuiceBridgeTestHarness = await FeeJuicePortalTestingHarnessFactory.create({
|
|
174
172
|
aztecNode: context.aztecNode,
|
|
175
173
|
aztecNodeAdmin: context.aztecNode,
|
|
176
|
-
pxeService: context.pxe,
|
|
177
174
|
l1Client: context.deployL1ContractsValues.l1Client,
|
|
178
175
|
wallet: this.wallet,
|
|
179
176
|
logger: this.logger
|
|
@@ -199,7 +196,7 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
199
196
|
async applyFPCSetupSnapshot() {
|
|
200
197
|
await this.snapshotManager.snapshot('fpc_setup', async (context)=>{
|
|
201
198
|
const feeJuiceContract = this.feeJuiceBridgeTestHarness.feeJuice;
|
|
202
|
-
expect((await context.
|
|
199
|
+
expect((await context.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
|
|
203
200
|
const bananaCoin = this.bananaCoin;
|
|
204
201
|
const bananaFPC = await FPCContract.deploy(this.wallet, bananaCoin.address, this.fpcAdmin).send({
|
|
205
202
|
from: this.aliceAddress
|
|
@@ -247,8 +244,8 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
247
244
|
async applySponsoredFPCSetupSnapshot() {
|
|
248
245
|
await this.snapshotManager.snapshot('sponsored_fpc_setup', async (context)=>{
|
|
249
246
|
const feeJuiceContract = this.feeJuiceBridgeTestHarness.feeJuice;
|
|
250
|
-
expect((await context.
|
|
251
|
-
const sponsoredFPC = await setupSponsoredFPC(
|
|
247
|
+
expect((await context.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
|
|
248
|
+
const sponsoredFPC = await setupSponsoredFPC(this.wallet);
|
|
252
249
|
this.logger.info(`SponsoredFPC at ${sponsoredFPC.address}`);
|
|
253
250
|
return {
|
|
254
251
|
sponsoredFPCAddress: sponsoredFPC.address
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AztecAddress, type AztecNode, type Logger, type
|
|
1
|
+
import { AztecAddress, type AztecNode, type Logger, type Wallet } from '@aztec/aztec.js';
|
|
2
2
|
import { ChildContract } from '@aztec/noir-test-contracts.js/Child';
|
|
3
3
|
import { ParentContract } from '@aztec/noir-test-contracts.js/Parent';
|
|
4
4
|
import { type SubsystemsContext } from '../fixtures/snapshot_manager.js';
|
|
@@ -8,7 +8,6 @@ export declare class NestedContractTest {
|
|
|
8
8
|
logger: Logger;
|
|
9
9
|
wallet: Wallet;
|
|
10
10
|
defaultAccountAddress: AztecAddress;
|
|
11
|
-
pxe: PXE;
|
|
12
11
|
aztecNode: AztecNode;
|
|
13
12
|
parentContract: ParentContract;
|
|
14
13
|
childContract: ChildContract;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nested_contract_test.d.ts","sourceRoot":"","sources":["../../src/e2e_nested_contract/nested_contract_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"nested_contract_test.d.ts","sourceRoot":"","sources":["../../src/e2e_nested_contract/nested_contract_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAgB,MAAM,iBAAiB,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,iCAAiC,CAAC;AAIzC,qBAAa,kBAAkB;IAY3B,OAAO,CAAC,gBAAgB;IAX1B,OAAO,CAAC,eAAe,CAAmB;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAG,MAAM,CAAC;IAChB,qBAAqB,EAAG,YAAY,CAAC;IACrC,SAAS,EAAG,SAAS,CAAC;IAEtB,cAAc,EAAG,cAAc,CAAC;IAChC,aAAa,EAAG,aAAa,CAAC;gBAG5B,QAAQ,EAAE,MAAM,EACR,gBAAgB,SAAI;IAM9B;;;;OAIG;IACG,kBAAkB;IAsBlB,KAAK;IAIL,QAAQ;IAId,QAAQ,GAAI,CAAC,EACX,MAAM,MAAM,EACZ,OAAO,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,EACjD,UAAS,CAAC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAA2B,KAChG,OAAO,CAAC,IAAI,CAAC,CAAwD;IAElE,oBAAoB;CAkB3B"}
|
|
@@ -9,7 +9,6 @@ export class NestedContractTest {
|
|
|
9
9
|
logger;
|
|
10
10
|
wallet;
|
|
11
11
|
defaultAccountAddress;
|
|
12
|
-
pxe;
|
|
13
12
|
aztecNode;
|
|
14
13
|
parentContract;
|
|
15
14
|
childContract;
|
|
@@ -24,10 +23,9 @@ export class NestedContractTest {
|
|
|
24
23
|
* 1. Add 3 accounts.
|
|
25
24
|
* 2. Publicly deploy accounts
|
|
26
25
|
*/ async applyBaseSnapshots() {
|
|
27
|
-
await this.snapshotManager.snapshot('accounts', deployAccounts(this.numberOfAccounts, this.logger), ({ deployedAccounts }, {
|
|
26
|
+
await this.snapshotManager.snapshot('accounts', deployAccounts(this.numberOfAccounts, this.logger), ({ deployedAccounts }, { wallet, aztecNode })=>{
|
|
28
27
|
this.wallet = wallet;
|
|
29
28
|
[{ address: this.defaultAccountAddress }] = deployedAccounts;
|
|
30
|
-
this.pxe = pxe;
|
|
31
29
|
this.aztecNode = aztecNode;
|
|
32
30
|
return Promise.resolve();
|
|
33
31
|
});
|
package/dest/e2e_p2p/shared.d.ts
CHANGED
|
@@ -23,11 +23,12 @@ export declare function awaitCommitteeExists({ rollup, logger, }: {
|
|
|
23
23
|
rollup: RollupContract;
|
|
24
24
|
logger: Logger;
|
|
25
25
|
}): Promise<readonly `0x${string}`[]>;
|
|
26
|
-
export declare function awaitOffenseDetected({ logger, nodeAdmin, slashingRoundSize, epochDuration, }: {
|
|
26
|
+
export declare function awaitOffenseDetected({ logger, nodeAdmin, slashingRoundSize, epochDuration, waitUntilOffenseCount, }: {
|
|
27
27
|
nodeAdmin: AztecNodeAdmin;
|
|
28
28
|
logger: Logger;
|
|
29
29
|
slashingRoundSize: number;
|
|
30
30
|
epochDuration: number;
|
|
31
|
+
waitUntilOffenseCount?: number;
|
|
31
32
|
}): Promise<import("@aztec/slasher").Offense[]>;
|
|
32
33
|
/**
|
|
33
34
|
* Await the committee to be slashed out of the validator set.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,YAAY,EAEZ,KAAK,MAAM,EACX,QAAQ,EACR,KAAK,MAAM,EAIZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,8BAA8B,EAAE,cAAc,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,YAAY,EAEZ,KAAK,MAAM,EACX,QAAQ,EACR,KAAK,MAAM,EAIZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,8BAA8B,EAAE,cAAc,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAGrH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY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ACjB,aAAa,EACb,qBAAqB,GACtB,EAAE;IACD,SAAS,EAAE,cAAc,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,+CAkBA;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,MAAM,EACN,UAAU,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,SAAS,EAAE,SAAS,KAAK,MAAM,EAAE,EAAE,CAAC;IACpC,YAAY,EAAE,oBAAoB,CAAC;IACnC,gBAAgB,EAAE,8BAA8B,GAAG,6BAA6B,GAAG,SAAS,CAAC;IAC7F,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,gBAAgB,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB,iBAoEA"}
|
package/dest/e2e_p2p/shared.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Fr, TxStatus, getContractInstanceFromInstantiationParams, retryUntil } from '@aztec/aztec.js';
|
|
2
2
|
import { timesAsync, unique } from '@aztec/foundation/collection';
|
|
3
|
+
import { pluralize } from '@aztec/foundation/string';
|
|
3
4
|
import { TestContract, TestContractArtifact } from '@aztec/noir-test-contracts.js/Test';
|
|
4
5
|
import { createPXEService, getPXEServiceConfig as getRpcConfig } from '@aztec/pxe/server';
|
|
5
6
|
import { getRoundForOffense } from '@aztec/slasher';
|
|
@@ -104,11 +105,12 @@ export async function awaitCommitteeExists({ rollup, logger }) {
|
|
|
104
105
|
}, 'non-empty committee', 60);
|
|
105
106
|
return committee;
|
|
106
107
|
}
|
|
107
|
-
export async function awaitOffenseDetected({ logger, nodeAdmin, slashingRoundSize, epochDuration }) {
|
|
108
|
-
|
|
108
|
+
export async function awaitOffenseDetected({ logger, nodeAdmin, slashingRoundSize, epochDuration, waitUntilOffenseCount }) {
|
|
109
|
+
const targetOffenseCount = waitUntilOffenseCount ?? 1;
|
|
110
|
+
logger.warn(`Waiting for ${pluralize('offense', targetOffenseCount)} to be detected`);
|
|
109
111
|
const offenses = await retryUntil(async ()=>{
|
|
110
112
|
const offenses = await nodeAdmin.getSlashOffenses('all');
|
|
111
|
-
if (offenses.length
|
|
113
|
+
if (offenses.length >= targetOffenseCount) {
|
|
112
114
|
return offenses;
|
|
113
115
|
}
|
|
114
116
|
}, 'non-empty offenses', 60);
|
|
@@ -5,7 +5,6 @@ import { type ClientProtocolCircuitVerifier } from '@aztec/bb-prover';
|
|
|
5
5
|
import type { BlobSinkServer } from '@aztec/blob-sink/server';
|
|
6
6
|
import type { DeployL1ContractsReturnType } from '@aztec/ethereum';
|
|
7
7
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
8
|
-
import type { PXEService } from '@aztec/pxe/server';
|
|
9
8
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
10
9
|
import { TestWallet } from '@aztec/test-wallet';
|
|
11
10
|
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
@@ -31,7 +30,6 @@ export declare class FullProverTest {
|
|
|
31
30
|
tokenSim: TokenSimulator;
|
|
32
31
|
aztecNode: AztecNode;
|
|
33
32
|
aztecNodeAdmin: AztecNodeAdmin;
|
|
34
|
-
pxe: PXEService;
|
|
35
33
|
cheatCodes: CheatCodes;
|
|
36
34
|
blobSink: BlobSinkServer;
|
|
37
35
|
private provenComponents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e2e_prover_test.d.ts","sourceRoot":"","sources":["../../src/fixtures/e2e_prover_test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAA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C;IAChC,QAAQ,EAAG,cAAc,CAAC;IAC1B,SAAS,EAAG,SAAS,CAAC;IACtB,cAAc,EAAG,cAAc,CAAC;IAChC,UAAU,EAAG,UAAU,CAAC;IACxB,QAAQ,EAAG,cAAc,CAAC;IAC1B,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,eAAe,CAAC,CAAsB;IAC9C,OAAO,CAAC,iBAAiB,CAAC,CAAsB;IAChD,oBAAoB,CAAC,EAAE,6BAA6B,CAAC;IACrD,YAAY,EAAE,aAAa,EAAE,CAAM;IACnC,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,mBAAmB,CAAc;IAClC,WAAW,EAAG,2BAA2B,CAAC;IAC1C,aAAa,EAAG,UAAU,CAAC;gBAGhC,QAAQ,EAAE,MAAM,EACR,sBAAsB,EAAE,MAAM,EACtC,QAAQ,EAAE,UAAU,EACZ,UAAU,UAAO;IAa3B;;;;OAIG;IACG,kBAAkB;IAsDlB,KAAK;YA8IG,YAAY;IAS1B,QAAQ,GAAI,CAAC,EACX,MAAM,MAAM,EACZ,OAAO,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,EACjD,UAAS,CAAC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAA2B,KAChG,OAAO,CAAC,IAAI,CAAC,CAAwD;IAElE,QAAQ;IAeR,iBAAiB;CA8CxB"}
|
|
@@ -7,7 +7,6 @@ import { SecretValue } from '@aztec/foundation/config';
|
|
|
7
7
|
import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
8
8
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
9
9
|
import { createProverNode } from '@aztec/prover-node';
|
|
10
|
-
import { TestWallet } from '@aztec/test-wallet';
|
|
11
10
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
12
11
|
import { getContract } from 'viem';
|
|
13
12
|
import { privateKeyToAddress } from 'viem/accounts';
|
|
@@ -15,7 +14,7 @@ import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
|
15
14
|
import { getACVMConfig } from './get_acvm_config.js';
|
|
16
15
|
import { getBBConfig } from './get_bb_config.js';
|
|
17
16
|
import { createSnapshotManager, deployAccounts, publicDeployAccounts } from './snapshot_manager.js';
|
|
18
|
-
import { getPrivateKeyFromIndex, getSponsoredFPCAddress,
|
|
17
|
+
import { getPrivateKeyFromIndex, getSponsoredFPCAddress, setupPXEServiceAndGetWallet } from './utils.js';
|
|
19
18
|
const { E2E_DATA_PATH: dataPath } = process.env;
|
|
20
19
|
/**
|
|
21
20
|
* Largely taken from the e2e_token_contract test file. We deploy 2 accounts and a token contract.
|
|
@@ -37,7 +36,6 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
37
36
|
tokenSim;
|
|
38
37
|
aztecNode;
|
|
39
38
|
aztecNodeAdmin;
|
|
40
|
-
pxe;
|
|
41
39
|
cheatCodes;
|
|
42
40
|
blobSink;
|
|
43
41
|
provenComponents;
|
|
@@ -105,7 +103,7 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
105
103
|
// We don't wish to mark as proven automatically, so we set the flag to false
|
|
106
104
|
this.context.watcher.setIsMarkingAsProven(false);
|
|
107
105
|
this.simulatedProverNode = this.context.proverNode;
|
|
108
|
-
({
|
|
106
|
+
({ aztecNode: this.aztecNode, deployL1ContractsValues: this.l1Contracts, cheatCodes: this.cheatCodes, blobSink: this.blobSink } = this.context);
|
|
109
107
|
this.aztecNodeAdmin = this.context.aztecNode;
|
|
110
108
|
const blobSinkClient = createBlobSinkClient({
|
|
111
109
|
blobSinkUrl: `http://localhost:${this.blobSink.port}`
|
|
@@ -146,22 +144,21 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
146
144
|
await this.context.cheatCodes.rollup.markAsProven();
|
|
147
145
|
this.logger.verbose(`Main setup completed, initializing full prover PXE, Node, and Prover Node`);
|
|
148
146
|
for(let i = 0; i < 2; i++){
|
|
149
|
-
const
|
|
147
|
+
const { wallet: provenWallet, teardown: provenTeardown } = await setupPXEServiceAndGetWallet(this.aztecNode, {
|
|
150
148
|
proverEnabled: this.realProofs,
|
|
151
149
|
bbBinaryPath: bbConfig?.bbBinaryPath,
|
|
152
150
|
bbWorkingDirectory: bbConfig?.bbWorkingDirectory
|
|
153
151
|
}, undefined, true);
|
|
154
152
|
this.logger.debug(`Contract address ${this.fakeProofsAsset.address}`);
|
|
155
|
-
await
|
|
156
|
-
const provenWallet = new TestWallet(result.pxe, this.aztecNode);
|
|
153
|
+
await provenWallet.registerContract(this.fakeProofsAsset);
|
|
157
154
|
for(let i = 0; i < 2; i++){
|
|
158
155
|
await provenWallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
159
156
|
await this.wallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
160
157
|
}
|
|
161
158
|
const asset = await TokenContract.at(this.fakeProofsAsset.address, provenWallet);
|
|
162
159
|
this.provenComponents.push({
|
|
163
|
-
|
|
164
|
-
teardown:
|
|
160
|
+
wallet: provenWallet,
|
|
161
|
+
teardown: provenTeardown
|
|
165
162
|
});
|
|
166
163
|
this.provenAssets.push(asset);
|
|
167
164
|
}
|
|
@@ -6,7 +6,6 @@ import { type BlobSinkServer } from '@aztec/blob-sink/server';
|
|
|
6
6
|
import { type DeployL1ContractsArgs, type DeployL1ContractsReturnType } from '@aztec/ethereum';
|
|
7
7
|
import { TestDateProvider } from '@aztec/foundation/timer';
|
|
8
8
|
import type { ProverNode } from '@aztec/prover-node';
|
|
9
|
-
import { type PXEService } from '@aztec/pxe/server';
|
|
10
9
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
11
10
|
import { TestWallet } from '@aztec/test-wallet';
|
|
12
11
|
import type { Anvil } from '@viem/anvil';
|
|
@@ -17,7 +16,6 @@ export type SubsystemsContext = {
|
|
|
17
16
|
bbConfig: any;
|
|
18
17
|
aztecNode: AztecNodeService;
|
|
19
18
|
aztecNodeConfig: AztecNodeConfig;
|
|
20
|
-
pxe: PXEService;
|
|
21
19
|
wallet: TestWallet;
|
|
22
20
|
deployL1ContractsValues: DeployL1ContractsReturnType;
|
|
23
21
|
proverNode?: ProverNode;
|