@aztec/end-to-end 1.0.0-nightly.20250707 → 1.0.0-staging.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +2 -2
- package/dest/bench/utils.js +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +1 -1
- 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 +1 -1
- package/dest/e2e_epochs/epochs_test.d.ts +2 -15
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +3 -59
- package/dest/e2e_fees/fees_test.d.ts +1 -1
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +2 -2
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +2 -5
- package/dest/e2e_p2p/shared.d.ts +1 -1
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.d.ts +1 -1
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +1 -2
- package/dest/fixtures/setup_p2p_test.d.ts +0 -2
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +1 -27
- package/dest/fixtures/snapshot_manager.d.ts +1 -1
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +4 -7
- package/dest/fixtures/utils.d.ts +4 -16
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +16 -67
- package/dest/shared/uniswap_l1_l2.d.ts +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.d.ts +1 -1
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.d.ts +0 -5
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +6 -70
- package/dest/spartan/utils.d.ts +2 -21
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +4 -6
- package/package.json +35 -35
- package/src/bench/client_flows/client_flows_benchmark.ts +2 -2
- package/src/bench/utils.ts +1 -1
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +1 -1
- package/src/e2e_epochs/epochs_test.ts +22 -90
- package/src/e2e_fees/fees_test.ts +2 -2
- package/src/e2e_p2p/p2p_network.ts +2 -3
- package/src/e2e_p2p/shared.ts +1 -1
- package/src/fixtures/e2e_prover_test.ts +2 -3
- package/src/fixtures/setup_p2p_test.ts +1 -39
- package/src/fixtures/snapshot_manager.ts +4 -4
- package/src/fixtures/utils.ts +19 -82
- package/src/shared/uniswap_l1_l2.ts +1 -1
- package/src/simulators/lending_simulator.ts +1 -1
- package/src/spartan/setup_test_wallets.ts +4 -81
- package/src/spartan/utils.ts +3 -7
package/dest/fixtures/utils.js
CHANGED
|
@@ -2,9 +2,9 @@ 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,
|
|
5
|
+
import { BatchCall, createAztecNodeClient, createLogger, createPXEClient, makeFetch, waitForPXE } from '@aztec/aztec.js';
|
|
6
6
|
import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment';
|
|
7
|
-
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec/testing';
|
|
7
|
+
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing';
|
|
8
8
|
import { createBlobSinkClient } from '@aztec/blob-sink/client';
|
|
9
9
|
import { createBlobSinkServer } from '@aztec/blob-sink/server';
|
|
10
10
|
import { GENESIS_ARCHIVE_ROOT, SPONSORED_FPC_SALT } from '@aztec/constants';
|
|
@@ -231,9 +231,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
231
231
|
await ethCheatCodes.loadChainState(opts.stateLoad);
|
|
232
232
|
}
|
|
233
233
|
if (opts.l1StartTime) {
|
|
234
|
-
await ethCheatCodes.warp(opts.l1StartTime
|
|
235
|
-
resetBlockInterval: true
|
|
236
|
-
});
|
|
234
|
+
await ethCheatCodes.warp(opts.l1StartTime);
|
|
237
235
|
}
|
|
238
236
|
let publisherPrivKey = undefined;
|
|
239
237
|
let publisherHdAccount = undefined;
|
|
@@ -300,9 +298,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
300
298
|
if (opts.l2StartTime) {
|
|
301
299
|
// This should only be used in synching test or when you need to have a stable
|
|
302
300
|
// timestamp for the first l2 block.
|
|
303
|
-
await ethCheatCodes.warp(opts.l2StartTime
|
|
304
|
-
resetBlockInterval: true
|
|
305
|
-
});
|
|
301
|
+
await ethCheatCodes.warp(opts.l2StartTime);
|
|
306
302
|
}
|
|
307
303
|
const dateProvider = new TestDateProvider();
|
|
308
304
|
dateProvider.setTime(await ethCheatCodes.timestamp() * 1000);
|
|
@@ -346,19 +342,6 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
346
342
|
p2pServiceFactory: getMockPubSubP2PServiceFactory(mockGossipSubNetwork)
|
|
347
343
|
};
|
|
348
344
|
}
|
|
349
|
-
// Transactions built against the genesis state must be included in block 1, otherwise they are dropped.
|
|
350
|
-
// To avoid test failures from dropped transactions, we ensure progression beyond genesis before proceeding.
|
|
351
|
-
// For account deployments, we set minTxsPerBlock=1 and deploy accounts sequentially for guaranteed success.
|
|
352
|
-
// If no accounts need deployment, we await an empty block to confirm network progression. After either path
|
|
353
|
-
// completes, we restore the original minTxsPerBlock setting. The deployment and waiting for empty block is
|
|
354
|
-
// handled by the if-else branches on line 632.
|
|
355
|
-
// For more details on why the tx would be dropped see `validate_include_by_timestamp` function in
|
|
356
|
-
// `noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/components/validation_requests.nr`.
|
|
357
|
-
const originalMinTxsPerBlock = config.minTxsPerBlock;
|
|
358
|
-
if (originalMinTxsPerBlock === undefined) {
|
|
359
|
-
throw new Error('minTxsPerBlock is undefined in e2e test setup');
|
|
360
|
-
}
|
|
361
|
-
config.minTxsPerBlock = numberOfAccounts === 0 ? 0 : 1;
|
|
362
345
|
config.p2pEnabled = opts.mockGossipSubNetwork || config.p2pEnabled;
|
|
363
346
|
config.p2pIp = opts.p2pIp ?? config.p2pIp ?? '127.0.0.1';
|
|
364
347
|
const aztecNode = await AztecNodeService.createAndSync(config, {
|
|
@@ -370,10 +353,10 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
370
353
|
}, {
|
|
371
354
|
prefilledPublicData
|
|
372
355
|
});
|
|
373
|
-
const
|
|
374
|
-
if (
|
|
375
|
-
const publisher =
|
|
376
|
-
publisher.l1TxUtils = DelayedTxUtils.fromL1TxUtils(publisher.l1TxUtils,
|
|
356
|
+
const sequencer = aztecNode.getSequencer();
|
|
357
|
+
if (sequencer) {
|
|
358
|
+
const publisher = sequencer.sequencer.publisher;
|
|
359
|
+
publisher.l1TxUtils = DelayedTxUtils.fromL1TxUtils(publisher.l1TxUtils, config.ethereumSlotDuration);
|
|
377
360
|
}
|
|
378
361
|
let proverNode = undefined;
|
|
379
362
|
if (opts.startProverNode) {
|
|
@@ -396,24 +379,8 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
396
379
|
await cheatCodes.rollup.advanceToEpoch(2n, {
|
|
397
380
|
updateDateProvider: dateProvider
|
|
398
381
|
});
|
|
399
|
-
await cheatCodes.rollup.setupEpoch();
|
|
400
|
-
await cheatCodes.rollup.debugRollup();
|
|
401
|
-
}
|
|
402
|
-
// Below we continue with what we described in the long comment on line 571.
|
|
403
|
-
let accountManagers = [];
|
|
404
|
-
if (numberOfAccounts === 0) {
|
|
405
|
-
logger.info('No accounts are being deployed, waiting for an empty block 1 to be mined');
|
|
406
|
-
while(await pxe.getBlockNumber() === 0){
|
|
407
|
-
await sleep(2000);
|
|
408
|
-
}
|
|
409
|
-
} else {
|
|
410
|
-
logger.info(`${numberOfAccounts} accounts are being deployed. Reliably progressing past genesis by setting minTxsPerBlock to 1 and waiting for the accounts to be deployed`);
|
|
411
|
-
accountManagers = await deployFundedSchnorrAccounts(pxe, initialFundedAccounts.slice(0, numberOfAccounts));
|
|
412
382
|
}
|
|
413
|
-
|
|
414
|
-
sequencerClient.getSequencer().updateConfig({
|
|
415
|
-
minTxsPerBlock: originalMinTxsPerBlock
|
|
416
|
-
});
|
|
383
|
+
const accountManagers = await deployFundedSchnorrAccounts(pxe, initialFundedAccounts.slice(0, numberOfAccounts));
|
|
417
384
|
const wallets = await Promise.all(accountManagers.map((account)=>account.getWallet()));
|
|
418
385
|
if (initialFundedAccounts.length < numberOfAccounts) {
|
|
419
386
|
// TODO: Create (numberOfAccounts - initialFundedAccounts.length) wallets without funds.
|
|
@@ -452,7 +419,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
|
|
|
452
419
|
prefilledPublicData,
|
|
453
420
|
proverNode,
|
|
454
421
|
pxe,
|
|
455
|
-
sequencer
|
|
422
|
+
sequencer,
|
|
456
423
|
teardown,
|
|
457
424
|
telemetryClient: telemetry,
|
|
458
425
|
wallet: wallets[0],
|
|
@@ -540,21 +507,14 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
|
|
|
540
507
|
const diffs = outputs.map((output, i)=>output - initialValues[i]);
|
|
541
508
|
expect(diffs).toEqual(expectedDiffs);
|
|
542
509
|
}
|
|
543
|
-
/**
|
|
544
|
-
* Computes the address of the "canonical" SponosoredFPCContract. This is not a protocol contract
|
|
545
|
-
* but by conventions its address is computed with a salt of 0.
|
|
546
|
-
* @returns The address of the sponsored FPC contract
|
|
547
|
-
*/ export function getSponsoredFPCInstance() {
|
|
548
|
-
return Promise.resolve(getContractInstanceFromDeployParams(SponsoredFPCContract.artifact, {
|
|
549
|
-
salt: new Fr(SPONSORED_FPC_SALT)
|
|
550
|
-
}));
|
|
551
|
-
}
|
|
552
510
|
/**
|
|
553
511
|
* Computes the address of the "canonical" SponosoredFPCContract. This is not a protocol contract
|
|
554
512
|
* but by conventions its address is computed with a salt of 0.
|
|
555
513
|
* @returns The address of the sponsored FPC contract
|
|
556
514
|
*/ export async function getSponsoredFPCAddress() {
|
|
557
|
-
const sponsoredFPCInstance = await
|
|
515
|
+
const sponsoredFPCInstance = await getContractInstanceFromDeployParams(SponsoredFPCContract.artifact, {
|
|
516
|
+
salt: new Fr(SPONSORED_FPC_SALT)
|
|
517
|
+
});
|
|
558
518
|
return sponsoredFPCInstance.address;
|
|
559
519
|
}
|
|
560
520
|
/**
|
|
@@ -570,24 +530,15 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
|
|
|
570
530
|
getLogger().info(`SponsoredFPC: ${instance.address}`);
|
|
571
531
|
return instance;
|
|
572
532
|
}
|
|
573
|
-
/**
|
|
574
|
-
* Registers the SponsoredFPC in this PXE instance
|
|
575
|
-
* @param pxe - The pxe client
|
|
576
|
-
*/ export async function registerSponsoredFPC(pxe) {
|
|
577
|
-
await pxe.registerContract({
|
|
578
|
-
instance: await getSponsoredFPCInstance(),
|
|
579
|
-
artifact: SponsoredFPCContract.artifact
|
|
580
|
-
});
|
|
581
|
-
}
|
|
582
533
|
export async function waitForProvenChain(node, targetBlock, timeoutSec = 60, intervalSec = 1) {
|
|
583
534
|
targetBlock ??= await node.getBlockNumber();
|
|
584
535
|
await retryUntil(async ()=>await node.getProvenBlockNumber() >= targetBlock, 'proven chain status', timeoutSec, intervalSec);
|
|
585
536
|
}
|
|
586
|
-
export function createAndSyncProverNode(proverNodePrivateKey, aztecNodeConfig, proverNodeConfig, aztecNode, prefilledPublicData = []
|
|
537
|
+
export function createAndSyncProverNode(proverNodePrivateKey, aztecNodeConfig, proverNodeConfig, aztecNode, prefilledPublicData = []) {
|
|
587
538
|
return withLogNameSuffix('prover-node', async ()=>{
|
|
588
539
|
// Disable stopping the aztec node as the prover coordination test will kill it otherwise
|
|
589
540
|
// This is only required when stopping the prover node for testing
|
|
590
|
-
const aztecNodeTxProvider =
|
|
541
|
+
const aztecNodeTxProvider = {
|
|
591
542
|
getTxByHash: aztecNode.getTxByHash.bind(aztecNode),
|
|
592
543
|
getTxsByHash: aztecNode.getTxsByHash.bind(aztecNode),
|
|
593
544
|
stop: ()=>Promise.resolve()
|
|
@@ -604,7 +555,7 @@ export function createAndSyncProverNode(proverNodePrivateKey, aztecNodeConfig, p
|
|
|
604
555
|
// Prover node config is for simulated proofs
|
|
605
556
|
const proverConfig = {
|
|
606
557
|
...aztecNodeConfig,
|
|
607
|
-
|
|
558
|
+
proverCoordinationNodeUrls: [],
|
|
608
559
|
realProofs: false,
|
|
609
560
|
proverAgentCount: 2,
|
|
610
561
|
publisherPrivateKey: new SecretValue(proverNodePrivateKey),
|
|
@@ -614,13 +565,11 @@ export function createAndSyncProverNode(proverNodePrivateKey, aztecNodeConfig, p
|
|
|
614
565
|
txGatheringIntervalMs: 1000,
|
|
615
566
|
txGatheringBatchSize: 10,
|
|
616
567
|
txGatheringMaxParallelRequestsPerNode: 10,
|
|
617
|
-
txGatheringTimeoutMs: 24_000,
|
|
618
568
|
proverNodeFailedEpochStore: undefined,
|
|
619
569
|
...proverNodeConfig
|
|
620
570
|
};
|
|
621
571
|
const l1TxUtils = createDelayedL1TxUtils(aztecNodeConfig, proverNodePrivateKey, 'prover-node');
|
|
622
572
|
const proverNode = await createProverNode(proverConfig, {
|
|
623
|
-
...proverNodeDeps,
|
|
624
573
|
aztecNodeTxProvider,
|
|
625
574
|
archiver: archiver,
|
|
626
575
|
l1TxUtils
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AccountWallet, type AztecNode, type Logger, type PXE } from '@aztec/aztec.js';
|
|
2
|
-
import { CheatCodes } from '@aztec/aztec/testing';
|
|
2
|
+
import { CheatCodes } from '@aztec/aztec.js/testing';
|
|
3
3
|
import { type DeployL1ContractsReturnType, type ExtendedViemWalletClient } from '@aztec/ethereum';
|
|
4
4
|
/** Objects to be returned by the uniswap setup function */
|
|
5
5
|
export type UniswapSetupContext = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniswap_l1_l2.d.ts","sourceRoot":"","sources":["../../src/shared/uniswap_l1_l2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,SAAS,EAGd,KAAK,MAAM,EACX,KAAK,GAAG,EAGT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"uniswap_l1_l2.d.ts","sourceRoot":"","sources":["../../src/shared/uniswap_l1_l2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,SAAS,EAGd,KAAK,MAAM,EACX,KAAK,GAAG,EAGT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAI9B,MAAM,iBAAiB,CAAC;AAuBzB,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAAG;IAChC,0BAA0B;IAC1B,SAAS,EAAE,SAAS,CAAC;IACrB,+CAA+C;IAC/C,GAAG,EAAE,GAAG,CAAC;IACT,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,QAAQ,EAAE,wBAAwB,CAAC;IACnC,wBAAwB;IACxB,WAAW,EAAE,aAAa,CAAC;IAC3B,0BAA0B;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO;IACP,uBAAuB,EAAE,2BAA2B,CAAC;IACrD,4BAA4B;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,OAAO,CAAC,mBAAmB,CAAC,EACzC,SAAS,MAAM,OAAO,CAAC,IAAI,CAAC,EAC5B,gCAAkC,SA49BnC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AztecAddress, Fr } from '@aztec/aztec.js';
|
|
2
|
-
import { CheatCodes } from '@aztec/aztec/testing';
|
|
2
|
+
import { CheatCodes } from '@aztec/aztec.js/testing';
|
|
3
3
|
import type { RollupContract } from '@aztec/ethereum';
|
|
4
4
|
import type { TestDateProvider } from '@aztec/foundation/timer';
|
|
5
5
|
import type { LendingContract } from '@aztec/noir-contracts.js/Lending';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lending_simulator.d.ts","sourceRoot":"","sources":["../../src/simulators/lending_simulator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"lending_simulator.d.ts","sourceRoot":"","sources":["../../src/simulators/lending_simulator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,e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,MAAM;IAKjE,aAAa,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM;IAKhE,OAAO,CAAC,OAAO;IAKf,QAAQ,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAM3D,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IASzD,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM;IAK/D,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM;IAK9D,OAAO,CAAC,KAAK;IAQb,yBAAyB,CAAC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,UAAQ;IASzE,KAAK;CA0BZ"}
|
|
@@ -10,7 +10,6 @@ export interface TestWallets {
|
|
|
10
10
|
tokenAddress: AztecAddress;
|
|
11
11
|
}
|
|
12
12
|
export declare function setupTestWalletsWithTokens(pxeUrl: string, mintAmount: bigint, logger: Logger): Promise<TestWallets>;
|
|
13
|
-
export declare function deploySponsoredTestWallets(pxe: PXE, mintAmount: bigint, logger: Logger, numberOfFundedWallets?: number): Promise<TestWallets>;
|
|
14
13
|
export declare function deployTestWalletWithTokens(pxeUrl: string, nodeUrl: string, l1RpcUrls: string[], mnemonicOrPrivateKey: string, mintAmount: bigint, logger: Logger, numberOfFundedWallets?: number): Promise<TestWallets>;
|
|
15
14
|
export declare function performTransfers({ testWallets, rounds, transferAmount, logger, }: {
|
|
16
15
|
testWallets: TestWallets;
|
|
@@ -18,8 +17,4 @@ export declare function performTransfers({ testWallets, rounds, transferAmount,
|
|
|
18
17
|
transferAmount: bigint;
|
|
19
18
|
logger: Logger;
|
|
20
19
|
}): Promise<void>;
|
|
21
|
-
export declare function startCompatiblePXE(nodeUrl: string, proverEnabled: boolean, logger: Logger): Promise<{
|
|
22
|
-
pxe: PXE;
|
|
23
|
-
cleanup: () => Promise<void>;
|
|
24
|
-
}>;
|
|
25
20
|
//# sourceMappingURL=setup_test_wallets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup_test_wallets.d.ts","sourceRoot":"","sources":["../../src/spartan/setup_test_wallets.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"setup_test_wallets.d.ts","sourceRoot":"","sources":["../../src/spartan/setup_test_wallets.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EAKjB,KAAK,GAAG,EAIT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,gBAAgB,EAAE,aAAa,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,0BAA0B,CAAC;IAC5C,YAAY,EAAE,YAAY,CAAC;CAC5B;AAMD,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,WAAW,CAAC,CAYtB;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EAAE,EACnB,oBAAoB,EAAE,MAAM,EAC5B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,qBAAqB,SAAI,GACxB,OAAO,CAAC,WAAW,CAAC,CAqCtB;AA6DD,wBAAsB,gBAAgB,CAAC,EACrC,WAAW,EACX,MAAM,EACN,cAAc,EACd,MAAM,GACP,EAAE;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,iBAqBA"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { getSchnorrAccount, getSchnorrWalletWithSecretKey } from '@aztec/accounts/schnorr';
|
|
2
2
|
import { generateSchnorrAccounts, getDeployedTestAccountsWallets } from '@aztec/accounts/testing';
|
|
3
|
-
import { FeeJuicePaymentMethodWithClaim, Fr, L1FeeJuicePortalManager,
|
|
3
|
+
import { FeeJuicePaymentMethodWithClaim, Fr, L1FeeJuicePortalManager, createAztecNodeClient, createCompatibleClient, retryUntil } from '@aztec/aztec.js';
|
|
4
4
|
import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
|
|
5
5
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
6
|
-
import { createPXEService } from '@aztec/pxe/server';
|
|
7
|
-
import { getACVMConfig } from '../fixtures/get_acvm_config.js';
|
|
8
|
-
import { getBBConfig } from '../fixtures/get_bb_config.js';
|
|
9
|
-
import { getSponsoredFPCAddress, registerSponsoredFPC } from '../fixtures/utils.js';
|
|
10
6
|
const TOKEN_NAME = 'USDC';
|
|
11
7
|
const TOKEN_SYMBOL = 'USD';
|
|
12
8
|
const TOKEN_DECIMALS = 18n;
|
|
@@ -15,37 +11,7 @@ export async function setupTestWalletsWithTokens(pxeUrl, mintAmount, logger) {
|
|
|
15
11
|
const pxe = await createCompatibleClient(pxeUrl, logger);
|
|
16
12
|
const [recipientWallet, ...wallets] = (await getDeployedTestAccountsWallets(pxe)).slice(0, WALLET_COUNT + 1);
|
|
17
13
|
const tokenAdmin = wallets[0];
|
|
18
|
-
const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount,
|
|
19
|
-
const tokenAdminWallet = await TokenContract.at(tokenAddress, tokenAdmin);
|
|
20
|
-
return {
|
|
21
|
-
pxe,
|
|
22
|
-
wallets,
|
|
23
|
-
tokenAdminWallet,
|
|
24
|
-
tokenName: TOKEN_NAME,
|
|
25
|
-
tokenAddress,
|
|
26
|
-
recipientWallet
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export async function deploySponsoredTestWallets(pxe, mintAmount, logger, numberOfFundedWallets = 1) {
|
|
30
|
-
const [recipient, ...funded] = await generateSchnorrAccounts(numberOfFundedWallets + 1);
|
|
31
|
-
const recipientWallet = await getSchnorrWalletWithSecretKey(pxe, recipient.secret, recipient.signingKey, recipient.salt);
|
|
32
|
-
const fundedAccounts = await Promise.all(funded.map((a)=>getSchnorrAccount(pxe, a.secret, a.signingKey, a.salt)));
|
|
33
|
-
await registerSponsoredFPC(pxe);
|
|
34
|
-
const wallets = await Promise.all(fundedAccounts.map(async (a)=>{
|
|
35
|
-
const wallet = await a.getWallet();
|
|
36
|
-
const paymentMethod = new SponsoredFeePaymentMethod(await getSponsoredFPCAddress());
|
|
37
|
-
await a.deploy({
|
|
38
|
-
fee: {
|
|
39
|
-
paymentMethod
|
|
40
|
-
}
|
|
41
|
-
}).wait({
|
|
42
|
-
timeout: 2400
|
|
43
|
-
}); // increase timeout on purpose in order to account for two empty epochs
|
|
44
|
-
logger.info(`Account deployed at ${a.getAddress()}`);
|
|
45
|
-
return wallet;
|
|
46
|
-
}));
|
|
47
|
-
const tokenAdmin = wallets[0];
|
|
48
|
-
const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount, new SponsoredFeePaymentMethod(await getSponsoredFPCAddress()), logger);
|
|
14
|
+
const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount, logger);
|
|
49
15
|
const tokenAdminWallet = await TokenContract.at(tokenAddress, tokenAdmin);
|
|
50
16
|
return {
|
|
51
17
|
pxe,
|
|
@@ -79,7 +45,7 @@ export async function deployTestWalletWithTokens(pxeUrl, nodeUrl, l1RpcUrls, mne
|
|
|
79
45
|
return wallet;
|
|
80
46
|
}));
|
|
81
47
|
const tokenAdmin = wallets[0];
|
|
82
|
-
const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount,
|
|
48
|
+
const tokenAddress = await deployTokenAndMint(wallets, tokenAdmin.getAddress(), mintAmount, logger);
|
|
83
49
|
const tokenAdminWallet = await TokenContract.at(tokenAddress, tokenAdmin);
|
|
84
50
|
return {
|
|
85
51
|
pxe,
|
|
@@ -108,22 +74,14 @@ async function advanceL2Block(node, nodeAdmin) {
|
|
|
108
74
|
await nodeAdmin?.flushTxs();
|
|
109
75
|
await retryUntil(async ()=>await node.getBlockNumber() >= initialBlockNumber + 1);
|
|
110
76
|
}
|
|
111
|
-
async function deployTokenAndMint(wallets, admin, mintAmount,
|
|
77
|
+
async function deployTokenAndMint(wallets, admin, mintAmount, logger) {
|
|
112
78
|
logger.verbose(`Deploying TokenContract...`);
|
|
113
|
-
const tokenContract = await TokenContract.deploy(wallets[0], admin, TOKEN_NAME, TOKEN_SYMBOL, TOKEN_DECIMALS).send({
|
|
114
|
-
fee: {
|
|
115
|
-
paymentMethod
|
|
116
|
-
}
|
|
117
|
-
}).deployed({
|
|
79
|
+
const tokenContract = await TokenContract.deploy(wallets[0], admin, TOKEN_NAME, TOKEN_SYMBOL, TOKEN_DECIMALS).send().deployed({
|
|
118
80
|
timeout: 600
|
|
119
81
|
});
|
|
120
82
|
const tokenAddress = tokenContract.address;
|
|
121
83
|
logger.verbose(`Minting ${mintAmount} public assets to the ${wallets.length} wallets...`);
|
|
122
|
-
await Promise.all(wallets.map(async (w)=>(await TokenContract.at(tokenAddress, w)).methods.mint_to_public(w.getAddress(), mintAmount).send({
|
|
123
|
-
fee: {
|
|
124
|
-
paymentMethod
|
|
125
|
-
}
|
|
126
|
-
}).wait({
|
|
84
|
+
await Promise.all(wallets.map(async (w)=>(await TokenContract.at(tokenAddress, w)).methods.mint_to_public(w.getAddress(), mintAmount).send().wait({
|
|
127
85
|
timeout: 600
|
|
128
86
|
})));
|
|
129
87
|
logger.verbose(`Minting complete.`);
|
|
@@ -140,25 +98,3 @@ export async function performTransfers({ testWallets, rounds, transferAmount, lo
|
|
|
140
98
|
logger.info(`Completed round ${i + 1} / ${rounds}`);
|
|
141
99
|
}
|
|
142
100
|
}
|
|
143
|
-
export async function startCompatiblePXE(nodeUrl, proverEnabled, logger) {
|
|
144
|
-
const node = createAztecNodeClient(nodeUrl);
|
|
145
|
-
const [bbConfig, acvmConfig] = await Promise.all([
|
|
146
|
-
getBBConfig(logger),
|
|
147
|
-
getACVMConfig(logger)
|
|
148
|
-
]);
|
|
149
|
-
const pxe = await createPXEService(node, {
|
|
150
|
-
dataDirectory: undefined,
|
|
151
|
-
dataStoreMapSizeKB: 1024 * 1024,
|
|
152
|
-
...bbConfig,
|
|
153
|
-
...acvmConfig,
|
|
154
|
-
proverEnabled
|
|
155
|
-
});
|
|
156
|
-
return {
|
|
157
|
-
pxe,
|
|
158
|
-
async cleanup () {
|
|
159
|
-
await pxe.stop();
|
|
160
|
-
await bbConfig?.cleanup();
|
|
161
|
-
await acvmConfig?.cleanup();
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
}
|
package/dest/spartan/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RollupCheatCodes } from '@aztec/aztec/testing';
|
|
1
|
+
import type { RollupCheatCodes } from '@aztec/aztec.js/testing';
|
|
2
2
|
import type { Logger } from '@aztec/foundation/log';
|
|
3
3
|
import type { SequencerConfig } from '@aztec/sequencer-client';
|
|
4
4
|
import { ChildProcess } from 'child_process';
|
|
@@ -9,7 +9,6 @@ declare const k8sLocalConfigSchema: z.ZodObject<{
|
|
|
9
9
|
AZTEC_SLOT_DURATION: z.ZodNumber;
|
|
10
10
|
AZTEC_EPOCH_DURATION: z.ZodNumber;
|
|
11
11
|
AZTEC_PROOF_SUBMISSION_WINDOW: z.ZodNumber;
|
|
12
|
-
AZTEC_REAL_PROOFS: z.ZodDefault<z.ZodString>;
|
|
13
12
|
INSTANCE_NAME: z.ZodString;
|
|
14
13
|
NAMESPACE: z.ZodString;
|
|
15
14
|
CONTAINER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
@@ -31,7 +30,6 @@ declare const k8sLocalConfigSchema: z.ZodObject<{
|
|
|
31
30
|
AZTEC_SLOT_DURATION: number;
|
|
32
31
|
AZTEC_EPOCH_DURATION: number;
|
|
33
32
|
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
34
|
-
AZTEC_REAL_PROOFS: string;
|
|
35
33
|
INSTANCE_NAME: string;
|
|
36
34
|
NAMESPACE: string;
|
|
37
35
|
CONTAINER_NODE_PORT: number;
|
|
@@ -58,7 +56,6 @@ declare const k8sLocalConfigSchema: z.ZodObject<{
|
|
|
58
56
|
SPARTAN_DIR: string;
|
|
59
57
|
K8S: "local";
|
|
60
58
|
ETHEREUM_HOSTS?: string | undefined;
|
|
61
|
-
AZTEC_REAL_PROOFS?: string | undefined;
|
|
62
59
|
CONTAINER_NODE_PORT?: number | undefined;
|
|
63
60
|
CONTAINER_NODE_ADMIN_PORT?: number | undefined;
|
|
64
61
|
CONTAINER_SEQUENCER_PORT?: number | undefined;
|
|
@@ -76,7 +73,6 @@ declare const k8sGCloudConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
76
73
|
AZTEC_SLOT_DURATION: z.ZodNumber;
|
|
77
74
|
AZTEC_EPOCH_DURATION: z.ZodNumber;
|
|
78
75
|
AZTEC_PROOF_SUBMISSION_WINDOW: z.ZodNumber;
|
|
79
|
-
AZTEC_REAL_PROOFS: z.ZodDefault<z.ZodString>;
|
|
80
76
|
INSTANCE_NAME: z.ZodString;
|
|
81
77
|
NAMESPACE: z.ZodString;
|
|
82
78
|
CONTAINER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
@@ -97,13 +93,11 @@ declare const k8sGCloudConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
97
93
|
K8S: z.ZodLiteral<"gcloud">;
|
|
98
94
|
CLUSTER_NAME: z.ZodString;
|
|
99
95
|
REGION: z.ZodString;
|
|
100
|
-
PROJECT_ID: z.ZodString;
|
|
101
96
|
}>, "strip", z.ZodTypeAny, {
|
|
102
97
|
ETHEREUM_SLOT_DURATION: number;
|
|
103
98
|
AZTEC_SLOT_DURATION: number;
|
|
104
99
|
AZTEC_EPOCH_DURATION: number;
|
|
105
100
|
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
106
|
-
AZTEC_REAL_PROOFS: string;
|
|
107
101
|
INSTANCE_NAME: string;
|
|
108
102
|
NAMESPACE: string;
|
|
109
103
|
CONTAINER_NODE_PORT: number;
|
|
@@ -120,7 +114,6 @@ declare const k8sGCloudConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
120
114
|
K8S: "gcloud";
|
|
121
115
|
CLUSTER_NAME: string;
|
|
122
116
|
REGION: string;
|
|
123
|
-
PROJECT_ID: string;
|
|
124
117
|
ETHEREUM_HOSTS?: string | undefined;
|
|
125
118
|
GRAFANA_PASSWORD?: string | undefined;
|
|
126
119
|
}, {
|
|
@@ -134,9 +127,7 @@ declare const k8sGCloudConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
134
127
|
K8S: "gcloud";
|
|
135
128
|
CLUSTER_NAME: string;
|
|
136
129
|
REGION: string;
|
|
137
|
-
PROJECT_ID: string;
|
|
138
130
|
ETHEREUM_HOSTS?: string | undefined;
|
|
139
|
-
AZTEC_REAL_PROOFS?: string | undefined;
|
|
140
131
|
CONTAINER_NODE_PORT?: number | undefined;
|
|
141
132
|
CONTAINER_NODE_ADMIN_PORT?: number | undefined;
|
|
142
133
|
CONTAINER_SEQUENCER_PORT?: number | undefined;
|
|
@@ -173,7 +164,6 @@ declare const envSchema: z.ZodDiscriminatedUnion<"K8S", [z.ZodObject<{
|
|
|
173
164
|
AZTEC_SLOT_DURATION: z.ZodNumber;
|
|
174
165
|
AZTEC_EPOCH_DURATION: z.ZodNumber;
|
|
175
166
|
AZTEC_PROOF_SUBMISSION_WINDOW: z.ZodNumber;
|
|
176
|
-
AZTEC_REAL_PROOFS: z.ZodDefault<z.ZodString>;
|
|
177
167
|
INSTANCE_NAME: z.ZodString;
|
|
178
168
|
NAMESPACE: z.ZodString;
|
|
179
169
|
CONTAINER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
@@ -195,7 +185,6 @@ declare const envSchema: z.ZodDiscriminatedUnion<"K8S", [z.ZodObject<{
|
|
|
195
185
|
AZTEC_SLOT_DURATION: number;
|
|
196
186
|
AZTEC_EPOCH_DURATION: number;
|
|
197
187
|
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
198
|
-
AZTEC_REAL_PROOFS: string;
|
|
199
188
|
INSTANCE_NAME: string;
|
|
200
189
|
NAMESPACE: string;
|
|
201
190
|
CONTAINER_NODE_PORT: number;
|
|
@@ -222,7 +211,6 @@ declare const envSchema: z.ZodDiscriminatedUnion<"K8S", [z.ZodObject<{
|
|
|
222
211
|
SPARTAN_DIR: string;
|
|
223
212
|
K8S: "local";
|
|
224
213
|
ETHEREUM_HOSTS?: string | undefined;
|
|
225
|
-
AZTEC_REAL_PROOFS?: string | undefined;
|
|
226
214
|
CONTAINER_NODE_PORT?: number | undefined;
|
|
227
215
|
CONTAINER_NODE_ADMIN_PORT?: number | undefined;
|
|
228
216
|
CONTAINER_SEQUENCER_PORT?: number | undefined;
|
|
@@ -239,7 +227,6 @@ declare const envSchema: z.ZodDiscriminatedUnion<"K8S", [z.ZodObject<{
|
|
|
239
227
|
AZTEC_SLOT_DURATION: z.ZodNumber;
|
|
240
228
|
AZTEC_EPOCH_DURATION: z.ZodNumber;
|
|
241
229
|
AZTEC_PROOF_SUBMISSION_WINDOW: z.ZodNumber;
|
|
242
|
-
AZTEC_REAL_PROOFS: z.ZodDefault<z.ZodString>;
|
|
243
230
|
INSTANCE_NAME: z.ZodString;
|
|
244
231
|
NAMESPACE: z.ZodString;
|
|
245
232
|
CONTAINER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
@@ -260,13 +247,11 @@ declare const envSchema: z.ZodDiscriminatedUnion<"K8S", [z.ZodObject<{
|
|
|
260
247
|
K8S: z.ZodLiteral<"gcloud">;
|
|
261
248
|
CLUSTER_NAME: z.ZodString;
|
|
262
249
|
REGION: z.ZodString;
|
|
263
|
-
PROJECT_ID: z.ZodString;
|
|
264
250
|
}>, "strip", z.ZodTypeAny, {
|
|
265
251
|
ETHEREUM_SLOT_DURATION: number;
|
|
266
252
|
AZTEC_SLOT_DURATION: number;
|
|
267
253
|
AZTEC_EPOCH_DURATION: number;
|
|
268
254
|
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
269
|
-
AZTEC_REAL_PROOFS: string;
|
|
270
255
|
INSTANCE_NAME: string;
|
|
271
256
|
NAMESPACE: string;
|
|
272
257
|
CONTAINER_NODE_PORT: number;
|
|
@@ -283,7 +268,6 @@ declare const envSchema: z.ZodDiscriminatedUnion<"K8S", [z.ZodObject<{
|
|
|
283
268
|
K8S: "gcloud";
|
|
284
269
|
CLUSTER_NAME: string;
|
|
285
270
|
REGION: string;
|
|
286
|
-
PROJECT_ID: string;
|
|
287
271
|
ETHEREUM_HOSTS?: string | undefined;
|
|
288
272
|
GRAFANA_PASSWORD?: string | undefined;
|
|
289
273
|
}, {
|
|
@@ -297,9 +281,7 @@ declare const envSchema: z.ZodDiscriminatedUnion<"K8S", [z.ZodObject<{
|
|
|
297
281
|
K8S: "gcloud";
|
|
298
282
|
CLUSTER_NAME: string;
|
|
299
283
|
REGION: string;
|
|
300
|
-
PROJECT_ID: string;
|
|
301
284
|
ETHEREUM_HOSTS?: string | undefined;
|
|
302
|
-
AZTEC_REAL_PROOFS?: string | undefined;
|
|
303
285
|
CONTAINER_NODE_PORT?: number | undefined;
|
|
304
286
|
CONTAINER_NODE_ADMIN_PORT?: number | undefined;
|
|
305
287
|
CONTAINER_SEQUENCER_PORT?: number | undefined;
|
|
@@ -362,11 +344,10 @@ export declare function deleteResourceByName({ resource, namespace, name, force,
|
|
|
362
344
|
name: string;
|
|
363
345
|
force?: boolean;
|
|
364
346
|
}): Promise<string>;
|
|
365
|
-
export declare function deleteResourceByLabel({ resource, namespace, label,
|
|
347
|
+
export declare function deleteResourceByLabel({ resource, namespace, label, }: {
|
|
366
348
|
resource: string;
|
|
367
349
|
namespace: string;
|
|
368
350
|
label: string;
|
|
369
|
-
timeout?: string;
|
|
370
351
|
}): Promise<string>;
|
|
371
352
|
export declare function waitForResourceByLabel({ resource, label, namespace, condition, timeout, }: {
|
|
372
353
|
resource: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/spartan/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/spartan/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAyB,MAAM,eAAe,CAAC;AAGpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAmBxF,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBxB,CAAC;AAEH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzB,CAAC;AAEH,QAAA,M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AM,CAAC;CAChB,mBAQA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,UAAU,EACV,SAAS,EACT,UAAU,EACV,MAAM,GACP,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,mBAQA;AAED,wBAAsB,kBAAkB,CACtC,gBAAgB,EAAE,gBAAgB,EAClC,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,iBAef;AAED,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAMjE;AAED,wBAAsB,8BAA8B,CAClD,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,iBAgBf;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,iBAgB3F;AAED,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,iBAIxF;AAED,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,qBAIpD;AAsBD,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,iBAU5F;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,iBAcpD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAW1C"}
|
package/dest/spartan/utils.js
CHANGED
|
@@ -21,7 +21,6 @@ const k8sLocalConfigSchema = z.object({
|
|
|
21
21
|
AZTEC_SLOT_DURATION: z.coerce.number().min(1, 'AZTEC_SLOT_DURATION env variable must be set'),
|
|
22
22
|
AZTEC_EPOCH_DURATION: z.coerce.number().min(1, 'AZTEC_EPOCH_DURATION env variable must be set'),
|
|
23
23
|
AZTEC_PROOF_SUBMISSION_WINDOW: z.coerce.number().min(1, 'AZTEC_PROOF_SUBMISSION_WINDOW env variable must be set'),
|
|
24
|
-
AZTEC_REAL_PROOFS: z.string().default('false'),
|
|
25
24
|
INSTANCE_NAME: z.string().min(1, 'INSTANCE_NAME env variable must be set'),
|
|
26
25
|
NAMESPACE: z.string().min(1, 'NAMESPACE env variable must be set'),
|
|
27
26
|
CONTAINER_NODE_PORT: z.coerce.number().default(8080),
|
|
@@ -42,8 +41,7 @@ const k8sLocalConfigSchema = z.object({
|
|
|
42
41
|
const k8sGCloudConfigSchema = k8sLocalConfigSchema.extend({
|
|
43
42
|
K8S: z.literal('gcloud'),
|
|
44
43
|
CLUSTER_NAME: z.string().min(1, 'CLUSTER_NAME env variable must be set'),
|
|
45
|
-
REGION: z.string().min(1, 'REGION env variable must be set')
|
|
46
|
-
PROJECT_ID: z.string().min(1, 'PROJECT_ID env variable must be set')
|
|
44
|
+
REGION: z.string().min(1, 'REGION env variable must be set')
|
|
47
45
|
});
|
|
48
46
|
const directConfigSchema = z.object({
|
|
49
47
|
PXE_URL: z.string().url('PXE_URL must be a valid URL'),
|
|
@@ -66,7 +64,7 @@ export function isGCloudConfig(config) {
|
|
|
66
64
|
export function setupEnvironment(env) {
|
|
67
65
|
const config = envSchema.parse(env);
|
|
68
66
|
if (isGCloudConfig(config)) {
|
|
69
|
-
const command = `gcloud container clusters get-credentials ${config.CLUSTER_NAME} --region=${config.REGION}
|
|
67
|
+
const command = `gcloud container clusters get-credentials ${config.CLUSTER_NAME} --region=${config.REGION}`;
|
|
70
68
|
execSync(command);
|
|
71
69
|
}
|
|
72
70
|
return config;
|
|
@@ -190,8 +188,8 @@ export async function deleteResourceByName({ resource, namespace, name, force =
|
|
|
190
188
|
const { stdout } = await execAsync(command);
|
|
191
189
|
return stdout;
|
|
192
190
|
}
|
|
193
|
-
export async function deleteResourceByLabel({ resource, namespace, label
|
|
194
|
-
const command = `kubectl delete ${resource} -l ${label} -n ${namespace} --ignore-not-found=true --wait=true
|
|
191
|
+
export async function deleteResourceByLabel({ resource, namespace, label }) {
|
|
192
|
+
const command = `kubectl delete ${resource} -l ${label} -n ${namespace} --ignore-not-found=true --wait=true`;
|
|
195
193
|
logger.info(`command: ${command}`);
|
|
196
194
|
const { stdout } = await execAsync(command);
|
|
197
195
|
return stdout;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-staging.0",
|
|
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.0.0-
|
|
29
|
-
"@aztec/archiver": "1.0.0-
|
|
30
|
-
"@aztec/aztec": "1.0.0-
|
|
31
|
-
"@aztec/aztec-node": "1.0.0-
|
|
32
|
-
"@aztec/aztec.js": "1.0.0-
|
|
33
|
-
"@aztec/bb-prover": "1.0.0-
|
|
34
|
-
"@aztec/blob-lib": "1.0.0-
|
|
35
|
-
"@aztec/blob-sink": "1.0.0-
|
|
36
|
-
"@aztec/bot": "1.0.0-
|
|
37
|
-
"@aztec/cli": "1.0.0-
|
|
38
|
-
"@aztec/constants": "1.0.0-
|
|
39
|
-
"@aztec/entrypoints": "1.0.0-
|
|
40
|
-
"@aztec/epoch-cache": "1.0.0-
|
|
41
|
-
"@aztec/ethereum": "1.0.0-
|
|
42
|
-
"@aztec/foundation": "1.0.0-
|
|
43
|
-
"@aztec/kv-store": "1.0.0-
|
|
44
|
-
"@aztec/l1-artifacts": "1.0.0-
|
|
45
|
-
"@aztec/merkle-tree": "1.0.0-
|
|
46
|
-
"@aztec/noir-contracts.js": "1.0.0-
|
|
47
|
-
"@aztec/noir-noirc_abi": "1.0.0-
|
|
48
|
-
"@aztec/noir-protocol-circuits-types": "1.0.0-
|
|
49
|
-
"@aztec/noir-test-contracts.js": "1.0.0-
|
|
50
|
-
"@aztec/p2p": "1.0.0-
|
|
51
|
-
"@aztec/protocol-contracts": "1.0.0-
|
|
52
|
-
"@aztec/prover-client": "1.0.0-
|
|
53
|
-
"@aztec/prover-node": "1.0.0-
|
|
54
|
-
"@aztec/pxe": "1.0.0-
|
|
55
|
-
"@aztec/sequencer-client": "1.0.0-
|
|
56
|
-
"@aztec/simulator": "1.0.0-
|
|
57
|
-
"@aztec/slasher": "1.0.0-
|
|
58
|
-
"@aztec/stdlib": "1.0.0-
|
|
59
|
-
"@aztec/telemetry-client": "1.0.0-
|
|
60
|
-
"@aztec/validator-client": "1.0.0-
|
|
61
|
-
"@aztec/world-state": "1.0.0-
|
|
28
|
+
"@aztec/accounts": "1.0.0-staging.0",
|
|
29
|
+
"@aztec/archiver": "1.0.0-staging.0",
|
|
30
|
+
"@aztec/aztec": "1.0.0-staging.0",
|
|
31
|
+
"@aztec/aztec-node": "1.0.0-staging.0",
|
|
32
|
+
"@aztec/aztec.js": "1.0.0-staging.0",
|
|
33
|
+
"@aztec/bb-prover": "1.0.0-staging.0",
|
|
34
|
+
"@aztec/blob-lib": "1.0.0-staging.0",
|
|
35
|
+
"@aztec/blob-sink": "1.0.0-staging.0",
|
|
36
|
+
"@aztec/bot": "1.0.0-staging.0",
|
|
37
|
+
"@aztec/cli": "1.0.0-staging.0",
|
|
38
|
+
"@aztec/constants": "1.0.0-staging.0",
|
|
39
|
+
"@aztec/entrypoints": "1.0.0-staging.0",
|
|
40
|
+
"@aztec/epoch-cache": "1.0.0-staging.0",
|
|
41
|
+
"@aztec/ethereum": "1.0.0-staging.0",
|
|
42
|
+
"@aztec/foundation": "1.0.0-staging.0",
|
|
43
|
+
"@aztec/kv-store": "1.0.0-staging.0",
|
|
44
|
+
"@aztec/l1-artifacts": "1.0.0-staging.0",
|
|
45
|
+
"@aztec/merkle-tree": "1.0.0-staging.0",
|
|
46
|
+
"@aztec/noir-contracts.js": "1.0.0-staging.0",
|
|
47
|
+
"@aztec/noir-noirc_abi": "1.0.0-staging.0",
|
|
48
|
+
"@aztec/noir-protocol-circuits-types": "1.0.0-staging.0",
|
|
49
|
+
"@aztec/noir-test-contracts.js": "1.0.0-staging.0",
|
|
50
|
+
"@aztec/p2p": "1.0.0-staging.0",
|
|
51
|
+
"@aztec/protocol-contracts": "1.0.0-staging.0",
|
|
52
|
+
"@aztec/prover-client": "1.0.0-staging.0",
|
|
53
|
+
"@aztec/prover-node": "1.0.0-staging.0",
|
|
54
|
+
"@aztec/pxe": "1.0.0-staging.0",
|
|
55
|
+
"@aztec/sequencer-client": "1.0.0-staging.0",
|
|
56
|
+
"@aztec/simulator": "1.0.0-staging.0",
|
|
57
|
+
"@aztec/slasher": "1.0.0-staging.0",
|
|
58
|
+
"@aztec/stdlib": "1.0.0-staging.0",
|
|
59
|
+
"@aztec/telemetry-client": "1.0.0-staging.0",
|
|
60
|
+
"@aztec/validator-client": "1.0.0-staging.0",
|
|
61
|
+
"@aztec/world-state": "1.0.0-staging.0",
|
|
62
62
|
"@iarna/toml": "^2.2.5",
|
|
63
63
|
"@jest/globals": "^30.0.0",
|
|
64
64
|
"@noble/curves": "^1.0.0",
|