@aztec/aztec 3.0.0-canary.a9708bd → 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/README.md +1 -1
- package/dest/bin/index.d.ts +1 -1
- package/dest/bin/index.js +9 -9
- package/dest/cli/aztec_start_action.d.ts +1 -1
- package/dest/cli/aztec_start_action.d.ts.map +1 -1
- package/dest/cli/aztec_start_action.js +10 -25
- package/dest/cli/aztec_start_options.d.ts +2 -2
- package/dest/cli/aztec_start_options.d.ts.map +1 -1
- package/dest/cli/aztec_start_options.js +115 -231
- package/dest/cli/cli.d.ts +1 -1
- package/dest/cli/cli.d.ts.map +1 -1
- package/dest/cli/cli.js +46 -1
- package/dest/cli/cmds/start_archiver.d.ts +1 -1
- package/dest/cli/cmds/start_archiver.d.ts.map +1 -1
- package/dest/cli/cmds/start_archiver.js +4 -4
- package/dest/cli/cmds/start_blob_sink.d.ts +1 -1
- package/dest/cli/cmds/start_blob_sink.d.ts.map +1 -1
- package/dest/cli/cmds/start_blob_sink.js +2 -2
- package/dest/cli/cmds/start_bot.d.ts +4 -7
- package/dest/cli/cmds/start_bot.d.ts.map +1 -1
- package/dest/cli/cmds/start_bot.js +25 -14
- package/dest/cli/cmds/start_node.d.ts +1 -1
- package/dest/cli/cmds/start_node.d.ts.map +1 -1
- package/dest/cli/cmds/start_node.js +13 -30
- package/dest/cli/cmds/start_p2p_bootstrap.d.ts +1 -1
- package/dest/cli/cmds/start_p2p_bootstrap.js +1 -1
- package/dest/cli/cmds/start_prover_agent.d.ts +1 -1
- package/dest/cli/cmds/start_prover_agent.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_agent.js +11 -2
- package/dest/cli/cmds/start_prover_broker.d.ts +1 -1
- package/dest/cli/cmds/start_prover_broker.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_broker.js +8 -3
- package/dest/cli/cmds/start_prover_node.d.ts +1 -1
- package/dest/cli/cmds/start_prover_node.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_node.js +17 -12
- package/dest/cli/cmds/start_txe.d.ts +1 -1
- package/dest/cli/index.d.ts +1 -1
- package/dest/cli/preload_crs.d.ts +1 -1
- package/dest/cli/release_version.d.ts +1 -1
- package/dest/cli/util.d.ts +12 -10
- package/dest/cli/util.d.ts.map +1 -1
- package/dest/cli/util.js +13 -13
- package/dest/cli/versioning.d.ts +1 -1
- package/dest/cli/versioning.js +3 -3
- package/dest/examples/token.d.ts +1 -1
- package/dest/examples/token.js +18 -16
- package/dest/examples/util.d.ts +3 -3
- package/dest/examples/util.d.ts.map +1 -1
- package/dest/examples/util.js +1 -1
- package/dest/index.d.ts +2 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- package/dest/local-network/banana_fpc.d.ts +10 -0
- package/dest/local-network/banana_fpc.d.ts.map +1 -0
- package/dest/{sandbox → local-network}/banana_fpc.js +15 -19
- package/dest/local-network/index.d.ts +4 -0
- package/dest/local-network/index.d.ts.map +1 -0
- package/dest/local-network/index.js +3 -0
- package/dest/local-network/local-network.d.ts +74 -0
- package/dest/local-network/local-network.d.ts.map +1 -0
- package/dest/{sandbox/sandbox.js → local-network/local-network.js} +35 -43
- package/dest/local-network/sponsored_fpc.d.ts +5 -0
- package/dest/local-network/sponsored_fpc.d.ts.map +1 -0
- package/dest/{sandbox → local-network}/sponsored_fpc.js +7 -8
- package/dest/mnemonic.d.ts +1 -1
- package/dest/splash.d.ts +1 -1
- package/dest/testing/anvil_test_watcher.d.ts +4 -4
- package/dest/testing/anvil_test_watcher.d.ts.map +1 -1
- package/dest/testing/anvil_test_watcher.js +19 -18
- package/dest/testing/cheat_codes.d.ts +7 -10
- package/dest/testing/cheat_codes.d.ts.map +1 -1
- package/dest/testing/cheat_codes.js +9 -10
- package/dest/testing/index.d.ts +1 -2
- package/dest/testing/index.d.ts.map +1 -1
- package/dest/testing/index.js +0 -1
- package/package.json +38 -36
- package/src/bin/index.ts +9 -9
- package/src/cli/aztec_start_action.ts +10 -22
- package/src/cli/aztec_start_options.ts +124 -238
- package/src/cli/cli.ts +46 -1
- package/src/cli/cmds/start_archiver.ts +4 -4
- package/src/cli/cmds/start_blob_sink.ts +2 -2
- package/src/cli/cmds/start_bot.ts +36 -13
- package/src/cli/cmds/start_node.ts +16 -27
- package/src/cli/cmds/start_p2p_bootstrap.ts +1 -1
- package/src/cli/cmds/start_prover_agent.ts +7 -2
- package/src/cli/cmds/start_prover_broker.ts +17 -3
- package/src/cli/cmds/start_prover_node.ts +14 -14
- package/src/cli/util.ts +21 -18
- package/src/cli/versioning.ts +3 -3
- package/src/examples/token.ts +20 -17
- package/src/examples/util.ts +2 -2
- package/src/index.ts +5 -5
- package/src/{sandbox → local-network}/banana_fpc.ts +16 -21
- package/src/local-network/index.ts +7 -0
- package/src/{sandbox/sandbox.ts → local-network/local-network.ts} +42 -55
- package/src/local-network/sponsored_fpc.ts +26 -0
- package/src/testing/anvil_test_watcher.ts +18 -19
- package/src/testing/cheat_codes.ts +13 -13
- package/src/testing/index.ts +0 -1
- package/dest/cli/chain_l2_config.d.ts +0 -31
- package/dest/cli/chain_l2_config.d.ts.map +0 -1
- package/dest/cli/chain_l2_config.js +0 -261
- package/dest/cli/cmds/start_faucet.d.ts +0 -4
- package/dest/cli/cmds/start_faucet.d.ts.map +0 -1
- package/dest/cli/cmds/start_faucet.js +0 -20
- package/dest/cli/cmds/start_pxe.d.ts +0 -16
- package/dest/cli/cmds/start_pxe.d.ts.map +0 -1
- package/dest/cli/cmds/start_pxe.js +0 -31
- package/dest/cli/get_l1_config.d.ts +0 -7
- package/dest/cli/get_l1_config.d.ts.map +0 -1
- package/dest/cli/get_l1_config.js +0 -13
- package/dest/sandbox/banana_fpc.d.ts +0 -11
- package/dest/sandbox/banana_fpc.d.ts.map +0 -1
- package/dest/sandbox/index.d.ts +0 -4
- package/dest/sandbox/index.d.ts.map +0 -1
- package/dest/sandbox/index.js +0 -3
- package/dest/sandbox/sandbox.d.ts +0 -83
- package/dest/sandbox/sandbox.d.ts.map +0 -1
- package/dest/sandbox/sponsored_fpc.d.ts +0 -4
- package/dest/sandbox/sponsored_fpc.d.ts.map +0 -1
- package/dest/testing/aztec_cheat_codes.d.ts +0 -59
- package/dest/testing/aztec_cheat_codes.d.ts.map +0 -1
- package/dest/testing/aztec_cheat_codes.js +0 -62
- package/src/cli/chain_l2_config.ts +0 -341
- package/src/cli/cmds/start_faucet.ts +0 -34
- package/src/cli/cmds/start_pxe.ts +0 -49
- package/src/cli/get_l1_config.ts +0 -19
- package/src/sandbox/index.ts +0 -4
- package/src/sandbox/sponsored_fpc.ts +0 -27
- package/src/testing/aztec_cheat_codes.ts +0 -77
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RollupCheatCodes } from '@aztec/ethereum/test';
|
|
2
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
3
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
4
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
4
5
|
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
@@ -12,7 +13,7 @@ import { getAddress, getContract } from 'viem';
|
|
|
12
13
|
*/ export class AnvilTestWatcher {
|
|
13
14
|
cheatcodes;
|
|
14
15
|
dateProvider;
|
|
15
|
-
|
|
16
|
+
isLocalNetwork;
|
|
16
17
|
rollup;
|
|
17
18
|
rollupCheatCodes;
|
|
18
19
|
l2SlotDuration;
|
|
@@ -24,7 +25,7 @@ import { getAddress, getContract } from 'viem';
|
|
|
24
25
|
constructor(cheatcodes, rollupAddress, l1Client, dateProvider){
|
|
25
26
|
this.cheatcodes = cheatcodes;
|
|
26
27
|
this.dateProvider = dateProvider;
|
|
27
|
-
this.
|
|
28
|
+
this.isLocalNetwork = false;
|
|
28
29
|
this.logger = createLogger(`aztecjs:utils:watcher`);
|
|
29
30
|
this.isMarkingAsProven = true;
|
|
30
31
|
this.rollup = getContract({
|
|
@@ -38,10 +39,11 @@ import { getAddress, getContract } from 'viem';
|
|
|
38
39
|
this.logger.debug(`Watcher created for rollup at ${rollupAddress}`);
|
|
39
40
|
}
|
|
40
41
|
setIsMarkingAsProven(isMarkingAsProven) {
|
|
42
|
+
this.logger.warn(`Watcher is now ${isMarkingAsProven ? 'marking' : 'not marking'} blocks as proven`);
|
|
41
43
|
this.isMarkingAsProven = isMarkingAsProven;
|
|
42
44
|
}
|
|
43
|
-
|
|
44
|
-
this.
|
|
45
|
+
setisLocalNetwork(isLocalNetwork) {
|
|
46
|
+
this.isLocalNetwork = isLocalNetwork;
|
|
45
47
|
}
|
|
46
48
|
async start() {
|
|
47
49
|
if (this.filledRunningPromise) {
|
|
@@ -51,7 +53,7 @@ import { getAddress, getContract } from 'viem';
|
|
|
51
53
|
this.l2SlotDuration = config.slotDuration;
|
|
52
54
|
// If auto mining is not supported (e.g., we are on a real network), then we
|
|
53
55
|
// will simple do nothing. But if on an anvil or the like, this make sure that
|
|
54
|
-
// the
|
|
56
|
+
// the local network and tests don't break because time is frozen and we never get to
|
|
55
57
|
// the next slot.
|
|
56
58
|
const isAutoMining = await this.cheatcodes.isAutoMining();
|
|
57
59
|
if (isAutoMining) {
|
|
@@ -83,7 +85,7 @@ import { getAddress, getContract } from 'viem';
|
|
|
83
85
|
await this.rollupCheatCodes.markAsProven();
|
|
84
86
|
}
|
|
85
87
|
async syncDateProviderToL1IfBehind() {
|
|
86
|
-
// this doesn't apply to the
|
|
88
|
+
// this doesn't apply to the local network, because we don't have a date provider in the local network
|
|
87
89
|
if (!this.dateProvider) {
|
|
88
90
|
return;
|
|
89
91
|
}
|
|
@@ -99,20 +101,20 @@ import { getAddress, getContract } from 'viem';
|
|
|
99
101
|
}
|
|
100
102
|
async warpTimeIfNeeded() {
|
|
101
103
|
try {
|
|
102
|
-
const currentSlot = await this.rollup.read.getCurrentSlot();
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
|
|
104
|
+
const currentSlot = SlotNumber.fromBigInt(await this.rollup.read.getCurrentSlot());
|
|
105
|
+
const pendingCheckpointNumber = await this.rollup.read.getPendingCheckpointNumber();
|
|
106
|
+
const checkpointLog = await this.rollup.read.getCheckpoint([
|
|
107
|
+
pendingCheckpointNumber
|
|
106
108
|
]);
|
|
109
|
+
const nextSlot = SlotNumber(currentSlot + 1);
|
|
107
110
|
const nextSlotTimestamp = Number(await this.rollup.read.getTimestampForSlot([
|
|
108
|
-
|
|
111
|
+
BigInt(nextSlot)
|
|
109
112
|
]));
|
|
110
|
-
if (currentSlot ===
|
|
113
|
+
if (BigInt(currentSlot) === checkpointLog.slotNumber) {
|
|
111
114
|
// We should jump to the next slot
|
|
112
115
|
try {
|
|
113
116
|
await this.cheatcodes.warp(nextSlotTimestamp, {
|
|
114
|
-
resetBlockInterval: true
|
|
115
|
-
updateDateProvider: this.dateProvider
|
|
117
|
+
resetBlockInterval: true
|
|
116
118
|
});
|
|
117
119
|
} catch (e) {
|
|
118
120
|
this.logger.error(`Failed to warp to timestamp ${nextSlotTimestamp}: ${e}`);
|
|
@@ -120,16 +122,15 @@ import { getAddress, getContract } from 'viem';
|
|
|
120
122
|
this.logger.info(`Slot ${currentSlot} was filled, jumped to next slot`);
|
|
121
123
|
return;
|
|
122
124
|
}
|
|
123
|
-
// If we are not in
|
|
124
|
-
if (!this.
|
|
125
|
+
// If we are not in local network, we don't need to warp time
|
|
126
|
+
if (!this.isLocalNetwork) {
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
127
129
|
const currentTimestamp = this.dateProvider?.now() ?? Date.now();
|
|
128
130
|
if (currentTimestamp > nextSlotTimestamp * 1000) {
|
|
129
131
|
try {
|
|
130
132
|
await this.cheatcodes.warp(nextSlotTimestamp, {
|
|
131
|
-
resetBlockInterval: true
|
|
132
|
-
updateDateProvider: this.dateProvider
|
|
133
|
+
resetBlockInterval: true
|
|
133
134
|
});
|
|
134
135
|
} catch (e) {
|
|
135
136
|
this.logger.error(`Failed to warp to timestamp ${nextSlotTimestamp}: ${e}`);
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { EthCheatCodes, RollupCheatCodes } from '@aztec/ethereum/test';
|
|
2
|
+
import type { DateProvider } from '@aztec/foundation/timer';
|
|
2
3
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
3
|
-
import type { AztecNode
|
|
4
|
-
import { AztecCheatCodes } from './aztec_cheat_codes.js';
|
|
4
|
+
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
5
5
|
/**
|
|
6
6
|
* A class that provides utility functions for interacting with the chain.
|
|
7
|
+
* @deprecated There used to be 3 kinds of cheat codes: eth, rollup and aztec. We have nuked the Aztec ones because
|
|
8
|
+
* they became unused (we now have better testing tools). If you are introducing a new functionality to the cheat
|
|
9
|
+
* codes, please consider whether it makes sense to just introduce new utils in your tests instead.
|
|
7
10
|
*/
|
|
8
11
|
export declare class CheatCodes {
|
|
9
|
-
/** Cheat codes for L1.*/
|
|
10
12
|
eth: EthCheatCodes;
|
|
11
|
-
/** Cheat codes for Aztec L2. */
|
|
12
|
-
aztec: AztecCheatCodes;
|
|
13
|
-
/** Cheat codes for the Aztec Rollup contract on L1. */
|
|
14
13
|
rollup: RollupCheatCodes;
|
|
15
14
|
constructor(
|
|
16
15
|
/** Cheat codes for L1.*/
|
|
17
16
|
eth: EthCheatCodes,
|
|
18
|
-
/** Cheat codes for Aztec L2. */
|
|
19
|
-
aztec: AztecCheatCodes,
|
|
20
17
|
/** Cheat codes for the Aztec Rollup contract on L1. */
|
|
21
18
|
rollup: RollupCheatCodes);
|
|
22
|
-
static create(rpcUrls: string[],
|
|
19
|
+
static create(rpcUrls: string[], node: AztecNode, dateProvider: DateProvider): Promise<CheatCodes>;
|
|
23
20
|
/**
|
|
24
21
|
* Warps the L1 timestamp to a target timestamp and mines an L2 block that advances the L2 timestamp to at least
|
|
25
22
|
* the target timestamp. L2 timestamp is not advanced exactly to the target timestamp because it is determined
|
|
@@ -41,4 +38,4 @@ export declare class CheatCodes {
|
|
|
41
38
|
*/
|
|
42
39
|
warpL2TimeAtLeastBy(sequencerClient: SequencerClient, node: AztecNode, duration: bigint | number): Promise<void>;
|
|
43
40
|
}
|
|
44
|
-
//# sourceMappingURL=
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlYXRfY29kZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0aW5nL2NoZWF0X2NvZGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxhQUFhLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUd2RSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUM1RCxPQUFPLEtBQUssRUFBRSxlQUFlLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUMvRCxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUVqRTs7Ozs7R0FLRztBQUNILHFCQUFhLFVBQVU7SUFHWixHQUFHLEVBQUUsYUFBYTtJQUVsQixNQUFNLEVBQUUsZ0JBQWdCO0lBSmpDO0lBQ0UseUJBQXlCO0lBQ2xCLEdBQUcsRUFBRSxhQUFhO0lBQ3pCLHVEQUF1RDtJQUNoRCxNQUFNLEVBQUUsZ0JBQWdCLEVBQzdCO0lBRUosT0FBYSxNQUFNLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxFQUFFLElBQUksRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLFlBQVksR0FBRyxPQUFPLENBQUMsVUFBVSxDQUFDLENBT3ZHO0lBRUQ7Ozs7Ozs7O09BUUc7SUFDRyxtQkFBbUIsQ0FBQyxlQUFlLEVBQUUsZUFBZSxFQUFFLElBQUksRUFBRSxTQUFTLEVBQUUsZUFBZSxFQUFFLE1BQU0sR0FBRyxNQUFNLGlCQXVCNUc7SUFFRDs7Ozs7Ozs7T0FRRztJQUNHLG1CQUFtQixDQUFDLGVBQWUsRUFBRSxlQUFlLEVBQUUsSUFBSSxFQUFFLFNBQVMsRUFBRSxRQUFRLEVBQUUsTUFBTSxHQUFHLE1BQU0saUJBSXJHO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cheat_codes.d.ts","sourceRoot":"","sources":["../../src/testing/cheat_codes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cheat_codes.d.ts","sourceRoot":"","sources":["../../src/testing/cheat_codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE;;;;;GAKG;AACH,qBAAa,UAAU;IAGZ,GAAG,EAAE,aAAa;IAElB,MAAM,EAAE,gBAAgB;IAJjC;IACE,yBAAyB;IAClB,GAAG,EAAE,aAAa;IACzB,uDAAuD;IAChD,MAAM,EAAE,gBAAgB,EAC7B;IAEJ,OAAa,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAOvG;IAED;;;;;;;;OAQG;IACG,mBAAmB,CAAC,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,iBAuB5G;IAED;;;;;;;;OAQG;IACG,mBAAmB,CAAC,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,iBAIrG;CACF"}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { retryUntil } from '@aztec/aztec.js';
|
|
2
1
|
import { EthCheatCodes, RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
|
-
import {
|
|
2
|
+
import { retryUntil } from '@aztec/foundation/retry';
|
|
4
3
|
/**
|
|
5
4
|
* A class that provides utility functions for interacting with the chain.
|
|
5
|
+
* @deprecated There used to be 3 kinds of cheat codes: eth, rollup and aztec. We have nuked the Aztec ones because
|
|
6
|
+
* they became unused (we now have better testing tools). If you are introducing a new functionality to the cheat
|
|
7
|
+
* codes, please consider whether it makes sense to just introduce new utils in your tests instead.
|
|
6
8
|
*/ export class CheatCodes {
|
|
7
9
|
eth;
|
|
8
|
-
aztec;
|
|
9
10
|
rollup;
|
|
10
|
-
constructor(/** Cheat codes for L1.*/ eth, /** Cheat codes for
|
|
11
|
+
constructor(/** Cheat codes for L1.*/ eth, /** Cheat codes for the Aztec Rollup contract on L1. */ rollup){
|
|
11
12
|
this.eth = eth;
|
|
12
|
-
this.aztec = aztec;
|
|
13
13
|
this.rollup = rollup;
|
|
14
14
|
}
|
|
15
|
-
static async create(rpcUrls,
|
|
16
|
-
const ethCheatCodes = new EthCheatCodes(rpcUrls);
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
return new CheatCodes(ethCheatCodes, aztecCheatCodes, rollupCheatCodes);
|
|
15
|
+
static async create(rpcUrls, node, dateProvider) {
|
|
16
|
+
const ethCheatCodes = new EthCheatCodes(rpcUrls, dateProvider);
|
|
17
|
+
const rollupCheatCodes = new RollupCheatCodes(ethCheatCodes, await node.getNodeInfo().then((n)=>n.l1ContractAddresses));
|
|
18
|
+
return new CheatCodes(ethCheatCodes, rollupCheatCodes);
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* Warps the L1 timestamp to a target timestamp and mines an L2 block that advances the L2 timestamp to at least
|
package/dest/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { AnvilTestWatcher } from './anvil_test_watcher.js';
|
|
2
2
|
export { EthCheatCodes, RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
|
-
export { AztecCheatCodes } from './aztec_cheat_codes.js';
|
|
4
3
|
export { CheatCodes } from './cheat_codes.js';
|
|
5
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0aW5nL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzNELE9BQU8sRUFBRSxhQUFhLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUN2RSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sa0JBQWtCLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dest/testing/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-devnet.20251212",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"tsconfig": "./tsconfig.json"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "yarn clean && tsc
|
|
18
|
+
"build": "yarn clean && ../scripts/tsc.sh",
|
|
19
19
|
"start": "node --no-warnings ./dest/bin",
|
|
20
20
|
"start:debug": "node --inspect=0.0.0.0:9221 --no-warnings ./dest/bin",
|
|
21
|
-
"start:
|
|
21
|
+
"start:local-network": "ETHEREUM_HOSTS=http://0.0.0.0:8545/ && yarn start start --local-network",
|
|
22
22
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
23
|
-
"build:dev": "tsc
|
|
23
|
+
"build:dev": "../scripts/tsc.sh --watch",
|
|
24
24
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}",
|
|
25
25
|
"run:example:token": "LOG_LEVEL='verbose' node ./dest/examples/token.js"
|
|
26
26
|
},
|
|
@@ -28,43 +28,44 @@
|
|
|
28
28
|
"../package.common.json"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aztec/accounts": "3.0.0-
|
|
32
|
-
"@aztec/archiver": "3.0.0-
|
|
33
|
-
"@aztec/aztec-faucet": "3.0.0-
|
|
34
|
-
"@aztec/aztec-node": "3.0.0-
|
|
35
|
-
"@aztec/aztec.js": "3.0.0-
|
|
36
|
-
"@aztec/bb-prover": "3.0.0-
|
|
37
|
-
"@aztec/bb.js": "3.0.0-
|
|
38
|
-
"@aztec/blob-sink": "3.0.0-
|
|
39
|
-
"@aztec/bot": "3.0.0-
|
|
40
|
-
"@aztec/builder": "3.0.0-
|
|
41
|
-
"@aztec/cli": "3.0.0-
|
|
42
|
-
"@aztec/
|
|
43
|
-
"@aztec/
|
|
44
|
-
"@aztec/
|
|
45
|
-
"@aztec/
|
|
46
|
-
"@aztec/
|
|
47
|
-
"@aztec/
|
|
48
|
-
"@aztec/
|
|
49
|
-
"@aztec/noir-contracts.js": "3.0.0-
|
|
50
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-
|
|
51
|
-
"@aztec/p2p": "3.0.0-
|
|
52
|
-
"@aztec/p2p-bootstrap": "3.0.0-
|
|
53
|
-
"@aztec/protocol-contracts": "3.0.0-
|
|
54
|
-
"@aztec/prover-client": "3.0.0-
|
|
55
|
-
"@aztec/prover-node": "3.0.0-
|
|
56
|
-
"@aztec/pxe": "3.0.0-
|
|
57
|
-
"@aztec/stdlib": "3.0.0-
|
|
58
|
-
"@aztec/telemetry-client": "3.0.0-
|
|
59
|
-
"@aztec/
|
|
60
|
-
"@aztec/
|
|
31
|
+
"@aztec/accounts": "3.0.0-devnet.20251212",
|
|
32
|
+
"@aztec/archiver": "3.0.0-devnet.20251212",
|
|
33
|
+
"@aztec/aztec-faucet": "3.0.0-devnet.20251212",
|
|
34
|
+
"@aztec/aztec-node": "3.0.0-devnet.20251212",
|
|
35
|
+
"@aztec/aztec.js": "3.0.0-devnet.20251212",
|
|
36
|
+
"@aztec/bb-prover": "3.0.0-devnet.20251212",
|
|
37
|
+
"@aztec/bb.js": "3.0.0-devnet.20251212",
|
|
38
|
+
"@aztec/blob-sink": "3.0.0-devnet.20251212",
|
|
39
|
+
"@aztec/bot": "3.0.0-devnet.20251212",
|
|
40
|
+
"@aztec/builder": "3.0.0-devnet.20251212",
|
|
41
|
+
"@aztec/cli": "3.0.0-devnet.20251212",
|
|
42
|
+
"@aztec/constants": "3.0.0-devnet.20251212",
|
|
43
|
+
"@aztec/entrypoints": "3.0.0-devnet.20251212",
|
|
44
|
+
"@aztec/ethereum": "3.0.0-devnet.20251212",
|
|
45
|
+
"@aztec/foundation": "3.0.0-devnet.20251212",
|
|
46
|
+
"@aztec/kv-store": "3.0.0-devnet.20251212",
|
|
47
|
+
"@aztec/l1-artifacts": "3.0.0-devnet.20251212",
|
|
48
|
+
"@aztec/node-lib": "3.0.0-devnet.20251212",
|
|
49
|
+
"@aztec/noir-contracts.js": "3.0.0-devnet.20251212",
|
|
50
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-devnet.20251212",
|
|
51
|
+
"@aztec/p2p": "3.0.0-devnet.20251212",
|
|
52
|
+
"@aztec/p2p-bootstrap": "3.0.0-devnet.20251212",
|
|
53
|
+
"@aztec/protocol-contracts": "3.0.0-devnet.20251212",
|
|
54
|
+
"@aztec/prover-client": "3.0.0-devnet.20251212",
|
|
55
|
+
"@aztec/prover-node": "3.0.0-devnet.20251212",
|
|
56
|
+
"@aztec/pxe": "3.0.0-devnet.20251212",
|
|
57
|
+
"@aztec/stdlib": "3.0.0-devnet.20251212",
|
|
58
|
+
"@aztec/telemetry-client": "3.0.0-devnet.20251212",
|
|
59
|
+
"@aztec/test-wallet": "3.0.0-devnet.20251212",
|
|
60
|
+
"@aztec/txe": "3.0.0-devnet.20251212",
|
|
61
|
+
"@aztec/world-state": "3.0.0-devnet.20251212",
|
|
61
62
|
"@types/chalk": "^2.2.0",
|
|
62
63
|
"abitype": "^0.8.11",
|
|
63
64
|
"chalk": "^5.3.0",
|
|
64
65
|
"commander": "^12.1.0",
|
|
65
66
|
"koa": "^2.16.1",
|
|
66
|
-
"koa-router": "^
|
|
67
|
-
"viem": "2.
|
|
67
|
+
"koa-router": "^13.1.1",
|
|
68
|
+
"viem": "npm:@aztec/viem@2.38.2"
|
|
68
69
|
},
|
|
69
70
|
"files": [
|
|
70
71
|
"dest",
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
"@jest/globals": "^30.0.0",
|
|
77
78
|
"@types/jest": "^30.0.0",
|
|
78
79
|
"@types/koa": "^2.15.0",
|
|
80
|
+
"@typescript/native-preview": "7.0.0-dev.20251126.1",
|
|
79
81
|
"jest": "^30.0.0",
|
|
80
82
|
"ts-node": "^10.9.1",
|
|
81
83
|
"typescript": "^5.3.3"
|
package/src/bin/index.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
//
|
|
3
3
|
import { injectCommands as injectBuilderCommands } from '@aztec/builder';
|
|
4
|
-
import { injectCommands as
|
|
4
|
+
import { injectCommands as injectAztecNodeCommands } from '@aztec/cli/aztec_node';
|
|
5
|
+
import { enrichEnvironmentWithChainName, enrichEnvironmentWithNetworkConfig } from '@aztec/cli/config';
|
|
5
6
|
import { injectCommands as injectContractCommands } from '@aztec/cli/contracts';
|
|
6
|
-
import { injectCommands as injectDevnetCommands } from '@aztec/cli/devnet';
|
|
7
7
|
import { injectCommands as injectInfrastructureCommands } from '@aztec/cli/infrastructure';
|
|
8
8
|
import { injectCommands as injectL1Commands } from '@aztec/cli/l1';
|
|
9
9
|
import { injectCommands as injectMiscCommands } from '@aztec/cli/misc';
|
|
10
|
-
import { injectCommands as
|
|
10
|
+
import { injectCommands as injectValidatorKeysCommands } from '@aztec/cli/validator_keys';
|
|
11
11
|
import { getActiveNetworkName } from '@aztec/foundation/config';
|
|
12
12
|
import { createConsoleLogger, createLogger } from '@aztec/foundation/log';
|
|
13
13
|
|
|
14
14
|
import { Command } from 'commander';
|
|
15
15
|
|
|
16
16
|
import { NETWORK_FLAG } from '../cli/aztec_start_options.js';
|
|
17
|
-
import { enrichEnvironmentWithChainConfig } from '../cli/chain_l2_config.js';
|
|
18
17
|
import { injectAztecCommands } from '../cli/index.js';
|
|
19
18
|
import { getCliVersion } from '../cli/release_version.js';
|
|
20
19
|
|
|
@@ -39,7 +38,9 @@ async function main() {
|
|
|
39
38
|
networkValue = args[networkIndex].split('=')[1] || args[networkIndex + 1];
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
const networkName = getActiveNetworkName(networkValue);
|
|
42
|
+
await enrichEnvironmentWithNetworkConfig(networkName);
|
|
43
|
+
enrichEnvironmentWithChainName(networkName);
|
|
43
44
|
|
|
44
45
|
const cliVersion = getCliVersion();
|
|
45
46
|
let program = new Command('aztec');
|
|
@@ -47,12 +48,11 @@ async function main() {
|
|
|
47
48
|
program = injectAztecCommands(program, userLog, debugLogger);
|
|
48
49
|
program = injectBuilderCommands(program);
|
|
49
50
|
program = injectContractCommands(program, userLog, debugLogger);
|
|
50
|
-
program = injectInfrastructureCommands(program, userLog
|
|
51
|
+
program = injectInfrastructureCommands(program, userLog);
|
|
51
52
|
program = injectL1Commands(program, userLog, debugLogger);
|
|
52
|
-
program =
|
|
53
|
+
program = injectAztecNodeCommands(program, userLog, debugLogger);
|
|
53
54
|
program = injectMiscCommands(program, userLog);
|
|
54
|
-
program =
|
|
55
|
-
program = injectWalletCommands(program, userLog, debugLogger);
|
|
55
|
+
program = injectValidatorKeysCommands(program, userLog);
|
|
56
56
|
|
|
57
57
|
await program.parseAsync(process.argv);
|
|
58
58
|
}
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
} from '@aztec/foundation/json-rpc/server';
|
|
6
6
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
7
7
|
import type { ChainConfig } from '@aztec/stdlib/config';
|
|
8
|
-
import { AztecNodeApiSchema
|
|
8
|
+
import { AztecNodeApiSchema } from '@aztec/stdlib/interfaces/client';
|
|
9
9
|
import { getVersioningMiddleware } from '@aztec/stdlib/versioning';
|
|
10
10
|
import { getOtelJsonRpcPropagationMiddleware } from '@aztec/telemetry-client';
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { createLocalNetwork } from '../local-network/index.js';
|
|
13
13
|
import { github, splash } from '../splash.js';
|
|
14
14
|
import { getCliVersion } from './release_version.js';
|
|
15
15
|
import { extractNamespacedOptions, installSignalHandlers } from './util.js';
|
|
@@ -22,20 +22,19 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
|
|
|
22
22
|
const adminServices: NamespacedApiHandlers = {};
|
|
23
23
|
let config: ChainConfig | undefined = undefined;
|
|
24
24
|
|
|
25
|
-
if (options.
|
|
25
|
+
if (options.localNetwork) {
|
|
26
26
|
const cliVersion = getCliVersion();
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const localNetwork = extractNamespacedOptions(options, 'local-network');
|
|
28
|
+
localNetwork.testAccounts = true;
|
|
29
29
|
userLog(`${splash}\n${github}\n\n`);
|
|
30
|
-
userLog(`Setting up Aztec
|
|
30
|
+
userLog(`Setting up Aztec local network ${cliVersion}, please stand by...`);
|
|
31
31
|
|
|
32
|
-
const { node,
|
|
32
|
+
const { node, stop } = await createLocalNetwork(
|
|
33
33
|
{
|
|
34
|
-
l1Mnemonic:
|
|
34
|
+
l1Mnemonic: localNetwork.l1Mnemonic,
|
|
35
35
|
l1RpcUrls: options.l1RpcUrls,
|
|
36
|
-
deployAztecContractsSalt:
|
|
37
|
-
|
|
38
|
-
testAccounts: sandboxOptions.testAccounts,
|
|
36
|
+
deployAztecContractsSalt: localNetwork.deployAztecContractsSalt,
|
|
37
|
+
testAccounts: localNetwork.testAccounts,
|
|
39
38
|
realProofs: false,
|
|
40
39
|
},
|
|
41
40
|
userLog,
|
|
@@ -44,11 +43,6 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
|
|
|
44
43
|
// Start Node and PXE JSON-RPC server
|
|
45
44
|
signalHandlers.push(stop);
|
|
46
45
|
services.node = [node, AztecNodeApiSchema];
|
|
47
|
-
if (!sandboxOptions.noPXE) {
|
|
48
|
-
services.pxe = [pxe, PXESchema];
|
|
49
|
-
} else {
|
|
50
|
-
userLog(`Not exposing PXE API through JSON-RPC server`);
|
|
51
|
-
}
|
|
52
46
|
} else {
|
|
53
47
|
if (options.node) {
|
|
54
48
|
const { startNode } = await import('./cmds/start_node.js');
|
|
@@ -62,9 +56,6 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
|
|
|
62
56
|
} else if (options.blobSink) {
|
|
63
57
|
const { startBlobSink } = await import('./cmds/start_blob_sink.js');
|
|
64
58
|
await startBlobSink(options, signalHandlers, userLog);
|
|
65
|
-
} else if (options.pxe) {
|
|
66
|
-
const { startPXE } = await import('./cmds/start_pxe.js');
|
|
67
|
-
({ config } = await startPXE(options, signalHandlers, services, userLog));
|
|
68
59
|
} else if (options.archiver) {
|
|
69
60
|
const { startArchiver } = await import('./cmds/start_archiver.js');
|
|
70
61
|
({ config } = await startArchiver(options, signalHandlers, services));
|
|
@@ -83,9 +74,6 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
|
|
|
83
74
|
} else if (options.sequencer) {
|
|
84
75
|
userLog(`Cannot run a standalone sequencer without a node`);
|
|
85
76
|
process.exit(1);
|
|
86
|
-
} else if (options.faucet) {
|
|
87
|
-
const { startFaucet } = await import('./cmds/start_faucet.js');
|
|
88
|
-
await startFaucet(options, signalHandlers, services, userLog);
|
|
89
77
|
} else {
|
|
90
78
|
userLog(`No module specified to start`);
|
|
91
79
|
process.exit(1);
|