@aztec/stdlib 6.0.0-nightly.20260605 → 6.0.0-nightly.20260721

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 (499) hide show
  1. package/dest/abi/buffer.d.ts +6 -2
  2. package/dest/abi/buffer.d.ts.map +1 -1
  3. package/dest/abi/buffer.js +13 -1
  4. package/dest/avm/avm.js +1 -1
  5. package/dest/avm/avm_proving_request.d.ts +70 -70
  6. package/dest/avm/index.d.ts +1 -6
  7. package/dest/avm/index.d.ts.map +1 -1
  8. package/dest/avm/index.js +0 -5
  9. package/dest/aztec-address/index.d.ts +35 -5
  10. package/dest/aztec-address/index.d.ts.map +1 -1
  11. package/dest/aztec-address/index.js +32 -8
  12. package/dest/block/attestation_info.d.ts +1 -1
  13. package/dest/block/attestation_info.d.ts.map +1 -1
  14. package/dest/block/attestation_info.js +7 -4
  15. package/dest/block/l2_block_source.d.ts +46 -23
  16. package/dest/block/l2_block_source.d.ts.map +1 -1
  17. package/dest/block/l2_block_source.js +15 -1
  18. package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts +39 -0
  19. package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts.map +1 -0
  20. package/dest/block/l2_block_stream/event_driven_l2_block_stream.js +165 -0
  21. package/dest/block/l2_block_stream/index.d.ts +2 -1
  22. package/dest/block/l2_block_stream/index.d.ts.map +1 -1
  23. package/dest/block/l2_block_stream/index.js +1 -0
  24. package/dest/block/l2_block_stream/interfaces.d.ts +81 -11
  25. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  26. package/dest/block/l2_block_stream/interfaces.js +25 -1
  27. package/dest/block/l2_block_stream/l2_block_stream.d.ts +23 -15
  28. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  29. package/dest/block/l2_block_stream/l2_block_stream.js +149 -152
  30. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +6 -12
  31. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  32. package/dest/block/l2_block_stream/l2_tips_memory_store.js +8 -32
  33. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +17 -18
  34. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
  35. package/dest/block/l2_block_stream/l2_tips_store_base.js +70 -58
  36. package/dest/block/proposal/attestations_and_signers.d.ts +19 -1
  37. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  38. package/dest/block/proposal/attestations_and_signers.js +47 -7
  39. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  40. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  41. package/dest/block/test/l2_tips_store_test_suite.js +296 -37
  42. package/dest/block/validate_block_result.d.ts +16 -1
  43. package/dest/block/validate_block_result.d.ts.map +1 -1
  44. package/dest/block/validate_block_result.js +18 -3
  45. package/dest/checkpoint/checkpoint.js +2 -2
  46. package/dest/checkpoint/index.d.ts +2 -1
  47. package/dest/checkpoint/index.d.ts.map +1 -1
  48. package/dest/checkpoint/index.js +1 -0
  49. package/dest/checkpoint/simulation_overrides.d.ts +61 -0
  50. package/dest/checkpoint/simulation_overrides.d.ts.map +1 -0
  51. package/dest/checkpoint/simulation_overrides.js +98 -0
  52. package/dest/checkpoint/validate.d.ts +11 -3
  53. package/dest/checkpoint/validate.d.ts.map +1 -1
  54. package/dest/checkpoint/validate.js +9 -6
  55. package/dest/config/index.d.ts +2 -1
  56. package/dest/config/index.d.ts.map +1 -1
  57. package/dest/config/index.js +1 -0
  58. package/dest/config/network-consensus-config.d.ts +72 -0
  59. package/dest/config/network-consensus-config.d.ts.map +1 -0
  60. package/dest/config/network-consensus-config.js +223 -0
  61. package/dest/config/sequencer-config.d.ts +4 -2
  62. package/dest/config/sequencer-config.d.ts.map +1 -1
  63. package/dest/config/sequencer-config.js +22 -3
  64. package/dest/contract/contract_address.d.ts +5 -4
  65. package/dest/contract/contract_address.d.ts.map +1 -1
  66. package/dest/contract/contract_class.d.ts +1 -1
  67. package/dest/contract/contract_class.d.ts.map +1 -1
  68. package/dest/contract/contract_class.js +3 -2
  69. package/dest/contract/contract_instance.d.ts +16 -2
  70. package/dest/contract/contract_instance.d.ts.map +1 -1
  71. package/dest/contract/contract_instance.js +45 -0
  72. package/dest/contract/index.d.ts +1 -2
  73. package/dest/contract/index.d.ts.map +1 -1
  74. package/dest/contract/index.js +0 -1
  75. package/dest/contract/interfaces/contract_data_source.d.ts +3 -5
  76. package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
  77. package/dest/contract/interfaces/contract_instance.d.ts +71 -10
  78. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  79. package/dest/contract/interfaces/contract_instance.js +7 -2
  80. package/dest/contract/interfaces/node-info.d.ts +11 -1
  81. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  82. package/dest/contract/interfaces/node-info.js +7 -1
  83. package/dest/contract/partial_address.d.ts +9 -3
  84. package/dest/contract/partial_address.d.ts.map +1 -1
  85. package/dest/contract/partial_address.js +8 -2
  86. package/dest/database-version/version_manager.d.ts +18 -4
  87. package/dest/database-version/version_manager.d.ts.map +1 -1
  88. package/dest/database-version/version_manager.js +76 -6
  89. package/dest/deserialization/index.d.ts +35 -3
  90. package/dest/deserialization/index.d.ts.map +1 -1
  91. package/dest/deserialization/index.js +32 -1
  92. package/dest/file-store/factory.d.ts +1 -1
  93. package/dest/file-store/factory.d.ts.map +1 -1
  94. package/dest/file-store/factory.js +7 -0
  95. package/dest/file-store/index.d.ts +2 -1
  96. package/dest/file-store/index.d.ts.map +1 -1
  97. package/dest/file-store/index.js +1 -0
  98. package/dest/file-store/memory.d.ts +24 -0
  99. package/dest/file-store/memory.d.ts.map +1 -0
  100. package/dest/file-store/memory.js +80 -0
  101. package/dest/gas/gas_settings.d.ts +7 -13
  102. package/dest/gas/gas_settings.d.ts.map +1 -1
  103. package/dest/gas/gas_settings.js +9 -16
  104. package/dest/gas/index.d.ts +2 -1
  105. package/dest/gas/index.d.ts.map +1 -1
  106. package/dest/gas/index.js +1 -0
  107. package/dest/gas/tx_gas_limits.d.ts +72 -0
  108. package/dest/gas/tx_gas_limits.d.ts.map +1 -0
  109. package/dest/gas/tx_gas_limits.js +85 -0
  110. package/dest/ha-signing/config.d.ts +19 -5
  111. package/dest/ha-signing/config.d.ts.map +1 -1
  112. package/dest/ha-signing/config.js +9 -3
  113. package/dest/ha-signing/local_config.d.ts +10 -2
  114. package/dest/ha-signing/local_config.d.ts.map +1 -1
  115. package/dest/ha-signing/local_config.js +8 -2
  116. package/dest/interfaces/archiver.d.ts +7 -9
  117. package/dest/interfaces/archiver.d.ts.map +1 -1
  118. package/dest/interfaces/archiver.js +3 -2
  119. package/dest/interfaces/aztec-node-admin.d.ts +24 -17
  120. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  121. package/dest/interfaces/aztec-node-admin.js +1 -1
  122. package/dest/interfaces/aztec-node-debug.d.ts +40 -2
  123. package/dest/interfaces/aztec-node-debug.d.ts.map +1 -1
  124. package/dest/interfaces/aztec-node-debug.js +29 -1
  125. package/dest/interfaces/aztec-node.d.ts +69 -28
  126. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  127. package/dest/interfaces/aztec-node.js +56 -20
  128. package/dest/interfaces/block-builder.d.ts +3 -1
  129. package/dest/interfaces/block-builder.d.ts.map +1 -1
  130. package/dest/interfaces/chain_tips.d.ts +8 -47
  131. package/dest/interfaces/chain_tips.d.ts.map +1 -1
  132. package/dest/interfaces/chain_tips.js +1 -6
  133. package/dest/interfaces/checkpoint_parameter.d.ts +3 -3
  134. package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -1
  135. package/dest/interfaces/checkpoint_parameter.js +3 -3
  136. package/dest/interfaces/client.d.ts +2 -1
  137. package/dest/interfaces/client.d.ts.map +1 -1
  138. package/dest/interfaces/configs.d.ts +27 -6
  139. package/dest/interfaces/configs.d.ts.map +1 -1
  140. package/dest/interfaces/configs.js +5 -1
  141. package/dest/interfaces/get_tx_by_hash_options.d.ts +9 -0
  142. package/dest/interfaces/get_tx_by_hash_options.d.ts.map +1 -0
  143. package/dest/interfaces/get_tx_by_hash_options.js +4 -0
  144. package/dest/interfaces/merkle_tree_operations.d.ts +8 -3
  145. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  146. package/dest/interfaces/p2p.d.ts +38 -9
  147. package/dest/interfaces/p2p.d.ts.map +1 -1
  148. package/dest/interfaces/p2p.js +14 -2
  149. package/dest/interfaces/private_kernel_prover.d.ts +71 -12
  150. package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
  151. package/dest/interfaces/prover-client.d.ts +2 -3
  152. package/dest/interfaces/prover-client.d.ts.map +1 -1
  153. package/dest/interfaces/prover-node.d.ts +12 -8
  154. package/dest/interfaces/prover-node.d.ts.map +1 -1
  155. package/dest/interfaces/prover-node.js +24 -17
  156. package/dest/interfaces/proving-job.d.ts +4 -4
  157. package/dest/interfaces/proving-job.d.ts.map +1 -1
  158. package/dest/interfaces/proving-job.js +2 -2
  159. package/dest/interfaces/server.d.ts +1 -3
  160. package/dest/interfaces/server.d.ts.map +1 -1
  161. package/dest/interfaces/server.js +0 -2
  162. package/dest/interfaces/server_circuit_prover.d.ts +3 -3
  163. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  164. package/dest/interfaces/validator.d.ts +15 -4
  165. package/dest/interfaces/validator.d.ts.map +1 -1
  166. package/dest/interfaces/validator.js +3 -1
  167. package/dest/interfaces/world_state.d.ts +14 -1
  168. package/dest/interfaces/world_state.d.ts.map +1 -1
  169. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +8 -2
  170. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
  171. package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +12 -74
  172. package/dest/kernel/hints/index.d.ts +1 -2
  173. package/dest/kernel/hints/index.d.ts.map +1 -1
  174. package/dest/kernel/hints/index.js +0 -1
  175. package/dest/kernel/hints/read_request.js +1 -1
  176. package/dest/kernel/index.d.ts +6 -2
  177. package/dest/kernel/index.d.ts.map +1 -1
  178. package/dest/kernel/index.js +5 -1
  179. package/dest/kernel/log_hash.d.ts +1 -1
  180. package/dest/kernel/log_hash.d.ts.map +1 -1
  181. package/dest/kernel/log_hash.js +2 -2
  182. package/dest/kernel/note_hash.js +1 -1
  183. package/dest/kernel/nullifier.js +1 -1
  184. package/dest/kernel/private_circuit_public_inputs.d.ts +13 -3
  185. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  186. package/dest/kernel/private_circuit_public_inputs.js +14 -7
  187. package/dest/kernel/private_context_inputs.d.ts +4 -3
  188. package/dest/kernel/private_context_inputs.d.ts.map +1 -1
  189. package/dest/kernel/private_context_inputs.js +7 -3
  190. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +7 -9
  191. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  192. package/dest/kernel/private_kernel_circuit_public_inputs.js +10 -7
  193. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +2 -3
  194. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -1
  195. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +3 -5
  196. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +2 -3
  197. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -1
  198. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +3 -5
  199. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.d.ts +24 -0
  200. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.d.ts.map +1 -0
  201. package/dest/kernel/private_kernel_init_4_circuit_private_inputs.js +37 -0
  202. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.d.ts +25 -0
  203. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.d.ts.map +1 -0
  204. package/dest/kernel/private_kernel_init_5_circuit_private_inputs.js +39 -0
  205. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +1 -9
  206. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  207. package/dest/kernel/private_kernel_init_circuit_private_inputs.js +2 -6
  208. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.d.ts +18 -0
  209. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.d.ts.map +1 -0
  210. package/dest/kernel/private_kernel_inner_4_circuit_private_inputs.js +27 -0
  211. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.d.ts +19 -0
  212. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.d.ts.map +1 -0
  213. package/dest/kernel/private_kernel_inner_5_circuit_private_inputs.js +29 -0
  214. package/dest/kernel/private_kernel_prover_output.d.ts +4 -1
  215. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
  216. package/dest/kernel/private_kernel_prover_output.js +4 -1
  217. package/dest/kernel/private_kernel_reset_dimensions.d.ts +7 -8
  218. package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
  219. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts +29 -0
  220. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts.map +1 -0
  221. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.js +36 -0
  222. package/dest/kernel/private_kernel_simulated_output.d.ts +1 -7
  223. package/dest/kernel/private_kernel_simulated_output.d.ts.map +1 -1
  224. package/dest/kernel/private_kernel_simulated_output.js +2 -1
  225. package/dest/kernel/private_log_data.d.ts +1 -1
  226. package/dest/kernel/private_log_data.d.ts.map +1 -1
  227. package/dest/kernel/private_log_data.js +1 -1
  228. package/dest/kernel/utils/index.d.ts +1 -2
  229. package/dest/kernel/utils/index.d.ts.map +1 -1
  230. package/dest/kernel/utils/index.js +0 -1
  231. package/dest/keys/derivation.d.ts +41 -5
  232. package/dest/keys/derivation.d.ts.map +1 -1
  233. package/dest/keys/derivation.js +53 -23
  234. package/dest/logs/app_tagging_secret.d.ts +30 -7
  235. package/dest/logs/app_tagging_secret.d.ts.map +1 -1
  236. package/dest/logs/app_tagging_secret.js +44 -28
  237. package/dest/logs/app_tagging_secret_kind.js +1 -1
  238. package/dest/logs/contract_class_log.d.ts +1 -2
  239. package/dest/logs/contract_class_log.d.ts.map +1 -1
  240. package/dest/logs/contract_class_log.js +0 -4
  241. package/dest/logs/message_context.d.ts +5 -15
  242. package/dest/logs/message_context.d.ts.map +1 -1
  243. package/dest/logs/message_context.js +1 -66
  244. package/dest/logs/pending_tagged_log.d.ts +6 -8
  245. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  246. package/dest/logs/pending_tagged_log.js +1 -31
  247. package/dest/logs/shared_secret_derivation.d.ts +19 -6
  248. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  249. package/dest/logs/shared_secret_derivation.js +26 -11
  250. package/dest/p2p/attestation_utils.d.ts +1 -1
  251. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  252. package/dest/p2p/attestation_utils.js +8 -1
  253. package/dest/p2p/checkpoint_attestation.d.ts +10 -1
  254. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  255. package/dest/p2p/checkpoint_attestation.js +10 -0
  256. package/dest/p2p/checkpoint_proposal.d.ts +2 -1
  257. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  258. package/dest/p2p/consensus_payload.d.ts +2 -1
  259. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  260. package/dest/p2p/index.d.ts +1 -2
  261. package/dest/p2p/index.d.ts.map +1 -1
  262. package/dest/p2p/index.js +0 -1
  263. package/dest/p2p/signature_utils.d.ts +10 -1
  264. package/dest/p2p/signature_utils.d.ts.map +1 -1
  265. package/dest/p2p/signature_utils.js +9 -1
  266. package/dest/rollup/avm_proof_data.d.ts +3 -3
  267. package/dest/rollup/avm_proof_data.d.ts.map +1 -1
  268. package/dest/rollup/checkpoint_header.d.ts +8 -3
  269. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  270. package/dest/rollup/checkpoint_header.js +20 -10
  271. package/dest/stats/stats.d.ts +2 -2
  272. package/dest/stats/stats.d.ts.map +1 -1
  273. package/dest/tests/factories.d.ts +1 -27
  274. package/dest/tests/factories.d.ts.map +1 -1
  275. package/dest/tests/factories.js +10 -45
  276. package/dest/tests/mocks.d.ts +1 -1
  277. package/dest/tests/mocks.d.ts.map +1 -1
  278. package/dest/tests/mocks.js +3 -2
  279. package/dest/timetable/budgets.d.ts +57 -0
  280. package/dest/timetable/budgets.d.ts.map +1 -0
  281. package/dest/timetable/budgets.js +56 -0
  282. package/dest/timetable/build_proposer_timetable.d.ts +21 -0
  283. package/dest/timetable/build_proposer_timetable.d.ts.map +1 -0
  284. package/dest/timetable/build_proposer_timetable.js +17 -0
  285. package/dest/timetable/consensus_timetable.d.ts +70 -0
  286. package/dest/timetable/consensus_timetable.d.ts.map +1 -0
  287. package/dest/timetable/consensus_timetable.js +89 -0
  288. package/dest/timetable/index.d.ts +5 -84
  289. package/dest/timetable/index.d.ts.map +1 -1
  290. package/dest/timetable/index.js +4 -209
  291. package/dest/timetable/proposer_timetable.d.ts +106 -0
  292. package/dest/timetable/proposer_timetable.d.ts.map +1 -0
  293. package/dest/timetable/proposer_timetable.js +132 -0
  294. package/dest/trees/nullifier_membership_witness.d.ts +5 -8
  295. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  296. package/dest/trees/nullifier_membership_witness.js +0 -9
  297. package/dest/trees/public_data_witness.d.ts +7 -17
  298. package/dest/trees/public_data_witness.d.ts.map +1 -1
  299. package/dest/trees/public_data_witness.js +0 -27
  300. package/dest/tx/execution_payload.d.ts +1 -1
  301. package/dest/tx/execution_payload.d.ts.map +1 -1
  302. package/dest/tx/execution_payload.js +1 -1
  303. package/dest/tx/fee_provider.d.ts +2 -2
  304. package/dest/tx/fee_provider.d.ts.map +1 -1
  305. package/dest/tx/global_variable_builder.d.ts +2 -12
  306. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  307. package/dest/tx/global_variables.js +2 -2
  308. package/dest/tx/index.d.ts +1 -2
  309. package/dest/tx/index.d.ts.map +1 -1
  310. package/dest/tx/index.js +0 -1
  311. package/dest/tx/private_tx_constant_data.d.ts +18 -2
  312. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  313. package/dest/tx/private_tx_constant_data.js +13 -4
  314. package/dest/tx/profiling.d.ts +1 -1
  315. package/dest/tx/profiling.d.ts.map +1 -1
  316. package/dest/tx/profiling.js +2 -0
  317. package/dest/tx/simulated_tx.d.ts +10 -6
  318. package/dest/tx/simulated_tx.d.ts.map +1 -1
  319. package/dest/tx/tx.d.ts +9 -1
  320. package/dest/tx/tx.d.ts.map +1 -1
  321. package/dest/tx/tx.js +15 -0
  322. package/dest/tx/validator/error_texts.d.ts +2 -2
  323. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  324. package/dest/tx/validator/error_texts.js +1 -1
  325. package/dest/world-state/world_state_revision.d.ts +1 -18
  326. package/dest/world-state/world_state_revision.d.ts.map +1 -1
  327. package/dest/world-state/world_state_revision.js +0 -20
  328. package/package.json +8 -8
  329. package/src/abi/buffer.ts +13 -1
  330. package/src/avm/avm.ts +1 -1
  331. package/src/avm/index.ts +0 -5
  332. package/src/aztec-address/index.ts +36 -6
  333. package/src/block/attestation_info.ts +7 -2
  334. package/src/block/l2_block_source.ts +67 -13
  335. package/src/block/l2_block_stream/event_driven_l2_block_stream.ts +207 -0
  336. package/src/block/l2_block_stream/index.ts +1 -0
  337. package/src/block/l2_block_stream/interfaces.ts +96 -10
  338. package/src/block/l2_block_stream/l2_block_stream.ts +216 -175
  339. package/src/block/l2_block_stream/l2_tips_memory_store.ts +12 -41
  340. package/src/block/l2_block_stream/l2_tips_store_base.ts +84 -93
  341. package/src/block/proposal/attestations_and_signers.ts +53 -7
  342. package/src/block/test/l2_tips_store_test_suite.ts +270 -28
  343. package/src/block/validate_block_result.ts +48 -2
  344. package/src/checkpoint/checkpoint.ts +2 -2
  345. package/src/checkpoint/index.ts +1 -0
  346. package/src/checkpoint/simulation_overrides.ts +171 -0
  347. package/src/checkpoint/validate.ts +16 -6
  348. package/src/config/index.ts +1 -0
  349. package/src/config/network-consensus-config.ts +291 -0
  350. package/src/config/sequencer-config.ts +36 -5
  351. package/src/contract/contract_address.ts +4 -3
  352. package/src/contract/contract_class.ts +3 -2
  353. package/src/contract/contract_instance.ts +62 -1
  354. package/src/contract/index.ts +0 -1
  355. package/src/contract/interfaces/contract_data_source.ts +2 -4
  356. package/src/contract/interfaces/contract_instance.ts +26 -8
  357. package/src/contract/interfaces/node-info.ts +11 -0
  358. package/src/contract/partial_address.ts +8 -2
  359. package/src/database-version/version_manager.ts +96 -6
  360. package/src/deserialization/index.ts +35 -2
  361. package/src/file-store/factory.ts +7 -0
  362. package/src/file-store/index.ts +1 -0
  363. package/src/file-store/memory.ts +94 -0
  364. package/src/gas/README.md +92 -0
  365. package/src/gas/gas_settings.ts +11 -21
  366. package/src/gas/index.ts +1 -0
  367. package/src/gas/tx_gas_limits.ts +123 -0
  368. package/src/ha-signing/config.ts +23 -5
  369. package/src/ha-signing/local_config.ts +20 -1
  370. package/src/interfaces/archiver.ts +8 -9
  371. package/src/interfaces/aztec-node-admin.ts +1 -1
  372. package/src/interfaces/aztec-node-debug.ts +54 -2
  373. package/src/interfaces/aztec-node.ts +121 -43
  374. package/src/interfaces/block-builder.ts +2 -0
  375. package/src/interfaces/chain_tips.ts +8 -16
  376. package/src/interfaces/checkpoint_parameter.ts +3 -3
  377. package/src/interfaces/client.ts +1 -0
  378. package/src/interfaces/configs.ts +27 -6
  379. package/src/interfaces/get_tx_by_hash_options.ts +14 -0
  380. package/src/interfaces/merkle_tree_operations.ts +8 -2
  381. package/src/interfaces/p2p.ts +29 -9
  382. package/src/interfaces/private_kernel_prover.ts +104 -13
  383. package/src/interfaces/prover-client.ts +1 -3
  384. package/src/interfaces/prover-node.ts +32 -17
  385. package/src/interfaces/proving-job.ts +3 -3
  386. package/src/interfaces/server.ts +0 -2
  387. package/src/interfaces/server_circuit_prover.ts +2 -2
  388. package/src/interfaces/validator.ts +11 -0
  389. package/src/interfaces/world_state.ts +14 -0
  390. package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +22 -112
  391. package/src/kernel/hints/index.ts +0 -1
  392. package/src/kernel/hints/read_request.ts +1 -1
  393. package/src/kernel/index.ts +5 -1
  394. package/src/kernel/log_hash.ts +5 -2
  395. package/src/kernel/note_hash.ts +1 -1
  396. package/src/kernel/nullifier.ts +1 -1
  397. package/src/kernel/private_circuit_public_inputs.ts +12 -1
  398. package/src/kernel/private_context_inputs.ts +10 -3
  399. package/src/kernel/private_kernel_circuit_public_inputs.ts +9 -7
  400. package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +0 -3
  401. package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +0 -3
  402. package/src/kernel/private_kernel_init_4_circuit_private_inputs.ts +52 -0
  403. package/src/kernel/private_kernel_init_5_circuit_private_inputs.ts +55 -0
  404. package/src/kernel/private_kernel_init_circuit_private_inputs.ts +0 -6
  405. package/src/kernel/private_kernel_inner_4_circuit_private_inputs.ts +39 -0
  406. package/src/kernel/private_kernel_inner_5_circuit_private_inputs.ts +42 -0
  407. package/src/kernel/private_kernel_prover_output.ts +4 -0
  408. package/src/kernel/private_kernel_reset_dimensions.ts +15 -5
  409. package/src/kernel/private_kernel_reset_tail_circuit_private_inputs.ts +69 -0
  410. package/src/kernel/private_kernel_simulated_output.ts +0 -7
  411. package/src/kernel/private_log_data.ts +4 -1
  412. package/src/kernel/utils/index.ts +0 -1
  413. package/src/keys/derivation.ts +71 -21
  414. package/src/logs/app_tagging_secret.ts +56 -24
  415. package/src/logs/app_tagging_secret_kind.ts +1 -1
  416. package/src/logs/contract_class_log.ts +0 -9
  417. package/src/logs/message_context.ts +7 -65
  418. package/src/logs/pending_tagged_log.ts +6 -33
  419. package/src/logs/shared_secret_derivation.ts +31 -15
  420. package/src/p2p/attestation_utils.ts +8 -1
  421. package/src/p2p/checkpoint_attestation.ts +12 -0
  422. package/src/p2p/index.ts +0 -1
  423. package/src/p2p/signature_utils.ts +9 -0
  424. package/src/rollup/avm_proof_data.ts +2 -2
  425. package/src/rollup/checkpoint_header.ts +16 -2
  426. package/src/stats/stats.ts +6 -2
  427. package/src/tests/factories.ts +13 -51
  428. package/src/tests/mocks.ts +7 -2
  429. package/src/timetable/README.md +609 -0
  430. package/src/timetable/budgets.ts +87 -0
  431. package/src/timetable/build_proposer_timetable.ts +42 -0
  432. package/src/timetable/consensus_timetable.ts +126 -0
  433. package/src/timetable/index.ts +4 -304
  434. package/src/timetable/proposer_timetable.ts +190 -0
  435. package/src/timetable/timetable-example.svg +108 -0
  436. package/src/trees/nullifier_membership_witness.ts +0 -11
  437. package/src/trees/public_data_witness.ts +0 -31
  438. package/src/tx/execution_payload.ts +2 -1
  439. package/src/tx/fee_provider.ts +1 -1
  440. package/src/tx/global_variable_builder.ts +1 -17
  441. package/src/tx/global_variables.ts +2 -2
  442. package/src/tx/index.ts +0 -1
  443. package/src/tx/private_tx_constant_data.ts +25 -2
  444. package/src/tx/profiling.ts +2 -0
  445. package/src/tx/tx.ts +17 -0
  446. package/src/tx/validator/error_texts.ts +2 -1
  447. package/src/world-state/world_state_revision.ts +0 -33
  448. package/dest/avm/contract_storage_read.d.ts +0 -58
  449. package/dest/avm/contract_storage_read.d.ts.map +0 -1
  450. package/dest/avm/contract_storage_read.js +0 -65
  451. package/dest/avm/contract_storage_update_request.d.ts +0 -65
  452. package/dest/avm/contract_storage_update_request.d.ts.map +0 -1
  453. package/dest/avm/contract_storage_update_request.js +0 -80
  454. package/dest/avm/public_call_stack_item_compressed.d.ts +0 -43
  455. package/dest/avm/public_call_stack_item_compressed.d.ts.map +0 -1
  456. package/dest/avm/public_call_stack_item_compressed.js +0 -70
  457. package/dest/avm/public_data_update_request.d.ts +0 -62
  458. package/dest/avm/public_data_update_request.d.ts.map +0 -1
  459. package/dest/avm/public_data_update_request.js +0 -67
  460. package/dest/avm/public_inner_call_request.d.ts +0 -50
  461. package/dest/avm/public_inner_call_request.d.ts.map +0 -1
  462. package/dest/avm/public_inner_call_request.js +0 -74
  463. package/dest/contract/deployment_info.d.ts +0 -24
  464. package/dest/contract/deployment_info.d.ts.map +0 -1
  465. package/dest/contract/deployment_info.js +0 -3
  466. package/dest/interfaces/epoch-prover.d.ts +0 -57
  467. package/dest/interfaces/epoch-prover.d.ts.map +0 -1
  468. package/dest/interfaces/epoch-prover.js +0 -1
  469. package/dest/interfaces/prover-coordination.d.ts +0 -15
  470. package/dest/interfaces/prover-coordination.d.ts.map +0 -1
  471. package/dest/interfaces/prover-coordination.js +0 -1
  472. package/dest/kernel/hints/tree_leaf_read_request.d.ts +0 -14
  473. package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +0 -1
  474. package/dest/kernel/hints/tree_leaf_read_request.js +0 -33
  475. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +0 -47
  476. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +0 -1
  477. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +0 -38
  478. package/dest/kernel/utils/optional_number.d.ts +0 -31
  479. package/dest/kernel/utils/optional_number.d.ts.map +0 -1
  480. package/dest/kernel/utils/optional_number.js +0 -42
  481. package/dest/p2p/interface.d.ts +0 -5
  482. package/dest/p2p/interface.d.ts.map +0 -1
  483. package/dest/p2p/interface.js +0 -1
  484. package/dest/tx/validator/empty_validator.d.ts +0 -5
  485. package/dest/tx/validator/empty_validator.d.ts.map +0 -1
  486. package/dest/tx/validator/empty_validator.js +0 -7
  487. package/src/avm/contract_storage_read.ts +0 -77
  488. package/src/avm/contract_storage_update_request.ts +0 -93
  489. package/src/avm/public_call_stack_item_compressed.ts +0 -113
  490. package/src/avm/public_data_update_request.ts +0 -106
  491. package/src/avm/public_inner_call_request.ts +0 -85
  492. package/src/contract/deployment_info.ts +0 -25
  493. package/src/interfaces/epoch-prover.ts +0 -72
  494. package/src/interfaces/prover-coordination.ts +0 -17
  495. package/src/kernel/hints/tree_leaf_read_request.ts +0 -35
  496. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +0 -58
  497. package/src/kernel/utils/optional_number.ts +0 -50
  498. package/src/p2p/interface.ts +0 -4
  499. package/src/tx/validator/empty_validator.ts +0 -7
@@ -8,13 +8,6 @@ import { z } from 'zod';
8
8
  import { Gas, GasDimensions } from './gas.js';
9
9
  import { GasFees } from './gas_fees.js';
10
10
 
11
- /** Approximate max DA gas limit. Arbitrary, assuming 4 blocks per checkpoint — users should use gas estimation. */
12
- export const APPROXIMATE_MAX_DA_GAS_PER_BLOCK = Math.floor(MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT / 4);
13
- /** Fallback teardown L2 gas limit. Arbitrary — users should use gas estimation. */
14
- export const FALLBACK_TEARDOWN_L2_GAS_LIMIT = Math.floor(MAX_PROCESSABLE_L2_GAS / 8);
15
- /** Fallback teardown DA gas limit. Arbitrary — users should use gas estimation. */
16
- export const FALLBACK_TEARDOWN_DA_GAS_LIMIT = Math.floor(APPROXIMATE_MAX_DA_GAS_PER_BLOCK / 2);
17
-
18
11
  // For gas estimation, we use intentionally high limits above what the network can process,
19
12
  // so the simulation runs without hitting gas caps. Since teardown gas is counted towards total,
20
13
  // the total estimation limit is teardown + max processable.
@@ -106,31 +99,28 @@ export class GasSettings {
106
99
 
107
100
  /**
108
101
  * Fills in gas limits high enough for transactions to be included in most cases.
109
- * gasLimits is set to the maximum the protocol allows; since teardown gas is reserved
110
- * from gasLimits during private execution (see gas_meter.nr), the effective gas available
111
- * for app logic will be gasLimits - teardownGasLimits - privateOverhead.
112
- * The DA gas limit is set to an approximate max per block assuming 4 blocks per checkpoint,
113
- * since using the maximum per checkpoint would cause nodes to reject transactions.
102
+ * Callers must supply `gasLimits` typically the most a single tx may declare on the network
103
+ * (`min(per-tx max, per-block allocation)`), i.e. a node's advertised `txsLimits.gas`. Since teardown gas
104
+ * is reserved from gasLimits during private execution (see gas_meter.nr), the effective gas available for
105
+ * app logic is gasLimits - teardownGasLimits - privateOverhead; the teardown default is derived from the
106
+ * effective total so it always stays below it.
114
107
  * These values won't work if:
115
108
  * - Teardown consumes more than the arbitrarily assigned fallback limits
116
109
  * - The rest of the transaction consumes more than the remaining gas after teardown
117
110
  * - The DA gas limit is too low for the transaction, while still within the checkpoint limit
118
111
  */
119
112
  static fallback(overrides: {
120
- gasLimits?: Gas;
113
+ gasLimits: Gas;
121
114
  teardownGasLimits?: Gas;
122
115
  maxFeesPerGas: GasFees;
123
116
  maxPriorityFeesPerGas?: GasFees;
124
117
  }) {
118
+ const gasLimits = overrides.gasLimits;
119
+ const teardownGasLimits =
120
+ overrides.teardownGasLimits ?? new Gas(Math.floor(gasLimits.daGas / 2), Math.floor(gasLimits.l2Gas / 8));
125
121
  return GasSettings.from({
126
- gasLimits: overrides.gasLimits ?? {
127
- l2Gas: MAX_PROCESSABLE_L2_GAS,
128
- daGas: APPROXIMATE_MAX_DA_GAS_PER_BLOCK,
129
- },
130
- teardownGasLimits: overrides.teardownGasLimits ?? {
131
- l2Gas: FALLBACK_TEARDOWN_L2_GAS_LIMIT,
132
- daGas: FALLBACK_TEARDOWN_DA_GAS_LIMIT,
133
- },
122
+ gasLimits,
123
+ teardownGasLimits,
134
124
  maxFeesPerGas: overrides.maxFeesPerGas,
135
125
  maxPriorityFeesPerGas: overrides.maxPriorityFeesPerGas ?? GasFees.empty(),
136
126
  });
package/src/gas/index.ts CHANGED
@@ -3,3 +3,4 @@ export * from './gas.js';
3
3
  export * from './gas_fees.js';
4
4
  export * from './gas_settings.js';
5
5
  export * from './gas_used.js';
6
+ export * from './tx_gas_limits.js';
@@ -0,0 +1,123 @@
1
+ import {
2
+ NUM_BLOCK_END_BLOB_FIELDS,
3
+ NUM_CHECKPOINT_END_MARKER_FIELDS,
4
+ NUM_FIRST_BLOCK_END_BLOB_FIELDS,
5
+ } from '@aztec/blob-lib/encoding';
6
+ import {
7
+ BLOBS_PER_CHECKPOINT,
8
+ DA_GAS_PER_FIELD,
9
+ FIELDS_PER_BLOB,
10
+ MAX_PROCESSABLE_L2_GAS,
11
+ MAX_TX_DA_GAS,
12
+ } from '@aztec/constants';
13
+
14
+ import { type ProposerTimetableConfig, buildProposerTimetable } from '../timetable/build_proposer_timetable.js';
15
+ import type { SlotTimingConstants } from '../timetable/consensus_timetable.js';
16
+ import { Gas } from './gas.js';
17
+
18
+ /**
19
+ * Network-minimum per-block budget multiplier for L2 gas and tx-count allocation. A block packer must
20
+ * grant at least this share of the even per-block split to a single tx; operators may configure a higher
21
+ * multiplier (more generous), but not a lower one — enforced at sequencer startup. Also used as the default
22
+ * for `SequencerConfig.perBlockAllocationMultiplier`.
23
+ */
24
+ export const MIN_PER_BLOCK_ALLOCATION_MULTIPLIER = 1.2;
25
+
26
+ /**
27
+ * Network-minimum per-block budget multiplier for DA gas, applied in place of the general
28
+ * {@link MIN_PER_BLOCK_ALLOCATION_MULTIPLIER}. Higher than the general multiplier so the largest tx we
29
+ * want to support — a maximal contract class registration (~97k DA gas) — fits a single block under v5
30
+ * mainnet geometry (72s slots, 6s blocks → 10 blocks per checkpoint). A builder may configure a higher
31
+ * multiplier but never a lower one. Also used as the default for
32
+ * `SequencerConfig.perBlockDAAllocationMultiplier`.
33
+ */
34
+ export const MIN_PER_BLOCK_DA_ALLOCATION_MULTIPLIER = 1.5;
35
+
36
+ /**
37
+ * The DA gas budget available to tx data within a checkpoint of `maxBlocksPerCheckpoint` blocks. This is the
38
+ * raw blob capacity (`BLOBS_PER_CHECKPOINT * FIELDS_PER_BLOB * DA_GAS_PER_FIELD`) minus the fields the blob
39
+ * encoding reserves for overhead that no tx pays DA gas for:
40
+ *
41
+ * - one checkpoint-end marker field (`NUM_CHECKPOINT_END_MARKER_FIELDS`),
42
+ * - the first block's block-end fields (`NUM_FIRST_BLOCK_END_BLOB_FIELDS`, 7), and
43
+ * - `NUM_BLOCK_END_BLOB_FIELDS` (6) for each of the `blocks - 1` subsequent blocks.
44
+ *
45
+ * Subtracting the overhead for every block (not just the first) keeps the network DA admission limit at or
46
+ * below the builder's first-block blob-field cap at every geometry. The builder is the MOST generous for the
47
+ * first block — it only reserves that block's own block-end overhead — so being conservative here (assuming
48
+ * the checkpoint is full of blocks, each spending its share) is what guarantees admitted ⇒ buildable: a tx
49
+ * admitted under this budget always fits the first block's blob-field cap, regardless of how many blocks the
50
+ * builder ends up packing.
51
+ *
52
+ * @param maxBlocksPerCheckpoint - Number of blocks the checkpoint may contain; clamped to at least 1.
53
+ */
54
+ export function getDaCheckpointBudgetForTxs(maxBlocksPerCheckpoint: number): number {
55
+ const blocks = Math.max(1, maxBlocksPerCheckpoint);
56
+ // Clamp at zero: for absurd geometries (blocks greater than ~4094) the per-block overhead alone exceeds the
57
+ // raw blob capacity, which would otherwise yield a negative advertised DA budget.
58
+ const fields = Math.max(
59
+ 0,
60
+ BLOBS_PER_CHECKPOINT * FIELDS_PER_BLOB -
61
+ NUM_CHECKPOINT_END_MARKER_FIELDS -
62
+ NUM_FIRST_BLOCK_END_BLOB_FIELDS -
63
+ (blocks - 1) * NUM_BLOCK_END_BLOB_FIELDS,
64
+ );
65
+ return fields * DA_GAS_PER_FIELD;
66
+ }
67
+
68
+ /**
69
+ * Computes the maximum gas a single tx may declare on a network: the smaller of the per-tx protocol
70
+ * maximum and the per-block allocation a proposer grants to the first block of a checkpoint. The per-block
71
+ * allocation mirrors `CheckpointBuilder.capLimitsByCheckpointBudgets`
72
+ * (`ceil(checkpointBudget / maxBlocksPerCheckpoint * multiplier)`) using the network-minimum multipliers, so
73
+ * a tx declaring this much is admissible into a block under that geometry.
74
+ *
75
+ * This is a *network* limit: a function of network-wide constants only (timetable-derived
76
+ * blocks-per-checkpoint, checkpoint budgets, the network-minimum multipliers). It must NOT depend on a
77
+ * node's local restrictiveness — its multipliers configured above the network minimum, or its
78
+ * `maxDABlockGas` / `validateMaxDABlockGas` caps — because those make a node stricter at block-building
79
+ * time but cannot define what the network considers a valid tx for relay. The same value is advertised by
80
+ * `getNodeInfo` and enforced by the RPC/gossip/pool gas validators.
81
+ *
82
+ * The DA budget is {@link getDaCheckpointBudgetForTxs} evaluated at the clamped blocks-per-checkpoint — the
83
+ * raw blob capacity net of encoding overhead for every block — so the admission limit is consistent with the
84
+ * builder's blob-field cap.
85
+ *
86
+ * @param manaCheckpointBudget - L2 (mana) budget per checkpoint (`rollupManaLimit`).
87
+ */
88
+ export function computeNetworkTxGasLimits(opts: { maxBlocksPerCheckpoint: number; manaCheckpointBudget: number }): Gas {
89
+ const blocks = Math.max(1, opts.maxBlocksPerCheckpoint);
90
+ const daBudget = getDaCheckpointBudgetForTxs(blocks);
91
+
92
+ // Clamp by the whole-checkpoint budget too: at small block counts the per-block share scaled by the
93
+ // multiplier can exceed the checkpoint budget itself (e.g. at blocks=1 a >1 multiplier overshoots), which
94
+ // would admit a tx no builder can ever pack — the builder caps each block by the remaining budget. Clamping
95
+ // by the budget makes "admitted ⇒ buildable" unconditional. (For DA the per-tx maximum always binds first,
96
+ // so the budget clamp is currently moot, but it keeps the invariant explicit.)
97
+ const daGas = Math.min(
98
+ MAX_TX_DA_GAS,
99
+ daBudget,
100
+ Math.ceil((daBudget / blocks) * MIN_PER_BLOCK_DA_ALLOCATION_MULTIPLIER),
101
+ );
102
+ const l2Gas = Math.min(
103
+ MAX_PROCESSABLE_L2_GAS,
104
+ opts.manaCheckpointBudget,
105
+ Math.ceil((opts.manaCheckpointBudget / blocks) * MIN_PER_BLOCK_ALLOCATION_MULTIPLIER),
106
+ );
107
+
108
+ return new Gas(daGas, l2Gas);
109
+ }
110
+
111
+ /**
112
+ * Network tx gas limits derived from a sequencer/p2p config and the L1 slot-timing + mana constants. The
113
+ * single source of truth shared by `getNodeInfo` (advertising) and the RPC/gossip/pool gas validators
114
+ * (enforcing), so a node never rejects a tx it advertised as admissible. Always uses the network-minimum
115
+ * multipliers, never the node's (possibly higher) configured multipliers.
116
+ */
117
+ export function getNetworkTxGasLimits(
118
+ config: ProposerTimetableConfig,
119
+ l1Constants: SlotTimingConstants & { rollupManaLimit: number },
120
+ ): Gas {
121
+ const maxBlocksPerCheckpoint = buildProposerTimetable(config, l1Constants).getMaxBlocksPerCheckpoint();
122
+ return computeNetworkTxGasLimits({ maxBlocksPerCheckpoint, manaCheckpointBudget: l1Constants.rollupManaLimit });
123
+ }
@@ -25,8 +25,20 @@ export type BaseSignerConfig = {
25
25
  nodeId: string;
26
26
  /** How long to wait between polls when a duty is being signed (ms) */
27
27
  pollingIntervalMs: number;
28
- /** Maximum time to wait for a duty being signed to complete (ms) */
29
- signingTimeoutMs: number;
28
+ /**
29
+ * How long (ms) to wait for a peer node's in-progress signing before giving up and treating the
30
+ * duty as already handled. This is the cross-node wait/poll timeout, distinct from
31
+ * signerCallTimeoutMs (the hard upper bound on this node's own signer call).
32
+ */
33
+ peerSigningTimeoutMs: number;
34
+ /**
35
+ * Hard upper bound (ms) on a single signer call made by this node. If the (possibly remote)
36
+ * signer does not return within this time, the call is aborted, the duty lock is released, and
37
+ * signing fails so it can be safely retried. The effective value is clamped to
38
+ * maxStuckDutiesAgeMs / 2 at construction, so a slow signer's lock is always released before
39
+ * stuck-duty cleanup could reclaim it. Defaults to 30_000 when unset.
40
+ */
41
+ signerCallTimeoutMs?: number;
30
42
  /** Maximum age of a stuck duty in ms (defaults to 2x hardcoded Aztec slot duration if not set) */
31
43
  maxStuckDutiesAgeMs?: number;
32
44
  /** Optional: clean up old duties after this many hours (disabled if not set) */
@@ -44,11 +56,16 @@ export const baseSignerConfigMappings: ConfigMappingsType<BaseSignerConfig> = {
44
56
  description: 'The number of ms to wait between polls when a duty is being signed',
45
57
  ...numberConfigHelper(100),
46
58
  },
47
- signingTimeoutMs: {
59
+ peerSigningTimeoutMs: {
48
60
  env: 'VALIDATOR_HA_SIGNING_TIMEOUT_MS',
49
- description: 'The maximum time to wait for a duty being signed to complete',
61
+ description: "How long to wait for a peer node's in-progress signing before giving up",
50
62
  ...numberConfigHelper(3_000),
51
63
  },
64
+ signerCallTimeoutMs: {
65
+ env: 'VALIDATOR_SIGNER_CALL_TIMEOUT_MS',
66
+ description: 'Hard upper bound in ms on a single signer call before it is aborted (default 30000)',
67
+ ...numberConfigHelper(30_000),
68
+ },
52
69
  maxStuckDutiesAgeMs: {
53
70
  env: 'VALIDATOR_HA_MAX_STUCK_DUTIES_AGE_MS',
54
71
  description: 'The maximum age of a stuck duty in ms (defaults to 2x Aztec slot duration)',
@@ -65,7 +82,8 @@ export const baseSignerConfigMappings: ConfigMappingsType<BaseSignerConfig> = {
65
82
  export const BaseSignerConfigSchema = z.object({
66
83
  nodeId: z.string(),
67
84
  pollingIntervalMs: z.number().min(0),
68
- signingTimeoutMs: z.number().min(0),
85
+ peerSigningTimeoutMs: z.number().min(0),
86
+ signerCallTimeoutMs: z.number().min(0).optional(),
69
87
  maxStuckDutiesAgeMs: z.number().min(0).optional(),
70
88
  cleanupOldDutiesAfterHours: z.number().min(0).optional(),
71
89
  ...pickL1ContractAddressesSchema('rollupAddress'),
@@ -1,4 +1,9 @@
1
- import { type ConfigMappingsType, getConfigFromMappings, optionalNumberConfigHelper } from '@aztec/foundation/config';
1
+ import {
2
+ type ConfigMappingsType,
3
+ booleanConfigHelper,
4
+ getConfigFromMappings,
5
+ optionalNumberConfigHelper,
6
+ } from '@aztec/foundation/config';
2
7
  import { zodFor } from '@aztec/foundation/schemas';
3
8
  import { type DataStoreConfig, dataConfigMappings } from '@aztec/stdlib/kv-store';
4
9
 
@@ -17,6 +22,12 @@ export type LocalSignerConfig = BaseSignerConfig &
17
22
  DataStoreConfig & {
18
23
  /** Maximum size of the local signing-protection LMDB store in KB. Overwrites the general dataStoreMapSizeKb. */
19
24
  signingProtectionMapSizeKb?: number;
25
+ /**
26
+ * Allow local signing protection to run against an ephemeral store when no data directory is set.
27
+ * Without this, a missing data directory fails startup, since ephemeral protection does not survive
28
+ * restarts. Intended for dev/test networks only; production validators must persist to disk.
29
+ */
30
+ allowEphemeralSigningProtection?: boolean;
20
31
  };
21
32
 
22
33
  export const localSignerConfigMappings: ConfigMappingsType<LocalSignerConfig> = {
@@ -28,6 +39,13 @@ export const localSignerConfigMappings: ConfigMappingsType<LocalSignerConfig> =
28
39
  'Maximum size of the local signing-protection LMDB store in KB. Overwrites the general dataStoreMapSizeKb.',
29
40
  ...optionalNumberConfigHelper(),
30
41
  },
42
+ allowEphemeralSigningProtection: {
43
+ env: 'VALIDATOR_ALLOW_EPHEMERAL_SIGNING_PROTECTION',
44
+ description:
45
+ 'Allow local signing protection to run against an ephemeral store when no data directory is set (dev/test only). ' +
46
+ 'Ephemeral protection does not survive restarts, so this is unsafe for production validators.',
47
+ ...booleanConfigHelper(false),
48
+ },
31
49
  };
32
50
 
33
51
  export const LocalSignerConfigSchema = zodFor<LocalSignerConfig>()(
@@ -35,6 +53,7 @@ export const LocalSignerConfigSchema = zodFor<LocalSignerConfig>()(
35
53
  dataDirectory: z.string().optional(),
36
54
  dataStoreMapSizeKb: z.number(),
37
55
  signingProtectionMapSizeKb: z.number().optional(),
56
+ allowEphemeralSigningProtection: z.boolean().optional(),
38
57
  }),
39
58
  );
40
59
 
@@ -63,13 +63,11 @@ export type ArchiverSpecificConfig = {
63
63
  /** Skip promoting proposed checkpoints during L1 sync (for testing purposes only) */
64
64
  skipPromoteProposedCheckpointDuringL1Sync?: boolean;
65
65
 
66
- /**
67
- * Grace period in seconds, measured from the end of a proposed block's build slot, after which a
68
- * proposed block whose enclosing checkpoint was never proposed is pruned as an orphan. Defaults
69
- * from `blockDurationMs / 1000` at the node wiring layer, falling back to the timetable minimum
70
- * execution time.
71
- */
72
- orphanProposedBlockPruneGraceSeconds?: number;
66
+ /** Local tolerance in seconds before pruning an orphan block when no checkpoint proposal was received. */
67
+ orphanPruneNoProposalTolerance?: number;
68
+
69
+ /** Skip pruning orphan proposed blocks that have no matching proposed checkpoint. */
70
+ skipOrphanProposedBlockPruning?: boolean;
73
71
  };
74
72
 
75
73
  export const ArchiverSpecificConfigSchema = z.object({
@@ -82,7 +80,8 @@ export const ArchiverSpecificConfigSchema = z.object({
82
80
  archiverSkipHistoricalLogsCheck: z.boolean().optional(),
83
81
  skipValidateCheckpointAttestations: z.boolean().optional(),
84
82
  skipPromoteProposedCheckpointDuringL1Sync: z.boolean().optional(),
85
- orphanProposedBlockPruneGraceSeconds: schemas.Integer.optional(),
83
+ orphanPruneNoProposalTolerance: schemas.Integer.optional(),
84
+ skipOrphanProposedBlockPruning: z.boolean().optional(),
86
85
  });
87
86
 
88
87
  export type ArchiverApi = Omit<
@@ -123,7 +122,7 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
123
122
  getContractClass: z.function({ input: z.tuple([schemas.Fr]), output: ContractClassPublicSchema.optional() }),
124
123
  getBytecodeCommitment: z.function({ input: z.tuple([schemas.Fr]), output: schemas.Fr }),
125
124
  getContract: z.function({
126
- input: z.tuple([schemas.AztecAddress, optional(schemas.BigInt)]),
125
+ input: z.tuple([schemas.AztecAddress, schemas.BigInt]),
127
126
  output: ContractInstanceWithAddressSchema.optional(),
128
127
  }),
129
128
  getContractClassIds: z.function({ input: z.tuple([]), output: z.array(schemas.Fr) }),
@@ -133,7 +133,7 @@ export function createAztecNodeAdminClient(
133
133
  apiKey?: string,
134
134
  ): AztecNodeAdmin {
135
135
  return createSafeJsonRpcClient<AztecNodeAdmin>(url, AztecNodeAdminApiSchema, {
136
- namespaceMethods: 'nodeAdmin',
136
+ namespaceMethods: 'aztecAdmin',
137
137
  fetch,
138
138
  onResponse: getVersioningResponseHandler(versions),
139
139
  ...(apiKey ? { extraHeaders: { 'x-api-key': apiKey } } : {}),
@@ -1,10 +1,14 @@
1
+ import { type CheckpointNumber, CheckpointNumberSchema } from '@aztec/foundation/branded-types';
1
2
  import { createSafeJsonRpcClient, defaultFetch } from '@aztec/foundation/json-rpc/client';
2
3
 
3
4
  import { z } from 'zod';
4
5
 
5
- import type { ApiSchemaFor } from '../schemas/schemas.js';
6
+ import { type ApiSchemaFor, optional } from '../schemas/schemas.js';
6
7
  import { type ComponentsVersions, getVersioningResponseHandler } from '../versioning/index.js';
7
8
 
9
+ const MAX_SIGNATURES_PER_REGISTER_CALL = 100;
10
+ const MAX_SIGNATURE_LEN = 10000;
11
+
8
12
  /**
9
13
  * Debug interface for Aztec node available in sandbox/local-network mode.
10
14
  */
@@ -19,10 +23,58 @@ export interface AztecNodeDebug {
19
23
  * @throws If no sequencer is running.
20
24
  */
21
25
  mineBlock(): Promise<void>;
26
+
27
+ /**
28
+ * Synthetically proves the L2 chain up to the given checkpoint (default: the latest checkpointed
29
+ * checkpoint), writing epoch out hashes into the L1 Outbox so L2-to-L1 messages become consumable
30
+ * and advancing the rollup's proven tip. There is no real proof — this is the local-network
31
+ * equivalent of an epoch proof landing on L1. The target is clamped to the latest checkpointed
32
+ * checkpoint and the call no-ops when it is already proven.
33
+ *
34
+ * @param upToCheckpoint - Checkpoint to prove up to; defaults to the latest checkpointed checkpoint.
35
+ * @returns The proven checkpoint number after the call.
36
+ * @throws If no automine sequencer is running (only the automine sequencer supports synthetic proving).
37
+ */
38
+ prove(upToCheckpoint?: CheckpointNumber): Promise<CheckpointNumber>;
39
+
40
+ /**
41
+ * Warps L1 time forward to at least `targetTimestamp` and builds an empty L2 checkpoint at the next slot boundary,
42
+ * advancing the L2 timestamp to at least the target. The warp is serialized with block building, so it never
43
+ * interleaves with an in-flight build. A no-op when `targetTimestamp` is already at or behind the current L1 time.
44
+ *
45
+ * @param targetTimestamp - Target L1 timestamp, in seconds.
46
+ * @throws If no automine sequencer is running (only the automine sequencer supports time warps).
47
+ */
48
+ warpL2TimeAtLeastTo(targetTimestamp: number): Promise<void>;
49
+
50
+ /**
51
+ * Warps L1 time forward by at least `duration` seconds from the current L1 time and builds an empty L2 checkpoint
52
+ * at the next slot boundary. The warp is serialized with block building, so it never interleaves with an in-flight
53
+ * build.
54
+ *
55
+ * @param duration - Number of seconds to advance; must be positive.
56
+ * @throws If no automine sequencer is running, or if `duration` is not positive.
57
+ */
58
+ warpL2TimeAtLeastBy(duration: number): Promise<void>;
59
+
60
+ /**
61
+ * Registers public function signatures so the node can resolve selectors to names in public-execution stack
62
+ * traces. The mapping lives only in unpersisted node memory, is not gossiped, and is exposed here (rather than on
63
+ * the main node API) because it is a debug-only, unauthenticated write that should not be reachable on prod nodes.
64
+ * @param functionSignatures - Decoded `name(paramTypes)` signatures to register by selector.
65
+ */
66
+ registerContractFunctionSignatures(functionSignatures: string[]): Promise<void>;
22
67
  }
23
68
 
24
69
  export const AztecNodeDebugApiSchema: ApiSchemaFor<AztecNodeDebug> = {
25
70
  mineBlock: z.function({ input: z.tuple([]), output: z.void() }),
71
+ prove: z.function({ input: z.tuple([optional(CheckpointNumberSchema)]), output: CheckpointNumberSchema }),
72
+ warpL2TimeAtLeastTo: z.function({ input: z.tuple([z.number()]), output: z.void() }),
73
+ warpL2TimeAtLeastBy: z.function({ input: z.tuple([z.number()]), output: z.void() }),
74
+ registerContractFunctionSignatures: z.function({
75
+ input: z.tuple([z.array(z.string().max(MAX_SIGNATURE_LEN)).max(MAX_SIGNATURES_PER_REGISTER_CALL)]),
76
+ output: z.void(),
77
+ }),
26
78
  };
27
79
 
28
80
  export function createAztecNodeDebugClient(
@@ -32,7 +84,7 @@ export function createAztecNodeDebugClient(
32
84
  apiKey?: string,
33
85
  ): AztecNodeDebug {
34
86
  return createSafeJsonRpcClient<AztecNodeDebug>(url, AztecNodeDebugApiSchema, {
35
- namespaceMethods: 'nodeDebug',
87
+ namespaceMethods: 'aztecDebug',
36
88
  fetch,
37
89
  onResponse: getVersioningResponseHandler(versions),
38
90
  ...(apiKey ? { extraHeaders: { 'x-api-key': apiKey } } : {}),