@aztec/cli 2.1.0-rc.14 → 2.1.0-rc.17
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.
|
@@ -30,7 +30,6 @@ export declare const stagingIgnitionL2ChainConfig: L2ChainConfig;
|
|
|
30
30
|
export declare const stagingPublicL2ChainConfig: L2ChainConfig;
|
|
31
31
|
export declare const testnetL2ChainConfig: L2ChainConfig;
|
|
32
32
|
export declare const ignitionL2ChainConfig: L2ChainConfig;
|
|
33
|
-
export declare function
|
|
34
|
-
export declare function
|
|
35
|
-
export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): Promise<void>;
|
|
33
|
+
export declare function getL2ChainConfig(networkName: NetworkNames): L2ChainConfig | undefined;
|
|
34
|
+
export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): void;
|
|
36
35
|
//# sourceMappingURL=chain_l2_config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/config/chain_l2_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/config/chain_l2_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAYrE,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,GAC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from '@aztec/foundation/eth-address';
|
|
3
|
-
import path
|
|
3
|
+
import path from 'path';
|
|
4
4
|
import publicIncludeMetrics from '../../public_include_metric_prefixes.json' with {
|
|
5
5
|
type: 'json'
|
|
6
6
|
};
|
|
7
|
-
import { cachedFetch } from './cached_fetch.js';
|
|
8
7
|
import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
|
|
9
8
|
const SNAPSHOTS_URL = 'https://aztec-labs-snapshots.com';
|
|
10
9
|
const defaultDBMapSizeKb = 128 * 1_024 * 1_024; // 128 GB
|
|
@@ -257,16 +256,7 @@ export const ignitionL2ChainConfig = {
|
|
|
257
256
|
slashExecuteRoundsLookBack: 4,
|
|
258
257
|
...DefaultNetworkDBMapSizeConfig
|
|
259
258
|
};
|
|
260
|
-
|
|
261
|
-
export async function getBootnodes(networkName, cacheDir) {
|
|
262
|
-
const url = `http://static.aztec.network/${networkName}/bootnodes.json`;
|
|
263
|
-
const data = await cachedFetch(url, {
|
|
264
|
-
cacheDurationMs: BOOTNODE_CACHE_DURATION_MS,
|
|
265
|
-
cacheFile: cacheDir ? join(cacheDir, networkName, 'bootnodes.json') : undefined
|
|
266
|
-
});
|
|
267
|
-
return data?.bootnodes;
|
|
268
|
-
}
|
|
269
|
-
export async function getL2ChainConfig(networkName, cacheDir) {
|
|
259
|
+
export function getL2ChainConfig(networkName) {
|
|
270
260
|
let config;
|
|
271
261
|
if (networkName === 'staging-public') {
|
|
272
262
|
config = {
|
|
@@ -285,26 +275,17 @@ export async function getL2ChainConfig(networkName, cacheDir) {
|
|
|
285
275
|
...ignitionL2ChainConfig
|
|
286
276
|
};
|
|
287
277
|
}
|
|
288
|
-
if (!config) {
|
|
289
|
-
return undefined;
|
|
290
|
-
}
|
|
291
|
-
// If the bootnodes are not set, get them from the network
|
|
292
|
-
const bootnodeKey = 'BOOTSTRAP_NODES';
|
|
293
|
-
if (!process.env[bootnodeKey]) {
|
|
294
|
-
config.p2pBootstrapNodes = await getBootnodes(networkName, cacheDir);
|
|
295
|
-
}
|
|
296
278
|
return config;
|
|
297
279
|
}
|
|
298
280
|
function getDefaultDataDir(networkName) {
|
|
299
281
|
return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
|
|
300
282
|
}
|
|
301
|
-
export
|
|
283
|
+
export function enrichEnvironmentWithChainConfig(networkName) {
|
|
302
284
|
if (networkName === 'local') {
|
|
303
285
|
return;
|
|
304
286
|
}
|
|
305
287
|
enrichVar('DATA_DIRECTORY', getDefaultDataDir(networkName));
|
|
306
|
-
const
|
|
307
|
-
const config = await getL2ChainConfig(networkName, cacheDir);
|
|
288
|
+
const config = getL2ChainConfig(networkName);
|
|
308
289
|
if (!config) {
|
|
309
290
|
throw new Error(`Unknown network name: ${networkName}`);
|
|
310
291
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli",
|
|
3
|
-
"version": "2.1.0-rc.
|
|
3
|
+
"version": "2.1.0-rc.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
@@ -70,17 +70,17 @@
|
|
|
70
70
|
]
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@aztec/archiver": "2.1.0-rc.
|
|
74
|
-
"@aztec/aztec.js": "2.1.0-rc.
|
|
75
|
-
"@aztec/constants": "2.1.0-rc.
|
|
76
|
-
"@aztec/entrypoints": "2.1.0-rc.
|
|
77
|
-
"@aztec/ethereum": "2.1.0-rc.
|
|
78
|
-
"@aztec/foundation": "2.1.0-rc.
|
|
79
|
-
"@aztec/l1-artifacts": "2.1.0-rc.
|
|
80
|
-
"@aztec/node-lib": "2.1.0-rc.
|
|
81
|
-
"@aztec/p2p": "2.1.0-rc.
|
|
82
|
-
"@aztec/stdlib": "2.1.0-rc.
|
|
83
|
-
"@aztec/world-state": "2.1.0-rc.
|
|
73
|
+
"@aztec/archiver": "2.1.0-rc.17",
|
|
74
|
+
"@aztec/aztec.js": "2.1.0-rc.17",
|
|
75
|
+
"@aztec/constants": "2.1.0-rc.17",
|
|
76
|
+
"@aztec/entrypoints": "2.1.0-rc.17",
|
|
77
|
+
"@aztec/ethereum": "2.1.0-rc.17",
|
|
78
|
+
"@aztec/foundation": "2.1.0-rc.17",
|
|
79
|
+
"@aztec/l1-artifacts": "2.1.0-rc.17",
|
|
80
|
+
"@aztec/node-lib": "2.1.0-rc.17",
|
|
81
|
+
"@aztec/p2p": "2.1.0-rc.17",
|
|
82
|
+
"@aztec/stdlib": "2.1.0-rc.17",
|
|
83
|
+
"@aztec/world-state": "2.1.0-rc.17",
|
|
84
84
|
"@iarna/toml": "^2.2.5",
|
|
85
85
|
"@libp2p/peer-id-factory": "^3.0.4",
|
|
86
86
|
"commander": "^12.1.0",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"viem": "npm:@spalladino/viem@2.38.2-eip7594.0"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@aztec/accounts": "2.1.0-rc.
|
|
96
|
-
"@aztec/protocol-contracts": "2.1.0-rc.
|
|
95
|
+
"@aztec/accounts": "2.1.0-rc.17",
|
|
96
|
+
"@aztec/protocol-contracts": "2.1.0-rc.17",
|
|
97
97
|
"@jest/globals": "^30.0.0",
|
|
98
98
|
"@types/jest": "^30.0.0",
|
|
99
99
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -109,15 +109,15 @@
|
|
|
109
109
|
"typescript": "^5.3.3"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|
|
112
|
-
"@aztec/accounts": "2.1.0-rc.
|
|
113
|
-
"@aztec/bb-prover": "2.1.0-rc.
|
|
114
|
-
"@aztec/ethereum": "2.1.0-rc.
|
|
115
|
-
"@aztec/l1-artifacts": "2.1.0-rc.
|
|
116
|
-
"@aztec/noir-contracts.js": "2.1.0-rc.
|
|
117
|
-
"@aztec/noir-protocol-circuits-types": "2.1.0-rc.
|
|
118
|
-
"@aztec/noir-test-contracts.js": "2.1.0-rc.
|
|
119
|
-
"@aztec/protocol-contracts": "2.1.0-rc.
|
|
120
|
-
"@aztec/stdlib": "2.1.0-rc.
|
|
112
|
+
"@aztec/accounts": "2.1.0-rc.17",
|
|
113
|
+
"@aztec/bb-prover": "2.1.0-rc.17",
|
|
114
|
+
"@aztec/ethereum": "2.1.0-rc.17",
|
|
115
|
+
"@aztec/l1-artifacts": "2.1.0-rc.17",
|
|
116
|
+
"@aztec/noir-contracts.js": "2.1.0-rc.17",
|
|
117
|
+
"@aztec/noir-protocol-circuits-types": "2.1.0-rc.17",
|
|
118
|
+
"@aztec/noir-test-contracts.js": "2.1.0-rc.17",
|
|
119
|
+
"@aztec/protocol-contracts": "2.1.0-rc.17",
|
|
120
|
+
"@aztec/stdlib": "2.1.0-rc.17"
|
|
121
121
|
},
|
|
122
122
|
"files": [
|
|
123
123
|
"dest",
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { DefaultL1ContractsConfig, type L1ContractsConfig } from '@aztec/ethereum';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NetworkNames } from '@aztec/foundation/config';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import type { SharedNodeConfig } from '@aztec/node-lib/config';
|
|
5
5
|
import type { P2PConfig } from '@aztec/p2p/config';
|
|
6
6
|
import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
7
7
|
|
|
8
|
-
import path
|
|
8
|
+
import path from 'path';
|
|
9
9
|
|
|
10
10
|
import publicIncludeMetrics from '../../public_include_metric_prefixes.json' with { type: 'json' };
|
|
11
|
-
import { cachedFetch } from './cached_fetch.js';
|
|
12
11
|
import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
|
|
13
12
|
|
|
14
13
|
const SNAPSHOTS_URL = 'https://aztec-labs-snapshots.com';
|
|
@@ -363,22 +362,7 @@ export const ignitionL2ChainConfig: L2ChainConfig = {
|
|
|
363
362
|
...DefaultNetworkDBMapSizeConfig,
|
|
364
363
|
};
|
|
365
364
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
export async function getBootnodes(networkName: NetworkNames, cacheDir?: string) {
|
|
369
|
-
const url = `http://static.aztec.network/${networkName}/bootnodes.json`;
|
|
370
|
-
const data = await cachedFetch(url, {
|
|
371
|
-
cacheDurationMs: BOOTNODE_CACHE_DURATION_MS,
|
|
372
|
-
cacheFile: cacheDir ? join(cacheDir, networkName, 'bootnodes.json') : undefined,
|
|
373
|
-
});
|
|
374
|
-
|
|
375
|
-
return data?.bootnodes;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
export async function getL2ChainConfig(
|
|
379
|
-
networkName: NetworkNames,
|
|
380
|
-
cacheDir?: string,
|
|
381
|
-
): Promise<L2ChainConfig | undefined> {
|
|
365
|
+
export function getL2ChainConfig(networkName: NetworkNames): L2ChainConfig | undefined {
|
|
382
366
|
let config: L2ChainConfig | undefined;
|
|
383
367
|
if (networkName === 'staging-public') {
|
|
384
368
|
config = { ...stagingPublicL2ChainConfig };
|
|
@@ -389,14 +373,6 @@ export async function getL2ChainConfig(
|
|
|
389
373
|
} else if (networkName === 'ignition') {
|
|
390
374
|
config = { ...ignitionL2ChainConfig };
|
|
391
375
|
}
|
|
392
|
-
if (!config) {
|
|
393
|
-
return undefined;
|
|
394
|
-
}
|
|
395
|
-
// If the bootnodes are not set, get them from the network
|
|
396
|
-
const bootnodeKey: EnvVar = 'BOOTSTRAP_NODES';
|
|
397
|
-
if (!process.env[bootnodeKey]) {
|
|
398
|
-
config.p2pBootstrapNodes = await getBootnodes(networkName, cacheDir);
|
|
399
|
-
}
|
|
400
376
|
return config;
|
|
401
377
|
}
|
|
402
378
|
|
|
@@ -404,14 +380,13 @@ function getDefaultDataDir(networkName: NetworkNames): string {
|
|
|
404
380
|
return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
|
|
405
381
|
}
|
|
406
382
|
|
|
407
|
-
export
|
|
383
|
+
export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
|
|
408
384
|
if (networkName === 'local') {
|
|
409
385
|
return;
|
|
410
386
|
}
|
|
411
387
|
|
|
412
388
|
enrichVar('DATA_DIRECTORY', getDefaultDataDir(networkName));
|
|
413
|
-
const
|
|
414
|
-
const config = await getL2ChainConfig(networkName, cacheDir);
|
|
389
|
+
const config = getL2ChainConfig(networkName);
|
|
415
390
|
|
|
416
391
|
if (!config) {
|
|
417
392
|
throw new Error(`Unknown network name: ${networkName}`);
|