@aztec/end-to-end 1.0.0 → 1.1.2
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/utils.js +1 -1
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +2 -1
- package/dest/e2e_p2p/p2p_network.js +3 -1
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +37 -6
- package/package.json +35 -35
- package/src/bench/utils.ts +1 -1
- package/src/e2e_epochs/epochs_test.ts +2 -1
- package/src/e2e_p2p/p2p_network.ts +1 -1
- package/src/fixtures/utils.ts +36 -5
package/dest/bench/utils.js
CHANGED
|
@@ -133,7 +133,7 @@ export async function waitTxs(txs, context, txWaitOpts) {
|
|
|
133
133
|
const l1Contracts = await node.getL1ContractAddresses();
|
|
134
134
|
const { l1ChainId, rollupVersion } = await node.getNodeInfo();
|
|
135
135
|
const pxeConfig = {
|
|
136
|
-
l2BlockBatchSize:
|
|
136
|
+
l2BlockBatchSize: 50,
|
|
137
137
|
l2BlockPollingIntervalMS: 100,
|
|
138
138
|
dataDirectory: undefined,
|
|
139
139
|
dataStoreMapSizeKB: 1024 * 1024,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epochs_test.d.ts","sourceRoot":"","sources":["../../src/e2e_epochs/epochs_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EACL,EAAE,EACF,KAAK,MAAM,EAEX,KAAK,MAAM,EAKZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"epochs_test.d.ts","sourceRoot":"","sources":["../../src/e2e_epochs/epochs_test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAC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/aztec-node';
|
|
2
2
|
import { Fr, MerkleTreeId, getContractInstanceFromDeployParams, getTimestampRangeForEpoch, retryUntil, sleep } from '@aztec/aztec.js';
|
|
3
|
-
import { createExtendedL1Client } from '@aztec/ethereum';
|
|
3
|
+
import { DefaultL1ContractsConfig, createExtendedL1Client } from '@aztec/ethereum';
|
|
4
4
|
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
5
5
|
import { ChainMonitor, waitUntilL1Timestamp, withDelayer } from '@aztec/ethereum/test';
|
|
6
6
|
import { SecretValue } from '@aztec/foundation/config';
|
|
@@ -81,6 +81,7 @@ export const ARCHIVER_POLL_INTERVAL = 50;
|
|
|
81
81
|
// but not so much to hang the sequencer and timeout the teardown
|
|
82
82
|
txPropagationMaxQueryAttempts: opts.txPropagationMaxQueryAttempts ?? 12,
|
|
83
83
|
worldStateBlockHistory: WORLD_STATE_BLOCK_HISTORY,
|
|
84
|
+
exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
|
|
84
85
|
...opts
|
|
85
86
|
});
|
|
86
87
|
this.context = context;
|
|
@@ -164,7 +164,9 @@ export class P2PNetworkTest {
|
|
|
164
164
|
}))
|
|
165
165
|
])
|
|
166
166
|
});
|
|
167
|
-
const timestamp = await cheatCodes.rollup.advanceToEpoch(2n
|
|
167
|
+
const timestamp = await cheatCodes.rollup.advanceToEpoch(2n, {
|
|
168
|
+
updateDateProvider: dateProvider
|
|
169
|
+
});
|
|
168
170
|
// Send and await a tx to make sure we mine a block for the warp to correctly progress.
|
|
169
171
|
await this._sendDummyTx(deployL1ContractsValues.l1Client);
|
|
170
172
|
// Set the system time in the node, only after we have warped the time and waited for a block
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/fixtures/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,KAAK,eAAe,EAAsC,MAAM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|
package/dest/fixtures/utils.js
CHANGED
|
@@ -2,7 +2,7 @@ import { SchnorrAccountContractArtifact } from '@aztec/accounts/schnorr';
|
|
|
2
2
|
import { deployFundedSchnorrAccounts, generateSchnorrAccounts, getDeployedTestAccounts, getDeployedTestAccountsWallets } from '@aztec/accounts/testing';
|
|
3
3
|
import { createArchiver } from '@aztec/archiver';
|
|
4
4
|
import { AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
|
|
5
|
-
import { BatchCall, createAztecNodeClient, createLogger, createPXEClient, makeFetch, waitForPXE } from '@aztec/aztec.js';
|
|
5
|
+
import { BatchCall, createAztecNodeClient, createLogger, createPXEClient, makeFetch, sleep, waitForPXE } from '@aztec/aztec.js';
|
|
6
6
|
import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment';
|
|
7
7
|
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing';
|
|
8
8
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
@@ -353,9 +353,9 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
353
353
|
}, {
|
|
354
354
|
prefilledPublicData
|
|
355
355
|
});
|
|
356
|
-
const
|
|
357
|
-
if (
|
|
358
|
-
const publisher =
|
|
356
|
+
const sequencerClient = aztecNode.getSequencer();
|
|
357
|
+
if (sequencerClient) {
|
|
358
|
+
const publisher = sequencerClient.sequencer.publisher;
|
|
359
359
|
publisher.l1TxUtils = DelayedTxUtils.fromL1TxUtils(publisher.l1TxUtils, config.ethereumSlotDuration);
|
|
360
360
|
}
|
|
361
361
|
let proverNode = undefined;
|
|
@@ -379,8 +379,39 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
379
379
|
await cheatCodes.rollup.advanceToEpoch(2n, {
|
|
380
380
|
updateDateProvider: dateProvider
|
|
381
381
|
});
|
|
382
|
+
await cheatCodes.rollup.setupEpoch();
|
|
383
|
+
await cheatCodes.rollup.debugRollup();
|
|
382
384
|
}
|
|
383
|
-
const
|
|
385
|
+
const sequencer = sequencerClient.getSequencer();
|
|
386
|
+
const minTxsPerBlock = config.minTxsPerBlock;
|
|
387
|
+
if (minTxsPerBlock === undefined) {
|
|
388
|
+
throw new Error('minTxsPerBlock is undefined in e2e test setup');
|
|
389
|
+
}
|
|
390
|
+
// Transactions built against the genesis state must be included in block 1, otherwise they are dropped.
|
|
391
|
+
// To avoid test failures from dropped transactions, we ensure progression beyond genesis before proceeding.
|
|
392
|
+
// For account deployments, we set minTxsPerBlock=1 and deploy accounts sequentially for guaranteed success.
|
|
393
|
+
// If no accounts need deployment, we await an empty block to confirm network progression. After either path
|
|
394
|
+
// completes, we restore the original minTxsPerBlock setting.
|
|
395
|
+
// For more details on why the tx would be dropped see `validate_include_by_timestamp` function in
|
|
396
|
+
// `noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/components/validation_requests.nr`.
|
|
397
|
+
let accountManagers = [];
|
|
398
|
+
if (numberOfAccounts === 0) {
|
|
399
|
+
// We wait until block 1 is mined to ensure that the network has progressed past genesis.
|
|
400
|
+
sequencer.updateConfig({
|
|
401
|
+
minTxsPerBlock: 0
|
|
402
|
+
});
|
|
403
|
+
while(await pxe.getBlockNumber() === 0){
|
|
404
|
+
await sleep(2000);
|
|
405
|
+
}
|
|
406
|
+
} else {
|
|
407
|
+
sequencer.updateConfig({
|
|
408
|
+
minTxsPerBlock: 1
|
|
409
|
+
});
|
|
410
|
+
accountManagers = await deployFundedSchnorrAccounts(pxe, initialFundedAccounts.slice(0, numberOfAccounts));
|
|
411
|
+
}
|
|
412
|
+
sequencer.updateConfig({
|
|
413
|
+
minTxsPerBlock
|
|
414
|
+
});
|
|
384
415
|
const wallets = await Promise.all(accountManagers.map((account)=>account.getWallet()));
|
|
385
416
|
if (initialFundedAccounts.length < numberOfAccounts) {
|
|
386
417
|
// TODO: Create (numberOfAccounts - initialFundedAccounts.length) wallets without funds.
|
|
@@ -419,7 +450,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
419
450
|
prefilledPublicData,
|
|
420
451
|
proverNode,
|
|
421
452
|
pxe,
|
|
422
|
-
sequencer,
|
|
453
|
+
sequencer: sequencerClient,
|
|
423
454
|
teardown,
|
|
424
455
|
telemetryClient: telemetry,
|
|
425
456
|
wallet: wallets[0],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -25,40 +25,40 @@
|
|
|
25
25
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aztec/accounts": "1.
|
|
29
|
-
"@aztec/archiver": "1.
|
|
30
|
-
"@aztec/aztec": "1.
|
|
31
|
-
"@aztec/aztec-node": "1.
|
|
32
|
-
"@aztec/aztec.js": "1.
|
|
33
|
-
"@aztec/bb-prover": "1.
|
|
34
|
-
"@aztec/blob-lib": "1.
|
|
35
|
-
"@aztec/blob-sink": "1.
|
|
36
|
-
"@aztec/bot": "1.
|
|
37
|
-
"@aztec/cli": "1.
|
|
38
|
-
"@aztec/constants": "1.
|
|
39
|
-
"@aztec/entrypoints": "1.
|
|
40
|
-
"@aztec/epoch-cache": "1.
|
|
41
|
-
"@aztec/ethereum": "1.
|
|
42
|
-
"@aztec/foundation": "1.
|
|
43
|
-
"@aztec/kv-store": "1.
|
|
44
|
-
"@aztec/l1-artifacts": "1.
|
|
45
|
-
"@aztec/merkle-tree": "1.
|
|
46
|
-
"@aztec/noir-contracts.js": "1.
|
|
47
|
-
"@aztec/noir-noirc_abi": "1.
|
|
48
|
-
"@aztec/noir-protocol-circuits-types": "1.
|
|
49
|
-
"@aztec/noir-test-contracts.js": "1.
|
|
50
|
-
"@aztec/p2p": "1.
|
|
51
|
-
"@aztec/protocol-contracts": "1.
|
|
52
|
-
"@aztec/prover-client": "1.
|
|
53
|
-
"@aztec/prover-node": "1.
|
|
54
|
-
"@aztec/pxe": "1.
|
|
55
|
-
"@aztec/sequencer-client": "1.
|
|
56
|
-
"@aztec/simulator": "1.
|
|
57
|
-
"@aztec/slasher": "1.
|
|
58
|
-
"@aztec/stdlib": "1.
|
|
59
|
-
"@aztec/telemetry-client": "1.
|
|
60
|
-
"@aztec/validator-client": "1.
|
|
61
|
-
"@aztec/world-state": "1.
|
|
28
|
+
"@aztec/accounts": "1.1.2",
|
|
29
|
+
"@aztec/archiver": "1.1.2",
|
|
30
|
+
"@aztec/aztec": "1.1.2",
|
|
31
|
+
"@aztec/aztec-node": "1.1.2",
|
|
32
|
+
"@aztec/aztec.js": "1.1.2",
|
|
33
|
+
"@aztec/bb-prover": "1.1.2",
|
|
34
|
+
"@aztec/blob-lib": "1.1.2",
|
|
35
|
+
"@aztec/blob-sink": "1.1.2",
|
|
36
|
+
"@aztec/bot": "1.1.2",
|
|
37
|
+
"@aztec/cli": "1.1.2",
|
|
38
|
+
"@aztec/constants": "1.1.2",
|
|
39
|
+
"@aztec/entrypoints": "1.1.2",
|
|
40
|
+
"@aztec/epoch-cache": "1.1.2",
|
|
41
|
+
"@aztec/ethereum": "1.1.2",
|
|
42
|
+
"@aztec/foundation": "1.1.2",
|
|
43
|
+
"@aztec/kv-store": "1.1.2",
|
|
44
|
+
"@aztec/l1-artifacts": "1.1.2",
|
|
45
|
+
"@aztec/merkle-tree": "1.1.2",
|
|
46
|
+
"@aztec/noir-contracts.js": "1.1.2",
|
|
47
|
+
"@aztec/noir-noirc_abi": "1.1.2",
|
|
48
|
+
"@aztec/noir-protocol-circuits-types": "1.1.2",
|
|
49
|
+
"@aztec/noir-test-contracts.js": "1.1.2",
|
|
50
|
+
"@aztec/p2p": "1.1.2",
|
|
51
|
+
"@aztec/protocol-contracts": "1.1.2",
|
|
52
|
+
"@aztec/prover-client": "1.1.2",
|
|
53
|
+
"@aztec/prover-node": "1.1.2",
|
|
54
|
+
"@aztec/pxe": "1.1.2",
|
|
55
|
+
"@aztec/sequencer-client": "1.1.2",
|
|
56
|
+
"@aztec/simulator": "1.1.2",
|
|
57
|
+
"@aztec/slasher": "1.1.2",
|
|
58
|
+
"@aztec/stdlib": "1.1.2",
|
|
59
|
+
"@aztec/telemetry-client": "1.1.2",
|
|
60
|
+
"@aztec/validator-client": "1.1.2",
|
|
61
|
+
"@aztec/world-state": "1.1.2",
|
|
62
62
|
"@iarna/toml": "^2.2.5",
|
|
63
63
|
"@jest/globals": "^30.0.0",
|
|
64
64
|
"@noble/curves": "^1.0.0",
|
package/src/bench/utils.ts
CHANGED
|
@@ -160,7 +160,7 @@ export async function createNewPXE(node: AztecNode, contract: BenchmarkingContra
|
|
|
160
160
|
const l1Contracts = await node.getL1ContractAddresses();
|
|
161
161
|
const { l1ChainId, rollupVersion } = await node.getNodeInfo();
|
|
162
162
|
const pxeConfig = {
|
|
163
|
-
l2BlockBatchSize:
|
|
163
|
+
l2BlockBatchSize: 50,
|
|
164
164
|
l2BlockPollingIntervalMS: 100,
|
|
165
165
|
dataDirectory: undefined,
|
|
166
166
|
dataStoreMapSizeKB: 1024 * 1024,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
retryUntil,
|
|
10
10
|
sleep,
|
|
11
11
|
} from '@aztec/aztec.js';
|
|
12
|
-
import { type ExtendedViemWalletClient, createExtendedL1Client } from '@aztec/ethereum';
|
|
12
|
+
import { DefaultL1ContractsConfig, type ExtendedViemWalletClient, createExtendedL1Client } from '@aztec/ethereum';
|
|
13
13
|
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
14
14
|
import { ChainMonitor, DelayedTxUtils, type Delayer, waitUntilL1Timestamp, withDelayer } from '@aztec/ethereum/test';
|
|
15
15
|
import { SecretValue } from '@aztec/foundation/config';
|
|
@@ -129,6 +129,7 @@ export class EpochsTestContext {
|
|
|
129
129
|
// but not so much to hang the sequencer and timeout the teardown
|
|
130
130
|
txPropagationMaxQueryAttempts: opts.txPropagationMaxQueryAttempts ?? 12,
|
|
131
131
|
worldStateBlockHistory: WORLD_STATE_BLOCK_HISTORY,
|
|
132
|
+
exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
|
|
132
133
|
...opts,
|
|
133
134
|
});
|
|
134
135
|
|
|
@@ -254,7 +254,7 @@ export class P2PNetworkTest {
|
|
|
254
254
|
]),
|
|
255
255
|
});
|
|
256
256
|
|
|
257
|
-
const timestamp = await cheatCodes.rollup.advanceToEpoch(2n);
|
|
257
|
+
const timestamp = await cheatCodes.rollup.advanceToEpoch(2n, { updateDateProvider: dateProvider });
|
|
258
258
|
|
|
259
259
|
// Send and await a tx to make sure we mine a block for the warp to correctly progress.
|
|
260
260
|
await this._sendDummyTx(deployL1ContractsValues.l1Client);
|
package/src/fixtures/utils.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import { type Archiver, createArchiver } from '@aztec/archiver';
|
|
10
10
|
import { type AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
|
|
11
11
|
import {
|
|
12
|
+
AccountManager,
|
|
12
13
|
type AccountWalletWithSecretKey,
|
|
13
14
|
type AztecAddress,
|
|
14
15
|
type AztecNode,
|
|
@@ -21,6 +22,7 @@ import {
|
|
|
21
22
|
createLogger,
|
|
22
23
|
createPXEClient,
|
|
23
24
|
makeFetch,
|
|
25
|
+
sleep,
|
|
24
26
|
waitForPXE,
|
|
25
27
|
} from '@aztec/aztec.js';
|
|
26
28
|
import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment';
|
|
@@ -569,10 +571,10 @@ export async function setup(
|
|
|
569
571
|
{ dateProvider, blobSinkClient, telemetry, p2pClientDeps, logger: createLogger('node:MAIN-aztec-node') },
|
|
570
572
|
{ prefilledPublicData },
|
|
571
573
|
);
|
|
572
|
-
const
|
|
574
|
+
const sequencerClient = aztecNode.getSequencer();
|
|
573
575
|
|
|
574
|
-
if (
|
|
575
|
-
const publisher = (
|
|
576
|
+
if (sequencerClient) {
|
|
577
|
+
const publisher = (sequencerClient as TestSequencerClient).sequencer.publisher;
|
|
576
578
|
publisher.l1TxUtils = DelayedTxUtils.fromL1TxUtils(publisher.l1TxUtils, config.ethereumSlotDuration);
|
|
577
579
|
}
|
|
578
580
|
|
|
@@ -604,9 +606,38 @@ export async function setup(
|
|
|
604
606
|
// We need to advance to epoch 2 such that the committee is set up.
|
|
605
607
|
logger.info(`Advancing to epoch 2`);
|
|
606
608
|
await cheatCodes.rollup.advanceToEpoch(2n, { updateDateProvider: dateProvider });
|
|
609
|
+
await cheatCodes.rollup.setupEpoch();
|
|
610
|
+
await cheatCodes.rollup.debugRollup();
|
|
607
611
|
}
|
|
608
612
|
|
|
609
|
-
const
|
|
613
|
+
const sequencer = sequencerClient!.getSequencer();
|
|
614
|
+
const minTxsPerBlock = config.minTxsPerBlock;
|
|
615
|
+
|
|
616
|
+
if (minTxsPerBlock === undefined) {
|
|
617
|
+
throw new Error('minTxsPerBlock is undefined in e2e test setup');
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// Transactions built against the genesis state must be included in block 1, otherwise they are dropped.
|
|
621
|
+
// To avoid test failures from dropped transactions, we ensure progression beyond genesis before proceeding.
|
|
622
|
+
// For account deployments, we set minTxsPerBlock=1 and deploy accounts sequentially for guaranteed success.
|
|
623
|
+
// If no accounts need deployment, we await an empty block to confirm network progression. After either path
|
|
624
|
+
// completes, we restore the original minTxsPerBlock setting.
|
|
625
|
+
// For more details on why the tx would be dropped see `validate_include_by_timestamp` function in
|
|
626
|
+
// `noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/components/validation_requests.nr`.
|
|
627
|
+
let accountManagers: AccountManager[] = [];
|
|
628
|
+
if (numberOfAccounts === 0) {
|
|
629
|
+
// We wait until block 1 is mined to ensure that the network has progressed past genesis.
|
|
630
|
+
sequencer.updateConfig({ minTxsPerBlock: 0 });
|
|
631
|
+
while ((await pxe.getBlockNumber()) === 0) {
|
|
632
|
+
await sleep(2000);
|
|
633
|
+
}
|
|
634
|
+
} else {
|
|
635
|
+
sequencer.updateConfig({ minTxsPerBlock: 1 });
|
|
636
|
+
accountManagers = await deployFundedSchnorrAccounts(pxe, initialFundedAccounts.slice(0, numberOfAccounts));
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
sequencer.updateConfig({ minTxsPerBlock });
|
|
640
|
+
|
|
610
641
|
const wallets = await Promise.all(accountManagers.map(account => account.getWallet()));
|
|
611
642
|
if (initialFundedAccounts.length < numberOfAccounts) {
|
|
612
643
|
// TODO: Create (numberOfAccounts - initialFundedAccounts.length) wallets without funds.
|
|
@@ -653,7 +684,7 @@ export async function setup(
|
|
|
653
684
|
prefilledPublicData,
|
|
654
685
|
proverNode,
|
|
655
686
|
pxe,
|
|
656
|
-
sequencer,
|
|
687
|
+
sequencer: sequencerClient,
|
|
657
688
|
teardown,
|
|
658
689
|
telemetryClient: telemetry,
|
|
659
690
|
wallet: wallets[0],
|