@aztec/cli 3.0.0-canary.a9708bd → 3.0.0-devnet.2

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 (173) hide show
  1. package/README.md +1 -427
  2. package/dest/cmds/aztec_node/block_number.d.ts +3 -0
  3. package/dest/cmds/aztec_node/block_number.d.ts.map +1 -0
  4. package/dest/cmds/aztec_node/block_number.js +10 -0
  5. package/dest/cmds/aztec_node/get_block.d.ts +3 -0
  6. package/dest/cmds/aztec_node/get_block.d.ts.map +1 -0
  7. package/dest/cmds/aztec_node/get_block.js +9 -0
  8. package/dest/cmds/aztec_node/get_current_base_fee.d.ts +3 -0
  9. package/dest/cmds/aztec_node/get_current_base_fee.d.ts.map +1 -0
  10. package/dest/cmds/aztec_node/get_current_base_fee.js +7 -0
  11. package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.d.ts +5 -0
  12. package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.d.ts.map +1 -0
  13. package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.js +12 -0
  14. package/dest/cmds/aztec_node/get_logs.d.ts +6 -0
  15. package/dest/cmds/aztec_node/get_logs.d.ts.map +1 -0
  16. package/dest/cmds/{pxe → aztec_node}/get_logs.js +4 -4
  17. package/dest/cmds/aztec_node/get_node_info.d.ts +3 -0
  18. package/dest/cmds/aztec_node/get_node_info.d.ts.map +1 -0
  19. package/dest/cmds/{pxe → aztec_node}/get_node_info.js +3 -8
  20. package/dest/cmds/aztec_node/index.d.ts.map +1 -0
  21. package/dest/cmds/aztec_node/index.js +28 -0
  22. package/dest/cmds/infrastructure/index.d.ts +2 -2
  23. package/dest/cmds/infrastructure/index.d.ts.map +1 -1
  24. package/dest/cmds/infrastructure/index.js +7 -8
  25. package/dest/cmds/infrastructure/sequencers.d.ts +2 -3
  26. package/dest/cmds/infrastructure/sequencers.d.ts.map +1 -1
  27. package/dest/cmds/infrastructure/sequencers.js +4 -3
  28. package/dest/cmds/infrastructure/setup_l2_contract.d.ts +1 -1
  29. package/dest/cmds/infrastructure/setup_l2_contract.d.ts.map +1 -1
  30. package/dest/cmds/infrastructure/setup_l2_contract.js +10 -25
  31. package/dest/cmds/l1/advance_epoch.d.ts +1 -1
  32. package/dest/cmds/l1/advance_epoch.d.ts.map +1 -1
  33. package/dest/cmds/l1/advance_epoch.js +6 -5
  34. package/dest/cmds/l1/assume_proven_through.d.ts +1 -1
  35. package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -1
  36. package/dest/cmds/l1/assume_proven_through.js +7 -6
  37. package/dest/cmds/l1/bridge_erc20.d.ts +1 -1
  38. package/dest/cmds/l1/bridge_erc20.d.ts.map +1 -1
  39. package/dest/cmds/l1/bridge_erc20.js +1 -1
  40. package/dest/cmds/l1/deploy_l1_contracts.d.ts +2 -2
  41. package/dest/cmds/l1/deploy_l1_contracts.d.ts.map +1 -1
  42. package/dest/cmds/l1/deploy_l1_contracts.js +5 -5
  43. package/dest/cmds/l1/deploy_new_rollup.d.ts +1 -1
  44. package/dest/cmds/l1/deploy_new_rollup.d.ts.map +1 -1
  45. package/dest/cmds/l1/deploy_new_rollup.js +4 -4
  46. package/dest/cmds/l1/get_l1_addresses.d.ts +1 -1
  47. package/dest/cmds/l1/get_l1_addresses.d.ts.map +1 -1
  48. package/dest/cmds/l1/index.d.ts.map +1 -1
  49. package/dest/cmds/l1/index.js +18 -34
  50. package/dest/cmds/l1/update_l1_validators.d.ts +5 -0
  51. package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
  52. package/dest/cmds/l1/update_l1_validators.js +67 -6
  53. package/dest/cmds/misc/generate_secret_and_hash.js +1 -1
  54. package/dest/cmds/misc/generate_secret_key.d.ts +1 -1
  55. package/dest/cmds/misc/generate_secret_key.d.ts.map +1 -1
  56. package/dest/cmds/misc/generate_secret_key.js +1 -1
  57. package/dest/config/cached_fetch.d.ts +18 -0
  58. package/dest/config/cached_fetch.d.ts.map +1 -0
  59. package/dest/config/cached_fetch.js +54 -0
  60. package/dest/config/chain_l2_config.d.ts +37 -0
  61. package/dest/config/chain_l2_config.d.ts.map +1 -0
  62. package/dest/config/chain_l2_config.js +444 -0
  63. package/dest/config/enrich_env.d.ts +4 -0
  64. package/dest/config/enrich_env.d.ts.map +1 -0
  65. package/dest/config/enrich_env.js +12 -0
  66. package/dest/config/get_l1_config.d.ts +8 -0
  67. package/dest/config/get_l1_config.d.ts.map +1 -0
  68. package/dest/config/get_l1_config.js +22 -0
  69. package/dest/config/index.d.ts +5 -0
  70. package/dest/config/index.d.ts.map +1 -0
  71. package/dest/config/index.js +4 -0
  72. package/dest/config/network_config.d.ts +19 -0
  73. package/dest/config/network_config.d.ts.map +1 -0
  74. package/dest/config/network_config.js +79 -0
  75. package/dest/utils/aztec.d.ts +3 -9
  76. package/dest/utils/aztec.d.ts.map +1 -1
  77. package/dest/utils/aztec.js +8 -32
  78. package/dest/utils/commands.d.ts +6 -7
  79. package/dest/utils/commands.d.ts.map +1 -1
  80. package/dest/utils/commands.js +5 -6
  81. package/dest/utils/inspect.d.ts +3 -10
  82. package/dest/utils/inspect.d.ts.map +1 -1
  83. package/dest/utils/inspect.js +13 -95
  84. package/dest/utils/setup_contracts.d.ts +1 -3
  85. package/dest/utils/setup_contracts.d.ts.map +1 -1
  86. package/dest/utils/setup_contracts.js +2 -22
  87. package/package.json +28 -25
  88. package/src/cmds/aztec_node/block_number.ts +9 -0
  89. package/src/cmds/aztec_node/get_block.ts +10 -0
  90. package/src/cmds/aztec_node/get_current_base_fee.ts +9 -0
  91. package/src/cmds/aztec_node/get_l1_to_l2_message_witness.ts +27 -0
  92. package/src/cmds/{pxe → aztec_node}/get_logs.ts +8 -7
  93. package/src/cmds/{pxe → aztec_node}/get_node_info.ts +5 -16
  94. package/src/cmds/aztec_node/index.ts +87 -0
  95. package/src/cmds/infrastructure/index.ts +7 -17
  96. package/src/cmds/infrastructure/sequencers.ts +6 -6
  97. package/src/cmds/infrastructure/setup_l2_contract.ts +13 -30
  98. package/src/cmds/l1/advance_epoch.ts +6 -5
  99. package/src/cmds/l1/assume_proven_through.ts +7 -6
  100. package/src/cmds/l1/bridge_erc20.ts +3 -1
  101. package/src/cmds/l1/deploy_l1_contracts.ts +6 -3
  102. package/src/cmds/l1/deploy_new_rollup.ts +4 -2
  103. package/src/cmds/l1/get_l1_addresses.ts +1 -1
  104. package/src/cmds/l1/index.ts +25 -53
  105. package/src/cmds/l1/update_l1_validators.ts +81 -6
  106. package/src/cmds/misc/generate_secret_and_hash.ts +1 -1
  107. package/src/cmds/misc/generate_secret_key.ts +1 -1
  108. package/src/config/cached_fetch.ts +67 -0
  109. package/src/config/chain_l2_config.ts +585 -0
  110. package/src/config/enrich_env.ts +15 -0
  111. package/src/config/get_l1_config.ts +28 -0
  112. package/src/config/index.ts +4 -0
  113. package/src/config/network_config.ts +102 -0
  114. package/src/utils/aztec.ts +8 -40
  115. package/src/utils/commands.ts +8 -10
  116. package/src/utils/inspect.ts +18 -111
  117. package/src/utils/setup_contracts.ts +4 -43
  118. package/dest/cmds/devnet/bootstrap_network.d.ts +0 -3
  119. package/dest/cmds/devnet/bootstrap_network.d.ts.map +0 -1
  120. package/dest/cmds/devnet/bootstrap_network.js +0 -216
  121. package/dest/cmds/devnet/faucet.d.ts +0 -4
  122. package/dest/cmds/devnet/faucet.d.ts.map +0 -1
  123. package/dest/cmds/devnet/faucet.js +0 -26
  124. package/dest/cmds/devnet/index.d.ts.map +0 -1
  125. package/dest/cmds/devnet/index.js +0 -14
  126. package/dest/cmds/pxe/add_contract.d.ts +0 -5
  127. package/dest/cmds/pxe/add_contract.d.ts.map +0 -1
  128. package/dest/cmds/pxe/add_contract.js +0 -29
  129. package/dest/cmds/pxe/block_number.d.ts +0 -3
  130. package/dest/cmds/pxe/block_number.d.ts.map +0 -1
  131. package/dest/cmds/pxe/block_number.js +0 -10
  132. package/dest/cmds/pxe/get_account.d.ts +0 -4
  133. package/dest/cmds/pxe/get_account.d.ts.map +0 -1
  134. package/dest/cmds/pxe/get_account.js +0 -10
  135. package/dest/cmds/pxe/get_accounts.d.ts +0 -3
  136. package/dest/cmds/pxe/get_accounts.d.ts.map +0 -1
  137. package/dest/cmds/pxe/get_accounts.js +0 -25
  138. package/dest/cmds/pxe/get_block.d.ts +0 -3
  139. package/dest/cmds/pxe/get_block.d.ts.map +0 -1
  140. package/dest/cmds/pxe/get_block.js +0 -9
  141. package/dest/cmds/pxe/get_contract_data.d.ts +0 -4
  142. package/dest/cmds/pxe/get_contract_data.d.ts.map +0 -1
  143. package/dest/cmds/pxe/get_contract_data.js +0 -31
  144. package/dest/cmds/pxe/get_current_base_fee.d.ts +0 -3
  145. package/dest/cmds/pxe/get_current_base_fee.d.ts.map +0 -1
  146. package/dest/cmds/pxe/get_current_base_fee.js +0 -7
  147. package/dest/cmds/pxe/get_l1_to_l2_message_witness.d.ts +0 -4
  148. package/dest/cmds/pxe/get_l1_to_l2_message_witness.d.ts.map +0 -1
  149. package/dest/cmds/pxe/get_l1_to_l2_message_witness.js +0 -11
  150. package/dest/cmds/pxe/get_logs.d.ts +0 -4
  151. package/dest/cmds/pxe/get_logs.d.ts.map +0 -1
  152. package/dest/cmds/pxe/get_node_info.d.ts +0 -3
  153. package/dest/cmds/pxe/get_node_info.d.ts.map +0 -1
  154. package/dest/cmds/pxe/get_pxe_info.d.ts +0 -3
  155. package/dest/cmds/pxe/get_pxe_info.d.ts.map +0 -1
  156. package/dest/cmds/pxe/get_pxe_info.js +0 -11
  157. package/dest/cmds/pxe/index.d.ts +0 -4
  158. package/dest/cmds/pxe/index.d.ts.map +0 -1
  159. package/dest/cmds/pxe/index.js +0 -55
  160. package/src/cmds/devnet/bootstrap_network.ts +0 -321
  161. package/src/cmds/devnet/faucet.ts +0 -33
  162. package/src/cmds/devnet/index.ts +0 -60
  163. package/src/cmds/pxe/add_contract.ts +0 -41
  164. package/src/cmds/pxe/block_number.ts +0 -9
  165. package/src/cmds/pxe/get_account.ts +0 -16
  166. package/src/cmds/pxe/get_accounts.ts +0 -35
  167. package/src/cmds/pxe/get_block.ts +0 -10
  168. package/src/cmds/pxe/get_contract_data.ts +0 -51
  169. package/src/cmds/pxe/get_current_base_fee.ts +0 -9
  170. package/src/cmds/pxe/get_l1_to_l2_message_witness.ts +0 -25
  171. package/src/cmds/pxe/get_pxe_info.ts +0 -13
  172. package/src/cmds/pxe/index.ts +0 -170
  173. /package/dest/cmds/{devnet → aztec_node}/index.d.ts +0 -0
@@ -0,0 +1,585 @@
1
+ import { DefaultL1ContractsConfig, type L1ContractsConfig } from '@aztec/ethereum';
2
+ import type { NetworkNames } from '@aztec/foundation/config';
3
+ import { EthAddress } from '@aztec/foundation/eth-address';
4
+ import type { SharedNodeConfig } from '@aztec/node-lib/config';
5
+ import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
6
+
7
+ import path from 'path';
8
+
9
+ import publicIncludeMetrics from '../../public_include_metric_prefixes.json' with { type: 'json' };
10
+ import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
11
+
12
+ const SNAPSHOTS_URL = 'https://aztec-labs-snapshots.com';
13
+
14
+ const defaultDBMapSizeKb = 128 * 1_024 * 1_024; // 128 GB
15
+ const tbMapSizeKb = 1_024 * 1_024 * 1_024; // 1 TB
16
+
17
+ export type L2ChainConfig = L1ContractsConfig &
18
+ Omit<SlasherConfig, 'slashValidatorsNever' | 'slashValidatorsAlways'> & {
19
+ l1ChainId: number;
20
+ testAccounts: boolean;
21
+ sponsoredFPC: boolean;
22
+ p2pEnabled: boolean;
23
+ p2pBootstrapNodes: string[];
24
+ seqMinTxsPerBlock: number;
25
+ seqMaxTxsPerBlock: number;
26
+ realProofs: boolean;
27
+ snapshotsUrls: string[];
28
+ autoUpdate: SharedNodeConfig['autoUpdate'];
29
+ autoUpdateUrl?: string;
30
+ maxTxPoolSize: number;
31
+ publicIncludeMetrics?: string[];
32
+ publicMetricsCollectorUrl?: string;
33
+ publicMetricsCollectFrom?: string[];
34
+
35
+ // Setting the dbMapSize provides the default for every DB in the node.
36
+ // Then we explicitly override the sizes for the archiver and the larger trees.
37
+ dbMapSizeKb: number;
38
+ archiverStoreMapSizeKb: number;
39
+ noteHashTreeMapSizeKb: number;
40
+ nullifierTreeMapSizeKb: number;
41
+ publicDataTreeMapSizeKb: number;
42
+
43
+ // Control whether sentinel is enabled or not. Needed for slashing
44
+ sentinelEnabled: boolean;
45
+ disableTransactions: boolean;
46
+ };
47
+
48
+ const DefaultSlashConfig = {
49
+ /** Tally-style slashing */
50
+ slasherFlavor: 'tally',
51
+ /** Allow one round for vetoing */
52
+ slashingExecutionDelayInRounds: 1,
53
+ /** How long for a slash payload to be executed */
54
+ slashingLifetimeInRounds: 5,
55
+ /** Allow 2 rounds to discover faults */
56
+ slashingOffsetInRounds: 2,
57
+ /** No slash vetoer */
58
+ slashingVetoer: EthAddress.ZERO,
59
+ /** Use default disable duration */
60
+ slashingDisableDuration: DefaultL1ContractsConfig.slashingDisableDuration,
61
+ /** Use default slash amounts */
62
+ slashAmountSmall: DefaultL1ContractsConfig.slashAmountSmall,
63
+ slashAmountMedium: DefaultL1ContractsConfig.slashAmountMedium,
64
+ slashAmountLarge: DefaultL1ContractsConfig.slashAmountLarge,
65
+
66
+ // Slashing stuff
67
+ slashMinPenaltyPercentage: 0.5,
68
+ slashMaxPenaltyPercentage: 2.0,
69
+ slashInactivityTargetPercentage: 0.7,
70
+ slashInactivityConsecutiveEpochThreshold: 1,
71
+ slashInactivityPenalty: DefaultL1ContractsConfig.slashAmountSmall,
72
+ slashPrunePenalty: DefaultL1ContractsConfig.slashAmountSmall,
73
+ slashDataWithholdingPenalty: DefaultL1ContractsConfig.slashAmountSmall,
74
+ slashProposeInvalidAttestationsPenalty: DefaultL1ContractsConfig.slashAmountLarge,
75
+ slashAttestDescendantOfInvalidPenalty: DefaultL1ContractsConfig.slashAmountLarge,
76
+ slashUnknownPenalty: DefaultL1ContractsConfig.slashAmountSmall,
77
+ slashBroadcastedInvalidBlockPenalty: 0n, // DefaultL1ContractsConfig.slashAmountSmall // Disabled until further testing
78
+ slashMaxPayloadSize: 50,
79
+ slashGracePeriodL2Slots: 32 * 2, // Two epochs from genesis
80
+ slashOffenseExpirationRounds: 8,
81
+ sentinelEnabled: true,
82
+ slashExecuteRoundsLookBack: 4,
83
+ } satisfies Partial<L2ChainConfig>;
84
+
85
+ const DefaultNetworkDBMapSizeConfig = {
86
+ dbMapSizeKb: defaultDBMapSizeKb,
87
+ archiverStoreMapSizeKb: tbMapSizeKb,
88
+ noteHashTreeMapSizeKb: tbMapSizeKb,
89
+ nullifierTreeMapSizeKb: tbMapSizeKb,
90
+ publicDataTreeMapSizeKb: tbMapSizeKb,
91
+ } satisfies Partial<L2ChainConfig>;
92
+
93
+ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
94
+ l1ChainId: 11155111,
95
+ testAccounts: false,
96
+ sponsoredFPC: false,
97
+ disableTransactions: true,
98
+ p2pEnabled: true,
99
+ p2pBootstrapNodes: [],
100
+ seqMinTxsPerBlock: 0,
101
+ seqMaxTxsPerBlock: 0,
102
+ realProofs: true,
103
+ snapshotsUrls: [`${SNAPSHOTS_URL}/staging-ignition/`],
104
+ autoUpdate: 'config-and-version',
105
+ autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/staging-ignition.json',
106
+ maxTxPoolSize: 100_000_000, // 100MB
107
+ publicIncludeMetrics,
108
+ publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
109
+ publicMetricsCollectFrom: ['sequencer'],
110
+
111
+ /** How many seconds an L1 slot lasts. */
112
+ ethereumSlotDuration: 12,
113
+ /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
114
+ aztecSlotDuration: 72,
115
+ /** How many L2 slots an epoch lasts. */
116
+ aztecEpochDuration: 32,
117
+ /** The target validator committee size. */
118
+ aztecTargetCommitteeSize: 24,
119
+ /** The number of epochs to lag behind the current epoch for validator selection. */
120
+ lagInEpochs: 2,
121
+ /** The number of epochs after an epoch ends that proofs are still accepted. */
122
+ aztecProofSubmissionEpochs: 1,
123
+ /** How many sequencers must agree with a slash for it to be executed. */
124
+ slashingQuorum: 65,
125
+
126
+ slashingRoundSizeInEpochs: 4,
127
+ slashingLifetimeInRounds: 40,
128
+ slashingExecutionDelayInRounds: 28,
129
+ slashAmountSmall: 2_000n * 10n ** 18n,
130
+ slashAmountMedium: 10_000n * 10n ** 18n,
131
+ slashAmountLarge: 50_000n * 10n ** 18n,
132
+ slashingOffsetInRounds: 2,
133
+ slasherFlavor: 'tally',
134
+ slashingVetoer: EthAddress.ZERO, // TODO TMNT-329
135
+
136
+ /** The mana target for the rollup */
137
+ manaTarget: 0n,
138
+
139
+ exitDelaySeconds: 5 * 24 * 60 * 60,
140
+
141
+ /** The proving cost per mana */
142
+ provingCostPerMana: 0n,
143
+ localEjectionThreshold: 196_000n * 10n ** 18n,
144
+
145
+ ejectionThreshold: 100_000n * 10n ** 18n,
146
+ activationThreshold: 200_000n * 10n ** 18n,
147
+
148
+ governanceProposerRoundSize: 300, // TODO TMNT-322
149
+ governanceProposerQuorum: 151, // TODO TMNT-322
150
+
151
+ // Node slashing config
152
+ // TODO TMNT-330
153
+ slashMinPenaltyPercentage: 0.5,
154
+ slashMaxPenaltyPercentage: 2.0,
155
+ slashInactivityTargetPercentage: 0.7,
156
+ slashInactivityConsecutiveEpochThreshold: 2,
157
+ slashInactivityPenalty: 2_000n * 10n ** 18n,
158
+ slashPrunePenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for prune offenses right now
159
+ slashDataWithholdingPenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for data withholding offenses right now
160
+ slashProposeInvalidAttestationsPenalty: 50_000n * 10n ** 18n,
161
+ slashAttestDescendantOfInvalidPenalty: 50_000n * 10n ** 18n,
162
+ slashUnknownPenalty: 2_000n * 10n ** 18n,
163
+ slashBroadcastedInvalidBlockPenalty: 0n, // 10_000n * 10n ** 18n, Disabled for now until further testing
164
+ slashMaxPayloadSize: 50,
165
+ slashGracePeriodL2Slots: 32 * 4, // One round from genesis
166
+ slashOffenseExpirationRounds: 8,
167
+ sentinelEnabled: true,
168
+ slashingDisableDuration: 5 * 24 * 60 * 60,
169
+ slashExecuteRoundsLookBack: 4,
170
+
171
+ ...DefaultNetworkDBMapSizeConfig,
172
+ };
173
+
174
+ export const stagingPublicL2ChainConfig: L2ChainConfig = {
175
+ l1ChainId: 11155111,
176
+ testAccounts: false,
177
+ sponsoredFPC: true,
178
+ disableTransactions: false,
179
+ p2pEnabled: true,
180
+ p2pBootstrapNodes: [],
181
+ seqMinTxsPerBlock: 0,
182
+ seqMaxTxsPerBlock: 20,
183
+ realProofs: true,
184
+ snapshotsUrls: [`${SNAPSHOTS_URL}/staging-public/`],
185
+ autoUpdate: 'config-and-version',
186
+ autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/staging-public.json',
187
+ publicIncludeMetrics,
188
+ publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
189
+ publicMetricsCollectFrom: ['sequencer'],
190
+ maxTxPoolSize: 100_000_000, // 100MB
191
+
192
+ // Deployment stuff
193
+ /** How many seconds an L1 slot lasts. */
194
+ ethereumSlotDuration: 12,
195
+ /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
196
+ aztecSlotDuration: 36,
197
+ /** How many L2 slots an epoch lasts. */
198
+ aztecEpochDuration: 32,
199
+ /** The target validator committee size. */
200
+ aztecTargetCommitteeSize: 48,
201
+ /** The number of epochs to lag behind the current epoch for validator selection. */
202
+ lagInEpochs: DefaultL1ContractsConfig.lagInEpochs,
203
+ /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
204
+ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
205
+ /** The number of epochs after an epoch ends that proofs are still accepted. */
206
+ aztecProofSubmissionEpochs: 1,
207
+ /** The deposit amount for a validator */
208
+ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
209
+ /** The minimum stake for a validator. */
210
+ ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
211
+ /** The slashing round size */
212
+ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
213
+ /** Governance proposing round size */
214
+ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
215
+ /** The mana target for the rollup */
216
+ manaTarget: DefaultL1ContractsConfig.manaTarget,
217
+ /** The proving cost per mana */
218
+ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
219
+ /** Exit delay for stakers */
220
+ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
221
+
222
+ ...DefaultSlashConfig,
223
+
224
+ ...DefaultNetworkDBMapSizeConfig,
225
+ };
226
+
227
+ export const nextNetL2ChainConfig: L2ChainConfig = {
228
+ l1ChainId: 11155111,
229
+ testAccounts: true,
230
+ sponsoredFPC: true,
231
+ p2pEnabled: true,
232
+ disableTransactions: false,
233
+ p2pBootstrapNodes: [],
234
+ seqMinTxsPerBlock: 0,
235
+ seqMaxTxsPerBlock: 8,
236
+ realProofs: true,
237
+ snapshotsUrls: [],
238
+ autoUpdate: 'config-and-version',
239
+ autoUpdateUrl: '',
240
+ publicIncludeMetrics,
241
+ publicMetricsCollectorUrl: '',
242
+ publicMetricsCollectFrom: [''],
243
+ maxTxPoolSize: 100_000_000, // 100MB
244
+
245
+ // Deployment stuff
246
+ /** How many seconds an L1 slot lasts. */
247
+ ethereumSlotDuration: 12,
248
+ /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
249
+ aztecSlotDuration: 36,
250
+ /** How many L2 slots an epoch lasts. */
251
+ aztecEpochDuration: 32,
252
+ /** The target validator committee size. */
253
+ aztecTargetCommitteeSize: 48,
254
+ /** The number of epochs to lag behind the current epoch for validator selection. */
255
+ lagInEpochs: DefaultL1ContractsConfig.lagInEpochs,
256
+ /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
257
+ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
258
+ /** The number of epochs after an epoch ends that proofs are still accepted. */
259
+ aztecProofSubmissionEpochs: 1,
260
+ /** The deposit amount for a validator */
261
+ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
262
+ /** The minimum stake for a validator. */
263
+ ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
264
+ /** The slashing round size */
265
+ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
266
+ /** Governance proposing round size */
267
+ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
268
+ /** The mana target for the rollup */
269
+ manaTarget: DefaultL1ContractsConfig.manaTarget,
270
+ /** The proving cost per mana */
271
+ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
272
+ /** Exit delay for stakers */
273
+ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
274
+
275
+ ...DefaultSlashConfig,
276
+
277
+ ...DefaultNetworkDBMapSizeConfig,
278
+ };
279
+
280
+ export const testnetL2ChainConfig: L2ChainConfig = {
281
+ l1ChainId: 11155111,
282
+ testAccounts: false,
283
+ sponsoredFPC: true,
284
+ p2pEnabled: true,
285
+ disableTransactions: true,
286
+ p2pBootstrapNodes: [],
287
+ seqMinTxsPerBlock: 0,
288
+ seqMaxTxsPerBlock: 0,
289
+ realProofs: true,
290
+ snapshotsUrls: [`${SNAPSHOTS_URL}/testnet/`],
291
+ autoUpdate: 'config-and-version',
292
+ autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/testnet.json',
293
+ maxTxPoolSize: 100_000_000, // 100MB
294
+ publicIncludeMetrics,
295
+ publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
296
+ publicMetricsCollectFrom: ['sequencer'],
297
+
298
+ // Deployment stuff
299
+ /** How many seconds an L1 slot lasts. */
300
+ ethereumSlotDuration: 12,
301
+ /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
302
+ aztecSlotDuration: 36,
303
+ /** How many L2 slots an epoch lasts. */
304
+ aztecEpochDuration: 32,
305
+ /** The target validator committee size. */
306
+ aztecTargetCommitteeSize: 48,
307
+ /** The number of epochs to lag behind the current epoch for validator selection. */
308
+ lagInEpochs: 2,
309
+ /** The number of epochs after an epoch ends that proofs are still accepted. */
310
+ aztecProofSubmissionEpochs: 1,
311
+ /** The deposit amount for a validator */
312
+ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
313
+ /** The minimum stake for a validator. */
314
+ ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
315
+ /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
316
+ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
317
+ /** The slashing round size */
318
+ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
319
+ /** Governance proposing round size */
320
+ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
321
+ /** The mana target for the rollup */
322
+ manaTarget: 0n,
323
+ /** The proving cost per mana */
324
+ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
325
+ /** Exit delay for stakers */
326
+ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
327
+
328
+ ...DefaultSlashConfig,
329
+ slashPrunePenalty: 0n,
330
+ slashDataWithholdingPenalty: 0n,
331
+
332
+ ...DefaultNetworkDBMapSizeConfig,
333
+ };
334
+
335
+ export const mainnetL2ChainConfig: L2ChainConfig = {
336
+ l1ChainId: 1,
337
+ testAccounts: false,
338
+ sponsoredFPC: false,
339
+ p2pEnabled: true,
340
+ disableTransactions: true,
341
+ p2pBootstrapNodes: [],
342
+ seqMinTxsPerBlock: 0,
343
+ seqMaxTxsPerBlock: 0,
344
+ realProofs: true,
345
+ snapshotsUrls: [`${SNAPSHOTS_URL}/mainnet/`],
346
+ autoUpdate: 'notify',
347
+ autoUpdateUrl: 'https://storage.googleapis.com/aztec-mainnet/auto-update/mainnet.json',
348
+ maxTxPoolSize: 100_000_000, // 100MB
349
+ publicIncludeMetrics,
350
+ publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
351
+ publicMetricsCollectFrom: ['sequencer'],
352
+
353
+ /** How many seconds an L1 slot lasts. */
354
+ ethereumSlotDuration: 12,
355
+ /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
356
+ aztecSlotDuration: 72,
357
+ /** How many L2 slots an epoch lasts. */
358
+ aztecEpochDuration: 32,
359
+ /** The target validator committee size. */
360
+ aztecTargetCommitteeSize: 24,
361
+ /** The number of epochs after an epoch ends that proofs are still accepted. */
362
+ aztecProofSubmissionEpochs: 1,
363
+ /** How many sequencers must agree with a slash for it to be executed. */
364
+ slashingQuorum: 65,
365
+
366
+ /** The number of epochs to lag behind the current epoch for validator selection. */
367
+ lagInEpochs: 2,
368
+
369
+ localEjectionThreshold: 196_000n * 10n ** 18n,
370
+ slashingDisableDuration: 5 * 24 * 60 * 60,
371
+
372
+ slashingRoundSizeInEpochs: 4,
373
+ slashingLifetimeInRounds: 40,
374
+ slashingExecutionDelayInRounds: 28,
375
+ slashAmountSmall: 2_000n * 10n ** 18n,
376
+ slashAmountMedium: 10_000n * 10n ** 18n,
377
+ slashAmountLarge: 50_000n * 10n ** 18n,
378
+ slashingOffsetInRounds: 2,
379
+ slasherFlavor: 'tally',
380
+ slashingVetoer: EthAddress.ZERO, // TODO TMNT-329
381
+
382
+ /** The mana target for the rollup */
383
+ manaTarget: 0n,
384
+
385
+ exitDelaySeconds: 5 * 24 * 60 * 60,
386
+
387
+ /** The proving cost per mana */
388
+ provingCostPerMana: 0n,
389
+
390
+ ejectionThreshold: 100_000n * 10n ** 18n,
391
+ activationThreshold: 200_000n * 10n ** 18n,
392
+
393
+ governanceProposerRoundSize: 300, // TODO TMNT-322
394
+ governanceProposerQuorum: 151, // TODO TMNT-322
395
+
396
+ // Node slashing config
397
+ // TODO TMNT-330
398
+ slashMinPenaltyPercentage: 0.5,
399
+ slashMaxPenaltyPercentage: 2.0,
400
+ slashInactivityTargetPercentage: 0.7,
401
+ slashInactivityConsecutiveEpochThreshold: 2,
402
+ slashInactivityPenalty: 2_000n * 10n ** 18n,
403
+ slashPrunePenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for prune offenses right now
404
+ slashDataWithholdingPenalty: 0n, // 2_000n * 10n ** 18n, We disable slashing for data withholding offenses right now
405
+ slashProposeInvalidAttestationsPenalty: 50_000n * 10n ** 18n,
406
+ slashAttestDescendantOfInvalidPenalty: 50_000n * 10n ** 18n,
407
+ slashUnknownPenalty: 2_000n * 10n ** 18n,
408
+ slashBroadcastedInvalidBlockPenalty: 0n, // 10_000n * 10n ** 18n, Disabled for now until further testing
409
+ slashMaxPayloadSize: 50,
410
+ slashGracePeriodL2Slots: 32 * 4, // One round from genesis
411
+ slashOffenseExpirationRounds: 8,
412
+ sentinelEnabled: true,
413
+ slashExecuteRoundsLookBack: 4,
414
+
415
+ ...DefaultNetworkDBMapSizeConfig,
416
+ };
417
+
418
+ export const devnetL2ChainConfig: L2ChainConfig = {
419
+ l1ChainId: 11155111,
420
+ testAccounts: true,
421
+ sponsoredFPC: true,
422
+ p2pEnabled: true,
423
+ disableTransactions: false,
424
+ p2pBootstrapNodes: [],
425
+ seqMinTxsPerBlock: 0,
426
+ seqMaxTxsPerBlock: 8,
427
+ realProofs: false,
428
+ snapshotsUrls: [],
429
+ autoUpdate: 'config-and-version',
430
+ autoUpdateUrl: '',
431
+ publicIncludeMetrics,
432
+ publicMetricsCollectorUrl: '',
433
+ publicMetricsCollectFrom: [''],
434
+ maxTxPoolSize: 100_000_000, // 100MB
435
+
436
+ // Deployment stuff
437
+ /** How many seconds an L1 slot lasts. */
438
+ ethereumSlotDuration: 12,
439
+ /** How many seconds an L2 slots lasts (must be multiple of ethereum slot duration). */
440
+ aztecSlotDuration: 36,
441
+ /** How many L2 slots an epoch lasts. */
442
+ aztecEpochDuration: 8,
443
+ /** The target validator committee size. */
444
+ aztecTargetCommitteeSize: 1,
445
+ /** The number of epochs to lag behind the current epoch for validator selection. */
446
+ lagInEpochs: 1,
447
+ /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */
448
+ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
449
+ /** The number of epochs after an epoch ends that proofs are still accepted. */
450
+ aztecProofSubmissionEpochs: 1,
451
+ /** The deposit amount for a validator */
452
+ activationThreshold: DefaultL1ContractsConfig.activationThreshold,
453
+ /** The minimum stake for a validator. */
454
+ ejectionThreshold: DefaultL1ContractsConfig.ejectionThreshold,
455
+ /** The slashing round size */
456
+ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
457
+ /** Governance proposing round size */
458
+ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
459
+ /** The mana target for the rollup */
460
+ manaTarget: DefaultL1ContractsConfig.manaTarget,
461
+ /** The proving cost per mana */
462
+ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
463
+ /** Exit delay for stakers */
464
+ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
465
+
466
+ ...DefaultSlashConfig,
467
+
468
+ ...DefaultNetworkDBMapSizeConfig,
469
+ };
470
+
471
+ export function getL2ChainConfig(networkName: NetworkNames): L2ChainConfig | undefined {
472
+ let config: L2ChainConfig | undefined;
473
+ if (networkName === 'staging-public') {
474
+ config = { ...stagingPublicL2ChainConfig };
475
+ } else if (networkName === 'testnet') {
476
+ config = { ...testnetL2ChainConfig };
477
+ } else if (networkName === 'staging-ignition') {
478
+ config = { ...stagingIgnitionL2ChainConfig };
479
+ } else if (networkName === 'mainnet') {
480
+ config = { ...mainnetL2ChainConfig };
481
+ } else if (networkName === 'next-net') {
482
+ config = { ...nextNetL2ChainConfig };
483
+ } else if (networkName === 'devnet') {
484
+ config = { ...devnetL2ChainConfig };
485
+ }
486
+ return config;
487
+ }
488
+
489
+ function getDefaultDataDir(networkName: NetworkNames): string {
490
+ return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
491
+ }
492
+
493
+ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
494
+ if (networkName === 'local') {
495
+ return;
496
+ }
497
+
498
+ enrichVar('DATA_DIRECTORY', getDefaultDataDir(networkName));
499
+ const config = getL2ChainConfig(networkName);
500
+
501
+ if (!config) {
502
+ throw new Error(`Unknown network name: ${networkName}`);
503
+ }
504
+
505
+ enrichVar('BOOTSTRAP_NODES', config.p2pBootstrapNodes.join(','));
506
+ enrichVar('TEST_ACCOUNTS', config.testAccounts.toString());
507
+ enrichVar('SPONSORED_FPC', config.sponsoredFPC.toString());
508
+ enrichVar('P2P_ENABLED', config.p2pEnabled.toString());
509
+ enrichVar('L1_CHAIN_ID', config.l1ChainId.toString());
510
+ enrichVar('SEQ_MIN_TX_PER_BLOCK', config.seqMinTxsPerBlock.toString());
511
+ enrichVar('SEQ_MAX_TX_PER_BLOCK', config.seqMaxTxsPerBlock.toString());
512
+ enrichVar('PROVER_REAL_PROOFS', config.realProofs.toString());
513
+ enrichVar('PXE_PROVER_ENABLED', config.realProofs.toString());
514
+ enrichVar('SYNC_SNAPSHOTS_URLS', config.snapshotsUrls.join(','));
515
+ enrichVar('P2P_MAX_TX_POOL_SIZE', config.maxTxPoolSize.toString());
516
+
517
+ enrichVar('DATA_STORE_MAP_SIZE_KB', config.dbMapSizeKb.toString());
518
+ enrichVar('ARCHIVER_STORE_MAP_SIZE_KB', config.archiverStoreMapSizeKb.toString());
519
+ enrichVar('NOTE_HASH_TREE_MAP_SIZE_KB', config.noteHashTreeMapSizeKb.toString());
520
+ enrichVar('NULLIFIER_TREE_MAP_SIZE_KB', config.nullifierTreeMapSizeKb.toString());
521
+ enrichVar('PUBLIC_DATA_TREE_MAP_SIZE_KB', config.publicDataTreeMapSizeKb.toString());
522
+
523
+ if (config.autoUpdate) {
524
+ enrichVar('AUTO_UPDATE', config.autoUpdate?.toString());
525
+ }
526
+
527
+ if (config.autoUpdateUrl) {
528
+ enrichVar('AUTO_UPDATE_URL', config.autoUpdateUrl);
529
+ }
530
+
531
+ if (config.publicIncludeMetrics) {
532
+ enrichVar('PUBLIC_OTEL_INCLUDE_METRICS', config.publicIncludeMetrics.join(','));
533
+ }
534
+
535
+ if (config.publicMetricsCollectorUrl) {
536
+ enrichVar('PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT', config.publicMetricsCollectorUrl);
537
+ }
538
+
539
+ if (config.publicMetricsCollectFrom) {
540
+ enrichVar('PUBLIC_OTEL_COLLECT_FROM', config.publicMetricsCollectFrom.join(','));
541
+ }
542
+
543
+ // Deployment stuff
544
+ enrichVar('ETHEREUM_SLOT_DURATION', config.ethereumSlotDuration.toString());
545
+ enrichVar('AZTEC_SLOT_DURATION', config.aztecSlotDuration.toString());
546
+ enrichVar('AZTEC_EPOCH_DURATION', config.aztecEpochDuration.toString());
547
+ enrichVar('AZTEC_TARGET_COMMITTEE_SIZE', config.aztecTargetCommitteeSize.toString());
548
+ enrichVar('AZTEC_PROOF_SUBMISSION_EPOCHS', config.aztecProofSubmissionEpochs.toString());
549
+ enrichVar('AZTEC_ACTIVATION_THRESHOLD', config.activationThreshold.toString());
550
+ enrichVar('AZTEC_EJECTION_THRESHOLD', config.ejectionThreshold.toString());
551
+ enrichVar('AZTEC_LOCAL_EJECTION_THRESHOLD', config.localEjectionThreshold.toString());
552
+ enrichVar('AZTEC_SLASHING_QUORUM', config.slashingQuorum?.toString());
553
+ enrichVar('AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS', config.slashingRoundSizeInEpochs.toString());
554
+ enrichVar('AZTEC_GOVERNANCE_PROPOSER_QUORUM', config.governanceProposerQuorum?.toString());
555
+ enrichVar('AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE', config.governanceProposerRoundSize.toString());
556
+ enrichVar('AZTEC_MANA_TARGET', config.manaTarget.toString());
557
+ enrichVar('AZTEC_PROVING_COST_PER_MANA', config.provingCostPerMana.toString());
558
+ enrichVar('AZTEC_SLASH_AMOUNT_SMALL', config.slashAmountSmall.toString());
559
+ enrichVar('AZTEC_SLASH_AMOUNT_MEDIUM', config.slashAmountMedium.toString());
560
+ enrichVar('AZTEC_SLASH_AMOUNT_LARGE', config.slashAmountLarge.toString());
561
+ enrichVar('AZTEC_SLASHING_LIFETIME_IN_ROUNDS', config.slashingLifetimeInRounds.toString());
562
+ enrichVar('AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS', config.slashingExecutionDelayInRounds.toString());
563
+ enrichVar('AZTEC_SLASHING_OFFSET_IN_ROUNDS', config.slashingOffsetInRounds.toString());
564
+ enrichVar('AZTEC_SLASHER_FLAVOR', config.slasherFlavor);
565
+ enrichVar('AZTEC_EXIT_DELAY_SECONDS', config.exitDelaySeconds.toString());
566
+ enrichEthAddressVar('AZTEC_SLASHING_VETOER', config.slashingVetoer.toString());
567
+
568
+ // Slashing
569
+ enrichVar('SLASH_MIN_PENALTY_PERCENTAGE', config.slashMinPenaltyPercentage.toString());
570
+ enrichVar('SLASH_MAX_PENALTY_PERCENTAGE', config.slashMaxPenaltyPercentage.toString());
571
+ enrichVar('SLASH_PRUNE_PENALTY', config.slashPrunePenalty.toString());
572
+ enrichVar('SLASH_DATA_WITHHOLDING_PENALTY', config.slashDataWithholdingPenalty.toString());
573
+ enrichVar('SLASH_INACTIVITY_TARGET_PERCENTAGE', config.slashInactivityTargetPercentage.toString());
574
+ enrichVar('SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD', config.slashInactivityConsecutiveEpochThreshold.toString());
575
+ enrichVar('SLASH_INACTIVITY_PENALTY', config.slashInactivityPenalty.toString());
576
+ enrichVar('SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY', config.slashProposeInvalidAttestationsPenalty.toString());
577
+ enrichVar('SLASH_ATTEST_DESCENDANT_OF_INVALID_PENALTY', config.slashAttestDescendantOfInvalidPenalty.toString());
578
+ enrichVar('SLASH_UNKNOWN_PENALTY', config.slashUnknownPenalty.toString());
579
+ enrichVar('SLASH_INVALID_BLOCK_PENALTY', config.slashBroadcastedInvalidBlockPenalty.toString());
580
+ enrichVar('SLASH_OFFENSE_EXPIRATION_ROUNDS', config.slashOffenseExpirationRounds.toString());
581
+ enrichVar('SLASH_MAX_PAYLOAD_SIZE', config.slashMaxPayloadSize.toString());
582
+
583
+ enrichVar('SENTINEL_ENABLED', config.sentinelEnabled.toString());
584
+ enrichVar('TRANSACTIONS_DISABLED', config.disableTransactions.toString());
585
+ }
@@ -0,0 +1,15 @@
1
+ import { EthAddress } from '@aztec/aztec.js/addresses';
2
+ import type { EnvVar } from '@aztec/foundation/config';
3
+
4
+ export function enrichVar(envVar: EnvVar, value: string | undefined) {
5
+ // Don't override
6
+ if (process.env[envVar] || value === undefined) {
7
+ return;
8
+ }
9
+ process.env[envVar] = value;
10
+ }
11
+
12
+ export function enrichEthAddressVar(envVar: EnvVar, value: string) {
13
+ // EthAddress doesn't like being given empty strings
14
+ enrichVar(envVar, value || EthAddress.ZERO.toString());
15
+ }
@@ -0,0 +1,28 @@
1
+ import { type L1ContractAddresses, RegistryContract, getL1ContractsConfig, getPublicClient } from '@aztec/ethereum';
2
+ import { EthAddress } from '@aztec/foundation/eth-address';
3
+
4
+ export async function getL1Config(
5
+ registryAddress: EthAddress,
6
+ l1RpcUrls: string[],
7
+ l1ChainId: number,
8
+ rollupVersion: number | 'canonical' = 'canonical',
9
+ ): Promise<{ addresses: L1ContractAddresses; config: Awaited<ReturnType<typeof getL1ContractsConfig>> }> {
10
+ const publicClient = getPublicClient({ l1RpcUrls, l1ChainId });
11
+ const addresses = await RegistryContract.collectAddresses(publicClient, registryAddress, rollupVersion);
12
+
13
+ const config = await getL1ContractsConfig(publicClient, addresses);
14
+
15
+ return {
16
+ addresses,
17
+ config,
18
+ };
19
+ }
20
+
21
+ export async function getL1RollupAddressFromEnv(l1RpcUrls: string[], l1ChainId: number) {
22
+ const registryAddress = process.env.REGISTRY_CONTRACT_ADDRESS;
23
+ if (!registryAddress || !EthAddress.isAddress(registryAddress)) {
24
+ throw new Error(`Failed to extract registry address`);
25
+ }
26
+ const { addresses } = await getL1Config(EthAddress.fromString(registryAddress), l1RpcUrls, l1ChainId);
27
+ return addresses.rollupAddress;
28
+ }
@@ -0,0 +1,4 @@
1
+ export * from './cached_fetch.js';
2
+ export * from './chain_l2_config.js';
3
+ export * from './get_l1_config.js';
4
+ export * from './network_config.js';