@aztec/aztec 4.0.0-nightly.20250907 → 4.0.0-nightly.20260108

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.
Files changed (127) hide show
  1. package/README.md +1 -1
  2. package/dest/bin/index.d.ts +1 -1
  3. package/dest/bin/index.js +11 -10
  4. package/dest/cli/aztec_start_action.d.ts +1 -1
  5. package/dest/cli/aztec_start_action.d.ts.map +1 -1
  6. package/dest/cli/aztec_start_action.js +9 -25
  7. package/dest/cli/aztec_start_options.d.ts +1 -1
  8. package/dest/cli/aztec_start_options.d.ts.map +1 -1
  9. package/dest/cli/aztec_start_options.js +22 -39
  10. package/dest/cli/cli.d.ts +1 -1
  11. package/dest/cli/cli.d.ts.map +1 -1
  12. package/dest/cli/cli.js +46 -1
  13. package/dest/cli/cmds/start_archiver.d.ts +1 -1
  14. package/dest/cli/cmds/start_archiver.d.ts.map +1 -1
  15. package/dest/cli/cmds/start_archiver.js +9 -9
  16. package/dest/cli/cmds/start_bot.d.ts +4 -7
  17. package/dest/cli/cmds/start_bot.d.ts.map +1 -1
  18. package/dest/cli/cmds/start_bot.js +25 -14
  19. package/dest/cli/cmds/start_node.d.ts +1 -1
  20. package/dest/cli/cmds/start_node.d.ts.map +1 -1
  21. package/dest/cli/cmds/start_node.js +13 -21
  22. package/dest/cli/cmds/start_p2p_bootstrap.d.ts +1 -1
  23. package/dest/cli/cmds/start_p2p_bootstrap.js +1 -1
  24. package/dest/cli/cmds/start_prover_agent.d.ts +1 -1
  25. package/dest/cli/cmds/start_prover_agent.d.ts.map +1 -1
  26. package/dest/cli/cmds/start_prover_agent.js +12 -3
  27. package/dest/cli/cmds/start_prover_broker.d.ts +1 -1
  28. package/dest/cli/cmds/start_prover_broker.d.ts.map +1 -1
  29. package/dest/cli/cmds/start_prover_broker.js +8 -3
  30. package/dest/cli/cmds/start_prover_node.d.ts +1 -1
  31. package/dest/cli/cmds/start_prover_node.d.ts.map +1 -1
  32. package/dest/cli/cmds/start_prover_node.js +16 -7
  33. package/dest/cli/cmds/start_txe.d.ts +1 -1
  34. package/dest/cli/index.d.ts +1 -1
  35. package/dest/cli/preload_crs.d.ts +1 -1
  36. package/dest/cli/release_version.d.ts +1 -1
  37. package/dest/cli/util.d.ts +12 -10
  38. package/dest/cli/util.d.ts.map +1 -1
  39. package/dest/cli/util.js +7 -7
  40. package/dest/cli/versioning.d.ts +1 -1
  41. package/dest/cli/versioning.js +3 -3
  42. package/dest/examples/token.d.ts +1 -1
  43. package/dest/examples/token.js +18 -16
  44. package/dest/examples/util.d.ts +3 -3
  45. package/dest/examples/util.d.ts.map +1 -1
  46. package/dest/examples/util.js +1 -1
  47. package/dest/index.d.ts +2 -2
  48. package/dest/index.d.ts.map +1 -1
  49. package/dest/index.js +1 -1
  50. package/dest/local-network/banana_fpc.d.ts +10 -0
  51. package/dest/local-network/banana_fpc.d.ts.map +1 -0
  52. package/dest/{sandbox → local-network}/banana_fpc.js +15 -19
  53. package/dest/local-network/index.d.ts +4 -0
  54. package/dest/local-network/index.d.ts.map +1 -0
  55. package/dest/local-network/index.js +3 -0
  56. package/dest/local-network/local-network.d.ts +72 -0
  57. package/dest/local-network/local-network.d.ts.map +1 -0
  58. package/dest/{sandbox/sandbox.js → local-network/local-network.js} +43 -57
  59. package/dest/local-network/sponsored_fpc.d.ts +5 -0
  60. package/dest/local-network/sponsored_fpc.d.ts.map +1 -0
  61. package/dest/{sandbox → local-network}/sponsored_fpc.js +7 -8
  62. package/dest/mnemonic.d.ts +1 -1
  63. package/dest/splash.d.ts +1 -1
  64. package/dest/testing/anvil_test_watcher.d.ts +4 -4
  65. package/dest/testing/anvil_test_watcher.d.ts.map +1 -1
  66. package/dest/testing/anvil_test_watcher.js +19 -18
  67. package/dest/testing/cheat_codes.d.ts +7 -10
  68. package/dest/testing/cheat_codes.d.ts.map +1 -1
  69. package/dest/testing/cheat_codes.js +9 -10
  70. package/dest/testing/index.d.ts +1 -2
  71. package/dest/testing/index.d.ts.map +1 -1
  72. package/dest/testing/index.js +0 -1
  73. package/package.json +39 -37
  74. package/src/bin/index.ts +12 -10
  75. package/src/cli/aztec_start_action.ts +9 -22
  76. package/src/cli/aztec_start_options.ts +23 -40
  77. package/src/cli/cli.ts +46 -1
  78. package/src/cli/cmds/start_archiver.ts +9 -9
  79. package/src/cli/cmds/start_bot.ts +36 -13
  80. package/src/cli/cmds/start_node.ts +16 -17
  81. package/src/cli/cmds/start_p2p_bootstrap.ts +1 -1
  82. package/src/cli/cmds/start_prover_agent.ts +8 -11
  83. package/src/cli/cmds/start_prover_broker.ts +17 -3
  84. package/src/cli/cmds/start_prover_node.ts +13 -8
  85. package/src/cli/util.ts +12 -10
  86. package/src/cli/versioning.ts +3 -3
  87. package/src/examples/token.ts +20 -17
  88. package/src/examples/util.ts +2 -2
  89. package/src/index.ts +5 -5
  90. package/src/{sandbox → local-network}/banana_fpc.ts +16 -21
  91. package/src/local-network/index.ts +7 -0
  92. package/src/{sandbox/sandbox.ts → local-network/local-network.ts} +68 -99
  93. package/src/local-network/sponsored_fpc.ts +26 -0
  94. package/src/testing/anvil_test_watcher.ts +18 -19
  95. package/src/testing/cheat_codes.ts +13 -13
  96. package/src/testing/index.ts +0 -1
  97. package/dest/cli/chain_l2_config.d.ts +0 -31
  98. package/dest/cli/chain_l2_config.d.ts.map +0 -1
  99. package/dest/cli/chain_l2_config.js +0 -261
  100. package/dest/cli/cmds/start_blob_sink.d.ts +0 -3
  101. package/dest/cli/cmds/start_blob_sink.d.ts.map +0 -1
  102. package/dest/cli/cmds/start_blob_sink.js +0 -33
  103. package/dest/cli/cmds/start_pxe.d.ts +0 -16
  104. package/dest/cli/cmds/start_pxe.d.ts.map +0 -1
  105. package/dest/cli/cmds/start_pxe.js +0 -31
  106. package/dest/cli/get_l1_config.d.ts +0 -7
  107. package/dest/cli/get_l1_config.d.ts.map +0 -1
  108. package/dest/cli/get_l1_config.js +0 -13
  109. package/dest/sandbox/banana_fpc.d.ts +0 -11
  110. package/dest/sandbox/banana_fpc.d.ts.map +0 -1
  111. package/dest/sandbox/index.d.ts +0 -4
  112. package/dest/sandbox/index.d.ts.map +0 -1
  113. package/dest/sandbox/index.js +0 -3
  114. package/dest/sandbox/sandbox.d.ts +0 -83
  115. package/dest/sandbox/sandbox.d.ts.map +0 -1
  116. package/dest/sandbox/sponsored_fpc.d.ts +0 -4
  117. package/dest/sandbox/sponsored_fpc.d.ts.map +0 -1
  118. package/dest/testing/aztec_cheat_codes.d.ts +0 -59
  119. package/dest/testing/aztec_cheat_codes.d.ts.map +0 -1
  120. package/dest/testing/aztec_cheat_codes.js +0 -62
  121. package/src/cli/chain_l2_config.ts +0 -341
  122. package/src/cli/cmds/start_blob_sink.ts +0 -57
  123. package/src/cli/cmds/start_pxe.ts +0 -49
  124. package/src/cli/get_l1_config.ts +0 -19
  125. package/src/sandbox/index.ts +0 -4
  126. package/src/sandbox/sponsored_fpc.ts +0 -27
  127. package/src/testing/aztec_cheat_codes.ts +0 -77
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/aztec",
3
- "version": "4.0.0-nightly.20250907",
3
+ "version": "4.0.0-nightly.20260108",
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 -b",
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:sandbox": "ETHEREUM_HOSTS=http://0.0.0.0:8545/ && yarn start start --sandbox",
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 -b --watch",
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,44 +28,45 @@
28
28
  "../package.common.json"
29
29
  ],
30
30
  "dependencies": {
31
- "@aztec/accounts": "4.0.0-nightly.20250907",
32
- "@aztec/archiver": "4.0.0-nightly.20250907",
33
- "@aztec/aztec-faucet": "4.0.0-nightly.20250907",
34
- "@aztec/aztec-node": "4.0.0-nightly.20250907",
35
- "@aztec/aztec.js": "4.0.0-nightly.20250907",
36
- "@aztec/bb-prover": "4.0.0-nightly.20250907",
37
- "@aztec/bb.js": "4.0.0-nightly.20250907",
38
- "@aztec/blob-sink": "4.0.0-nightly.20250907",
39
- "@aztec/bot": "4.0.0-nightly.20250907",
40
- "@aztec/builder": "4.0.0-nightly.20250907",
41
- "@aztec/cli": "4.0.0-nightly.20250907",
42
- "@aztec/cli-wallet": "4.0.0-nightly.20250907",
43
- "@aztec/constants": "4.0.0-nightly.20250907",
44
- "@aztec/entrypoints": "4.0.0-nightly.20250907",
45
- "@aztec/ethereum": "4.0.0-nightly.20250907",
46
- "@aztec/foundation": "4.0.0-nightly.20250907",
47
- "@aztec/kv-store": "4.0.0-nightly.20250907",
48
- "@aztec/l1-artifacts": "4.0.0-nightly.20250907",
49
- "@aztec/node-lib": "4.0.0-nightly.20250907",
50
- "@aztec/noir-contracts.js": "4.0.0-nightly.20250907",
51
- "@aztec/noir-protocol-circuits-types": "4.0.0-nightly.20250907",
52
- "@aztec/p2p": "4.0.0-nightly.20250907",
53
- "@aztec/p2p-bootstrap": "4.0.0-nightly.20250907",
54
- "@aztec/protocol-contracts": "4.0.0-nightly.20250907",
55
- "@aztec/prover-client": "4.0.0-nightly.20250907",
56
- "@aztec/prover-node": "4.0.0-nightly.20250907",
57
- "@aztec/pxe": "4.0.0-nightly.20250907",
58
- "@aztec/stdlib": "4.0.0-nightly.20250907",
59
- "@aztec/telemetry-client": "4.0.0-nightly.20250907",
60
- "@aztec/txe": "4.0.0-nightly.20250907",
61
- "@aztec/world-state": "4.0.0-nightly.20250907",
31
+ "@aztec/accounts": "4.0.0-nightly.20260108",
32
+ "@aztec/archiver": "4.0.0-nightly.20260108",
33
+ "@aztec/aztec-faucet": "4.0.0-nightly.20260108",
34
+ "@aztec/aztec-node": "4.0.0-nightly.20260108",
35
+ "@aztec/aztec.js": "4.0.0-nightly.20260108",
36
+ "@aztec/bb-prover": "4.0.0-nightly.20260108",
37
+ "@aztec/bb.js": "4.0.0-nightly.20260108",
38
+ "@aztec/blob-client": "4.0.0-nightly.20260108",
39
+ "@aztec/bot": "4.0.0-nightly.20260108",
40
+ "@aztec/builder": "4.0.0-nightly.20260108",
41
+ "@aztec/cli": "4.0.0-nightly.20260108",
42
+ "@aztec/constants": "4.0.0-nightly.20260108",
43
+ "@aztec/entrypoints": "4.0.0-nightly.20260108",
44
+ "@aztec/ethereum": "4.0.0-nightly.20260108",
45
+ "@aztec/foundation": "4.0.0-nightly.20260108",
46
+ "@aztec/kv-store": "4.0.0-nightly.20260108",
47
+ "@aztec/l1-artifacts": "4.0.0-nightly.20260108",
48
+ "@aztec/node-lib": "4.0.0-nightly.20260108",
49
+ "@aztec/noir-contracts.js": "4.0.0-nightly.20260108",
50
+ "@aztec/noir-protocol-circuits-types": "4.0.0-nightly.20260108",
51
+ "@aztec/p2p": "4.0.0-nightly.20260108",
52
+ "@aztec/p2p-bootstrap": "4.0.0-nightly.20260108",
53
+ "@aztec/protocol-contracts": "4.0.0-nightly.20260108",
54
+ "@aztec/prover-client": "4.0.0-nightly.20260108",
55
+ "@aztec/prover-node": "4.0.0-nightly.20260108",
56
+ "@aztec/pxe": "4.0.0-nightly.20260108",
57
+ "@aztec/sequencer-client": "4.0.0-nightly.20260108",
58
+ "@aztec/stdlib": "4.0.0-nightly.20260108",
59
+ "@aztec/telemetry-client": "4.0.0-nightly.20260108",
60
+ "@aztec/test-wallet": "4.0.0-nightly.20260108",
61
+ "@aztec/txe": "4.0.0-nightly.20260108",
62
+ "@aztec/world-state": "4.0.0-nightly.20260108",
62
63
  "@types/chalk": "^2.2.0",
63
64
  "abitype": "^0.8.11",
64
65
  "chalk": "^5.3.0",
65
66
  "commander": "^12.1.0",
66
67
  "koa": "^2.16.1",
67
- "koa-router": "^12.0.0",
68
- "viem": "2.23.7"
68
+ "koa-router": "^13.1.1",
69
+ "viem": "npm:@aztec/viem@2.38.2"
69
70
  },
70
71
  "files": [
71
72
  "dest",
@@ -77,6 +78,7 @@
77
78
  "@jest/globals": "^30.0.0",
78
79
  "@types/jest": "^30.0.0",
79
80
  "@types/koa": "^2.15.0",
81
+ "@typescript/native-preview": "7.0.0-dev.20251126.1",
80
82
  "jest": "^30.0.0",
81
83
  "ts-node": "^10.9.1",
82
84
  "typescript": "^5.3.3"
package/src/bin/index.ts CHANGED
@@ -1,23 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
  //
3
3
  import { injectCommands as injectBuilderCommands } from '@aztec/builder';
4
- import { injectCommands as injectWalletCommands } from '@aztec/cli-wallet';
4
+ import { injectCommands as injectAztecNodeCommands } from '@aztec/cli/aztec_node';
5
+ import { enrichEnvironmentWithChainName } from '@aztec/cli/config/chain';
6
+ import { enrichEnvironmentWithNetworkConfig } from '@aztec/cli/config/network';
5
7
  import { injectCommands as injectContractCommands } from '@aztec/cli/contracts';
6
- import { injectCommands as injectDevnetCommands } from '@aztec/cli/devnet';
7
8
  import { injectCommands as injectInfrastructureCommands } from '@aztec/cli/infrastructure';
8
9
  import { injectCommands as injectL1Commands } from '@aztec/cli/l1';
9
10
  import { injectCommands as injectMiscCommands } from '@aztec/cli/misc';
10
- import { injectCommands as injectPXECommands } from '@aztec/cli/pxe';
11
+ import { injectCommands as injectValidatorKeysCommands } from '@aztec/cli/validator_keys';
11
12
  import { getActiveNetworkName } from '@aztec/foundation/config';
12
13
  import { createConsoleLogger, createLogger } from '@aztec/foundation/log';
13
14
 
14
15
  import { Command } from 'commander';
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
 
20
+ const NETWORK_FLAG = 'network';
21
+
21
22
  const userLog = createConsoleLogger();
22
23
  const debugLogger = createLogger('cli');
23
24
 
@@ -39,7 +40,9 @@ async function main() {
39
40
  networkValue = args[networkIndex].split('=')[1] || args[networkIndex + 1];
40
41
  }
41
42
 
42
- await enrichEnvironmentWithChainConfig(getActiveNetworkName(networkValue));
43
+ const networkName = getActiveNetworkName(networkValue);
44
+ await enrichEnvironmentWithNetworkConfig(networkName);
45
+ enrichEnvironmentWithChainName(networkName);
43
46
 
44
47
  const cliVersion = getCliVersion();
45
48
  let program = new Command('aztec');
@@ -47,12 +50,11 @@ async function main() {
47
50
  program = injectAztecCommands(program, userLog, debugLogger);
48
51
  program = injectBuilderCommands(program);
49
52
  program = injectContractCommands(program, userLog, debugLogger);
50
- program = injectInfrastructureCommands(program, userLog, debugLogger);
53
+ program = injectInfrastructureCommands(program, userLog);
51
54
  program = injectL1Commands(program, userLog, debugLogger);
52
- program = injectPXECommands(program, userLog, debugLogger);
55
+ program = injectAztecNodeCommands(program, userLog, debugLogger);
53
56
  program = injectMiscCommands(program, userLog);
54
- program = injectDevnetCommands(program, userLog, debugLogger);
55
- program = injectWalletCommands(program, userLog, debugLogger);
57
+ program = injectValidatorKeysCommands(program, userLog);
56
58
 
57
59
  await program.parseAsync(process.argv);
58
60
  }
@@ -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, PXESchema } from '@aztec/stdlib/interfaces/client';
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 { createSandbox } from '../sandbox/index.js';
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,18 @@ 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.sandbox) {
25
+ if (options.localNetwork) {
26
26
  const cliVersion = getCliVersion();
27
- const sandboxOptions = extractNamespacedOptions(options, 'sandbox');
28
- sandboxOptions.testAccounts = true;
27
+ const localNetwork = extractNamespacedOptions(options, 'local-network');
28
+ localNetwork.testAccounts = true;
29
29
  userLog(`${splash}\n${github}\n\n`);
30
- userLog(`Setting up Aztec Sandbox ${cliVersion}, please stand by...`);
30
+ userLog(`Setting up Aztec local network ${cliVersion}, please stand by...`);
31
31
 
32
- const { node, pxe, stop } = await createSandbox(
32
+ const { node, stop } = await createLocalNetwork(
33
33
  {
34
- l1Mnemonic: sandboxOptions.l1Mnemonic,
34
+ l1Mnemonic: localNetwork.l1Mnemonic,
35
35
  l1RpcUrls: options.l1RpcUrls,
36
- deployAztecContractsSalt: sandboxOptions.deployAztecContractsSalt,
37
- noPXE: sandboxOptions.noPXE,
38
- testAccounts: sandboxOptions.testAccounts,
36
+ testAccounts: localNetwork.testAccounts,
39
37
  realProofs: false,
40
38
  },
41
39
  userLog,
@@ -44,11 +42,6 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
44
42
  // Start Node and PXE JSON-RPC server
45
43
  signalHandlers.push(stop);
46
44
  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
45
  } else {
53
46
  if (options.node) {
54
47
  const { startNode } = await import('./cmds/start_node.js');
@@ -59,12 +52,6 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
59
52
  } else if (options.proverNode) {
60
53
  const { startProverNode } = await import('./cmds/start_prover_node.js');
61
54
  ({ config } = await startProverNode(options, signalHandlers, services, userLog));
62
- } else if (options.blobSink) {
63
- const { startBlobSink } = await import('./cmds/start_blob_sink.js');
64
- 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
55
  } else if (options.archiver) {
69
56
  const { startArchiver } = await import('./cmds/start_archiver.js');
70
57
  ({ config } = await startArchiver(options, signalHandlers, services));
@@ -1,8 +1,9 @@
1
1
  import { type ArchiverConfig, archiverConfigMappings } from '@aztec/archiver/config';
2
- import { sequencerClientConfigMappings } from '@aztec/aztec-node/config';
3
- import { blobSinkConfigMappings } from '@aztec/blob-sink/server';
2
+ import { blobClientConfigMapping } from '@aztec/blob-client/client/config';
4
3
  import { botConfigMappings } from '@aztec/bot/config';
5
- import { l1ContractAddressesMapping, l1ContractsConfigMappings, l1ReaderConfigMappings } from '@aztec/ethereum';
4
+ import { l1ContractsConfigMappings } from '@aztec/ethereum/config';
5
+ import { l1ContractAddressesMapping } from '@aztec/ethereum/l1-contract-addresses';
6
+ import { l1ReaderConfigMappings } from '@aztec/ethereum/l1-reader';
6
7
  import { getKeys } from '@aztec/foundation/collection';
7
8
  import {
8
9
  type ConfigMapping,
@@ -14,12 +15,13 @@ import {
14
15
  import { dataConfigMappings } from '@aztec/kv-store/config';
15
16
  import { sharedNodeConfigMappings } from '@aztec/node-lib/config';
16
17
  import { bootnodeConfigMappings, p2pConfigMappings } from '@aztec/p2p/config';
17
- import { proverAgentConfigMappings, proverBrokerConfigMappings } from '@aztec/prover-client/broker';
18
+ import { proverAgentConfigMappings, proverBrokerConfigMappings } from '@aztec/prover-client/broker/config';
18
19
  import { proverNodeConfigMappings } from '@aztec/prover-node/config';
19
20
  import { allPxeConfigMappings } from '@aztec/pxe/config';
21
+ import { sequencerClientConfigMappings } from '@aztec/sequencer-client/config';
20
22
  import { chainConfigMappings } from '@aztec/stdlib/config';
21
- import { telemetryClientConfigMappings } from '@aztec/telemetry-client';
22
- import { worldStateConfigMappings } from '@aztec/world-state';
23
+ import { telemetryClientConfigMappings } from '@aztec/telemetry-client/config';
24
+ import { worldStateConfigMappings } from '@aztec/world-state/config';
23
25
 
24
26
  import { DefaultMnemonic } from '../mnemonic.js';
25
27
 
@@ -82,6 +84,7 @@ export const universalOptions = [
82
84
  'l1ConsensusHostApiKeys',
83
85
  'l1ConsensusHostApiKeyHeaders',
84
86
  'p2pEnabled',
87
+ 'fishermanMode',
85
88
  ...getKeys(chainConfigMappings),
86
89
  ...getKeys(l1ContractsConfigMappings),
87
90
  ...getKeys(l1ContractAddressesMapping),
@@ -106,35 +109,23 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
106
109
  configToFlag('--auto-update-url', sharedNodeConfigMappings.autoUpdateUrl),
107
110
 
108
111
  configToFlag('--sync-mode', sharedNodeConfigMappings.syncMode),
109
- configToFlag('--snapshots-url', sharedNodeConfigMappings.snapshotsUrl),
112
+ configToFlag('--snapshots-urls', sharedNodeConfigMappings.snapshotsUrls),
113
+
114
+ configToFlag('--fisherman-mode', sharedNodeConfigMappings.fishermanMode),
110
115
  ],
111
- SANDBOX: [
116
+ LOCAL_NETWORK: [
112
117
  {
113
- flag: '--sandbox',
114
- description: 'Starts Aztec Sandbox',
118
+ flag: '--local-network',
119
+ description: 'Starts Aztec Local Network',
115
120
  defaultValue: undefined,
116
121
  env: undefined,
117
122
  },
118
123
  {
119
- flag: '--sandbox.noPXE',
120
- description: 'Do not expose PXE service on sandbox start',
121
- env: 'NO_PXE',
122
- ...booleanConfigHelper(),
123
- },
124
- {
125
- flag: '--sandbox.l1Mnemonic <value>',
124
+ flag: '--local-network.l1Mnemonic <value>',
126
125
  description: 'Mnemonic for L1 accounts. Will be used ',
127
126
  defaultValue: DefaultMnemonic,
128
127
  env: 'MNEMONIC',
129
128
  },
130
- {
131
- flag: '--sandbox.deployAztecContractsSalt <value>',
132
- description:
133
- 'Numeric salt for deploying L1 Aztec contracts before starting the sandbox. Needs mnemonic or private key to be set.',
134
- env: 'DEPLOY_AZTEC_CONTRACTS_SALT',
135
- defaultValue: undefined,
136
- parseVal: (val: string) => (val ? parseInt(val) : undefined),
137
- },
138
129
  ],
139
130
  API: [
140
131
  {
@@ -146,7 +137,7 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
146
137
  },
147
138
  {
148
139
  flag: '--admin-port <value>',
149
- description: 'Port to run admin APIs of Aztec Services on on',
140
+ description: 'Port to run admin APIs of Aztec Services on',
150
141
  defaultValue: 8880,
151
142
  env: 'AZTEC_ADMIN_PORT',
152
143
  parseVal: val => parseInt(val, 10),
@@ -162,17 +153,17 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
162
153
  configToFlag('--l1-chain-id', l1ReaderConfigMappings.l1ChainId),
163
154
  // Do not set default for CLI: keep undefined unless provided via flag or env
164
155
  configToFlag('--l1-rpc-urls', { ...l1ReaderConfigMappings.l1RpcUrls, defaultValue: undefined }),
165
- configToFlag('--l1-consensus-host-urls', blobSinkConfigMappings.l1ConsensusHostUrls),
166
- configToFlag('--l1-consensus-host-api-keys', blobSinkConfigMappings.l1ConsensusHostApiKeys),
167
- configToFlag('--l1-consensus-host-api-key-headers', blobSinkConfigMappings.l1ConsensusHostApiKeyHeaders),
156
+ configToFlag('--l1-consensus-host-urls', blobClientConfigMapping.l1ConsensusHostUrls),
157
+ configToFlag('--l1-consensus-host-api-keys', blobClientConfigMapping.l1ConsensusHostApiKeys),
158
+ configToFlag('--l1-consensus-host-api-key-headers', blobClientConfigMapping.l1ConsensusHostApiKeyHeaders),
168
159
  ],
169
160
  'L1 CONTRACTS': [
170
161
  configToFlag('--registry-address', l1ContractAddressesMapping.registryAddress),
171
- configToFlag('--rollup-version', chainConfigMappings.rollupVersion, 'canonical'),
162
+ configToFlag('--rollup-version', chainConfigMappings.rollupVersion),
172
163
  ],
173
164
  STORAGE: [
174
165
  configToFlag('--data-directory', dataConfigMappings.dataDirectory),
175
- configToFlag('--data-store-map-size-kb', dataConfigMappings.dataStoreMapSizeKB),
166
+ configToFlag('--data-store-map-size-kb', dataConfigMappings.dataStoreMapSizeKb),
176
167
  ],
177
168
  'WORLD STATE': [
178
169
  configToFlag('--world-state-data-directory', worldStateConfigMappings.worldStateDataDirectory),
@@ -211,21 +202,13 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
211
202
  'sequencer',
212
203
  omitConfigMappings(sequencerClientConfigMappings, [
213
204
  'fakeProcessingDelayPerTxMs',
205
+ 'fakeThrowAfterProcessingTxCount',
214
206
  'skipCollectingAttestations',
215
207
  'skipInvalidateBlockAsProposer',
216
208
  'blobSinkMapSizeKb',
217
209
  ]),
218
210
  ),
219
211
  ],
220
- 'BLOB SINK': [
221
- {
222
- flag: '--blob-sink',
223
- description: 'Starts Aztec Blob Sink with options',
224
- defaultValue: undefined,
225
- env: undefined,
226
- },
227
- ...getOptions('blobSink', blobSinkConfigMappings),
228
- ],
229
212
  'PROVER NODE': [
230
213
  {
231
214
  flag: '--prover-node',
package/src/cli/cli.ts CHANGED
@@ -37,10 +37,55 @@ export function injectAztecCommands(program: Command, userLog: LogFn, debugLogge
37
37
 
38
38
  Additional commands:
39
39
 
40
+ init [folder] [options]: creates a new Noir project
41
+ Options:
42
+ --name <name> Name of the package
43
+ --contract Use a contract template (default)
44
+ --lib Use a library template
45
+ --bin Use a binary template
46
+ Examples:
47
+ $ aztec init # creates a contract project in current directory
48
+ $ aztec init --lib # creates a library project
49
+
50
+ new <path> [options]: creates a new Noir project in a new directory
51
+ Options:
52
+ --name <name> Name of the package
53
+ --contract Use a contract template (default)
54
+ --lib Use a library template
55
+ --bin Use a binary template
56
+ Examples:
57
+ $ aztec new my-project # creates a contract project in ./my-project
58
+ $ aztec new my-lib --lib # creates a library project in ./my-lib
59
+
60
+ compile [options]: compiles Aztec Noir contracts
61
+ Compiles contracts with nargo compile and then postprocesses them to generate Aztec-specific artifacts including:
62
+ - Transpiled contract artifacts
63
+ - Verification keys
64
+ The compiled contracts will be placed in the target/ directory by default.
65
+ Supports standard nargo compile options.
66
+
67
+ fmt [options]: formats Noir code using nargo fmt
68
+ Example:
69
+ $ aztec fmt # formats all Noir files in the project
70
+
71
+ check [options]: type-checks Noir code without compiling using nargo check
72
+ Example:
73
+ $ aztec check # checks all Noir files in the project
74
+
40
75
  test [options]: starts a dockerized TXE node via
41
76
  $ aztec start --txe
42
77
  then runs
43
- $ aztec-nargo test --silence-warnings --oracle-resolver=<TXE_ADDRESS> [options]
78
+ $ aztec test --silence-warnings --oracle-resolver=<TXE_ADDRESS> [options]
79
+
80
+ lsp: starts the Nargo Language Server Protocol server
81
+ Runs nargo lsp in a Docker container for IDE integration with Noir.
82
+ This command is typically used by IDE extensions and not called directly by users.
83
+ Example:
84
+ $ aztec lsp # starts the LSP server
85
+
86
+ preload-crs: Downloads and caches the Common Reference String (CRS) data required for zero-knowledge proofs.
87
+ Example:
88
+ $ aztec preload-crs # preloads CRS data
44
89
  `,
45
90
  );
46
91
 
@@ -5,15 +5,15 @@ import {
5
5
  archiverConfigMappings,
6
6
  getArchiverConfigFromEnv,
7
7
  } from '@aztec/archiver';
8
- import { createLogger } from '@aztec/aztec.js';
9
- import { type BlobSinkConfig, blobSinkConfigMapping, createBlobSinkClient } from '@aztec/blob-sink/client';
8
+ import { createLogger } from '@aztec/aztec.js/log';
9
+ import { type BlobClientConfig, blobClientConfigMapping, createBlobClient } from '@aztec/blob-client/client';
10
+ import { getL1Config } from '@aztec/cli/config';
10
11
  import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
11
12
  import { type DataStoreConfig, dataConfigMappings } from '@aztec/kv-store/config';
12
13
  import { createStore } from '@aztec/kv-store/lmdb-v2';
13
14
  import { ArchiverApiSchema } from '@aztec/stdlib/interfaces/server';
14
15
  import { getConfigEnvVars as getTelemetryClientConfig, initTelemetryClient } from '@aztec/telemetry-client';
15
16
 
16
- import { getL1Config } from '../get_l1_config.js';
17
17
  import { extractRelevantOptions } from '../util.js';
18
18
 
19
19
  export type { ArchiverConfig, DataStoreConfig };
@@ -25,14 +25,14 @@ export async function startArchiver(
25
25
  services: NamespacedApiHandlers,
26
26
  ): Promise<{ config: ArchiverConfig & DataStoreConfig }> {
27
27
  const envConfig = getArchiverConfigFromEnv();
28
- const cliOptions = extractRelevantOptions<ArchiverConfig & DataStoreConfig & BlobSinkConfig>(
28
+ const cliOptions = extractRelevantOptions<ArchiverConfig & DataStoreConfig & BlobClientConfig>(
29
29
  options,
30
- { ...archiverConfigMappings, ...dataConfigMappings, ...blobSinkConfigMapping },
30
+ { ...archiverConfigMappings, ...dataConfigMappings, ...blobClientConfigMapping },
31
31
  'archiver',
32
32
  );
33
33
 
34
34
  let archiverConfig = { ...envConfig, ...cliOptions };
35
- archiverConfig.dataStoreMapSizeKB = archiverConfig.archiverStoreMapSizeKb ?? archiverConfig.dataStoreMapSizeKB;
35
+ archiverConfig.dataStoreMapSizeKb = archiverConfig.archiverStoreMapSizeKb ?? archiverConfig.dataStoreMapSizeKb;
36
36
 
37
37
  if (!archiverConfig.l1Contracts.registryAddress || archiverConfig.l1Contracts.registryAddress.isZero()) {
38
38
  throw new Error('L1 registry address is required to start an Archiver');
@@ -51,9 +51,9 @@ export async function startArchiver(
51
51
  const store = await createStore('archiver', KVArchiverDataStore.SCHEMA_VERSION, archiverConfig, storeLog);
52
52
  const archiverStore = new KVArchiverDataStore(store, archiverConfig.maxLogs);
53
53
 
54
- const telemetry = initTelemetryClient(getTelemetryClientConfig());
55
- const blobSinkClient = createBlobSinkClient(archiverConfig, { logger: createLogger('archiver:blob-sink:client') });
56
- const archiver = await Archiver.createAndSync(archiverConfig, archiverStore, { telemetry, blobSinkClient }, true);
54
+ const telemetry = await initTelemetryClient(getTelemetryClientConfig());
55
+ const blobClient = createBlobClient(archiverConfig, { logger: createLogger('archiver:blob-client:client') });
56
+ const archiver = await Archiver.createAndSync(archiverConfig, archiverStore, { telemetry, blobClient }, true);
57
57
  services.archiver = [archiver, ArchiverApiSchema];
58
58
  signalHandlers.push(archiver.stop);
59
59
 
@@ -1,11 +1,19 @@
1
- import { type BotConfig, BotRunner, botConfigMappings, getBotRunnerApiHandler } from '@aztec/bot';
1
+ import { type BotConfig, BotRunner, BotStore, botConfigMappings, getBotRunnerApiHandler } from '@aztec/bot';
2
2
  import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
3
3
  import type { LogFn } from '@aztec/foundation/log';
4
- import type { AztecNode, PXE } from '@aztec/stdlib/interfaces/client';
4
+ import { createStore, openTmpStore } from '@aztec/kv-store/lmdb-v2';
5
+ import { type CliPXEOptions, type PXEConfig, allPxeConfigMappings } from '@aztec/pxe/config';
6
+ import { type AztecNode, type AztecNodeAdmin, createAztecNodeClient } from '@aztec/stdlib/interfaces/client';
5
7
  import type { TelemetryClient } from '@aztec/telemetry-client';
6
- import { getConfigEnvVars as getTelemetryClientConfig, initTelemetryClient } from '@aztec/telemetry-client';
8
+ import {
9
+ getConfigEnvVars as getTelemetryClientConfig,
10
+ initTelemetryClient,
11
+ makeTracedFetch,
12
+ } from '@aztec/telemetry-client';
13
+ import { TestWallet } from '@aztec/test-wallet/server';
7
14
 
8
15
  import { extractRelevantOptions } from '../util.js';
16
+ import { getVersions } from '../versioning.js';
9
17
 
10
18
  export async function startBot(
11
19
  options: any,
@@ -20,26 +28,41 @@ export async function startBot(
20
28
  );
21
29
  process.exit(1);
22
30
  }
23
- // Start a PXE client that is used by the bot if required
24
- let pxe: PXE | undefined;
25
- if (options.pxe) {
26
- const { addPXE } = await import('./start_pxe.js');
27
- ({ pxe } = await addPXE(options, signalHandlers, services, userLog));
31
+
32
+ const fetch = makeTracedFetch([1, 2, 3], true);
33
+ const config = extractRelevantOptions<BotConfig>(options, botConfigMappings, 'bot');
34
+ if (!config.nodeUrl) {
35
+ throw new Error('The bot requires access to a Node');
28
36
  }
29
37
 
30
- const telemetry = initTelemetryClient(getTelemetryClientConfig());
31
- await addBot(options, signalHandlers, services, { pxe, telemetry });
38
+ const aztecNode = createAztecNodeClient(config.nodeUrl, getVersions(), fetch);
39
+
40
+ const pxeConfig = extractRelevantOptions<PXEConfig & CliPXEOptions>(options, allPxeConfigMappings, 'pxe');
41
+ const wallet = await TestWallet.create(aztecNode, pxeConfig);
42
+
43
+ const telemetry = await initTelemetryClient(getTelemetryClientConfig());
44
+ await addBot(options, signalHandlers, services, wallet, aztecNode, telemetry, undefined);
32
45
  }
33
46
 
34
- export function addBot(
47
+ export async function addBot(
35
48
  options: any,
36
49
  signalHandlers: (() => Promise<void>)[],
37
50
  services: NamespacedApiHandlers,
38
- deps: { pxe?: PXE; node?: AztecNode; telemetry: TelemetryClient },
51
+ wallet: TestWallet,
52
+ aztecNode: AztecNode,
53
+ telemetry: TelemetryClient,
54
+ aztecNodeAdmin?: AztecNodeAdmin,
39
55
  ) {
40
56
  const config = extractRelevantOptions<BotConfig>(options, botConfigMappings, 'bot');
41
57
 
42
- const botRunner = new BotRunner(config, deps);
58
+ const db = await (config.dataDirectory
59
+ ? createStore('bot', BotStore.SCHEMA_VERSION, config)
60
+ : openTmpStore('bot', true, config.dataStoreMapSizeKb));
61
+
62
+ const store = new BotStore(db);
63
+ await store.cleanupOldClaims();
64
+
65
+ const botRunner = new BotRunner(config, wallet, aztecNode, telemetry, aztecNodeAdmin, store);
43
66
  if (!config.noStart) {
44
67
  void botRunner.start(); // Do not block since bot setup takes time
45
68
  }
@@ -1,22 +1,24 @@
1
- import { getInitialTestAccounts } from '@aztec/accounts/testing';
1
+ import { getInitialTestAccountsData } from '@aztec/accounts/testing';
2
2
  import { type AztecNodeConfig, aztecNodeConfigMappings, getConfigEnvVars } from '@aztec/aztec-node';
3
- import { Fr } from '@aztec/aztec.js';
3
+ import { Fr } from '@aztec/aztec.js/fields';
4
4
  import { getSponsoredFPCAddress } from '@aztec/cli/cli-utils';
5
- import { getPublicClient } from '@aztec/ethereum';
5
+ import { getL1Config } from '@aztec/cli/config';
6
+ import { getPublicClient } from '@aztec/ethereum/client';
6
7
  import { SecretValue } from '@aztec/foundation/config';
7
8
  import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
8
9
  import type { LogFn } from '@aztec/foundation/log';
9
- import { AztecNodeAdminApiSchema, AztecNodeApiSchema, type PXE } from '@aztec/stdlib/interfaces/client';
10
+ import { type CliPXEOptions, type PXEConfig, allPxeConfigMappings } from '@aztec/pxe/config';
11
+ import { AztecNodeAdminApiSchema, AztecNodeApiSchema } from '@aztec/stdlib/interfaces/client';
10
12
  import { P2PApiSchema } from '@aztec/stdlib/interfaces/server';
11
13
  import {
12
14
  type TelemetryClientConfig,
13
15
  initTelemetryClient,
14
16
  telemetryClientConfigMappings,
15
17
  } from '@aztec/telemetry-client';
18
+ import { TestWallet } from '@aztec/test-wallet/server';
16
19
  import { getGenesisValues } from '@aztec/world-state/testing';
17
20
 
18
- import { createAztecNode } from '../../sandbox/index.js';
19
- import { getL1Config } from '../get_l1_config.js';
21
+ import { createAztecNode } from '../../local-network/index.js';
20
22
  import {
21
23
  extractNamespacedOptions,
22
24
  extractRelevantOptions,
@@ -50,7 +52,7 @@ export async function startNode(
50
52
 
51
53
  await preloadCrsDataForVerifying(nodeConfig, userLog);
52
54
 
53
- const testAccounts = nodeConfig.testAccounts ? (await getInitialTestAccounts()).map(a => a.address) : [];
55
+ const testAccounts = nodeConfig.testAccounts ? (await getInitialTestAccountsData()).map(a => a.address) : [];
54
56
  const sponsoredFPCAccounts = nodeConfig.sponsoredFPC ? [await getSponsoredFPCAddress()] : [];
55
57
  const initialFundedAccounts = testAccounts.concat(sponsoredFPCAccounts);
56
58
 
@@ -91,7 +93,7 @@ export async function startNode(
91
93
  ...config,
92
94
  };
93
95
 
94
- if (!options.sequencer) {
96
+ if (!options.sequencer && !nodeConfig.fishermanMode) {
95
97
  nodeConfig.disableValidator = true;
96
98
  } else {
97
99
  const sequencerConfig = {
@@ -115,7 +117,7 @@ export async function startNode(
115
117
  }
116
118
 
117
119
  const telemetryConfig = extractRelevantOptions<TelemetryClientConfig>(options, telemetryClientConfigMappings, 'tel');
118
- const telemetry = initTelemetryClient(telemetryConfig);
120
+ const telemetry = await initTelemetryClient(telemetryConfig);
119
121
 
120
122
  // Create and start Aztec Node
121
123
  const node = await createAztecNode(nodeConfig, { telemetry }, { prefilledPublicData });
@@ -128,17 +130,14 @@ export async function startNode(
128
130
  // Add node stop function to signal handlers
129
131
  signalHandlers.push(node.stop.bind(node));
130
132
 
131
- // Add a PXE client that connects to this node if requested
132
- let pxe: PXE | undefined;
133
- if (options.pxe) {
134
- const { addPXE } = await import('./start_pxe.js');
135
- ({ pxe } = await addPXE(options, signalHandlers, services, userLog, { node }));
136
- }
137
-
138
133
  // Add a txs bot if requested
139
134
  if (options.bot) {
140
135
  const { addBot } = await import('./start_bot.js');
141
- await addBot(options, signalHandlers, services, { pxe, node, telemetry });
136
+
137
+ const pxeConfig = extractRelevantOptions<PXEConfig & CliPXEOptions>(options, allPxeConfigMappings, 'pxe');
138
+ const wallet = await TestWallet.create(node, pxeConfig);
139
+
140
+ await addBot(options, signalHandlers, services, wallet, node, telemetry, undefined);
142
141
  }
143
142
 
144
143
  if (nodeConfig.autoUpdate !== 'disabled' && nodeConfig.autoUpdateUrl) {
@@ -25,7 +25,7 @@ export async function startP2PBootstrap(
25
25
  userLog(`Starting P2P bootstrap node with config: ${jsonStringify(safeConfig)}`);
26
26
 
27
27
  const telemetryConfig = extractRelevantOptions<TelemetryClientConfig>(options, telemetryClientConfigMappings, 'tel');
28
- const telemetryClient = initTelemetryClient(telemetryConfig);
28
+ const telemetryClient = await initTelemetryClient(telemetryConfig);
29
29
 
30
30
  const store = await createStore('p2p-bootstrap', 1, config, createLogger('p2p:bootstrap:store'));
31
31
  const node = new BootstrapNode(store, telemetryClient);