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