@aztec/end-to-end 0.0.1-commit.b655e406 → 0.0.1-commit.c7c42ec
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/client_flows_benchmark.d.ts +10 -3
- 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 +5 -27
- package/dest/bench/utils.d.ts +3 -3
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +10 -6
- 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 +5 -4
- 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 +11 -9
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +17 -14
- 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 +8 -4
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +16 -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 +4 -3
- package/dest/e2e_p2p/p2p_network.d.ts +219 -13
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +15 -11
- 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 +5 -5
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +23 -22
- package/dest/fixtures/fixtures.d.ts +2 -3
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +2 -3
- 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_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 +6 -8
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +34 -46
- 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 +21 -19
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +56 -85
- 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 +4 -3
- 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 +55 -20
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +203 -60
- package/package.json +42 -40
- package/src/bench/client_flows/client_flows_benchmark.ts +82 -34
- package/src/bench/client_flows/data_extractor.ts +6 -28
- package/src/bench/utils.ts +11 -7
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +2 -2
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +17 -12
- package/src/e2e_deploy_contract/deploy_test.ts +1 -1
- package/src/e2e_epochs/epochs_test.ts +37 -23
- package/src/e2e_fees/bridging_race.notest.ts +2 -2
- package/src/e2e_fees/fees_test.ts +22 -13
- 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 +5 -4
- package/src/e2e_p2p/p2p_network.ts +16 -19
- 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 +22 -25
- package/src/fixtures/fixtures.ts +2 -5
- package/src/fixtures/get_acvm_config.ts +1 -1
- package/src/fixtures/l1_to_l2_messaging.ts +4 -2
- package/src/fixtures/setup_p2p_test.ts +23 -9
- package/src/fixtures/snapshot_manager.ts +51 -65
- package/src/fixtures/token_utils.ts +4 -4
- package/src/fixtures/utils.ts +91 -131
- 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 +19 -21
- 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 +267 -51
- package/dest/fixtures/setup_l1_contracts.d.ts +0 -6
- package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
- package/dest/fixtures/setup_l1_contracts.js +0 -17
- package/src/fixtures/setup_l1_contracts.ts +0 -26
|
@@ -2,8 +2,11 @@ import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
|
2
2
|
import { type Logger, createLogger } from '@aztec/aztec.js/log';
|
|
3
3
|
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
4
4
|
import { CheatCodes } from '@aztec/aztec/testing';
|
|
5
|
-
import {
|
|
5
|
+
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
6
|
+
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
7
|
+
import type { DeployAztecL1ContractsArgs } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
6
8
|
import { ChainMonitor } from '@aztec/ethereum/test';
|
|
9
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
7
10
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
8
11
|
import { sleep } from '@aztec/foundation/sleep';
|
|
9
12
|
import { TestERC20Abi } from '@aztec/l1-artifacts';
|
|
@@ -16,6 +19,7 @@ import { CounterContract } from '@aztec/noir-test-contracts.js/Counter';
|
|
|
16
19
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
17
20
|
import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice';
|
|
18
21
|
import { GasSettings } from '@aztec/stdlib/gas';
|
|
22
|
+
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
19
23
|
import { TestWallet } from '@aztec/test-wallet/server';
|
|
20
24
|
|
|
21
25
|
import { getContract } from 'viem';
|
|
@@ -55,6 +59,7 @@ export class FeesTest {
|
|
|
55
59
|
|
|
56
60
|
public logger: Logger;
|
|
57
61
|
public aztecNode!: AztecNode;
|
|
62
|
+
public aztecNodeAdmin!: AztecNodeAdmin;
|
|
58
63
|
public cheatCodes!: CheatCodes;
|
|
59
64
|
|
|
60
65
|
public wallet!: TestWallet;
|
|
@@ -85,7 +90,7 @@ export class FeesTest {
|
|
|
85
90
|
public getGasBalanceFn!: BalancesFn;
|
|
86
91
|
public getBananaPublicBalanceFn!: BalancesFn;
|
|
87
92
|
public getBananaPrivateBalanceFn!: BalancesFn;
|
|
88
|
-
public getProverFee!: (blockNumber:
|
|
93
|
+
public getProverFee!: (blockNumber: BlockNumber) => Promise<bigint>;
|
|
89
94
|
|
|
90
95
|
public readonly ALICE_INITIAL_BANANAS = BigInt(1e22);
|
|
91
96
|
public readonly SUBSCRIPTION_AMOUNT = BigInt(1e19);
|
|
@@ -94,7 +99,7 @@ export class FeesTest {
|
|
|
94
99
|
constructor(
|
|
95
100
|
testName: string,
|
|
96
101
|
private numberOfAccounts = 3,
|
|
97
|
-
setupOptions: Partial<SetupOptions &
|
|
102
|
+
setupOptions: Partial<SetupOptions & DeployAztecL1ContractsArgs> = {},
|
|
98
103
|
) {
|
|
99
104
|
if (!numberOfAccounts) {
|
|
100
105
|
throw new Error('There must be at least 1 initial account.');
|
|
@@ -136,7 +141,7 @@ export class FeesTest {
|
|
|
136
141
|
}
|
|
137
142
|
|
|
138
143
|
async getBlockRewards() {
|
|
139
|
-
const blockReward = await this.rollupContract.
|
|
144
|
+
const blockReward = await this.rollupContract.getCheckpointReward();
|
|
140
145
|
const rewardConfig = await this.rollupContract.getRewardConfig();
|
|
141
146
|
|
|
142
147
|
const balance = await this.feeJuiceBridgeTestHarness.getL1FeeJuiceBalance(
|
|
@@ -187,6 +192,7 @@ export class FeesTest {
|
|
|
187
192
|
async ({ deployedAccounts }, { wallet, aztecNode, cheatCodes }) => {
|
|
188
193
|
this.wallet = wallet;
|
|
189
194
|
this.aztecNode = aztecNode;
|
|
195
|
+
this.aztecNodeAdmin = aztecNode;
|
|
190
196
|
this.gasSettings = GasSettings.default({ maxFeesPerGas: (await this.aztecNode.getCurrentBaseFees()).mul(2) });
|
|
191
197
|
this.cheatCodes = cheatCodes;
|
|
192
198
|
this.accounts = deployedAccounts.map(a => a.address);
|
|
@@ -197,7 +203,7 @@ export class FeesTest {
|
|
|
197
203
|
this.fpcAdmin = this.aliceAddress;
|
|
198
204
|
|
|
199
205
|
const canonicalFeeJuice = await getCanonicalFeeJuice();
|
|
200
|
-
this.feeJuiceContract =
|
|
206
|
+
this.feeJuiceContract = FeeJuiceContract.at(canonicalFeeJuice.address, this.wallet);
|
|
201
207
|
},
|
|
202
208
|
);
|
|
203
209
|
}
|
|
@@ -215,7 +221,7 @@ export class FeesTest {
|
|
|
215
221
|
async (_data, context) => {
|
|
216
222
|
this.context = context;
|
|
217
223
|
|
|
218
|
-
this.feeJuiceContract =
|
|
224
|
+
this.feeJuiceContract = FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, this.wallet);
|
|
219
225
|
|
|
220
226
|
this.getGasBalanceFn = getBalancesFn(
|
|
221
227
|
'⛽',
|
|
@@ -245,8 +251,8 @@ export class FeesTest {
|
|
|
245
251
|
this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
|
|
246
252
|
return { bananaCoinAddress: bananaCoin.address };
|
|
247
253
|
},
|
|
248
|
-
|
|
249
|
-
this.bananaCoin =
|
|
254
|
+
({ bananaCoinAddress }) => {
|
|
255
|
+
this.bananaCoin = BananaCoin.at(bananaCoinAddress, this.wallet);
|
|
250
256
|
const logger = this.logger;
|
|
251
257
|
this.getBananaPublicBalanceFn = getBalancesFn(
|
|
252
258
|
'🍌.public',
|
|
@@ -260,6 +266,7 @@ export class FeesTest {
|
|
|
260
266
|
this.aliceAddress,
|
|
261
267
|
logger,
|
|
262
268
|
);
|
|
269
|
+
return Promise.resolve();
|
|
263
270
|
},
|
|
264
271
|
);
|
|
265
272
|
}
|
|
@@ -287,8 +294,8 @@ export class FeesTest {
|
|
|
287
294
|
rollupAddress: context.deployL1ContractsValues.l1ContractAddresses.rollupAddress,
|
|
288
295
|
};
|
|
289
296
|
},
|
|
290
|
-
|
|
291
|
-
const bananaFPC =
|
|
297
|
+
(data, context) => {
|
|
298
|
+
const bananaFPC = FPCContract.at(data.bananaFPCAddress, this.wallet);
|
|
292
299
|
this.bananaFPC = bananaFPC;
|
|
293
300
|
|
|
294
301
|
this.getCoinbaseBalance = async () => {
|
|
@@ -305,7 +312,7 @@ export class FeesTest {
|
|
|
305
312
|
return await this.rollupContract.getSequencerRewards(this.coinbase);
|
|
306
313
|
};
|
|
307
314
|
|
|
308
|
-
this.getProverFee = async (blockNumber:
|
|
315
|
+
this.getProverFee = async (blockNumber: BlockNumber) => {
|
|
309
316
|
const block = await this.aztecNode.getBlock(blockNumber);
|
|
310
317
|
|
|
311
318
|
// @todo @lherskind As we deal with #13601
|
|
@@ -328,6 +335,7 @@ export class FeesTest {
|
|
|
328
335
|
const mana = block!.header.totalManaUsed.toBigInt();
|
|
329
336
|
return mulDiv(mana * proverCost, price, 10n ** 9n);
|
|
330
337
|
};
|
|
338
|
+
return Promise.resolve();
|
|
331
339
|
},
|
|
332
340
|
);
|
|
333
341
|
}
|
|
@@ -346,8 +354,9 @@ export class FeesTest {
|
|
|
346
354
|
sponsoredFPCAddress: sponsoredFPC.address,
|
|
347
355
|
};
|
|
348
356
|
},
|
|
349
|
-
|
|
350
|
-
this.sponsoredFPC =
|
|
357
|
+
data => {
|
|
358
|
+
this.sponsoredFPC = SponsoredFPCContract.at(data.sponsoredFPCAddress, this.wallet);
|
|
359
|
+
return Promise.resolve();
|
|
351
360
|
},
|
|
352
361
|
);
|
|
353
362
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
2
|
import type { L2Block } from '@aztec/aztec.js/block';
|
|
3
3
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
4
|
-
import { BatchedBlob, Blob, getPrefixedEthBlobCommitments } from '@aztec/blob-lib';
|
|
4
|
+
import { BatchedBlob, Blob, getEthBlobEvaluationInputs, getPrefixedEthBlobCommitments } from '@aztec/blob-lib';
|
|
5
5
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
6
6
|
|
|
7
7
|
import { writeFile } from 'fs/promises';
|
|
@@ -41,16 +41,17 @@ export async function writeJson(
|
|
|
41
41
|
messages: {
|
|
42
42
|
l2ToL1Messages: block.body.txEffects.flatMap(txEffect => txEffect.l2ToL1Msgs).map(value => asHex(value)),
|
|
43
43
|
},
|
|
44
|
-
|
|
44
|
+
checkpoint: {
|
|
45
45
|
// The json formatting in forge is a bit brittle, so we convert Fr to a number in the few values below.
|
|
46
46
|
// This should not be a problem for testing as long as the values are not larger than u32.
|
|
47
47
|
archive: asHex(block.archive.root),
|
|
48
48
|
blobCommitments: getPrefixedEthBlobCommitments(blobs),
|
|
49
|
-
batchedBlobInputs:
|
|
50
|
-
|
|
49
|
+
batchedBlobInputs: getEthBlobEvaluationInputs(batchedBlob),
|
|
50
|
+
checkpointNumber: block.number,
|
|
51
51
|
body: `0x${block.body.toBuffer().toString('hex')}`,
|
|
52
52
|
header: {
|
|
53
53
|
lastArchiveRoot: asHex(block.header.lastArchive.root),
|
|
54
|
+
blockHeadersHash: asHex(block.header.blockHeadersHash),
|
|
54
55
|
contentCommitment: {
|
|
55
56
|
blobsHash: asHex(block.header.contentCommitment.blobsHash),
|
|
56
57
|
inHash: asHex(block.header.contentCommitment.inHash),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
-
import { getAddressFromPrivateKey } from '@aztec/ethereum';
|
|
2
|
+
import { getAddressFromPrivateKey } from '@aztec/ethereum/account';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import type { EthPrivateKey } from '@aztec/node-keystore';
|
|
5
5
|
|
|
@@ -86,9 +86,10 @@ export class NestedContractTest {
|
|
|
86
86
|
.deployed();
|
|
87
87
|
return { parentContractAddress: parentContract.address, childContractAddress: childContract.address };
|
|
88
88
|
},
|
|
89
|
-
|
|
90
|
-
this.parentContract =
|
|
91
|
-
this.childContract =
|
|
89
|
+
({ parentContractAddress, childContractAddress }) => {
|
|
90
|
+
this.parentContract = ParentContract.at(parentContractAddress, this.wallet);
|
|
91
|
+
this.childContract = ChildContract.at(childContractAddress, this.wallet);
|
|
92
|
+
return Promise.resolve();
|
|
92
93
|
},
|
|
93
94
|
);
|
|
94
95
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AztecNodeService } from '@aztec/aztec-node';
|
|
2
2
|
import { EthAddress } from '@aztec/aztec.js/addresses';
|
|
3
|
-
import { RollupContract } from '@aztec/ethereum';
|
|
3
|
+
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
4
|
+
import { EpochNumber } from '@aztec/foundation/branded-types';
|
|
4
5
|
|
|
5
6
|
import fs from 'fs';
|
|
6
7
|
import 'jest-extended';
|
|
@@ -23,7 +24,7 @@ const SLASHING_UNIT = BigInt(1e18);
|
|
|
23
24
|
const SLASHING_AMOUNT = SLASHING_UNIT * 3n;
|
|
24
25
|
|
|
25
26
|
// How many epochs it may take to set everything up, so we dont slash during this period
|
|
26
|
-
const SETUP_EPOCH_DURATION =
|
|
27
|
+
const SETUP_EPOCH_DURATION = 8;
|
|
27
28
|
|
|
28
29
|
export class P2PInactivityTest {
|
|
29
30
|
public nodes!: AztecNodeService[];
|
|
@@ -150,8 +151,8 @@ export class P2PInactivityTest {
|
|
|
150
151
|
// This prevents race conditions where validators propose blocks before the network is ready
|
|
151
152
|
await this.test.waitForP2PMeshConnectivity(this.nodes, NUM_NODES);
|
|
152
153
|
|
|
153
|
-
this.test.logger.warn(`Advancing to epoch ${SETUP_EPOCH_DURATION
|
|
154
|
-
await this.test.ctx.cheatCodes.rollup.advanceToEpoch(SETUP_EPOCH_DURATION
|
|
154
|
+
this.test.logger.warn(`Advancing to epoch ${SETUP_EPOCH_DURATION - 1} (slashing will start after it is completed)`);
|
|
155
|
+
await this.test.ctx.cheatCodes.rollup.advanceToEpoch(EpochNumber(SETUP_EPOCH_DURATION - 1));
|
|
155
156
|
|
|
156
157
|
return this;
|
|
157
158
|
}
|
|
@@ -2,20 +2,20 @@ import type { InitialAccountData } from '@aztec/accounts/testing';
|
|
|
2
2
|
import type { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
|
|
3
3
|
import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
4
4
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
5
|
+
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
|
|
5
6
|
import {
|
|
6
7
|
type EmpireSlashingProposerContract,
|
|
7
|
-
type ExtendedViemWalletClient,
|
|
8
8
|
GSEContract,
|
|
9
|
-
MultiAdderArtifact,
|
|
10
|
-
type Operator,
|
|
11
9
|
RollupContract,
|
|
12
10
|
type TallySlashingProposerContract,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} from '@aztec/ethereum';
|
|
11
|
+
} from '@aztec/ethereum/contracts';
|
|
12
|
+
import type { Operator } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
13
|
+
import { deployL1Contract } from '@aztec/ethereum/deploy-l1-contract';
|
|
14
|
+
import { MultiAdderArtifact } from '@aztec/ethereum/l1-artifacts';
|
|
15
|
+
import { createL1TxUtilsFromViemWallet } from '@aztec/ethereum/l1-tx-utils';
|
|
18
16
|
import { ChainMonitor } from '@aztec/ethereum/test';
|
|
17
|
+
import type { ExtendedViemWalletClient, ViemClient } from '@aztec/ethereum/types';
|
|
18
|
+
import { EpochNumber } from '@aztec/foundation/branded-types';
|
|
19
19
|
import { SecretValue } from '@aztec/foundation/config';
|
|
20
20
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
21
21
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
@@ -93,7 +93,6 @@ export class P2PNetworkTest {
|
|
|
93
93
|
// If set enable metrics collection
|
|
94
94
|
private metricsPort?: number,
|
|
95
95
|
startProverNode?: boolean,
|
|
96
|
-
mockZkPassportVerifier?: boolean,
|
|
97
96
|
) {
|
|
98
97
|
this.logger = createLogger(`e2e:e2e_p2p:${testName}`);
|
|
99
98
|
|
|
@@ -122,7 +121,6 @@ export class P2PNetworkTest {
|
|
|
122
121
|
initialValidatorConfig.slashingRoundSizeInEpochs ?? l1ContractsConfig.slashingRoundSizeInEpochs,
|
|
123
122
|
slasherFlavor: initialValidatorConfig.slasherFlavor ?? 'tally',
|
|
124
123
|
aztecTargetCommitteeSize: numberOfValidators,
|
|
125
|
-
salt: 420,
|
|
126
124
|
metricsPort: metricsPort,
|
|
127
125
|
numberOfInitialFundedAccounts: 2,
|
|
128
126
|
startProverNode,
|
|
@@ -141,7 +139,6 @@ export class P2PNetworkTest {
|
|
|
141
139
|
aztecTargetCommitteeSize: numberOfValidators,
|
|
142
140
|
initialValidators: [],
|
|
143
141
|
zkPassportArgs: {
|
|
144
|
-
mockZkPassportVerifier,
|
|
145
142
|
zkPassportDomain: zkPassportParams.domain,
|
|
146
143
|
zkPassportScope: zkPassportParams.scope,
|
|
147
144
|
},
|
|
@@ -157,7 +154,6 @@ export class P2PNetworkTest {
|
|
|
157
154
|
metricsPort,
|
|
158
155
|
initialConfig,
|
|
159
156
|
startProverNode,
|
|
160
|
-
mockZkPassportVerifier,
|
|
161
157
|
}: {
|
|
162
158
|
testName: string;
|
|
163
159
|
numberOfNodes: number;
|
|
@@ -166,7 +162,6 @@ export class P2PNetworkTest {
|
|
|
166
162
|
metricsPort?: number;
|
|
167
163
|
initialConfig?: SetupOptions;
|
|
168
164
|
startProverNode?: boolean;
|
|
169
|
-
mockZkPassportVerifier?: boolean;
|
|
170
165
|
}) {
|
|
171
166
|
const port = basePort || (await getPort());
|
|
172
167
|
|
|
@@ -187,7 +182,6 @@ export class P2PNetworkTest {
|
|
|
187
182
|
numberOfNodes,
|
|
188
183
|
metricsPort,
|
|
189
184
|
startProverNode,
|
|
190
|
-
mockZkPassportVerifier,
|
|
191
185
|
);
|
|
192
186
|
}
|
|
193
187
|
|
|
@@ -200,7 +194,7 @@ export class P2PNetworkTest {
|
|
|
200
194
|
|
|
201
195
|
async addBootstrapNode() {
|
|
202
196
|
await this.snapshotManager.snapshot('add-bootstrap-node', async ({ aztecNodeConfig }) => {
|
|
203
|
-
const telemetry = getEndToEndTestTelemetryClient(this.metricsPort);
|
|
197
|
+
const telemetry = await getEndToEndTestTelemetryClient(this.metricsPort);
|
|
204
198
|
this.bootstrapNode = await createBootstrapNodeFromPrivateKey(
|
|
205
199
|
BOOTSTRAP_NODE_PRIVATE_KEY,
|
|
206
200
|
this.bootNodePort,
|
|
@@ -292,7 +286,9 @@ export class P2PNetworkTest {
|
|
|
292
286
|
});
|
|
293
287
|
|
|
294
288
|
await cheatCodes.rollup.advanceToEpoch(
|
|
295
|
-
|
|
289
|
+
EpochNumber.fromBigInt(
|
|
290
|
+
BigInt(await cheatCodes.rollup.getEpoch()) + (await rollup.read.getLagInEpochsForValidatorSet()) + 1n,
|
|
291
|
+
),
|
|
296
292
|
);
|
|
297
293
|
|
|
298
294
|
// Send and await a tx to make sure we mine a block for the warp to correctly progress.
|
|
@@ -326,11 +322,12 @@ export class P2PNetworkTest {
|
|
|
326
322
|
.deployed();
|
|
327
323
|
return { contractAddress: spamContract.address };
|
|
328
324
|
},
|
|
329
|
-
|
|
325
|
+
({ contractAddress }) => {
|
|
330
326
|
if (!this.wallet) {
|
|
331
327
|
throw new Error('Call snapshot t.setupAccount before deploying account contract');
|
|
332
328
|
}
|
|
333
|
-
this.spamContract =
|
|
329
|
+
this.spamContract = SpamContract.at(contractAddress, this.wallet);
|
|
330
|
+
return Promise.resolve();
|
|
334
331
|
},
|
|
335
332
|
);
|
|
336
333
|
}
|
|
@@ -445,7 +442,7 @@ export class P2PNetworkTest {
|
|
|
445
442
|
slashFactory: SlashFactoryContract;
|
|
446
443
|
}> {
|
|
447
444
|
if (!this.ctx.deployL1ContractsValues) {
|
|
448
|
-
throw new Error('
|
|
445
|
+
throw new Error('DeployAztecL1ContractsValues not set');
|
|
449
446
|
}
|
|
450
447
|
|
|
451
448
|
const rollup = new RollupContract(
|
package/src/e2e_p2p/shared.ts
CHANGED
|
@@ -6,7 +6,12 @@ import { Fr } from '@aztec/aztec.js/fields';
|
|
|
6
6
|
import type { Logger } from '@aztec/aztec.js/log';
|
|
7
7
|
import { Tx, TxStatus } from '@aztec/aztec.js/tx';
|
|
8
8
|
import type { RollupCheatCodes } from '@aztec/aztec/testing';
|
|
9
|
-
import type {
|
|
9
|
+
import type {
|
|
10
|
+
EmpireSlashingProposerContract,
|
|
11
|
+
RollupContract,
|
|
12
|
+
TallySlashingProposerContract,
|
|
13
|
+
} from '@aztec/ethereum/contracts';
|
|
14
|
+
import { EpochNumber } from '@aztec/foundation/branded-types';
|
|
10
15
|
import { timesAsync, unique } from '@aztec/foundation/collection';
|
|
11
16
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
12
17
|
import { pluralize } from '@aztec/foundation/string';
|
|
@@ -80,7 +85,7 @@ export async function prepareTransactions(
|
|
|
80
85
|
salt: Fr.random(),
|
|
81
86
|
});
|
|
82
87
|
await wallet.registerContract(testContractInstance, TestContractArtifact);
|
|
83
|
-
const contract =
|
|
88
|
+
const contract = TestContract.at(testContractInstance.address, wallet);
|
|
84
89
|
|
|
85
90
|
return timesAsync(numTxs, async () => {
|
|
86
91
|
const tx = await proveInteraction(wallet, contract.methods.emit_nullifier(Fr.random()), {
|
|
@@ -213,9 +218,9 @@ export async function awaitCommitteeKicked({
|
|
|
213
218
|
|
|
214
219
|
if (slashingProposer.type === 'empire') {
|
|
215
220
|
// Await for the slash payload to be created if empire (no payload is created on tally until execution time)
|
|
216
|
-
const targetEpoch = (await cheatCodes.getEpoch()) + (await rollup.
|
|
221
|
+
const targetEpoch = BigInt(await cheatCodes.getEpoch()) + (await rollup.getLagInEpochsForValidatorSet()) + 1n;
|
|
217
222
|
logger.info(`Advancing to epoch ${targetEpoch} so we start slashing`);
|
|
218
|
-
await cheatCodes.advanceToEpoch(targetEpoch);
|
|
223
|
+
await cheatCodes.advanceToEpoch(EpochNumber.fromBigInt(targetEpoch));
|
|
219
224
|
|
|
220
225
|
const slashPayloadEvents = await retryUntil(
|
|
221
226
|
async () => {
|
|
@@ -239,7 +244,7 @@ export async function awaitCommitteeKicked({
|
|
|
239
244
|
const firstEpochInOffenseRound = offenseEpoch - (offenseEpoch % slashingRoundSizeInEpochs);
|
|
240
245
|
const targetEpoch = firstEpochInOffenseRound + slashingOffsetInEpochs;
|
|
241
246
|
logger.info(`Advancing to epoch ${targetEpoch} so we start slashing`);
|
|
242
|
-
await cheatCodes.advanceToEpoch(targetEpoch, { offset: -aztecSlotDuration / 2 });
|
|
247
|
+
await cheatCodes.advanceToEpoch(EpochNumber(targetEpoch), { offset: -aztecSlotDuration / 2 });
|
|
243
248
|
}
|
|
244
249
|
|
|
245
250
|
const attestersPre = await rollup.getAttesters();
|
|
@@ -269,7 +274,9 @@ export async function awaitCommitteeKicked({
|
|
|
269
274
|
|
|
270
275
|
logger.info(`Advancing to check current committee`);
|
|
271
276
|
await cheatCodes.debugRollup();
|
|
272
|
-
await cheatCodes.advanceToEpoch(
|
|
277
|
+
await cheatCodes.advanceToEpoch(
|
|
278
|
+
EpochNumber.fromBigInt(BigInt(await cheatCodes.getEpoch()) + (await rollup.getLagInEpochsForValidatorSet()) + 1n),
|
|
279
|
+
);
|
|
273
280
|
await cheatCodes.debugRollup();
|
|
274
281
|
|
|
275
282
|
const committeeNextEpoch = await rollup.getCurrentEpochCommittee();
|
|
@@ -90,7 +90,7 @@ export class TokenContractTest {
|
|
|
90
90
|
},
|
|
91
91
|
async ({ tokenContractAddress, badAccountAddress }) => {
|
|
92
92
|
// Restore the token contract state.
|
|
93
|
-
this.asset =
|
|
93
|
+
this.asset = TokenContract.at(tokenContractAddress, this.wallet);
|
|
94
94
|
this.logger.verbose(`Token contract address: ${this.asset.address}`);
|
|
95
95
|
|
|
96
96
|
this.tokenSim = new TokenSimulator(this.asset, this.wallet, this.adminAddress, this.logger, [
|
|
@@ -98,7 +98,7 @@ export class TokenContractTest {
|
|
|
98
98
|
this.account1Address,
|
|
99
99
|
]);
|
|
100
100
|
|
|
101
|
-
this.badAccount =
|
|
101
|
+
this.badAccount = InvalidAccountContract.at(badAccountAddress, this.wallet);
|
|
102
102
|
this.logger.verbose(`Bad account address: ${this.badAccount.address}`);
|
|
103
103
|
|
|
104
104
|
expect(await this.asset.methods.get_admin().simulate({ from: this.adminAddress })).toBe(
|
|
@@ -10,14 +10,15 @@ import {
|
|
|
10
10
|
QueuedIVCVerifier,
|
|
11
11
|
TestCircuitVerifier,
|
|
12
12
|
} from '@aztec/bb-prover';
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import type {
|
|
13
|
+
import { BackendType, Barretenberg } from '@aztec/bb.js';
|
|
14
|
+
import { createBlobClientWithFileStores } from '@aztec/blob-client/client';
|
|
15
|
+
import type { DeployAztecL1ContractsReturnType } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
16
16
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
17
17
|
import { SecretValue } from '@aztec/foundation/config';
|
|
18
18
|
import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
19
19
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
20
20
|
import { type ProverNode, type ProverNodeConfig, createProverNode } from '@aztec/prover-node';
|
|
21
|
+
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
21
22
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
22
23
|
import { TestWallet } from '@aztec/test-wallet/server';
|
|
23
24
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
@@ -62,11 +63,11 @@ export class FullProverTest {
|
|
|
62
63
|
accounts: AztecAddress[] = [];
|
|
63
64
|
deployedAccounts!: InitialAccountData[];
|
|
64
65
|
fakeProofsAsset!: TokenContract;
|
|
66
|
+
fakeProofsAssetInstance!: ContractInstanceWithAddress;
|
|
65
67
|
tokenSim!: TokenSimulator;
|
|
66
68
|
aztecNode!: AztecNode;
|
|
67
69
|
aztecNodeAdmin!: AztecNodeAdmin;
|
|
68
70
|
cheatCodes!: CheatCodes;
|
|
69
|
-
blobSink!: BlobSinkServer;
|
|
70
71
|
private provenComponents: ProvenSetup[] = [];
|
|
71
72
|
private bbConfigCleanup?: () => Promise<void>;
|
|
72
73
|
private acvmConfigCleanup?: () => Promise<void>;
|
|
@@ -75,7 +76,7 @@ export class FullProverTest {
|
|
|
75
76
|
private context!: SubsystemsContext;
|
|
76
77
|
private proverNode!: ProverNode;
|
|
77
78
|
private simulatedProverNode!: ProverNode;
|
|
78
|
-
public l1Contracts!:
|
|
79
|
+
public l1Contracts!: DeployAztecL1ContractsReturnType;
|
|
79
80
|
public proverAddress!: EthAddress;
|
|
80
81
|
|
|
81
82
|
constructor(
|
|
@@ -88,7 +89,7 @@ export class FullProverTest {
|
|
|
88
89
|
this.snapshotManager = createSnapshotManager(
|
|
89
90
|
`full_prover_integration/${testName}`,
|
|
90
91
|
dataPath,
|
|
91
|
-
{ startProverNode: true,
|
|
92
|
+
{ startProverNode: true, coinbase },
|
|
92
93
|
{
|
|
93
94
|
realVerifier: realProofs,
|
|
94
95
|
},
|
|
@@ -121,7 +122,7 @@ export class FullProverTest {
|
|
|
121
122
|
await publicDeployAccounts(this.wallet, this.accounts.slice(0, 2));
|
|
122
123
|
|
|
123
124
|
this.logger.verbose(`Deploying TokenContract...`);
|
|
124
|
-
const asset = await TokenContract.deploy(
|
|
125
|
+
const { contract: asset, instance } = await TokenContract.deploy(
|
|
125
126
|
this.wallet,
|
|
126
127
|
this.accounts[0],
|
|
127
128
|
FullProverTest.TOKEN_NAME,
|
|
@@ -129,14 +130,15 @@ export class FullProverTest {
|
|
|
129
130
|
FullProverTest.TOKEN_DECIMALS,
|
|
130
131
|
)
|
|
131
132
|
.send({ from: this.accounts[0] })
|
|
132
|
-
.
|
|
133
|
+
.wait();
|
|
133
134
|
this.logger.verbose(`Token deployed to ${asset.address}`);
|
|
134
135
|
|
|
135
|
-
return { tokenContractAddress: asset.address };
|
|
136
|
+
return { tokenContractAddress: asset.address, tokenContractInstance: instance };
|
|
136
137
|
},
|
|
137
|
-
async ({ tokenContractAddress }) => {
|
|
138
|
+
async ({ tokenContractAddress, tokenContractInstance }) => {
|
|
138
139
|
// Restore the token contract state.
|
|
139
|
-
this.fakeProofsAsset =
|
|
140
|
+
this.fakeProofsAsset = TokenContract.at(tokenContractAddress, this.wallet);
|
|
141
|
+
this.fakeProofsAssetInstance = tokenContractInstance;
|
|
140
142
|
this.logger.verbose(`Token contract address: ${this.fakeProofsAsset.address}`);
|
|
141
143
|
|
|
142
144
|
this.tokenSim = new TokenSimulator(
|
|
@@ -165,11 +167,11 @@ export class FullProverTest {
|
|
|
165
167
|
aztecNode: this.aztecNode,
|
|
166
168
|
deployL1ContractsValues: this.l1Contracts,
|
|
167
169
|
cheatCodes: this.cheatCodes,
|
|
168
|
-
blobSink: this.blobSink,
|
|
169
170
|
} = this.context);
|
|
170
171
|
this.aztecNodeAdmin = this.context.aztecNode;
|
|
171
172
|
|
|
172
|
-
const
|
|
173
|
+
const config = this.context.aztecNodeConfig;
|
|
174
|
+
const blobClient = await createBlobClientWithFileStores(config, this.logger);
|
|
173
175
|
|
|
174
176
|
// Configure a full prover PXE
|
|
175
177
|
let acvmConfig: Awaited<ReturnType<typeof getACVMConfig>> | undefined;
|
|
@@ -183,9 +185,7 @@ export class FullProverTest {
|
|
|
183
185
|
this.acvmConfigCleanup = acvmConfig.cleanup;
|
|
184
186
|
this.bbConfigCleanup = bbConfig.cleanup;
|
|
185
187
|
|
|
186
|
-
|
|
187
|
-
throw new Error(`Test must be run with BB native configuration`);
|
|
188
|
-
}
|
|
188
|
+
await Barretenberg.initSingleton({ backend: BackendType.NativeUnixSocket });
|
|
189
189
|
|
|
190
190
|
const verifier = await BBCircuitVerifier.new(bbConfig);
|
|
191
191
|
this.circuitProofVerifier = new QueuedIVCVerifier(bbConfig, verifier);
|
|
@@ -212,23 +212,19 @@ export class FullProverTest {
|
|
|
212
212
|
this.logger.verbose(`Main setup completed, initializing full prover PXE, Node, and Prover Node`);
|
|
213
213
|
const { wallet: provenWallet, teardown: provenTeardown } = await setupPXEAndGetWallet(
|
|
214
214
|
this.aztecNode,
|
|
215
|
-
{
|
|
216
|
-
proverEnabled: this.realProofs,
|
|
217
|
-
bbBinaryPath: bbConfig?.bbBinaryPath,
|
|
218
|
-
bbWorkingDirectory: bbConfig?.bbWorkingDirectory,
|
|
219
|
-
},
|
|
215
|
+
{ proverEnabled: this.realProofs },
|
|
220
216
|
undefined,
|
|
221
217
|
true,
|
|
222
218
|
);
|
|
223
219
|
this.logger.debug(`Contract address ${this.fakeProofsAsset.address}`);
|
|
224
|
-
await provenWallet.registerContract(this.
|
|
220
|
+
await provenWallet.registerContract(this.fakeProofsAssetInstance, TokenContract.artifact);
|
|
225
221
|
|
|
226
222
|
for (let i = 0; i < 2; i++) {
|
|
227
223
|
await provenWallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
228
224
|
await this.wallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
229
225
|
}
|
|
230
226
|
|
|
231
|
-
const asset =
|
|
227
|
+
const asset = TokenContract.at(this.fakeProofsAsset.address, provenWallet);
|
|
232
228
|
this.provenComponents.push({
|
|
233
229
|
wallet: provenWallet,
|
|
234
230
|
teardown: provenTeardown,
|
|
@@ -245,7 +241,7 @@ export class FullProverTest {
|
|
|
245
241
|
this.logger.verbose('Starting archiver for new prover node');
|
|
246
242
|
const archiver = await createArchiver(
|
|
247
243
|
{ ...this.context.aztecNodeConfig, dataDirectory: undefined },
|
|
248
|
-
{
|
|
244
|
+
{ blobClient, dateProvider: this.context.dateProvider },
|
|
249
245
|
{ blockUntilSync: true },
|
|
250
246
|
);
|
|
251
247
|
|
|
@@ -285,7 +281,7 @@ export class FullProverTest {
|
|
|
285
281
|
{
|
|
286
282
|
aztecNodeTxProvider: this.aztecNode,
|
|
287
283
|
archiver: archiver as Archiver,
|
|
288
|
-
|
|
284
|
+
blobClient,
|
|
289
285
|
},
|
|
290
286
|
{ prefilledPublicData },
|
|
291
287
|
);
|
|
@@ -321,6 +317,7 @@ export class FullProverTest {
|
|
|
321
317
|
// clean up the full prover node
|
|
322
318
|
await this.proverNode.stop();
|
|
323
319
|
|
|
320
|
+
await Barretenberg.destroySingleton();
|
|
324
321
|
await this.bbConfigCleanup?.();
|
|
325
322
|
await this.acvmConfigCleanup?.();
|
|
326
323
|
}
|
package/src/fixtures/fixtures.ts
CHANGED
|
@@ -8,7 +8,7 @@ export const shouldCollectMetrics = () => {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export const TEST_PEER_CHECK_INTERVAL_MS = 1000;
|
|
11
|
-
export const
|
|
11
|
+
export const TEST_MAX_PENDING_TX_POOL_COUNT = 10_000; // Number of max pending TXs ~ 1.56GB
|
|
12
12
|
|
|
13
13
|
export const MNEMONIC = 'test test test test test test test test test test test junk';
|
|
14
14
|
export const privateKey = Buffer.from('ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80', 'hex');
|
|
@@ -22,8 +22,5 @@ export const BITSIZE_TOO_BIG_ERROR = "Assertion failed: call to assert_max_bit_s
|
|
|
22
22
|
export const DUPLICATE_NULLIFIER_ERROR = /dropped|nullifier|reverted/i;
|
|
23
23
|
export const NO_L1_TO_L2_MSG_ERROR =
|
|
24
24
|
/No non-nullified L1 to L2 message found for message hash|Tried to consume nonexistent L1-to-L2 message/;
|
|
25
|
-
export const STATIC_CALL_STATE_MODIFICATION_ERROR =
|
|
26
|
-
/Static call cannot update the state, emit L2->L1 messages or generate logs.*/;
|
|
25
|
+
export const STATIC_CALL_STATE_MODIFICATION_ERROR = /Static call cannot update the state.*/;
|
|
27
26
|
export const STATIC_CONTEXT_ASSERTION_ERROR = /Assertion failed: Function .* can only be called statically.*/;
|
|
28
|
-
|
|
29
|
-
export const DEFAULT_BLOB_SINK_PORT = '5052';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/aztec.js/log';
|
|
2
2
|
import { parseBooleanEnv } from '@aztec/foundation/config';
|
|
3
|
-
import { randomBytes } from '@aztec/foundation/crypto';
|
|
3
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
4
4
|
import { tryRmDir } from '@aztec/foundation/fs';
|
|
5
5
|
|
|
6
6
|
import { promises as fs } from 'fs';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
2
|
+
import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
|
|
3
|
+
import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
|
|
4
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
5
|
import { tryJsonStringify } from '@aztec/foundation/json-rpc';
|
|
4
6
|
import { InboxAbi } from '@aztec/l1-artifacts';
|
|
5
7
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|