@aztec/cli 0.0.1-commit.b655e406 → 0.0.1-commit.c7c42ec

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 (158) hide show
  1. package/README.md +1 -1
  2. package/dest/cmds/aztec_node/block_number.d.ts +1 -1
  3. package/dest/cmds/aztec_node/get_block.d.ts +1 -1
  4. package/dest/cmds/aztec_node/get_block.d.ts.map +1 -1
  5. package/dest/cmds/aztec_node/get_block.js +2 -1
  6. package/dest/cmds/aztec_node/get_current_base_fee.d.ts +1 -1
  7. package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.d.ts +1 -1
  8. package/dest/cmds/aztec_node/get_logs.d.ts +3 -2
  9. package/dest/cmds/aztec_node/get_logs.d.ts.map +1 -1
  10. package/dest/cmds/aztec_node/get_node_info.d.ts +1 -1
  11. package/dest/cmds/aztec_node/index.d.ts +1 -1
  12. package/dest/cmds/contracts/index.d.ts +1 -1
  13. package/dest/cmds/contracts/inspect_contract.d.ts +1 -1
  14. package/dest/cmds/contracts/inspect_contract.d.ts.map +1 -1
  15. package/dest/cmds/contracts/inspect_contract.js +4 -10
  16. package/dest/cmds/contracts/parse_parameter_struct.d.ts +1 -1
  17. package/dest/cmds/infrastructure/index.d.ts +1 -1
  18. package/dest/cmds/infrastructure/index.d.ts.map +1 -1
  19. package/dest/cmds/infrastructure/index.js +0 -1
  20. package/dest/cmds/infrastructure/sequencers.d.ts +1 -2
  21. package/dest/cmds/infrastructure/sequencers.d.ts.map +1 -1
  22. package/dest/cmds/infrastructure/sequencers.js +9 -3
  23. package/dest/cmds/infrastructure/setup_l2_contract.d.ts +1 -1
  24. package/dest/cmds/l1/advance_epoch.d.ts +1 -1
  25. package/dest/cmds/l1/assume_proven_through.d.ts +1 -1
  26. package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -1
  27. package/dest/cmds/l1/assume_proven_through.js +2 -1
  28. package/dest/cmds/l1/bridge_erc20.d.ts +1 -1
  29. package/dest/cmds/l1/bridge_erc20.d.ts.map +1 -1
  30. package/dest/cmds/l1/bridge_erc20.js +2 -1
  31. package/dest/cmds/l1/create_l1_account.d.ts +1 -1
  32. package/dest/cmds/l1/deploy_l1_contracts_cmd.d.ts +4 -0
  33. package/dest/cmds/l1/deploy_l1_contracts_cmd.d.ts.map +1 -0
  34. package/dest/cmds/l1/{deploy_l1_contracts.js → deploy_l1_contracts_cmd.js} +39 -4
  35. package/dest/cmds/l1/deploy_new_rollup.d.ts +4 -4
  36. package/dest/cmds/l1/deploy_new_rollup.d.ts.map +1 -1
  37. package/dest/cmds/l1/deploy_new_rollup.js +3 -3
  38. package/dest/cmds/l1/get_l1_addresses.d.ts +1 -1
  39. package/dest/cmds/l1/get_l1_addresses.d.ts.map +1 -1
  40. package/dest/cmds/l1/get_l1_addresses.js +5 -2
  41. package/dest/cmds/l1/get_l1_balance.d.ts +1 -1
  42. package/dest/cmds/l1/get_l1_balance.js +4 -2
  43. package/dest/cmds/l1/governance_utils.d.ts +5 -5
  44. package/dest/cmds/l1/governance_utils.d.ts.map +1 -1
  45. package/dest/cmds/l1/governance_utils.js +3 -1
  46. package/dest/cmds/l1/index.d.ts +1 -2
  47. package/dest/cmds/l1/index.d.ts.map +1 -1
  48. package/dest/cmds/l1/index.js +10 -8
  49. package/dest/cmds/l1/prover_stats.d.ts +1 -1
  50. package/dest/cmds/l1/prover_stats.d.ts.map +1 -1
  51. package/dest/cmds/l1/prover_stats.js +32 -30
  52. package/dest/cmds/l1/trigger_seed_snapshot.d.ts +2 -2
  53. package/dest/cmds/l1/trigger_seed_snapshot.d.ts.map +1 -1
  54. package/dest/cmds/l1/trigger_seed_snapshot.js +2 -1
  55. package/dest/cmds/l1/update_l1_validators.d.ts +6 -6
  56. package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
  57. package/dest/cmds/l1/update_l1_validators.js +7 -3
  58. package/dest/cmds/misc/compute_selector.d.ts +1 -1
  59. package/dest/cmds/misc/example_contracts.d.ts +1 -1
  60. package/dest/cmds/misc/generate_bootnode_enr.d.ts +1 -1
  61. package/dest/cmds/misc/generate_p2p_private_key.d.ts +1 -1
  62. package/dest/cmds/misc/generate_secret_and_hash.d.ts +1 -1
  63. package/dest/cmds/misc/generate_secret_and_hash.js +1 -1
  64. package/dest/cmds/misc/generate_secret_key.d.ts +1 -1
  65. package/dest/cmds/misc/get_canonical_sponsored_fpc_address.d.ts +1 -1
  66. package/dest/cmds/misc/index.d.ts +1 -1
  67. package/dest/cmds/misc/index.d.ts.map +1 -1
  68. package/dest/cmds/misc/index.js +1 -1
  69. package/dest/cmds/misc/update/common.d.ts +1 -1
  70. package/dest/cmds/misc/update/github.d.ts +1 -1
  71. package/dest/cmds/misc/update/noir.d.ts +1 -1
  72. package/dest/cmds/misc/update/npm.d.ts +1 -1
  73. package/dest/cmds/misc/update/npm.js +1 -1
  74. package/dest/cmds/misc/update/utils.d.ts +1 -1
  75. package/dest/cmds/misc/update.d.ts +1 -1
  76. package/dest/cmds/validator_keys/add.d.ts +1 -1
  77. package/dest/cmds/validator_keys/add.d.ts.map +1 -1
  78. package/dest/cmds/validator_keys/add.js +20 -7
  79. package/dest/cmds/validator_keys/generate_bls_keypair.d.ts +1 -1
  80. package/dest/cmds/validator_keys/generate_bls_keypair.d.ts.map +1 -1
  81. package/dest/cmds/validator_keys/generate_bls_keypair.js +3 -2
  82. package/dest/cmds/validator_keys/index.d.ts +1 -1
  83. package/dest/cmds/validator_keys/index.d.ts.map +1 -1
  84. package/dest/cmds/validator_keys/index.js +16 -4
  85. package/dest/cmds/validator_keys/new.d.ts +7 -4
  86. package/dest/cmds/validator_keys/new.d.ts.map +1 -1
  87. package/dest/cmds/validator_keys/new.js +90 -16
  88. package/dest/cmds/validator_keys/shared.d.ts +4 -4
  89. package/dest/cmds/validator_keys/shared.d.ts.map +1 -1
  90. package/dest/cmds/validator_keys/shared.js +31 -28
  91. package/dest/cmds/validator_keys/staker.d.ts +38 -0
  92. package/dest/cmds/validator_keys/staker.d.ts.map +1 -0
  93. package/dest/cmds/validator_keys/staker.js +210 -0
  94. package/dest/cmds/validator_keys/utils.d.ts +25 -0
  95. package/dest/cmds/validator_keys/utils.d.ts.map +1 -0
  96. package/dest/cmds/validator_keys/utils.js +52 -0
  97. package/dest/config/cached_fetch.d.ts +1 -1
  98. package/dest/config/chain_l2_config.d.ts +13 -11
  99. package/dest/config/chain_l2_config.d.ts.map +1 -1
  100. package/dest/config/chain_l2_config.js +110 -61
  101. package/dest/config/enrich_env.d.ts +1 -1
  102. package/dest/config/get_l1_config.d.ts +3 -2
  103. package/dest/config/get_l1_config.d.ts.map +1 -1
  104. package/dest/config/get_l1_config.js +3 -1
  105. package/dest/config/index.d.ts +1 -1
  106. package/dest/config/network_config.d.ts +6 -3
  107. package/dest/config/network_config.d.ts.map +1 -1
  108. package/dest/config/network_config.js +64 -28
  109. package/dest/utils/aztec.d.ts +7 -13
  110. package/dest/utils/aztec.d.ts.map +1 -1
  111. package/dest/utils/aztec.js +19 -40
  112. package/dest/utils/commands.d.ts +8 -7
  113. package/dest/utils/commands.d.ts.map +1 -1
  114. package/dest/utils/commands.js +6 -5
  115. package/dest/utils/encoding.d.ts +1 -1
  116. package/dest/utils/encoding.js +1 -1
  117. package/dest/utils/github.d.ts +1 -1
  118. package/dest/utils/index.d.ts +1 -1
  119. package/dest/utils/inspect.d.ts +3 -2
  120. package/dest/utils/inspect.d.ts.map +1 -1
  121. package/dest/utils/setup_contracts.d.ts +1 -1
  122. package/package.json +38 -30
  123. package/public_include_metric_prefixes.json +1 -0
  124. package/src/cmds/aztec_node/get_block.ts +2 -1
  125. package/src/cmds/aztec_node/get_logs.ts +3 -2
  126. package/src/cmds/contracts/inspect_contract.ts +4 -11
  127. package/src/cmds/infrastructure/index.ts +0 -1
  128. package/src/cmds/infrastructure/sequencers.ts +5 -4
  129. package/src/cmds/l1/assume_proven_through.ts +4 -1
  130. package/src/cmds/l1/bridge_erc20.ts +2 -1
  131. package/src/cmds/l1/{deploy_l1_contracts.ts → deploy_l1_contracts_cmd.ts} +39 -22
  132. package/src/cmds/l1/deploy_new_rollup.ts +4 -9
  133. package/src/cmds/l1/get_l1_addresses.ts +4 -2
  134. package/src/cmds/l1/get_l1_balance.ts +2 -2
  135. package/src/cmds/l1/governance_utils.ts +3 -8
  136. package/src/cmds/l1/index.ts +7 -17
  137. package/src/cmds/l1/prover_stats.ts +42 -31
  138. package/src/cmds/l1/trigger_seed_snapshot.ts +2 -1
  139. package/src/cmds/l1/update_l1_validators.ts +7 -12
  140. package/src/cmds/misc/generate_secret_and_hash.ts +1 -1
  141. package/src/cmds/misc/index.ts +1 -1
  142. package/src/cmds/misc/update/npm.ts +1 -1
  143. package/src/cmds/validator_keys/add.ts +20 -10
  144. package/src/cmds/validator_keys/generate_bls_keypair.ts +3 -2
  145. package/src/cmds/validator_keys/index.ts +67 -21
  146. package/src/cmds/validator_keys/new.ts +110 -23
  147. package/src/cmds/validator_keys/shared.ts +32 -27
  148. package/src/cmds/validator_keys/staker.ts +301 -0
  149. package/src/cmds/validator_keys/utils.ts +81 -0
  150. package/src/config/chain_l2_config.ts +139 -72
  151. package/src/config/get_l1_config.ts +4 -1
  152. package/src/config/network_config.ts +74 -29
  153. package/src/utils/aztec.ts +24 -83
  154. package/src/utils/commands.ts +6 -5
  155. package/src/utils/encoding.ts +1 -1
  156. package/src/utils/inspect.ts +2 -1
  157. package/dest/cmds/l1/deploy_l1_contracts.d.ts +0 -4
  158. package/dest/cmds/l1/deploy_l1_contracts.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { DefaultL1ContractsConfig } from '@aztec/ethereum';
1
+ import { DefaultL1ContractsConfig } from '@aztec/ethereum/config';
2
2
  import { EthAddress } from '@aztec/foundation/eth-address';
3
3
  import path from 'path';
4
4
  import publicIncludeMetrics from '../../public_include_metric_prefixes.json' with {
@@ -37,7 +37,7 @@ const DefaultSlashConfig = {
37
37
  slashExecuteRoundsLookBack: 4
38
38
  };
39
39
  const DefaultNetworkDBMapSizeConfig = {
40
- dbMapSizeKb: defaultDBMapSizeKb,
40
+ dataStoreMapSizeKb: defaultDBMapSizeKb,
41
41
  archiverStoreMapSizeKb: tbMapSizeKb,
42
42
  noteHashTreeMapSizeKb: tbMapSizeKb,
43
43
  nullifierTreeMapSizeKb: tbMapSizeKb,
@@ -49,26 +49,32 @@ export const stagingIgnitionL2ChainConfig = {
49
49
  sponsoredFPC: false,
50
50
  disableTransactions: true,
51
51
  p2pEnabled: true,
52
- p2pBootstrapNodes: [],
53
- seqMinTxsPerBlock: 0,
54
- seqMaxTxsPerBlock: 0,
52
+ bootstrapNodes: [],
53
+ minTxsPerBlock: 0,
54
+ maxTxsPerBlock: 0,
55
+ buildCheckpointIfEmpty: true,
55
56
  realProofs: true,
56
57
  snapshotsUrls: [
57
58
  `${SNAPSHOTS_URL}/staging-ignition/`
58
59
  ],
59
60
  autoUpdate: 'config-and-version',
60
61
  autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/staging-ignition.json',
61
- maxTxPoolSize: 100_000_000,
62
+ maxPendingTxCount: 0,
63
+ publicMetricsOptOut: false,
62
64
  publicIncludeMetrics,
63
65
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
64
66
  publicMetricsCollectFrom: [
65
67
  'sequencer'
66
68
  ],
69
+ txPoolDeleteTxsAfterReorg: false,
70
+ blobAllowEmptySources: true,
67
71
  /** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
68
72
  /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 72,
69
73
  /** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
70
74
  /** The target validator committee size. */ aztecTargetCommitteeSize: 24,
71
- /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochs: 2,
75
+ /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: 2,
76
+ /** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: 2,
77
+ /** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: 1,
72
78
  /** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
73
79
  /** How many sequencers must agree with a slash for it to be executed. */ slashingQuorum: 65,
74
80
  slashingRoundSizeInEpochs: 4,
@@ -114,27 +120,32 @@ export const stagingPublicL2ChainConfig = {
114
120
  sponsoredFPC: true,
115
121
  disableTransactions: false,
116
122
  p2pEnabled: true,
117
- p2pBootstrapNodes: [],
118
- seqMinTxsPerBlock: 0,
119
- seqMaxTxsPerBlock: 20,
123
+ bootstrapNodes: [],
124
+ minTxsPerBlock: 0,
125
+ maxTxsPerBlock: 20,
126
+ buildCheckpointIfEmpty: true,
120
127
  realProofs: true,
121
128
  snapshotsUrls: [
122
129
  `${SNAPSHOTS_URL}/staging-public/`
123
130
  ],
124
131
  autoUpdate: 'config-and-version',
125
132
  autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/staging-public.json',
133
+ publicMetricsOptOut: false,
126
134
  publicIncludeMetrics,
127
135
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
128
136
  publicMetricsCollectFrom: [
129
137
  'sequencer'
130
138
  ],
131
- maxTxPoolSize: 100_000_000,
139
+ maxPendingTxCount: 1_000,
140
+ txPoolDeleteTxsAfterReorg: true,
132
141
  // Deployment stuff
133
142
  /** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
134
143
  /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 36,
135
144
  /** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
136
145
  /** The target validator committee size. */ aztecTargetCommitteeSize: 48,
137
- /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochs: DefaultL1ContractsConfig.lagInEpochs,
146
+ /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: DefaultL1ContractsConfig.lagInEpochsForValidatorSet,
147
+ /** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: DefaultL1ContractsConfig.lagInEpochsForRandao,
148
+ /** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: DefaultL1ContractsConfig.inboxLag,
138
149
  /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
139
150
  /** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
140
151
  /** The deposit amount for a validator */ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
@@ -153,25 +164,30 @@ export const nextNetL2ChainConfig = {
153
164
  sponsoredFPC: true,
154
165
  p2pEnabled: true,
155
166
  disableTransactions: false,
156
- p2pBootstrapNodes: [],
157
- seqMinTxsPerBlock: 0,
158
- seqMaxTxsPerBlock: 8,
167
+ bootstrapNodes: [],
168
+ minTxsPerBlock: 0,
169
+ maxTxsPerBlock: 8,
170
+ buildCheckpointIfEmpty: true,
159
171
  realProofs: true,
160
172
  snapshotsUrls: [],
161
173
  autoUpdate: 'config-and-version',
162
174
  autoUpdateUrl: '',
175
+ publicMetricsOptOut: true,
163
176
  publicIncludeMetrics,
164
177
  publicMetricsCollectorUrl: '',
165
178
  publicMetricsCollectFrom: [
166
179
  ''
167
180
  ],
168
- maxTxPoolSize: 100_000_000,
181
+ maxPendingTxCount: 1_000,
182
+ txPoolDeleteTxsAfterReorg: false,
169
183
  // Deployment stuff
170
184
  /** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
171
185
  /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 36,
172
186
  /** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
173
187
  /** The target validator committee size. */ aztecTargetCommitteeSize: 48,
174
- /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochs: DefaultL1ContractsConfig.lagInEpochs,
188
+ /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: DefaultL1ContractsConfig.lagInEpochsForValidatorSet,
189
+ /** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: DefaultL1ContractsConfig.lagInEpochsForRandao,
190
+ /** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: DefaultL1ContractsConfig.inboxLag,
175
191
  /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
176
192
  /** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
177
193
  /** The deposit amount for a validator */ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
@@ -190,59 +206,64 @@ export const testnetL2ChainConfig = {
190
206
  sponsoredFPC: true,
191
207
  p2pEnabled: true,
192
208
  disableTransactions: true,
193
- p2pBootstrapNodes: [],
194
- seqMinTxsPerBlock: 0,
195
- seqMaxTxsPerBlock: 0,
209
+ bootstrapNodes: [],
210
+ minTxsPerBlock: 0,
211
+ maxTxsPerBlock: 20,
212
+ buildCheckpointIfEmpty: true,
196
213
  realProofs: true,
197
214
  snapshotsUrls: [
198
215
  `${SNAPSHOTS_URL}/testnet/`
199
216
  ],
200
217
  autoUpdate: 'config-and-version',
201
218
  autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/testnet.json',
202
- maxTxPoolSize: 100_000_000,
219
+ maxPendingTxCount: 5_000,
220
+ publicMetricsOptOut: false,
203
221
  publicIncludeMetrics,
204
222
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
205
223
  publicMetricsCollectFrom: [
206
224
  'sequencer'
207
225
  ],
226
+ txPoolDeleteTxsAfterReorg: true,
208
227
  skipArchiverInitialSync: true,
209
228
  blobAllowEmptySources: true,
210
229
  /** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
211
230
  /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 72,
212
231
  /** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
213
- /** The target validator committee size. */ aztecTargetCommitteeSize: 24,
214
- /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochs: 2,
232
+ /** The target validator committee size. */ aztecTargetCommitteeSize: 48,
233
+ /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: 2,
234
+ /** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: 2,
235
+ /** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: 1,
215
236
  /** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
216
- // This is a diff from mainnet: we have 2-strikes you're out, rather than 3 on mainnet.
217
- localEjectionThreshold: 198_000n * 10n ** 18n,
218
- /** How many sequencers must agree with a slash for it to be executed. */ slashingQuorum: 65,
219
- slashingRoundSizeInEpochs: 4,
220
- slashingExecutionDelayInRounds: 28,
221
- slashingLifetimeInRounds: 34,
222
- slashingVetoer: EthAddress.fromString('0xBbB4aF368d02827945748b28CD4b2D42e4A37480'),
237
+ // This is a diff from mainnet: we have 1-strike you're out, rather than 3 on mainnet.
238
+ localEjectionThreshold: 199_000n * 10n ** 18n,
239
+ /** How many sequencers must agree with a slash for it to be executed. */ slashingQuorum: 33,
240
+ slashingRoundSizeInEpochs: 2,
241
+ slashingExecutionDelayInRounds: 2,
242
+ slashingLifetimeInRounds: 5,
243
+ slashingVetoer: EthAddress.fromString('0xdfe19Da6a717b7088621d8bBB66be59F2d78e924'),
223
244
  slashingOffsetInRounds: 2,
224
- slashingDisableDuration: 259_200,
245
+ slashingDisableDuration: 5 * 24 * 60 * 60,
225
246
  slasherFlavor: 'tally',
226
- slashAmountSmall: 2_000n * 10n ** 18n,
227
- slashAmountMedium: 2_000n * 10n ** 18n,
228
- slashAmountLarge: 2_000n * 10n ** 18n,
229
- /** The mana target for the rollup */ manaTarget: 0n,
230
- /** The proving cost per mana */ provingCostPerMana: 0n,
247
+ slashAmountSmall: 10_000n * 10n ** 18n,
248
+ slashAmountMedium: 50_000n * 10n ** 18n,
249
+ slashAmountLarge: 200_000n * 10n ** 18n,
250
+ /** The mana target for the rollup */ manaTarget: 150_000_000n,
251
+ /** The proving cost per mana */ provingCostPerMana: 100n,
231
252
  exitDelaySeconds: 4 * 24 * 60 * 60,
232
253
  activationThreshold: 200_000n * 10n ** 18n,
233
254
  ejectionThreshold: 100_000n * 10n ** 18n,
234
- governanceProposerRoundSize: 300,
235
- governanceProposerQuorum: 151,
255
+ governanceProposerRoundSize: 100,
256
+ governanceProposerQuorum: 60,
236
257
  // Node slashing config
237
258
  slashInactivityTargetPercentage: 0.8,
238
259
  slashInactivityConsecutiveEpochThreshold: 2,
239
- slashInactivityPenalty: 2_000n * 10n ** 18n,
260
+ slashInactivityPenalty: 10_000n * 10n ** 18n,
240
261
  slashPrunePenalty: 0n,
241
262
  slashDataWithholdingPenalty: 0n,
242
- slashProposeInvalidAttestationsPenalty: 2_000n * 10n ** 18n,
243
- slashAttestDescendantOfInvalidPenalty: 2_000n * 10n ** 18n,
244
- slashUnknownPenalty: 2_000n * 10n ** 18n,
245
- slashBroadcastedInvalidBlockPenalty: 2_000n * 10n ** 18n,
263
+ slashProposeInvalidAttestationsPenalty: 10_000n * 10n ** 18n,
264
+ slashAttestDescendantOfInvalidPenalty: 10_000n * 10n ** 18n,
265
+ slashUnknownPenalty: 10_000n * 10n ** 18n,
266
+ slashBroadcastedInvalidBlockPenalty: 10_000n * 10n ** 18n,
246
267
  slashGracePeriodL2Slots: 1_200,
247
268
  slashOffenseExpirationRounds: 8,
248
269
  slashMinPenaltyPercentage: 0.5,
@@ -253,38 +274,44 @@ export const testnetL2ChainConfig = {
253
274
  ...DefaultNetworkDBMapSizeConfig
254
275
  };
255
276
  export const mainnetL2ChainConfig = {
277
+ txPoolDeleteTxsAfterReorg: true,
278
+ disableTransactions: true,
256
279
  l1ChainId: 1,
257
280
  testAccounts: false,
258
281
  sponsoredFPC: false,
259
282
  p2pEnabled: true,
260
- disableTransactions: true,
261
- p2pBootstrapNodes: [],
262
- seqMinTxsPerBlock: 0,
263
- seqMaxTxsPerBlock: 0,
283
+ bootstrapNodes: [],
284
+ minTxsPerBlock: 0,
285
+ maxTxsPerBlock: 0,
286
+ buildCheckpointIfEmpty: true,
264
287
  realProofs: true,
265
288
  snapshotsUrls: [
266
289
  `${SNAPSHOTS_URL}/mainnet/`
267
290
  ],
268
291
  autoUpdate: 'notify',
269
292
  autoUpdateUrl: 'https://storage.googleapis.com/aztec-mainnet/auto-update/mainnet.json',
270
- maxTxPoolSize: 100_000_000,
293
+ maxPendingTxCount: 0,
294
+ publicMetricsOptOut: true,
271
295
  publicIncludeMetrics,
272
296
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
273
297
  publicMetricsCollectFrom: [
274
298
  'sequencer'
275
299
  ],
300
+ blobAllowEmptySources: true,
276
301
  /** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
277
302
  /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 72,
278
303
  /** How many L2 slots an epoch lasts. */ aztecEpochDuration: 32,
279
304
  /** The target validator committee size. */ aztecTargetCommitteeSize: 24,
280
- /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochs: 2,
305
+ /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: 2,
306
+ /** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: 2,
307
+ /** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: 1,
281
308
  /** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
282
309
  localEjectionThreshold: 196_000n * 10n ** 18n,
283
310
  /** How many sequencers must agree with a slash for it to be executed. */ slashingQuorum: 65,
284
311
  slashingRoundSizeInEpochs: 4,
285
312
  slashingExecutionDelayInRounds: 28,
286
313
  slashingLifetimeInRounds: 34,
287
- slashingVetoer: EthAddress.ZERO,
314
+ slashingVetoer: EthAddress.fromString('0xBbB4aF368d02827945748b28CD4b2D42e4A37480'),
288
315
  slashingOffsetInRounds: 2,
289
316
  slashingDisableDuration: 259_200,
290
317
  slasherFlavor: 'tally',
@@ -323,25 +350,30 @@ export const devnetL2ChainConfig = {
323
350
  sponsoredFPC: true,
324
351
  p2pEnabled: true,
325
352
  disableTransactions: false,
326
- p2pBootstrapNodes: [],
327
- seqMinTxsPerBlock: 0,
328
- seqMaxTxsPerBlock: 8,
353
+ bootstrapNodes: [],
354
+ minTxsPerBlock: 0,
355
+ maxTxsPerBlock: 8,
356
+ buildCheckpointIfEmpty: true,
329
357
  realProofs: false,
330
358
  snapshotsUrls: [],
331
359
  autoUpdate: 'config-and-version',
332
360
  autoUpdateUrl: '',
361
+ publicMetricsOptOut: true,
333
362
  publicIncludeMetrics,
334
363
  publicMetricsCollectorUrl: '',
335
364
  publicMetricsCollectFrom: [
336
365
  ''
337
366
  ],
338
- maxTxPoolSize: 100_000_000,
367
+ maxPendingTxCount: 1_000,
368
+ txPoolDeleteTxsAfterReorg: true,
339
369
  // Deployment stuff
340
370
  /** How many seconds an L1 slot lasts. */ ethereumSlotDuration: 12,
341
371
  /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */ aztecSlotDuration: 36,
342
372
  /** How many L2 slots an epoch lasts. */ aztecEpochDuration: 8,
343
373
  /** The target validator committee size. */ aztecTargetCommitteeSize: 1,
344
- /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochs: 1,
374
+ /** The number of epochs to lag behind the current epoch for validator selection. */ lagInEpochsForValidatorSet: 1,
375
+ /** The number of epochs to lag behind the current epoch for randao selection. */ lagInEpochsForRandao: 1,
376
+ /** The number of checkpoints to lag in the inbox (prevents sequencer DOS attacks). */ inboxLag: DefaultL1ContractsConfig.inboxLag,
345
377
  /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
346
378
  /** The number of epochs after an epoch ends that proofs are still accepted. */ aztecProofSubmissionEpochs: 1,
347
379
  /** The deposit amount for a validator */ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
@@ -386,7 +418,7 @@ export function getL2ChainConfig(networkName) {
386
418
  function getDefaultDataDir(networkName) {
387
419
  return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
388
420
  }
389
- export function enrichEnvironmentWithChainConfig(networkName) {
421
+ export function enrichEnvironmentWithChainName(networkName) {
390
422
  if (networkName === 'local') {
391
423
  return;
392
424
  }
@@ -395,18 +427,28 @@ export function enrichEnvironmentWithChainConfig(networkName) {
395
427
  if (!config) {
396
428
  throw new Error(`Unknown network name: ${networkName}`);
397
429
  }
398
- enrichVar('BOOTSTRAP_NODES', config.p2pBootstrapNodes.join(','));
430
+ enrichEnvironmentWithChainConfig(config);
431
+ }
432
+ export function enrichEnvironmentWithChainConfig(config) {
433
+ enrichVar('BOOTSTRAP_NODES', config.bootstrapNodes.join(','));
399
434
  enrichVar('TEST_ACCOUNTS', config.testAccounts.toString());
400
435
  enrichVar('SPONSORED_FPC', config.sponsoredFPC.toString());
401
436
  enrichVar('P2P_ENABLED', config.p2pEnabled.toString());
402
437
  enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
403
- enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
404
- enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
438
+ enrichVar('SEQ_MIN_TX_PER_BLOCK', config.minTxsPerBlock.toString());
439
+ enrichVar('SEQ_MAX_TX_PER_BLOCK', config.maxTxsPerBlock.toString());
440
+ if (config.blockDurationMs !== undefined) {
441
+ enrichVar('SEQ_BLOCK_DURATION_MS', config.blockDurationMs.toString());
442
+ }
443
+ if (config.buildCheckpointIfEmpty !== undefined) {
444
+ enrichVar('SEQ_BUILD_CHECKPOINT_IF_EMPTY', config.buildCheckpointIfEmpty.toString());
445
+ }
405
446
  enrichVar('PROVER_REAL_PROOFS', config.realProofs.toString());
406
447
  enrichVar('PXE_PROVER_ENABLED', config.realProofs.toString());
407
448
  enrichVar('SYNC_SNAPSHOTS_URLS', config.snapshotsUrls.join(','));
408
- enrichVar('P2P_MAX_TX_POOL_SIZE', config.maxTxPoolSize.toString());
409
- enrichVar('DATA_STORE_MAP_SIZE_KB', config.dbMapSizeKb.toString());
449
+ enrichVar('P2P_MAX_PENDING_TX_COUNT', config.maxPendingTxCount.toString());
450
+ enrichVar('P2P_TX_POOL_DELETE_TXS_AFTER_REORG', config.txPoolDeleteTxsAfterReorg.toString());
451
+ enrichVar('DATA_STORE_MAP_SIZE_KB', config.dataStoreMapSizeKb.toString());
410
452
  enrichVar('ARCHIVER_STORE_MAP_SIZE_KB', config.archiverStoreMapSizeKb.toString());
411
453
  enrichVar('NOTE_HASH_TREE_MAP_SIZE_KB', config.noteHashTreeMapSizeKb.toString());
412
454
  enrichVar('NULLIFIER_TREE_MAP_SIZE_KB', config.nullifierTreeMapSizeKb.toString());
@@ -432,11 +474,15 @@ export function enrichEnvironmentWithChainConfig(networkName) {
432
474
  if (config.publicMetricsCollectFrom) {
433
475
  enrichVar('PUBLIC_OTEL_COLLECT_FROM', config.publicMetricsCollectFrom.join(','));
434
476
  }
477
+ enrichVar('PUBLIC_OTEL_OPT_OUT', config.publicMetricsOptOut.toString());
435
478
  // Deployment stuff
436
479
  enrichVar('ETHEREUM_SLOT_DURATION', config.ethereumSlotDuration.toString());
437
480
  enrichVar('AZTEC_SLOT_DURATION', config.aztecSlotDuration.toString());
438
481
  enrichVar('AZTEC_EPOCH_DURATION', config.aztecEpochDuration.toString());
439
482
  enrichVar('AZTEC_TARGET_COMMITTEE_SIZE', config.aztecTargetCommitteeSize.toString());
483
+ enrichVar('AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET', config.lagInEpochsForValidatorSet.toString());
484
+ enrichVar('AZTEC_LAG_IN_EPOCHS_FOR_RANDAO', config.lagInEpochsForRandao.toString());
485
+ enrichVar('AZTEC_INBOX_LAG', config.inboxLag.toString());
440
486
  enrichVar('AZTEC_PROOF_SUBMISSION_EPOCHS', config.aztecProofSubmissionEpochs.toString());
441
487
  enrichVar('AZTEC_ACTIVATION_THRESHOLD', config.activationThreshold.toString());
442
488
  enrichVar('AZTEC_EJECTION_THRESHOLD', config.ejectionThreshold.toString());
@@ -454,6 +500,7 @@ export function enrichEnvironmentWithChainConfig(networkName) {
454
500
  enrichVar('AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS', config.slashingExecutionDelayInRounds.toString());
455
501
  enrichVar('AZTEC_SLASHING_OFFSET_IN_ROUNDS', config.slashingOffsetInRounds.toString());
456
502
  enrichVar('AZTEC_SLASHER_FLAVOR', config.slasherFlavor);
503
+ enrichVar('AZTEC_SLASHING_DISABLE_DURATION', config.slashingDisableDuration.toString());
457
504
  enrichVar('AZTEC_EXIT_DELAY_SECONDS', config.exitDelaySeconds.toString());
458
505
  enrichEthAddressVar('AZTEC_SLASHING_VETOER', config.slashingVetoer.toString());
459
506
  // Slashing
@@ -470,6 +517,8 @@ export function enrichEnvironmentWithChainConfig(networkName) {
470
517
  enrichVar('SLASH_INVALID_BLOCK_PENALTY', config.slashBroadcastedInvalidBlockPenalty.toString());
471
518
  enrichVar('SLASH_OFFENSE_EXPIRATION_ROUNDS', config.slashOffenseExpirationRounds.toString());
472
519
  enrichVar('SLASH_MAX_PAYLOAD_SIZE', config.slashMaxPayloadSize.toString());
520
+ enrichVar('SLASH_GRACE_PERIOD_L2_SLOTS', config.slashGracePeriodL2Slots.toString());
521
+ enrichVar('SLASH_EXECUTE_ROUNDS_LOOK_BACK', config.slashExecuteRoundsLookBack.toString());
473
522
  enrichVar('SENTINEL_ENABLED', config.sentinelEnabled.toString());
474
523
  enrichVar('TRANSACTIONS_DISABLED', config.disableTransactions.toString());
475
524
  }
@@ -1,4 +1,4 @@
1
1
  import type { EnvVar } from '@aztec/foundation/config';
2
2
  export declare function enrichVar(envVar: EnvVar, value: string | undefined): void;
3
3
  export declare function enrichEthAddressVar(envVar: EnvVar, value: string): void;
4
- //# sourceMappingURL=enrich_env.d.ts.map
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5yaWNoX2Vudi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbmZpZy9lbnJpY2hfZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRXZELHdCQUFnQixTQUFTLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxHQUFHLFNBQVMsUUFNbEU7QUFFRCx3QkFBZ0IsbUJBQW1CLENBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsTUFBTSxRQUdoRSJ9
@@ -1,8 +1,9 @@
1
- import { type L1ContractAddresses, getL1ContractsConfig } from '@aztec/ethereum';
1
+ import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
2
+ import { getL1ContractsConfig } from '@aztec/ethereum/queries';
2
3
  import { EthAddress } from '@aztec/foundation/eth-address';
3
4
  export declare function getL1Config(registryAddress: EthAddress, l1RpcUrls: string[], l1ChainId: number, rollupVersion?: number | 'canonical'): Promise<{
4
5
  addresses: L1ContractAddresses;
5
6
  config: Awaited<ReturnType<typeof getL1ContractsConfig>>;
6
7
  }>;
7
8
  export declare function getL1RollupAddressFromEnv(l1RpcUrls: string[], l1ChainId: number): Promise<EthAddress>;
8
- //# sourceMappingURL=get_l1_config.d.ts.map
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0X2wxX2NvbmZpZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbmZpZy9nZXRfbDFfY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sdUNBQXVDLENBQUM7QUFDakYsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDL0QsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBRTNELHdCQUFzQixXQUFXLENBQy9CLGVBQWUsRUFBRSxVQUFVLEVBQzNCLFNBQVMsRUFBRSxNQUFNLEVBQUUsRUFDbkIsU0FBUyxFQUFFLE1BQU0sRUFDakIsYUFBYSxHQUFFLE1BQU0sR0FBRyxXQUF5QixHQUNoRCxPQUFPLENBQUM7SUFBRSxTQUFTLEVBQUUsbUJBQW1CLENBQUM7SUFBQyxNQUFNLEVBQUUsT0FBTyxDQUFDLFVBQVUsQ0FBQyxPQUFPLG9CQUFvQixDQUFDLENBQUMsQ0FBQTtDQUFFLENBQUMsQ0FVdkc7QUFFRCx3QkFBc0IseUJBQXlCLENBQUMsU0FBUyxFQUFFLE1BQU0sRUFBRSxFQUFFLFNBQVMsRUFBRSxNQUFNLHVCQU9yRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"get_l1_config.d.ts","sourceRoot":"","sources":["../../src/config/get_l1_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAoB,oBAAoB,EAAmB,MAAM,iBAAiB,CAAC;AACpH,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,wBAAsB,WAAW,CAC/B,eAAe,EAAE,UAAU,EAC3B,SAAS,EAAE,MAAM,EAAE,EACnB,SAAS,EAAE,MAAM,EACjB,aAAa,GAAE,MAAM,GAAG,WAAyB,GAChD,OAAO,CAAC;IAAE,SAAS,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAA;CAAE,CAAC,CAUvG;AAED,wBAAsB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,uBAOrF"}
1
+ {"version":3,"file":"get_l1_config.d.ts","sourceRoot":"","sources":["../../src/config/get_l1_config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,wBAAsB,WAAW,CAC/B,eAAe,EAAE,UAAU,EAC3B,SAAS,EAAE,MAAM,EAAE,EACnB,SAAS,EAAE,MAAM,EACjB,aAAa,GAAE,MAAM,GAAG,WAAyB,GAChD,OAAO,CAAC;IAAE,SAAS,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAA;CAAE,CAAC,CAUvG;AAED,wBAAsB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,uBAOrF"}
@@ -1,4 +1,6 @@
1
- import { RegistryContract, getL1ContractsConfig, getPublicClient } from '@aztec/ethereum';
1
+ import { getPublicClient } from '@aztec/ethereum/client';
2
+ import { RegistryContract } from '@aztec/ethereum/contracts';
3
+ import { getL1ContractsConfig } from '@aztec/ethereum/queries';
2
4
  import { EthAddress } from '@aztec/foundation/eth-address';
3
5
  export async function getL1Config(registryAddress, l1RpcUrls, l1ChainId, rollupVersion = 'canonical') {
4
6
  const publicClient = getPublicClient({
@@ -2,4 +2,4 @@ export * from './cached_fetch.js';
2
2
  export * from './chain_l2_config.js';
3
3
  export * from './get_l1_config.js';
4
4
  export * from './network_config.js';
5
- //# sourceMappingURL=index.d.ts.map
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb25maWcvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxxQkFBcUIsQ0FBQyJ9
@@ -1,11 +1,12 @@
1
1
  import { type NetworkConfig, type NetworkNames } from '@aztec/foundation/config';
2
2
  /**
3
3
  * Fetches remote network configuration from GitHub with caching support.
4
- * Uses the reusable cachedFetch utility.
4
+ * Uses the reusable cachedFetch utility. Falls back to metadata.aztec.network if the default URL fails.
5
5
  *
6
6
  * @param networkName - The network name to fetch config for
7
7
  * @param cacheDir - Optional cache directory for storing fetched config
8
- * @returns Remote configuration for the specified network, or undefined if not found/error
8
+ * @returns Remote configuration for the specified network, or undefined if network not found in config
9
+ * @throws Error if both primary and fallback URLs fail to fetch
9
10
  */
10
11
  export declare function getNetworkConfig(networkName: NetworkNames, cacheDir?: string): Promise<NetworkConfig | undefined>;
11
12
  /**
@@ -14,6 +15,8 @@ export declare function getNetworkConfig(networkName: NetworkNames, cacheDir?: s
14
15
  * from the remote config, following the same pattern as enrichEnvironmentWithChainConfig().
15
16
  *
16
17
  * @param networkName - The network name to fetch remote config for
18
+ * @throws Error if network config fetch fails (network errors, parse errors, etc.)
19
+ * Does not throw if the network simply doesn't exist in the config - just returns without enriching
17
20
  */
18
21
  export declare function enrichEnvironmentWithNetworkConfig(networkName: NetworkNames): Promise<void>;
19
- //# sourceMappingURL=network_config.d.ts.map
22
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29ya19jb25maWcuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb25maWcvbmV0d29ya19jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEtBQUssYUFBYSxFQUEwQixLQUFLLFlBQVksRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBYXpHOzs7Ozs7OztHQVFHO0FBQ0gsd0JBQXNCLGdCQUFnQixDQUNwQyxXQUFXLEVBQUUsWUFBWSxFQUN6QixRQUFRLENBQUMsRUFBRSxNQUFNLEdBQ2hCLE9BQU8sQ0FBQyxhQUFhLEdBQUcsU0FBUyxDQUFDLENBOEJwQztBQXVERDs7Ozs7Ozs7R0FRRztBQUNILHdCQUFzQixrQ0FBa0MsQ0FBQyxXQUFXLEVBQUUsWUFBWSxpQkEyQmpGIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"network_config.d.ts","sourceRoot":"","sources":["../../src/config/network_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAA0B,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAYzG;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,YAAY,EACzB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAiDpC;AAED;;;;;;GAMG;AACH,wBAAsB,kCAAkC,CAAC,WAAW,EAAE,YAAY,iBAoBjF"}
1
+ {"version":3,"file":"network_config.d.ts","sourceRoot":"","sources":["../../src/config/network_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAA0B,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAazG;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,YAAY,EACzB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CA8BpC;AAuDD;;;;;;;;GAQG;AACH,wBAAsB,kCAAkC,CAAC,WAAW,EAAE,YAAY,iBA2BjF"}
@@ -4,20 +4,52 @@ import { join } from 'path';
4
4
  import { cachedFetch } from './cached_fetch.js';
5
5
  import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
6
6
  const DEFAULT_CONFIG_URL = 'https://raw.githubusercontent.com/AztecProtocol/networks/refs/heads/main/network_config.json';
7
+ const FALLBACK_CONFIG_URL = 'https://metadata.aztec.network/network_config.json';
7
8
  const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
8
9
  /**
9
10
  * Fetches remote network configuration from GitHub with caching support.
10
- * Uses the reusable cachedFetch utility.
11
+ * Uses the reusable cachedFetch utility. Falls back to metadata.aztec.network if the default URL fails.
11
12
  *
12
13
  * @param networkName - The network name to fetch config for
13
14
  * @param cacheDir - Optional cache directory for storing fetched config
14
- * @returns Remote configuration for the specified network, or undefined if not found/error
15
+ * @returns Remote configuration for the specified network, or undefined if network not found in config
16
+ * @throws Error if both primary and fallback URLs fail to fetch
15
17
  */ export async function getNetworkConfig(networkName, cacheDir) {
16
- let url;
18
+ // Try with the primary URL (env var or default)
17
19
  const configLocation = process.env.NETWORK_CONFIG_LOCATION || DEFAULT_CONFIG_URL;
18
- if (!configLocation) {
19
- return undefined;
20
+ let primaryError;
21
+ let config;
22
+ // First try the primary config location
23
+ try {
24
+ config = await fetchNetworkConfigFromUrl(configLocation, networkName, cacheDir);
25
+ } catch (error) {
26
+ primaryError = error;
20
27
  }
28
+ // If primary fails and we were using the default URL, try the fallback
29
+ if (!config && configLocation === DEFAULT_CONFIG_URL) {
30
+ try {
31
+ config = await fetchNetworkConfigFromUrl(FALLBACK_CONFIG_URL, networkName, cacheDir);
32
+ } catch {
33
+ // Both failed - throw the primary error
34
+ if (primaryError) {
35
+ throw primaryError;
36
+ }
37
+ }
38
+ } else if (primaryError) {
39
+ // Primary failed and no fallback to try
40
+ throw primaryError;
41
+ }
42
+ return config;
43
+ }
44
+ /**
45
+ * Helper function to fetch network config from a specific URL.
46
+ * @param configLocation - The URL or file path to fetch from
47
+ * @param networkName - The network name to fetch config for
48
+ * @param cacheDir - Optional cache directory for storing fetched config
49
+ * @returns Remote configuration for the specified network, or undefined if network not found in config, or undefined if URL invalid
50
+ * @throws Error if fetch/parse fails
51
+ */ async function fetchNetworkConfigFromUrl(configLocation, networkName, cacheDir) {
52
+ let url;
21
53
  try {
22
54
  if (configLocation.includes('://')) {
23
55
  url = new URL(configLocation);
@@ -29,28 +61,24 @@ const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
29
61
  if (!url) {
30
62
  return undefined;
31
63
  }
32
- try {
33
- let rawConfig;
34
- if (url.protocol === 'http:' || url.protocol === 'https:') {
35
- rawConfig = await cachedFetch(url.href, {
36
- cacheDurationMs: NETWORK_CONFIG_CACHE_DURATION_MS,
37
- cacheFile: cacheDir ? join(cacheDir, networkName, 'network_config.json') : undefined
38
- });
39
- } else if (url.protocol === 'file:') {
40
- rawConfig = JSON.parse(await readFile(url.pathname, 'utf-8'));
41
- } else {
42
- throw new Error('Unsupported Aztec network config protocol: ' + url.href);
43
- }
44
- if (!rawConfig) {
45
- return undefined;
46
- }
47
- const networkConfigMap = NetworkConfigMapSchema.parse(rawConfig);
48
- if (networkName in networkConfigMap) {
49
- return networkConfigMap[networkName];
50
- } else {
51
- return undefined;
52
- }
53
- } catch {
64
+ let rawConfig;
65
+ if (url.protocol === 'http:' || url.protocol === 'https:') {
66
+ rawConfig = await cachedFetch(url.href, {
67
+ cacheDurationMs: NETWORK_CONFIG_CACHE_DURATION_MS,
68
+ cacheFile: cacheDir ? join(cacheDir, networkName, 'network_config.json') : undefined
69
+ });
70
+ } else if (url.protocol === 'file:') {
71
+ rawConfig = JSON.parse(await readFile(url.pathname, 'utf-8'));
72
+ } else {
73
+ throw new Error('Unsupported Aztec network config protocol: ' + url.href);
74
+ }
75
+ if (!rawConfig) {
76
+ return undefined;
77
+ }
78
+ const networkConfigMap = NetworkConfigMapSchema.parse(rawConfig);
79
+ if (networkName in networkConfigMap) {
80
+ return networkConfigMap[networkName];
81
+ } else {
54
82
  return undefined;
55
83
  }
56
84
  }
@@ -60,6 +88,8 @@ const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
60
88
  * from the remote config, following the same pattern as enrichEnvironmentWithChainConfig().
61
89
  *
62
90
  * @param networkName - The network name to fetch remote config for
91
+ * @throws Error if network config fetch fails (network errors, parse errors, etc.)
92
+ * Does not throw if the network simply doesn't exist in the config - just returns without enriching
63
93
  */ export async function enrichEnvironmentWithNetworkConfig(networkName) {
64
94
  if (networkName === 'local') {
65
95
  return; // No remote config for local development
@@ -67,7 +97,7 @@ const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
67
97
  const cacheDir = process.env.DATA_DIRECTORY ? join(process.env.DATA_DIRECTORY, 'cache') : undefined;
68
98
  const networkConfig = await getNetworkConfig(networkName, cacheDir);
69
99
  if (!networkConfig) {
70
- return;
100
+ return; // Network not found in config, continue without enriching
71
101
  }
72
102
  enrichVar('BOOTSTRAP_NODES', networkConfig.bootnodes.join(','));
73
103
  enrichVar('L1_CHAIN_ID', String(networkConfig.l1ChainId));
@@ -76,4 +106,10 @@ const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
76
106
  if (networkConfig.feeAssetHandlerAddress) {
77
107
  enrichEthAddressVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', networkConfig.feeAssetHandlerAddress.toString());
78
108
  }
109
+ if (networkConfig.blobFileStoreUrls?.length) {
110
+ enrichVar('BLOB_FILE_STORE_URLS', networkConfig.blobFileStoreUrls.join(','));
111
+ }
112
+ if (networkConfig.blockDurationMs !== undefined) {
113
+ enrichVar('SEQ_BLOCK_DURATION_MS', String(networkConfig.blockDurationMs));
114
+ }
79
115
  }
@@ -1,8 +1,10 @@
1
1
  import { type ContractArtifact, type FunctionAbi } from '@aztec/aztec.js/abi';
2
2
  import { EthAddress } from '@aztec/aztec.js/addresses';
3
- import { type DeployL1ContractsReturnType, type L1ContractsConfig, type Operator, RollupContract } from '@aztec/ethereum';
4
- import { Fr } from '@aztec/foundation/fields';
5
- import type { LogFn, Logger } from '@aztec/foundation/log';
3
+ import type { L1ContractsConfig } from '@aztec/ethereum/config';
4
+ import { RollupContract } from '@aztec/ethereum/contracts';
5
+ import type { Operator } from '@aztec/ethereum/deploy-aztec-l1-contracts';
6
+ import { Fr } from '@aztec/foundation/curves/bn254';
7
+ import { type LogFn } from '@aztec/foundation/log';
6
8
  import type { NoirPackageConfig } from '@aztec/foundation/noir';
7
9
  /**
8
10
  * Helper to get an ABI function or throw error if it doesn't exist.
@@ -11,15 +13,7 @@ import type { NoirPackageConfig } from '@aztec/foundation/noir';
11
13
  * @returns The function's ABI.
12
14
  */
13
15
  export declare function getFunctionAbi(artifact: ContractArtifact, fnName: string): FunctionAbi;
14
- /**
15
- * Function to execute the 'deployRollupContracts' command.
16
- * @param rpcUrls - The RPC URL of the ethereum node.
17
- * @param chainId - The chain ID of the L1 host.
18
- * @param privateKey - The private key to be used in contract deployment.
19
- * @param mnemonic - The mnemonic to be used in contract deployment.
20
- */
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, createVerificationJson: string | false, logger: Logger): Promise<{
16
+ export declare function deployNewRollupContracts(registryAddress: EthAddress, rpcUrls: string[], privateKey: string | undefined, chainId: number, mnemonic: string, mnemonicIndex: number, initialValidators: Operator[], genesisArchiveRoot: Fr, feeJuicePortalInitialBalance: bigint, config: L1ContractsConfig, realVerifier: boolean): Promise<{
23
17
  rollup: RollupContract;
24
18
  slashFactoryAddress: EthAddress;
25
19
  }>;
@@ -60,4 +54,4 @@ export declare const stripLeadingHex: (hex: string) => string;
60
54
  */
61
55
  export declare const addLeadingHex: (hex: string) => `0x${string}`;
62
56
  export declare function prettyPrintNargoToml(config: NoirPackageConfig): string;
63
- //# sourceMappingURL=aztec.d.ts.map
57
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXp0ZWMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9henRlYy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsS0FBSyxnQkFBZ0IsRUFDckIsS0FBSyxXQUFXLEVBSWpCLE1BQU0scUJBQXFCLENBQUM7QUFDN0IsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQ3ZELE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDaEUsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQzNELE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLDJDQUEyQyxDQUFDO0FBRTFFLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEVBQUUsS0FBSyxLQUFLLEVBQWdCLE1BQU0sdUJBQXVCLENBQUM7QUFDakUsT0FBTyxLQUFLLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQVdoRTs7Ozs7R0FLRztBQUNILHdCQUFnQixjQUFjLENBQUMsUUFBUSxFQUFFLGdCQUFnQixFQUFFLE1BQU0sRUFBRSxNQUFNLEdBQUcsV0FBVyxDQU10RjtBQUVELHdCQUFzQix3QkFBd0IsQ0FDNUMsZUFBZSxFQUFFLFVBQVUsRUFDM0IsT0FBTyxFQUFFLE1BQU0sRUFBRSxFQUNqQixVQUFVLEVBQUUsTUFBTSxHQUFHLFNBQVMsRUFDOUIsT0FBTyxFQUFFLE1BQU0sRUFDZixRQUFRLEVBQUUsTUFBTSxFQUNoQixhQUFhLEVBQUUsTUFBTSxFQUNyQixpQkFBaUIsRUFBRSxRQUFRLEVBQUUsRUFDN0Isa0JBQWtCLEVBQUUsRUFBRSxFQUN0Qiw0QkFBNEIsRUFBRSxNQUFNLEVBQ3BDLE1BQU0sRUFBRSxpQkFBaUIsRUFDekIsWUFBWSxFQUFFLE9BQU8sR0FDcEIsT0FBTyxDQUFDO0lBQUUsTUFBTSxFQUFFLGNBQWMsQ0FBQztJQUFDLG1CQUFtQixFQUFFLFVBQVUsQ0FBQTtDQUFFLENBQUMsQ0FnRHRFO0FBRUQ7OztHQUdHO0FBQ0gsd0JBQXNCLHVCQUF1QixJQUFJLE9BQU8sQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUtqRTtBQUVEOzs7O0dBSUc7QUFDSCx3QkFBc0IsbUJBQW1CLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxHQUFHLEVBQUUsS0FBSyw2QkE0QnBFO0FBRUQ7Ozs7Ozs7R0FPRztBQUNILHdCQUFzQixNQUFNLENBQUMsWUFBWSxFQUFFLE1BQU0sRUFBRSxZQUFZLEVBQUUsTUFBTSxFQUFFLGFBQWEsRUFBRSxNQUFNLEVBQUUsRUFBRSxHQUFHLEVBQUUsS0FBSzs7OztHQU8zRztBQUVEOzs7O0dBSUc7QUFDSCxlQUFPLE1BQU0sZUFBZSx5QkFLM0IsQ0FBQztBQUVGOzs7O0dBSUc7QUFDSCxlQUFPLE1BQU0sYUFBYSxnQ0FLekIsQ0FBQztBQU9GLHdCQUFnQixvQkFBb0IsQ0FBQyxNQUFNLEVBQUUsaUJBQWlCLEdBQUcsTUFBTSxDQVV0RSJ9