@aztec/cli 2.1.0-rc.9 → 2.1.1-rc.1

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 (40) hide show
  1. package/dest/cmds/l1/deploy_new_rollup.d.ts +1 -1
  2. package/dest/cmds/l1/deploy_new_rollup.d.ts.map +1 -1
  3. package/dest/cmds/l1/deploy_new_rollup.js +2 -2
  4. package/dest/cmds/l1/index.d.ts.map +1 -1
  5. package/dest/cmds/l1/index.js +2 -2
  6. package/dest/cmds/validator_keys/add.d.ts +5 -0
  7. package/dest/cmds/validator_keys/add.d.ts.map +1 -0
  8. package/dest/cmds/validator_keys/add.js +70 -0
  9. package/dest/cmds/validator_keys/generate_bls_keypair.d.ts +12 -0
  10. package/dest/cmds/validator_keys/generate_bls_keypair.d.ts.map +1 -0
  11. package/dest/cmds/validator_keys/generate_bls_keypair.js +26 -0
  12. package/dest/cmds/validator_keys/index.d.ts +4 -0
  13. package/dest/cmds/validator_keys/index.d.ts.map +1 -0
  14. package/dest/cmds/validator_keys/index.js +20 -0
  15. package/dest/cmds/validator_keys/new.d.ts +26 -0
  16. package/dest/cmds/validator_keys/new.d.ts.map +1 -0
  17. package/dest/cmds/validator_keys/new.js +60 -0
  18. package/dest/cmds/validator_keys/shared.d.ts +68 -0
  19. package/dest/cmds/validator_keys/shared.d.ts.map +1 -0
  20. package/dest/cmds/validator_keys/shared.js +271 -0
  21. package/dest/config/chain_l2_config.d.ts +6 -4
  22. package/dest/config/chain_l2_config.d.ts.map +1 -1
  23. package/dest/config/chain_l2_config.js +82 -65
  24. package/dest/utils/aztec.d.ts +1 -1
  25. package/dest/utils/aztec.d.ts.map +1 -1
  26. package/dest/utils/aztec.js +2 -2
  27. package/dest/utils/commands.d.ts +10 -1
  28. package/dest/utils/commands.d.ts.map +1 -1
  29. package/dest/utils/commands.js +30 -3
  30. package/package.json +28 -24
  31. package/src/cmds/l1/deploy_new_rollup.ts +2 -0
  32. package/src/cmds/l1/index.ts +2 -0
  33. package/src/cmds/validator_keys/add.ts +113 -0
  34. package/src/cmds/validator_keys/generate_bls_keypair.ts +33 -0
  35. package/src/cmds/validator_keys/index.ts +96 -0
  36. package/src/cmds/validator_keys/new.ts +120 -0
  37. package/src/cmds/validator_keys/shared.ts +321 -0
  38. package/src/config/chain_l2_config.ts +110 -84
  39. package/src/utils/aztec.ts +2 -0
  40. package/src/utils/commands.ts +41 -3
@@ -0,0 +1,271 @@
1
+ import { prettyPrintJSON } from '@aztec/cli/utils';
2
+ import { computeBn254G1PublicKeyCompressed, deriveBlsPrivateKey } from '@aztec/foundation/crypto';
3
+ import { createBn254Keystore } from '@aztec/foundation/crypto/bls/bn254_keystore';
4
+ import { Wallet } from '@ethersproject/wallet';
5
+ import { constants as fsConstants, mkdirSync } from 'fs';
6
+ import { access, writeFile } from 'fs/promises';
7
+ import { homedir } from 'os';
8
+ import { dirname, isAbsolute, join } from 'path';
9
+ import { mnemonicToAccount } from 'viem/accounts';
10
+ export function withValidatorIndex(path, index) {
11
+ const parts = path.split('/');
12
+ if (parts.length >= 4 && parts[0] === 'm' && parts[1] === '12381' && parts[2] === '3600') {
13
+ parts[3] = String(index);
14
+ return parts.join('/');
15
+ }
16
+ return path;
17
+ }
18
+ /**
19
+ * Compute a compressed BN254 G1 public key from a private key.
20
+ * @param privateKeyHex - Private key as 0x-prefixed hex string
21
+ * @returns Compressed G1 point (32 bytes with sign bit in MSB)
22
+ */ export async function computeBlsPublicKeyCompressed(privateKeyHex) {
23
+ return await computeBn254G1PublicKeyCompressed(privateKeyHex);
24
+ }
25
+ export function deriveEthAttester(mnemonic, baseAccountIndex, addressIndex, remoteSigner) {
26
+ const acct = mnemonicToAccount(mnemonic, {
27
+ accountIndex: baseAccountIndex,
28
+ addressIndex
29
+ });
30
+ return remoteSigner ? {
31
+ address: acct.address,
32
+ remoteSignerUrl: remoteSigner
33
+ } : '0x' + Buffer.from(acct.getHdKey().privateKey).toString('hex');
34
+ }
35
+ export async function buildValidatorEntries(input) {
36
+ const { validatorCount, publisherCount = 0, accountIndex, baseAddressIndex, mnemonic, ikm, blsPath, blsOnly, feeRecipient, coinbase, remoteSigner, fundingAccount } = input;
37
+ const defaultBlsPath = 'm/12381/3600/0/0/0';
38
+ const summaries = [];
39
+ const validators = await Promise.all(Array.from({
40
+ length: validatorCount
41
+ }, async (_unused, i)=>{
42
+ const addressIndex = baseAddressIndex + i;
43
+ const basePath = blsPath ?? defaultBlsPath;
44
+ const perValidatorPath = withValidatorIndex(basePath, addressIndex);
45
+ const blsPrivKey = blsOnly || ikm || mnemonic ? deriveBlsPrivateKey(mnemonic, ikm, perValidatorPath) : undefined;
46
+ const blsPubCompressed = blsPrivKey ? await computeBlsPublicKeyCompressed(blsPrivKey) : undefined;
47
+ if (blsOnly) {
48
+ const attester = {
49
+ bls: blsPrivKey
50
+ };
51
+ summaries.push({
52
+ attesterBls: blsPubCompressed
53
+ });
54
+ return {
55
+ attester,
56
+ feeRecipient
57
+ };
58
+ }
59
+ const ethAttester = deriveEthAttester(mnemonic, accountIndex, addressIndex, remoteSigner);
60
+ const attester = blsPrivKey ? {
61
+ eth: ethAttester,
62
+ bls: blsPrivKey
63
+ } : ethAttester;
64
+ let publisherField;
65
+ const publisherAddresses = [];
66
+ if (publisherCount > 0) {
67
+ const publishersBaseIndex = baseAddressIndex + validatorCount + i * publisherCount;
68
+ const publisherAccounts = Array.from({
69
+ length: publisherCount
70
+ }, (_unused2, j)=>{
71
+ const publisherAddressIndex = publishersBaseIndex + j;
72
+ const pubAcct = mnemonicToAccount(mnemonic, {
73
+ accountIndex,
74
+ addressIndex: publisherAddressIndex
75
+ });
76
+ publisherAddresses.push(pubAcct.address);
77
+ return remoteSigner ? {
78
+ address: pubAcct.address,
79
+ remoteSignerUrl: remoteSigner
80
+ } : '0x' + Buffer.from(pubAcct.getHdKey().privateKey).toString('hex');
81
+ });
82
+ publisherField = publisherCount === 1 ? publisherAccounts[0] : publisherAccounts;
83
+ }
84
+ const acct = mnemonicToAccount(mnemonic, {
85
+ accountIndex,
86
+ addressIndex
87
+ });
88
+ const attesterEthAddress = acct.address;
89
+ summaries.push({
90
+ attesterEth: attesterEthAddress,
91
+ attesterBls: blsPubCompressed,
92
+ publisherEth: publisherAddresses.length > 0 ? publisherAddresses : undefined
93
+ });
94
+ return {
95
+ attester,
96
+ ...publisherField !== undefined ? {
97
+ publisher: publisherField
98
+ } : {},
99
+ feeRecipient,
100
+ coinbase,
101
+ fundingAccount
102
+ };
103
+ }));
104
+ return {
105
+ validators,
106
+ summaries
107
+ };
108
+ }
109
+ export async function resolveKeystoreOutputPath(dataDir, file) {
110
+ const defaultDataDir = join(homedir(), '.aztec', 'keystore');
111
+ const resolvedDir = dataDir && dataDir.length > 0 ? dataDir : defaultDataDir;
112
+ let outputPath;
113
+ if (file && file.length > 0) {
114
+ outputPath = isAbsolute(file) ? file : join(resolvedDir, file);
115
+ } else {
116
+ let index = 1;
117
+ while(true){
118
+ const candidate = join(resolvedDir, `key${index}.json`);
119
+ try {
120
+ await access(candidate, fsConstants.F_OK);
121
+ index += 1;
122
+ } catch {
123
+ outputPath = candidate;
124
+ break;
125
+ }
126
+ }
127
+ }
128
+ return {
129
+ resolvedDir,
130
+ outputPath: outputPath
131
+ };
132
+ }
133
+ export async function writeKeystoreFile(path, keystore) {
134
+ mkdirSync(dirname(path), {
135
+ recursive: true
136
+ });
137
+ await writeFile(path, JSON.stringify(keystore, null, 2), {
138
+ encoding: 'utf-8'
139
+ });
140
+ }
141
+ export function logValidatorSummaries(log, summaries) {
142
+ const lines = [];
143
+ for(let i = 0; i < summaries.length; i++){
144
+ const v = summaries[i];
145
+ lines.push(`acc${i + 1}:`);
146
+ lines.push(` attester:`);
147
+ if (v.attesterEth) {
148
+ lines.push(` eth: ${v.attesterEth}`);
149
+ }
150
+ if (v.attesterBls) {
151
+ lines.push(` bls: ${v.attesterBls}`);
152
+ }
153
+ if (v.publisherEth && v.publisherEth.length > 0) {
154
+ lines.push(` publisher:`);
155
+ for (const addr of v.publisherEth){
156
+ lines.push(` - ${addr}`);
157
+ }
158
+ }
159
+ }
160
+ if (lines.length > 0) {
161
+ log(lines.join('\n'));
162
+ }
163
+ }
164
+ export function maybePrintJson(log, jsonFlag, obj) {
165
+ if (jsonFlag) {
166
+ log(prettyPrintJSON(obj));
167
+ }
168
+ }
169
+ /**
170
+ * Writes a BN254 keystore file for a BN254 BLS private key.
171
+ * Returns the absolute path to the written file.
172
+ *
173
+ * @param outDir - Directory to write the keystore file to
174
+ * @param fileNameBase - Base name for the keystore file (will be sanitized)
175
+ * @param password - Password for encrypting the private key
176
+ * @param privateKeyHex - Private key as 0x-prefixed hex string (32 bytes)
177
+ * @param pubkeyHex - Public key as hex string
178
+ * @param derivationPath - BIP-44 style derivation path
179
+ * @returns Absolute path to the written keystore file
180
+ */ export async function writeBn254BlsKeystore(outDir, fileNameBase, password, privateKeyHex, pubkeyHex, derivationPath) {
181
+ mkdirSync(outDir, {
182
+ recursive: true
183
+ });
184
+ const keystore = createBn254Keystore(password, privateKeyHex, pubkeyHex, derivationPath);
185
+ const safeBase = fileNameBase.replace(/[^a-zA-Z0-9_-]/g, '_');
186
+ const outPath = join(outDir, `keystore-${safeBase}.json`);
187
+ await writeFile(outPath, JSON.stringify(keystore, null, 2), {
188
+ encoding: 'utf-8'
189
+ });
190
+ return outPath;
191
+ }
192
+ /** Replace plaintext BLS keys in validators with { path, password } pointing to BN254 keystore files. */ export async function writeBlsBn254ToFile(validators, options) {
193
+ for(let i = 0; i < validators.length; i++){
194
+ const v = validators[i];
195
+ if (!v || typeof v !== 'object' || !('attester' in v)) {
196
+ continue;
197
+ }
198
+ const att = v.attester;
199
+ // Shapes: { bls: <hex> } or { eth: <ethAccount>, bls?: <hex> } or plain EthAccount
200
+ const blsKey = typeof att === 'object' && 'bls' in att ? att.bls : undefined;
201
+ if (!blsKey || typeof blsKey !== 'string') {
202
+ continue;
203
+ }
204
+ const pub = await computeBlsPublicKeyCompressed(blsKey);
205
+ const path = 'm/12381/3600/0/0/0';
206
+ const fileBase = `${String(i + 1)}_${pub.slice(2, 18)}`;
207
+ const keystorePath = await writeBn254BlsKeystore(options.outDir, fileBase, options.password, blsKey, pub, path);
208
+ if (typeof att === 'object') {
209
+ att.bls = {
210
+ path: keystorePath,
211
+ password: options.password
212
+ };
213
+ }
214
+ }
215
+ }
216
+ /** Writes an Ethereum JSON V3 keystore using ethers, returns absolute path */ export async function writeEthJsonV3Keystore(outDir, fileNameBase, password, privateKeyHex) {
217
+ const safeBase = fileNameBase.replace(/[^a-zA-Z0-9_-]/g, '_');
218
+ mkdirSync(outDir, {
219
+ recursive: true
220
+ });
221
+ const wallet = new Wallet(privateKeyHex);
222
+ const json = await wallet.encrypt(password);
223
+ const outPath = join(outDir, `keystore-eth-${safeBase}.json`);
224
+ await writeFile(outPath, json, {
225
+ encoding: 'utf-8'
226
+ });
227
+ return outPath;
228
+ }
229
+ /** Replace plaintext ETH keys in validators with { path, password } pointing to JSON V3 files. */ export async function writeEthJsonV3ToFile(validators, options) {
230
+ const maybeEncryptEth = async (account, label)=>{
231
+ if (typeof account === 'string' && account.startsWith('0x') && account.length === 66) {
232
+ const fileBase = `${label}_${account.slice(2, 10)}`;
233
+ const p = await writeEthJsonV3Keystore(options.outDir, fileBase, options.password, account);
234
+ return {
235
+ path: p,
236
+ password: options.password
237
+ };
238
+ }
239
+ return account;
240
+ };
241
+ for(let i = 0; i < validators.length; i++){
242
+ const v = validators[i];
243
+ if (!v || typeof v !== 'object') {
244
+ continue;
245
+ }
246
+ // attester may be string (eth), object with eth, or remote signer
247
+ const att = v.attester;
248
+ if (typeof att === 'string') {
249
+ v.attester = await maybeEncryptEth(att, `attester_${i + 1}`);
250
+ } else if (att && typeof att === 'object' && 'eth' in att) {
251
+ att.eth = await maybeEncryptEth(att.eth, `attester_${i + 1}`);
252
+ }
253
+ // publisher can be single or array
254
+ if ('publisher' in v) {
255
+ const pub = v.publisher;
256
+ if (Array.isArray(pub)) {
257
+ const out = [];
258
+ for(let j = 0; j < pub.length; j++){
259
+ out.push(await maybeEncryptEth(pub[j], `publisher_${i + 1}_${j + 1}`));
260
+ }
261
+ v.publisher = out;
262
+ } else if (pub !== undefined) {
263
+ v.publisher = await maybeEncryptEth(pub, `publisher_${i + 1}`);
264
+ }
265
+ }
266
+ // Optional fundingAccount within validator
267
+ if ('fundingAccount' in v) {
268
+ v.fundingAccount = await maybeEncryptEth(v.fundingAccount, `funding_${i + 1}`);
269
+ }
270
+ }
271
+ }
@@ -19,18 +19,20 @@ export type L2ChainConfig = L1ContractsConfig & Pick<P2PConfig, 'txPoolDeleteTxs
19
19
  publicIncludeMetrics?: string[];
20
20
  publicMetricsCollectorUrl?: string;
21
21
  publicMetricsCollectFrom?: string[];
22
+ skipArchiverInitialSync?: boolean;
23
+ blobAllowEmptySources?: boolean;
22
24
  dbMapSizeKb: number;
23
25
  archiverStoreMapSizeKb: number;
24
26
  noteHashTreeMapSizeKb: number;
25
27
  nullifierTreeMapSizeKb: number;
26
28
  publicDataTreeMapSizeKb: number;
27
29
  sentinelEnabled: boolean;
30
+ disableTransactions: boolean;
28
31
  };
29
32
  export declare const stagingIgnitionL2ChainConfig: L2ChainConfig;
30
33
  export declare const stagingPublicL2ChainConfig: L2ChainConfig;
31
34
  export declare const testnetL2ChainConfig: L2ChainConfig;
32
- export declare const ignitionL2ChainConfig: L2ChainConfig;
33
- export declare function getBootnodes(networkName: NetworkNames, cacheDir?: string): Promise<any>;
34
- export declare function getL2ChainConfig(networkName: NetworkNames, cacheDir?: string): Promise<L2ChainConfig | undefined>;
35
- export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): Promise<void>;
35
+ export declare const mainnetL2ChainConfig: L2ChainConfig;
36
+ export declare function getL2ChainConfig(networkName: NetworkNames): L2ChainConfig | undefined;
37
+ export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): void;
36
38
  //# sourceMappingURL=chain_l2_config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"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M,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAIhC,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,uBAAuB,EAAE,MAAM,CAAC;IAGhC,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC;AA+CJ,eAAO,MAAM,4BAA4B,EAAE,aAgF1C,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,aAoDxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aAsFlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aAoFlC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,YAAY,GAAG,aAAa,GAAG,SAAS,CAYrF;AAMD,wBAAgB,gCAAgC,CAAC,WAAW,EAAE,YAAY,QAoGzE"}
@@ -1,10 +1,9 @@
1
1
  import { DefaultL1ContractsConfig } from '@aztec/ethereum';
2
2
  import { EthAddress } from '@aztec/foundation/eth-address';
3
- import path, { join } from '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
@@ -48,6 +47,7 @@ export const stagingIgnitionL2ChainConfig = {
48
47
  l1ChainId: 11155111,
49
48
  testAccounts: false,
50
49
  sponsoredFPC: false,
50
+ disableTransactions: true,
51
51
  p2pEnabled: true,
52
52
  p2pBootstrapNodes: [],
53
53
  seqMinTxsPerBlock: 0,
@@ -65,6 +65,7 @@ export const stagingIgnitionL2ChainConfig = {
65
65
  'sequencer'
66
66
  ],
67
67
  txPoolDeleteTxsAfterReorg: false,
68
+ blobAllowEmptySources: true,
68
69
  /** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
69
70
  /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 72,
70
71
  /** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
@@ -91,7 +92,6 @@ export const stagingIgnitionL2ChainConfig = {
91
92
  governanceProposerRoundSize: 300,
92
93
  governanceProposerQuorum: 151,
93
94
  // Node slashing config
94
- // TODO TMNT-330
95
95
  slashMinPenaltyPercentage: 0.5,
96
96
  slashMaxPenaltyPercentage: 2.0,
97
97
  slashInactivityTargetPercentage: 0.7,
@@ -114,6 +114,7 @@ export const stagingPublicL2ChainConfig = {
114
114
  l1ChainId: 11155111,
115
115
  testAccounts: false,
116
116
  sponsoredFPC: true,
117
+ disableTransactions: false,
117
118
  p2pEnabled: true,
118
119
  p2pBootstrapNodes: [],
119
120
  seqMinTxsPerBlock: 0,
@@ -154,9 +155,10 @@ export const testnetL2ChainConfig = {
154
155
  testAccounts: false,
155
156
  sponsoredFPC: true,
156
157
  p2pEnabled: true,
158
+ disableTransactions: true,
157
159
  p2pBootstrapNodes: [],
158
160
  seqMinTxsPerBlock: 0,
159
- seqMaxTxsPerBlock: 20,
161
+ seqMaxTxsPerBlock: 0,
160
162
  realProofs: true,
161
163
  snapshotsUrls: [
162
164
  `${SNAPSHOTS_URL}/testnet/`
@@ -170,28 +172,56 @@ export const testnetL2ChainConfig = {
170
172
  'sequencer'
171
173
  ],
172
174
  txPoolDeleteTxsAfterReorg: true,
173
- // Deployment stuff
175
+ skipArchiverInitialSync: true,
176
+ blobAllowEmptySources: true,
174
177
  /** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
175
- /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 36,
178
+ /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 72,
176
179
  /** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
177
- /** The target validator committee size. */ aztecTargetCommitteeSize: 48,
180
+ /** The target validator committee size. */ aztecTargetCommitteeSize: 24,
178
181
  /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochs: 2,
179
182
  /** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
180
- /** The deposit amount for a validator */ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
181
- /** The minimum stake for a validator. */ ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
182
- /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
183
- /** The slashing round size */ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
184
- /** Governance proposing round size */ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
185
- /** The mana target for the rollup */ manaTarget: DefaultL1ContractsConfig.manaTarget,
186
- /** The proving cost per mana */ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
187
- /** Exit delay for stakers */ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
188
- ...DefaultSlashConfig,
183
+ // This is a diff from mainnet: we have 2-strikes you're out, rather than 3 on mainnet.
184
+ localEjectionThreshold: 198_000n * 10n ** 18n,
185
+ /** How many sequencers must agree with a slash for it to be executed. */ slashingQuorum: 65,
186
+ slashingRoundSizeInEpochs: 4,
187
+ slashingExecutionDelayInRounds: 28,
188
+ slashingLifetimeInRounds: 34,
189
+ slashingVetoer: EthAddress.fromString('0xBbB4aF368d02827945748b28CD4b2D42e4A37480'),
190
+ slashingOffsetInRounds: 2,
191
+ slashingDisableDuration: 259_200,
192
+ slasherFlavor: 'tally',
193
+ slashAmountSmall: 2_000n * 10n ** 18n,
194
+ slashAmountMedium: 2_000n * 10n ** 18n,
195
+ slashAmountLarge: 2_000n * 10n ** 18n,
196
+ /** The mana target for the rollup */ manaTarget: 0n,
197
+ /** The proving cost per mana */ provingCostPerMana: 0n,
198
+ exitDelaySeconds: 4 * 24 * 60 * 60,
199
+ activationThreshold: 200_000n * 10n ** 18n,
200
+ ejectionThreshold: 100_000n * 10n ** 18n,
201
+ governanceProposerRoundSize: 300,
202
+ governanceProposerQuorum: 151,
203
+ // Node slashing config
204
+ slashInactivityTargetPercentage: 0.8,
205
+ slashInactivityConsecutiveEpochThreshold: 2,
206
+ slashInactivityPenalty: 2_000n * 10n ** 18n,
189
207
  slashPrunePenalty: 0n,
190
208
  slashDataWithholdingPenalty: 0n,
191
- slashInactivityPenalty: DefaultL1ContractsConfig.slashAmountMedium,
209
+ slashProposeInvalidAttestationsPenalty: 2_000n * 10n ** 18n,
210
+ slashAttestDescendantOfInvalidPenalty: 2_000n * 10n ** 18n,
211
+ slashUnknownPenalty: 2_000n * 10n ** 18n,
212
+ slashBroadcastedInvalidBlockPenalty: 2_000n * 10n ** 18n,
213
+ slashGracePeriodL2Slots: 1_200,
214
+ slashOffenseExpirationRounds: 8,
215
+ slashMinPenaltyPercentage: 0.5,
216
+ slashMaxPenaltyPercentage: 2.0,
217
+ slashMaxPayloadSize: 50,
218
+ slashExecuteRoundsLookBack: 4,
219
+ sentinelEnabled: true,
192
220
  ...DefaultNetworkDBMapSizeConfig
193
221
  };
194
- export const ignitionL2ChainConfig = {
222
+ export const mainnetL2ChainConfig = {
223
+ txPoolDeleteTxsAfterReorg: true,
224
+ disableTransactions: true,
195
225
  l1ChainId: 1,
196
226
  testAccounts: false,
197
227
  sponsoredFPC: false,
@@ -201,72 +231,61 @@ export const ignitionL2ChainConfig = {
201
231
  seqMaxTxsPerBlock: 0,
202
232
  realProofs: true,
203
233
  snapshotsUrls: [
204
- `${SNAPSHOTS_URL}/ignition/`
234
+ `${SNAPSHOTS_URL}/mainnet/`
205
235
  ],
206
236
  autoUpdate: 'notify',
207
- autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/ignition.json',
237
+ autoUpdateUrl: 'https://storage.googleapis.com/aztec-mainnet/auto-update/mainnet.json',
208
238
  maxTxPoolSize: 100_000_000,
209
239
  publicIncludeMetrics,
210
240
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
211
241
  publicMetricsCollectFrom: [
212
242
  'sequencer'
213
243
  ],
214
- txPoolDeleteTxsAfterReorg: false,
215
244
  /** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
216
245
  /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 72,
217
246
  /** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
218
247
  /** The target validator committee size. */ aztecTargetCommitteeSize: 24,
219
248
  /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochs: 2,
220
249
  /** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
250
+ localEjectionThreshold: 196_000n * 10n ** 18n,
221
251
  /** How many sequencers must agree with a slash for it to be executed. */ slashingQuorum: 65,
222
252
  slashingRoundSizeInEpochs: 4,
223
- slashingLifetimeInRounds: 40,
224
253
  slashingExecutionDelayInRounds: 28,
225
- slashingDisableDuration: 5 * 24 * 60 * 60,
226
- slashAmountSmall: 2_000n * 10n ** 18n,
227
- slashAmountMedium: 10_000n * 10n ** 18n,
228
- slashAmountLarge: 50_000n * 10n ** 18n,
254
+ slashingLifetimeInRounds: 34,
255
+ slashingVetoer: EthAddress.ZERO,
229
256
  slashingOffsetInRounds: 2,
257
+ slashingDisableDuration: 259_200,
230
258
  slasherFlavor: 'tally',
231
- slashingVetoer: EthAddress.ZERO,
259
+ slashAmountSmall: 2_000n * 10n ** 18n,
260
+ slashAmountMedium: 2_000n * 10n ** 18n,
261
+ slashAmountLarge: 2_000n * 10n ** 18n,
232
262
  /** The mana target for the rollup */ manaTarget: 0n,
233
- exitDelaySeconds: 5 * 24 * 60 * 60,
234
263
  /** The proving cost per mana */ provingCostPerMana: 0n,
235
- ejectionThreshold: 100_000n * 10n ** 18n,
264
+ exitDelaySeconds: 4 * 24 * 60 * 60,
236
265
  activationThreshold: 200_000n * 10n ** 18n,
237
- localEjectionThreshold: 196_000n * 10n ** 18n,
238
- governanceProposerRoundSize: 300,
239
- governanceProposerQuorum: 151,
266
+ ejectionThreshold: 100_000n * 10n ** 18n,
267
+ governanceProposerRoundSize: 1000,
268
+ governanceProposerQuorum: 600,
240
269
  // Node slashing config
241
- // TODO TMNT-330
242
- slashMinPenaltyPercentage: 0.5,
243
- slashMaxPenaltyPercentage: 2.0,
244
- slashInactivityTargetPercentage: 0.7,
270
+ slashInactivityTargetPercentage: 0.8,
245
271
  slashInactivityConsecutiveEpochThreshold: 2,
246
272
  slashInactivityPenalty: 2_000n * 10n ** 18n,
247
273
  slashPrunePenalty: 0n,
248
274
  slashDataWithholdingPenalty: 0n,
249
- slashProposeInvalidAttestationsPenalty: 50_000n * 10n ** 18n,
250
- slashAttestDescendantOfInvalidPenalty: 50_000n * 10n ** 18n,
275
+ slashProposeInvalidAttestationsPenalty: 2_000n * 10n ** 18n,
276
+ slashAttestDescendantOfInvalidPenalty: 2_000n * 10n ** 18n,
251
277
  slashUnknownPenalty: 2_000n * 10n ** 18n,
252
- slashBroadcastedInvalidBlockPenalty: 0n,
253
- slashMaxPayloadSize: 50,
254
- slashGracePeriodL2Slots: 32 * 4,
278
+ slashBroadcastedInvalidBlockPenalty: 2_000n * 10n ** 18n,
279
+ slashGracePeriodL2Slots: 1_200,
255
280
  slashOffenseExpirationRounds: 8,
256
- sentinelEnabled: true,
281
+ slashMinPenaltyPercentage: 0.5,
282
+ slashMaxPenaltyPercentage: 2.0,
283
+ slashMaxPayloadSize: 50,
257
284
  slashExecuteRoundsLookBack: 4,
285
+ sentinelEnabled: true,
258
286
  ...DefaultNetworkDBMapSizeConfig
259
287
  };
260
- const BOOTNODE_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour;
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) {
288
+ export function getL2ChainConfig(networkName) {
270
289
  let config;
271
290
  if (networkName === 'staging-public') {
272
291
  config = {
@@ -280,31 +299,22 @@ export async function getL2ChainConfig(networkName, cacheDir) {
280
299
  config = {
281
300
  ...stagingIgnitionL2ChainConfig
282
301
  };
283
- } else if (networkName === 'ignition') {
302
+ } else if (networkName === 'mainnet') {
284
303
  config = {
285
- ...ignitionL2ChainConfig
304
+ ...mainnetL2ChainConfig
286
305
  };
287
306
  }
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
307
  return config;
297
308
  }
298
309
  function getDefaultDataDir(networkName) {
299
310
  return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
300
311
  }
301
- export async function enrichEnvironmentWithChainConfig(networkName) {
312
+ export function enrichEnvironmentWithChainConfig(networkName) {
302
313
  if (networkName === 'local') {
303
314
  return;
304
315
  }
305
316
  enrichVar('DATA_DIRECTORY', getDefaultDataDir(networkName));
306
- const cacheDir = process.env.DATA_DIRECTORY ? join(process.env.DATA_DIRECTORY, 'cache') : undefined;
307
- const config = await getL2ChainConfig(networkName, cacheDir);
317
+ const config = getL2ChainConfig(networkName);
308
318
  if (!config) {
309
319
  throw new Error(`Unknown network name: ${networkName}`);
310
320
  }
@@ -324,6 +334,12 @@ export async function enrichEnvironmentWithChainConfig(networkName) {
324
334
  enrichVar('NOTE_HASH_TREE_MAP_SIZE_KB', config.noteHashTreeMapSizeKb.toString());
325
335
  enrichVar('NULLIFIER_TREE_MAP_SIZE_KB', config.nullifierTreeMapSizeKb.toString());
326
336
  enrichVar('PUBLIC_DATA_TREE_MAP_SIZE_KB', config.publicDataTreeMapSizeKb.toString());
337
+ if (config.skipArchiverInitialSync !== undefined) {
338
+ enrichVar('SKIP_ARCHIVER_INITIAL_SYNC', config.skipArchiverInitialSync.toString());
339
+ }
340
+ if (config.blobAllowEmptySources !== undefined) {
341
+ enrichVar('BLOB_ALLOW_EMPTY_SOURCES', config.blobAllowEmptySources.toString());
342
+ }
327
343
  if (config.autoUpdate) {
328
344
  enrichVar('AUTO_UPDATE', config.autoUpdate?.toString());
329
345
  }
@@ -378,4 +394,5 @@ export async function enrichEnvironmentWithChainConfig(networkName) {
378
394
  enrichVar('SLASH_OFFENSE_EXPIRATION_ROUNDS', config.slashOffenseExpirationRounds.toString());
379
395
  enrichVar('SLASH_MAX_PAYLOAD_SIZE', config.slashMaxPayloadSize.toString());
380
396
  enrichVar('SENTINEL_ENABLED', config.sentinelEnabled.toString());
397
+ enrichVar('TRANSACTIONS_DISABLED', config.disableTransactions.toString());
381
398
  }
@@ -19,7 +19,7 @@ export declare function getFunctionAbi(artifact: ContractArtifact, fnName: strin
19
19
  * @param mnemonic - The mnemonic to be used in contract deployment.
20
20
  */
21
21
  export declare function deployAztecContracts(rpcUrls: string[], chainId: number, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, salt: number | undefined, initialValidators: Operator[], genesisArchiveRoot: Fr, feeJuicePortalInitialBalance: bigint, acceleratedTestDeployments: boolean, config: L1ContractsConfig, existingToken: EthAddress | undefined, realVerifier: boolean, createVerificationJson: string | false, debugLogger: Logger): Promise<DeployL1ContractsReturnType>;
22
- export declare function deployNewRollupContracts(registryAddress: EthAddress, rpcUrls: string[], chainId: number, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, salt: number | undefined, initialValidators: Operator[], genesisArchiveRoot: Fr, feeJuicePortalInitialBalance: bigint, config: L1ContractsConfig, realVerifier: boolean, logger: Logger): Promise<{
22
+ export declare function deployNewRollupContracts(registryAddress: EthAddress, rpcUrls: string[], chainId: number, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, salt: number | undefined, initialValidators: Operator[], genesisArchiveRoot: Fr, feeJuicePortalInitialBalance: bigint, config: L1ContractsConfig, realVerifier: boolean, createVerificationJson: string | false, logger: Logger): Promise<{
23
23
  rollup: RollupContract;
24
24
  slashFactoryAddress: EthAddress;
25
25
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"aztec.d.ts","sourceRoot":"","sources":["../../src/utils/aztec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAIjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,cAAc,EACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAShE;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EA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AAM,eAAe,GAAI,KAAK,MAAM,KAAG,MAK7C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,KAAG,KAAK,MAAM,EAKtD,CAAC;AAOF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAUtE;AAKD;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,iBAyB9E"}
@@ -47,7 +47,7 @@ import { encodeArgs } from './encoding.js';
47
47
  }, config, createVerificationJson);
48
48
  return result;
49
49
  }
50
- export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, config, realVerifier, logger) {
50
+ export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, config, realVerifier, createVerificationJson, logger) {
51
51
  const { createEthereumChain, deployRollupForUpgrade, createExtendedL1Client } = await import('@aztec/ethereum');
52
52
  const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
53
53
  const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
@@ -81,7 +81,7 @@ export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId
81
81
  feeJuicePortalInitialBalance,
82
82
  realVerifier,
83
83
  ...config
84
- }, registryAddress, logger, config);
84
+ }, registryAddress, logger, config, createVerificationJson);
85
85
  return {
86
86
  rollup,
87
87
  slashFactoryAddress
@@ -35,6 +35,15 @@ export declare function atomicUpdateFile(filePath: string, contents: string): Pr
35
35
  * @returns An Aztec address. Will throw if one can't be found in either options.
36
36
  */
37
37
  export declare function getTxSender(pxe: PXE, _from?: string): Promise<AztecAddress>;
38
+ /**
39
+ * Parses and validates a hex string. Removes leading 0x if present, checks for hex validity,
40
+ * and enforces an optional minimum length.
41
+ * @param hex - The hex string to validate.
42
+ * @param minLen - Optional minimum length (in hex characters, after stripping '0x').
43
+ * @returns The normalized hex string (without leading 0x).
44
+ * @throws InvalidArgumentError if the string is not valid hex or does not meet the minimum length.
45
+ */
46
+ export declare function parseHex(hex: string, minLen?: number): `0x${string}`;
38
47
  export declare function parseBigint(bigint: string): bigint | undefined;
39
48
  /**
40
49
  * Parses a hex encoded string to an Fr integer
@@ -84,7 +93,7 @@ export declare function parseOptionalSelector(selector: string): FunctionSelecto
84
93
  * @returns The parsed integer, or undefined if the input string is falsy.
85
94
  * @throws If the input is not a valid integer.
86
95
  */
87
- export declare function parseOptionalInteger(value: string): number | undefined;
96
+ export declare function parseOptionalInteger(value: string, min?: number, max?: number): number | undefined;
88
97
  /**
89
98
  * Parses a TxHash from a string.
90
99
  * @param txHash - A transaction hash