@aztec/aztec 0.82.2-alpha-testnet.5 → 0.82.3-nightly.20250330

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/bin/index.js CHANGED
@@ -10,8 +10,6 @@ import { injectCommands as injectMiscCommands } from '@aztec/cli/misc';
10
10
  import { injectCommands as injectPXECommands } from '@aztec/cli/pxe';
11
11
  import { createConsoleLogger, createLogger } from '@aztec/foundation/log';
12
12
  import { Command } from 'commander';
13
- import { NETWORK_FLAG } from '../cli/aztec_start_options.js';
14
- import { enrichEnvironmentWithChainConfig } from '../cli/chain_l2_config.js';
15
13
  import { injectAztecCommands } from '../cli/index.js';
16
14
  import { getCliVersion } from '../cli/release_version.js';
17
15
  const userLog = createConsoleLogger();
@@ -22,17 +20,6 @@ const debugLogger = createLogger('cli');
22
20
  };
23
21
  process.once('SIGINT', shutdown);
24
22
  process.once('SIGTERM', shutdown);
25
- // Intercept the setting of a network and enrich the environment with defaults for that network
26
- let networkValue;
27
- const args = process.argv.slice(2);
28
- const networkIndex = args.findIndex((arg)=>arg.startsWith(`--${NETWORK_FLAG}=`) || arg === `--${NETWORK_FLAG}`);
29
- if (networkIndex !== -1) {
30
- networkValue = args[networkIndex].split('=')[1] || args[networkIndex + 1];
31
- }
32
- networkValue = networkValue || process.env.NETWORK;
33
- if (networkValue !== undefined) {
34
- await enrichEnvironmentWithChainConfig(networkValue);
35
- }
36
23
  const cliVersion = getCliVersion();
37
24
  let program = new Command('aztec');
38
25
  program.description('Aztec command line interface').version(cliVersion);
@@ -1 +1 @@
1
- {"version":3,"file":"aztec_start_action.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_action.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAY3D,wBAAsB,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAsGjF"}
1
+ {"version":3,"file":"aztec_start_action.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_action.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAa3D,wBAAsB,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAyGjF"}
@@ -4,6 +4,7 @@ import { getVersioningMiddleware } from '@aztec/stdlib/versioning';
4
4
  import { getOtelJsonRpcPropagationMiddleware } from '@aztec/telemetry-client';
5
5
  import { createSandbox } from '../sandbox/index.js';
6
6
  import { github, splash } from '../splash.js';
7
+ import { enrichEnvironmentWithChainConfig } from './chain_l2_config.js';
7
8
  import { getCliVersion } from './release_version.js';
8
9
  import { extractNamespacedOptions, installSignalHandlers } from './util.js';
9
10
  import { getVersions } from './versioning.js';
@@ -17,7 +18,6 @@ export async function aztecStart(options, userLog, debugLogger) {
17
18
  const cliVersion = getCliVersion();
18
19
  const sandboxOptions = extractNamespacedOptions(options, 'sandbox');
19
20
  const nodeOptions = extractNamespacedOptions(options, 'node');
20
- sandboxOptions.testAccounts = true;
21
21
  userLog(`${splash}\n${github}\n\n`);
22
22
  userLog(`Setting up Aztec Sandbox ${cliVersion}, please stand by...`);
23
23
  const { node, pxe, stop } = await createSandbox({
@@ -43,6 +43,10 @@ export async function aztecStart(options, userLog, debugLogger) {
43
43
  userLog(`Not exposing PXE API through JSON-RPC server`);
44
44
  }
45
45
  } else {
46
+ // If a network is specified, enrich the environment with the chain config
47
+ if (options.network) {
48
+ await enrichEnvironmentWithChainConfig(options.network);
49
+ }
46
50
  if (options.node) {
47
51
  const { startNode } = await import('./cmds/start_node.js');
48
52
  ({ config } = await startNode(options, signalHandlers, services, adminServices, userLog));
@@ -9,7 +9,6 @@ export interface AztecStartOption {
9
9
  }
10
10
  export declare const getOptions: (namespace: string, configMappings: Record<string, ConfigMapping>) => AztecStartOption[];
11
11
  export declare const universalOptions: string[];
12
- export declare const NETWORK_FLAG = "network";
13
12
  export declare const aztecStartOptions: {
14
13
  [key: string]: AztecStartOption[];
15
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"aztec_start_options.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_options.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,MAAM,EAIZ,MAAM,0BAA0B,CAAC;AAelC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC;IACpC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;CACjC;AAED,eAAO,MAAM,UAAU,cAAe,MAAM,kBAAkB,OAAO,MAAM,EAAE,aAAa,CAAC,uBAiB1F,CAAC;AAGF,eAAO,MAAM,gBAAgB,UAU5B,CAAC;AAEF,eAAO,MAAM,YAAY,YAAY,CAAC;AAGtC,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;CAgVlE,CAAC"}
1
+ {"version":3,"file":"aztec_start_options.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_options.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,MAAM,EAIZ,MAAM,0BAA0B,CAAC;AAelC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC;IACpC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;CACjC;AAED,eAAO,MAAM,UAAU,cAAe,MAAM,kBAAkB,OAAO,MAAM,EAAE,aAAa,CAAC,uBAiB1F,CAAC;AAGF,eAAO,MAAM,gBAAgB,UAU5B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;CAyWlE,CAAC"}
@@ -40,12 +40,11 @@ export const universalOptions = [
40
40
  'dataDirectory',
41
41
  'dataStoreMapSizeKb'
42
42
  ];
43
- export const NETWORK_FLAG = 'network';
44
43
  // Define categories and options
45
44
  export const aztecStartOptions = {
46
45
  NETWORK: [
47
46
  {
48
- flag: `--${NETWORK_FLAG} <value>`,
47
+ flag: '--network <value>',
49
48
  description: 'Network to run Aztec on',
50
49
  defaultValue: undefined,
51
50
  envVar: 'NETWORK'
@@ -59,7 +58,13 @@ export const aztecStartOptions = {
59
58
  envVar: undefined
60
59
  },
61
60
  {
62
- flag: '--sandbox.noPXE',
61
+ flag: '--sandbox.testAccounts [value]',
62
+ description: 'Deploy test accounts on sandbox start',
63
+ envVar: 'TEST_ACCOUNTS',
64
+ ...booleanConfigHelper()
65
+ },
66
+ {
67
+ flag: '--sandbox.noPXE [value]',
63
68
  description: 'Do not expose PXE service on sandbox start',
64
69
  envVar: 'NO_PXE',
65
70
  ...booleanConfigHelper()
@@ -234,11 +239,29 @@ export const aztecStartOptions = {
234
239
  defaultValue: 100,
235
240
  envVar: 'WS_BLOCK_CHECK_INTERVAL_MS',
236
241
  parseVal: (val)=>parseInt(val, 10)
242
+ },
243
+ {
244
+ flag: '--node.testAccounts [value]',
245
+ description: 'Populate genesis state with initial fee juice for test accounts',
246
+ envVar: 'TEST_ACCOUNTS',
247
+ ...booleanConfigHelper()
248
+ },
249
+ {
250
+ flag: '--node.syncMode <value>',
251
+ description: 'Set sync mode to `full` to always sync via L1, `snapshot` to download a snapshot if there is no local data, `force-snapshot` to download even if there is local data.',
252
+ defaultValue: 'snapshot',
253
+ envVar: 'SYNC_MODE'
254
+ },
255
+ {
256
+ flag: '--node.snapshotsUrl <value>',
257
+ description: 'Base URL for downloading snapshots for snapshot sync.',
258
+ defaultValue: undefined,
259
+ envVar: 'SYNC_SNAPSHOTS_URL'
237
260
  }
238
261
  ],
239
262
  'P2P SUBSYSTEM': [
240
263
  {
241
- flag: '--p2p-enabled',
264
+ flag: '--p2p-enabled [value]',
242
265
  description: 'Enable P2P subsystem',
243
266
  envVar: 'P2P_ENABLED',
244
267
  ...booleanConfigHelper()
@@ -15,6 +15,7 @@ export type L2ChainConfig = {
15
15
  seqMinTxsPerBlock: number;
16
16
  seqMaxTxsPerBlock: number;
17
17
  realProofs: boolean;
18
+ snapshotsUrl: string;
18
19
  };
19
20
  export declare const testnetIgnitionL2ChainConfig: L2ChainConfig;
20
21
  export declare const alphaTestnetL2ChainConfig: L2ChainConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/cli/chain_l2_config.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,eAAe,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,iBA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EAAE,YAAY,gBAW3D;AAED,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAWpG;AAUD,wBAAsB,gCAAgC,CAAC,WAAW,EAAE,YAAY,iBAuB/E"}
@@ -1,4 +1,3 @@
1
- import { EthAddress } from '@aztec/aztec.js';
2
1
  import path from 'path';
3
2
  export const testnetIgnitionL2ChainConfig = {
4
3
  l1ChainId: 11155111,
@@ -15,7 +14,8 @@ export const testnetIgnitionL2ChainConfig = {
15
14
  feeAssetHandlerAddress: '',
16
15
  seqMinTxsPerBlock: 0,
17
16
  seqMaxTxsPerBlock: 0,
18
- realProofs: true
17
+ realProofs: true,
18
+ snapshotsUrl: 'https://storage.googleapis.com/aztec-testnet/snapshots/'
19
19
  };
20
20
  export const alphaTestnetL2ChainConfig = {
21
21
  l1ChainId: 11155111,
@@ -23,16 +23,17 @@ export const alphaTestnetL2ChainConfig = {
23
23
  aztecSlotDuration: 36,
24
24
  aztecEpochDuration: 32,
25
25
  aztecProofSubmissionWindow: 64,
26
- testAccounts: false,
26
+ testAccounts: true,
27
27
  sponsoredFPC: true,
28
28
  p2pEnabled: true,
29
29
  p2pBootstrapNodes: [],
30
30
  registryAddress: '0xad85d55a4bbef35e95396191c22903aa717edf1c',
31
- slashFactoryAddress: '',
31
+ slashFactoryAddress: '0xf667f50fd68b30c38b12d29fee537fa5ea158eb8',
32
32
  feeAssetHandlerAddress: '0xf0664fec6ac15313e18d5ad8225e46b7c6463338',
33
33
  seqMinTxsPerBlock: 0,
34
34
  seqMaxTxsPerBlock: 4,
35
- realProofs: true
35
+ realProofs: true,
36
+ snapshotsUrl: 'https://storage.googleapis.com/aztec-testnet/snapshots/'
36
37
  };
37
38
  export async function getBootnodes(networkName) {
38
39
  const url = `http://static.aztec.network/${networkName}/bootnodes.json`;
@@ -66,14 +67,6 @@ function enrichVar(envVar, value) {
66
67
  }
67
68
  process.env[envVar] = value;
68
69
  }
69
- function enrichEthAddressVar(envVar, value) {
70
- // EthAddress doesn't like being given empty strings
71
- if (value === '') {
72
- enrichVar(envVar, EthAddress.ZERO.toString());
73
- return;
74
- }
75
- enrichVar(envVar, value);
76
- }
77
70
  export async function enrichEnvironmentWithChainConfig(networkName) {
78
71
  const config = await getL2ChainConfig(networkName);
79
72
  if (!config) {
@@ -88,12 +81,13 @@ export async function enrichEnvironmentWithChainConfig(networkName) {
88
81
  enrichVar('SPONSORED_FPC', config.sponsoredFPC.toString());
89
82
  enrichVar('P2P_ENABLED', config.p2pEnabled.toString());
90
83
  enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
84
+ enrichVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
85
+ enrichVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
86
+ enrichVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
91
87
  enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
92
88
  enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
93
89
  enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec', networkName, 'data'));
94
90
  enrichVar('PROVER_REAL_PROOFS', config.realProofs.toString());
95
91
  enrichVar('PXE_PROVER_ENABLED', config.realProofs.toString());
96
- enrichEthAddressVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
97
- enrichEthAddressVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
98
- enrichEthAddressVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
92
+ enrichVar('SYNC_SNAPSHOTS_URL', config.snapshotsUrl);
99
93
  }
package/dest/cli/util.js CHANGED
@@ -173,7 +173,7 @@ export const printAztecStartHelpText = ()=>{
173
173
  if (realProofs) {
174
174
  const { Crs, GrumpkinCrs } = await import('@aztec/bb.js');
175
175
  await Promise.all([
176
- Crs.new(2 ** 25 - 1, undefined, log),
176
+ Crs.new(2 ** 25 + 1, undefined, log),
177
177
  GrumpkinCrs.new(2 ** 18 + 1, undefined, log)
178
178
  ]);
179
179
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox/sandbox.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AAE7F,OAAO,EAAE,KAAK,uBAAuB,EAAwB,MAAM,yBAAyB,CAAC;AAU7F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,uBAAuB,CAAC;AAGjE,OAAO,EAAE,KAAK,gBAAgB,EAAyC,MAAM,mBAAmB,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAA2D,MAAM,MAAM,CAAC;AAavH;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GAAG,iBAAiB,EACxC,oBAAoB,yCAAS,EAC7B,IAAI,GAAE;IAAE,8BAA8B,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;IAAC,gBAAgB,CAAC,EAAE,EAAE,CAAA;CAAO;;;;;;;;;;;;;;;;;;;GA6BtH;AAED,wBAAwB;AACxB,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG;IAC5C,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,MAAM,EAAE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mBAAmB,CACvC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GAAG,iBAAiB,EACxC,oBAAoB,yCAAS,EAC7B,IAAI,GAAE;IAAE,8BAA8B,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;IAAC,gBAAgB,CAAC,EAAE,EAAE,CAAA;CAAO;;;;;;;;;;;;;;;;;;;GA6BtH;AAED,wBAAwB;AACxB,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG;IAC5C,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,KAAK,EAAE,OAAO,CAAC;IACf,uDAAuD;IACvD,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,MAAM,oCAA6B,EAAE,OAAO,EAAE,KAAK;;;;GA6FtF;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,MAAM,GAAE,OAAO,CAAC,eAAe,CAAM,EACrC,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,eAAe,CAAC;IAAC,cAAc,CAAC,EAAE,uBAAuB,CAAA;CAAO,EACpF,OAAO,GAAE;IAAE,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAAO,6BAW7D;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,GAAE,OAAO,CAAC,gBAAgB,CAAM,mDAI3F"}
@@ -72,12 +72,11 @@ const localAnvil = foundry;
72
72
  aztecNodeConfig.validatorPrivateKey = `0x${Buffer.from(privKey).toString('hex')}`;
73
73
  }
74
74
  const initialAccounts = await (async ()=>{
75
- if (config.testAccounts) {
75
+ if (config.testAccounts === true || config.testAccounts === undefined) {
76
76
  if (aztecNodeConfig.p2pEnabled) {
77
77
  userLog(`Not setting up test accounts as we are connecting to a network`);
78
- } else if (config.noPXE) {
79
- userLog(`Not setting up test accounts as we are not exposing a PXE`);
80
78
  } else {
79
+ userLog(`Setting up test accounts`);
81
80
  return await getInitialTestAccounts();
82
81
  }
83
82
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/aztec",
3
- "version": "0.82.2-alpha-testnet.5",
3
+ "version": "0.82.3-nightly.20250330",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js"
@@ -29,35 +29,35 @@
29
29
  "../package.common.json"
30
30
  ],
31
31
  "dependencies": {
32
- "@aztec/accounts": "0.82.2-alpha-testnet.5",
33
- "@aztec/archiver": "0.82.2-alpha-testnet.5",
34
- "@aztec/aztec-faucet": "0.82.2-alpha-testnet.5",
35
- "@aztec/aztec-node": "0.82.2-alpha-testnet.5",
36
- "@aztec/aztec.js": "0.82.2-alpha-testnet.5",
37
- "@aztec/bb-prover": "0.82.2-alpha-testnet.5",
38
- "@aztec/bb.js": "0.82.2-alpha-testnet.5",
39
- "@aztec/blob-sink": "0.82.2-alpha-testnet.5",
40
- "@aztec/bot": "0.82.2-alpha-testnet.5",
41
- "@aztec/builder": "0.82.2-alpha-testnet.5",
42
- "@aztec/cli": "0.82.2-alpha-testnet.5",
43
- "@aztec/cli-wallet": "0.82.2-alpha-testnet.5",
44
- "@aztec/constants": "0.82.2-alpha-testnet.5",
45
- "@aztec/entrypoints": "0.82.2-alpha-testnet.5",
46
- "@aztec/ethereum": "0.82.2-alpha-testnet.5",
47
- "@aztec/foundation": "0.82.2-alpha-testnet.5",
48
- "@aztec/kv-store": "0.82.2-alpha-testnet.5",
49
- "@aztec/noir-contracts.js": "0.82.2-alpha-testnet.5",
50
- "@aztec/noir-protocol-circuits-types": "0.82.2-alpha-testnet.5",
51
- "@aztec/p2p": "0.82.2-alpha-testnet.5",
52
- "@aztec/p2p-bootstrap": "0.82.2-alpha-testnet.5",
53
- "@aztec/protocol-contracts": "0.82.2-alpha-testnet.5",
54
- "@aztec/prover-client": "0.82.2-alpha-testnet.5",
55
- "@aztec/prover-node": "0.82.2-alpha-testnet.5",
56
- "@aztec/pxe": "0.82.2-alpha-testnet.5",
57
- "@aztec/stdlib": "0.82.2-alpha-testnet.5",
58
- "@aztec/telemetry-client": "0.82.2-alpha-testnet.5",
59
- "@aztec/txe": "0.82.2-alpha-testnet.5",
60
- "@aztec/world-state": "0.82.2-alpha-testnet.5",
32
+ "@aztec/accounts": "0.82.3-nightly.20250330",
33
+ "@aztec/archiver": "0.82.3-nightly.20250330",
34
+ "@aztec/aztec-faucet": "0.82.3-nightly.20250330",
35
+ "@aztec/aztec-node": "0.82.3-nightly.20250330",
36
+ "@aztec/aztec.js": "0.82.3-nightly.20250330",
37
+ "@aztec/bb-prover": "0.82.3-nightly.20250330",
38
+ "@aztec/bb.js": "0.82.3-nightly.20250330",
39
+ "@aztec/blob-sink": "0.82.3-nightly.20250330",
40
+ "@aztec/bot": "0.82.3-nightly.20250330",
41
+ "@aztec/builder": "0.82.3-nightly.20250330",
42
+ "@aztec/cli": "0.82.3-nightly.20250330",
43
+ "@aztec/cli-wallet": "0.82.3-nightly.20250330",
44
+ "@aztec/constants": "0.82.3-nightly.20250330",
45
+ "@aztec/entrypoints": "0.82.3-nightly.20250330",
46
+ "@aztec/ethereum": "0.82.3-nightly.20250330",
47
+ "@aztec/foundation": "0.82.3-nightly.20250330",
48
+ "@aztec/kv-store": "0.82.3-nightly.20250330",
49
+ "@aztec/noir-contracts.js": "0.82.3-nightly.20250330",
50
+ "@aztec/noir-protocol-circuits-types": "0.82.3-nightly.20250330",
51
+ "@aztec/p2p": "0.82.3-nightly.20250330",
52
+ "@aztec/p2p-bootstrap": "0.82.3-nightly.20250330",
53
+ "@aztec/protocol-contracts": "0.82.3-nightly.20250330",
54
+ "@aztec/prover-client": "0.82.3-nightly.20250330",
55
+ "@aztec/prover-node": "0.82.3-nightly.20250330",
56
+ "@aztec/pxe": "0.82.3-nightly.20250330",
57
+ "@aztec/stdlib": "0.82.3-nightly.20250330",
58
+ "@aztec/telemetry-client": "0.82.3-nightly.20250330",
59
+ "@aztec/txe": "0.82.3-nightly.20250330",
60
+ "@aztec/world-state": "0.82.3-nightly.20250330",
61
61
  "@types/chalk": "^2.2.0",
62
62
  "abitype": "^0.8.11",
63
63
  "chalk": "^5.3.0",
package/src/bin/index.ts CHANGED
@@ -12,8 +12,6 @@ import { createConsoleLogger, createLogger } from '@aztec/foundation/log';
12
12
 
13
13
  import { Command } from 'commander';
14
14
 
15
- import { NETWORK_FLAG } from '../cli/aztec_start_options.js';
16
- import { type NetworkNames, enrichEnvironmentWithChainConfig } from '../cli/chain_l2_config.js';
17
15
  import { injectAztecCommands } from '../cli/index.js';
18
16
  import { getCliVersion } from '../cli/release_version.js';
19
17
 
@@ -28,22 +26,6 @@ async function main() {
28
26
  process.once('SIGINT', shutdown);
29
27
  process.once('SIGTERM', shutdown);
30
28
 
31
- // Intercept the setting of a network and enrich the environment with defaults for that network
32
- let networkValue: string | undefined;
33
-
34
- const args = process.argv.slice(2);
35
- const networkIndex = args.findIndex(arg => arg.startsWith(`--${NETWORK_FLAG}=`) || arg === `--${NETWORK_FLAG}`);
36
-
37
- if (networkIndex !== -1) {
38
- networkValue = args[networkIndex].split('=')[1] || args[networkIndex + 1];
39
- }
40
-
41
- networkValue = networkValue || process.env.NETWORK;
42
-
43
- if (networkValue !== undefined) {
44
- await enrichEnvironmentWithChainConfig(networkValue as NetworkNames);
45
- }
46
-
47
29
  const cliVersion = getCliVersion();
48
30
  let program = new Command('aztec');
49
31
  program.description('Aztec command line interface').version(cliVersion);
@@ -11,6 +11,7 @@ import { getOtelJsonRpcPropagationMiddleware } from '@aztec/telemetry-client';
11
11
 
12
12
  import { createSandbox } from '../sandbox/index.js';
13
13
  import { github, splash } from '../splash.js';
14
+ import { enrichEnvironmentWithChainConfig } from './chain_l2_config.js';
14
15
  import { getCliVersion } from './release_version.js';
15
16
  import { extractNamespacedOptions, installSignalHandlers } from './util.js';
16
17
  import { getVersions } from './versioning.js';
@@ -26,7 +27,6 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
26
27
  const cliVersion = getCliVersion();
27
28
  const sandboxOptions = extractNamespacedOptions(options, 'sandbox');
28
29
  const nodeOptions = extractNamespacedOptions(options, 'node');
29
- sandboxOptions.testAccounts = true;
30
30
  userLog(`${splash}\n${github}\n\n`);
31
31
  userLog(`Setting up Aztec Sandbox ${cliVersion}, please stand by...`);
32
32
 
@@ -51,6 +51,10 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
51
51
  userLog(`Not exposing PXE API through JSON-RPC server`);
52
52
  }
53
53
  } else {
54
+ // If a network is specified, enrich the environment with the chain config
55
+ if (options.network) {
56
+ await enrichEnvironmentWithChainConfig(options.network);
57
+ }
54
58
  if (options.node) {
55
59
  const { startNode } = await import('./cmds/start_node.js');
56
60
  ({ config } = await startNode(options, signalHandlers, services, adminServices, userLog));
@@ -65,13 +65,11 @@ export const universalOptions = [
65
65
  'dataStoreMapSizeKb',
66
66
  ];
67
67
 
68
- export const NETWORK_FLAG = 'network';
69
-
70
68
  // Define categories and options
71
69
  export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
72
70
  NETWORK: [
73
71
  {
74
- flag: `--${NETWORK_FLAG} <value>`,
72
+ flag: '--network <value>',
75
73
  description: 'Network to run Aztec on',
76
74
  defaultValue: undefined,
77
75
  envVar: 'NETWORK',
@@ -85,7 +83,13 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
85
83
  envVar: undefined,
86
84
  },
87
85
  {
88
- flag: '--sandbox.noPXE',
86
+ flag: '--sandbox.testAccounts [value]',
87
+ description: 'Deploy test accounts on sandbox start',
88
+ envVar: 'TEST_ACCOUNTS',
89
+ ...booleanConfigHelper(),
90
+ },
91
+ {
92
+ flag: '--sandbox.noPXE [value]',
89
93
  description: 'Do not expose PXE service on sandbox start',
90
94
  envVar: 'NO_PXE',
91
95
  ...booleanConfigHelper(),
@@ -263,10 +267,29 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
263
267
  envVar: 'WS_BLOCK_CHECK_INTERVAL_MS',
264
268
  parseVal: val => parseInt(val, 10),
265
269
  },
270
+ {
271
+ flag: '--node.testAccounts [value]',
272
+ description: 'Populate genesis state with initial fee juice for test accounts',
273
+ envVar: 'TEST_ACCOUNTS',
274
+ ...booleanConfigHelper(),
275
+ },
276
+ {
277
+ flag: '--node.syncMode <value>',
278
+ description:
279
+ 'Set sync mode to `full` to always sync via L1, `snapshot` to download a snapshot if there is no local data, `force-snapshot` to download even if there is local data.',
280
+ defaultValue: 'snapshot',
281
+ envVar: 'SYNC_MODE',
282
+ },
283
+ {
284
+ flag: '--node.snapshotsUrl <value>',
285
+ description: 'Base URL for downloading snapshots for snapshot sync.',
286
+ defaultValue: undefined,
287
+ envVar: 'SYNC_SNAPSHOTS_URL',
288
+ },
266
289
  ],
267
290
  'P2P SUBSYSTEM': [
268
291
  {
269
- flag: '--p2p-enabled',
292
+ flag: '--p2p-enabled [value]',
270
293
  description: 'Enable P2P subsystem',
271
294
  envVar: 'P2P_ENABLED',
272
295
  ...booleanConfigHelper(),
@@ -1,4 +1,3 @@
1
- import { EthAddress } from '@aztec/aztec.js';
2
1
  import type { EnvVar } from '@aztec/foundation/config';
3
2
 
4
3
  import path from 'path';
@@ -21,6 +20,7 @@ export type L2ChainConfig = {
21
20
  seqMinTxsPerBlock: number;
22
21
  seqMaxTxsPerBlock: number;
23
22
  realProofs: boolean;
23
+ snapshotsUrl: string;
24
24
  };
25
25
 
26
26
  export const testnetIgnitionL2ChainConfig: L2ChainConfig = {
@@ -39,6 +39,7 @@ export const testnetIgnitionL2ChainConfig: L2ChainConfig = {
39
39
  seqMinTxsPerBlock: 0,
40
40
  seqMaxTxsPerBlock: 0,
41
41
  realProofs: true,
42
+ snapshotsUrl: 'https://storage.googleapis.com/aztec-testnet/snapshots/',
42
43
  };
43
44
 
44
45
  export const alphaTestnetL2ChainConfig: L2ChainConfig = {
@@ -47,16 +48,17 @@ export const alphaTestnetL2ChainConfig: L2ChainConfig = {
47
48
  aztecSlotDuration: 36,
48
49
  aztecEpochDuration: 32,
49
50
  aztecProofSubmissionWindow: 64,
50
- testAccounts: false,
51
+ testAccounts: true,
51
52
  sponsoredFPC: true,
52
53
  p2pEnabled: true,
53
54
  p2pBootstrapNodes: [],
54
55
  registryAddress: '0xad85d55a4bbef35e95396191c22903aa717edf1c',
55
- slashFactoryAddress: '',
56
+ slashFactoryAddress: '0xf667f50fd68b30c38b12d29fee537fa5ea158eb8',
56
57
  feeAssetHandlerAddress: '0xf0664fec6ac15313e18d5ad8225e46b7c6463338',
57
58
  seqMinTxsPerBlock: 0,
58
59
  seqMaxTxsPerBlock: 4,
59
60
  realProofs: true,
61
+ snapshotsUrl: 'https://storage.googleapis.com/aztec-testnet/snapshots/',
60
62
  };
61
63
 
62
64
  export async function getBootnodes(networkName: NetworkNames) {
@@ -93,15 +95,6 @@ function enrichVar(envVar: EnvVar, value: string) {
93
95
  process.env[envVar] = value;
94
96
  }
95
97
 
96
- function enrichEthAddressVar(envVar: EnvVar, value: string) {
97
- // EthAddress doesn't like being given empty strings
98
- if (value === '') {
99
- enrichVar(envVar, EthAddress.ZERO.toString());
100
- return;
101
- }
102
- enrichVar(envVar, value);
103
- }
104
-
105
98
  export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
106
99
  const config = await getL2ChainConfig(networkName);
107
100
  if (!config) {
@@ -116,13 +109,13 @@ export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames
116
109
  enrichVar('SPONSORED_FPC', config.sponsoredFPC.toString());
117
110
  enrichVar('P2P_ENABLED', config.p2pEnabled.toString());
118
111
  enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
112
+ enrichVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
113
+ enrichVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
114
+ enrichVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
119
115
  enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
120
116
  enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
121
117
  enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec', networkName, 'data'));
122
118
  enrichVar('PROVER_REAL_PROOFS', config.realProofs.toString());
123
119
  enrichVar('PXE_PROVER_ENABLED', config.realProofs.toString());
124
-
125
- enrichEthAddressVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
126
- enrichEthAddressVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
127
- enrichEthAddressVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
120
+ enrichVar('SYNC_SNAPSHOTS_URL', config.snapshotsUrl);
128
121
  }
package/src/cli/util.ts CHANGED
@@ -243,6 +243,6 @@ export async function preloadCrsDataForServerSideProving(
243
243
  ): Promise<void> {
244
244
  if (realProofs) {
245
245
  const { Crs, GrumpkinCrs } = await import('@aztec/bb.js');
246
- await Promise.all([Crs.new(2 ** 25 - 1, undefined, log), GrumpkinCrs.new(2 ** 18 + 1, undefined, log)]);
246
+ await Promise.all([Crs.new(2 ** 25 + 1, undefined, log), GrumpkinCrs.new(2 ** 18 + 1, undefined, log)]);
247
247
  }
248
248
  }
@@ -118,12 +118,11 @@ export async function createSandbox(config: Partial<SandboxConfig> = {}, userLog
118
118
  }
119
119
 
120
120
  const initialAccounts = await (async () => {
121
- if (config.testAccounts) {
121
+ if (config.testAccounts === true || config.testAccounts === undefined) {
122
122
  if (aztecNodeConfig.p2pEnabled) {
123
123
  userLog(`Not setting up test accounts as we are connecting to a network`);
124
- } else if (config.noPXE) {
125
- userLog(`Not setting up test accounts as we are not exposing a PXE`);
126
124
  } else {
125
+ userLog(`Setting up test accounts`);
127
126
  return await getInitialTestAccounts();
128
127
  }
129
128
  }