@aztec/end-to-end 3.0.0-devnet.2 → 3.0.0-devnet.20251212
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/bench/client_flows/benchmark.d.ts +1 -1
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/benchmark.js +2 -2
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +9 -2
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +58 -33
- package/dest/bench/client_flows/config.d.ts +1 -1
- package/dest/bench/client_flows/data_extractor.d.ts +1 -1
- package/dest/bench/client_flows/data_extractor.js +8 -30
- package/dest/bench/utils.d.ts +2 -2
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +2 -2
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +3 -2
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +6 -4
- package/dest/e2e_deploy_contract/deploy_test.d.ts +2 -2
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.d.ts +10 -9
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +11 -9
- package/dest/e2e_fees/bridging_race.notest.d.ts +1 -1
- package/dest/e2e_fees/bridging_race.notest.js +2 -2
- package/dest/e2e_fees/fees_test.d.ts +5 -3
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +14 -10
- package/dest/e2e_l1_publisher/write_json.d.ts +1 -1
- package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
- package/dest/e2e_l1_publisher/write_json.js +5 -4
- package/dest/e2e_multi_validator/utils.d.ts +1 -1
- package/dest/e2e_multi_validator/utils.js +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +4 -3
- package/dest/e2e_p2p/inactivity_slash_test.d.ts +3 -3
- package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
- package/dest/e2e_p2p/inactivity_slash_test.js +6 -2
- package/dest/e2e_p2p/p2p_network.d.ts +218 -11
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +11 -5
- package/dest/e2e_p2p/shared.d.ts +6 -6
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +6 -5
- package/dest/e2e_token_contract/token_contract_test.d.ts +1 -1
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +2 -2
- package/dest/fixtures/e2e_prover_test.d.ts +4 -2
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +18 -14
- package/dest/fixtures/fixtures.d.ts +1 -1
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +1 -1
- package/dest/fixtures/get_acvm_config.d.ts +1 -1
- package/dest/fixtures/get_acvm_config.js +1 -1
- package/dest/fixtures/get_bb_config.d.ts +1 -1
- package/dest/fixtures/get_bb_config.d.ts.map +1 -1
- package/dest/fixtures/index.d.ts +1 -1
- package/dest/fixtures/l1_to_l2_messaging.d.ts +4 -3
- package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
- package/dest/fixtures/l1_to_l2_messaging.js +2 -2
- package/dest/fixtures/logging.d.ts +1 -1
- package/dest/fixtures/setup_l1_contracts.d.ts +475 -4
- package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
- package/dest/fixtures/setup_l1_contracts.js +1 -1
- package/dest/fixtures/setup_p2p_test.d.ts +4 -4
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +18 -10
- package/dest/fixtures/snapshot_manager.d.ts +3 -3
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +6 -4
- package/dest/fixtures/token_utils.d.ts +5 -2
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +7 -4
- package/dest/fixtures/utils.d.ts +453 -7
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +26 -19
- package/dest/fixtures/web3signer.d.ts +1 -1
- package/dest/fixtures/web3signer.js +1 -1
- package/dest/fixtures/with_telemetry_utils.d.ts +2 -2
- package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -1
- package/dest/fixtures/with_telemetry_utils.js +2 -2
- package/dest/index.d.ts +1 -1
- package/dest/quality_of_service/alert_checker.d.ts +1 -1
- package/dest/quality_of_service/alert_checker.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.d.ts +5 -14
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +1 -1
- package/dest/shared/gas_portal_test_harness.d.ts +2 -12
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +1 -1
- package/dest/shared/index.d.ts +1 -1
- package/dest/shared/jest_setup.d.ts +1 -1
- package/dest/shared/submit-transactions.d.ts +1 -1
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts +3 -2
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +15 -13
- package/dest/simulators/index.d.ts +1 -1
- package/dest/simulators/lending_simulator.d.ts +2 -6
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +5 -3
- package/dest/simulators/token_simulator.d.ts +1 -1
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.d.ts +5 -3
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +45 -10
- package/dest/spartan/tx_metrics.d.ts +39 -0
- package/dest/spartan/tx_metrics.d.ts.map +1 -0
- package/dest/spartan/tx_metrics.js +95 -0
- package/dest/spartan/utils.d.ts +31 -21
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +93 -33
- package/package.json +42 -40
- package/src/bench/client_flows/benchmark.ts +2 -2
- package/src/bench/client_flows/client_flows_benchmark.ts +80 -33
- package/src/bench/client_flows/data_extractor.ts +9 -31
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +2 -2
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +7 -6
- package/src/e2e_deploy_contract/deploy_test.ts +1 -1
- package/src/e2e_epochs/epochs_test.ts +19 -16
- package/src/e2e_fees/bridging_race.notest.ts +2 -2
- package/src/e2e_fees/fees_test.ts +18 -12
- package/src/e2e_l1_publisher/write_json.ts +5 -4
- package/src/e2e_multi_validator/utils.ts +1 -1
- package/src/e2e_nested_contract/nested_contract_test.ts +4 -3
- package/src/e2e_p2p/inactivity_slash_test.ts +9 -3
- package/src/e2e_p2p/p2p_network.ts +15 -12
- package/src/e2e_p2p/shared.ts +13 -6
- package/src/e2e_token_contract/token_contract_test.ts +2 -2
- package/src/fixtures/e2e_prover_test.ts +16 -17
- package/src/fixtures/fixtures.ts +1 -2
- package/src/fixtures/get_acvm_config.ts +1 -1
- package/src/fixtures/l1_to_l2_messaging.ts +4 -2
- package/src/fixtures/setup_l1_contracts.ts +2 -1
- package/src/fixtures/setup_p2p_test.ts +23 -9
- package/src/fixtures/snapshot_manager.ts +7 -10
- package/src/fixtures/token_utils.ts +4 -4
- package/src/fixtures/utils.ts +51 -31
- package/src/fixtures/web3signer.ts +1 -1
- package/src/fixtures/with_telemetry_utils.ts +2 -2
- package/src/guides/up_quick_start.sh +1 -1
- package/src/shared/cross_chain_test_harness.ts +5 -2
- package/src/shared/gas_portal_test_harness.ts +2 -2
- package/src/shared/uniswap_l1_l2.ts +16 -19
- package/src/simulators/lending_simulator.ts +6 -4
- package/src/spartan/DEVELOP.md +7 -0
- package/src/spartan/setup_test_wallets.ts +49 -12
- package/src/spartan/tx_metrics.ts +130 -0
- package/src/spartan/utils.ts +107 -33
|
@@ -73,6 +73,6 @@ export class DeployTest {
|
|
|
73
73
|
export type StatefulContractCtorArgs = Parameters<StatefulTestContract['methods']['constructor']>;
|
|
74
74
|
|
|
75
75
|
export type ContractArtifactClass<T extends ContractBase> = {
|
|
76
|
-
at(address: AztecAddress, wallet: Wallet):
|
|
76
|
+
at(address: AztecAddress, wallet: Wallet): T;
|
|
77
77
|
artifact: ContractArtifact;
|
|
78
78
|
};
|
|
@@ -6,11 +6,14 @@ import type { Logger } from '@aztec/aztec.js/log';
|
|
|
6
6
|
import { MerkleTreeId } from '@aztec/aztec.js/trees';
|
|
7
7
|
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
8
8
|
import { EpochCache } from '@aztec/epoch-cache';
|
|
9
|
-
import {
|
|
9
|
+
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
10
|
+
import { DefaultL1ContractsConfig } from '@aztec/ethereum/config';
|
|
10
11
|
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
11
12
|
import { ChainMonitor, DelayedTxUtils, type Delayer, waitUntilL1Timestamp, withDelayer } from '@aztec/ethereum/test';
|
|
13
|
+
import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
|
|
14
|
+
import { BlockNumber, CheckpointNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
12
15
|
import { SecretValue } from '@aztec/foundation/config';
|
|
13
|
-
import { randomBytes } from '@aztec/foundation/crypto';
|
|
16
|
+
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
14
17
|
import { withLogNameSuffix } from '@aztec/foundation/log';
|
|
15
18
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
16
19
|
import { sleep } from '@aztec/foundation/sleep';
|
|
@@ -25,7 +28,7 @@ import {
|
|
|
25
28
|
SequencerState,
|
|
26
29
|
} from '@aztec/sequencer-client';
|
|
27
30
|
import type { TestSequencerClient } from '@aztec/sequencer-client/test';
|
|
28
|
-
import {
|
|
31
|
+
import { type BlockParameter, EthAddress } from '@aztec/stdlib/block';
|
|
29
32
|
import { type L1RollupConstants, getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers';
|
|
30
33
|
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
31
34
|
|
|
@@ -279,7 +282,7 @@ export class EpochsTestContext {
|
|
|
279
282
|
|
|
280
283
|
/** Waits until the epoch begins (ie until the immediately previous L1 block is mined). */
|
|
281
284
|
public async waitUntilEpochStarts(epoch: number) {
|
|
282
|
-
const [start] = getTimestampRangeForEpoch(
|
|
285
|
+
const [start] = getTimestampRangeForEpoch(EpochNumber(epoch), this.constants);
|
|
283
286
|
this.logger.info(`Waiting until L1 timestamp ${start} is reached as the start of epoch ${epoch}`);
|
|
284
287
|
await waitUntilL1Timestamp(
|
|
285
288
|
this.l1Client,
|
|
@@ -290,30 +293,30 @@ export class EpochsTestContext {
|
|
|
290
293
|
return start;
|
|
291
294
|
}
|
|
292
295
|
|
|
293
|
-
/** Waits until the given
|
|
294
|
-
public async
|
|
296
|
+
/** Waits until the given checkpoint number is mined. */
|
|
297
|
+
public async waitUntilCheckpointNumber(target: CheckpointNumber, timeout = 60) {
|
|
295
298
|
await retryUntil(
|
|
296
|
-
() => Promise.resolve(target <= this.monitor.
|
|
297
|
-
`Wait until
|
|
299
|
+
() => Promise.resolve(target <= this.monitor.checkpointNumber),
|
|
300
|
+
`Wait until checkpoint ${target}`,
|
|
298
301
|
timeout,
|
|
299
302
|
0.1,
|
|
300
303
|
);
|
|
301
304
|
}
|
|
302
305
|
|
|
303
|
-
/** Waits until the given
|
|
304
|
-
public async
|
|
306
|
+
/** Waits until the given checkpoint number is marked as proven. */
|
|
307
|
+
public async waitUntilProvenCheckpointNumber(target: CheckpointNumber, timeout = 60) {
|
|
305
308
|
await retryUntil(
|
|
306
|
-
() => Promise.resolve(
|
|
307
|
-
`Wait proven
|
|
309
|
+
() => Promise.resolve(target <= this.monitor.provenCheckpointNumber),
|
|
310
|
+
`Wait proven checkpoint ${target}`,
|
|
308
311
|
timeout,
|
|
309
312
|
0.1,
|
|
310
313
|
);
|
|
311
|
-
return this.monitor.
|
|
314
|
+
return this.monitor.provenCheckpointNumber;
|
|
312
315
|
}
|
|
313
316
|
|
|
314
317
|
/** Waits until the last slot of the proof submission window for a given epoch. */
|
|
315
318
|
public async waitUntilLastSlotOfProofSubmissionWindow(epochNumber: number | bigint) {
|
|
316
|
-
const deadline = getProofSubmissionDeadlineTimestamp(BigInt(epochNumber), this.constants);
|
|
319
|
+
const deadline = getProofSubmissionDeadlineTimestamp(EpochNumber.fromBigInt(BigInt(epochNumber)), this.constants);
|
|
317
320
|
const oneSlotBefore = deadline - BigInt(this.constants.slotDuration);
|
|
318
321
|
const date = new Date(Number(oneSlotBefore) * 1000);
|
|
319
322
|
this.logger.info(`Waiting until last slot of submission window for epoch ${epochNumber} at ${date}`, {
|
|
@@ -323,7 +326,7 @@ export class EpochsTestContext {
|
|
|
323
326
|
}
|
|
324
327
|
|
|
325
328
|
/** Waits for the aztec node to sync to the target block number. */
|
|
326
|
-
public async waitForNodeToSync(blockNumber:
|
|
329
|
+
public async waitForNodeToSync(blockNumber: BlockNumber, type: 'proven' | 'finalized' | 'historic') {
|
|
327
330
|
const waitTime = ARCHIVER_POLL_INTERVAL + WORLD_STATE_BLOCK_CHECK_INTERVAL;
|
|
328
331
|
let synched = false;
|
|
329
332
|
while (!synched) {
|
|
@@ -372,7 +375,7 @@ export class EpochsTestContext {
|
|
|
372
375
|
}
|
|
373
376
|
|
|
374
377
|
/** Verifies whether the given block number is found on the aztec node. */
|
|
375
|
-
public async verifyHistoricBlock(blockNumber:
|
|
378
|
+
public async verifyHistoricBlock(blockNumber: BlockParameter, expectedSuccess: boolean) {
|
|
376
379
|
// We use `findLeavesIndexes` here, but could use any function that queries the world-state
|
|
377
380
|
// at a particular block, so we know whether that historic block is available or has been
|
|
378
381
|
// pruned. Note that `getBlock` would not work here, since it only hits the archiver.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SchnorrAccountContract } from '@aztec/accounts/schnorr';
|
|
2
2
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
3
3
|
import type { Logger } from '@aztec/aztec.js/log';
|
|
4
|
-
import { Fq } from '@aztec/foundation/
|
|
4
|
+
import { Fq } from '@aztec/foundation/curves/bn254';
|
|
5
5
|
import { sleep } from '@aztec/foundation/sleep';
|
|
6
6
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
7
|
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
@@ -60,7 +60,7 @@ describe('e2e_fees bridging_race', () => {
|
|
|
60
60
|
const origApprove = l1TokenManager.approve.bind(l1TokenManager);
|
|
61
61
|
l1TokenManager.approve = async (amount: bigint, address: Hex, addressName = '') => {
|
|
62
62
|
await origApprove(amount, address, addressName);
|
|
63
|
-
const sleepTime = (Number(t.chainMonitor.
|
|
63
|
+
const sleepTime = (Number(t.chainMonitor.checkpointTimestamp) + AZTEC_SLOT_DURATION) * 1000 - Date.now() - 500;
|
|
64
64
|
logger.info(`Sleeping for ${sleepTime}ms until near end of L2 slot before sending L1 fee juice to L2 inbox`);
|
|
65
65
|
await sleep(sleepTime);
|
|
66
66
|
};
|
|
@@ -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 { DeployL1ContractsArgs } from '@aztec/ethereum/deploy-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';
|
|
@@ -85,7 +88,7 @@ export class FeesTest {
|
|
|
85
88
|
public getGasBalanceFn!: BalancesFn;
|
|
86
89
|
public getBananaPublicBalanceFn!: BalancesFn;
|
|
87
90
|
public getBananaPrivateBalanceFn!: BalancesFn;
|
|
88
|
-
public getProverFee!: (blockNumber:
|
|
91
|
+
public getProverFee!: (blockNumber: BlockNumber) => Promise<bigint>;
|
|
89
92
|
|
|
90
93
|
public readonly ALICE_INITIAL_BANANAS = BigInt(1e22);
|
|
91
94
|
public readonly SUBSCRIPTION_AMOUNT = BigInt(1e19);
|
|
@@ -136,7 +139,7 @@ export class FeesTest {
|
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
async getBlockRewards() {
|
|
139
|
-
const blockReward = await this.rollupContract.
|
|
142
|
+
const blockReward = await this.rollupContract.getCheckpointReward();
|
|
140
143
|
const rewardConfig = await this.rollupContract.getRewardConfig();
|
|
141
144
|
|
|
142
145
|
const balance = await this.feeJuiceBridgeTestHarness.getL1FeeJuiceBalance(
|
|
@@ -197,7 +200,7 @@ export class FeesTest {
|
|
|
197
200
|
this.fpcAdmin = this.aliceAddress;
|
|
198
201
|
|
|
199
202
|
const canonicalFeeJuice = await getCanonicalFeeJuice();
|
|
200
|
-
this.feeJuiceContract =
|
|
203
|
+
this.feeJuiceContract = FeeJuiceContract.at(canonicalFeeJuice.address, this.wallet);
|
|
201
204
|
},
|
|
202
205
|
);
|
|
203
206
|
}
|
|
@@ -215,7 +218,7 @@ export class FeesTest {
|
|
|
215
218
|
async (_data, context) => {
|
|
216
219
|
this.context = context;
|
|
217
220
|
|
|
218
|
-
this.feeJuiceContract =
|
|
221
|
+
this.feeJuiceContract = FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, this.wallet);
|
|
219
222
|
|
|
220
223
|
this.getGasBalanceFn = getBalancesFn(
|
|
221
224
|
'⛽',
|
|
@@ -245,8 +248,8 @@ export class FeesTest {
|
|
|
245
248
|
this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
|
|
246
249
|
return { bananaCoinAddress: bananaCoin.address };
|
|
247
250
|
},
|
|
248
|
-
|
|
249
|
-
this.bananaCoin =
|
|
251
|
+
({ bananaCoinAddress }) => {
|
|
252
|
+
this.bananaCoin = BananaCoin.at(bananaCoinAddress, this.wallet);
|
|
250
253
|
const logger = this.logger;
|
|
251
254
|
this.getBananaPublicBalanceFn = getBalancesFn(
|
|
252
255
|
'🍌.public',
|
|
@@ -260,6 +263,7 @@ export class FeesTest {
|
|
|
260
263
|
this.aliceAddress,
|
|
261
264
|
logger,
|
|
262
265
|
);
|
|
266
|
+
return Promise.resolve();
|
|
263
267
|
},
|
|
264
268
|
);
|
|
265
269
|
}
|
|
@@ -287,8 +291,8 @@ export class FeesTest {
|
|
|
287
291
|
rollupAddress: context.deployL1ContractsValues.l1ContractAddresses.rollupAddress,
|
|
288
292
|
};
|
|
289
293
|
},
|
|
290
|
-
|
|
291
|
-
const bananaFPC =
|
|
294
|
+
(data, context) => {
|
|
295
|
+
const bananaFPC = FPCContract.at(data.bananaFPCAddress, this.wallet);
|
|
292
296
|
this.bananaFPC = bananaFPC;
|
|
293
297
|
|
|
294
298
|
this.getCoinbaseBalance = async () => {
|
|
@@ -305,7 +309,7 @@ export class FeesTest {
|
|
|
305
309
|
return await this.rollupContract.getSequencerRewards(this.coinbase);
|
|
306
310
|
};
|
|
307
311
|
|
|
308
|
-
this.getProverFee = async (blockNumber:
|
|
312
|
+
this.getProverFee = async (blockNumber: BlockNumber) => {
|
|
309
313
|
const block = await this.aztecNode.getBlock(blockNumber);
|
|
310
314
|
|
|
311
315
|
// @todo @lherskind As we deal with #13601
|
|
@@ -328,6 +332,7 @@ export class FeesTest {
|
|
|
328
332
|
const mana = block!.header.totalManaUsed.toBigInt();
|
|
329
333
|
return mulDiv(mana * proverCost, price, 10n ** 9n);
|
|
330
334
|
};
|
|
335
|
+
return Promise.resolve();
|
|
331
336
|
},
|
|
332
337
|
);
|
|
333
338
|
}
|
|
@@ -346,8 +351,9 @@ export class FeesTest {
|
|
|
346
351
|
sponsoredFPCAddress: sponsoredFPC.address,
|
|
347
352
|
};
|
|
348
353
|
},
|
|
349
|
-
|
|
350
|
-
this.sponsoredFPC =
|
|
354
|
+
data => {
|
|
355
|
+
this.sponsoredFPC = SponsoredFPCContract.at(data.sponsoredFPCAddress, this.wallet);
|
|
356
|
+
return Promise.resolve();
|
|
351
357
|
},
|
|
352
358
|
);
|
|
353
359
|
}
|
|
@@ -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';
|
|
@@ -150,8 +151,13 @@ 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.
|
|
154
|
-
|
|
154
|
+
const ethereumSlotDuration = this.test.ctx.aztecNodeConfig.ethereumSlotDuration!;
|
|
155
|
+
this.test.logger.warn(
|
|
156
|
+
`Advancing to epoch ${SETUP_EPOCH_DURATION} (slashing will start after this epoch is complete)`,
|
|
157
|
+
);
|
|
158
|
+
await this.test.ctx.cheatCodes.rollup.advanceToEpoch(EpochNumber(SETUP_EPOCH_DURATION), {
|
|
159
|
+
offset: -ethereumSlotDuration,
|
|
160
|
+
});
|
|
155
161
|
|
|
156
162
|
return this;
|
|
157
163
|
}
|
|
@@ -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-l1-contracts';
|
|
13
|
+
import { deployL1Contract } from '@aztec/ethereum/deploy-l1-contracts';
|
|
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';
|
|
@@ -200,7 +200,7 @@ export class P2PNetworkTest {
|
|
|
200
200
|
|
|
201
201
|
async addBootstrapNode() {
|
|
202
202
|
await this.snapshotManager.snapshot('add-bootstrap-node', async ({ aztecNodeConfig }) => {
|
|
203
|
-
const telemetry = getEndToEndTestTelemetryClient(this.metricsPort);
|
|
203
|
+
const telemetry = await getEndToEndTestTelemetryClient(this.metricsPort);
|
|
204
204
|
this.bootstrapNode = await createBootstrapNodeFromPrivateKey(
|
|
205
205
|
BOOTSTRAP_NODE_PRIVATE_KEY,
|
|
206
206
|
this.bootNodePort,
|
|
@@ -292,7 +292,9 @@ export class P2PNetworkTest {
|
|
|
292
292
|
});
|
|
293
293
|
|
|
294
294
|
await cheatCodes.rollup.advanceToEpoch(
|
|
295
|
-
|
|
295
|
+
EpochNumber.fromBigInt(
|
|
296
|
+
BigInt(await cheatCodes.rollup.getEpoch()) + (await rollup.read.getLagInEpochsForValidatorSet()) + 1n,
|
|
297
|
+
),
|
|
296
298
|
);
|
|
297
299
|
|
|
298
300
|
// Send and await a tx to make sure we mine a block for the warp to correctly progress.
|
|
@@ -326,11 +328,12 @@ export class P2PNetworkTest {
|
|
|
326
328
|
.deployed();
|
|
327
329
|
return { contractAddress: spamContract.address };
|
|
328
330
|
},
|
|
329
|
-
|
|
331
|
+
({ contractAddress }) => {
|
|
330
332
|
if (!this.wallet) {
|
|
331
333
|
throw new Error('Call snapshot t.setupAccount before deploying account contract');
|
|
332
334
|
}
|
|
333
|
-
this.spamContract =
|
|
335
|
+
this.spamContract = SpamContract.at(contractAddress, this.wallet);
|
|
336
|
+
return Promise.resolve();
|
|
334
337
|
},
|
|
335
338
|
);
|
|
336
339
|
}
|
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,16 @@ import {
|
|
|
10
10
|
QueuedIVCVerifier,
|
|
11
11
|
TestCircuitVerifier,
|
|
12
12
|
} from '@aztec/bb-prover';
|
|
13
|
+
import { BackendType, Barretenberg } from '@aztec/bb.js';
|
|
13
14
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
14
15
|
import type { BlobSinkServer } from '@aztec/blob-sink/server';
|
|
15
|
-
import type { DeployL1ContractsReturnType } from '@aztec/ethereum';
|
|
16
|
+
import type { DeployL1ContractsReturnType } from '@aztec/ethereum/deploy-l1-contracts';
|
|
16
17
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
17
18
|
import { SecretValue } from '@aztec/foundation/config';
|
|
18
19
|
import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
19
20
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
20
21
|
import { type ProverNode, type ProverNodeConfig, createProverNode } from '@aztec/prover-node';
|
|
22
|
+
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
21
23
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
22
24
|
import { TestWallet } from '@aztec/test-wallet/server';
|
|
23
25
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
@@ -62,6 +64,7 @@ export class FullProverTest {
|
|
|
62
64
|
accounts: AztecAddress[] = [];
|
|
63
65
|
deployedAccounts!: InitialAccountData[];
|
|
64
66
|
fakeProofsAsset!: TokenContract;
|
|
67
|
+
fakeProofsAssetInstance!: ContractInstanceWithAddress;
|
|
65
68
|
tokenSim!: TokenSimulator;
|
|
66
69
|
aztecNode!: AztecNode;
|
|
67
70
|
aztecNodeAdmin!: AztecNodeAdmin;
|
|
@@ -121,7 +124,7 @@ export class FullProverTest {
|
|
|
121
124
|
await publicDeployAccounts(this.wallet, this.accounts.slice(0, 2));
|
|
122
125
|
|
|
123
126
|
this.logger.verbose(`Deploying TokenContract...`);
|
|
124
|
-
const asset = await TokenContract.deploy(
|
|
127
|
+
const { contract: asset, instance } = await TokenContract.deploy(
|
|
125
128
|
this.wallet,
|
|
126
129
|
this.accounts[0],
|
|
127
130
|
FullProverTest.TOKEN_NAME,
|
|
@@ -129,14 +132,15 @@ export class FullProverTest {
|
|
|
129
132
|
FullProverTest.TOKEN_DECIMALS,
|
|
130
133
|
)
|
|
131
134
|
.send({ from: this.accounts[0] })
|
|
132
|
-
.
|
|
135
|
+
.wait();
|
|
133
136
|
this.logger.verbose(`Token deployed to ${asset.address}`);
|
|
134
137
|
|
|
135
|
-
return { tokenContractAddress: asset.address };
|
|
138
|
+
return { tokenContractAddress: asset.address, tokenContractInstance: instance };
|
|
136
139
|
},
|
|
137
|
-
async ({ tokenContractAddress }) => {
|
|
140
|
+
async ({ tokenContractAddress, tokenContractInstance }) => {
|
|
138
141
|
// Restore the token contract state.
|
|
139
|
-
this.fakeProofsAsset =
|
|
142
|
+
this.fakeProofsAsset = TokenContract.at(tokenContractAddress, this.wallet);
|
|
143
|
+
this.fakeProofsAssetInstance = tokenContractInstance;
|
|
140
144
|
this.logger.verbose(`Token contract address: ${this.fakeProofsAsset.address}`);
|
|
141
145
|
|
|
142
146
|
this.tokenSim = new TokenSimulator(
|
|
@@ -183,9 +187,7 @@ export class FullProverTest {
|
|
|
183
187
|
this.acvmConfigCleanup = acvmConfig.cleanup;
|
|
184
188
|
this.bbConfigCleanup = bbConfig.cleanup;
|
|
185
189
|
|
|
186
|
-
|
|
187
|
-
throw new Error(`Test must be run with BB native configuration`);
|
|
188
|
-
}
|
|
190
|
+
await Barretenberg.initSingleton({ backend: BackendType.NativeUnixSocket });
|
|
189
191
|
|
|
190
192
|
const verifier = await BBCircuitVerifier.new(bbConfig);
|
|
191
193
|
this.circuitProofVerifier = new QueuedIVCVerifier(bbConfig, verifier);
|
|
@@ -212,23 +214,19 @@ export class FullProverTest {
|
|
|
212
214
|
this.logger.verbose(`Main setup completed, initializing full prover PXE, Node, and Prover Node`);
|
|
213
215
|
const { wallet: provenWallet, teardown: provenTeardown } = await setupPXEAndGetWallet(
|
|
214
216
|
this.aztecNode,
|
|
215
|
-
{
|
|
216
|
-
proverEnabled: this.realProofs,
|
|
217
|
-
bbBinaryPath: bbConfig?.bbBinaryPath,
|
|
218
|
-
bbWorkingDirectory: bbConfig?.bbWorkingDirectory,
|
|
219
|
-
},
|
|
217
|
+
{ proverEnabled: this.realProofs },
|
|
220
218
|
undefined,
|
|
221
219
|
true,
|
|
222
220
|
);
|
|
223
221
|
this.logger.debug(`Contract address ${this.fakeProofsAsset.address}`);
|
|
224
|
-
await provenWallet.registerContract(this.
|
|
222
|
+
await provenWallet.registerContract(this.fakeProofsAssetInstance, TokenContract.artifact);
|
|
225
223
|
|
|
226
224
|
for (let i = 0; i < 2; i++) {
|
|
227
225
|
await provenWallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
228
226
|
await this.wallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
229
227
|
}
|
|
230
228
|
|
|
231
|
-
const asset =
|
|
229
|
+
const asset = TokenContract.at(this.fakeProofsAsset.address, provenWallet);
|
|
232
230
|
this.provenComponents.push({
|
|
233
231
|
wallet: provenWallet,
|
|
234
232
|
teardown: provenTeardown,
|
|
@@ -245,7 +243,7 @@ export class FullProverTest {
|
|
|
245
243
|
this.logger.verbose('Starting archiver for new prover node');
|
|
246
244
|
const archiver = await createArchiver(
|
|
247
245
|
{ ...this.context.aztecNodeConfig, dataDirectory: undefined },
|
|
248
|
-
{ blobSinkClient },
|
|
246
|
+
{ blobSinkClient, dateProvider: this.context.dateProvider },
|
|
249
247
|
{ blockUntilSync: true },
|
|
250
248
|
);
|
|
251
249
|
|
|
@@ -321,6 +319,7 @@ export class FullProverTest {
|
|
|
321
319
|
// clean up the full prover node
|
|
322
320
|
await this.proverNode.stop();
|
|
323
321
|
|
|
322
|
+
await Barretenberg.destroySingleton();
|
|
324
323
|
await this.bbConfigCleanup?.();
|
|
325
324
|
await this.acvmConfigCleanup?.();
|
|
326
325
|
}
|
package/src/fixtures/fixtures.ts
CHANGED
|
@@ -22,8 +22,7 @@ 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
27
|
|
|
29
28
|
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';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/aztec.js/log';
|
|
2
|
-
import
|
|
2
|
+
import type { L1ContractsConfig } from '@aztec/ethereum/config';
|
|
3
|
+
import { type DeployL1ContractsArgs, deployL1Contracts } from '@aztec/ethereum/deploy-l1-contracts';
|
|
3
4
|
import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
|
|
4
5
|
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
5
6
|
|