@aztec/cli 0.0.1-commit.64b6bbb → 0.0.1-commit.684755437
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/cmds/infrastructure/setup_l2_contract.d.ts +1 -1
- package/dest/cmds/infrastructure/setup_l2_contract.d.ts.map +1 -1
- package/dest/cmds/infrastructure/setup_l2_contract.js +3 -2
- package/dest/cmds/l1/update_l1_validators.js +5 -5
- package/dest/config/cached_fetch.d.ts +19 -10
- package/dest/config/cached_fetch.d.ts.map +1 -1
- package/dest/config/cached_fetch.js +110 -32
- package/dest/config/chain_l2_config.d.ts +1 -1
- package/dest/config/chain_l2_config.d.ts.map +1 -1
- package/dest/config/chain_l2_config.js +3 -1
- package/dest/config/generated/networks.d.ts +37 -26
- package/dest/config/generated/networks.d.ts.map +1 -1
- package/dest/config/generated/networks.js +38 -27
- package/dest/config/network_config.d.ts +1 -1
- package/dest/config/network_config.d.ts.map +1 -1
- package/dest/config/network_config.js +3 -2
- package/package.json +30 -30
- package/src/cmds/infrastructure/setup_l2_contract.ts +4 -3
- package/src/cmds/l1/update_l1_validators.ts +5 -5
- package/src/config/cached_fetch.ts +119 -31
- package/src/config/chain_l2_config.ts +3 -1
- package/src/config/generated/networks.ts +36 -25
- package/src/config/network_config.ts +3 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
2
|
export declare function setupL2Contracts(nodeUrl: string, testAccounts: boolean, json: boolean, log: LogFn): Promise<void>;
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dXBfbDJfY29udHJhY3QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jbWRzL2luZnJhc3RydWN0dXJlL3NldHVwX2wyX2NvbnRyYWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU1BLE9BQU8sS0FBSyxFQUFFLEtBQUssRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBS25ELHdCQUFzQixnQkFBZ0IsQ0FBQyxPQUFPLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLE9BQU8sRUFBRSxHQUFHLEVBQUUsS0FBSyxpQkF3QnZHIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup_l2_contract.d.ts","sourceRoot":"","sources":["../../../src/cmds/infrastructure/setup_l2_contract.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"setup_l2_contract.d.ts","sourceRoot":"","sources":["../../../src/cmds/infrastructure/setup_l2_contract.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAKnD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,iBAwBvG"}
|
|
@@ -2,7 +2,8 @@ import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
|
2
2
|
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
3
3
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
4
4
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
5
|
-
import {
|
|
5
|
+
import { EmbeddedWallet } from '@aztec/wallets/embedded';
|
|
6
|
+
import { deployFundedSchnorrAccounts } from '@aztec/wallets/testing';
|
|
6
7
|
export async function setupL2Contracts(nodeUrl, testAccounts, json, log) {
|
|
7
8
|
const waitOpts = {
|
|
8
9
|
timeout: 180,
|
|
@@ -11,7 +12,7 @@ export async function setupL2Contracts(nodeUrl, testAccounts, json, log) {
|
|
|
11
12
|
log('setupL2Contracts: Wait options' + jsonStringify(waitOpts));
|
|
12
13
|
log('setupL2Contracts: Creating PXE client...');
|
|
13
14
|
const node = createAztecNodeClient(nodeUrl);
|
|
14
|
-
const wallet = await
|
|
15
|
+
const wallet = await EmbeddedWallet.create(node);
|
|
15
16
|
let deployedAccountManagers = [];
|
|
16
17
|
if (testAccounts) {
|
|
17
18
|
log('setupL2Contracts: Deploying test accounts...');
|
|
@@ -2,7 +2,7 @@ import { createEthereumChain, isAnvilTestChain } from '@aztec/ethereum/chain';
|
|
|
2
2
|
import { createExtendedL1Client, getPublicClient } from '@aztec/ethereum/client';
|
|
3
3
|
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
|
|
4
4
|
import { GSEContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
5
|
-
import {
|
|
5
|
+
import { createL1TxUtils } from '@aztec/ethereum/l1-tx-utils';
|
|
6
6
|
import { EthCheatCodes } from '@aztec/ethereum/test';
|
|
7
7
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
8
8
|
import { RollupAbi, StakingAssetHandlerAbi, TestERC20Abi } from '@aztec/l1-artifacts';
|
|
@@ -38,7 +38,7 @@ export async function addL1Validator({ rpcUrls, chainId, privateKey, mnemonic, a
|
|
|
38
38
|
const gseAddress = await rollup.read.getGSE();
|
|
39
39
|
const gse = new GSEContract(l1Client, gseAddress);
|
|
40
40
|
const registrationTuple = await gse.makeRegistrationTuple(blsSecretKey);
|
|
41
|
-
const l1TxUtils =
|
|
41
|
+
const l1TxUtils = createL1TxUtils(l1Client, {
|
|
42
42
|
logger: debugLogger
|
|
43
43
|
});
|
|
44
44
|
const proofParamsObj = ZkPassportProofParams.fromBuffer(proofParams);
|
|
@@ -130,7 +130,7 @@ export async function addL1ValidatorViaRollup({ rpcUrls, chainId, privateKey, mn
|
|
|
130
130
|
const gseAddress = await rollup.read.getGSE();
|
|
131
131
|
const gse = new GSEContract(l1Client, gseAddress);
|
|
132
132
|
const registrationTuple = await gse.makeRegistrationTuple(blsSecretKey);
|
|
133
|
-
const l1TxUtils =
|
|
133
|
+
const l1TxUtils = createL1TxUtils(l1Client, {
|
|
134
134
|
logger: debugLogger
|
|
135
135
|
});
|
|
136
136
|
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
|
@@ -172,7 +172,7 @@ export async function removeL1Validator({ rpcUrls, chainId, privateKey, mnemonic
|
|
|
172
172
|
const account = getAccount(privateKey, mnemonic);
|
|
173
173
|
const chain = createEthereumChain(rpcUrls, chainId);
|
|
174
174
|
const l1Client = createExtendedL1Client(rpcUrls, account, chain.chainInfo);
|
|
175
|
-
const l1TxUtils =
|
|
175
|
+
const l1TxUtils = createL1TxUtils(l1Client, {
|
|
176
176
|
logger: debugLogger
|
|
177
177
|
});
|
|
178
178
|
dualLog(`Removing validator ${validatorAddress.toString()} from rollup ${rollupAddress.toString()}`);
|
|
@@ -194,7 +194,7 @@ export async function pruneRollup({ rpcUrls, chainId, privateKey, mnemonic, roll
|
|
|
194
194
|
const account = getAccount(privateKey, mnemonic);
|
|
195
195
|
const chain = createEthereumChain(rpcUrls, chainId);
|
|
196
196
|
const l1Client = createExtendedL1Client(rpcUrls, account, chain.chainInfo);
|
|
197
|
-
const l1TxUtils =
|
|
197
|
+
const l1TxUtils = createL1TxUtils(l1Client, {
|
|
198
198
|
logger: debugLogger
|
|
199
199
|
});
|
|
200
200
|
dualLog(`Trying prune`);
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
export interface CachedFetchOptions {
|
|
2
|
-
/**
|
|
3
|
-
cacheDurationMs: number;
|
|
4
|
-
/** The cache file */
|
|
2
|
+
/** The cache file path for storing data. If not provided, no caching is performed. */
|
|
5
3
|
cacheFile?: string;
|
|
4
|
+
/** Fallback max-age in milliseconds when server sends no Cache-Control header. Defaults to 5 minutes. */
|
|
5
|
+
defaultMaxAgeMs?: number;
|
|
6
6
|
}
|
|
7
|
+
/** Extracts max-age value in milliseconds from a Response's Cache-Control header. Returns undefined if not present. */
|
|
8
|
+
export declare function parseMaxAge(response: {
|
|
9
|
+
headers: {
|
|
10
|
+
get(name: string): string | null;
|
|
11
|
+
};
|
|
12
|
+
}): number | undefined;
|
|
7
13
|
/**
|
|
8
|
-
* Fetches data from a URL with file-based caching
|
|
9
|
-
*
|
|
14
|
+
* Fetches data from a URL with file-based HTTP conditional caching.
|
|
15
|
+
*
|
|
16
|
+
* Data is stored as raw JSON in the cache file (same format as the server returns).
|
|
17
|
+
* Caching metadata (ETag, expiry) is stored in a separate sidecar `.meta` file.
|
|
18
|
+
* This keeps the data file human-readable and backward-compatible with older code.
|
|
10
19
|
*
|
|
11
20
|
* @param url - The URL to fetch from
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @returns The fetched and parsed JSON data, or undefined if fetch fails
|
|
21
|
+
* @param options - Caching options
|
|
22
|
+
* @param fetch - Fetch implementation (defaults to globalThis.fetch)
|
|
23
|
+
* @param log - Logger instance
|
|
24
|
+
* @returns The fetched and parsed JSON data, or undefined if fetch fails
|
|
16
25
|
*/
|
|
17
26
|
export declare function cachedFetch<T = any>(url: string, options: CachedFetchOptions, fetch?: typeof globalThis.fetch, log?: import("@aztec/aztec.js/log").Logger): Promise<T | undefined>;
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGVkX2ZldGNoLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlnL2NhY2hlZF9mZXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLQSxNQUFNLFdBQVcsa0JBQWtCO0lBQ2pDLHNGQUFzRjtJQUN0RixTQUFTLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDbkIseUdBQXlHO0lBQ3pHLGVBQWUsQ0FBQyxFQUFFLE1BQU0sQ0FBQztDQUMxQjtBQVVELHVIQUF1SDtBQUN2SCx3QkFBZ0IsV0FBVyxDQUFDLFFBQVEsRUFBRTtJQUFFLE9BQU8sRUFBRTtRQUFFLEdBQUcsQ0FBQyxJQUFJLEVBQUUsTUFBTSxHQUFHLE1BQU0sR0FBRyxJQUFJLENBQUE7S0FBRSxDQUFBO0NBQUUsR0FBRyxNQUFNLEdBQUcsU0FBUyxDQVUzRztBQUVEOzs7Ozs7Ozs7Ozs7R0FZRztBQUNILHdCQUFzQixXQUFXLENBQUMsQ0FBQyxHQUFHLEdBQUcsRUFDdkMsR0FBRyxFQUFFLE1BQU0sRUFDWCxPQUFPLEVBQUUsa0JBQWtCLEVBQzNCLEtBQUssMEJBQW1CLEVBQ3hCLEdBQUcsdUNBQStCLEdBQ2pDLE9BQU8sQ0FBQyxDQUFDLEdBQUcsU0FBUyxDQUFDLENBb0V4QiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cached_fetch.d.ts","sourceRoot":"","sources":["../../src/config/cached_fetch.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,
|
|
1
|
+
{"version":3,"file":"cached_fetch.d.ts","sourceRoot":"","sources":["../../src/config/cached_fetch.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yGAAyG;IACzG,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAUD,uHAAuH;AACvH,wBAAgB,WAAW,CAAC,QAAQ,EAAE;IAAE,OAAO,EAAE;QAAE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAA;CAAE,GAAG,MAAM,GAAG,SAAS,CAU3G;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,WAAW,CAAC,CAAC,GAAG,GAAG,EACvC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,kBAAkB,EAC3B,KAAK,0BAAmB,EACxB,GAAG,uCAA+B,GACjC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAoExB"}
|
|
@@ -1,50 +1,105 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/aztec.js/log';
|
|
2
|
-
import { mkdir, readFile,
|
|
2
|
+
import { mkdir, readFile, writeFile } from 'fs/promises';
|
|
3
3
|
import { dirname } from 'path';
|
|
4
|
+
const DEFAULT_MAX_AGE_MS = 5 * 60 * 1000; // 5 minutes
|
|
5
|
+
/** Extracts max-age value in milliseconds from a Response's Cache-Control header. Returns undefined if not present. */ export function parseMaxAge(response) {
|
|
6
|
+
const cacheControl = response.headers.get('cache-control');
|
|
7
|
+
if (!cacheControl) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const match = cacheControl.match(/max-age=(\d+)/);
|
|
11
|
+
if (!match) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
return parseInt(match[1], 10) * 1000;
|
|
15
|
+
}
|
|
4
16
|
/**
|
|
5
|
-
* Fetches data from a URL with file-based caching
|
|
6
|
-
*
|
|
17
|
+
* Fetches data from a URL with file-based HTTP conditional caching.
|
|
18
|
+
*
|
|
19
|
+
* Data is stored as raw JSON in the cache file (same format as the server returns).
|
|
20
|
+
* Caching metadata (ETag, expiry) is stored in a separate sidecar `.meta` file.
|
|
21
|
+
* This keeps the data file human-readable and backward-compatible with older code.
|
|
7
22
|
*
|
|
8
23
|
* @param url - The URL to fetch from
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @returns The fetched and parsed JSON data, or undefined if fetch fails
|
|
24
|
+
* @param options - Caching options
|
|
25
|
+
* @param fetch - Fetch implementation (defaults to globalThis.fetch)
|
|
26
|
+
* @param log - Logger instance
|
|
27
|
+
* @returns The fetched and parsed JSON data, or undefined if fetch fails
|
|
13
28
|
*/ export async function cachedFetch(url, options, fetch = globalThis.fetch, log = createLogger('cached_fetch')) {
|
|
14
|
-
const {
|
|
15
|
-
//
|
|
29
|
+
const { cacheFile, defaultMaxAgeMs = DEFAULT_MAX_AGE_MS } = options;
|
|
30
|
+
// If no cacheFile, just fetch normally without caching
|
|
31
|
+
if (!cacheFile) {
|
|
32
|
+
return fetchAndParse(url, fetch, log);
|
|
33
|
+
}
|
|
34
|
+
const metaFile = cacheFile + '.meta';
|
|
35
|
+
// Try to read metadata
|
|
36
|
+
let meta;
|
|
16
37
|
try {
|
|
17
|
-
|
|
18
|
-
const info = await stat(cacheFile);
|
|
19
|
-
if (info.mtimeMs + cacheDurationMs > Date.now()) {
|
|
20
|
-
const cachedData = JSON.parse(await readFile(cacheFile, 'utf-8'));
|
|
21
|
-
return cachedData;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
38
|
+
meta = JSON.parse(await readFile(metaFile, 'utf-8'));
|
|
24
39
|
} catch {
|
|
25
|
-
log.trace('
|
|
40
|
+
log.trace('No usable cache metadata found');
|
|
26
41
|
}
|
|
42
|
+
// Try to read cached data
|
|
43
|
+
let cachedData;
|
|
27
44
|
try {
|
|
28
|
-
|
|
45
|
+
cachedData = JSON.parse(await readFile(cacheFile, 'utf-8'));
|
|
46
|
+
} catch {
|
|
47
|
+
log.trace('No usable cached data found');
|
|
48
|
+
}
|
|
49
|
+
// If metadata and data exist and cache is fresh, return directly
|
|
50
|
+
if (meta && cachedData !== undefined && meta.expiresAt > Date.now()) {
|
|
51
|
+
return cachedData;
|
|
52
|
+
}
|
|
53
|
+
// Cache is stale or missing — make a (possibly conditional) request
|
|
54
|
+
try {
|
|
55
|
+
const headers = {};
|
|
56
|
+
if (meta?.etag && cachedData !== undefined) {
|
|
57
|
+
headers['If-None-Match'] = meta.etag;
|
|
58
|
+
}
|
|
59
|
+
const response = await fetch(url, {
|
|
60
|
+
headers
|
|
61
|
+
});
|
|
62
|
+
if (response.status === 304 && cachedData !== undefined) {
|
|
63
|
+
// Not modified — recompute expiry from new response headers and return cached data
|
|
64
|
+
const maxAgeMs = parseMaxAge(response) ?? defaultMaxAgeMs;
|
|
65
|
+
await writeMetaFile(metaFile, {
|
|
66
|
+
etag: meta?.etag,
|
|
67
|
+
expiresAt: Date.now() + maxAgeMs
|
|
68
|
+
}, log);
|
|
69
|
+
return cachedData;
|
|
70
|
+
}
|
|
29
71
|
if (!response.ok) {
|
|
30
72
|
log.warn(`Failed to fetch from ${url}: ${response.status} ${response.statusText}`);
|
|
31
|
-
return
|
|
73
|
+
return cachedData;
|
|
32
74
|
}
|
|
75
|
+
// 200 — parse new data and cache it
|
|
33
76
|
const data = await response.json();
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
err
|
|
45
|
-
});
|
|
46
|
-
}
|
|
77
|
+
const maxAgeMs = parseMaxAge(response) ?? defaultMaxAgeMs;
|
|
78
|
+
const etag = response.headers.get('etag') ?? undefined;
|
|
79
|
+
await ensureDir(cacheFile, log);
|
|
80
|
+
await Promise.all([
|
|
81
|
+
writeFile(cacheFile, JSON.stringify(data), 'utf-8'),
|
|
82
|
+
writeFile(metaFile, JSON.stringify({
|
|
83
|
+
etag,
|
|
84
|
+
expiresAt: Date.now() + maxAgeMs
|
|
85
|
+
}), 'utf-8')
|
|
86
|
+
]);
|
|
47
87
|
return data;
|
|
88
|
+
} catch (err) {
|
|
89
|
+
log.warn(`Failed to fetch from ${url}`, {
|
|
90
|
+
err
|
|
91
|
+
});
|
|
92
|
+
return cachedData;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
async function fetchAndParse(url, fetch, log) {
|
|
96
|
+
try {
|
|
97
|
+
const response = await fetch(url);
|
|
98
|
+
if (!response.ok) {
|
|
99
|
+
log.warn(`Failed to fetch from ${url}: ${response.status} ${response.statusText}`);
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
return await response.json();
|
|
48
103
|
} catch (err) {
|
|
49
104
|
log.warn(`Failed to fetch from ${url}`, {
|
|
50
105
|
err
|
|
@@ -52,3 +107,26 @@ import { dirname } from 'path';
|
|
|
52
107
|
return undefined;
|
|
53
108
|
}
|
|
54
109
|
}
|
|
110
|
+
async function ensureDir(filePath, log) {
|
|
111
|
+
try {
|
|
112
|
+
await mkdir(dirname(filePath), {
|
|
113
|
+
recursive: true
|
|
114
|
+
});
|
|
115
|
+
} catch (err) {
|
|
116
|
+
log.warn('Failed to create cache directory for: ' + filePath, {
|
|
117
|
+
err
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
async function writeMetaFile(metaFile, meta, log) {
|
|
122
|
+
try {
|
|
123
|
+
await mkdir(dirname(metaFile), {
|
|
124
|
+
recursive: true
|
|
125
|
+
});
|
|
126
|
+
await writeFile(metaFile, JSON.stringify(meta), 'utf-8');
|
|
127
|
+
} catch (err) {
|
|
128
|
+
log.warn('Failed to write cache metadata: ' + metaFile, {
|
|
129
|
+
err
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -11,4 +11,4 @@ import type { NetworkNames } from '@aztec/foundation/config';
|
|
|
11
11
|
* @param networkName - The network name
|
|
12
12
|
*/
|
|
13
13
|
export declare function enrichEnvironmentWithChainName(networkName: NetworkNames): void;
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhaW5fbDJfY29uZmlnLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlnL2NoYWluX2wyX2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQTBCN0Q7Ozs7Ozs7Ozs7R0FVRztBQUNILHdCQUFnQiw4QkFBOEIsQ0FBQyxXQUFXLEVBQUUsWUFBWSxRQXFCdkUifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/config/chain_l2_config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AA0B7D;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/config/chain_l2_config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AA0B7D;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,YAAY,QAqBvE"}
|
|
@@ -34,7 +34,9 @@ function getDefaultDataDir(networkName) {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
// Apply generated network config from defaults.yml
|
|
37
|
-
|
|
37
|
+
// For devnet iterations (v4-devnet-1, etc.), use the base devnet config
|
|
38
|
+
const configKey = /^v\d+-devnet-\d+$/.test(networkName) ? 'devnet' : networkName;
|
|
39
|
+
const generatedConfig = NetworkConfigs[configKey];
|
|
38
40
|
if (generatedConfig) {
|
|
39
41
|
enrichEnvironmentWithNetworkConfig(generatedConfig);
|
|
40
42
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const devnetConfig: {
|
|
2
2
|
readonly ETHEREUM_SLOT_DURATION: 12;
|
|
3
|
-
readonly AZTEC_SLOT_DURATION:
|
|
3
|
+
readonly AZTEC_SLOT_DURATION: 72;
|
|
4
4
|
readonly AZTEC_TARGET_COMMITTEE_SIZE: 48;
|
|
5
5
|
readonly AZTEC_ACTIVATION_THRESHOLD: 100000000000000000000;
|
|
6
6
|
readonly AZTEC_EJECTION_THRESHOLD: 50000000000000000000;
|
|
@@ -24,12 +24,14 @@ export declare const devnetConfig: {
|
|
|
24
24
|
readonly SLASH_MIN_PENALTY_PERCENTAGE: 0.5;
|
|
25
25
|
readonly SLASH_MAX_PENALTY_PERCENTAGE: 2;
|
|
26
26
|
readonly SLASH_OFFENSE_EXPIRATION_ROUNDS: 4;
|
|
27
|
-
readonly SLASH_MAX_PAYLOAD_SIZE:
|
|
27
|
+
readonly SLASH_MAX_PAYLOAD_SIZE: 80;
|
|
28
28
|
readonly SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4;
|
|
29
29
|
readonly P2P_ENABLED: true;
|
|
30
30
|
readonly BOOTSTRAP_NODES: "";
|
|
31
31
|
readonly SEQ_MIN_TX_PER_BLOCK: 0;
|
|
32
32
|
readonly SEQ_BUILD_CHECKPOINT_IF_EMPTY: true;
|
|
33
|
+
readonly SEQ_BLOCK_DURATION_MS: 6000;
|
|
34
|
+
readonly SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36;
|
|
33
35
|
readonly DATA_STORE_MAP_SIZE_KB: 134217728;
|
|
34
36
|
readonly ARCHIVER_STORE_MAP_SIZE_KB: 1073741824;
|
|
35
37
|
readonly NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824;
|
|
@@ -45,7 +47,7 @@ export declare const devnetConfig: {
|
|
|
45
47
|
readonly TEST_ACCOUNTS: true;
|
|
46
48
|
readonly SPONSORED_FPC: true;
|
|
47
49
|
readonly TRANSACTIONS_DISABLED: false;
|
|
48
|
-
readonly SEQ_MAX_TX_PER_BLOCK:
|
|
50
|
+
readonly SEQ_MAX_TX_PER_BLOCK: 18;
|
|
49
51
|
readonly PROVER_REAL_PROOFS: false;
|
|
50
52
|
readonly PXE_PROVER_ENABLED: false;
|
|
51
53
|
readonly SYNC_SNAPSHOTS_URLS: "";
|
|
@@ -53,8 +55,6 @@ export declare const devnetConfig: {
|
|
|
53
55
|
readonly BLOB_ALLOW_EMPTY_SOURCES: false;
|
|
54
56
|
readonly P2P_MAX_PENDING_TX_COUNT: 1000;
|
|
55
57
|
readonly P2P_TX_POOL_DELETE_TXS_AFTER_REORG: false;
|
|
56
|
-
readonly AUTO_UPDATE: "none";
|
|
57
|
-
readonly AUTO_UPDATE_URL: "";
|
|
58
58
|
readonly PUBLIC_OTEL_OPT_OUT: true;
|
|
59
59
|
readonly PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: "";
|
|
60
60
|
readonly PUBLIC_OTEL_COLLECT_FROM: "";
|
|
@@ -70,6 +70,7 @@ export declare const devnetConfig: {
|
|
|
70
70
|
readonly SLASH_UNKNOWN_PENALTY: 10000000000000000000;
|
|
71
71
|
readonly SLASH_INVALID_BLOCK_PENALTY: 10000000000000000000;
|
|
72
72
|
readonly SLASH_GRACE_PERIOD_L2_SLOTS: 0;
|
|
73
|
+
readonly ENABLE_VERSION_CHECK: true;
|
|
73
74
|
};
|
|
74
75
|
export declare const testnetConfig: {
|
|
75
76
|
readonly ETHEREUM_SLOT_DURATION: 12;
|
|
@@ -80,25 +81,23 @@ export declare const testnetConfig: {
|
|
|
80
81
|
readonly AZTEC_EXIT_DELAY_SECONDS: 172800;
|
|
81
82
|
readonly AZTEC_INBOX_LAG: 1;
|
|
82
83
|
readonly AZTEC_PROOF_SUBMISSION_EPOCHS: 1;
|
|
83
|
-
readonly AZTEC_PROVING_COST_PER_MANA: 100;
|
|
84
84
|
readonly AZTEC_INITIAL_ETH_PER_FEE_ASSET: 10000000;
|
|
85
85
|
readonly AZTEC_SLASHER_FLAVOR: "tally";
|
|
86
86
|
readonly AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS: 4;
|
|
87
87
|
readonly AZTEC_SLASHING_LIFETIME_IN_ROUNDS: 5;
|
|
88
88
|
readonly AZTEC_SLASHING_OFFSET_IN_ROUNDS: 2;
|
|
89
89
|
readonly AZTEC_SLASHING_DISABLE_DURATION: 432000;
|
|
90
|
-
readonly AZTEC_SLASH_AMOUNT_SMALL: 10000000000000000000;
|
|
91
|
-
readonly AZTEC_SLASH_AMOUNT_MEDIUM: 20000000000000000000;
|
|
92
|
-
readonly AZTEC_SLASH_AMOUNT_LARGE: 50000000000000000000;
|
|
93
90
|
readonly SLASH_MIN_PENALTY_PERCENTAGE: 0.5;
|
|
94
91
|
readonly SLASH_MAX_PENALTY_PERCENTAGE: 2;
|
|
95
92
|
readonly SLASH_OFFENSE_EXPIRATION_ROUNDS: 4;
|
|
96
|
-
readonly SLASH_MAX_PAYLOAD_SIZE:
|
|
93
|
+
readonly SLASH_MAX_PAYLOAD_SIZE: 80;
|
|
97
94
|
readonly SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4;
|
|
98
95
|
readonly P2P_ENABLED: true;
|
|
99
96
|
readonly BOOTSTRAP_NODES: "";
|
|
100
97
|
readonly SEQ_MIN_TX_PER_BLOCK: 0;
|
|
101
98
|
readonly SEQ_BUILD_CHECKPOINT_IF_EMPTY: true;
|
|
99
|
+
readonly SEQ_BLOCK_DURATION_MS: 6000;
|
|
100
|
+
readonly SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36;
|
|
102
101
|
readonly DATA_STORE_MAP_SIZE_KB: 134217728;
|
|
103
102
|
readonly ARCHIVER_STORE_MAP_SIZE_KB: 1073741824;
|
|
104
103
|
readonly NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824;
|
|
@@ -115,13 +114,18 @@ export declare const testnetConfig: {
|
|
|
115
114
|
readonly AZTEC_SLASHING_QUORUM: 33;
|
|
116
115
|
readonly AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE: 100;
|
|
117
116
|
readonly AZTEC_GOVERNANCE_PROPOSER_QUORUM: 60;
|
|
118
|
-
readonly AZTEC_MANA_TARGET:
|
|
117
|
+
readonly AZTEC_MANA_TARGET: 75000000;
|
|
118
|
+
readonly AZTEC_PROVING_COST_PER_MANA: 25000000;
|
|
119
|
+
readonly AZTEC_SLASH_AMOUNT_SMALL: 1e+23;
|
|
120
|
+
readonly AZTEC_SLASH_AMOUNT_MEDIUM: 1e+23;
|
|
121
|
+
readonly AZTEC_SLASH_AMOUNT_LARGE: 1e+23;
|
|
119
122
|
readonly L1_CHAIN_ID: 11155111;
|
|
120
123
|
readonly TEST_ACCOUNTS: false;
|
|
121
|
-
readonly SPONSORED_FPC:
|
|
124
|
+
readonly SPONSORED_FPC: false;
|
|
122
125
|
readonly TRANSACTIONS_DISABLED: false;
|
|
123
|
-
readonly
|
|
126
|
+
readonly SEQ_MAX_TX_PER_CHECKPOINT: 72;
|
|
124
127
|
readonly PROVER_REAL_PROOFS: true;
|
|
128
|
+
readonly P2P_MAX_PENDING_TX_COUNT: 1000;
|
|
125
129
|
readonly P2P_TX_POOL_DELETE_TXS_AFTER_REORG: true;
|
|
126
130
|
readonly SLASH_PRUNE_PENALTY: 10000000000000000000;
|
|
127
131
|
readonly SLASH_DATA_WITHHOLDING_PENALTY: 10000000000000000000;
|
|
@@ -135,10 +139,12 @@ export declare const testnetConfig: {
|
|
|
135
139
|
readonly SLASH_UNKNOWN_PENALTY: 10000000000000000000;
|
|
136
140
|
readonly SLASH_INVALID_BLOCK_PENALTY: 10000000000000000000;
|
|
137
141
|
readonly SLASH_GRACE_PERIOD_L2_SLOTS: 64;
|
|
142
|
+
readonly ENABLE_VERSION_CHECK: true;
|
|
138
143
|
};
|
|
139
144
|
export declare const mainnetConfig: {
|
|
140
145
|
readonly ETHEREUM_SLOT_DURATION: 12;
|
|
141
146
|
readonly AZTEC_EPOCH_DURATION: 32;
|
|
147
|
+
readonly AZTEC_TARGET_COMMITTEE_SIZE: 48;
|
|
142
148
|
readonly AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET: 2;
|
|
143
149
|
readonly AZTEC_LAG_IN_EPOCHS_FOR_RANDAO: 2;
|
|
144
150
|
readonly AZTEC_INBOX_LAG: 1;
|
|
@@ -150,12 +156,14 @@ export declare const mainnetConfig: {
|
|
|
150
156
|
readonly SLASH_MIN_PENALTY_PERCENTAGE: 0.5;
|
|
151
157
|
readonly SLASH_MAX_PENALTY_PERCENTAGE: 2;
|
|
152
158
|
readonly SLASH_OFFENSE_EXPIRATION_ROUNDS: 4;
|
|
153
|
-
readonly SLASH_MAX_PAYLOAD_SIZE:
|
|
159
|
+
readonly SLASH_MAX_PAYLOAD_SIZE: 80;
|
|
154
160
|
readonly SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4;
|
|
155
161
|
readonly P2P_ENABLED: true;
|
|
156
162
|
readonly BOOTSTRAP_NODES: "";
|
|
157
163
|
readonly SEQ_MIN_TX_PER_BLOCK: 0;
|
|
158
164
|
readonly SEQ_BUILD_CHECKPOINT_IF_EMPTY: true;
|
|
165
|
+
readonly SEQ_BLOCK_DURATION_MS: 6000;
|
|
166
|
+
readonly SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36;
|
|
159
167
|
readonly DATA_STORE_MAP_SIZE_KB: 134217728;
|
|
160
168
|
readonly ARCHIVER_STORE_MAP_SIZE_KB: 1073741824;
|
|
161
169
|
readonly NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824;
|
|
@@ -164,10 +172,9 @@ export declare const mainnetConfig: {
|
|
|
164
172
|
readonly PUBLIC_OTEL_INCLUDE_METRICS: "aztec.validator,aztec.tx_collector,aztec.mempool,aztec.p2p.gossip.agg_,aztec.ivc_verifier.agg_";
|
|
165
173
|
readonly SENTINEL_ENABLED: true;
|
|
166
174
|
readonly AZTEC_SLOT_DURATION: 72;
|
|
167
|
-
readonly AZTEC_TARGET_COMMITTEE_SIZE: 24;
|
|
168
175
|
readonly AZTEC_ACTIVATION_THRESHOLD: 2e+23;
|
|
169
176
|
readonly AZTEC_EJECTION_THRESHOLD: 1e+23;
|
|
170
|
-
readonly AZTEC_LOCAL_EJECTION_THRESHOLD: 1.
|
|
177
|
+
readonly AZTEC_LOCAL_EJECTION_THRESHOLD: 1.9e+23;
|
|
171
178
|
readonly AZTEC_SLASH_AMOUNT_SMALL: 2e+21;
|
|
172
179
|
readonly AZTEC_SLASH_AMOUNT_MEDIUM: 2e+21;
|
|
173
180
|
readonly AZTEC_SLASH_AMOUNT_LARGE: 2e+21;
|
|
@@ -177,24 +184,28 @@ export declare const mainnetConfig: {
|
|
|
177
184
|
readonly AZTEC_SLASHING_QUORUM: 65;
|
|
178
185
|
readonly AZTEC_GOVERNANCE_PROPOSER_QUORUM: 600;
|
|
179
186
|
readonly AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE: 1000;
|
|
180
|
-
readonly AZTEC_MANA_TARGET:
|
|
181
|
-
readonly AZTEC_PROVING_COST_PER_MANA:
|
|
187
|
+
readonly AZTEC_MANA_TARGET: 75000000;
|
|
188
|
+
readonly AZTEC_PROVING_COST_PER_MANA: 25000000;
|
|
182
189
|
readonly AZTEC_EXIT_DELAY_SECONDS: 345600;
|
|
183
190
|
readonly AZTEC_SLASHING_DISABLE_DURATION: 259200;
|
|
191
|
+
readonly AZTEC_ENTRY_QUEUE_BOOTSTRAP_VALIDATOR_SET_SIZE: 500;
|
|
192
|
+
readonly AZTEC_ENTRY_QUEUE_BOOTSTRAP_FLUSH_SIZE: 500;
|
|
193
|
+
readonly AZTEC_ENTRY_QUEUE_FLUSH_SIZE_MIN: 1;
|
|
194
|
+
readonly AZTEC_ENTRY_QUEUE_FLUSH_SIZE_QUOTIENT: 400;
|
|
195
|
+
readonly AZTEC_ENTRY_QUEUE_MAX_FLUSH_SIZE: 4;
|
|
184
196
|
readonly L1_CHAIN_ID: 1;
|
|
185
197
|
readonly TEST_ACCOUNTS: false;
|
|
186
198
|
readonly SPONSORED_FPC: false;
|
|
187
|
-
readonly TRANSACTIONS_DISABLED:
|
|
188
|
-
readonly
|
|
199
|
+
readonly TRANSACTIONS_DISABLED: false;
|
|
200
|
+
readonly SEQ_MAX_TX_PER_CHECKPOINT: 72;
|
|
189
201
|
readonly PROVER_REAL_PROOFS: true;
|
|
190
202
|
readonly SYNC_SNAPSHOTS_URLS: "https://aztec-labs-snapshots.com/mainnet/";
|
|
191
203
|
readonly BLOB_ALLOW_EMPTY_SOURCES: true;
|
|
192
|
-
readonly P2P_MAX_PENDING_TX_COUNT:
|
|
204
|
+
readonly P2P_MAX_PENDING_TX_COUNT: 1000;
|
|
193
205
|
readonly P2P_TX_POOL_DELETE_TXS_AFTER_REORG: true;
|
|
194
|
-
readonly
|
|
195
|
-
readonly
|
|
196
|
-
readonly
|
|
197
|
-
readonly PUBLIC_OTEL_COLLECT_FROM: "sequencer";
|
|
206
|
+
readonly PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: "";
|
|
207
|
+
readonly PUBLIC_OTEL_COLLECT_FROM: "";
|
|
208
|
+
readonly ENABLE_VERSION_CHECK: false;
|
|
198
209
|
readonly SLASH_PRUNE_PENALTY: 0;
|
|
199
210
|
readonly SLASH_DATA_WITHHOLDING_PENALTY: 0;
|
|
200
211
|
readonly SLASH_INACTIVITY_TARGET_PERCENTAGE: 0.8;
|
|
@@ -208,4 +219,4 @@ export declare const mainnetConfig: {
|
|
|
208
219
|
readonly SLASH_INVALID_BLOCK_PENALTY: 2e+21;
|
|
209
220
|
readonly SLASH_GRACE_PERIOD_L2_SLOTS: 1200;
|
|
210
221
|
};
|
|
211
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
222
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29ya3MuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb25maWcvZ2VuZXJhdGVkL25ldHdvcmtzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLGVBQU8sTUFBTSxZQUFZOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0NBeUVmLENBQUM7QUFFWCxlQUFPLE1BQU0sYUFBYTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Q0FvRWhCLENBQUM7QUFFWCxlQUFPLE1BQU0sYUFBYTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Q0E2RWhCLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../../src/config/generated/networks.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../../src/config/generated/networks.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyEf,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoEhB,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EhB,CAAC"}
|