@aztec/aztec 0.81.0 → 0.82.1-alpha-testnet.1

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 (48) hide show
  1. package/dest/cli/aztec_start_action.d.ts.map +1 -1
  2. package/dest/cli/aztec_start_action.js +20 -2
  3. package/dest/cli/aztec_start_options.d.ts.map +1 -1
  4. package/dest/cli/aztec_start_options.js +47 -9
  5. package/dest/cli/chain_l2_config.d.ts +3 -1
  6. package/dest/cli/chain_l2_config.d.ts.map +1 -1
  7. package/dest/cli/chain_l2_config.js +25 -2
  8. package/dest/cli/cmds/start_archiver.d.ts.map +1 -1
  9. package/dest/cli/cmds/start_archiver.js +1 -0
  10. package/dest/cli/cmds/start_node.d.ts +1 -1
  11. package/dest/cli/cmds/start_node.d.ts.map +1 -1
  12. package/dest/cli/cmds/start_node.js +8 -3
  13. package/dest/cli/cmds/start_prover_agent.d.ts.map +1 -1
  14. package/dest/cli/cmds/start_prover_agent.js +2 -1
  15. package/dest/cli/cmds/start_prover_node.d.ts.map +1 -1
  16. package/dest/cli/cmds/start_prover_node.js +2 -1
  17. package/dest/cli/util.d.ts +14 -0
  18. package/dest/cli/util.d.ts.map +1 -1
  19. package/dest/cli/util.js +26 -0
  20. package/dest/index.d.ts +1 -1
  21. package/dest/index.d.ts.map +1 -1
  22. package/dest/index.js +1 -1
  23. package/dest/sandbox/index.d.ts +0 -1
  24. package/dest/sandbox/index.d.ts.map +1 -1
  25. package/dest/sandbox/index.js +0 -1
  26. package/dest/sandbox/sandbox.d.ts +16 -15
  27. package/dest/sandbox/sandbox.d.ts.map +1 -1
  28. package/dest/sandbox/sandbox.js +8 -7
  29. package/dest/sandbox/sponsored_fpc.d.ts +1 -3
  30. package/dest/sandbox/sponsored_fpc.d.ts.map +1 -1
  31. package/dest/sandbox/sponsored_fpc.js +2 -9
  32. package/package.json +30 -29
  33. package/src/cli/aztec_start_action.ts +16 -1
  34. package/src/cli/aztec_start_options.ts +55 -9
  35. package/src/cli/chain_l2_config.ts +28 -2
  36. package/src/cli/cmds/start_archiver.ts +1 -0
  37. package/src/cli/cmds/start_node.ts +6 -2
  38. package/src/cli/cmds/start_prover_agent.ts +3 -1
  39. package/src/cli/cmds/start_prover_node.ts +3 -1
  40. package/src/cli/util.ts +32 -0
  41. package/src/index.ts +0 -1
  42. package/src/sandbox/index.ts +0 -1
  43. package/src/sandbox/sandbox.ts +6 -12
  44. package/src/sandbox/sponsored_fpc.ts +3 -19
  45. package/dest/sandbox/sponsored_fee_payment_method.d.ts +0 -23
  46. package/dest/sandbox/sponsored_fee_payment_method.d.ts.map +0 -1
  47. package/dest/sandbox/sponsored_fee_payment_method.js +0 -36
  48. package/src/sandbox/sponsored_fee_payment_method.ts +0 -46
@@ -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,iBA0FjF"}
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"}
@@ -12,6 +12,7 @@ export async function aztecStart(options, userLog, debugLogger) {
12
12
  // list of 'stop' functions to call when process ends
13
13
  const signalHandlers = [];
14
14
  const services = {};
15
+ const adminServices = {};
15
16
  let config = undefined;
16
17
  if (options.sandbox) {
17
18
  const cliVersion = getCliVersion();
@@ -24,7 +25,8 @@ export async function aztecStart(options, userLog, debugLogger) {
24
25
  l1RpcUrls: options.l1RpcUrls,
25
26
  l1Salt: nodeOptions.deployAztecContractsSalt,
26
27
  noPXE: sandboxOptions.noPXE,
27
- testAccounts: sandboxOptions.testAccounts
28
+ testAccounts: sandboxOptions.testAccounts,
29
+ realProofs: false
28
30
  }, userLog);
29
31
  // Start Node and PXE JSON-RPC server
30
32
  signalHandlers.push(stop);
@@ -47,7 +49,7 @@ export async function aztecStart(options, userLog, debugLogger) {
47
49
  }
48
50
  if (options.node) {
49
51
  const { startNode } = await import('./cmds/start_node.js');
50
- ({ config } = await startNode(options, signalHandlers, services, userLog));
52
+ ({ config } = await startNode(options, signalHandlers, services, adminServices, userLog));
51
53
  } else if (options.bot) {
52
54
  const { startBot } = await import('./cmds/start_bot.js');
53
55
  await startBot(options, signalHandlers, services, userLog);
@@ -88,6 +90,7 @@ export async function aztecStart(options, userLog, debugLogger) {
88
90
  }
89
91
  installSignalHandlers(debugLogger.info, signalHandlers);
90
92
  const versions = getVersions(config);
93
+ // Start the main JSON-RPC server
91
94
  if (Object.entries(services).length > 0) {
92
95
  const rpcServer = createNamespacedSafeJsonRpcServer(services, {
93
96
  http200OnError: false,
@@ -102,4 +105,19 @@ export async function aztecStart(options, userLog, debugLogger) {
102
105
  });
103
106
  debugLogger.info(`Aztec Server listening on port ${port}`, versions);
104
107
  }
108
+ // If there are any admin services, start a separate JSON-RPC server for them
109
+ if (Object.entries(adminServices).length > 0) {
110
+ const rpcServer = createNamespacedSafeJsonRpcServer(adminServices, {
111
+ http200OnError: false,
112
+ log: debugLogger,
113
+ middlewares: [
114
+ getOtelJsonRpcPropagationMiddleware(),
115
+ getVersioningMiddleware(versions)
116
+ ]
117
+ });
118
+ const { port } = await startHttpRpcServer(rpcServer, {
119
+ port: options.adminPort
120
+ });
121
+ debugLogger.info(`Aztec Server admin API listening on port ${port}`, versions);
122
+ }
105
123
  }
@@ -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,UAA2E,CAAC;AAGzG,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;CAwTlE,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;CA4VlE,CAAC"}
@@ -31,10 +31,14 @@ export const getOptions = (namespace, configMappings)=>{
31
31
  // These are options used by multiple modules so should be inputted once
32
32
  export const universalOptions = [
33
33
  'l1RpcUrls',
34
+ 'l1ConsensusHostUrl',
35
+ 'l1ConsensusHostApiKey',
36
+ 'l1ConsensusHostApiKeyHeader',
34
37
  'l1ChainId',
35
38
  'l1Contracts',
36
39
  'p2pEnabled',
37
- 'dataDirectory'
40
+ 'dataDirectory',
41
+ 'dataStoreMapSizeKb'
38
42
  ];
39
43
  // Define categories and options
40
44
  export const aztecStartOptions = {
@@ -69,11 +73,18 @@ export const aztecStartOptions = {
69
73
  API: [
70
74
  {
71
75
  flag: '--port <value>',
72
- description: 'Port to run the Aztec Services on on',
76
+ description: 'Port to run the Aztec Services on',
73
77
  defaultValue: 8080,
74
78
  envVar: 'AZTEC_PORT',
75
79
  parseVal: (val)=>parseInt(val, 10)
76
80
  },
81
+ {
82
+ flag: '--admin-port <value>',
83
+ description: 'Port to run admin APIs of Aztec Services on on',
84
+ defaultValue: 8880,
85
+ envVar: 'AZTEC_ADMIN_PORT',
86
+ parseVal: (val)=>parseInt(val, 10)
87
+ },
77
88
  {
78
89
  flag: '--api-prefix <value>',
79
90
  description: 'Prefix for API routes on any service that is started',
@@ -103,6 +114,39 @@ export const aztecStartOptions = {
103
114
  description: 'Mnemonic for L1 accounts. Will be used if no publisher private keys are provided',
104
115
  defaultValue: DefaultMnemonic,
105
116
  envVar: 'MNEMONIC'
117
+ },
118
+ {
119
+ flag: '--l1-consensus-host-url <value>',
120
+ description: 'URL of the Ethereum consensus node that services will connect to',
121
+ defaultValue: undefined,
122
+ envVar: 'L1_CONSENSUS_HOST_URL'
123
+ },
124
+ {
125
+ flag: '--l1-consensus-host-api-key <value>',
126
+ description: 'API key for the Ethereum consensus node',
127
+ defaultValue: undefined,
128
+ envVar: 'L1_CONSENSUS_HOST_API_KEY'
129
+ },
130
+ {
131
+ flag: '--l1-consensus-host-api-key-header <value>',
132
+ description: 'API key header for the Ethereum consensus node. If not set, the api key will be appended to the URL as ?key=<api-key>',
133
+ defaultValue: undefined,
134
+ envVar: 'L1_CONSENSUS_HOST_API_KEY_HEADER'
135
+ }
136
+ ],
137
+ STORAGE: [
138
+ {
139
+ flag: '--data-directory <value>',
140
+ description: 'Where to store data for services. If not set, will store temporarily',
141
+ defaultValue: undefined,
142
+ envVar: 'DATA_DIRECTORY'
143
+ },
144
+ {
145
+ flag: '--data-store-map-size-kb <value>',
146
+ description: 'The maximum possible size of the data store DB in KB. Can be overridden by component-specific options.',
147
+ defaultValue: undefined,
148
+ envVar: 'DATA_STORE_MAP_SIZE_KB',
149
+ parseVal: (val)=>parseInt(val, 10)
106
150
  }
107
151
  ],
108
152
  'L1 CONTRACT ADDRESSES': [
@@ -157,12 +201,6 @@ export const aztecStartOptions = {
157
201
  defaultValue: undefined,
158
202
  envVar: undefined
159
203
  },
160
- {
161
- flag: '--data-directory <value>',
162
- description: 'Where to store data. If not set, will store temporarily',
163
- defaultValue: undefined,
164
- envVar: 'DATA_DIRECTORY'
165
- },
166
204
  {
167
205
  flag: '--node.archiverUrl <value>',
168
206
  description: 'URL for an archiver service',
@@ -249,7 +287,7 @@ export const aztecStartOptions = {
249
287
  },
250
288
  ...getOptions('sequencer', sequencerClientConfigMappings)
251
289
  ],
252
- BLOB_SINK: [
290
+ 'BLOB SINK': [
253
291
  {
254
292
  flag: '--blob-sink',
255
293
  description: 'Starts Aztec Blob Sink with options',
@@ -1,4 +1,4 @@
1
- export type NetworkNames = 'testnet-ignition';
1
+ export type NetworkNames = 'testnet-ignition' | 'alpha-testnet';
2
2
  export type L2ChainConfig = {
3
3
  l1ChainId: number;
4
4
  ethereumSlotDuration: number;
@@ -11,8 +11,10 @@ export type L2ChainConfig = {
11
11
  registryAddress: string;
12
12
  seqMinTxsPerBlock: number;
13
13
  seqMaxTxsPerBlock: number;
14
+ realProofs: boolean;
14
15
  };
15
16
  export declare const testnetIgnitionL2ChainConfig: L2ChainConfig;
17
+ export declare const alphaTestnetL2ChainConfig: L2ChainConfig;
16
18
  export declare function getBootnodes(networkName: NetworkNames): Promise<any>;
17
19
  export declare function getL2ChainConfig(networkName: NetworkNames): Promise<L2ChainConfig | undefined>;
18
20
  export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): Promise<void>;
@@ -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,CAAC;AAE9C,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,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,aAY1C,CAAC;AAEF,wBAAsB,YAAY,CAAC,WAAW,EAAE,YAAY,gBAQ3D;AAED,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAOpG;AAUD,wBAAsB,gCAAgC,CAAC,WAAW,EAAE,YAAY,iBAiB/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,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,aAa1C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,aAavC,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,iBAmB/E"}
@@ -10,13 +10,28 @@ export const testnetIgnitionL2ChainConfig = {
10
10
  p2pBootstrapNodes: [],
11
11
  registryAddress: '0x12b3ebc176a1646b911391eab3760764f2e05fe3',
12
12
  seqMinTxsPerBlock: 0,
13
- seqMaxTxsPerBlock: 0
13
+ seqMaxTxsPerBlock: 0,
14
+ realProofs: true
15
+ };
16
+ export const alphaTestnetL2ChainConfig = {
17
+ l1ChainId: 11155111,
18
+ ethereumSlotDuration: 12,
19
+ aztecSlotDuration: 36,
20
+ aztecEpochDuration: 32,
21
+ aztecProofSubmissionWindow: 64,
22
+ testAccounts: false,
23
+ p2pEnabled: true,
24
+ p2pBootstrapNodes: [],
25
+ registryAddress: '',
26
+ seqMinTxsPerBlock: 0,
27
+ seqMaxTxsPerBlock: 4,
28
+ realProofs: true
14
29
  };
15
30
  export async function getBootnodes(networkName) {
16
31
  const url = `http://static.aztec.network/${networkName}/bootnodes.json`;
17
32
  const response = await fetch(url);
18
33
  if (!response.ok) {
19
- throw new Error(`Failed to fetch basic contract addresses from ${url}`);
34
+ throw new Error(`Failed to fetch basic contract addresses from ${url}. Check you are using a correct network name.`);
20
35
  }
21
36
  const json = await response.json();
22
37
  return json['bootnodes'];
@@ -28,6 +43,12 @@ export async function getL2ChainConfig(networkName) {
28
43
  };
29
44
  config.p2pBootstrapNodes = await getBootnodes(networkName);
30
45
  return config;
46
+ } else if (networkName === 'alpha-testnet') {
47
+ const config = {
48
+ ...alphaTestnetL2ChainConfig
49
+ };
50
+ config.p2pBootstrapNodes = await getBootnodes(networkName);
51
+ return config;
31
52
  }
32
53
  return undefined;
33
54
  }
@@ -55,4 +76,6 @@ export async function enrichEnvironmentWithChainConfig(networkName) {
55
76
  enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
56
77
  enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
57
78
  enrichVar('DATA_DIRECTORY', path.join(process.env.HOME || '~', '.aztec', networkName, 'data'));
79
+ enrichVar('PROVER_REAL_PROOFS', config.realProofs.toString());
80
+ enrichVar('PXE_PROVER_ENABLED', config.realProofs.toString());
58
81
  }
@@ -1 +1 @@
1
- {"version":3,"file":"start_archiver.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_archiver.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAIpB,MAAM,iBAAiB,CAAC;AAQzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,KAAK,eAAe,EAA4C,MAAM,wBAAwB,CAAC;AAQxG,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AAEhD,oCAAoC;AACpC,wBAAsB,aAAa,CACjC,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC;IAAE,MAAM,EAAE,cAAc,GAAG,eAAe,CAAA;CAAE,CAAC,CAkCvD"}
1
+ {"version":3,"file":"start_archiver.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_archiver.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAIpB,MAAM,iBAAiB,CAAC;AAQzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAAE,KAAK,eAAe,EAA4C,MAAM,wBAAwB,CAAC;AAQxG,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AAEhD,oCAAoC;AACpC,wBAAsB,aAAa,CACjC,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC;IAAE,MAAM,EAAE,cAAc,GAAG,eAAe,CAAA;CAAE,CAAC,CAmCvD"}
@@ -22,6 +22,7 @@ import { extractRelevantOptions } from '../util.js';
22
22
  ...envConfig,
23
23
  ...cliOptions
24
24
  };
25
+ archiverConfig.dataStoreMapSizeKB = archiverConfig.archiverStoreMapSizeKb ?? archiverConfig.dataStoreMapSizeKB;
25
26
  if (!archiverConfig.l1Contracts.registryAddress || archiverConfig.l1Contracts.registryAddress.isZero()) {
26
27
  throw new Error('L1 registry address is required to start an Archiver');
27
28
  }
@@ -1,7 +1,7 @@
1
1
  import { type AztecNodeConfig } from '@aztec/aztec-node';
2
2
  import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
3
3
  import type { LogFn } from '@aztec/foundation/log';
4
- export declare function startNode(options: any, signalHandlers: (() => Promise<void>)[], services: NamespacedApiHandlers, userLog: LogFn): Promise<{
4
+ export declare function startNode(options: any, signalHandlers: (() => Promise<void>)[], services: NamespacedApiHandlers, adminServices: NamespacedApiHandlers, userLog: LogFn): Promise<{
5
5
  config: AztecNodeConfig;
6
6
  }>;
7
7
  //# sourceMappingURL=start_node.d.ts.map
@@ -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;AAEpG,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,OAAO,EAAE,KAAK,GACb,OAAO,CAAC;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC,CAwItC"}
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;AAEpG,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,CA2ItC"}
@@ -1,15 +1,15 @@
1
1
  import { getInitialTestAccounts } from '@aztec/accounts/testing';
2
2
  import { aztecNodeConfigMappings, getConfigEnvVars } from '@aztec/aztec-node';
3
3
  import { NULL_KEY } from '@aztec/ethereum';
4
- import { AztecNodeApiSchema } from '@aztec/stdlib/interfaces/client';
4
+ import { AztecNodeAdminApiSchema, AztecNodeApiSchema } from '@aztec/stdlib/interfaces/client';
5
5
  import { P2PApiSchema } from '@aztec/stdlib/interfaces/server';
6
6
  import { initTelemetryClient, telemetryClientConfigMappings } from '@aztec/telemetry-client';
7
7
  import { getGenesisValues } from '@aztec/world-state/testing';
8
8
  import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
9
9
  import { createAztecNode, deployContractsToL1 } from '../../sandbox/index.js';
10
10
  import { getL1Config } from '../get_l1_config.js';
11
- import { extractNamespacedOptions, extractRelevantOptions } from '../util.js';
12
- export async function startNode(options, signalHandlers, services, userLog) {
11
+ import { extractNamespacedOptions, extractRelevantOptions, preloadCrsDataForVerifying } from '../util.js';
12
+ export async function startNode(options, signalHandlers, services, adminServices, userLog) {
13
13
  // options specifically namespaced with --node.<option>
14
14
  const nodeSpecificOptions = extractNamespacedOptions(options, 'node');
15
15
  // All options set from environment variables
@@ -25,6 +25,7 @@ export async function startNode(options, signalHandlers, services, userLog) {
25
25
  userLog(`Running a Prover Node within a Node is not yet supported`);
26
26
  process.exit(1);
27
27
  }
28
+ await preloadCrsDataForVerifying(nodeConfig, userLog);
28
29
  const initialFundedAccounts = nodeConfig.testAccounts ? await getInitialTestAccounts() : [];
29
30
  const { genesisBlockHash, genesisArchiveRoot, prefilledPublicData } = await getGenesisValues(initialFundedAccounts.map((a)=>a.address));
30
31
  // Deploy contracts if needed
@@ -114,6 +115,10 @@ export async function startNode(options, signalHandlers, services, userLog) {
114
115
  node.getP2P(),
115
116
  P2PApiSchema
116
117
  ];
118
+ adminServices.nodeAdmin = [
119
+ node,
120
+ AztecNodeAdminApiSchema
121
+ ];
117
122
  // Add node stop function to signal handlers
118
123
  signalHandlers.push(node.stop.bind(node));
119
124
  // Add a PXE client that connects to this node if requested
@@ -1 +1 @@
1
- {"version":3,"file":"start_prover_agent.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAenD,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,KAAK,iBA6Cf"}
1
+ {"version":3,"file":"start_prover_agent.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_agent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAenD,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EACvC,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,KAAK,iBA+Cf"}
@@ -4,7 +4,7 @@ import { buildServerCircuitProver } from '@aztec/prover-client';
4
4
  import { InlineProofStore, ProvingAgent, createProvingJobBrokerClient, proverAgentConfigMappings } from '@aztec/prover-client/broker';
5
5
  import { getProverNodeAgentConfigFromEnv } from '@aztec/prover-node';
6
6
  import { initTelemetryClient, makeTracedFetch, telemetryClientConfigMappings } from '@aztec/telemetry-client';
7
- import { extractRelevantOptions } from '../util.js';
7
+ import { extractRelevantOptions, preloadCrsDataForServerSideProving } from '../util.js';
8
8
  import { getVersions } from '../versioning.js';
9
9
  export async function startProverAgent(options, signalHandlers, services, userLog) {
10
10
  if (options.node || options.sequencer || options.pxe || options.p2pBootstrap || options.txe) {
@@ -21,6 +21,7 @@ export async function startProverAgent(options, signalHandlers, services, userLo
21
21
  if (!config.proverBrokerUrl) {
22
22
  process.exit(1);
23
23
  }
24
+ await preloadCrsDataForServerSideProving(config, userLog);
24
25
  const fetch = makeTracedFetch([
25
26
  1,
26
27
  2,
@@ -1 +1 @@
1
- {"version":3,"file":"start_prover_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_node.ts"],"names":[],"mappings":"AAEA,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,CA2FvC"}
1
+ {"version":3,"file":"start_prover_node.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_prover_node.ts"],"names":[],"mappings":"AAEA,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,CA6FvC"}
@@ -9,7 +9,7 @@ import { initTelemetryClient, makeTracedFetch, telemetryClientConfigMappings } f
9
9
  import { getGenesisValues } from '@aztec/world-state/testing';
10
10
  import { mnemonicToAccount } from 'viem/accounts';
11
11
  import { getL1Config } from '../get_l1_config.js';
12
- import { extractRelevantOptions } from '../util.js';
12
+ import { extractRelevantOptions, preloadCrsDataForVerifying } from '../util.js';
13
13
  import { getVersions } from '../versioning.js';
14
14
  import { startProverBroker } from './start_prover_broker.js';
15
15
  export async function startProverNode(options, signalHandlers, services, userLog) {
@@ -77,6 +77,7 @@ export async function startProverNode(options, signalHandlers, services, userLog
77
77
  if (proverConfig.proverAgentCount === 0) {
78
78
  userLog(`Running prover node without local prover agent. Connect one or more prover agents to this node or pass --proverAgent.proverAgentCount`);
79
79
  }
80
+ await preloadCrsDataForVerifying(proverConfig, userLog);
80
81
  const initialFundedAccounts = proverConfig.testAccounts ? await getInitialTestAccounts() : [];
81
82
  const { prefilledPublicData } = await getGenesisValues(initialFundedAccounts.map((a)=>a.address));
82
83
  const proverNode = await createProverNode(proverConfig, {
@@ -1,7 +1,9 @@
1
+ import type { AztecNodeConfig } from '@aztec/aztec-node';
1
2
  import type { AccountManager, Fr } from '@aztec/aztec.js';
2
3
  import type { ConfigMappingsType } from '@aztec/foundation/config';
3
4
  import type { LogFn } from '@aztec/foundation/log';
4
5
  import type { PXEService } from '@aztec/pxe/server';
6
+ import type { ProverConfig } from '@aztec/stdlib/interfaces/server';
5
7
  import type { Command } from 'commander';
6
8
  import { type AztecStartOption } from './aztec_start_options.js';
7
9
  export declare const installSignalHandlers: (logFn: LogFn, cb?: Array<() => Promise<void>>) => void;
@@ -43,4 +45,16 @@ export declare const extractNamespacedOptions: (options: Record<string, any>, na
43
45
  * @returns Key-value map of relevant options.
44
46
  */
45
47
  export declare const extractRelevantOptions: <T>(options: Record<string, any>, mappings: ConfigMappingsType<T>, namespace: string) => T;
48
+ /**
49
+ * Downloads just enough points to be able to verify ClientIVC proofs.
50
+ * @param opts - Whether proof are to be verifier
51
+ * @param log - Logging function
52
+ */
53
+ export declare function preloadCrsDataForVerifying({ realProofs }: Pick<AztecNodeConfig, 'realProofs'>, log: LogFn): Promise<void>;
54
+ /**
55
+ * Downloads enough points to be able to prove every server-side circuit
56
+ * @param opts - Whether real proof are to be generated
57
+ * @param log - Logging function
58
+ */
59
+ export declare function preloadCrsDataForServerSideProving({ realProofs }: Pick<ProverConfig, 'realProofs'>, log: LogFn): Promise<void>;
46
60
  //# sourceMappingURL=util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/cli/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,KAAK,gBAAgB,EAAqB,MAAM,0BAA0B,CAAC;AAEpF,eAAO,MAAM,qBAAqB,UAAW,KAAK,OAAO,MAAM,MAAM,QAAQ,IAAI,CAAC,CAAC,SAclF,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,sBAAsB,EAAE;IACtB;;OAEG;IACH,OAAO,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,SAAS,EAAE,EAAE,CAAC;CACf,EAAE,EACH,GAAG,EAAE,UAAU,qBAyBhB;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;CAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAiB/F;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM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AAU,qBAyBhB;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;CAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAiB/F;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,EACvB,gBAAgB,EAAE,MAAM,GACvB,MAAM,CAKR;AAmBD,eAAO,MAAM,UAAU,QAAS,OAAO,WAAW,gBAAgB,EAAE,SASnE,CAAC;AAEF,eAAO,MAAM,uBAAuB,cAwBnC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,YAAa,OAAO,MAAM,EAAE,GAAG,CAAC,aAAa,MAAM,wBASvF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,eACxB,OAAO,MAAM,EAAE,GAAG,CAAC,YAClB,mBAAmB,CAAC,CAAC,aACpB,MAAM,KAChB,CA8BF,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,0BAA0B,CAC9C,EAAE,UAAU,EAAE,EAAE,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,EACnD,GAAG,EAAE,KAAK,GACT,OAAO,CAAC,IAAI,CAAC,CAKf;AAED;;;;GAIG;AACH,wBAAsB,kCAAkC,CACtD,EAAE,UAAU,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,EAChD,GAAG,EAAE,KAAK,GACT,OAAO,CAAC,IAAI,CAAC,CAKf"}
package/dest/cli/util.js CHANGED
@@ -152,3 +152,29 @@ export const printAztecStartHelpText = ()=>{
152
152
  });
153
153
  return relevantOptions;
154
154
  };
155
+ /**
156
+ * Downloads just enough points to be able to verify ClientIVC proofs.
157
+ * @param opts - Whether proof are to be verifier
158
+ * @param log - Logging function
159
+ */ export async function preloadCrsDataForVerifying({ realProofs }, log) {
160
+ if (realProofs) {
161
+ const { Crs, GrumpkinCrs } = await import('@aztec/bb.js');
162
+ await Promise.all([
163
+ Crs.new(2 ** 1, undefined, log),
164
+ GrumpkinCrs.new(2 ** 16 + 1, undefined, log)
165
+ ]);
166
+ }
167
+ }
168
+ /**
169
+ * Downloads enough points to be able to prove every server-side circuit
170
+ * @param opts - Whether real proof are to be generated
171
+ * @param log - Logging function
172
+ */ export async function preloadCrsDataForServerSideProving({ realProofs }, log) {
173
+ if (realProofs) {
174
+ const { Crs, GrumpkinCrs } = await import('@aztec/bb.js');
175
+ await Promise.all([
176
+ Crs.new(2 ** 25 - 1, undefined, log),
177
+ GrumpkinCrs.new(2 ** 18 + 1, undefined, log)
178
+ ]);
179
+ }
180
+ }
package/dest/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { createSandbox, getDeployedBananaCoinAddress, getDeployedBananaFPCAddress, getDeployedSponsoredFPCAddress, SponsoredFeePaymentMethod, } from './sandbox/index.js';
1
+ export { createSandbox, getDeployedBananaCoinAddress, getDeployedBananaFPCAddress, getDeployedSponsoredFPCAddress, } from './sandbox/index.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,4BAA4B,EAC5B,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,4BAA4B,EAC5B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,oBAAoB,CAAC"}
package/dest/index.js CHANGED
@@ -1 +1 @@
1
- export { createSandbox, getDeployedBananaCoinAddress, getDeployedBananaFPCAddress, getDeployedSponsoredFPCAddress, SponsoredFeePaymentMethod } from './sandbox/index.js';
1
+ export { createSandbox, getDeployedBananaCoinAddress, getDeployedBananaFPCAddress, getDeployedSponsoredFPCAddress } from './sandbox/index.js';
@@ -1,5 +1,4 @@
1
1
  export * from './sandbox.js';
2
2
  export { getDeployedBananaCoinAddress, getDeployedBananaFPCAddress } from './banana_fpc.js';
3
3
  export { getDeployedSponsoredFPCAddress } from './sponsored_fpc.js';
4
- export { SponsoredFeePaymentMethod } from './sponsored_fee_payment_method.js';
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sandbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sandbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,4 +1,3 @@
1
1
  export * from './sandbox.js';
2
2
  export { getDeployedBananaCoinAddress, getDeployedBananaFPCAddress } from './banana_fpc.js';
3
3
  export { getDeployedSponsoredFPCAddress } from './sponsored_fpc.js';
4
- export { SponsoredFeePaymentMethod } from './sponsored_fee_payment_method.js';
@@ -13,29 +13,30 @@ import { type HDAccount, type PrivateKeyAccount } from 'viem';
13
13
  * @param aztecNodeConfig - The Aztec Node Config
14
14
  * @param hdAccount - Account for publishing L1 contracts
15
15
  */
16
- export declare function deployContractsToL1(aztecNodeConfig: AztecNodeConfig, hdAccount: HDAccount | PrivateKeyAccount, contractDeployLogger?: import("@aztec/aztec.js").Logger, opts?: {
16
+ export declare function deployContractsToL1(aztecNodeConfig: AztecNodeConfig, hdAccount: HDAccount | PrivateKeyAccount, contractDeployLogger?: import("@aztec/foundation/log").Logger, opts?: {
17
17
  assumeProvenThroughBlockNumber?: number;
18
18
  salt?: number;
19
19
  genesisArchiveRoot?: Fr;
20
20
  genesisBlockHash?: Fr;
21
21
  }): Promise<{
22
- rollupAddress: import("@aztec/aztec.js").EthAddress;
23
- registryAddress: import("@aztec/aztec.js").EthAddress;
24
- inboxAddress: import("@aztec/aztec.js").EthAddress;
25
- outboxAddress: import("@aztec/aztec.js").EthAddress;
26
- feeJuiceAddress: import("@aztec/aztec.js").EthAddress;
27
- feeJuicePortalAddress: import("@aztec/aztec.js").EthAddress;
28
- coinIssuerAddress: import("@aztec/aztec.js").EthAddress;
29
- rewardDistributorAddress: import("@aztec/aztec.js").EthAddress;
30
- governanceProposerAddress: import("@aztec/aztec.js").EthAddress;
31
- governanceAddress: import("@aztec/aztec.js").EthAddress;
32
- stakingAssetAddress: import("@aztec/aztec.js").EthAddress;
22
+ rollupAddress: import("@aztec/foundation/schemas").EthAddress;
23
+ registryAddress: import("@aztec/foundation/schemas").EthAddress;
24
+ inboxAddress: import("@aztec/foundation/schemas").EthAddress;
25
+ outboxAddress: import("@aztec/foundation/schemas").EthAddress;
26
+ feeJuiceAddress: import("@aztec/foundation/schemas").EthAddress;
27
+ feeJuicePortalAddress: import("@aztec/foundation/schemas").EthAddress;
28
+ coinIssuerAddress: import("@aztec/foundation/schemas").EthAddress;
29
+ rewardDistributorAddress: import("@aztec/foundation/schemas").EthAddress;
30
+ governanceProposerAddress: import("@aztec/foundation/schemas").EthAddress;
31
+ governanceAddress: import("@aztec/foundation/schemas").EthAddress;
32
+ stakingAssetAddress: import("@aztec/foundation/schemas").EthAddress;
33
33
  } & {
34
- slashFactoryAddress?: import("@aztec/aztec.js").EthAddress | undefined;
34
+ slashFactoryAddress?: import("@aztec/foundation/schemas").EthAddress | undefined;
35
+ feeAssetHandlerAddress?: import("@aztec/foundation/schemas").EthAddress | undefined;
35
36
  } & {
36
- rollupAddress: import("@aztec/aztec.js").EthAddress;
37
+ rollupAddress: import("@aztec/foundation/schemas").EthAddress;
37
38
  } & {
38
- rollupAddress: import("@aztec/aztec.js").EthAddress;
39
+ rollupAddress: import("@aztec/foundation/schemas").EthAddress;
39
40
  }>;
40
41
  /** Sandbox settings. */
41
42
  export type SandboxConfig = AztecNodeConfig & {
@@ -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;AAG7F,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,mCAAS,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,wB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ztec/accounts/testing';
4
4
  import { AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
5
- import { SignerlessWallet } from '@aztec/aztec.js';
6
5
  import { AnvilTestWatcher, EthCheatCodes } from '@aztec/aztec.js/testing';
7
6
  import { createBlobSinkClient } from '@aztec/blob-sink/client';
8
- import { setupCanonicalL2FeeJuice } from '@aztec/cli/setup-contracts';
7
+ import { setupCanonicalL2FeeJuice, setupSponsoredFPC } from '@aztec/cli/cli-utils';
9
8
  import { GENESIS_ARCHIVE_ROOT, GENESIS_BLOCK_HASH } from '@aztec/constants';
10
9
  import { NULL_KEY, createEthereumChain, deployL1Contracts, getL1ContractsConfigEnvVars, waitForPublicClient } from '@aztec/ethereum';
11
10
  import { Fr } from '@aztec/foundation/fields';
@@ -21,7 +20,7 @@ import { foundry } from 'viem/chains';
21
20
  import { createAccountLogs } from '../cli/util.js';
22
21
  import { DefaultMnemonic } from '../mnemonic.js';
23
22
  import { getBananaFPCAddress, setupBananaFPC } from './banana_fpc.js';
24
- import { getSponsoredFPCAddress, setupSponsoredFPC } from './sponsored_fpc.js';
23
+ import { getSponsoredFPCAddress } from './sponsored_fpc.js';
25
24
  const logger = createLogger('sandbox');
26
25
  const localAnvil = foundry;
27
26
  /**
@@ -126,8 +125,11 @@ const localAnvil = foundry;
126
125
  }, {
127
126
  prefilledPublicData
128
127
  });
129
- const pxe = await createAztecPXE(node);
130
- await setupCanonicalL2FeeJuice(new SignerlessWallet(pxe), aztecNodeConfig.l1Contracts.feeJuicePortalAddress, undefined, logger.info);
128
+ const pxeServiceConfig = {
129
+ proverEnabled: aztecNodeConfig.realProofs
130
+ };
131
+ const pxe = await createAztecPXE(node, pxeServiceConfig);
132
+ await setupCanonicalL2FeeJuice(pxe, aztecNodeConfig.l1Contracts.feeJuicePortalAddress, logger.info);
131
133
  if (initialAccounts.length) {
132
134
  userLog('Setting up funded test accounts...');
133
135
  const accounts = await deployFundedSchnorrAccounts(pxe, initialAccounts);
@@ -139,7 +141,7 @@ const localAnvil = foundry;
139
141
  userLog(accLogs.join(''));
140
142
  const deployer = await getSchnorrWallet(pxe, initialAccounts[0].address, initialAccounts[0].signingKey);
141
143
  await setupBananaFPC(initialAccounts, deployer, userLog);
142
- await setupSponsoredFPC(deployer, userLog);
144
+ await setupSponsoredFPC(pxe, userLog);
143
145
  }
144
146
  const stop = async ()=>{
145
147
  await node.stop();
@@ -165,7 +167,6 @@ const localAnvil = foundry;
165
167
  ...config.l1Contracts
166
168
  }
167
169
  };
168
- logger.info('createAztecNode', aztecNodeConfig);
169
170
  const node = await AztecNodeService.createAndSync(aztecNodeConfig, deps, options);
170
171
  return node;
171
172
  }
@@ -1,6 +1,4 @@
1
- import { type PXE, type Wallet } from '@aztec/aztec.js';
2
- import type { LogFn } from '@aztec/foundation/log';
1
+ import { type PXE } from '@aztec/aztec.js';
3
2
  export declare function getSponsoredFPCAddress(): Promise<import("@aztec/aztec.js").AztecAddress>;
4
- export declare function setupSponsoredFPC(deployer: Wallet, log: LogFn): Promise<void>;
5
3
  export declare function getDeployedSponsoredFPCAddress(pxe: PXE): Promise<import("@aztec/aztec.js").AztecAddress>;
6
4
  //# sourceMappingURL=sponsored_fpc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sponsored_fpc.d.ts","sourceRoot":"","sources":["../../src/sandbox/sponsored_fpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,GAAG,EACR,KAAK,MAAM,EAEZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAWnD,wBAAsB,sBAAsB,oDAE3C;AAED,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,iBAMnE;AAED,wBAAsB,8BAA8B,CAAC,GAAG,EAAE,GAAG,mDAO5D"}
1
+ {"version":3,"file":"sponsored_fpc.d.ts","sourceRoot":"","sources":["../../src/sandbox/sponsored_fpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,GAAG,EAAuC,MAAM,iBAAiB,CAAC;AAUtH,wBAAsB,sBAAsB,oDAE3C;AAED,wBAAsB,8BAA8B,CAAC,GAAG,EAAE,GAAG,mDAO5D"}
@@ -1,21 +1,14 @@
1
1
  import { Fr, getContractInstanceFromDeployParams } from '@aztec/aztec.js';
2
+ import { SPONSORED_FPC_SALT } from '@aztec/constants';
2
3
  import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
3
- const SPONSORED_FPC_SALT = new Fr(0);
4
4
  async function getSponsoredFPCInstance() {
5
5
  return await getContractInstanceFromDeployParams(SponsoredFPCContract.artifact, {
6
- salt: SPONSORED_FPC_SALT
6
+ salt: new Fr(SPONSORED_FPC_SALT)
7
7
  });
8
8
  }
9
9
  export async function getSponsoredFPCAddress() {
10
10
  return (await getSponsoredFPCInstance()).address;
11
11
  }
12
- export async function setupSponsoredFPC(deployer, log) {
13
- const deployed = await SponsoredFPCContract.deploy(deployer).send({
14
- contractAddressSalt: SPONSORED_FPC_SALT,
15
- universalDeploy: true
16
- }).deployed();
17
- log(`SponsoredFPC: ${deployed.address}`);
18
- }
19
12
  export async function getDeployedSponsoredFPCAddress(pxe) {
20
13
  const fpc = await getSponsoredFPCAddress();
21
14
  const contracts = await pxe.getContracts();