@aztec/cli 0.0.1-fake-c83136db25 → 0.0.1-private.d0bedffd

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 (180) 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_min_fee.d.ts +3 -0
  7. package/dest/cmds/aztec_node/get_current_min_fee.d.ts.map +1 -0
  8. package/dest/cmds/aztec_node/{get_current_base_fee.js → get_current_min_fee.js} +2 -2
  9. package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.d.ts +1 -1
  10. package/dest/cmds/aztec_node/get_logs.d.ts +3 -2
  11. package/dest/cmds/aztec_node/get_logs.d.ts.map +1 -1
  12. package/dest/cmds/aztec_node/get_node_info.d.ts +1 -1
  13. package/dest/cmds/aztec_node/index.d.ts +1 -1
  14. package/dest/cmds/aztec_node/index.js +3 -3
  15. package/dest/cmds/contracts/index.d.ts +1 -1
  16. package/dest/cmds/contracts/inspect_contract.d.ts +1 -1
  17. package/dest/cmds/contracts/inspect_contract.d.ts.map +1 -1
  18. package/dest/cmds/contracts/inspect_contract.js +4 -10
  19. package/dest/cmds/contracts/parse_parameter_struct.d.ts +1 -1
  20. package/dest/cmds/infrastructure/index.d.ts +1 -1
  21. package/dest/cmds/infrastructure/index.d.ts.map +1 -1
  22. package/dest/cmds/infrastructure/index.js +0 -1
  23. package/dest/cmds/infrastructure/sequencers.d.ts +1 -2
  24. package/dest/cmds/infrastructure/sequencers.d.ts.map +1 -1
  25. package/dest/cmds/infrastructure/sequencers.js +11 -4
  26. package/dest/cmds/infrastructure/setup_l2_contract.d.ts +1 -1
  27. package/dest/cmds/infrastructure/setup_l2_contract.d.ts.map +1 -1
  28. package/dest/cmds/infrastructure/setup_l2_contract.js +4 -3
  29. package/dest/cmds/l1/advance_epoch.d.ts +1 -1
  30. package/dest/cmds/l1/assume_proven_through.d.ts +3 -2
  31. package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -1
  32. package/dest/cmds/l1/assume_proven_through.js +3 -4
  33. package/dest/cmds/l1/bridge_erc20.d.ts +1 -1
  34. package/dest/cmds/l1/bridge_erc20.d.ts.map +1 -1
  35. package/dest/cmds/l1/bridge_erc20.js +2 -1
  36. package/dest/cmds/l1/compute_genesis_values.d.ts +4 -0
  37. package/dest/cmds/l1/compute_genesis_values.d.ts.map +1 -0
  38. package/dest/cmds/l1/compute_genesis_values.js +17 -0
  39. package/dest/cmds/l1/create_l1_account.d.ts +1 -1
  40. package/dest/cmds/l1/deploy_l1_contracts_cmd.d.ts +4 -0
  41. package/dest/cmds/l1/deploy_l1_contracts_cmd.d.ts.map +1 -0
  42. package/dest/cmds/l1/{deploy_l1_contracts.js → deploy_l1_contracts_cmd.js} +39 -4
  43. package/dest/cmds/l1/deploy_new_rollup.d.ts +4 -4
  44. package/dest/cmds/l1/deploy_new_rollup.d.ts.map +1 -1
  45. package/dest/cmds/l1/deploy_new_rollup.js +3 -3
  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/get_l1_addresses.js +5 -2
  49. package/dest/cmds/l1/get_l1_balance.d.ts +1 -1
  50. package/dest/cmds/l1/get_l1_balance.js +4 -2
  51. package/dest/cmds/l1/governance_utils.d.ts +5 -5
  52. package/dest/cmds/l1/governance_utils.d.ts.map +1 -1
  53. package/dest/cmds/l1/governance_utils.js +3 -1
  54. package/dest/cmds/l1/index.d.ts +1 -2
  55. package/dest/cmds/l1/index.d.ts.map +1 -1
  56. package/dest/cmds/l1/index.js +17 -10
  57. package/dest/cmds/l1/prover_stats.d.ts +1 -1
  58. package/dest/cmds/l1/prover_stats.d.ts.map +1 -1
  59. package/dest/cmds/l1/prover_stats.js +32 -30
  60. package/dest/cmds/l1/trigger_seed_snapshot.d.ts +2 -2
  61. package/dest/cmds/l1/trigger_seed_snapshot.d.ts.map +1 -1
  62. package/dest/cmds/l1/trigger_seed_snapshot.js +2 -1
  63. package/dest/cmds/l1/update_l1_validators.d.ts +7 -7
  64. package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
  65. package/dest/cmds/l1/update_l1_validators.js +58 -19
  66. package/dest/cmds/misc/compute_selector.d.ts +1 -1
  67. package/dest/cmds/misc/example_contracts.d.ts +1 -1
  68. package/dest/cmds/misc/generate_bootnode_enr.d.ts +1 -1
  69. package/dest/cmds/misc/generate_p2p_private_key.d.ts +1 -1
  70. package/dest/cmds/misc/generate_secret_and_hash.d.ts +1 -1
  71. package/dest/cmds/misc/generate_secret_and_hash.js +1 -1
  72. package/dest/cmds/misc/generate_secret_key.d.ts +1 -1
  73. package/dest/cmds/misc/get_canonical_sponsored_fpc_address.d.ts +1 -1
  74. package/dest/cmds/misc/index.d.ts +1 -1
  75. package/dest/cmds/misc/index.d.ts.map +1 -1
  76. package/dest/cmds/misc/index.js +1 -1
  77. package/dest/cmds/misc/update/common.d.ts +1 -1
  78. package/dest/cmds/misc/update/github.d.ts +1 -1
  79. package/dest/cmds/misc/update/noir.d.ts +1 -1
  80. package/dest/cmds/misc/update/npm.d.ts +1 -1
  81. package/dest/cmds/misc/update/npm.js +1 -1
  82. package/dest/cmds/misc/update/utils.d.ts +1 -1
  83. package/dest/cmds/misc/update.d.ts +1 -1
  84. package/dest/cmds/validator_keys/add.d.ts +5 -0
  85. package/dest/cmds/validator_keys/add.d.ts.map +1 -0
  86. package/dest/cmds/validator_keys/add.js +83 -0
  87. package/dest/cmds/validator_keys/generate_bls_keypair.d.ts +12 -0
  88. package/dest/cmds/validator_keys/generate_bls_keypair.d.ts.map +1 -0
  89. package/dest/cmds/validator_keys/generate_bls_keypair.js +27 -0
  90. package/dest/cmds/validator_keys/index.d.ts +4 -0
  91. package/dest/cmds/validator_keys/index.d.ts.map +1 -0
  92. package/dest/cmds/validator_keys/index.js +32 -0
  93. package/dest/cmds/validator_keys/new.d.ts +29 -0
  94. package/dest/cmds/validator_keys/new.d.ts.map +1 -0
  95. package/dest/cmds/validator_keys/new.js +134 -0
  96. package/dest/cmds/validator_keys/shared.d.ts +68 -0
  97. package/dest/cmds/validator_keys/shared.d.ts.map +1 -0
  98. package/dest/cmds/validator_keys/shared.js +274 -0
  99. package/dest/cmds/validator_keys/staker.d.ts +38 -0
  100. package/dest/cmds/validator_keys/staker.d.ts.map +1 -0
  101. package/dest/cmds/validator_keys/staker.js +210 -0
  102. package/dest/cmds/validator_keys/utils.d.ts +25 -0
  103. package/dest/cmds/validator_keys/utils.d.ts.map +1 -0
  104. package/dest/cmds/validator_keys/utils.js +52 -0
  105. package/dest/config/cached_fetch.d.ts +19 -10
  106. package/dest/config/cached_fetch.d.ts.map +1 -1
  107. package/dest/config/cached_fetch.js +110 -32
  108. package/dest/config/chain_l2_config.d.ts +13 -38
  109. package/dest/config/chain_l2_config.d.ts.map +1 -1
  110. package/dest/config/chain_l2_config.js +35 -440
  111. package/dest/config/enrich_env.d.ts +1 -1
  112. package/dest/config/generated/networks.d.ts +222 -0
  113. package/dest/config/generated/networks.d.ts.map +1 -0
  114. package/dest/config/generated/networks.js +223 -0
  115. package/dest/config/get_l1_config.d.ts +3 -2
  116. package/dest/config/get_l1_config.d.ts.map +1 -1
  117. package/dest/config/get_l1_config.js +3 -1
  118. package/dest/config/index.d.ts +1 -1
  119. package/dest/config/network_config.d.ts +7 -4
  120. package/dest/config/network_config.d.ts.map +1 -1
  121. package/dest/config/network_config.js +67 -30
  122. package/dest/utils/aztec.d.ts +7 -13
  123. package/dest/utils/aztec.d.ts.map +1 -1
  124. package/dest/utils/aztec.js +19 -40
  125. package/dest/utils/commands.d.ts +18 -8
  126. package/dest/utils/commands.d.ts.map +1 -1
  127. package/dest/utils/commands.js +36 -8
  128. package/dest/utils/encoding.d.ts +1 -1
  129. package/dest/utils/encoding.js +1 -1
  130. package/dest/utils/github.d.ts +1 -1
  131. package/dest/utils/index.d.ts +1 -1
  132. package/dest/utils/inspect.d.ts +3 -2
  133. package/dest/utils/inspect.d.ts.map +1 -1
  134. package/dest/utils/inspect.js +4 -1
  135. package/dest/utils/setup_contracts.d.ts +1 -1
  136. package/package.json +47 -30
  137. package/public_include_metric_prefixes.json +1 -0
  138. package/src/cmds/aztec_node/get_block.ts +2 -1
  139. package/src/cmds/aztec_node/{get_current_base_fee.ts → get_current_min_fee.ts} +2 -2
  140. package/src/cmds/aztec_node/get_logs.ts +3 -2
  141. package/src/cmds/aztec_node/index.ts +3 -3
  142. package/src/cmds/contracts/inspect_contract.ts +4 -11
  143. package/src/cmds/infrastructure/index.ts +0 -1
  144. package/src/cmds/infrastructure/sequencers.ts +7 -5
  145. package/src/cmds/infrastructure/setup_l2_contract.ts +5 -4
  146. package/src/cmds/l1/assume_proven_through.ts +4 -4
  147. package/src/cmds/l1/bridge_erc20.ts +2 -1
  148. package/src/cmds/l1/compute_genesis_values.ts +29 -0
  149. package/src/cmds/l1/{deploy_l1_contracts.ts → deploy_l1_contracts_cmd.ts} +39 -22
  150. package/src/cmds/l1/deploy_new_rollup.ts +4 -9
  151. package/src/cmds/l1/get_l1_addresses.ts +4 -2
  152. package/src/cmds/l1/get_l1_balance.ts +2 -2
  153. package/src/cmds/l1/governance_utils.ts +3 -8
  154. package/src/cmds/l1/index.ts +30 -21
  155. package/src/cmds/l1/prover_stats.ts +42 -31
  156. package/src/cmds/l1/trigger_seed_snapshot.ts +2 -1
  157. package/src/cmds/l1/update_l1_validators.ts +52 -31
  158. package/src/cmds/misc/generate_secret_and_hash.ts +1 -1
  159. package/src/cmds/misc/index.ts +1 -1
  160. package/src/cmds/misc/update/npm.ts +1 -1
  161. package/src/cmds/validator_keys/add.ts +123 -0
  162. package/src/cmds/validator_keys/generate_bls_keypair.ts +34 -0
  163. package/src/cmds/validator_keys/index.ts +142 -0
  164. package/src/cmds/validator_keys/new.ts +207 -0
  165. package/src/cmds/validator_keys/shared.ts +326 -0
  166. package/src/cmds/validator_keys/staker.ts +301 -0
  167. package/src/cmds/validator_keys/utils.ts +81 -0
  168. package/src/config/cached_fetch.ts +119 -31
  169. package/src/config/chain_l2_config.ts +36 -574
  170. package/src/config/generated/networks.ts +227 -0
  171. package/src/config/get_l1_config.ts +4 -1
  172. package/src/config/network_config.ts +77 -31
  173. package/src/utils/aztec.ts +24 -83
  174. package/src/utils/commands.ts +47 -8
  175. package/src/utils/encoding.ts +1 -1
  176. package/src/utils/inspect.ts +6 -2
  177. package/dest/cmds/aztec_node/get_current_base_fee.d.ts +0 -3
  178. package/dest/cmds/aztec_node/get_current_base_fee.d.ts.map +0 -1
  179. package/dest/cmds/l1/deploy_l1_contracts.d.ts +0 -4
  180. package/dest/cmds/l1/deploy_l1_contracts.d.ts.map +0 -1
@@ -0,0 +1,227 @@
1
+ // Auto-generated from spartan/environments/network-defaults.yml
2
+ // Do not edit manually - run yarn generate to regenerate
3
+
4
+ export const devnetConfig = {
5
+ ETHEREUM_SLOT_DURATION: 12,
6
+ AZTEC_SLOT_DURATION: 72,
7
+ AZTEC_TARGET_COMMITTEE_SIZE: 48,
8
+ AZTEC_ACTIVATION_THRESHOLD: 100000000000000000000,
9
+ AZTEC_EJECTION_THRESHOLD: 50000000000000000000,
10
+ AZTEC_LOCAL_EJECTION_THRESHOLD: 98000000000000000000,
11
+ AZTEC_EXIT_DELAY_SECONDS: 172800,
12
+ AZTEC_INBOX_LAG: 1,
13
+ AZTEC_PROOF_SUBMISSION_EPOCHS: 1,
14
+ AZTEC_MANA_TARGET: 100000000,
15
+ AZTEC_PROVING_COST_PER_MANA: 100,
16
+ AZTEC_INITIAL_ETH_PER_FEE_ASSET: 10000000,
17
+ AZTEC_SLASHER_FLAVOR: 'tally',
18
+ AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS: 4,
19
+ AZTEC_SLASHING_LIFETIME_IN_ROUNDS: 5,
20
+ AZTEC_SLASHING_OFFSET_IN_ROUNDS: 2,
21
+ AZTEC_SLASHING_VETOER: '0x0000000000000000000000000000000000000000',
22
+ AZTEC_SLASHING_DISABLE_DURATION: 432000,
23
+ AZTEC_SLASH_AMOUNT_SMALL: 10000000000000000000,
24
+ AZTEC_SLASH_AMOUNT_MEDIUM: 20000000000000000000,
25
+ AZTEC_SLASH_AMOUNT_LARGE: 50000000000000000000,
26
+ AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE: 300,
27
+ SLASH_MIN_PENALTY_PERCENTAGE: 0.5,
28
+ SLASH_MAX_PENALTY_PERCENTAGE: 2,
29
+ SLASH_OFFENSE_EXPIRATION_ROUNDS: 4,
30
+ SLASH_MAX_PAYLOAD_SIZE: 80,
31
+ SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4,
32
+ P2P_ENABLED: true,
33
+ BOOTSTRAP_NODES: '',
34
+ SEQ_MIN_TX_PER_BLOCK: 0,
35
+ SEQ_BUILD_CHECKPOINT_IF_EMPTY: true,
36
+ SEQ_BLOCK_DURATION_MS: 6000,
37
+ SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36,
38
+ DATA_STORE_MAP_SIZE_KB: 134217728,
39
+ ARCHIVER_STORE_MAP_SIZE_KB: 1073741824,
40
+ NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824,
41
+ NULLIFIER_TREE_MAP_SIZE_KB: 1073741824,
42
+ PUBLIC_DATA_TREE_MAP_SIZE_KB: 1073741824,
43
+ PUBLIC_OTEL_INCLUDE_METRICS: 'aztec.validator,aztec.tx_collector,aztec.mempool,aztec.p2p.gossip.agg_,aztec.ivc_verifier.agg_',
44
+ SENTINEL_ENABLED: true,
45
+ AZTEC_EPOCH_DURATION: 8,
46
+ AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET: 1,
47
+ AZTEC_LAG_IN_EPOCHS_FOR_RANDAO: 1,
48
+ AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS: 1,
49
+ L1_CHAIN_ID: 11155111,
50
+ TEST_ACCOUNTS: true,
51
+ SPONSORED_FPC: true,
52
+ TRANSACTIONS_DISABLED: false,
53
+ SEQ_MAX_TX_PER_BLOCK: 18,
54
+ PROVER_REAL_PROOFS: false,
55
+ PXE_PROVER_ENABLED: false,
56
+ SYNC_SNAPSHOTS_URLS: '',
57
+ SKIP_ARCHIVER_INITIAL_SYNC: false,
58
+ BLOB_ALLOW_EMPTY_SOURCES: false,
59
+ P2P_MAX_PENDING_TX_COUNT: 1000,
60
+ P2P_TX_POOL_DELETE_TXS_AFTER_REORG: false,
61
+ PUBLIC_OTEL_OPT_OUT: true,
62
+ PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',
63
+ PUBLIC_OTEL_COLLECT_FROM: '',
64
+ SLASH_PRUNE_PENALTY: 10000000000000000000,
65
+ SLASH_DATA_WITHHOLDING_PENALTY: 10000000000000000000,
66
+ SLASH_INACTIVITY_TARGET_PERCENTAGE: 0.9,
67
+ SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 1,
68
+ SLASH_INACTIVITY_PENALTY: 10000000000000000000,
69
+ SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY: 10000000000000000000,
70
+ SLASH_DUPLICATE_PROPOSAL_PENALTY: 10000000000000000000,
71
+ SLASH_DUPLICATE_ATTESTATION_PENALTY: 10000000000000000000,
72
+ SLASH_ATTEST_DESCENDANT_OF_INVALID_PENALTY: 10000000000000000000,
73
+ SLASH_UNKNOWN_PENALTY: 10000000000000000000,
74
+ SLASH_INVALID_BLOCK_PENALTY: 10000000000000000000,
75
+ SLASH_GRACE_PERIOD_L2_SLOTS: 0,
76
+ ENABLE_VERSION_CHECK: true,
77
+ } as const;
78
+
79
+ export const testnetConfig = {
80
+ ETHEREUM_SLOT_DURATION: 12,
81
+ AZTEC_EPOCH_DURATION: 32,
82
+ AZTEC_TARGET_COMMITTEE_SIZE: 48,
83
+ AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET: 2,
84
+ AZTEC_LAG_IN_EPOCHS_FOR_RANDAO: 2,
85
+ AZTEC_EXIT_DELAY_SECONDS: 172800,
86
+ AZTEC_INBOX_LAG: 1,
87
+ AZTEC_PROOF_SUBMISSION_EPOCHS: 1,
88
+ AZTEC_INITIAL_ETH_PER_FEE_ASSET: 10000000,
89
+ AZTEC_SLASHER_FLAVOR: 'tally',
90
+ AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS: 4,
91
+ AZTEC_SLASHING_LIFETIME_IN_ROUNDS: 5,
92
+ AZTEC_SLASHING_OFFSET_IN_ROUNDS: 2,
93
+ AZTEC_SLASHING_DISABLE_DURATION: 432000,
94
+ SLASH_MIN_PENALTY_PERCENTAGE: 0.5,
95
+ SLASH_MAX_PENALTY_PERCENTAGE: 2,
96
+ SLASH_OFFENSE_EXPIRATION_ROUNDS: 4,
97
+ SLASH_MAX_PAYLOAD_SIZE: 80,
98
+ SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4,
99
+ P2P_ENABLED: true,
100
+ BOOTSTRAP_NODES: '',
101
+ SEQ_MIN_TX_PER_BLOCK: 0,
102
+ SEQ_BUILD_CHECKPOINT_IF_EMPTY: true,
103
+ SEQ_BLOCK_DURATION_MS: 6000,
104
+ SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36,
105
+ DATA_STORE_MAP_SIZE_KB: 134217728,
106
+ ARCHIVER_STORE_MAP_SIZE_KB: 1073741824,
107
+ NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824,
108
+ NULLIFIER_TREE_MAP_SIZE_KB: 1073741824,
109
+ PUBLIC_DATA_TREE_MAP_SIZE_KB: 1073741824,
110
+ PUBLIC_OTEL_INCLUDE_METRICS: 'aztec.validator,aztec.tx_collector,aztec.mempool,aztec.p2p.gossip.agg_,aztec.ivc_verifier.agg_',
111
+ SENTINEL_ENABLED: true,
112
+ AZTEC_SLOT_DURATION: 72,
113
+ AZTEC_ACTIVATION_THRESHOLD: 2E+23,
114
+ AZTEC_EJECTION_THRESHOLD: 1E+23,
115
+ AZTEC_LOCAL_EJECTION_THRESHOLD: 1.99E+23,
116
+ AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS: 2,
117
+ AZTEC_SLASHING_VETOER: '0xdfe19Da6a717b7088621d8bBB66be59F2d78e924',
118
+ AZTEC_SLASHING_QUORUM: 33,
119
+ AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE: 100,
120
+ AZTEC_GOVERNANCE_PROPOSER_QUORUM: 60,
121
+ AZTEC_MANA_TARGET: 75000000,
122
+ AZTEC_PROVING_COST_PER_MANA: 25000000,
123
+ AZTEC_SLASH_AMOUNT_SMALL: 1E+23,
124
+ AZTEC_SLASH_AMOUNT_MEDIUM: 1E+23,
125
+ AZTEC_SLASH_AMOUNT_LARGE: 1E+23,
126
+ L1_CHAIN_ID: 11155111,
127
+ TEST_ACCOUNTS: false,
128
+ SPONSORED_FPC: false,
129
+ TRANSACTIONS_DISABLED: false,
130
+ SEQ_MAX_TX_PER_CHECKPOINT: 72,
131
+ PROVER_REAL_PROOFS: true,
132
+ P2P_MAX_PENDING_TX_COUNT: 1000,
133
+ P2P_TX_POOL_DELETE_TXS_AFTER_REORG: true,
134
+ SLASH_PRUNE_PENALTY: 10000000000000000000,
135
+ SLASH_DATA_WITHHOLDING_PENALTY: 10000000000000000000,
136
+ SLASH_INACTIVITY_TARGET_PERCENTAGE: 0.9,
137
+ SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 1,
138
+ SLASH_INACTIVITY_PENALTY: 10000000000000000000,
139
+ SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY: 10000000000000000000,
140
+ SLASH_DUPLICATE_PROPOSAL_PENALTY: 10000000000000000000,
141
+ SLASH_DUPLICATE_ATTESTATION_PENALTY: 10000000000000000000,
142
+ SLASH_ATTEST_DESCENDANT_OF_INVALID_PENALTY: 10000000000000000000,
143
+ SLASH_UNKNOWN_PENALTY: 10000000000000000000,
144
+ SLASH_INVALID_BLOCK_PENALTY: 10000000000000000000,
145
+ SLASH_GRACE_PERIOD_L2_SLOTS: 64,
146
+ ENABLE_VERSION_CHECK: true,
147
+ } as const;
148
+
149
+ export const mainnetConfig = {
150
+ ETHEREUM_SLOT_DURATION: 12,
151
+ AZTEC_EPOCH_DURATION: 32,
152
+ AZTEC_TARGET_COMMITTEE_SIZE: 48,
153
+ AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET: 2,
154
+ AZTEC_LAG_IN_EPOCHS_FOR_RANDAO: 2,
155
+ AZTEC_INBOX_LAG: 1,
156
+ AZTEC_PROOF_SUBMISSION_EPOCHS: 1,
157
+ AZTEC_INITIAL_ETH_PER_FEE_ASSET: 10000000,
158
+ AZTEC_SLASHER_FLAVOR: 'tally',
159
+ AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS: 4,
160
+ AZTEC_SLASHING_OFFSET_IN_ROUNDS: 2,
161
+ SLASH_MIN_PENALTY_PERCENTAGE: 0.5,
162
+ SLASH_MAX_PENALTY_PERCENTAGE: 2,
163
+ SLASH_OFFENSE_EXPIRATION_ROUNDS: 4,
164
+ SLASH_MAX_PAYLOAD_SIZE: 80,
165
+ SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4,
166
+ P2P_ENABLED: true,
167
+ BOOTSTRAP_NODES: '',
168
+ SEQ_MIN_TX_PER_BLOCK: 0,
169
+ SEQ_BUILD_CHECKPOINT_IF_EMPTY: true,
170
+ SEQ_BLOCK_DURATION_MS: 6000,
171
+ SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36,
172
+ DATA_STORE_MAP_SIZE_KB: 134217728,
173
+ ARCHIVER_STORE_MAP_SIZE_KB: 1073741824,
174
+ NOTE_HASH_TREE_MAP_SIZE_KB: 1073741824,
175
+ NULLIFIER_TREE_MAP_SIZE_KB: 1073741824,
176
+ PUBLIC_DATA_TREE_MAP_SIZE_KB: 1073741824,
177
+ PUBLIC_OTEL_INCLUDE_METRICS: 'aztec.validator,aztec.tx_collector,aztec.mempool,aztec.p2p.gossip.agg_,aztec.ivc_verifier.agg_',
178
+ SENTINEL_ENABLED: true,
179
+ AZTEC_SLOT_DURATION: 72,
180
+ AZTEC_ACTIVATION_THRESHOLD: 2E+23,
181
+ AZTEC_EJECTION_THRESHOLD: 1E+23,
182
+ AZTEC_LOCAL_EJECTION_THRESHOLD: 1.9E+23,
183
+ AZTEC_SLASH_AMOUNT_SMALL: 2E+21,
184
+ AZTEC_SLASH_AMOUNT_MEDIUM: 2E+21,
185
+ AZTEC_SLASH_AMOUNT_LARGE: 2E+21,
186
+ AZTEC_SLASHING_LIFETIME_IN_ROUNDS: 34,
187
+ AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS: 28,
188
+ AZTEC_SLASHING_VETOER: '0xBbB4aF368d02827945748b28CD4b2D42e4A37480',
189
+ AZTEC_SLASHING_QUORUM: 65,
190
+ AZTEC_GOVERNANCE_PROPOSER_QUORUM: 600,
191
+ AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE: 1000,
192
+ AZTEC_MANA_TARGET: 75000000,
193
+ AZTEC_PROVING_COST_PER_MANA: 25000000,
194
+ AZTEC_EXIT_DELAY_SECONDS: 345600,
195
+ AZTEC_SLASHING_DISABLE_DURATION: 259200,
196
+ AZTEC_ENTRY_QUEUE_BOOTSTRAP_VALIDATOR_SET_SIZE: 500,
197
+ AZTEC_ENTRY_QUEUE_BOOTSTRAP_FLUSH_SIZE: 500,
198
+ AZTEC_ENTRY_QUEUE_FLUSH_SIZE_MIN: 1,
199
+ AZTEC_ENTRY_QUEUE_FLUSH_SIZE_QUOTIENT: 400,
200
+ AZTEC_ENTRY_QUEUE_MAX_FLUSH_SIZE: 4,
201
+ L1_CHAIN_ID: 1,
202
+ TEST_ACCOUNTS: false,
203
+ SPONSORED_FPC: false,
204
+ TRANSACTIONS_DISABLED: false,
205
+ SEQ_MAX_TX_PER_CHECKPOINT: 72,
206
+ PROVER_REAL_PROOFS: true,
207
+ SYNC_SNAPSHOTS_URLS: 'https://aztec-labs-snapshots.com/mainnet/',
208
+ BLOB_ALLOW_EMPTY_SOURCES: true,
209
+ P2P_MAX_PENDING_TX_COUNT: 1000,
210
+ P2P_TX_POOL_DELETE_TXS_AFTER_REORG: true,
211
+ PUBLIC_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',
212
+ PUBLIC_OTEL_COLLECT_FROM: '',
213
+ ENABLE_VERSION_CHECK: false,
214
+ SLASH_PRUNE_PENALTY: 0,
215
+ SLASH_DATA_WITHHOLDING_PENALTY: 0,
216
+ SLASH_INACTIVITY_TARGET_PERCENTAGE: 0.8,
217
+ SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 2,
218
+ SLASH_INACTIVITY_PENALTY: 2E+21,
219
+ SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY: 2E+21,
220
+ SLASH_DUPLICATE_PROPOSAL_PENALTY: 2E+21,
221
+ SLASH_DUPLICATE_ATTESTATION_PENALTY: 2E+21,
222
+ SLASH_ATTEST_DESCENDANT_OF_INVALID_PENALTY: 2E+21,
223
+ SLASH_UNKNOWN_PENALTY: 2E+21,
224
+ SLASH_INVALID_BLOCK_PENALTY: 2E+21,
225
+ SLASH_GRACE_PERIOD_L2_SLOTS: 1200,
226
+ } as const;
227
+
@@ -1,4 +1,7 @@
1
- import { type L1ContractAddresses, RegistryContract, getL1ContractsConfig, getPublicClient } from '@aztec/ethereum';
1
+ import { getPublicClient } from '@aztec/ethereum/client';
2
+ import { RegistryContract } from '@aztec/ethereum/contracts';
3
+ import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
4
+ import { getL1ContractsConfig } from '@aztec/ethereum/queries';
2
5
  import { EthAddress } from '@aztec/foundation/eth-address';
3
6
 
4
7
  export async function getL1Config(
@@ -8,27 +8,66 @@ import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
8
8
 
9
9
  const DEFAULT_CONFIG_URL =
10
10
  'https://raw.githubusercontent.com/AztecProtocol/networks/refs/heads/main/network_config.json';
11
- const NETWORK_CONFIG_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour
11
+ const FALLBACK_CONFIG_URL = 'https://metadata.aztec.network/network_config.json';
12
12
 
13
13
  /**
14
14
  * Fetches remote network configuration from GitHub with caching support.
15
- * Uses the reusable cachedFetch utility.
15
+ * Uses the reusable cachedFetch utility. Falls back to metadata.aztec.network if the default URL fails.
16
16
  *
17
17
  * @param networkName - The network name to fetch config for
18
18
  * @param cacheDir - Optional cache directory for storing fetched config
19
- * @returns Remote configuration for the specified network, or undefined if not found/error
19
+ * @returns Remote configuration for the specified network, or undefined if network not found in config
20
+ * @throws Error if both primary and fallback URLs fail to fetch
20
21
  */
21
22
  export async function getNetworkConfig(
22
23
  networkName: NetworkNames,
23
24
  cacheDir?: string,
24
25
  ): Promise<NetworkConfig | undefined> {
25
- let url: URL | undefined;
26
+ // Try with the primary URL (env var or default)
26
27
  const configLocation = process.env.NETWORK_CONFIG_LOCATION || DEFAULT_CONFIG_URL;
27
28
 
28
- if (!configLocation) {
29
- return undefined;
29
+ let primaryError: Error | undefined;
30
+ let config: NetworkConfig | undefined;
31
+
32
+ // First try the primary config location
33
+ try {
34
+ config = await fetchNetworkConfigFromUrl(configLocation, networkName, cacheDir);
35
+ } catch (error) {
36
+ primaryError = error as Error;
30
37
  }
31
38
 
39
+ // If primary fails and we were using the default URL, try the fallback
40
+ if (!config && configLocation === DEFAULT_CONFIG_URL) {
41
+ try {
42
+ config = await fetchNetworkConfigFromUrl(FALLBACK_CONFIG_URL, networkName, cacheDir);
43
+ } catch {
44
+ // Both failed - throw the primary error
45
+ if (primaryError) {
46
+ throw primaryError;
47
+ }
48
+ }
49
+ } else if (primaryError) {
50
+ // Primary failed and no fallback to try
51
+ throw primaryError;
52
+ }
53
+
54
+ return config;
55
+ }
56
+
57
+ /**
58
+ * Helper function to fetch network config from a specific URL.
59
+ * @param configLocation - The URL or file path to fetch from
60
+ * @param networkName - The network name to fetch config for
61
+ * @param cacheDir - Optional cache directory for storing fetched config
62
+ * @returns Remote configuration for the specified network, or undefined if network not found in config, or undefined if URL invalid
63
+ * @throws Error if fetch/parse fails
64
+ */
65
+ async function fetchNetworkConfigFromUrl(
66
+ configLocation: string,
67
+ networkName: NetworkNames,
68
+ cacheDir?: string,
69
+ ): Promise<NetworkConfig | undefined> {
70
+ let url: URL | undefined;
32
71
  try {
33
72
  if (configLocation.includes('://')) {
34
73
  url = new URL(configLocation);
@@ -43,31 +82,26 @@ export async function getNetworkConfig(
43
82
  return undefined;
44
83
  }
45
84
 
46
- try {
47
- let rawConfig: any;
48
-
49
- if (url.protocol === 'http:' || url.protocol === 'https:') {
50
- rawConfig = await cachedFetch(url.href, {
51
- cacheDurationMs: NETWORK_CONFIG_CACHE_DURATION_MS,
52
- cacheFile: cacheDir ? join(cacheDir, networkName, 'network_config.json') : undefined,
53
- });
54
- } else if (url.protocol === 'file:') {
55
- rawConfig = JSON.parse(await readFile(url.pathname, 'utf-8'));
56
- } else {
57
- throw new Error('Unsupported Aztec network config protocol: ' + url.href);
58
- }
85
+ let rawConfig: any;
59
86
 
60
- if (!rawConfig) {
61
- return undefined;
62
- }
87
+ if (url.protocol === 'http:' || url.protocol === 'https:') {
88
+ rawConfig = await cachedFetch(url.href, {
89
+ cacheFile: cacheDir ? join(cacheDir, networkName, 'network_config.json') : undefined,
90
+ });
91
+ } else if (url.protocol === 'file:') {
92
+ rawConfig = JSON.parse(await readFile(url.pathname, 'utf-8'));
93
+ } else {
94
+ throw new Error('Unsupported Aztec network config protocol: ' + url.href);
95
+ }
63
96
 
64
- const networkConfigMap = NetworkConfigMapSchema.parse(rawConfig);
65
- if (networkName in networkConfigMap) {
66
- return networkConfigMap[networkName];
67
- } else {
68
- return undefined;
69
- }
70
- } catch {
97
+ if (!rawConfig) {
98
+ return undefined;
99
+ }
100
+
101
+ const networkConfigMap = NetworkConfigMapSchema.parse(rawConfig);
102
+ if (networkName in networkConfigMap) {
103
+ return networkConfigMap[networkName];
104
+ } else {
71
105
  return undefined;
72
106
  }
73
107
  }
@@ -75,9 +109,11 @@ export async function getNetworkConfig(
75
109
  /**
76
110
  * Enriches environment variables with remote network configuration.
77
111
  * This function is called before node config initialization to set env vars
78
- * from the remote config, following the same pattern as enrichEnvironmentWithChainConfig().
112
+ * from the remote config.
79
113
  *
80
114
  * @param networkName - The network name to fetch remote config for
115
+ * @throws Error if network config fetch fails (network errors, parse errors, etc.)
116
+ * Does not throw if the network simply doesn't exist in the config - just returns without enriching
81
117
  */
82
118
  export async function enrichEnvironmentWithNetworkConfig(networkName: NetworkNames) {
83
119
  if (networkName === 'local') {
@@ -88,7 +124,7 @@ export async function enrichEnvironmentWithNetworkConfig(networkName: NetworkNam
88
124
  const networkConfig = await getNetworkConfig(networkName, cacheDir);
89
125
 
90
126
  if (!networkConfig) {
91
- return;
127
+ return; // Network not found in config, continue without enriching
92
128
  }
93
129
 
94
130
  enrichVar('BOOTSTRAP_NODES', networkConfig.bootnodes.join(','));
@@ -99,4 +135,14 @@ export async function enrichEnvironmentWithNetworkConfig(networkName: NetworkNam
99
135
  if (networkConfig.feeAssetHandlerAddress) {
100
136
  enrichEthAddressVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', networkConfig.feeAssetHandlerAddress.toString());
101
137
  }
138
+
139
+ if (networkConfig.blobFileStoreUrls?.length) {
140
+ enrichVar('BLOB_FILE_STORE_URLS', networkConfig.blobFileStoreUrls.join(','));
141
+ }
142
+ if (networkConfig.blockDurationMs !== undefined) {
143
+ enrichVar('SEQ_BLOCK_DURATION_MS', String(networkConfig.blockDurationMs));
144
+ }
145
+ if (networkConfig.txPublicSetupAllowListExtend) {
146
+ enrichVar('TX_PUBLIC_SETUP_ALLOWLIST', networkConfig.txPublicSetupAllowListExtend);
147
+ }
102
148
  }
@@ -6,23 +6,23 @@ import {
6
6
  loadContractArtifact,
7
7
  } from '@aztec/aztec.js/abi';
8
8
  import { EthAddress } from '@aztec/aztec.js/addresses';
9
- import {
10
- type DeployL1ContractsReturnType,
11
- type L1ContractsConfig,
12
- type Operator,
13
- RollupContract,
14
- } from '@aztec/ethereum';
9
+ import type { L1ContractsConfig } from '@aztec/ethereum/config';
10
+ import { RollupContract } from '@aztec/ethereum/contracts';
11
+ import type { Operator } from '@aztec/ethereum/deploy-aztec-l1-contracts';
15
12
  import { SecretValue } from '@aztec/foundation/config';
16
- import { Fr } from '@aztec/foundation/fields';
17
- import type { LogFn, Logger } from '@aztec/foundation/log';
13
+ import { Fr } from '@aztec/foundation/curves/bn254';
14
+ import { type LogFn, createLogger } from '@aztec/foundation/log';
18
15
  import type { NoirPackageConfig } from '@aztec/foundation/noir';
19
16
  import { protocolContractsHash } from '@aztec/protocol-contracts';
20
17
 
21
18
  import TOML from '@iarna/toml';
22
19
  import { readFile } from 'fs/promises';
20
+ import type { HDAccount, Hex, PrivateKeyAccount } from 'viem';
23
21
 
24
22
  import { encodeArgs } from './encoding.js';
25
23
 
24
+ const logger = createLogger('cli:utils:aztec');
25
+
26
26
  /**
27
27
  * Helper to get an ABI function or throw error if it doesn't exist.
28
28
  * @param artifact - Contract's build artifact in JSON format.
@@ -37,89 +37,32 @@ export function getFunctionAbi(artifact: ContractArtifact, fnName: string): Func
37
37
  return fn;
38
38
  }
39
39
 
40
- /**
41
- * Function to execute the 'deployRollupContracts' command.
42
- * @param rpcUrls - The RPC URL of the ethereum node.
43
- * @param chainId - The chain ID of the L1 host.
44
- * @param privateKey - The private key to be used in contract deployment.
45
- * @param mnemonic - The mnemonic to be used in contract deployment.
46
- */
47
- export async function deployAztecContracts(
48
- rpcUrls: string[],
49
- chainId: number,
50
- privateKey: string | undefined,
51
- mnemonic: string,
52
- mnemonicIndex: number,
53
- salt: number | undefined,
54
- initialValidators: Operator[],
55
- genesisArchiveRoot: Fr,
56
- feeJuicePortalInitialBalance: bigint,
57
- acceleratedTestDeployments: boolean,
58
- config: L1ContractsConfig,
59
- existingToken: EthAddress | undefined,
60
- realVerifier: boolean,
61
- createVerificationJson: string | false,
62
- debugLogger: Logger,
63
- ): Promise<DeployL1ContractsReturnType> {
64
- const { createEthereumChain, deployL1Contracts } = await import('@aztec/ethereum');
65
- const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
66
-
67
- const account = !privateKey
68
- ? mnemonicToAccount(mnemonic!, { addressIndex: mnemonicIndex })
69
- : privateKeyToAccount(addLeadingHex(privateKey));
70
- const chain = createEthereumChain(rpcUrls, chainId);
71
-
72
- const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
73
-
74
- const result = await deployL1Contracts(
75
- chain.rpcUrls,
76
- account,
77
- chain.chainInfo,
78
- debugLogger,
79
- {
80
- vkTreeRoot: getVKTreeRoot(),
81
- protocolContractsHash,
82
- genesisArchiveRoot,
83
- salt,
84
- initialValidators,
85
- acceleratedTestDeployments,
86
- feeJuicePortalInitialBalance,
87
- realVerifier,
88
- existingTokenAddress: existingToken,
89
- ...config,
90
- },
91
- config,
92
- createVerificationJson,
93
- );
94
-
95
- return result;
96
- }
97
-
98
40
  export async function deployNewRollupContracts(
99
41
  registryAddress: EthAddress,
100
42
  rpcUrls: string[],
101
- chainId: number,
102
43
  privateKey: string | undefined,
44
+ chainId: number,
103
45
  mnemonic: string,
104
46
  mnemonicIndex: number,
105
- salt: number | undefined,
106
47
  initialValidators: Operator[],
107
48
  genesisArchiveRoot: Fr,
108
49
  feeJuicePortalInitialBalance: bigint,
109
50
  config: L1ContractsConfig,
110
51
  realVerifier: boolean,
111
- createVerificationJson: string | false,
112
- logger: Logger,
113
52
  ): Promise<{ rollup: RollupContract; slashFactoryAddress: EthAddress }> {
114
- const { createEthereumChain, deployRollupForUpgrade, createExtendedL1Client } = await import('@aztec/ethereum');
53
+ const { deployRollupForUpgrade } = await import('@aztec/ethereum/deploy-aztec-l1-contracts');
115
54
  const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
116
55
  const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
117
56
 
118
- const account = !privateKey
119
- ? mnemonicToAccount(mnemonic!, { addressIndex: mnemonicIndex })
120
- : privateKeyToAccount(addLeadingHex(privateKey));
121
- const chain = createEthereumChain(rpcUrls, chainId);
122
- const client = createExtendedL1Client(rpcUrls, account, chain.chainInfo, undefined, mnemonicIndex);
57
+ let account: HDAccount | PrivateKeyAccount;
58
+ if (privateKey) {
59
+ account = privateKeyToAccount(addLeadingHex(privateKey));
60
+ } else {
61
+ account = mnemonicToAccount(mnemonic!, { addressIndex: mnemonicIndex });
62
+ const privateKeyBuf = account.getHdKey().privateKey;
63
+ const privateKeyHex = Buffer.from(privateKeyBuf!).toString('hex');
64
+ privateKey = `0x${privateKeyHex}`;
65
+ }
123
66
 
124
67
  if (!initialValidators || initialValidators.length === 0) {
125
68
  // initialize the new rollup with Amin's validator address.
@@ -138,9 +81,11 @@ export async function deployNewRollupContracts(
138
81
  }
139
82
 
140
83
  const { rollup, slashFactoryAddress } = await deployRollupForUpgrade(
141
- client,
84
+ privateKey as Hex,
85
+ rpcUrls[0],
86
+ chainId,
87
+ registryAddress,
142
88
  {
143
- salt,
144
89
  vkTreeRoot: getVKTreeRoot(),
145
90
  protocolContractsHash,
146
91
  genesisArchiveRoot,
@@ -149,13 +94,9 @@ export async function deployNewRollupContracts(
149
94
  realVerifier,
150
95
  ...config,
151
96
  },
152
- registryAddress,
153
- logger,
154
- config,
155
- createVerificationJson,
156
97
  );
157
98
 
158
- return { rollup, slashFactoryAddress };
99
+ return { rollup, slashFactoryAddress: EthAddress.fromString(slashFactoryAddress!) };
159
100
  }
160
101
 
161
102
  /**
@@ -1,11 +1,12 @@
1
- import { FunctionSelector } from '@aztec/aztec.js/abi';
2
- import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
3
- import { Fr } from '@aztec/aztec.js/fields';
4
- import { LogId } from '@aztec/aztec.js/log';
5
- import { TxHash } from '@aztec/aztec.js/tx';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
+ import { EthAddress } from '@aztec/foundation/eth-address';
6
3
  import type { LogFn } from '@aztec/foundation/log';
7
4
  import type { PXE } from '@aztec/pxe/server';
5
+ import { FunctionSelector } from '@aztec/stdlib/abi/function-selector';
6
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
8
7
  import { PublicKeys } from '@aztec/stdlib/keys';
8
+ import { LogId } from '@aztec/stdlib/logs/log-id';
9
+ import { TxHash } from '@aztec/stdlib/tx/tx-hash';
9
10
 
10
11
  import { type Command, CommanderError, InvalidArgumentError, Option } from 'commander';
11
12
  import { lookup } from 'dns/promises';
@@ -112,6 +113,34 @@ export async function getTxSender(pxe: PXE, _from?: string) {
112
113
  return from;
113
114
  }
114
115
 
116
+ /**
117
+ * Parses and validates a hex string. Removes leading 0x if present, checks for hex validity,
118
+ * and enforces an optional minimum length.
119
+ * @param hex - The hex string to validate.
120
+ * @param minLen - Optional minimum length (in hex characters, after stripping '0x').
121
+ * @returns The normalized hex string (without leading 0x).
122
+ * @throws InvalidArgumentError if the string is not valid hex or does not meet the minimum length.
123
+ */
124
+ // minLen is now interpreted as the minimum number of bytes (2 hex characters per byte)
125
+ export function parseHex(hex: string, minLen?: number): `0x${string}` {
126
+ const normalized = hex.startsWith('0x') ? hex.slice(2) : hex;
127
+
128
+ if (!/^[0-9a-fA-F]*$/.test(normalized)) {
129
+ throw new InvalidArgumentError('Invalid hex string');
130
+ }
131
+
132
+ if (minLen !== undefined) {
133
+ const minHexLen = minLen * 2;
134
+ if (normalized.length < minHexLen) {
135
+ throw new InvalidArgumentError(
136
+ `Hex string is too short (length ${normalized.length}), minimum byte length is ${minLen} (hex chars: ${minHexLen})`,
137
+ );
138
+ }
139
+ }
140
+
141
+ return `0x${normalized}`;
142
+ }
143
+
115
144
  /**
116
145
  * Removes the leading 0x from a hex string. If no leading 0x is found the string is returned unchanged.
117
146
  * @param hex - A hex string
@@ -166,7 +195,7 @@ export function parseAztecAddress(address: string): AztecAddress {
166
195
  try {
167
196
  return AztecAddress.fromString(address);
168
197
  } catch {
169
- throw new InvalidArgumentError(`Invalid address: ${address}`);
198
+ throw new InvalidArgumentError(`Invalid Aztec address: ${address}`);
170
199
  }
171
200
  }
172
201
 
@@ -180,7 +209,7 @@ export function parseEthereumAddress(address: string): EthAddress {
180
209
  try {
181
210
  return EthAddress.fromString(address);
182
211
  } catch {
183
- throw new InvalidArgumentError(`Invalid address: ${address}`);
212
+ throw new InvalidArgumentError(`Invalid Ethereumaddress: ${address}`);
184
213
  }
185
214
  }
186
215
 
@@ -234,7 +263,11 @@ export function parseOptionalSelector(selector: string): FunctionSelector | unde
234
263
  * @returns The parsed integer, or undefined if the input string is falsy.
235
264
  * @throws If the input is not a valid integer.
236
265
  */
237
- export function parseOptionalInteger(value: string): number | undefined {
266
+ export function parseOptionalInteger(
267
+ value: string,
268
+ min: number = Number.MIN_SAFE_INTEGER,
269
+ max: number = Number.MAX_SAFE_INTEGER,
270
+ ): number | undefined {
238
271
  if (!value) {
239
272
  return undefined;
240
273
  }
@@ -242,6 +275,12 @@ export function parseOptionalInteger(value: string): number | undefined {
242
275
  if (!Number.isInteger(parsed)) {
243
276
  throw new InvalidArgumentError('Invalid integer.');
244
277
  }
278
+ if (parsed < min) {
279
+ throw new InvalidArgumentError(`Value must be greater than ${min}.`);
280
+ }
281
+ if (parsed > max) {
282
+ throw new InvalidArgumentError(`Value must be less than ${max}.`);
283
+ }
245
284
  return parsed;
246
285
  }
247
286
 
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import type { ABIParameter, AbiType, StructType } from '@aztec/stdlib/abi';
3
3
 
4
4
  /**
@@ -1,10 +1,11 @@
1
+ import { BlockNumber } from '@aztec/foundation/branded-types';
1
2
  import type { LogFn } from '@aztec/foundation/log';
2
3
  import type { AztecNode } from '@aztec/stdlib/interfaces/client';
3
4
  import type { TxHash } from '@aztec/stdlib/tx';
4
5
 
5
6
  export async function inspectBlock(
6
7
  aztecNode: AztecNode,
7
- blockNumber: number,
8
+ blockNumber: BlockNumber,
8
9
  log: LogFn,
9
10
  opts: { showTxs?: boolean } = {},
10
11
  ) {
@@ -43,7 +44,10 @@ export async function inspectTx(
43
44
  const [receipt, effectsInBlock] = await Promise.all([aztecNode.getTxReceipt(txHash), aztecNode.getTxEffect(txHash)]);
44
45
  // Base tx data
45
46
  log(`Tx ${txHash.toString()}`);
46
- log(` Status: ${receipt.status} ${effectsInBlock ? `(${effectsInBlock.data.revertCode.getDescription()})` : ''}`);
47
+ log(` Status: ${receipt.status}`);
48
+ if (receipt.executionResult) {
49
+ log(` Execution result: ${receipt.executionResult}`);
50
+ }
47
51
  if (receipt.error) {
48
52
  log(` Error: ${receipt.error}`);
49
53
  }