@aztec/aztec 0.81.0 → 0.82.0

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.
@@ -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,iBAwGjF"}
@@ -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();
@@ -47,7 +48,7 @@ export async function aztecStart(options, userLog, debugLogger) {
47
48
  }
48
49
  if (options.node) {
49
50
  const { startNode } = await import('./cmds/start_node.js');
50
- ({ config } = await startNode(options, signalHandlers, services, userLog));
51
+ ({ config } = await startNode(options, signalHandlers, services, adminServices, userLog));
51
52
  } else if (options.bot) {
52
53
  const { startBot } = await import('./cmds/start_bot.js');
53
54
  await startBot(options, signalHandlers, services, userLog);
@@ -88,6 +89,7 @@ export async function aztecStart(options, userLog, debugLogger) {
88
89
  }
89
90
  installSignalHandlers(debugLogger.info, signalHandlers);
90
91
  const versions = getVersions(config);
92
+ // Start the main JSON-RPC server
91
93
  if (Object.entries(services).length > 0) {
92
94
  const rpcServer = createNamespacedSafeJsonRpcServer(services, {
93
95
  http200OnError: false,
@@ -102,4 +104,19 @@ export async function aztecStart(options, userLog, debugLogger) {
102
104
  });
103
105
  debugLogger.info(`Aztec Server listening on port ${port}`, versions);
104
106
  }
107
+ // If there are any admin services, start a separate JSON-RPC server for them
108
+ if (Object.entries(adminServices).length > 0) {
109
+ const rpcServer = createNamespacedSafeJsonRpcServer(adminServices, {
110
+ http200OnError: false,
111
+ log: debugLogger,
112
+ middlewares: [
113
+ getOtelJsonRpcPropagationMiddleware(),
114
+ getVersioningMiddleware(versions)
115
+ ]
116
+ });
117
+ const { port } = await startHttpRpcServer(rpcServer, {
118
+ port: options.adminPort
119
+ });
120
+ debugLogger.info(`Aztec Server admin API listening on port ${port}`, versions);
121
+ }
105
122
  }
@@ -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 +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,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,gBAW3D;AAED,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAOpG;AAUD,wBAAsB,gCAAgC,CAAC,WAAW,EAAE,YAAY,iBAiB/E"}
@@ -10,13 +10,13 @@ export const testnetIgnitionL2ChainConfig = {
10
10
  p2pBootstrapNodes: [],
11
11
  registryAddress: '0x12b3ebc176a1646b911391eab3760764f2e05fe3',
12
12
  seqMinTxsPerBlock: 0,
13
- seqMaxTxsPerBlock: 0
13
+ seqMaxTxsPerBlock: 4
14
14
  };
15
15
  export async function getBootnodes(networkName) {
16
16
  const url = `http://static.aztec.network/${networkName}/bootnodes.json`;
17
17
  const response = await fetch(url);
18
18
  if (!response.ok) {
19
- throw new Error(`Failed to fetch basic contract addresses from ${url}`);
19
+ throw new Error(`Failed to fetch basic contract addresses from ${url}. Check you are using a correct network name.`);
20
20
  }
21
21
  const json = await response.json();
22
22
  return json['bootnodes'];
@@ -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,CAyItC"}
@@ -1,7 +1,7 @@
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';
@@ -9,7 +9,7 @@ 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
11
  import { extractNamespacedOptions, extractRelevantOptions } from '../util.js';
12
- export async function startNode(options, signalHandlers, services, userLog) {
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
@@ -114,6 +114,10 @@ export async function startNode(options, signalHandlers, services, userLog) {
114
114
  node.getP2P(),
115
115
  P2PApiSchema
116
116
  ];
117
+ adminServices.nodeAdmin = [
118
+ node,
119
+ AztecNodeAdminApiSchema
120
+ ];
117
121
  // Add node stop function to signal handlers
118
122
  signalHandlers.push(node.stop.bind(node));
119
123
  // Add a PXE client that connects to this node if requested
@@ -13,7 +13,7 @@ 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;
@@ -32,6 +32,7 @@ export declare function deployContractsToL1(aztecNodeConfig: AztecNodeConfig, hd
32
32
  stakingAssetAddress: import("@aztec/aztec.js").EthAddress;
33
33
  } & {
34
34
  slashFactoryAddress?: import("@aztec/aztec.js").EthAddress | undefined;
35
+ feeAssetHandlerAddress?: import("@aztec/aztec.js").EthAddress | undefined;
35
36
  } & {
36
37
  rollupAddress: import("@aztec/aztec.js").EthAddress;
37
38
  } & {
@@ -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,wBAAwB;AACxB,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG;IAC5C,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,KAAK,EAAE,OAAO,CAAC;IACf,uDAAuD;IACvD,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,MAAM,oCAA6B,EAAE,OAAO,EAAE,KAAK;;;;GAkGtF;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,MAAM,GAAE,OAAO,CAAC,eAAe,CAAM,EACrC,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,eAAe,CAAC;IAAC,cAAc,CAAC,EAAE,uBAAuB,CAAA;CAAO,EACpF,OAAO,GAAE;IAAE,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAAO,6BAY7D;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,GAAE,OAAO,CAAC,gBAAgB,CAAM,mDAI3F"}
1
+ {"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox/sandbox.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AAE7F,OAAO,EAAE,KAAK,uBAAuB,EAAwB,MAAM,yBAAyB,CAAC;AAU7F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,uBAAuB,CAAC;AAGjE,OAAO,EAAE,KAAK,gBAAgB,EAAyC,MAAM,mBAAmB,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAA2D,MAAM,MAAM,CAAC;AAavH;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GAAG,iBAAiB,EACxC,oBAAoB,yCAAS,EAC7B,IAAI,GAAE;IAAE,8BAA8B,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;IAAC,gBAAgB,CAAC,EAAE,EAAE,CAAA;CAAO;;;;;;;;;;;;;;;;;;;GA6BtH;AAED,wBAAwB;AACxB,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG;IAC5C,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,KAAK,EAAE,OAAO,CAAC;IACf,uDAAuD;IACvD,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,MAAM,oCAA6B,EAAE,OAAO,EAAE,KAAK;;;;GA6FtF;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,MAAM,GAAE,OAAO,CAAC,eAAe,CAAM,EACrC,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,eAAe,CAAC;IAAC,cAAc,CAAC,EAAE,uBAAuB,CAAA;CAAO,EACpF,OAAO,GAAE;IAAE,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAAO,6BAW7D;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,GAAE,OAAO,CAAC,gBAAgB,CAAM,mDAI3F"}
@@ -2,7 +2,6 @@
2
2
  import { getSchnorrWallet } from '@aztec/accounts/schnorr';
3
3
  import { deployFundedSchnorrAccounts, getInitialTestAccounts } from '@aztec/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
7
  import { setupCanonicalL2FeeJuice } from '@aztec/cli/setup-contracts';
@@ -127,7 +126,7 @@ const localAnvil = foundry;
127
126
  prefilledPublicData
128
127
  });
129
128
  const pxe = await createAztecPXE(node);
130
- await setupCanonicalL2FeeJuice(new SignerlessWallet(pxe), aztecNodeConfig.l1Contracts.feeJuicePortalAddress, undefined, logger.info);
129
+ await setupCanonicalL2FeeJuice(pxe, aztecNodeConfig.l1Contracts.feeJuicePortalAddress, logger.info);
131
130
  if (initialAccounts.length) {
132
131
  userLog('Setting up funded test accounts...');
133
132
  const accounts = await deployFundedSchnorrAccounts(pxe, initialAccounts);
@@ -165,7 +164,6 @@ const localAnvil = foundry;
165
164
  ...config.l1Contracts
166
165
  }
167
166
  };
168
- logger.info('createAztecNode', aztecNodeConfig);
169
167
  const node = await AztecNodeService.createAndSync(aztecNodeConfig, deps, options);
170
168
  return node;
171
169
  }
@@ -1,5 +1,5 @@
1
1
  import type { FeePaymentMethod } from '@aztec/aztec.js';
2
- import { type FunctionCall } from '@aztec/stdlib/abi';
2
+ import { ExecutionPayload } from '@aztec/entrypoints/payload';
3
3
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import type { PXE } from '@aztec/stdlib/interfaces/client';
5
5
  /**
@@ -18,6 +18,6 @@ export declare class SponsoredFeePaymentMethod implements FeePaymentMethod {
18
18
  static new(pxe: PXE): Promise<SponsoredFeePaymentMethod>;
19
19
  getAsset(): Promise<AztecAddress>;
20
20
  getFeePayer(): Promise<AztecAddress>;
21
- getFunctionCalls(): Promise<FunctionCall[]>;
21
+ getExecutionPayload(): Promise<ExecutionPayload>;
22
22
  }
23
23
  //# sourceMappingURL=sponsored_fee_payment_method.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sponsored_fee_payment_method.d.ts","sourceRoot":"","sources":["../../src/sandbox/sponsored_fee_payment_method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,KAAK,YAAY,EAAkC,MAAM,mBAAmB,CAAC;AACtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAI3D;;GAEG;AACH,qBAAa,yBAA0B,YAAW,gBAAgB;IAE9D;;OAEG;IACH,OAAO,CAAC,eAAe;;IAHvB;;OAEG;IACK,eAAe,EAAE,YAAY;WAG1B,GAAG,CAAC,GAAG,EAAE,GAAG;IAKzB,QAAQ,IAAI,OAAO,CAAC,YAAY,CAAC;IAIjC,WAAW,IAAI,OAAO,CAAC,YAAY,CAAC;IAI9B,gBAAgB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;CAalD"}
1
+ {"version":3,"file":"sponsored_fee_payment_method.d.ts","sourceRoot":"","sources":["../../src/sandbox/sponsored_fee_payment_method.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAI3D;;GAEG;AACH,qBAAa,yBAA0B,YAAW,gBAAgB;IAE9D;;OAEG;IACH,OAAO,CAAC,eAAe;;IAHvB;;OAEG;IACK,eAAe,EAAE,YAAY;WAG1B,GAAG,CAAC,GAAG,EAAE,GAAG;IAKzB,QAAQ,IAAI,OAAO,CAAC,YAAY,CAAC;IAIjC,WAAW,IAAI,OAAO,CAAC,YAAY,CAAC;IAI9B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAiBvD"}
@@ -1,3 +1,4 @@
1
+ import { ExecutionPayload } from '@aztec/entrypoints/payload';
1
2
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
2
3
  import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
3
4
  import { getDeployedSponsoredFPCAddress } from './sponsored_fpc.js';
@@ -20,8 +21,8 @@ import { getDeployedSponsoredFPCAddress } from './sponsored_fpc.js';
20
21
  getFeePayer() {
21
22
  return Promise.resolve(this.paymentContract);
22
23
  }
23
- async getFunctionCalls() {
24
- return [
24
+ async getExecutionPayload() {
25
+ return new ExecutionPayload([
25
26
  {
26
27
  name: 'sponsor_unconditionally',
27
28
  to: this.paymentContract,
@@ -31,6 +32,6 @@ import { getDeployedSponsoredFPCAddress } from './sponsored_fpc.js';
31
32
  args: [],
32
33
  returnTypes: []
33
34
  }
34
- ];
35
+ ], [], []);
35
36
  }
36
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/aztec",
3
- "version": "0.81.0",
3
+ "version": "0.82.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js"
@@ -29,34 +29,34 @@
29
29
  "../package.common.json"
30
30
  ],
31
31
  "dependencies": {
32
- "@aztec/accounts": "0.81.0",
33
- "@aztec/archiver": "0.81.0",
34
- "@aztec/aztec-faucet": "0.81.0",
35
- "@aztec/aztec-node": "0.81.0",
36
- "@aztec/aztec.js": "0.81.0",
37
- "@aztec/bb-prover": "0.81.0",
38
- "@aztec/blob-sink": "0.81.0",
39
- "@aztec/bot": "0.81.0",
40
- "@aztec/builder": "0.81.0",
41
- "@aztec/cli": "0.81.0",
42
- "@aztec/cli-wallet": "0.81.0",
43
- "@aztec/constants": "0.81.0",
44
- "@aztec/entrypoints": "0.81.0",
45
- "@aztec/ethereum": "0.81.0",
46
- "@aztec/foundation": "0.81.0",
47
- "@aztec/kv-store": "0.81.0",
48
- "@aztec/noir-contracts.js": "0.81.0",
49
- "@aztec/noir-protocol-circuits-types": "0.81.0",
50
- "@aztec/p2p": "0.81.0",
51
- "@aztec/p2p-bootstrap": "0.81.0",
52
- "@aztec/protocol-contracts": "0.81.0",
53
- "@aztec/prover-client": "0.81.0",
54
- "@aztec/prover-node": "0.81.0",
55
- "@aztec/pxe": "0.81.0",
56
- "@aztec/stdlib": "0.81.0",
57
- "@aztec/telemetry-client": "0.81.0",
58
- "@aztec/txe": "0.81.0",
59
- "@aztec/world-state": "0.81.0",
32
+ "@aztec/accounts": "0.82.0",
33
+ "@aztec/archiver": "0.82.0",
34
+ "@aztec/aztec-faucet": "0.82.0",
35
+ "@aztec/aztec-node": "0.82.0",
36
+ "@aztec/aztec.js": "0.82.0",
37
+ "@aztec/bb-prover": "0.82.0",
38
+ "@aztec/blob-sink": "0.82.0",
39
+ "@aztec/bot": "0.82.0",
40
+ "@aztec/builder": "0.82.0",
41
+ "@aztec/cli": "0.82.0",
42
+ "@aztec/cli-wallet": "0.82.0",
43
+ "@aztec/constants": "0.82.0",
44
+ "@aztec/entrypoints": "0.82.0",
45
+ "@aztec/ethereum": "0.82.0",
46
+ "@aztec/foundation": "0.82.0",
47
+ "@aztec/kv-store": "0.82.0",
48
+ "@aztec/noir-contracts.js": "0.82.0",
49
+ "@aztec/noir-protocol-circuits-types": "0.82.0",
50
+ "@aztec/p2p": "0.82.0",
51
+ "@aztec/p2p-bootstrap": "0.82.0",
52
+ "@aztec/protocol-contracts": "0.82.0",
53
+ "@aztec/prover-client": "0.82.0",
54
+ "@aztec/prover-node": "0.82.0",
55
+ "@aztec/pxe": "0.82.0",
56
+ "@aztec/stdlib": "0.82.0",
57
+ "@aztec/telemetry-client": "0.82.0",
58
+ "@aztec/txe": "0.82.0",
59
+ "@aztec/world-state": "0.82.0",
60
60
  "@types/chalk": "^2.2.0",
61
61
  "abitype": "^0.8.11",
62
62
  "chalk": "^5.3.0",
@@ -20,6 +20,7 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
20
20
  // list of 'stop' functions to call when process ends
21
21
  const signalHandlers: Array<() => Promise<void>> = [];
22
22
  const services: NamespacedApiHandlers = {};
23
+ const adminServices: NamespacedApiHandlers = {};
23
24
  let config: ChainConfig | undefined = undefined;
24
25
 
25
26
  if (options.sandbox) {
@@ -55,7 +56,7 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
55
56
  }
56
57
  if (options.node) {
57
58
  const { startNode } = await import('./cmds/start_node.js');
58
- ({ config } = await startNode(options, signalHandlers, services, userLog));
59
+ ({ config } = await startNode(options, signalHandlers, services, adminServices, userLog));
59
60
  } else if (options.bot) {
60
61
  const { startBot } = await import('./cmds/start_bot.js');
61
62
  await startBot(options, signalHandlers, services, userLog);
@@ -97,6 +98,8 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
97
98
 
98
99
  installSignalHandlers(debugLogger.info, signalHandlers);
99
100
  const versions = getVersions(config);
101
+
102
+ // Start the main JSON-RPC server
100
103
  if (Object.entries(services).length > 0) {
101
104
  const rpcServer = createNamespacedSafeJsonRpcServer(services, {
102
105
  http200OnError: false,
@@ -106,4 +109,15 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
106
109
  const { port } = await startHttpRpcServer(rpcServer, { port: options.port });
107
110
  debugLogger.info(`Aztec Server listening on port ${port}`, versions);
108
111
  }
112
+
113
+ // If there are any admin services, start a separate JSON-RPC server for them
114
+ if (Object.entries(adminServices).length > 0) {
115
+ const rpcServer = createNamespacedSafeJsonRpcServer(adminServices, {
116
+ http200OnError: false,
117
+ log: debugLogger,
118
+ middlewares: [getOtelJsonRpcPropagationMiddleware(), getVersioningMiddleware(versions)],
119
+ });
120
+ const { port } = await startHttpRpcServer(rpcServer, { port: options.adminPort });
121
+ debugLogger.info(`Aztec Server admin API listening on port ${port}`, versions);
122
+ }
109
123
  }
@@ -53,7 +53,17 @@ export const getOptions = (namespace: string, configMappings: Record<string, Con
53
53
  };
54
54
 
55
55
  // These are options used by multiple modules so should be inputted once
56
- export const universalOptions = ['l1RpcUrls', 'l1ChainId', 'l1Contracts', 'p2pEnabled', 'dataDirectory'];
56
+ export const universalOptions = [
57
+ 'l1RpcUrls',
58
+ 'l1ConsensusHostUrl',
59
+ 'l1ConsensusHostApiKey',
60
+ 'l1ConsensusHostApiKeyHeader',
61
+ 'l1ChainId',
62
+ 'l1Contracts',
63
+ 'p2pEnabled',
64
+ 'dataDirectory',
65
+ 'dataStoreMapSizeKb',
66
+ ];
57
67
 
58
68
  // Define categories and options
59
69
  export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
@@ -88,11 +98,18 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
88
98
  API: [
89
99
  {
90
100
  flag: '--port <value>',
91
- description: 'Port to run the Aztec Services on on',
101
+ description: 'Port to run the Aztec Services on',
92
102
  defaultValue: 8080,
93
103
  envVar: 'AZTEC_PORT',
94
104
  parseVal: val => parseInt(val, 10),
95
105
  },
106
+ {
107
+ flag: '--admin-port <value>',
108
+ description: 'Port to run admin APIs of Aztec Services on on',
109
+ defaultValue: 8880,
110
+ envVar: 'AZTEC_ADMIN_PORT',
111
+ parseVal: val => parseInt(val, 10),
112
+ },
96
113
  {
97
114
  flag: '--api-prefix <value>',
98
115
  description: 'Prefix for API routes on any service that is started',
@@ -121,6 +138,41 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
121
138
  defaultValue: DefaultMnemonic,
122
139
  envVar: 'MNEMONIC',
123
140
  },
141
+ {
142
+ flag: '--l1-consensus-host-url <value>',
143
+ description: 'URL of the Ethereum consensus node that services will connect to',
144
+ defaultValue: undefined,
145
+ envVar: 'L1_CONSENSUS_HOST_URL',
146
+ },
147
+ {
148
+ flag: '--l1-consensus-host-api-key <value>',
149
+ description: 'API key for the Ethereum consensus node',
150
+ defaultValue: undefined,
151
+ envVar: 'L1_CONSENSUS_HOST_API_KEY',
152
+ },
153
+ {
154
+ flag: '--l1-consensus-host-api-key-header <value>',
155
+ description:
156
+ 'API key header for the Ethereum consensus node. If not set, the api key will be appended to the URL as ?key=<api-key>',
157
+ defaultValue: undefined,
158
+ envVar: 'L1_CONSENSUS_HOST_API_KEY_HEADER',
159
+ },
160
+ ],
161
+ STORAGE: [
162
+ {
163
+ flag: '--data-directory <value>',
164
+ description: 'Where to store data for services. If not set, will store temporarily',
165
+ defaultValue: undefined,
166
+ envVar: 'DATA_DIRECTORY',
167
+ },
168
+ {
169
+ flag: '--data-store-map-size-kb <value>',
170
+ description:
171
+ 'The maximum possible size of the data store DB in KB. Can be overridden by component-specific options.',
172
+ defaultValue: undefined,
173
+ envVar: 'DATA_STORE_MAP_SIZE_KB',
174
+ parseVal: (val: string) => parseInt(val, 10),
175
+ },
124
176
  ],
125
177
  'L1 CONTRACT ADDRESSES': [
126
178
  {
@@ -174,12 +226,6 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
174
226
  defaultValue: undefined,
175
227
  envVar: undefined,
176
228
  },
177
- {
178
- flag: '--data-directory <value>',
179
- description: 'Where to store data. If not set, will store temporarily',
180
- defaultValue: undefined,
181
- envVar: 'DATA_DIRECTORY',
182
- },
183
229
  {
184
230
  flag: '--node.archiverUrl <value>',
185
231
  description: 'URL for an archiver service',
@@ -266,7 +312,7 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
266
312
  },
267
313
  ...getOptions('sequencer', sequencerClientConfigMappings),
268
314
  ],
269
- BLOB_SINK: [
315
+ 'BLOB SINK': [
270
316
  {
271
317
  flag: '--blob-sink',
272
318
  description: 'Starts Aztec Blob Sink with options',
@@ -29,16 +29,19 @@ export const testnetIgnitionL2ChainConfig: L2ChainConfig = {
29
29
  p2pBootstrapNodes: [],
30
30
  registryAddress: '0x12b3ebc176a1646b911391eab3760764f2e05fe3',
31
31
  seqMinTxsPerBlock: 0,
32
- seqMaxTxsPerBlock: 0,
32
+ seqMaxTxsPerBlock: 4,
33
33
  };
34
34
 
35
35
  export async function getBootnodes(networkName: NetworkNames) {
36
36
  const url = `http://static.aztec.network/${networkName}/bootnodes.json`;
37
37
  const response = await fetch(url);
38
38
  if (!response.ok) {
39
- throw new Error(`Failed to fetch basic contract addresses from ${url}`);
39
+ throw new Error(
40
+ `Failed to fetch basic contract addresses from ${url}. Check you are using a correct network name.`,
41
+ );
40
42
  }
41
43
  const json = await response.json();
44
+
42
45
  return json['bootnodes'];
43
46
  }
44
47
 
@@ -37,6 +37,7 @@ export async function startArchiver(
37
37
  );
38
38
 
39
39
  let archiverConfig = { ...envConfig, ...cliOptions };
40
+ archiverConfig.dataStoreMapSizeKB = archiverConfig.archiverStoreMapSizeKb ?? archiverConfig.dataStoreMapSizeKB;
40
41
 
41
42
  if (!archiverConfig.l1Contracts.registryAddress || archiverConfig.l1Contracts.registryAddress.isZero()) {
42
43
  throw new Error('L1 registry address is required to start an Archiver');
@@ -3,7 +3,7 @@ import { type AztecNodeConfig, aztecNodeConfigMappings, getConfigEnvVars } from
3
3
  import { NULL_KEY } from '@aztec/ethereum';
4
4
  import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
5
5
  import type { LogFn } from '@aztec/foundation/log';
6
- import { AztecNodeApiSchema, type PXE } from '@aztec/stdlib/interfaces/client';
6
+ import { AztecNodeAdminApiSchema, AztecNodeApiSchema, type PXE } from '@aztec/stdlib/interfaces/client';
7
7
  import { P2PApiSchema } from '@aztec/stdlib/interfaces/server';
8
8
  import {
9
9
  type TelemetryClientConfig,
@@ -22,6 +22,7 @@ export async function startNode(
22
22
  options: any,
23
23
  signalHandlers: (() => Promise<void>)[],
24
24
  services: NamespacedApiHandlers,
25
+ adminServices: NamespacedApiHandlers,
25
26
  userLog: LogFn,
26
27
  ): Promise<{ config: AztecNodeConfig }> {
27
28
  // options specifically namespaced with --node.<option>
@@ -141,6 +142,7 @@ export async function startNode(
141
142
  // Add node and p2p to services list
142
143
  services.node = [node, AztecNodeApiSchema];
143
144
  services.p2p = [node.getP2P(), P2PApiSchema];
145
+ adminServices.nodeAdmin = [node, AztecNodeAdminApiSchema];
144
146
 
145
147
  // Add node stop function to signal handlers
146
148
  signalHandlers.push(node.stop.bind(node));
@@ -2,7 +2,6 @@
2
2
  import { getSchnorrWallet } from '@aztec/accounts/schnorr';
3
3
  import { deployFundedSchnorrAccounts, getInitialTestAccounts } from '@aztec/accounts/testing';
4
4
  import { type AztecNodeConfig, 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 { type BlobSinkClientInterface, createBlobSinkClient } from '@aztec/blob-sink/client';
8
7
  import { setupCanonicalL2FeeJuice } from '@aztec/cli/setup-contracts';
@@ -168,12 +167,7 @@ export async function createSandbox(config: Partial<SandboxConfig> = {}, userLog
168
167
  const node = await createAztecNode(aztecNodeConfig, { telemetry, blobSinkClient }, { prefilledPublicData });
169
168
  const pxe = await createAztecPXE(node);
170
169
 
171
- await setupCanonicalL2FeeJuice(
172
- new SignerlessWallet(pxe),
173
- aztecNodeConfig.l1Contracts.feeJuicePortalAddress,
174
- undefined,
175
- logger.info,
176
- );
170
+ await setupCanonicalL2FeeJuice(pxe, aztecNodeConfig.l1Contracts.feeJuicePortalAddress, logger.info);
177
171
 
178
172
  if (initialAccounts.length) {
179
173
  userLog('Setting up funded test accounts...');
@@ -214,7 +208,6 @@ export async function createAztecNode(
214
208
  ...config,
215
209
  l1Contracts: { ...l1Contracts, ...config.l1Contracts },
216
210
  };
217
- logger.info('createAztecNode', aztecNodeConfig);
218
211
  const node = await AztecNodeService.createAndSync(aztecNodeConfig, deps, options);
219
212
  return node;
220
213
  }
@@ -1,6 +1,7 @@
1
1
  import type { FeePaymentMethod } from '@aztec/aztec.js';
2
+ import { ExecutionPayload } from '@aztec/entrypoints/payload';
2
3
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
3
- import { type FunctionCall, FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
4
+ import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
4
5
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
5
6
  import type { PXE } from '@aztec/stdlib/interfaces/client';
6
7
 
@@ -30,17 +31,21 @@ export class SponsoredFeePaymentMethod implements FeePaymentMethod {
30
31
  return Promise.resolve(this.paymentContract);
31
32
  }
32
33
 
33
- async getFunctionCalls(): Promise<FunctionCall[]> {
34
- return [
35
- {
36
- name: 'sponsor_unconditionally',
37
- to: this.paymentContract,
38
- selector: await FunctionSelector.fromSignature('sponsor_unconditionally()'),
39
- type: FunctionType.PRIVATE,
40
- isStatic: false,
41
- args: [],
42
- returnTypes: [],
43
- },
44
- ];
34
+ async getExecutionPayload(): Promise<ExecutionPayload> {
35
+ return new ExecutionPayload(
36
+ [
37
+ {
38
+ name: 'sponsor_unconditionally',
39
+ to: this.paymentContract,
40
+ selector: await FunctionSelector.fromSignature('sponsor_unconditionally()'),
41
+ type: FunctionType.PRIVATE,
42
+ isStatic: false,
43
+ args: [],
44
+ returnTypes: [],
45
+ },
46
+ ],
47
+ [],
48
+ [],
49
+ );
45
50
  }
46
51
  }