@aztec/cli 0.0.1-commit.3469e52 → 0.0.1-commit.3895657bc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dest/cmds/infrastructure/setup_l2_contract.d.ts +1 -1
  2. package/dest/cmds/infrastructure/setup_l2_contract.d.ts.map +1 -1
  3. package/dest/cmds/infrastructure/setup_l2_contract.js +4 -3
  4. package/dest/cmds/l1/assume_proven_through.d.ts +3 -2
  5. package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -1
  6. package/dest/cmds/l1/assume_proven_through.js +3 -5
  7. package/dest/cmds/l1/compute_genesis_values.d.ts +4 -0
  8. package/dest/cmds/l1/compute_genesis_values.d.ts.map +1 -0
  9. package/dest/cmds/l1/compute_genesis_values.js +17 -0
  10. package/dest/cmds/l1/index.d.ts +1 -1
  11. package/dest/cmds/l1/index.d.ts.map +1 -1
  12. package/dest/cmds/l1/index.js +7 -2
  13. package/dest/cmds/l1/update_l1_validators.js +5 -5
  14. package/dest/config/cached_fetch.d.ts +19 -10
  15. package/dest/config/cached_fetch.d.ts.map +1 -1
  16. package/dest/config/cached_fetch.js +110 -32
  17. package/dest/config/chain_l2_config.d.ts +1 -1
  18. package/dest/config/chain_l2_config.d.ts.map +1 -1
  19. package/dest/config/chain_l2_config.js +3 -1
  20. package/dest/config/generated/networks.d.ts +45 -25
  21. package/dest/config/generated/networks.d.ts.map +1 -1
  22. package/dest/config/generated/networks.js +46 -26
  23. package/dest/config/network_config.d.ts +1 -1
  24. package/dest/config/network_config.d.ts.map +1 -1
  25. package/dest/config/network_config.js +3 -2
  26. package/dest/utils/inspect.d.ts +1 -1
  27. package/dest/utils/inspect.d.ts.map +1 -1
  28. package/dest/utils/inspect.js +4 -1
  29. package/package.json +30 -30
  30. package/src/cmds/infrastructure/setup_l2_contract.ts +5 -4
  31. package/src/cmds/l1/assume_proven_through.ts +4 -7
  32. package/src/cmds/l1/compute_genesis_values.ts +29 -0
  33. package/src/cmds/l1/index.ts +23 -4
  34. package/src/cmds/l1/update_l1_validators.ts +5 -5
  35. package/src/config/cached_fetch.ts +119 -31
  36. package/src/config/chain_l2_config.ts +3 -1
  37. package/src/config/generated/networks.ts +44 -24
  38. package/src/config/network_config.ts +3 -2
  39. package/src/utils/inspect.ts +4 -1
@@ -0,0 +1,29 @@
1
+ import { getInitialTestAccountsData } from '@aztec/accounts/testing';
2
+ import type { LogFn } from '@aztec/foundation/log';
3
+ import { protocolContractsHash } from '@aztec/protocol-contracts';
4
+ import { getGenesisValues } from '@aztec/world-state/testing';
5
+
6
+ import { getSponsoredFPCAddress } from '../../utils/setup_contracts.js';
7
+
8
+ /** Computes and prints genesis values needed for L1 contract deployment. */
9
+ export async function computeGenesisValuesCmd(testAccounts: boolean, sponsoredFPC: boolean, log: LogFn) {
10
+ const initialAccounts = testAccounts ? await getInitialTestAccountsData() : [];
11
+ const sponsoredFPCAddresses = sponsoredFPC ? await getSponsoredFPCAddress() : [];
12
+ const initialFundedAccounts = initialAccounts.map(a => a.address).concat(sponsoredFPCAddresses);
13
+ const { genesisArchiveRoot } = await getGenesisValues(initialFundedAccounts);
14
+
15
+ const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
16
+ const vkTreeRoot = getVKTreeRoot();
17
+
18
+ log(
19
+ JSON.stringify(
20
+ {
21
+ vkTreeRoot: vkTreeRoot.toString(),
22
+ protocolContractsHash: protocolContractsHash.toString(),
23
+ genesisArchiveRoot: genesisArchiveRoot.toString(),
24
+ },
25
+ null,
26
+ 2,
27
+ ),
28
+ );
29
+ }
@@ -1,3 +1,4 @@
1
+ import { CheckpointNumber } from '@aztec/foundation/branded-types';
1
2
  import { EthAddress } from '@aztec/foundation/eth-address';
2
3
  import type { LogFn, Logger } from '@aztec/foundation/log';
3
4
 
@@ -105,6 +106,24 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
105
106
  );
106
107
  });
107
108
 
109
+ program
110
+ .command('compute-genesis-values')
111
+ .description('Computes genesis values (VK tree root, protocol contracts hash, genesis archive root).')
112
+ .addOption(
113
+ new Option('--test-accounts <boolean>', 'Include initial test accounts in genesis state')
114
+ .env('TEST_ACCOUNTS')
115
+ .argParser(arg => arg === 'true'),
116
+ )
117
+ .addOption(
118
+ new Option('--sponsored-fpc <boolean>', 'Include sponsored FPC contract in genesis state')
119
+ .env('SPONSORED_FPC')
120
+ .argParser(arg => arg === 'true'),
121
+ )
122
+ .action(async options => {
123
+ const { computeGenesisValuesCmd } = await import('./compute_genesis_values.js');
124
+ await computeGenesisValuesCmd(options.testAccounts, options.sponsoredFpc, log);
125
+ });
126
+
108
127
  program
109
128
  .command('deposit-governance-tokens')
110
129
  .description('Deposits governance tokens to the governance contract.')
@@ -497,14 +516,14 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
497
516
  program
498
517
  .command('set-proven-through', { hidden: true })
499
518
  .description(
500
- 'Instructs the L1 rollup contract to assume all blocks until the given number are automatically proven.',
519
+ 'Instructs the L1 rollup contract to assume all blocks until the given checkpoint are automatically proven.',
501
520
  )
502
- .argument('[blockNumber]', 'The target block number, defaults to the latest pending block number.', parseBigint)
521
+ .argument('[checkpoint]', 'The target checkpoint, defaults to the latest pending checkpoint.', parseBigint)
503
522
  .addOption(l1RpcUrlsOption)
504
523
  .addOption(nodeOption)
505
- .action(async (blockNumber, options) => {
524
+ .action(async (checkpoint, options) => {
506
525
  const { assumeProvenThrough } = await import('./assume_proven_through.js');
507
- await assumeProvenThrough(blockNumber, options.l1RpcUrls, options.nodeUrl, log);
526
+ await assumeProvenThrough(CheckpointNumber.fromBigInt(checkpoint), options.l1RpcUrls, options.nodeUrl, log);
508
527
  });
509
528
 
510
529
  program
@@ -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 { createL1TxUtilsFromViemWallet } from '@aztec/ethereum/l1-tx-utils';
5
+ import { createL1TxUtils } from '@aztec/ethereum/l1-tx-utils';
6
6
  import { EthCheatCodes } from '@aztec/ethereum/test';
7
7
  import type { EthAddress } from '@aztec/foundation/eth-address';
8
8
  import type { LogFn, Logger } from '@aztec/foundation/log';
@@ -88,7 +88,7 @@ export async function addL1Validator({
88
88
  const gse = new GSEContract(l1Client, gseAddress);
89
89
  const registrationTuple = await gse.makeRegistrationTuple(blsSecretKey);
90
90
 
91
- const l1TxUtils = createL1TxUtilsFromViemWallet(l1Client, { logger: debugLogger });
91
+ const l1TxUtils = createL1TxUtils(l1Client, { logger: debugLogger });
92
92
  const proofParamsObj = ZkPassportProofParams.fromBuffer(proofParams);
93
93
 
94
94
  // Step 1: Claim STK tokens from the faucet
@@ -194,7 +194,7 @@ export async function addL1ValidatorViaRollup({
194
194
 
195
195
  const registrationTuple = await gse.makeRegistrationTuple(blsSecretKey);
196
196
 
197
- const l1TxUtils = createL1TxUtilsFromViemWallet(l1Client, { logger: debugLogger });
197
+ const l1TxUtils = createL1TxUtils(l1Client, { logger: debugLogger });
198
198
 
199
199
  const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
200
200
  to: rollupAddress.toString(),
@@ -241,7 +241,7 @@ export async function removeL1Validator({
241
241
  const account = getAccount(privateKey, mnemonic);
242
242
  const chain = createEthereumChain(rpcUrls, chainId);
243
243
  const l1Client = createExtendedL1Client(rpcUrls, account, chain.chainInfo);
244
- const l1TxUtils = createL1TxUtilsFromViemWallet(l1Client, { logger: debugLogger });
244
+ const l1TxUtils = createL1TxUtils(l1Client, { logger: debugLogger });
245
245
 
246
246
  dualLog(`Removing validator ${validatorAddress.toString()} from rollup ${rollupAddress.toString()}`);
247
247
  const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
@@ -268,7 +268,7 @@ export async function pruneRollup({
268
268
  const account = getAccount(privateKey, mnemonic);
269
269
  const chain = createEthereumChain(rpcUrls, chainId);
270
270
  const l1Client = createExtendedL1Client(rpcUrls, account, chain.chainInfo);
271
- const l1TxUtils = createL1TxUtilsFromViemWallet(l1Client, { logger: debugLogger });
271
+ const l1TxUtils = createL1TxUtils(l1Client, { logger: debugLogger });
272
272
 
273
273
  dualLog(`Trying prune`);
274
274
  const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
@@ -1,24 +1,48 @@
1
1
  import { createLogger } from '@aztec/aztec.js/log';
2
2
 
3
- import { mkdir, readFile, stat, writeFile } from 'fs/promises';
3
+ import { mkdir, readFile, writeFile } from 'fs/promises';
4
4
  import { dirname } from 'path';
5
5
 
6
6
  export interface CachedFetchOptions {
7
- /** Cache duration in milliseconds */
8
- cacheDurationMs: number;
9
- /** The cache file */
7
+ /** The cache file path for storing data. If not provided, no caching is performed. */
10
8
  cacheFile?: string;
9
+ /** Fallback max-age in milliseconds when server sends no Cache-Control header. Defaults to 5 minutes. */
10
+ defaultMaxAgeMs?: number;
11
+ }
12
+
13
+ /** Cache metadata stored in a sidecar .meta file alongside the data file. */
14
+ interface CacheMeta {
15
+ etag?: string;
16
+ expiresAt: number;
17
+ }
18
+
19
+ const DEFAULT_MAX_AGE_MS = 5 * 60 * 1000; // 5 minutes
20
+
21
+ /** Extracts max-age value in milliseconds from a Response's Cache-Control header. Returns undefined if not present. */
22
+ export function parseMaxAge(response: { headers: { get(name: string): string | null } }): number | undefined {
23
+ const cacheControl = response.headers.get('cache-control');
24
+ if (!cacheControl) {
25
+ return undefined;
26
+ }
27
+ const match = cacheControl.match(/max-age=(\d+)/);
28
+ if (!match) {
29
+ return undefined;
30
+ }
31
+ return parseInt(match[1], 10) * 1000;
11
32
  }
12
33
 
13
34
  /**
14
- * Fetches data from a URL with file-based caching support.
15
- * This utility can be used by both remote config and bootnodes fetching.
35
+ * Fetches data from a URL with file-based HTTP conditional caching.
36
+ *
37
+ * Data is stored as raw JSON in the cache file (same format as the server returns).
38
+ * Caching metadata (ETag, expiry) is stored in a separate sidecar `.meta` file.
39
+ * This keeps the data file human-readable and backward-compatible with older code.
16
40
  *
17
41
  * @param url - The URL to fetch from
18
- * @param networkName - Network name for cache directory structure
19
- * @param options - Caching and error handling options
20
- * @param cacheDir - Optional cache directory (defaults to no caching)
21
- * @returns The fetched and parsed JSON data, or undefined if fetch fails and throwOnError is false
42
+ * @param options - Caching options
43
+ * @param fetch - Fetch implementation (defaults to globalThis.fetch)
44
+ * @param log - Logger instance
45
+ * @returns The fetched and parsed JSON data, or undefined if fetch fails
22
46
  */
23
47
  export async function cachedFetch<T = any>(
24
48
  url: string,
@@ -26,42 +50,106 @@ export async function cachedFetch<T = any>(
26
50
  fetch = globalThis.fetch,
27
51
  log = createLogger('cached_fetch'),
28
52
  ): Promise<T | undefined> {
29
- const { cacheDurationMs, cacheFile } = options;
53
+ const { cacheFile, defaultMaxAgeMs = DEFAULT_MAX_AGE_MS } = options;
54
+
55
+ // If no cacheFile, just fetch normally without caching
56
+ if (!cacheFile) {
57
+ return fetchAndParse<T>(url, fetch, log);
58
+ }
59
+
60
+ const metaFile = cacheFile + '.meta';
30
61
 
31
- // Try to read from cache first
62
+ // Try to read metadata
63
+ let meta: CacheMeta | undefined;
32
64
  try {
33
- if (cacheFile) {
34
- const info = await stat(cacheFile);
35
- if (info.mtimeMs + cacheDurationMs > Date.now()) {
36
- const cachedData = JSON.parse(await readFile(cacheFile, 'utf-8'));
37
- return cachedData;
38
- }
39
- }
65
+ meta = JSON.parse(await readFile(metaFile, 'utf-8'));
40
66
  } catch {
41
- log.trace('Failed to read data from cache');
67
+ log.trace('No usable cache metadata found');
42
68
  }
43
69
 
70
+ // Try to read cached data
71
+ let cachedData: T | undefined;
44
72
  try {
45
- const response = await fetch(url);
73
+ cachedData = JSON.parse(await readFile(cacheFile, 'utf-8'));
74
+ } catch {
75
+ log.trace('No usable cached data found');
76
+ }
77
+
78
+ // If metadata and data exist and cache is fresh, return directly
79
+ if (meta && cachedData !== undefined && meta.expiresAt > Date.now()) {
80
+ return cachedData;
81
+ }
82
+
83
+ // Cache is stale or missing — make a (possibly conditional) request
84
+ try {
85
+ const headers: Record<string, string> = {};
86
+ if (meta?.etag && cachedData !== undefined) {
87
+ headers['If-None-Match'] = meta.etag;
88
+ }
89
+
90
+ const response = await fetch(url, { headers });
91
+
92
+ if (response.status === 304 && cachedData !== undefined) {
93
+ // Not modified — recompute expiry from new response headers and return cached data
94
+ const maxAgeMs = parseMaxAge(response) ?? defaultMaxAgeMs;
95
+ await writeMetaFile(metaFile, { etag: meta?.etag, expiresAt: Date.now() + maxAgeMs }, log);
96
+ return cachedData;
97
+ }
98
+
46
99
  if (!response.ok) {
47
100
  log.warn(`Failed to fetch from ${url}: ${response.status} ${response.statusText}`);
48
- return undefined;
101
+ return cachedData;
49
102
  }
50
103
 
51
- const data = await response.json();
104
+ // 200 — parse new data and cache it
105
+ const data = (await response.json()) as T;
106
+ const maxAgeMs = parseMaxAge(response) ?? defaultMaxAgeMs;
107
+ const etag = response.headers.get('etag') ?? undefined;
52
108
 
53
- try {
54
- if (cacheFile) {
55
- await mkdir(dirname(cacheFile), { recursive: true });
56
- await writeFile(cacheFile, JSON.stringify(data), 'utf-8');
57
- }
58
- } catch (err) {
59
- log.warn('Failed to cache data on disk: ' + cacheFile, { cacheFile, err });
60
- }
109
+ await ensureDir(cacheFile, log);
110
+ await Promise.all([
111
+ writeFile(cacheFile, JSON.stringify(data), 'utf-8'),
112
+ writeFile(metaFile, JSON.stringify({ etag, expiresAt: Date.now() + maxAgeMs }), 'utf-8'),
113
+ ]);
61
114
 
62
115
  return data;
116
+ } catch (err) {
117
+ log.warn(`Failed to fetch from ${url}`, { err });
118
+ return cachedData;
119
+ }
120
+ }
121
+
122
+ async function fetchAndParse<T>(
123
+ url: string,
124
+ fetch: typeof globalThis.fetch,
125
+ log: ReturnType<typeof createLogger>,
126
+ ): Promise<T | undefined> {
127
+ try {
128
+ const response = await fetch(url);
129
+ if (!response.ok) {
130
+ log.warn(`Failed to fetch from ${url}: ${response.status} ${response.statusText}`);
131
+ return undefined;
132
+ }
133
+ return (await response.json()) as T;
63
134
  } catch (err) {
64
135
  log.warn(`Failed to fetch from ${url}`, { err });
65
136
  return undefined;
66
137
  }
67
138
  }
139
+
140
+ async function ensureDir(filePath: string, log: ReturnType<typeof createLogger>) {
141
+ try {
142
+ await mkdir(dirname(filePath), { recursive: true });
143
+ } catch (err) {
144
+ log.warn('Failed to create cache directory for: ' + filePath, { err });
145
+ }
146
+ }
147
+
148
+ async function writeMetaFile(metaFile: string, meta: CacheMeta, log: ReturnType<typeof createLogger>) {
149
+ try {
150
+ await mkdir(dirname(metaFile), { recursive: true });
151
+ await writeFile(metaFile, JSON.stringify(meta), 'utf-8');
152
+ } catch (err) {
153
+ log.warn('Failed to write cache metadata: ' + metaFile, { err });
154
+ }
155
+ }
@@ -45,7 +45,9 @@ export function enrichEnvironmentWithChainName(networkName: NetworkNames) {
45
45
  }
46
46
 
47
47
  // Apply generated network config from defaults.yml
48
- const generatedConfig = NetworkConfigs[networkName];
48
+ // For devnet iterations (v4-devnet-1, etc.), use the base devnet config
49
+ const configKey = /^v\d+-devnet-\d+$/.test(networkName) ? 'devnet' : networkName;
50
+ const generatedConfig = NetworkConfigs[configKey];
49
51
  if (generatedConfig) {
50
52
  enrichEnvironmentWithNetworkConfig(generatedConfig);
51
53
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  export const devnetConfig = {
5
5
  ETHEREUM_SLOT_DURATION: 12,
6
- AZTEC_SLOT_DURATION: 36,
6
+ AZTEC_SLOT_DURATION: 72,
7
7
  AZTEC_TARGET_COMMITTEE_SIZE: 48,
8
8
  AZTEC_ACTIVATION_THRESHOLD: 100000000000000000000,
9
9
  AZTEC_EJECTION_THRESHOLD: 50000000000000000000,
@@ -13,6 +13,7 @@ export const devnetConfig = {
13
13
  AZTEC_PROOF_SUBMISSION_EPOCHS: 1,
14
14
  AZTEC_MANA_TARGET: 100000000,
15
15
  AZTEC_PROVING_COST_PER_MANA: 100,
16
+ AZTEC_INITIAL_ETH_PER_FEE_ASSET: 10000000,
16
17
  AZTEC_SLASHER_FLAVOR: 'tally',
17
18
  AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS: 4,
18
19
  AZTEC_SLASHING_LIFETIME_IN_ROUNDS: 5,
@@ -26,12 +27,14 @@ export const devnetConfig = {
26
27
  SLASH_MIN_PENALTY_PERCENTAGE: 0.5,
27
28
  SLASH_MAX_PENALTY_PERCENTAGE: 2,
28
29
  SLASH_OFFENSE_EXPIRATION_ROUNDS: 4,
29
- SLASH_MAX_PAYLOAD_SIZE: 50,
30
+ SLASH_MAX_PAYLOAD_SIZE: 80,
30
31
  SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4,
31
32
  P2P_ENABLED: true,
32
33
  BOOTSTRAP_NODES: '',
33
34
  SEQ_MIN_TX_PER_BLOCK: 0,
34
35
  SEQ_BUILD_CHECKPOINT_IF_EMPTY: true,
36
+ SEQ_BLOCK_DURATION_MS: 6000,
37
+ SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36,
35
38
  DATA_STORE_MAP_SIZE_KB: 134217728,
36
39
  ARCHIVER_STORE_MAP_SIZE_KB: 1073741824,
37
40
  NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824,
@@ -47,7 +50,7 @@ export const devnetConfig = {
47
50
  TEST_ACCOUNTS: true,
48
51
  SPONSORED_FPC: true,
49
52
  TRANSACTIONS_DISABLED: false,
50
- SEQ_MAX_TX_PER_BLOCK: 32,
53
+ SEQ_MAX_TX_PER_BLOCK: 18,
51
54
  PROVER_REAL_PROOFS: false,
52
55
  PXE_PROVER_ENABLED: false,
53
56
  SYNC_SNAPSHOTS_URLS: '',
@@ -55,8 +58,6 @@ export const devnetConfig = {
55
58
  BLOB_ALLOW_EMPTY_SOURCES: false,
56
59
  P2P_MAX_PENDING_TX_COUNT: 1000,
57
60
  P2P_TX_POOL_DELETE_TXS_AFTER_REORG: false,
58
- AUTO_UPDATE: 'none',
59
- AUTO_UPDATE_URL: '',
60
61
  PUBLIC_OTEL_OPT_OUT: true,
61
62
  PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',
62
63
  PUBLIC_OTEL_COLLECT_FROM: '',
@@ -66,10 +67,13 @@ export const devnetConfig = {
66
67
  SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 1,
67
68
  SLASH_INACTIVITY_PENALTY: 10000000000000000000,
68
69
  SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY: 10000000000000000000,
70
+ SLASH_DUPLICATE_PROPOSAL_PENALTY: 10000000000000000000,
71
+ SLASH_DUPLICATE_ATTESTATION_PENALTY: 10000000000000000000,
69
72
  SLASH_ATTEST_DESCENDANT_OF_INVALID_PENALTY: 10000000000000000000,
70
73
  SLASH_UNKNOWN_PENALTY: 10000000000000000000,
71
74
  SLASH_INVALID_BLOCK_PENALTY: 10000000000000000000,
72
75
  SLASH_GRACE_PERIOD_L2_SLOTS: 0,
76
+ ENABLE_VERSION_CHECK: true,
73
77
  } as const;
74
78
 
75
79
  export const testnetConfig = {
@@ -81,24 +85,23 @@ export const testnetConfig = {
81
85
  AZTEC_EXIT_DELAY_SECONDS: 172800,
82
86
  AZTEC_INBOX_LAG: 1,
83
87
  AZTEC_PROOF_SUBMISSION_EPOCHS: 1,
84
- AZTEC_PROVING_COST_PER_MANA: 100,
88
+ AZTEC_INITIAL_ETH_PER_FEE_ASSET: 10000000,
85
89
  AZTEC_SLASHER_FLAVOR: 'tally',
86
90
  AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS: 4,
87
91
  AZTEC_SLASHING_LIFETIME_IN_ROUNDS: 5,
88
92
  AZTEC_SLASHING_OFFSET_IN_ROUNDS: 2,
89
93
  AZTEC_SLASHING_DISABLE_DURATION: 432000,
90
- AZTEC_SLASH_AMOUNT_SMALL: 10000000000000000000,
91
- AZTEC_SLASH_AMOUNT_MEDIUM: 20000000000000000000,
92
- AZTEC_SLASH_AMOUNT_LARGE: 50000000000000000000,
93
94
  SLASH_MIN_PENALTY_PERCENTAGE: 0.5,
94
95
  SLASH_MAX_PENALTY_PERCENTAGE: 2,
95
96
  SLASH_OFFENSE_EXPIRATION_ROUNDS: 4,
96
- SLASH_MAX_PAYLOAD_SIZE: 50,
97
+ SLASH_MAX_PAYLOAD_SIZE: 80,
97
98
  SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4,
98
99
  P2P_ENABLED: true,
99
100
  BOOTSTRAP_NODES: '',
100
101
  SEQ_MIN_TX_PER_BLOCK: 0,
101
102
  SEQ_BUILD_CHECKPOINT_IF_EMPTY: true,
103
+ SEQ_BLOCK_DURATION_MS: 6000,
104
+ SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36,
102
105
  DATA_STORE_MAP_SIZE_KB: 134217728,
103
106
  ARCHIVER_STORE_MAP_SIZE_KB: 1073741824,
104
107
  NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824,
@@ -115,13 +118,18 @@ export const testnetConfig = {
115
118
  AZTEC_SLASHING_QUORUM: 33,
116
119
  AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE: 100,
117
120
  AZTEC_GOVERNANCE_PROPOSER_QUORUM: 60,
118
- AZTEC_MANA_TARGET: 150000000,
121
+ AZTEC_MANA_TARGET: 75000000,
122
+ AZTEC_PROVING_COST_PER_MANA: 25000000,
123
+ AZTEC_SLASH_AMOUNT_SMALL: 1E+23,
124
+ AZTEC_SLASH_AMOUNT_MEDIUM: 1E+23,
125
+ AZTEC_SLASH_AMOUNT_LARGE: 1E+23,
119
126
  L1_CHAIN_ID: 11155111,
120
127
  TEST_ACCOUNTS: false,
121
128
  SPONSORED_FPC: true,
122
129
  TRANSACTIONS_DISABLED: false,
123
- SEQ_MAX_TX_PER_BLOCK: 8,
130
+ SEQ_MAX_TX_PER_CHECKPOINT: 72,
124
131
  PROVER_REAL_PROOFS: true,
132
+ P2P_MAX_PENDING_TX_COUNT: 1000,
125
133
  P2P_TX_POOL_DELETE_TXS_AFTER_REORG: true,
126
134
  SLASH_PRUNE_PENALTY: 10000000000000000000,
127
135
  SLASH_DATA_WITHHOLDING_PENALTY: 10000000000000000000,
@@ -129,31 +137,38 @@ export const testnetConfig = {
129
137
  SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 1,
130
138
  SLASH_INACTIVITY_PENALTY: 10000000000000000000,
131
139
  SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY: 10000000000000000000,
140
+ SLASH_DUPLICATE_PROPOSAL_PENALTY: 10000000000000000000,
141
+ SLASH_DUPLICATE_ATTESTATION_PENALTY: 10000000000000000000,
132
142
  SLASH_ATTEST_DESCENDANT_OF_INVALID_PENALTY: 10000000000000000000,
133
143
  SLASH_UNKNOWN_PENALTY: 10000000000000000000,
134
144
  SLASH_INVALID_BLOCK_PENALTY: 10000000000000000000,
135
145
  SLASH_GRACE_PERIOD_L2_SLOTS: 64,
146
+ ENABLE_VERSION_CHECK: true,
136
147
  } as const;
137
148
 
138
149
  export const mainnetConfig = {
139
150
  ETHEREUM_SLOT_DURATION: 12,
140
151
  AZTEC_EPOCH_DURATION: 32,
152
+ AZTEC_TARGET_COMMITTEE_SIZE: 48,
141
153
  AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET: 2,
142
154
  AZTEC_LAG_IN_EPOCHS_FOR_RANDAO: 2,
143
155
  AZTEC_INBOX_LAG: 1,
144
156
  AZTEC_PROOF_SUBMISSION_EPOCHS: 1,
157
+ AZTEC_INITIAL_ETH_PER_FEE_ASSET: 10000000,
145
158
  AZTEC_SLASHER_FLAVOR: 'tally',
146
159
  AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS: 4,
147
160
  AZTEC_SLASHING_OFFSET_IN_ROUNDS: 2,
148
161
  SLASH_MIN_PENALTY_PERCENTAGE: 0.5,
149
162
  SLASH_MAX_PENALTY_PERCENTAGE: 2,
150
163
  SLASH_OFFENSE_EXPIRATION_ROUNDS: 4,
151
- SLASH_MAX_PAYLOAD_SIZE: 50,
164
+ SLASH_MAX_PAYLOAD_SIZE: 80,
152
165
  SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4,
153
166
  P2P_ENABLED: true,
154
167
  BOOTSTRAP_NODES: '',
155
168
  SEQ_MIN_TX_PER_BLOCK: 0,
156
169
  SEQ_BUILD_CHECKPOINT_IF_EMPTY: true,
170
+ SEQ_BLOCK_DURATION_MS: 6000,
171
+ SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36,
157
172
  DATA_STORE_MAP_SIZE_KB: 134217728,
158
173
  ARCHIVER_STORE_MAP_SIZE_KB: 1073741824,
159
174
  NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824,
@@ -162,10 +177,9 @@ export const mainnetConfig = {
162
177
  PUBLIC_OTEL_INCLUDE_METRICS: 'aztec.validator,aztec.tx_collector,aztec.mempool,aztec.p2p.gossip.agg_,aztec.ivc_verifier.agg_',
163
178
  SENTINEL_ENABLED: true,
164
179
  AZTEC_SLOT_DURATION: 72,
165
- AZTEC_TARGET_COMMITTEE_SIZE: 24,
166
180
  AZTEC_ACTIVATION_THRESHOLD: 2E+23,
167
181
  AZTEC_EJECTION_THRESHOLD: 1E+23,
168
- AZTEC_LOCAL_EJECTION_THRESHOLD: 1.96E+23,
182
+ AZTEC_LOCAL_EJECTION_THRESHOLD: 1.9E+23,
169
183
  AZTEC_SLASH_AMOUNT_SMALL: 2E+21,
170
184
  AZTEC_SLASH_AMOUNT_MEDIUM: 2E+21,
171
185
  AZTEC_SLASH_AMOUNT_LARGE: 2E+21,
@@ -175,30 +189,36 @@ export const mainnetConfig = {
175
189
  AZTEC_SLASHING_QUORUM: 65,
176
190
  AZTEC_GOVERNANCE_PROPOSER_QUORUM: 600,
177
191
  AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE: 1000,
178
- AZTEC_MANA_TARGET: 0,
179
- AZTEC_PROVING_COST_PER_MANA: 0,
192
+ AZTEC_MANA_TARGET: 75000000,
193
+ AZTEC_PROVING_COST_PER_MANA: 25000000,
180
194
  AZTEC_EXIT_DELAY_SECONDS: 345600,
181
195
  AZTEC_SLASHING_DISABLE_DURATION: 259200,
196
+ AZTEC_ENTRY_QUEUE_BOOTSTRAP_VALIDATOR_SET_SIZE: 500,
197
+ AZTEC_ENTRY_QUEUE_BOOTSTRAP_FLUSH_SIZE: 500,
198
+ AZTEC_ENTRY_QUEUE_FLUSH_SIZE_MIN: 1,
199
+ AZTEC_ENTRY_QUEUE_FLUSH_SIZE_QUOTIENT: 400,
200
+ AZTEC_ENTRY_QUEUE_MAX_FLUSH_SIZE: 4,
182
201
  L1_CHAIN_ID: 1,
183
202
  TEST_ACCOUNTS: false,
184
203
  SPONSORED_FPC: false,
185
- TRANSACTIONS_DISABLED: true,
186
- SEQ_MAX_TX_PER_BLOCK: 0,
204
+ TRANSACTIONS_DISABLED: false,
205
+ SEQ_MAX_TX_PER_CHECKPOINT: 72,
187
206
  PROVER_REAL_PROOFS: true,
188
207
  SYNC_SNAPSHOTS_URLS: 'https://aztec-labs-snapshots.com/mainnet/',
189
208
  BLOB_ALLOW_EMPTY_SOURCES: true,
190
- P2P_MAX_PENDING_TX_COUNT: 0,
209
+ P2P_MAX_PENDING_TX_COUNT: 1000,
191
210
  P2P_TX_POOL_DELETE_TXS_AFTER_REORG: true,
192
- AUTO_UPDATE: 'notify',
193
- AUTO_UPDATE_URL: 'https://storage.googleapis.com/aztec-mainnet/auto-update/mainnet.json',
194
- PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
195
- PUBLIC_OTEL_COLLECT_FROM: 'sequencer',
211
+ PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',
212
+ PUBLIC_OTEL_COLLECT_FROM: '',
213
+ ENABLE_VERSION_CHECK: false,
196
214
  SLASH_PRUNE_PENALTY: 0,
197
215
  SLASH_DATA_WITHHOLDING_PENALTY: 0,
198
216
  SLASH_INACTIVITY_TARGET_PERCENTAGE: 0.8,
199
217
  SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 2,
200
218
  SLASH_INACTIVITY_PENALTY: 2E+21,
201
219
  SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY: 2E+21,
220
+ SLASH_DUPLICATE_PROPOSAL_PENALTY: 2E+21,
221
+ SLASH_DUPLICATE_ATTESTATION_PENALTY: 2E+21,
202
222
  SLASH_ATTEST_DESCENDANT_OF_INVALID_PENALTY: 2E+21,
203
223
  SLASH_UNKNOWN_PENALTY: 2E+21,
204
224
  SLASH_INVALID_BLOCK_PENALTY: 2E+21,
@@ -9,7 +9,6 @@ import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
9
9
  const DEFAULT_CONFIG_URL =
10
10
  'https://raw.githubusercontent.com/AztecProtocol/networks/refs/heads/main/network_config.json';
11
11
  const FALLBACK_CONFIG_URL = 'https://metadata.aztec.network/network_config.json';
12
- const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
13
12
 
14
13
  /**
15
14
  * Fetches remote network configuration from GitHub with caching support.
@@ -87,7 +86,6 @@ async function fetchNetworkConfigFromUrl(
87
86
 
88
87
  if (url.protocol === 'http:' || url.protocol === 'https:') {
89
88
  rawConfig = await cachedFetch(url.href, {
90
- cacheDurationMs: NETWORK_CONFIG_CACHE_DURATION_MS,
91
89
  cacheFile: cacheDir ? join(cacheDir, networkName, 'network_config.json') : undefined,
92
90
  });
93
91
  } else if (url.protocol === 'file:') {
@@ -144,4 +142,7 @@ export async function enrichEnvironmentWithNetworkConfig(networkName: NetworkNam
144
142
  if (networkConfig.blockDurationMs !== undefined) {
145
143
  enrichVar('SEQ_BLOCK_DURATION_MS', String(networkConfig.blockDurationMs));
146
144
  }
145
+ if (networkConfig.txPublicSetupAllowListExtend) {
146
+ enrichVar('TX_PUBLIC_SETUP_ALLOWLIST', networkConfig.txPublicSetupAllowListExtend);
147
+ }
147
148
  }
@@ -44,7 +44,10 @@ export async function inspectTx(
44
44
  const [receipt, effectsInBlock] = await Promise.all([aztecNode.getTxReceipt(txHash), aztecNode.getTxEffect(txHash)]);
45
45
  // Base tx data
46
46
  log(`Tx ${txHash.toString()}`);
47
- log(` Status: ${receipt.status} ${effectsInBlock ? `(${effectsInBlock.data.revertCode.getDescription()})` : ''}`);
47
+ log(` Status: ${receipt.status}`);
48
+ if (receipt.executionResult) {
49
+ log(` Execution result: ${receipt.executionResult}`);
50
+ }
48
51
  if (receipt.error) {
49
52
  log(` Error: ${receipt.error}`);
50
53
  }