@aztec/aztec 0.82.2-alpha-testnet.2 → 0.82.2-alpha-testnet.4

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,11 @@ 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, aztecStartOptions } from '../cli/aztec_start_options.js';
14
+ import { enrichEnvironmentWithChainConfig } from '../cli/chain_l2_config.js';
13
15
  import { injectAztecCommands } from '../cli/index.js';
14
16
  import { getCliVersion } from '../cli/release_version.js';
17
+ import { addOptions } from '../cli/util.js';
15
18
  const userLog = createConsoleLogger();
16
19
  const debugLogger = createLogger('cli');
17
20
  /** CLI & full node main entrypoint */ async function main() {
@@ -20,6 +23,15 @@ const debugLogger = createLogger('cli');
20
23
  };
21
24
  process.once('SIGINT', shutdown);
22
25
  process.once('SIGTERM', shutdown);
26
+ // We create a temp command object to detect the presence of the network option
27
+ // If it has been given then we enrich the environment with the chain config
28
+ const tempCmd = new Command('aztec').allowUnknownOption();
29
+ addOptions(tempCmd, aztecStartOptions['NETWORK']);
30
+ tempCmd.parse(process.argv);
31
+ const networkValue = tempCmd.getOptionValue(NETWORK_FLAG);
32
+ if (networkValue !== undefined) {
33
+ await enrichEnvironmentWithChainConfig(networkValue);
34
+ }
23
35
  const cliVersion = getCliVersion();
24
36
  let program = new Command('aztec');
25
37
  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;AAa3D,wBAAsB,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAyGjF"}
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"}
@@ -4,7 +4,6 @@ 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';
8
7
  import { getCliVersion } from './release_version.js';
9
8
  import { extractNamespacedOptions, installSignalHandlers } from './util.js';
10
9
  import { getVersions } from './versioning.js';
@@ -18,6 +17,7 @@ export async function aztecStart(options, userLog, debugLogger) {
18
17
  const cliVersion = getCliVersion();
19
18
  const sandboxOptions = extractNamespacedOptions(options, 'sandbox');
20
19
  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,10 +43,6 @@ 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
- }
50
46
  if (options.node) {
51
47
  const { startNode } = await import('./cmds/start_node.js');
52
48
  ({ config } = await startNode(options, signalHandlers, services, adminServices, userLog));
@@ -9,6 +9,7 @@ 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";
12
13
  export declare const aztecStartOptions: {
13
14
  [key: string]: AztecStartOption[];
14
15
  };
@@ -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;AAGF,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;CA4VlE,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;AAEF,eAAO,MAAM,YAAY,YAAY,CAAC;AAGtC,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;CAgVlE,CAAC"}
@@ -40,11 +40,12 @@ export const universalOptions = [
40
40
  'dataDirectory',
41
41
  'dataStoreMapSizeKb'
42
42
  ];
43
+ export const NETWORK_FLAG = 'network';
43
44
  // Define categories and options
44
45
  export const aztecStartOptions = {
45
46
  NETWORK: [
46
47
  {
47
- flag: '--network <value>',
48
+ flag: `--${NETWORK_FLAG} <value>`,
48
49
  description: 'Network to run Aztec on',
49
50
  defaultValue: undefined,
50
51
  envVar: 'NETWORK'
@@ -57,12 +58,6 @@ export const aztecStartOptions = {
57
58
  defaultValue: undefined,
58
59
  envVar: undefined
59
60
  },
60
- {
61
- flag: '--sandbox.testAccounts',
62
- description: 'Deploy test accounts on sandbox start',
63
- envVar: 'TEST_ACCOUNTS',
64
- ...booleanConfigHelper(true)
65
- },
66
61
  {
67
62
  flag: '--sandbox.noPXE',
68
63
  description: 'Do not expose PXE service on sandbox start',
@@ -239,12 +234,6 @@ export const aztecStartOptions = {
239
234
  defaultValue: 100,
240
235
  envVar: 'WS_BLOCK_CHECK_INTERVAL_MS',
241
236
  parseVal: (val)=>parseInt(val, 10)
242
- },
243
- {
244
- flag: '--node.testAccounts',
245
- description: 'Populate genesis state with initial fee juice for test accounts',
246
- envVar: 'TEST_ACCOUNTS',
247
- ...booleanConfigHelper()
248
237
  }
249
238
  ],
250
239
  'P2P SUBSYSTEM': [
@@ -11,6 +11,7 @@ export type L2ChainConfig = {
11
11
  p2pBootstrapNodes: string[];
12
12
  registryAddress: string;
13
13
  slashFactoryAddress: string;
14
+ feeAssetHandlerAddress: string;
14
15
  seqMinTxsPerBlock: number;
15
16
  seqMaxTxsPerBlock: number;
16
17
  realProofs: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/cli/chain_l2_config.ts"],"names":[],"mappings":"AAIA,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,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,aAe1C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,aAevC,CAAC;AAEF,wBAAsB,YAAY,CAAC,WAAW,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,iBAqB/E"}
1
+ {"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/cli/chain_l2_config.ts"],"names":[],"mappings":"AAIA,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,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,aAgB1C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,aAgBvC,CAAC;AAEF,wBAAsB,YAAY,CAAC,WAAW,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,iBAsB/E"}
@@ -11,6 +11,7 @@ export const testnetIgnitionL2ChainConfig = {
11
11
  p2pBootstrapNodes: [],
12
12
  registryAddress: '0x12b3ebc176a1646b911391eab3760764f2e05fe3',
13
13
  slashFactoryAddress: '',
14
+ feeAssetHandlerAddress: '',
14
15
  seqMinTxsPerBlock: 0,
15
16
  seqMaxTxsPerBlock: 0,
16
17
  realProofs: true
@@ -22,11 +23,12 @@ export const alphaTestnetL2ChainConfig = {
22
23
  aztecEpochDuration: 32,
23
24
  aztecProofSubmissionWindow: 64,
24
25
  testAccounts: true,
25
- sponsoredFPC: true,
26
+ sponsoredFPC: false,
26
27
  p2pEnabled: true,
27
28
  p2pBootstrapNodes: [],
28
29
  registryAddress: '0xad85d55a4bbef35e95396191c22903aa717edf1c',
29
30
  slashFactoryAddress: '0xf667f50fd68b30c38b12d29fee537fa5ea158eb8',
31
+ feeAssetHandlerAddress: '0xf0664fec6ac15313e18d5ad8225e46b7c6463338',
30
32
  seqMinTxsPerBlock: 0,
31
33
  seqMaxTxsPerBlock: 4,
32
34
  realProofs: true
@@ -79,6 +81,7 @@ export async function enrichEnvironmentWithChainConfig(networkName) {
79
81
  enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
80
82
  enrichVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
81
83
  enrichVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
84
+ enrichVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
82
85
  enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
83
86
  enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
84
87
  enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec', networkName, 'data'));
@@ -1 +1 @@
1
- {"version":3,"file":"start_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAA6C,MAAM,mBAAmB,CAAC;AAGpG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgBnD,wBAAsB,SAAS,CAC7B,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,aAAa,EAAE,qBAAqB,EACpC,OAAO,EAAE,KAAK,GACb,OAAO,CAAC;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC,CA4ItC"}
1
+ {"version":3,"file":"start_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAA6C,MAAM,mBAAmB,CAAC;AAGpG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgBnD,wBAAsB,SAAS,CAC7B,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,aAAa,EAAE,qBAAqB,EACpC,OAAO,EAAE,KAAK,GACb,OAAO,CAAC;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC,CAiJtC"}
@@ -32,7 +32,10 @@ export async function startNode(options, signalHandlers, services, adminServices
32
32
  await getSponsoredFPCAddress()
33
33
  ] : [];
34
34
  const initialFundedAccounts = testAccounts.concat(sponsoredFPCAccounts);
35
+ userLog(`Initial funded accounts: ${initialFundedAccounts.map((a)=>a.toString()).join(', ')}`);
35
36
  const { genesisBlockHash, genesisArchiveRoot, prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
37
+ userLog(`Genesis block hash: ${genesisBlockHash.toString()}`);
38
+ userLog(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
36
39
  // Deploy contracts if needed
37
40
  if (nodeSpecificOptions.deployAztecContracts || nodeSpecificOptions.deployAztecContractsSalt) {
38
41
  let account;
@@ -1 +1 @@
1
- {"version":3,"file":"start_prover_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_node.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EACL,KAAK,gBAAgB,EAItB,MAAM,oBAAoB,CAAC;AAa5B,wBAAsB,eAAe,CACnC,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,KAAK,GACb,OAAO,CAAC;IAAE,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAC,CA+FvC"}
1
+ {"version":3,"file":"start_prover_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_node.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EACL,KAAK,gBAAgB,EAItB,MAAM,oBAAoB,CAAC;AAa5B,wBAAsB,eAAe,CACnC,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,KAAK,GACb,OAAO,CAAC;IAAE,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAC,CAoGvC"}
@@ -84,7 +84,10 @@ export async function startProverNode(options, signalHandlers, services, userLog
84
84
  await getSponsoredFPCAddress()
85
85
  ] : [];
86
86
  const initialFundedAccounts = testAccounts.concat(sponsoredFPCAccounts);
87
- const { prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
87
+ userLog(`Initial funded accounts: ${initialFundedAccounts.map((a)=>a.toString()).join(', ')}`);
88
+ const { genesisArchiveRoot, genesisBlockHash, prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
89
+ userLog(`Genesis block hash: ${genesisBlockHash.toString()}`);
90
+ userLog(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
88
91
  const proverNode = await createProverNode(proverConfig, {
89
92
  telemetry,
90
93
  broker
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/aztec",
3
- "version": "0.82.2-alpha-testnet.2",
3
+ "version": "0.82.2-alpha-testnet.4",
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.2",
33
- "@aztec/archiver": "0.82.2-alpha-testnet.2",
34
- "@aztec/aztec-faucet": "0.82.2-alpha-testnet.2",
35
- "@aztec/aztec-node": "0.82.2-alpha-testnet.2",
36
- "@aztec/aztec.js": "0.82.2-alpha-testnet.2",
37
- "@aztec/bb-prover": "0.82.2-alpha-testnet.2",
38
- "@aztec/bb.js": "0.82.2-alpha-testnet.2",
39
- "@aztec/blob-sink": "0.82.2-alpha-testnet.2",
40
- "@aztec/bot": "0.82.2-alpha-testnet.2",
41
- "@aztec/builder": "0.82.2-alpha-testnet.2",
42
- "@aztec/cli": "0.82.2-alpha-testnet.2",
43
- "@aztec/cli-wallet": "0.82.2-alpha-testnet.2",
44
- "@aztec/constants": "0.82.2-alpha-testnet.2",
45
- "@aztec/entrypoints": "0.82.2-alpha-testnet.2",
46
- "@aztec/ethereum": "0.82.2-alpha-testnet.2",
47
- "@aztec/foundation": "0.82.2-alpha-testnet.2",
48
- "@aztec/kv-store": "0.82.2-alpha-testnet.2",
49
- "@aztec/noir-contracts.js": "0.82.2-alpha-testnet.2",
50
- "@aztec/noir-protocol-circuits-types": "0.82.2-alpha-testnet.2",
51
- "@aztec/p2p": "0.82.2-alpha-testnet.2",
52
- "@aztec/p2p-bootstrap": "0.82.2-alpha-testnet.2",
53
- "@aztec/protocol-contracts": "0.82.2-alpha-testnet.2",
54
- "@aztec/prover-client": "0.82.2-alpha-testnet.2",
55
- "@aztec/prover-node": "0.82.2-alpha-testnet.2",
56
- "@aztec/pxe": "0.82.2-alpha-testnet.2",
57
- "@aztec/stdlib": "0.82.2-alpha-testnet.2",
58
- "@aztec/telemetry-client": "0.82.2-alpha-testnet.2",
59
- "@aztec/txe": "0.82.2-alpha-testnet.2",
60
- "@aztec/world-state": "0.82.2-alpha-testnet.2",
32
+ "@aztec/accounts": "0.82.2-alpha-testnet.4",
33
+ "@aztec/archiver": "0.82.2-alpha-testnet.4",
34
+ "@aztec/aztec-faucet": "0.82.2-alpha-testnet.4",
35
+ "@aztec/aztec-node": "0.82.2-alpha-testnet.4",
36
+ "@aztec/aztec.js": "0.82.2-alpha-testnet.4",
37
+ "@aztec/bb-prover": "0.82.2-alpha-testnet.4",
38
+ "@aztec/bb.js": "0.82.2-alpha-testnet.4",
39
+ "@aztec/blob-sink": "0.82.2-alpha-testnet.4",
40
+ "@aztec/bot": "0.82.2-alpha-testnet.4",
41
+ "@aztec/builder": "0.82.2-alpha-testnet.4",
42
+ "@aztec/cli": "0.82.2-alpha-testnet.4",
43
+ "@aztec/cli-wallet": "0.82.2-alpha-testnet.4",
44
+ "@aztec/constants": "0.82.2-alpha-testnet.4",
45
+ "@aztec/entrypoints": "0.82.2-alpha-testnet.4",
46
+ "@aztec/ethereum": "0.82.2-alpha-testnet.4",
47
+ "@aztec/foundation": "0.82.2-alpha-testnet.4",
48
+ "@aztec/kv-store": "0.82.2-alpha-testnet.4",
49
+ "@aztec/noir-contracts.js": "0.82.2-alpha-testnet.4",
50
+ "@aztec/noir-protocol-circuits-types": "0.82.2-alpha-testnet.4",
51
+ "@aztec/p2p": "0.82.2-alpha-testnet.4",
52
+ "@aztec/p2p-bootstrap": "0.82.2-alpha-testnet.4",
53
+ "@aztec/protocol-contracts": "0.82.2-alpha-testnet.4",
54
+ "@aztec/prover-client": "0.82.2-alpha-testnet.4",
55
+ "@aztec/prover-node": "0.82.2-alpha-testnet.4",
56
+ "@aztec/pxe": "0.82.2-alpha-testnet.4",
57
+ "@aztec/stdlib": "0.82.2-alpha-testnet.4",
58
+ "@aztec/telemetry-client": "0.82.2-alpha-testnet.4",
59
+ "@aztec/txe": "0.82.2-alpha-testnet.4",
60
+ "@aztec/world-state": "0.82.2-alpha-testnet.4",
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,11 @@ import { createConsoleLogger, createLogger } from '@aztec/foundation/log';
12
12
 
13
13
  import { Command } from 'commander';
14
14
 
15
+ import { NETWORK_FLAG, aztecStartOptions } from '../cli/aztec_start_options.js';
16
+ import { enrichEnvironmentWithChainConfig } from '../cli/chain_l2_config.js';
15
17
  import { injectAztecCommands } from '../cli/index.js';
16
18
  import { getCliVersion } from '../cli/release_version.js';
19
+ import { addOptions } from '../cli/util.js';
17
20
 
18
21
  const userLog = createConsoleLogger();
19
22
  const debugLogger = createLogger('cli');
@@ -26,6 +29,17 @@ async function main() {
26
29
  process.once('SIGINT', shutdown);
27
30
  process.once('SIGTERM', shutdown);
28
31
 
32
+ // We create a temp command object to detect the presence of the network option
33
+ // If it has been given then we enrich the environment with the chain config
34
+ const tempCmd = new Command('aztec').allowUnknownOption();
35
+ addOptions(tempCmd, aztecStartOptions['NETWORK']);
36
+ tempCmd.parse(process.argv);
37
+ const networkValue = tempCmd.getOptionValue(NETWORK_FLAG);
38
+
39
+ if (networkValue !== undefined) {
40
+ await enrichEnvironmentWithChainConfig(networkValue);
41
+ }
42
+
29
43
  const cliVersion = getCliVersion();
30
44
  let program = new Command('aztec');
31
45
  program.description('Aztec command line interface').version(cliVersion);
@@ -11,7 +11,6 @@ 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';
15
14
  import { getCliVersion } from './release_version.js';
16
15
  import { extractNamespacedOptions, installSignalHandlers } from './util.js';
17
16
  import { getVersions } from './versioning.js';
@@ -27,6 +26,7 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
27
26
  const cliVersion = getCliVersion();
28
27
  const sandboxOptions = extractNamespacedOptions(options, 'sandbox');
29
28
  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,10 +51,6 @@ 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
- }
58
54
  if (options.node) {
59
55
  const { startNode } = await import('./cmds/start_node.js');
60
56
  ({ config } = await startNode(options, signalHandlers, services, adminServices, userLog));
@@ -65,11 +65,13 @@ export const universalOptions = [
65
65
  'dataStoreMapSizeKb',
66
66
  ];
67
67
 
68
+ export const NETWORK_FLAG = 'network';
69
+
68
70
  // Define categories and options
69
71
  export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
70
72
  NETWORK: [
71
73
  {
72
- flag: '--network <value>',
74
+ flag: `--${NETWORK_FLAG} <value>`,
73
75
  description: 'Network to run Aztec on',
74
76
  defaultValue: undefined,
75
77
  envVar: 'NETWORK',
@@ -82,12 +84,6 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
82
84
  defaultValue: undefined,
83
85
  envVar: undefined,
84
86
  },
85
- {
86
- flag: '--sandbox.testAccounts',
87
- description: 'Deploy test accounts on sandbox start',
88
- envVar: 'TEST_ACCOUNTS',
89
- ...booleanConfigHelper(true),
90
- },
91
87
  {
92
88
  flag: '--sandbox.noPXE',
93
89
  description: 'Do not expose PXE service on sandbox start',
@@ -267,12 +263,6 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
267
263
  envVar: 'WS_BLOCK_CHECK_INTERVAL_MS',
268
264
  parseVal: val => parseInt(val, 10),
269
265
  },
270
- {
271
- flag: '--node.testAccounts',
272
- description: 'Populate genesis state with initial fee juice for test accounts',
273
- envVar: 'TEST_ACCOUNTS',
274
- ...booleanConfigHelper(),
275
- },
276
266
  ],
277
267
  'P2P SUBSYSTEM': [
278
268
  {
@@ -16,6 +16,7 @@ export type L2ChainConfig = {
16
16
  p2pBootstrapNodes: string[];
17
17
  registryAddress: string;
18
18
  slashFactoryAddress: string;
19
+ feeAssetHandlerAddress: string;
19
20
  seqMinTxsPerBlock: number;
20
21
  seqMaxTxsPerBlock: number;
21
22
  realProofs: boolean;
@@ -33,6 +34,7 @@ export const testnetIgnitionL2ChainConfig: L2ChainConfig = {
33
34
  p2pBootstrapNodes: [],
34
35
  registryAddress: '0x12b3ebc176a1646b911391eab3760764f2e05fe3',
35
36
  slashFactoryAddress: '',
37
+ feeAssetHandlerAddress: '',
36
38
  seqMinTxsPerBlock: 0,
37
39
  seqMaxTxsPerBlock: 0,
38
40
  realProofs: true,
@@ -45,11 +47,12 @@ export const alphaTestnetL2ChainConfig: L2ChainConfig = {
45
47
  aztecEpochDuration: 32,
46
48
  aztecProofSubmissionWindow: 64,
47
49
  testAccounts: true,
48
- sponsoredFPC: true,
50
+ sponsoredFPC: false,
49
51
  p2pEnabled: true,
50
52
  p2pBootstrapNodes: [],
51
53
  registryAddress: '0xad85d55a4bbef35e95396191c22903aa717edf1c',
52
54
  slashFactoryAddress: '0xf667f50fd68b30c38b12d29fee537fa5ea158eb8',
55
+ feeAssetHandlerAddress: '0xf0664fec6ac15313e18d5ad8225e46b7c6463338',
53
56
  seqMinTxsPerBlock: 0,
54
57
  seqMaxTxsPerBlock: 4,
55
58
  realProofs: true,
@@ -105,6 +108,7 @@ export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames
105
108
  enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
106
109
  enrichVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
107
110
  enrichVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
111
+ enrichVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
108
112
  enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
109
113
  enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
110
114
  enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec', networkName, 'data'));
@@ -52,8 +52,13 @@ export async function startNode(
52
52
  const sponsoredFPCAccounts = nodeConfig.sponsoredFPC ? [await getSponsoredFPCAddress()] : [];
53
53
  const initialFundedAccounts = testAccounts.concat(sponsoredFPCAccounts);
54
54
 
55
+ userLog(`Initial funded accounts: ${initialFundedAccounts.map(a => a.toString()).join(', ')}`);
56
+
55
57
  const { genesisBlockHash, genesisArchiveRoot, prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
56
58
 
59
+ userLog(`Genesis block hash: ${genesisBlockHash.toString()}`);
60
+ userLog(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
61
+
57
62
  // Deploy contracts if needed
58
63
  if (nodeSpecificOptions.deployAztecContracts || nodeSpecificOptions.deployAztecContractsSalt) {
59
64
  let account;
@@ -105,7 +105,12 @@ export async function startProverNode(
105
105
  const testAccounts = proverConfig.testAccounts ? (await getInitialTestAccounts()).map(a => a.address) : [];
106
106
  const sponsoredFPCAccounts = proverConfig.sponsoredFPC ? [await getSponsoredFPCAddress()] : [];
107
107
  const initialFundedAccounts = testAccounts.concat(sponsoredFPCAccounts);
108
- const { prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
108
+
109
+ userLog(`Initial funded accounts: ${initialFundedAccounts.map(a => a.toString()).join(', ')}`);
110
+ const { genesisArchiveRoot, genesisBlockHash, prefilledPublicData } = await getGenesisValues(initialFundedAccounts);
111
+
112
+ userLog(`Genesis block hash: ${genesisBlockHash.toString()}`);
113
+ userLog(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
109
114
 
110
115
  const proverNode = await createProverNode(proverConfig, { telemetry, broker }, { prefilledPublicData });
111
116
  services.proverNode = [proverNode, ProverNodeApiSchema];