@aztec/aztec 0.82.2-alpha-testnet.4 → 0.82.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/bin/index.js +0 -12
- package/dest/cli/aztec_start_action.d.ts.map +1 -1
- package/dest/cli/aztec_start_action.js +5 -1
- package/dest/cli/aztec_start_options.d.ts +0 -1
- package/dest/cli/aztec_start_options.d.ts.map +1 -1
- package/dest/cli/aztec_start_options.js +25 -2
- package/dest/cli/chain_l2_config.js +1 -1
- package/dest/sandbox/sandbox.d.ts.map +1 -1
- package/dest/sandbox/sandbox.js +0 -2
- package/package.json +30 -30
- package/src/bin/index.ts +0 -14
- package/src/cli/aztec_start_action.ts +5 -1
- package/src/cli/aztec_start_options.ts +26 -3
- package/src/cli/chain_l2_config.ts +1 -1
- package/src/sandbox/sandbox.ts +0 -2
package/dest/bin/index.js
CHANGED
|
@@ -10,11 +10,8 @@ import { injectCommands as injectMiscCommands } from '@aztec/cli/misc';
|
|
|
10
10
|
import { injectCommands as injectPXECommands } from '@aztec/cli/pxe';
|
|
11
11
|
import { createConsoleLogger, createLogger } from '@aztec/foundation/log';
|
|
12
12
|
import { Command } from 'commander';
|
|
13
|
-
import { NETWORK_FLAG, aztecStartOptions } from '../cli/aztec_start_options.js';
|
|
14
|
-
import { enrichEnvironmentWithChainConfig } from '../cli/chain_l2_config.js';
|
|
15
13
|
import { injectAztecCommands } from '../cli/index.js';
|
|
16
14
|
import { getCliVersion } from '../cli/release_version.js';
|
|
17
|
-
import { addOptions } from '../cli/util.js';
|
|
18
15
|
const userLog = createConsoleLogger();
|
|
19
16
|
const debugLogger = createLogger('cli');
|
|
20
17
|
/** CLI & full node main entrypoint */ async function main() {
|
|
@@ -23,15 +20,6 @@ const debugLogger = createLogger('cli');
|
|
|
23
20
|
};
|
|
24
21
|
process.once('SIGINT', shutdown);
|
|
25
22
|
process.once('SIGTERM', shutdown);
|
|
26
|
-
// We create a temp command object to detect the presence of the network option
|
|
27
|
-
// If it has been given then we enrich the environment with the chain config
|
|
28
|
-
const tempCmd = new Command('aztec').allowUnknownOption();
|
|
29
|
-
addOptions(tempCmd, aztecStartOptions['NETWORK']);
|
|
30
|
-
tempCmd.parse(process.argv);
|
|
31
|
-
const networkValue = tempCmd.getOptionValue(NETWORK_FLAG);
|
|
32
|
-
if (networkValue !== undefined) {
|
|
33
|
-
await enrichEnvironmentWithChainConfig(networkValue);
|
|
34
|
-
}
|
|
35
23
|
const cliVersion = getCliVersion();
|
|
36
24
|
let program = new Command('aztec');
|
|
37
25
|
program.description('Aztec command line interface').version(cliVersion);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aztec_start_action.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_action.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"aztec_start_action.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_action.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAa3D,wBAAsB,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAyGjF"}
|
|
@@ -4,6 +4,7 @@ import { getVersioningMiddleware } from '@aztec/stdlib/versioning';
|
|
|
4
4
|
import { getOtelJsonRpcPropagationMiddleware } from '@aztec/telemetry-client';
|
|
5
5
|
import { createSandbox } from '../sandbox/index.js';
|
|
6
6
|
import { github, splash } from '../splash.js';
|
|
7
|
+
import { enrichEnvironmentWithChainConfig } from './chain_l2_config.js';
|
|
7
8
|
import { getCliVersion } from './release_version.js';
|
|
8
9
|
import { extractNamespacedOptions, installSignalHandlers } from './util.js';
|
|
9
10
|
import { getVersions } from './versioning.js';
|
|
@@ -17,7 +18,6 @@ export async function aztecStart(options, userLog, debugLogger) {
|
|
|
17
18
|
const cliVersion = getCliVersion();
|
|
18
19
|
const sandboxOptions = extractNamespacedOptions(options, 'sandbox');
|
|
19
20
|
const nodeOptions = extractNamespacedOptions(options, 'node');
|
|
20
|
-
sandboxOptions.testAccounts = true;
|
|
21
21
|
userLog(`${splash}\n${github}\n\n`);
|
|
22
22
|
userLog(`Setting up Aztec Sandbox ${cliVersion}, please stand by...`);
|
|
23
23
|
const { node, pxe, stop } = await createSandbox({
|
|
@@ -43,6 +43,10 @@ export async function aztecStart(options, userLog, debugLogger) {
|
|
|
43
43
|
userLog(`Not exposing PXE API through JSON-RPC server`);
|
|
44
44
|
}
|
|
45
45
|
} else {
|
|
46
|
+
// If a network is specified, enrich the environment with the chain config
|
|
47
|
+
if (options.network) {
|
|
48
|
+
await enrichEnvironmentWithChainConfig(options.network);
|
|
49
|
+
}
|
|
46
50
|
if (options.node) {
|
|
47
51
|
const { startNode } = await import('./cmds/start_node.js');
|
|
48
52
|
({ config } = await startNode(options, signalHandlers, services, adminServices, userLog));
|
|
@@ -9,7 +9,6 @@ export interface AztecStartOption {
|
|
|
9
9
|
}
|
|
10
10
|
export declare const getOptions: (namespace: string, configMappings: Record<string, ConfigMapping>) => AztecStartOption[];
|
|
11
11
|
export declare const universalOptions: string[];
|
|
12
|
-
export declare const NETWORK_FLAG = "network";
|
|
13
12
|
export declare const aztecStartOptions: {
|
|
14
13
|
[key: string]: AztecStartOption[];
|
|
15
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aztec_start_options.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_options.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,MAAM,EAIZ,MAAM,0BAA0B,CAAC;AAelC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC;IACpC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;CACjC;AAED,eAAO,MAAM,UAAU,cAAe,MAAM,kBAAkB,OAAO,MAAM,EAAE,aAAa,CAAC,uBAiB1F,CAAC;AAGF,eAAO,MAAM,gBAAgB,UAU5B,CAAC;
|
|
1
|
+
{"version":3,"file":"aztec_start_options.d.ts","sourceRoot":"","sources":["../../src/cli/aztec_start_options.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,MAAM,EAIZ,MAAM,0BAA0B,CAAC;AAelC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAC;IACpC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;CACjC;AAED,eAAO,MAAM,UAAU,cAAe,MAAM,kBAAkB,OAAO,MAAM,EAAE,aAAa,CAAC,uBAiB1F,CAAC;AAGF,eAAO,MAAM,gBAAgB,UAU5B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;CAyWlE,CAAC"}
|
|
@@ -40,12 +40,11 @@ export const universalOptions = [
|
|
|
40
40
|
'dataDirectory',
|
|
41
41
|
'dataStoreMapSizeKb'
|
|
42
42
|
];
|
|
43
|
-
export const NETWORK_FLAG = 'network';
|
|
44
43
|
// Define categories and options
|
|
45
44
|
export const aztecStartOptions = {
|
|
46
45
|
NETWORK: [
|
|
47
46
|
{
|
|
48
|
-
flag:
|
|
47
|
+
flag: '--network <value>',
|
|
49
48
|
description: 'Network to run Aztec on',
|
|
50
49
|
defaultValue: undefined,
|
|
51
50
|
envVar: 'NETWORK'
|
|
@@ -58,6 +57,12 @@ export const aztecStartOptions = {
|
|
|
58
57
|
defaultValue: undefined,
|
|
59
58
|
envVar: undefined
|
|
60
59
|
},
|
|
60
|
+
{
|
|
61
|
+
flag: '--sandbox.testAccounts',
|
|
62
|
+
description: 'Deploy test accounts on sandbox start',
|
|
63
|
+
envVar: 'TEST_ACCOUNTS',
|
|
64
|
+
...booleanConfigHelper(true)
|
|
65
|
+
},
|
|
61
66
|
{
|
|
62
67
|
flag: '--sandbox.noPXE',
|
|
63
68
|
description: 'Do not expose PXE service on sandbox start',
|
|
@@ -234,6 +239,24 @@ export const aztecStartOptions = {
|
|
|
234
239
|
defaultValue: 100,
|
|
235
240
|
envVar: 'WS_BLOCK_CHECK_INTERVAL_MS',
|
|
236
241
|
parseVal: (val)=>parseInt(val, 10)
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
flag: '--node.testAccounts',
|
|
245
|
+
description: 'Populate genesis state with initial fee juice for test accounts',
|
|
246
|
+
envVar: 'TEST_ACCOUNTS',
|
|
247
|
+
...booleanConfigHelper()
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
flag: '--node.syncMode <value>',
|
|
251
|
+
description: 'Set sync mode to `full` to always sync via L1, `snapshot` to download a snapshot if there is no local data, `force-snapshot` to download even if there is local data.',
|
|
252
|
+
defaultValue: 'snapshot',
|
|
253
|
+
envVar: 'SYNC_MODE'
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
flag: '--node.snapshotsUrl <value>',
|
|
257
|
+
description: 'Base URL for downloading snapshots for snapshot sync.',
|
|
258
|
+
defaultValue: undefined,
|
|
259
|
+
envVar: 'SYNC_SNAPSHOTS_URL'
|
|
237
260
|
}
|
|
238
261
|
],
|
|
239
262
|
'P2P SUBSYSTEM': [
|
|
@@ -23,7 +23,7 @@ export const alphaTestnetL2ChainConfig = {
|
|
|
23
23
|
aztecEpochDuration: 32,
|
|
24
24
|
aztecProofSubmissionWindow: 64,
|
|
25
25
|
testAccounts: true,
|
|
26
|
-
sponsoredFPC:
|
|
26
|
+
sponsoredFPC: true,
|
|
27
27
|
p2pEnabled: true,
|
|
28
28
|
p2pBootstrapNodes: [],
|
|
29
29
|
registryAddress: '0xad85d55a4bbef35e95396191c22903aa717edf1c',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox/sandbox.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AAE7F,OAAO,EAAE,KAAK,uBAAuB,EAAwB,MAAM,yBAAyB,CAAC;AAU7F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,uBAAuB,CAAC;AAGjE,OAAO,EAAE,KAAK,gBAAgB,EAAyC,MAAM,mBAAmB,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAA2D,MAAM,MAAM,CAAC;AAavH;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GAAG,iBAAiB,EACxC,oBAAoB,yCAAS,EAC7B,IAAI,GAAE;IAAE,8BAA8B,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;IAAC,gBAAgB,CAAC,EAAE,EAAE,CAAA;CAAO;;;;;;;;;;;;;;;;;;;GA6BtH;AAED,wBAAwB;AACxB,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG;IAC5C,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,MAAM,EAAE,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;;;;
|
|
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;;;;GA4FtF;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"}
|
package/dest/sandbox/sandbox.js
CHANGED
|
@@ -75,8 +75,6 @@ const localAnvil = foundry;
|
|
|
75
75
|
if (config.testAccounts) {
|
|
76
76
|
if (aztecNodeConfig.p2pEnabled) {
|
|
77
77
|
userLog(`Not setting up test accounts as we are connecting to a network`);
|
|
78
|
-
} else if (config.noPXE) {
|
|
79
|
-
userLog(`Not setting up test accounts as we are not exposing a PXE`);
|
|
80
78
|
} else {
|
|
81
79
|
return await getInitialTestAccounts();
|
|
82
80
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js"
|
|
@@ -29,35 +29,35 @@
|
|
|
29
29
|
"../package.common.json"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@aztec/accounts": "0.82.
|
|
33
|
-
"@aztec/archiver": "0.82.
|
|
34
|
-
"@aztec/aztec-faucet": "0.82.
|
|
35
|
-
"@aztec/aztec-node": "0.82.
|
|
36
|
-
"@aztec/aztec.js": "0.82.
|
|
37
|
-
"@aztec/bb-prover": "0.82.
|
|
38
|
-
"@aztec/bb.js": "0.82.
|
|
39
|
-
"@aztec/blob-sink": "0.82.
|
|
40
|
-
"@aztec/bot": "0.82.
|
|
41
|
-
"@aztec/builder": "0.82.
|
|
42
|
-
"@aztec/cli": "0.82.
|
|
43
|
-
"@aztec/cli-wallet": "0.82.
|
|
44
|
-
"@aztec/constants": "0.82.
|
|
45
|
-
"@aztec/entrypoints": "0.82.
|
|
46
|
-
"@aztec/ethereum": "0.82.
|
|
47
|
-
"@aztec/foundation": "0.82.
|
|
48
|
-
"@aztec/kv-store": "0.82.
|
|
49
|
-
"@aztec/noir-contracts.js": "0.82.
|
|
50
|
-
"@aztec/noir-protocol-circuits-types": "0.82.
|
|
51
|
-
"@aztec/p2p": "0.82.
|
|
52
|
-
"@aztec/p2p-bootstrap": "0.82.
|
|
53
|
-
"@aztec/protocol-contracts": "0.82.
|
|
54
|
-
"@aztec/prover-client": "0.82.
|
|
55
|
-
"@aztec/prover-node": "0.82.
|
|
56
|
-
"@aztec/pxe": "0.82.
|
|
57
|
-
"@aztec/stdlib": "0.82.
|
|
58
|
-
"@aztec/telemetry-client": "0.82.
|
|
59
|
-
"@aztec/txe": "0.82.
|
|
60
|
-
"@aztec/world-state": "0.82.
|
|
32
|
+
"@aztec/accounts": "0.82.3",
|
|
33
|
+
"@aztec/archiver": "0.82.3",
|
|
34
|
+
"@aztec/aztec-faucet": "0.82.3",
|
|
35
|
+
"@aztec/aztec-node": "0.82.3",
|
|
36
|
+
"@aztec/aztec.js": "0.82.3",
|
|
37
|
+
"@aztec/bb-prover": "0.82.3",
|
|
38
|
+
"@aztec/bb.js": "0.82.3",
|
|
39
|
+
"@aztec/blob-sink": "0.82.3",
|
|
40
|
+
"@aztec/bot": "0.82.3",
|
|
41
|
+
"@aztec/builder": "0.82.3",
|
|
42
|
+
"@aztec/cli": "0.82.3",
|
|
43
|
+
"@aztec/cli-wallet": "0.82.3",
|
|
44
|
+
"@aztec/constants": "0.82.3",
|
|
45
|
+
"@aztec/entrypoints": "0.82.3",
|
|
46
|
+
"@aztec/ethereum": "0.82.3",
|
|
47
|
+
"@aztec/foundation": "0.82.3",
|
|
48
|
+
"@aztec/kv-store": "0.82.3",
|
|
49
|
+
"@aztec/noir-contracts.js": "0.82.3",
|
|
50
|
+
"@aztec/noir-protocol-circuits-types": "0.82.3",
|
|
51
|
+
"@aztec/p2p": "0.82.3",
|
|
52
|
+
"@aztec/p2p-bootstrap": "0.82.3",
|
|
53
|
+
"@aztec/protocol-contracts": "0.82.3",
|
|
54
|
+
"@aztec/prover-client": "0.82.3",
|
|
55
|
+
"@aztec/prover-node": "0.82.3",
|
|
56
|
+
"@aztec/pxe": "0.82.3",
|
|
57
|
+
"@aztec/stdlib": "0.82.3",
|
|
58
|
+
"@aztec/telemetry-client": "0.82.3",
|
|
59
|
+
"@aztec/txe": "0.82.3",
|
|
60
|
+
"@aztec/world-state": "0.82.3",
|
|
61
61
|
"@types/chalk": "^2.2.0",
|
|
62
62
|
"abitype": "^0.8.11",
|
|
63
63
|
"chalk": "^5.3.0",
|
package/src/bin/index.ts
CHANGED
|
@@ -12,11 +12,8 @@ import { createConsoleLogger, createLogger } from '@aztec/foundation/log';
|
|
|
12
12
|
|
|
13
13
|
import { Command } from 'commander';
|
|
14
14
|
|
|
15
|
-
import { NETWORK_FLAG, aztecStartOptions } from '../cli/aztec_start_options.js';
|
|
16
|
-
import { enrichEnvironmentWithChainConfig } from '../cli/chain_l2_config.js';
|
|
17
15
|
import { injectAztecCommands } from '../cli/index.js';
|
|
18
16
|
import { getCliVersion } from '../cli/release_version.js';
|
|
19
|
-
import { addOptions } from '../cli/util.js';
|
|
20
17
|
|
|
21
18
|
const userLog = createConsoleLogger();
|
|
22
19
|
const debugLogger = createLogger('cli');
|
|
@@ -29,17 +26,6 @@ async function main() {
|
|
|
29
26
|
process.once('SIGINT', shutdown);
|
|
30
27
|
process.once('SIGTERM', shutdown);
|
|
31
28
|
|
|
32
|
-
// We create a temp command object to detect the presence of the network option
|
|
33
|
-
// If it has been given then we enrich the environment with the chain config
|
|
34
|
-
const tempCmd = new Command('aztec').allowUnknownOption();
|
|
35
|
-
addOptions(tempCmd, aztecStartOptions['NETWORK']);
|
|
36
|
-
tempCmd.parse(process.argv);
|
|
37
|
-
const networkValue = tempCmd.getOptionValue(NETWORK_FLAG);
|
|
38
|
-
|
|
39
|
-
if (networkValue !== undefined) {
|
|
40
|
-
await enrichEnvironmentWithChainConfig(networkValue);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
29
|
const cliVersion = getCliVersion();
|
|
44
30
|
let program = new Command('aztec');
|
|
45
31
|
program.description('Aztec command line interface').version(cliVersion);
|
|
@@ -11,6 +11,7 @@ import { getOtelJsonRpcPropagationMiddleware } from '@aztec/telemetry-client';
|
|
|
11
11
|
|
|
12
12
|
import { createSandbox } from '../sandbox/index.js';
|
|
13
13
|
import { github, splash } from '../splash.js';
|
|
14
|
+
import { enrichEnvironmentWithChainConfig } from './chain_l2_config.js';
|
|
14
15
|
import { getCliVersion } from './release_version.js';
|
|
15
16
|
import { extractNamespacedOptions, installSignalHandlers } from './util.js';
|
|
16
17
|
import { getVersions } from './versioning.js';
|
|
@@ -26,7 +27,6 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
|
|
|
26
27
|
const cliVersion = getCliVersion();
|
|
27
28
|
const sandboxOptions = extractNamespacedOptions(options, 'sandbox');
|
|
28
29
|
const nodeOptions = extractNamespacedOptions(options, 'node');
|
|
29
|
-
sandboxOptions.testAccounts = true;
|
|
30
30
|
userLog(`${splash}\n${github}\n\n`);
|
|
31
31
|
userLog(`Setting up Aztec Sandbox ${cliVersion}, please stand by...`);
|
|
32
32
|
|
|
@@ -51,6 +51,10 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
|
|
|
51
51
|
userLog(`Not exposing PXE API through JSON-RPC server`);
|
|
52
52
|
}
|
|
53
53
|
} else {
|
|
54
|
+
// If a network is specified, enrich the environment with the chain config
|
|
55
|
+
if (options.network) {
|
|
56
|
+
await enrichEnvironmentWithChainConfig(options.network);
|
|
57
|
+
}
|
|
54
58
|
if (options.node) {
|
|
55
59
|
const { startNode } = await import('./cmds/start_node.js');
|
|
56
60
|
({ config } = await startNode(options, signalHandlers, services, adminServices, userLog));
|
|
@@ -65,13 +65,11 @@ export const universalOptions = [
|
|
|
65
65
|
'dataStoreMapSizeKb',
|
|
66
66
|
];
|
|
67
67
|
|
|
68
|
-
export const NETWORK_FLAG = 'network';
|
|
69
|
-
|
|
70
68
|
// Define categories and options
|
|
71
69
|
export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
72
70
|
NETWORK: [
|
|
73
71
|
{
|
|
74
|
-
flag:
|
|
72
|
+
flag: '--network <value>',
|
|
75
73
|
description: 'Network to run Aztec on',
|
|
76
74
|
defaultValue: undefined,
|
|
77
75
|
envVar: 'NETWORK',
|
|
@@ -84,6 +82,12 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
84
82
|
defaultValue: undefined,
|
|
85
83
|
envVar: undefined,
|
|
86
84
|
},
|
|
85
|
+
{
|
|
86
|
+
flag: '--sandbox.testAccounts',
|
|
87
|
+
description: 'Deploy test accounts on sandbox start',
|
|
88
|
+
envVar: 'TEST_ACCOUNTS',
|
|
89
|
+
...booleanConfigHelper(true),
|
|
90
|
+
},
|
|
87
91
|
{
|
|
88
92
|
flag: '--sandbox.noPXE',
|
|
89
93
|
description: 'Do not expose PXE service on sandbox start',
|
|
@@ -263,6 +267,25 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
263
267
|
envVar: 'WS_BLOCK_CHECK_INTERVAL_MS',
|
|
264
268
|
parseVal: val => parseInt(val, 10),
|
|
265
269
|
},
|
|
270
|
+
{
|
|
271
|
+
flag: '--node.testAccounts',
|
|
272
|
+
description: 'Populate genesis state with initial fee juice for test accounts',
|
|
273
|
+
envVar: 'TEST_ACCOUNTS',
|
|
274
|
+
...booleanConfigHelper(),
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
flag: '--node.syncMode <value>',
|
|
278
|
+
description:
|
|
279
|
+
'Set sync mode to `full` to always sync via L1, `snapshot` to download a snapshot if there is no local data, `force-snapshot` to download even if there is local data.',
|
|
280
|
+
defaultValue: 'snapshot',
|
|
281
|
+
envVar: 'SYNC_MODE',
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
flag: '--node.snapshotsUrl <value>',
|
|
285
|
+
description: 'Base URL for downloading snapshots for snapshot sync.',
|
|
286
|
+
defaultValue: undefined,
|
|
287
|
+
envVar: 'SYNC_SNAPSHOTS_URL',
|
|
288
|
+
},
|
|
266
289
|
],
|
|
267
290
|
'P2P SUBSYSTEM': [
|
|
268
291
|
{
|
|
@@ -47,7 +47,7 @@ export const alphaTestnetL2ChainConfig: L2ChainConfig = {
|
|
|
47
47
|
aztecEpochDuration: 32,
|
|
48
48
|
aztecProofSubmissionWindow: 64,
|
|
49
49
|
testAccounts: true,
|
|
50
|
-
sponsoredFPC:
|
|
50
|
+
sponsoredFPC: true,
|
|
51
51
|
p2pEnabled: true,
|
|
52
52
|
p2pBootstrapNodes: [],
|
|
53
53
|
registryAddress: '0xad85d55a4bbef35e95396191c22903aa717edf1c',
|
package/src/sandbox/sandbox.ts
CHANGED
|
@@ -121,8 +121,6 @@ export async function createSandbox(config: Partial<SandboxConfig> = {}, userLog
|
|
|
121
121
|
if (config.testAccounts) {
|
|
122
122
|
if (aztecNodeConfig.p2pEnabled) {
|
|
123
123
|
userLog(`Not setting up test accounts as we are connecting to a network`);
|
|
124
|
-
} else if (config.noPXE) {
|
|
125
|
-
userLog(`Not setting up test accounts as we are not exposing a PXE`);
|
|
126
124
|
} else {
|
|
127
125
|
return await getInitialTestAccounts();
|
|
128
126
|
}
|