@aztec/end-to-end 0.82.3-nightly.20250330 → 0.82.3-nightly.20250403
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 +15 -1
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +51 -6
- package/dest/bench/client_flows/config.d.ts +14 -0
- package/dest/bench/client_flows/config.d.ts.map +1 -0
- package/dest/bench/client_flows/config.js +85 -0
- package/dest/bench/client_flows/data_extractor.js +1 -2
- package/dest/bench/utils.js +2 -2
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +2 -4
- package/dest/e2e_p2p/p2p_network.js +1 -1
- package/dest/fixtures/l1_to_l2_messaging.d.ts +2 -2
- package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
- package/dest/fixtures/l1_to_l2_messaging.js +2 -1
- package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
- package/dest/fixtures/setup_l1_contracts.js +1 -2
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +4 -1
- package/dest/fixtures/utils.d.ts +0 -4
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +216 -238
- package/dest/shared/cross_chain_test_harness.d.ts +1 -1
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +2 -2
- package/dest/shared/uniswap_l1_l2.js +8 -6
- package/package.json +32 -32
- package/src/bench/client_flows/client_flows_benchmark.ts +69 -5
- package/src/bench/client_flows/config.ts +53 -0
- package/src/bench/client_flows/data_extractor.ts +2 -2
- package/src/bench/utils.ts +2 -2
- package/src/e2e_fees/fees_test.ts +1 -4
- package/src/e2e_p2p/p2p_network.ts +1 -1
- package/src/fixtures/l1_to_l2_messaging.ts +12 -3
- package/src/fixtures/setup_l1_contracts.ts +1 -2
- package/src/fixtures/snapshot_manager.ts +4 -1
- package/src/fixtures/utils.ts +235 -261
- package/src/shared/cross_chain_test_harness.ts +2 -2
- package/src/shared/uniswap_l1_l2.ts +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "0.82.3-nightly.
|
|
3
|
+
"version": "0.82.3-nightly.20250403",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -26,37 +26,37 @@
|
|
|
26
26
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@aztec/accounts": "0.82.3-nightly.
|
|
30
|
-
"@aztec/archiver": "0.82.3-nightly.
|
|
31
|
-
"@aztec/aztec": "0.82.3-nightly.
|
|
32
|
-
"@aztec/aztec-node": "0.82.3-nightly.
|
|
33
|
-
"@aztec/aztec.js": "0.82.3-nightly.
|
|
34
|
-
"@aztec/bb-prover": "0.82.3-nightly.
|
|
35
|
-
"@aztec/blob-lib": "0.82.3-nightly.
|
|
36
|
-
"@aztec/blob-sink": "0.82.3-nightly.
|
|
37
|
-
"@aztec/bot": "0.82.3-nightly.
|
|
38
|
-
"@aztec/constants": "0.82.3-nightly.
|
|
39
|
-
"@aztec/entrypoints": "0.82.3-nightly.
|
|
40
|
-
"@aztec/epoch-cache": "0.82.3-nightly.
|
|
41
|
-
"@aztec/ethereum": "0.82.3-nightly.
|
|
42
|
-
"@aztec/foundation": "0.82.3-nightly.
|
|
43
|
-
"@aztec/kv-store": "0.82.3-nightly.
|
|
44
|
-
"@aztec/l1-artifacts": "0.82.3-nightly.
|
|
45
|
-
"@aztec/merkle-tree": "0.82.3-nightly.
|
|
46
|
-
"@aztec/noir-contracts.js": "0.82.3-nightly.
|
|
47
|
-
"@aztec/noir-noirc_abi": "0.82.3-nightly.
|
|
48
|
-
"@aztec/noir-protocol-circuits-types": "0.82.3-nightly.
|
|
49
|
-
"@aztec/p2p": "0.82.3-nightly.
|
|
50
|
-
"@aztec/protocol-contracts": "0.82.3-nightly.
|
|
51
|
-
"@aztec/prover-client": "0.82.3-nightly.
|
|
52
|
-
"@aztec/prover-node": "0.82.3-nightly.
|
|
53
|
-
"@aztec/pxe": "0.82.3-nightly.
|
|
54
|
-
"@aztec/sequencer-client": "0.82.3-nightly.
|
|
55
|
-
"@aztec/simulator": "0.82.3-nightly.
|
|
56
|
-
"@aztec/stdlib": "0.82.3-nightly.
|
|
57
|
-
"@aztec/telemetry-client": "0.82.3-nightly.
|
|
58
|
-
"@aztec/validator-client": "0.82.3-nightly.
|
|
59
|
-
"@aztec/world-state": "0.82.3-nightly.
|
|
29
|
+
"@aztec/accounts": "0.82.3-nightly.20250403",
|
|
30
|
+
"@aztec/archiver": "0.82.3-nightly.20250403",
|
|
31
|
+
"@aztec/aztec": "0.82.3-nightly.20250403",
|
|
32
|
+
"@aztec/aztec-node": "0.82.3-nightly.20250403",
|
|
33
|
+
"@aztec/aztec.js": "0.82.3-nightly.20250403",
|
|
34
|
+
"@aztec/bb-prover": "0.82.3-nightly.20250403",
|
|
35
|
+
"@aztec/blob-lib": "0.82.3-nightly.20250403",
|
|
36
|
+
"@aztec/blob-sink": "0.82.3-nightly.20250403",
|
|
37
|
+
"@aztec/bot": "0.82.3-nightly.20250403",
|
|
38
|
+
"@aztec/constants": "0.82.3-nightly.20250403",
|
|
39
|
+
"@aztec/entrypoints": "0.82.3-nightly.20250403",
|
|
40
|
+
"@aztec/epoch-cache": "0.82.3-nightly.20250403",
|
|
41
|
+
"@aztec/ethereum": "0.82.3-nightly.20250403",
|
|
42
|
+
"@aztec/foundation": "0.82.3-nightly.20250403",
|
|
43
|
+
"@aztec/kv-store": "0.82.3-nightly.20250403",
|
|
44
|
+
"@aztec/l1-artifacts": "0.82.3-nightly.20250403",
|
|
45
|
+
"@aztec/merkle-tree": "0.82.3-nightly.20250403",
|
|
46
|
+
"@aztec/noir-contracts.js": "0.82.3-nightly.20250403",
|
|
47
|
+
"@aztec/noir-noirc_abi": "0.82.3-nightly.20250403",
|
|
48
|
+
"@aztec/noir-protocol-circuits-types": "0.82.3-nightly.20250403",
|
|
49
|
+
"@aztec/p2p": "0.82.3-nightly.20250403",
|
|
50
|
+
"@aztec/protocol-contracts": "0.82.3-nightly.20250403",
|
|
51
|
+
"@aztec/prover-client": "0.82.3-nightly.20250403",
|
|
52
|
+
"@aztec/prover-node": "0.82.3-nightly.20250403",
|
|
53
|
+
"@aztec/pxe": "0.82.3-nightly.20250403",
|
|
54
|
+
"@aztec/sequencer-client": "0.82.3-nightly.20250403",
|
|
55
|
+
"@aztec/simulator": "0.82.3-nightly.20250403",
|
|
56
|
+
"@aztec/stdlib": "0.82.3-nightly.20250403",
|
|
57
|
+
"@aztec/telemetry-client": "0.82.3-nightly.20250403",
|
|
58
|
+
"@aztec/validator-client": "0.82.3-nightly.20250403",
|
|
59
|
+
"@aztec/world-state": "0.82.3-nightly.20250403",
|
|
60
60
|
"@iarna/toml": "^2.2.5",
|
|
61
61
|
"@jest/globals": "^29.5.0",
|
|
62
62
|
"@msgpack/msgpack": "^3.0.0-beta2",
|
|
@@ -5,8 +5,12 @@ import {
|
|
|
5
5
|
AztecAddress,
|
|
6
6
|
type AztecNode,
|
|
7
7
|
FeeJuicePaymentMethodWithClaim,
|
|
8
|
+
type FeePaymentMethod,
|
|
8
9
|
type Logger,
|
|
9
10
|
type PXE,
|
|
11
|
+
PrivateFeePaymentMethod,
|
|
12
|
+
SponsoredFeePaymentMethod,
|
|
13
|
+
type Wallet,
|
|
10
14
|
createLogger,
|
|
11
15
|
} from '@aztec/aztec.js';
|
|
12
16
|
import { CheatCodes } from '@aztec/aztec.js/testing';
|
|
@@ -21,6 +25,7 @@ import { TestERC20Bytecode } from '@aztec/l1-artifacts/TestERC20Bytecode';
|
|
|
21
25
|
import { AMMContract } from '@aztec/noir-contracts.js/AMM';
|
|
22
26
|
import { FPCContract } from '@aztec/noir-contracts.js/FPC';
|
|
23
27
|
import { FeeJuiceContract } from '@aztec/noir-contracts.js/FeeJuice';
|
|
28
|
+
import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
|
|
24
29
|
import { TokenContract as BananaCoin, TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
25
30
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
26
31
|
import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice';
|
|
@@ -35,16 +40,19 @@ import {
|
|
|
35
40
|
deployAccounts,
|
|
36
41
|
} from '../../fixtures/snapshot_manager.js';
|
|
37
42
|
import { mintTokensToPrivate } from '../../fixtures/token_utils.js';
|
|
38
|
-
import { type SetupOptions,
|
|
43
|
+
import { type SetupOptions, setupSponsoredFPC } from '../../fixtures/utils.js';
|
|
39
44
|
import { CrossChainTestHarness } from '../../shared/cross_chain_test_harness.js';
|
|
40
45
|
import {
|
|
41
46
|
FeeJuicePortalTestingHarnessFactory,
|
|
42
47
|
type GasBridgingTestHarness,
|
|
43
48
|
} from '../../shared/gas_portal_test_harness.js';
|
|
49
|
+
import { type ClientFlowsConfig, FULL_FLOWS_CONFIG, KEY_FLOWS_CONFIG } from './config.js';
|
|
44
50
|
|
|
45
|
-
const { E2E_DATA_PATH: dataPath } = process.env;
|
|
51
|
+
const { E2E_DATA_PATH: dataPath, BENCHMARK_CONFIG } = process.env;
|
|
46
52
|
|
|
47
53
|
export type AccountType = 'ecdsar1' | 'schnorr';
|
|
54
|
+
export type FeePaymentMethodGetter = (wallet: Wallet) => Promise<FeePaymentMethod>;
|
|
55
|
+
export type BenchmarkingFeePaymentMethod = 'bridged_fee_juice' | 'private_fpc' | 'sponsored_fpc';
|
|
48
56
|
|
|
49
57
|
export class ClientFlowsBenchmark {
|
|
50
58
|
private snapshotManager: ISnapshotManager;
|
|
@@ -76,10 +84,37 @@ export class ClientFlowsBenchmark {
|
|
|
76
84
|
public amm!: AMMContract;
|
|
77
85
|
// Liquidity token for AMM
|
|
78
86
|
public liquidityToken!: TokenContract;
|
|
87
|
+
// Sponsored FPC contract
|
|
88
|
+
public sponsoredFPC!: SponsoredFPCContract;
|
|
79
89
|
|
|
80
90
|
// PXE used by the benchmarking user. It can be set up with client-side proving enabled
|
|
81
91
|
public userPXE!: PXE;
|
|
82
92
|
|
|
93
|
+
public paymentMethods: Record<BenchmarkingFeePaymentMethod, { forWallet: FeePaymentMethodGetter; circuits: number }> =
|
|
94
|
+
{
|
|
95
|
+
// eslint-disable-next-line camelcase
|
|
96
|
+
bridged_fee_juice: {
|
|
97
|
+
forWallet: this.getBridgedFeeJuicePaymentMethodForWallet.bind(this),
|
|
98
|
+
circuits: 2, // FeeJuice claim + kernel inner
|
|
99
|
+
},
|
|
100
|
+
// eslint-disable-next-line camelcase
|
|
101
|
+
private_fpc: {
|
|
102
|
+
forWallet: this.getPrivateFPCPaymentMethodForWallet.bind(this),
|
|
103
|
+
circuits:
|
|
104
|
+
2 + // FPC entrypoint + kernel inner
|
|
105
|
+
2 + // BananaCoin transfer_to_public + kernel inner
|
|
106
|
+
2 + // Account verify_private_authwit + kernel inner
|
|
107
|
+
2, // BananaCoin prepare_private_balance_increase + kernel inner
|
|
108
|
+
},
|
|
109
|
+
// eslint-disable-next-line camelcase
|
|
110
|
+
sponsored_fpc: {
|
|
111
|
+
forWallet: this.getSponsoredFPCPaymentMethodForWallet.bind(this),
|
|
112
|
+
circuits: 2, // Sponsored FPC sponsor_unconditionally + kernel inner
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
public config: ClientFlowsConfig;
|
|
117
|
+
|
|
83
118
|
constructor(testName?: string, setupOptions: Partial<SetupOptions & DeployL1ContractsArgs> = {}) {
|
|
84
119
|
this.logger = createLogger(`bench:client_flows${testName ? `:${testName}` : ''}`);
|
|
85
120
|
this.snapshotManager = createSnapshotManager(
|
|
@@ -88,6 +123,7 @@ export class ClientFlowsBenchmark {
|
|
|
88
123
|
{ startProverNode: true, ...setupOptions },
|
|
89
124
|
{ ...setupOptions },
|
|
90
125
|
);
|
|
126
|
+
this.config = BENCHMARK_CONFIG === 'key_flows' ? KEY_FLOWS_CONFIG : FULL_FLOWS_CONFIG;
|
|
91
127
|
}
|
|
92
128
|
|
|
93
129
|
async setup() {
|
|
@@ -182,9 +218,7 @@ export class ClientFlowsBenchmark {
|
|
|
182
218
|
async applySetupFeeJuiceSnapshot() {
|
|
183
219
|
await this.snapshotManager.snapshot(
|
|
184
220
|
'setup_fee_juice',
|
|
185
|
-
async
|
|
186
|
-
await setupCanonicalFeeJuice(context.pxe);
|
|
187
|
-
},
|
|
221
|
+
async () => {},
|
|
188
222
|
async (_data, context) => {
|
|
189
223
|
this.context = context;
|
|
190
224
|
|
|
@@ -259,6 +293,20 @@ export class ClientFlowsBenchmark {
|
|
|
259
293
|
);
|
|
260
294
|
}
|
|
261
295
|
|
|
296
|
+
async applyDeploySponsoredFPCSnapshot() {
|
|
297
|
+
await this.snapshotManager.snapshot(
|
|
298
|
+
'deploy_sponsored_fpc',
|
|
299
|
+
async () => {
|
|
300
|
+
const sponsoredFPC = await setupSponsoredFPC(this.pxe);
|
|
301
|
+
this.logger.info(`SponsoredFPC deployed at ${sponsoredFPC.address}`);
|
|
302
|
+
return { sponsoredFPCAddress: sponsoredFPC.address };
|
|
303
|
+
},
|
|
304
|
+
async ({ sponsoredFPCAddress }) => {
|
|
305
|
+
this.sponsoredFPC = await SponsoredFPCContract.at(sponsoredFPCAddress, this.adminWallet);
|
|
306
|
+
},
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
262
310
|
public async createCrossChainTestHarness(owner: AccountWallet) {
|
|
263
311
|
const { publicClient, walletClient } = createL1Clients(this.context.aztecNodeConfig.l1RpcUrls, MNEMONIC);
|
|
264
312
|
|
|
@@ -328,4 +376,20 @@ export class ClientFlowsBenchmark {
|
|
|
328
376
|
},
|
|
329
377
|
);
|
|
330
378
|
}
|
|
379
|
+
|
|
380
|
+
public async getBridgedFeeJuicePaymentMethodForWallet(wallet: Wallet) {
|
|
381
|
+
const claim = await this.feeJuiceBridgeTestHarness.prepareTokensOnL1(
|
|
382
|
+
FEE_FUNDING_FOR_TESTER_ACCOUNT,
|
|
383
|
+
wallet.getAddress(),
|
|
384
|
+
);
|
|
385
|
+
return new FeeJuicePaymentMethodWithClaim(wallet, claim);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
public getPrivateFPCPaymentMethodForWallet(wallet: Wallet) {
|
|
389
|
+
return Promise.resolve(new PrivateFeePaymentMethod(this.bananaFPC.address, wallet));
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
public getSponsoredFPCPaymentMethodForWallet(_wallet: Wallet) {
|
|
393
|
+
return Promise.resolve(new SponsoredFeePaymentMethod(this.sponsoredFPC.address));
|
|
394
|
+
}
|
|
331
395
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { AccountType, BenchmarkingFeePaymentMethod } from './client_flows_benchmark.js';
|
|
2
|
+
|
|
3
|
+
export type ClientFlowConfig = {
|
|
4
|
+
accounts: AccountType[];
|
|
5
|
+
feePaymentMethods: BenchmarkingFeePaymentMethod[];
|
|
6
|
+
recursions?: number[];
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type ClientFlows = 'deployments' | 'transfers' | 'bridging' | 'amm';
|
|
10
|
+
|
|
11
|
+
export type ClientFlowsConfig = {
|
|
12
|
+
[key in ClientFlows]: ClientFlowConfig;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const KEY_FLOWS_CONFIG: ClientFlowsConfig = {
|
|
16
|
+
deployments: {
|
|
17
|
+
accounts: ['ecdsar1', 'schnorr'],
|
|
18
|
+
feePaymentMethods: ['sponsored_fpc'],
|
|
19
|
+
},
|
|
20
|
+
amm: {
|
|
21
|
+
accounts: ['ecdsar1'],
|
|
22
|
+
feePaymentMethods: ['sponsored_fpc'],
|
|
23
|
+
},
|
|
24
|
+
bridging: {
|
|
25
|
+
accounts: ['ecdsar1'],
|
|
26
|
+
feePaymentMethods: ['sponsored_fpc'],
|
|
27
|
+
},
|
|
28
|
+
transfers: {
|
|
29
|
+
accounts: ['ecdsar1'],
|
|
30
|
+
feePaymentMethods: ['sponsored_fpc'],
|
|
31
|
+
recursions: [1],
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const FULL_FLOWS_CONFIG: ClientFlowsConfig = {
|
|
36
|
+
deployments: {
|
|
37
|
+
accounts: ['ecdsar1', 'schnorr'],
|
|
38
|
+
feePaymentMethods: ['bridged_fee_juice', 'sponsored_fpc'],
|
|
39
|
+
},
|
|
40
|
+
amm: {
|
|
41
|
+
accounts: ['ecdsar1', 'schnorr'],
|
|
42
|
+
feePaymentMethods: ['sponsored_fpc', 'private_fpc'],
|
|
43
|
+
},
|
|
44
|
+
bridging: {
|
|
45
|
+
accounts: ['ecdsar1', 'schnorr'],
|
|
46
|
+
feePaymentMethods: ['sponsored_fpc', 'private_fpc'],
|
|
47
|
+
},
|
|
48
|
+
transfers: {
|
|
49
|
+
accounts: ['ecdsar1', 'schnorr'],
|
|
50
|
+
feePaymentMethods: ['sponsored_fpc', 'private_fpc'],
|
|
51
|
+
recursions: [0, 1, 2],
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -163,7 +163,6 @@ async function main() {
|
|
|
163
163
|
bytecode: acirStack[i],
|
|
164
164
|
witness: witnessStack[i],
|
|
165
165
|
}));
|
|
166
|
-
let minimumTrace: StructuredTrace | undefined;
|
|
167
166
|
let stats: { duration: number; eventName: string; proofSize: number } | undefined;
|
|
168
167
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
169
168
|
let error: any | undefined;
|
|
@@ -179,10 +178,11 @@ async function main() {
|
|
|
179
178
|
await writeFile(join(ivcFolder, flow, 'logs.json'), JSON.stringify(currentLogs, null, 2));
|
|
180
179
|
|
|
181
180
|
if (!error) {
|
|
182
|
-
minimumTrace = getMinimumTrace(currentLogs, proverType);
|
|
183
181
|
stats = currentLogs[0].data as { duration: number; eventName: string; proofSize: number };
|
|
184
182
|
}
|
|
185
183
|
|
|
184
|
+
const minimumTrace = getMinimumTrace(currentLogs, proverType);
|
|
185
|
+
|
|
186
186
|
const steps = executionSteps.reduce<Step[]>((acc, step, i) => {
|
|
187
187
|
const previousAccGateCount = i === 0 ? 0 : acc[i - 1].accGateCount!;
|
|
188
188
|
return [
|
package/src/bench/utils.ts
CHANGED
|
@@ -160,7 +160,7 @@ export async function createNewPXE(
|
|
|
160
160
|
startingBlock: number = INITIAL_L2_BLOCK_NUM,
|
|
161
161
|
): Promise<PXEService> {
|
|
162
162
|
const l1Contracts = await node.getL1ContractAddresses();
|
|
163
|
-
const { l1ChainId,
|
|
163
|
+
const { l1ChainId, rollupVersion } = await node.getNodeInfo();
|
|
164
164
|
const pxeConfig = {
|
|
165
165
|
l2StartingBlock: startingBlock,
|
|
166
166
|
l2BlockPollingIntervalMS: 100,
|
|
@@ -168,7 +168,7 @@ export async function createNewPXE(
|
|
|
168
168
|
dataStoreMapSizeKB: 1024 * 1024,
|
|
169
169
|
l1Contracts,
|
|
170
170
|
l1ChainId,
|
|
171
|
-
|
|
171
|
+
rollupVersion,
|
|
172
172
|
} as PXEServiceConfig;
|
|
173
173
|
const pxe = await createPXEService(node, pxeConfig);
|
|
174
174
|
await pxe.registerContract(contract);
|
|
@@ -39,7 +39,6 @@ import {
|
|
|
39
39
|
type SetupOptions,
|
|
40
40
|
ensureAccountsPubliclyDeployed,
|
|
41
41
|
getBalancesFn,
|
|
42
|
-
setupCanonicalFeeJuice,
|
|
43
42
|
setupSponsoredFPC,
|
|
44
43
|
} from '../fixtures/utils.js';
|
|
45
44
|
import { FeeJuicePortalTestingHarnessFactory, type GasBridgingTestHarness } from '../shared/gas_portal_test_harness.js';
|
|
@@ -198,9 +197,7 @@ export class FeesTest {
|
|
|
198
197
|
async applySetupFeeJuiceSnapshot() {
|
|
199
198
|
await this.snapshotManager.snapshot(
|
|
200
199
|
'setup_fee_juice',
|
|
201
|
-
async
|
|
202
|
-
await setupCanonicalFeeJuice(context.pxe);
|
|
203
|
-
},
|
|
200
|
+
async () => {},
|
|
204
201
|
async (_data, context) => {
|
|
205
202
|
this.context = context;
|
|
206
203
|
|
|
@@ -97,7 +97,7 @@ export class P2PNetworkTest {
|
|
|
97
97
|
initialValidatorConfig.aztecProofSubmissionWindow ?? l1ContractsConfig.aztecProofSubmissionWindow,
|
|
98
98
|
salt: 420,
|
|
99
99
|
metricsPort: metricsPort,
|
|
100
|
-
numberOfInitialFundedAccounts:
|
|
100
|
+
numberOfInitialFundedAccounts: 2,
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
aztecEpochDuration: initialValidatorConfig.aztecEpochDuration ?? l1ContractsConfig.aztecEpochDuration,
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
type L1ContractAddresses,
|
|
3
|
+
RollupContract,
|
|
4
|
+
type ViemPublicClient,
|
|
5
|
+
type ViemWalletClient,
|
|
6
|
+
} from '@aztec/ethereum';
|
|
2
7
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
8
|
import { InboxAbi } from '@aztec/l1-artifacts';
|
|
4
9
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
@@ -11,7 +16,7 @@ export async function sendL1ToL2Message(
|
|
|
11
16
|
ctx: {
|
|
12
17
|
walletClient: ViemWalletClient;
|
|
13
18
|
publicClient: ViemPublicClient;
|
|
14
|
-
l1ContractAddresses: Pick<L1ContractAddresses, 'inboxAddress'>;
|
|
19
|
+
l1ContractAddresses: Pick<L1ContractAddresses, 'inboxAddress' | 'rollupAddress'>;
|
|
15
20
|
},
|
|
16
21
|
) {
|
|
17
22
|
const inbox = getContract({
|
|
@@ -21,7 +26,11 @@ export async function sendL1ToL2Message(
|
|
|
21
26
|
});
|
|
22
27
|
|
|
23
28
|
const { recipient, content, secretHash } = message;
|
|
24
|
-
|
|
29
|
+
|
|
30
|
+
const version = await new RollupContract(
|
|
31
|
+
ctx.publicClient,
|
|
32
|
+
ctx.l1ContractAddresses.rollupAddress.toString(),
|
|
33
|
+
).getVersion();
|
|
25
34
|
|
|
26
35
|
// We inject the message to Inbox
|
|
27
36
|
const txHash = await inbox.write.sendL2Message([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/aztec.js';
|
|
2
2
|
import { type DeployL1ContractsArgs, type L1ContractsConfig, deployL1Contracts } from '@aztec/ethereum';
|
|
3
3
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
4
|
-
import {
|
|
4
|
+
import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
5
5
|
|
|
6
6
|
import type { HDAccount, PrivateKeyAccount } from 'viem';
|
|
7
7
|
import { foundry } from 'viem/chains';
|
|
@@ -16,7 +16,6 @@ export const setupL1Contracts = async (
|
|
|
16
16
|
L1ContractsConfig,
|
|
17
17
|
) => {
|
|
18
18
|
const l1Data = await deployL1Contracts([l1RpcUrl], account, foundry, logger, {
|
|
19
|
-
l2FeeJuiceAddress: ProtocolContractAddress.FeeJuice.toField(),
|
|
20
19
|
vkTreeRoot: getVKTreeRoot(),
|
|
21
20
|
protocolContractTreeRoot,
|
|
22
21
|
salt: undefined,
|
|
@@ -308,6 +308,8 @@ async function setupFromFresh(
|
|
|
308
308
|
aztecNodeConfig.peerCheckIntervalMS = TEST_PEER_CHECK_INTERVAL_MS;
|
|
309
309
|
// Only enable proving if specifically requested.
|
|
310
310
|
aztecNodeConfig.realProofs = !!opts.realProofs;
|
|
311
|
+
// Only enforce the time table if requested
|
|
312
|
+
aztecNodeConfig.enforceTimeTable = !!opts.enforceTimeTable;
|
|
311
313
|
aztecNodeConfig.listenAddress = '127.0.0.1';
|
|
312
314
|
|
|
313
315
|
// Create a temp directory for all ephemeral state and cleanup afterwards
|
|
@@ -346,7 +348,7 @@ async function setupFromFresh(
|
|
|
346
348
|
|
|
347
349
|
const initialFundedAccounts = await generateSchnorrAccounts(numberOfInitialFundedAccounts);
|
|
348
350
|
const sponsoredFPCAddress = await getSponsoredFPCAddress();
|
|
349
|
-
const { genesisArchiveRoot, genesisBlockHash, prefilledPublicData } = await getGenesisValues(
|
|
351
|
+
const { genesisArchiveRoot, genesisBlockHash, prefilledPublicData, fundingNeeded } = await getGenesisValues(
|
|
350
352
|
initialFundedAccounts.map(a => a.address).concat(sponsoredFPCAddress),
|
|
351
353
|
opts.initialAccountFeeJuice,
|
|
352
354
|
);
|
|
@@ -355,6 +357,7 @@ async function setupFromFresh(
|
|
|
355
357
|
...getL1ContractsConfigEnvVars(),
|
|
356
358
|
genesisArchiveRoot,
|
|
357
359
|
genesisBlockHash,
|
|
360
|
+
feeJuicePortalInitialBalance: fundingNeeded,
|
|
358
361
|
salt: opts.salt,
|
|
359
362
|
...deployL1ContractsArgs,
|
|
360
363
|
initialValidators: opts.initialValidators,
|