@aztec/stdlib 6.0.0-nightly.20260604 → 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
@@ -7,9 +7,11 @@ import {
7
7
  type CheckpointNumber,
8
8
  CheckpointNumberPositiveSchema,
9
9
  CheckpointNumberSchema,
10
+ type CheckpointProposalHash,
10
11
  type EpochNumber,
11
12
  EpochNumberSchema,
12
13
  type SlotNumber,
14
+ SlotNumberSchema,
13
15
  } from '@aztec/foundation/branded-types';
14
16
  import type { Fr } from '@aztec/foundation/curves/bn254';
15
17
  import type { EthAddress } from '@aztec/foundation/eth-address';
@@ -21,9 +23,15 @@ import { z } from 'zod';
21
23
  import type { AztecAddress } from '../aztec-address/index.js';
22
24
  import { type BlockData, BlockDataSchema } from '../block/block_data.js';
23
25
  import { BlockHash } from '../block/block_hash.js';
24
- import { type BlockParameter, BlockParameterSchema } from '../block/block_parameter.js';
26
+ import { type BlockParameter, BlockParameterSchema, BlockTagWithoutLatestSchema } from '../block/block_parameter.js';
25
27
  import { type DataInBlock, dataInBlockSchemaFor } from '../block/in_block.js';
26
- import { type CheckpointsQuery, CheckpointsQuerySchema } from '../block/l2_block_source.js';
28
+ import {
29
+ type CheckpointsQuery,
30
+ CheckpointsQuerySchema,
31
+ type L2BlockTag,
32
+ type L2Tips,
33
+ L2TipsSchema,
34
+ } from '../block/l2_block_source.js';
27
35
  import { type CheckpointData, CheckpointDataSchema } from '../checkpoint/checkpoint_data.js';
28
36
  import {
29
37
  type ContractClassPublic,
@@ -35,6 +43,7 @@ import {
35
43
  type ProtocolContractAddresses,
36
44
  ProtocolContractAddressesSchema,
37
45
  } from '../contract/index.js';
46
+ import { type L1RollupConstants, L1RollupConstantsSchema } from '../epoch-helpers/index.js';
38
47
  import { ManaUsageEstimate } from '../gas/fee_math.js';
39
48
  import { GasFees } from '../gas/gas_fees.js';
40
49
  import { type LogResult, LogResultSchema } from '../logs/log_result.js';
@@ -45,6 +54,7 @@ import {
45
54
  PublicLogsQuerySchema,
46
55
  } from '../logs/logs_query.js';
47
56
  import { type L2ToL1MembershipWitness, L2ToL1MembershipWitnessSchema } from '../messaging/l2_to_l1_membership.js';
57
+ import { CheckpointAttestation } from '../p2p/checkpoint_attestation.js';
48
58
  import { type ApiSchemaFor, optional, schemas } from '../schemas/schemas.js';
49
59
  import { MerkleTreeId } from '../trees/merkle_tree_id.js';
50
60
  import { NullifierMembershipWitness } from '../trees/nullifier_membership_witness.js';
@@ -76,7 +86,7 @@ import {
76
86
  type BlocksIncludeOptions,
77
87
  BlocksIncludeOptionsSchema,
78
88
  } from './block_response.js';
79
- import { type ChainTip, ChainTipSchema, type ChainTips, ChainTipsSchema } from './chain_tips.js';
89
+ import { type CheckpointTag, CheckpointTagSchema } from './chain_tips.js';
80
90
  import { type CheckpointParameter, CheckpointParameterSchema } from './checkpoint_parameter.js';
81
91
  import {
82
92
  type CheckpointIncludeOptions,
@@ -84,8 +94,13 @@ import {
84
94
  type CheckpointResponse,
85
95
  CheckpointResponseSchema,
86
96
  } from './checkpoint_response.js';
97
+ import { type GetTxByHashOptions, GetTxByHashOptionsSchema } from './get_tx_by_hash_options.js';
98
+ import { type PeerInfo, PeerInfoSchema, type ProposalsForSlot, ProposalsForSlotSchema } from './p2p.js';
87
99
  import { type WorldStateSyncStatus, WorldStateSyncStatusSchema } from './world_state.js';
88
100
 
101
+ export type { GetTxByHashOptions } from './get_tx_by_hash_options.js';
102
+ export { GetTxByHashOptionsSchema } from './get_tx_by_hash_options.js';
103
+
89
104
  /**
90
105
  * The aztec node.
91
106
  * We will probably implement the additional interfaces by means other than Aztec Node as it's currently a privacy leak
@@ -223,23 +238,36 @@ export interface AztecNode {
223
238
  ): Promise<L2ToL1MembershipWitness | undefined>;
224
239
 
225
240
  /**
226
- * Returns the block number at a given chain tip, or the latest proposed block number when
241
+ * Returns the block number at a given block tag, or the latest proposed block number when
227
242
  * `tip` is omitted.
228
243
  */
229
- getBlockNumber(tip?: ChainTip): Promise<BlockNumber>;
244
+ getBlockNumber(tip?: L2BlockTag): Promise<BlockNumber>;
230
245
 
231
246
  /**
232
- * Returns the checkpoint number at a given chain tip, or the latest checkpoint number when
233
- * `tip` is omitted.
234
- *
235
- * @remarks **Semantic foot-gun**: block-side `'proposed'` means "latest proposed block" (chain
236
- * head), but checkpoint-side `'proposed'` means "latest confirmed checkpoint" — pre-L1-confirm
237
- * checkpoints are not exposed over RPC. `'checkpointed'` on the checkpoint side is equivalent.
247
+ * Returns the checkpoint number at a given checkpoint tag, or the latest checkpointed number when
248
+ * `tip` is omitted. The proposed-but-unconfirmed checkpoint frontier is archiver-internal and not
249
+ * exposed over RPC, so `'proposed'` is not a valid checkpoint tag (see {@link CheckpointTag}).
238
250
  */
239
- getCheckpointNumber(tip?: ChainTip): Promise<CheckpointNumber>;
251
+ getCheckpointNumber(tip?: CheckpointTag): Promise<CheckpointNumber>;
240
252
 
241
253
  /** Returns the tips of the L2 chain. */
242
- getChainTips(): Promise<ChainTips>;
254
+ getChainTips(): Promise<L2Tips>;
255
+
256
+ /** Returns the rollup constants for the current chain. */
257
+ getL1Constants(): Promise<L1RollupConstants>;
258
+
259
+ /**
260
+ * Returns the last L2 slot number for which the node has all L1 data needed to build the next checkpoint.
261
+ */
262
+ getSyncedL2SlotNumber(): Promise<SlotNumber | undefined>;
263
+
264
+ /**
265
+ * Returns the last L2 epoch number that has been fully synchronized from L1.
266
+ */
267
+ getSyncedL2EpochNumber(): Promise<EpochNumber | undefined>;
268
+
269
+ /** Returns the latest L1 timestamp according to the archiver's synced L1 view. */
270
+ getSyncedL1Timestamp(): Promise<bigint | undefined>;
243
271
 
244
272
  /**
245
273
  * Gets lightweight checkpoint metadata for a contiguous range or for an entire epoch.
@@ -318,7 +346,7 @@ export interface AztecNode {
318
346
  * Each entry accounts for the L1 gas oracle transition and congestion growth based on the
319
347
  * given mana usage estimate. Defaults to target usage (steady state).
320
348
  * @param manaUsage - Expected mana usage per checkpoint (none, target, or limit).
321
- * @returns An array of GasFees, one per slot in the prediction window.
349
+ * @returns An array of GasFees with current min fees first, followed by one entry per predicted slot.
322
350
  */
323
351
  getPredictedMinFees(manaUsage?: ManaUsageEstimate): Promise<GasFees[]>;
324
352
 
@@ -357,12 +385,6 @@ export interface AztecNode {
357
385
  */
358
386
  getProtocolContractAddresses(): Promise<ProtocolContractAddresses>;
359
387
 
360
- /**
361
- * Registers contract function signatures for debugging purposes.
362
- * @param functionSignatures - An array of function signatures to register by selector.
363
- */
364
- registerContractFunctionSignatures(functionSignatures: string[]): Promise<void>;
365
-
366
388
  /**
367
389
  * Gets private logs matching the given tags. Returns one inner array per element of `query.tags`, in
368
390
  * input order. An empty inner array means no logs matched that tag. Set `query.includeEffects` to also
@@ -416,10 +438,13 @@ export interface AztecNode {
416
438
  getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
417
439
 
418
440
  /**
419
- * Method to retrieve pending txs.
441
+ * Method to retrieve pending txs. The txs' proofs are stripped unless `includeProof` is set.
442
+ * @param limit - The number of items to return.
443
+ * @param after - The last known pending tx. Used for pagination.
444
+ * @param options - Options for the returned txs (eg whether to include their proofs).
420
445
  * @returns The pending txs.
421
446
  */
422
- getPendingTxs(limit?: number, after?: TxHash): Promise<Tx[]>;
447
+ getPendingTxs(limit?: number, after?: TxHash, options?: GetTxByHashOptions): Promise<Tx[]>;
423
448
 
424
449
  /**
425
450
  * Retrieves the number of pending txs
@@ -428,18 +453,20 @@ export interface AztecNode {
428
453
  getPendingTxCount(): Promise<number>;
429
454
 
430
455
  /**
431
- * Method to retrieve a single pending tx.
456
+ * Method to retrieve a single pending tx. The tx's proof is stripped unless `includeProof` is set.
432
457
  * @param txHash - The transaction hash to return.
458
+ * @param options - Options for the returned tx (eg whether to include its proof).
433
459
  * @returns The pending tx if it exists.
434
460
  */
435
- getTxByHash(txHash: TxHash): Promise<Tx | undefined>;
461
+ getTxByHash(txHash: TxHash, options?: GetTxByHashOptions): Promise<Tx | undefined>;
436
462
 
437
463
  /**
438
- * Method to retrieve multiple pending txs.
464
+ * Method to retrieve multiple pending txs. The txs' proofs are stripped unless `includeProof` is set.
439
465
  * @param txHash - The transaction hashes to return.
466
+ * @param options - Options for the returned txs (eg whether to include their proofs).
440
467
  * @returns The pending txs if exist.
441
468
  */
442
- getTxsByHash(txHashes: TxHash[]): Promise<Tx[]>;
469
+ getTxsByHash(txHashes: TxHash[], options?: GetTxByHashOptions): Promise<Tx[]>;
443
470
 
444
471
  /**
445
472
  * Gets the storage value at the given contract storage slot.
@@ -495,10 +522,18 @@ export interface AztecNode {
495
522
  getContractClass(id: Fr): Promise<ContractClassPublic | undefined>;
496
523
 
497
524
  /**
498
- * Returns a publicly deployed contract instance given its address.
525
+ * Returns a publicly deployed contract instance given its address. Its current class id is resolved as of the given
526
+ * reference block.
527
+ *
528
+ * Returns `undefined` if the instance has not been published (i.e. `publish_for_public_execution` was never called
529
+ * on the `ContractInstanceRegistry`). A contract whose class has been updated will never return `undefined`:
530
+ * scheduling an update requires the contract's deployment nullifier, which is only emitted by publishing, so any
531
+ * updatable contract has necessarily been published.
499
532
  * @param address - Address of the deployed contract.
533
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
534
+ * Defaults to 'latest'.
500
535
  */
501
- getContract(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
536
+ getContract(address: AztecAddress, referenceBlock?: BlockParameter): Promise<ContractInstanceWithAddress | undefined>;
502
537
 
503
538
  /**
504
539
  * Returns the ENR of this node for peer discovery, if available.
@@ -510,10 +545,31 @@ export interface AztecNode {
510
545
  * @returns The list of allowed elements.
511
546
  */
512
547
  getAllowedPublicSetup(): Promise<AllowedElement[]>;
513
- }
514
548
 
515
- const MAX_SIGNATURES_PER_REGISTER_CALL = 100;
516
- const MAX_SIGNATURE_LEN = 10000;
549
+ /**
550
+ * Returns info for all connected, dialing, and cached peers. Only available when P2P is enabled.
551
+ * @param includePending - If true, also include peers in the pending state.
552
+ */
553
+ getPeers(includePending?: boolean): Promise<PeerInfo[]>;
554
+
555
+ /**
556
+ * Queries the attestation pool for checkpoint attestations for the given slot.
557
+ * @param slot - The slot to query.
558
+ * @param proposalPayloadHash - Hex-encoded keccak256 of the target proposal's signed payload hash.
559
+ * When provided, only attestations whose payload hash matches are returned.
560
+ * When omitted, all attestations for the slot are returned.
561
+ */
562
+ getCheckpointAttestationsForSlot(
563
+ slot: SlotNumber,
564
+ proposalPayloadHash?: CheckpointProposalHash,
565
+ ): Promise<CheckpointAttestation[]>;
566
+
567
+ /**
568
+ * Returns block and checkpoint proposals retained in the attestation pool for the given slot.
569
+ * Only available when P2P is enabled.
570
+ */
571
+ getProposalsForSlot(slot: SlotNumber): Promise<ProposalsForSlot>;
572
+ }
517
573
 
518
574
  export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
519
575
  getWorldStateSyncStatus: z.function({ input: z.tuple([]), output: WorldStateSyncStatusSchema }),
@@ -568,11 +624,19 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
568
624
  output: L2ToL1MembershipWitnessSchema.optional(),
569
625
  }),
570
626
 
571
- getBlockNumber: z.function({ input: z.tuple([optional(ChainTipSchema)]), output: BlockNumberSchema }),
627
+ getBlockNumber: z.function({ input: z.tuple([optional(BlockTagWithoutLatestSchema)]), output: BlockNumberSchema }),
628
+
629
+ getCheckpointNumber: z.function({ input: z.tuple([optional(CheckpointTagSchema)]), output: CheckpointNumberSchema }),
630
+
631
+ getChainTips: z.function({ input: z.tuple([]), output: L2TipsSchema }),
632
+
633
+ getL1Constants: z.function({ input: z.tuple([]), output: L1RollupConstantsSchema }),
634
+
635
+ getSyncedL2SlotNumber: z.function({ input: z.tuple([]), output: SlotNumberSchema.optional() }),
572
636
 
573
- getCheckpointNumber: z.function({ input: z.tuple([optional(ChainTipSchema)]), output: CheckpointNumberSchema }),
637
+ getSyncedL2EpochNumber: z.function({ input: z.tuple([]), output: EpochNumberSchema.optional() }),
574
638
 
575
- getChainTips: z.function({ input: z.tuple([]), output: ChainTipsSchema }),
639
+ getSyncedL1Timestamp: z.function({ input: z.tuple([]), output: schemas.BigInt.optional() }),
576
640
 
577
641
  getCheckpointsData: z.function({ input: z.tuple([CheckpointsQuerySchema]), output: z.array(CheckpointDataSchema) }),
578
642
 
@@ -629,11 +693,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
629
693
 
630
694
  getProtocolContractAddresses: z.function({ input: z.tuple([]), output: ProtocolContractAddressesSchema }),
631
695
 
632
- registerContractFunctionSignatures: z.function({
633
- input: z.tuple([z.array(z.string().max(MAX_SIGNATURE_LEN)).max(MAX_SIGNATURES_PER_REGISTER_CALL)]),
634
- output: z.void(),
635
- }),
636
-
637
696
  getPrivateLogsByTags: z.function({
638
697
  input: z.tuple([PrivateLogsQuerySchema]),
639
698
  output: z.array(z.array(LogResultSchema)),
@@ -657,16 +716,20 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
657
716
  input: z.tuple([
658
717
  optional(z.number().gte(1).lte(MAX_RPC_TXS_LEN).default(MAX_RPC_TXS_LEN)),
659
718
  optional(TxHash.schema),
719
+ optional(GetTxByHashOptionsSchema),
660
720
  ]),
661
721
  output: z.array(Tx.schema),
662
722
  }),
663
723
 
664
724
  getPendingTxCount: z.function({ input: z.tuple([]), output: z.number() }),
665
725
 
666
- getTxByHash: z.function({ input: z.tuple([TxHash.schema]), output: Tx.schema.optional() }),
726
+ getTxByHash: z.function({
727
+ input: z.tuple([TxHash.schema, optional(GetTxByHashOptionsSchema)]),
728
+ output: Tx.schema.optional(),
729
+ }),
667
730
 
668
731
  getTxsByHash: z.function({
669
- input: z.tuple([z.array(TxHash.schema).max(MAX_RPC_TXS_LEN)]),
732
+ input: z.tuple([z.array(TxHash.schema).max(MAX_RPC_TXS_LEN), optional(GetTxByHashOptionsSchema)]),
670
733
  output: z.array(Tx.schema),
671
734
  }),
672
735
 
@@ -703,13 +766,28 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
703
766
  getContractClass: z.function({ input: z.tuple([schemas.Fr]), output: ContractClassPublicSchema.optional() }),
704
767
 
705
768
  getContract: z.function({
706
- input: z.tuple([schemas.AztecAddress]),
769
+ input: z.tuple([schemas.AztecAddress, optional(BlockParameterSchema)]),
707
770
  output: ContractInstanceWithAddressSchema.optional(),
708
771
  }),
709
772
 
710
773
  getEncodedEnr: z.function({ input: z.tuple([]), output: z.string().optional() }),
711
774
 
712
775
  getAllowedPublicSetup: z.function({ input: z.tuple([]), output: z.array(AllowedElementSchema) }),
776
+
777
+ getPeers: z.function({ input: z.tuple([optional(z.boolean())]), output: z.array(PeerInfoSchema) }),
778
+
779
+ getCheckpointAttestationsForSlot: z.function({
780
+ input: z.tuple([
781
+ schemas.SlotNumber,
782
+ optional(z.string().regex(/^0x[0-9a-fA-F]+$/) as unknown as z.ZodType<CheckpointProposalHash>),
783
+ ]),
784
+ output: z.array(CheckpointAttestation.schema),
785
+ }),
786
+
787
+ getProposalsForSlot: z.function({
788
+ input: z.tuple([schemas.SlotNumber]),
789
+ output: ProposalsForSlotSchema,
790
+ }),
713
791
  };
714
792
 
715
793
  export function createAztecNodeClient(
@@ -719,7 +797,7 @@ export function createAztecNodeClient(
719
797
  batchWindowMS = 0,
720
798
  ): AztecNode {
721
799
  return createSafeJsonRpcClient<AztecNode>(url, AztecNodeApiSchema, {
722
- namespaceMethods: 'node',
800
+ namespaceMethods: 'aztec',
723
801
  fetch,
724
802
  batchWindowMS,
725
803
  onResponse: getVersioningResponseHandler(versions),
@@ -64,6 +64,8 @@ type ProposerBlockBuilderOptions = BlockBuilderOptionsBase & {
64
64
  maxBlocksPerCheckpoint: number;
65
65
  /** Per-block gas budget multiplier. Budget = (remaining / remainingBlocks) * multiplier. */
66
66
  perBlockAllocationMultiplier: number;
67
+ /** Per-block budget multiplier for DA gas and blob fields. Falls back to perBlockAllocationMultiplier when unset. */
68
+ perBlockDAAllocationMultiplier?: number;
67
69
  };
68
70
 
69
71
  /** Validator mode: no redistribution params needed. */
@@ -1,24 +1,16 @@
1
1
  import { z } from 'zod';
2
2
 
3
- import { type L2BlockTag, type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
4
-
5
3
  /**
6
- * Public chain-tip selectors usable in RPC requests.
7
- * Omits internal-only tags (e.g. `proposedCheckpoint`) from {@link L2BlockTag}.
4
+ * Public checkpoint-tip selectors usable in RPC requests.
5
+ *
6
+ * `'proposed'` is intentionally excluded: the proposed-but-unconfirmed checkpoint frontier is an
7
+ * archiver-internal pipelining concept, not part of the public chain-tip surface. Select the
8
+ * proposed *block* tip with a block tag (`L2BlockTag`) instead.
8
9
  */
9
- export type ChainTip = Exclude<L2BlockTag, 'proposedCheckpoint'>;
10
+ export type CheckpointTag = 'checkpointed' | 'proven' | 'finalized';
10
11
 
11
- export const ChainTipSchema = z.union([
12
- z.literal('proposed'),
12
+ export const CheckpointTagSchema = z.union([
13
13
  z.literal('checkpointed'),
14
14
  z.literal('proven'),
15
15
  z.literal('finalized'),
16
- ]) satisfies z.ZodType<ChainTip>;
17
-
18
- /**
19
- * Tips of the L2 chain.
20
- * Omits the sequencer-internal `proposedCheckpoint` from the public RPC surface.
21
- */
22
- export type ChainTips = Omit<L2Tips, 'proposedCheckpoint'>;
23
-
24
- export const ChainTipsSchema = L2TipsSchema.omit({ proposedCheckpoint: true });
16
+ ]) satisfies z.ZodType<CheckpointTag>;
@@ -2,18 +2,18 @@ import { CheckpointNumberSchema, SlotNumberSchema } from '@aztec/foundation/bran
2
2
 
3
3
  import { z } from 'zod';
4
4
 
5
- import { ChainTipSchema } from './chain_tips.js';
5
+ import { CheckpointTagSchema } from './chain_tips.js';
6
6
 
7
7
  /**
8
8
  * Selector for a checkpoint in RPC calls.
9
9
  *
10
10
  * Accepts a numeric checkpoint number (or `{ number }`), a slot number (`{ slot }`),
11
- * or a chain-tip name (e.g. `'proposed'`, `'proven'`).
11
+ * or a checkpoint-tip name (e.g. `'checkpointed'`, `'proven'`, `'finalized'`).
12
12
  */
13
13
  export const CheckpointParameterSchema = z.union([
14
14
  z.object({ number: CheckpointNumberSchema }).strict(),
15
15
  z.object({ slot: SlotNumberSchema }).strict(),
16
- ChainTipSchema,
16
+ CheckpointTagSchema,
17
17
  CheckpointNumberSchema,
18
18
  ]);
19
19
 
@@ -1,6 +1,7 @@
1
1
  export * from './aztec-node.js';
2
2
  export * from './aztec-node-admin.js';
3
3
  export * from './aztec-node-debug.js';
4
+ export { type PeerInfo, type ProposalsForSlot } from './p2p.js';
4
5
  export * from './block_response.js';
5
6
  export * from './chain_tips.js';
6
7
  export * from './checkpoint_parameter.js';
@@ -30,6 +30,11 @@ export interface SequencerConfig {
30
30
  maxDABlockGas?: number;
31
31
  /** Per-block gas budget multiplier for both L2 and DA gas. Budget = (checkpointLimit / maxBlocks) * multiplier. */
32
32
  perBlockAllocationMultiplier?: number;
33
+ /**
34
+ * Per-block budget multiplier applied to DA gas and blob fields in place of `perBlockAllocationMultiplier`.
35
+ * Defaults higher than the general multiplier so the largest contract class deploy fits a single block.
36
+ */
37
+ perBlockDAAllocationMultiplier?: number;
33
38
  /** Redistribute remaining checkpoint budget evenly across remaining blocks instead of allowing a single block to consume the entire remaining budget. */
34
39
  redistributeCheckpointBudget?: boolean;
35
40
  /** Recipient of block reward. */
@@ -44,8 +49,16 @@ export interface SequencerConfig {
44
49
  txPublicSetupAllowListExtend?: AllowedElement[];
45
50
  /** Payload address to vote for */
46
51
  governanceProposerPayload?: EthAddress;
47
- /** Whether to enforce the time table when building blocks */
48
- enforceTimeTable?: boolean;
52
+ /**
53
+ * Minimum block-building time (`min_block_duration`) still worth allocating if the proposer starts
54
+ * late, in seconds.
55
+ */
56
+ minBlockDuration?: number;
57
+ /**
58
+ * Local time (`checkpoint_proposal_prepare_time`) between the last block build finishing and the
59
+ * checkpoint proposal being ready for p2p send, in seconds.
60
+ */
61
+ checkpointProposalPrepareTime?: number;
49
62
  /** How much time (in seconds) we allow in the slot for publishing the L1 tx. */
50
63
  l1PublishingTime?: number;
51
64
  /** Used for testing to introduce a fake delay after processing each tx */
@@ -83,12 +96,16 @@ export interface SequencerConfig {
83
96
  injectHighSValueAttestation?: boolean;
84
97
  /** Inject an attestation with an unrecoverable signature (for testing only) */
85
98
  injectUnrecoverableSignatureAttestation?: boolean;
99
+ /** Inject a non-proposer attestation slot in yParity (v ∈ {0, 1}) form in the packed L1 tuple (for testing only) */
100
+ injectYParityAttestation?: boolean;
86
101
  /** Whether to run in fisherman mode: builds blocks on every slot for validation without publishing */
87
102
  fishermanMode?: boolean;
88
103
  /** Shuffle attestation ordering to create invalid ordering (for testing only) */
89
104
  shuffleAttestationOrdering?: boolean;
90
- /** Duration per block in milliseconds when building multiple blocks per slot (default: undefined = single block per slot) */
105
+ /** Duration per block in milliseconds, used to derive how many blocks fit in a slot (defaults to 3000 ms). */
91
106
  blockDurationMs?: number;
107
+ /** Consensus grace in seconds for a received checkpoint proposal to materialize into local proposed state. */
108
+ checkpointProposalSyncGraceSeconds?: number;
92
109
  /** Expected number of block proposals per slot for P2P peer scoring. 0 disables scoring, undefined falls back to blocksPerSlot - 1. */
93
110
  expectedBlockProposalsPerSlot?: number;
94
111
  /** Have sequencer build and publish an empty checkpoint if there are no txs */
@@ -125,6 +142,7 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
125
142
  publishTxsWithProposals: z.boolean().optional(),
126
143
  maxDABlockGas: z.number().optional(),
127
144
  perBlockAllocationMultiplier: z.number().optional(),
145
+ perBlockDAAllocationMultiplier: z.number().optional(),
128
146
  redistributeCheckpointBudget: z.boolean().optional(),
129
147
  coinbase: schemas.EthAddress.optional(),
130
148
  feeRecipient: schemas.AztecAddress.optional(),
@@ -132,8 +150,9 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
132
150
  acvmBinaryPath: z.string().optional(),
133
151
  txPublicSetupAllowListExtend: z.array(AllowedElementSchema).optional(),
134
152
  governanceProposerPayload: schemas.EthAddress.optional(),
153
+ minBlockDuration: z.number().positive().optional(),
154
+ checkpointProposalPrepareTime: z.number().nonnegative().optional(),
135
155
  l1PublishingTime: z.number().optional(),
136
- enforceTimeTable: z.boolean().optional(),
137
156
  fakeProcessingDelayPerTxMs: z.number().optional(),
138
157
  fakeThrowAfterProcessingTxCount: z.number().optional(),
139
158
  attestationPropagationTime: z.number().optional(),
@@ -148,9 +167,11 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
148
167
  injectFakeAttestation: z.boolean().optional(),
149
168
  injectHighSValueAttestation: z.boolean().optional(),
150
169
  injectUnrecoverableSignatureAttestation: z.boolean().optional(),
170
+ injectYParityAttestation: z.boolean().optional(),
151
171
  fishermanMode: z.boolean().optional(),
152
172
  shuffleAttestationOrdering: z.boolean().optional(),
153
173
  blockDurationMs: z.number().positive().optional(),
174
+ checkpointProposalSyncGraceSeconds: z.number().nonnegative().optional(),
154
175
  expectedBlockProposalsPerSlot: z.number().nonnegative().optional(),
155
176
  buildCheckpointIfEmpty: z.boolean().optional(),
156
177
  skipPushProposedBlocksToArchiver: z.boolean().optional(),
@@ -164,7 +185,6 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
164
185
 
165
186
  type SequencerConfigOptionalKeys =
166
187
  | 'governanceProposerPayload'
167
- | 'blockDurationMs'
168
188
  | 'expectedBlockProposalsPerSlot'
169
189
  | 'coinbase'
170
190
  | 'feeRecipient'
@@ -172,7 +192,8 @@ type SequencerConfigOptionalKeys =
172
192
  | 'acvmBinaryPath'
173
193
  | 'fakeProcessingDelayPerTxMs'
174
194
  | 'fakeThrowAfterProcessingTxCount'
175
- | 'l1PublishingTime'
195
+ | 'minBlockDuration'
196
+ | 'checkpointProposalPrepareTime'
176
197
  | 'txPublicSetupAllowListExtend'
177
198
  | 'invalidBlockProposalIndexWithinCheckpoint'
178
199
  | 'minValidTxsPerBlock'
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+
3
+ import type { ZodFor } from '../schemas/schemas.js';
4
+
5
+ /** Options for retrieving txs via {@link AztecNode.getTxByHash} and {@link AztecNode.getTxsByHash}. */
6
+ export type GetTxByHashOptions = {
7
+ /** Keep the proof on the returned tx; stripped by default. */
8
+ includeProof?: boolean;
9
+ };
10
+
11
+ /** Zod schema for {@link GetTxByHashOptions}. */
12
+ export const GetTxByHashOptionsSchema: ZodFor<GetTxByHashOptions> = z.object({
13
+ includeProof: z.boolean().optional(),
14
+ });
@@ -9,7 +9,7 @@ import type { NullifierLeaf } from '../trees/nullifier_leaf.js';
9
9
  import type { PublicDataTreeLeaf } from '../trees/public_data_leaf.js';
10
10
  import type { BlockHeader } from '../tx/block_header.js';
11
11
  import type { StateReference } from '../tx/state_reference.js';
12
- import type { WorldStateRevision, WorldStateRevisionWithHandle } from '../world-state/world_state_revision.js';
12
+ import type { WorldStateRevision } from '../world-state/world_state_revision.js';
13
13
 
14
14
  /**
15
15
  * Type alias for the nullifier tree ID.
@@ -138,7 +138,13 @@ export interface MerkleTreeReadOperations {
138
138
  /**
139
139
  * Gets the current revision.
140
140
  */
141
- getRevision(): WorldStateRevision | WorldStateRevisionWithHandle;
141
+ getRevision(): WorldStateRevision;
142
+
143
+ /**
144
+ * Returns the IPC path of the underlying aztec-wsdb process. External AVM simulators use this to
145
+ * connect to the same world state instance that the TS layer is using.
146
+ */
147
+ getIpcPath(): string;
142
148
 
143
149
  /**
144
150
  * Gets sibling path for a leaf.
@@ -1,21 +1,23 @@
1
1
  import type { CheckpointProposalHash, SlotNumber } from '@aztec/foundation/branded-types';
2
+ import { bufferSchemaFor } from '@aztec/foundation/schemas';
2
3
 
3
4
  import { z } from 'zod';
4
5
 
5
- import type { BlockProposal } from '../p2p/block_proposal.js';
6
+ import { BlockProposal } from '../p2p/block_proposal.js';
6
7
  import { CheckpointAttestation } from '../p2p/checkpoint_attestation.js';
7
- import type { CheckpointProposalCore } from '../p2p/checkpoint_proposal.js';
8
+ import { CheckpointProposal, type CheckpointProposalCore } from '../p2p/checkpoint_proposal.js';
8
9
  import { type ApiSchemaFor, optional, schemas } from '../schemas/index.js';
9
10
  import { Tx } from '../tx/tx.js';
10
11
  import { TxHash } from '../tx/tx_hash.js';
11
12
  import { MAX_RPC_TXS_LEN } from './api_limit.js';
13
+ import { type GetTxByHashOptions, GetTxByHashOptionsSchema } from './get_tx_by_hash_options.js';
12
14
 
13
15
  export type PeerInfo =
14
16
  | { status: 'connected'; score: number; id: string }
15
17
  | { status: 'dialing'; dialStatus: string; id: string; addresses: string[] }
16
18
  | { status: 'cached'; id: string; addresses: string[]; enr: string; dialAttempts: number };
17
19
 
18
- const PeerInfoSchema = z.discriminatedUnion('status', [
20
+ export const PeerInfoSchema = z.discriminatedUnion('status', [
19
21
  z.object({ status: z.literal('connected'), score: z.number(), id: z.string() }),
20
22
  z.object({ status: z.literal('dialing'), dialStatus: z.string(), id: z.string(), addresses: z.array(z.string()) }),
21
23
  z.object({
@@ -30,12 +32,14 @@ const PeerInfoSchema = z.discriminatedUnion('status', [
30
32
  /** Exposed API to the P2P module. */
31
33
  export interface P2PApi {
32
34
  /**
33
- * Returns all pending transactions in the transaction pool.
35
+ * Returns all pending transactions in the transaction pool. The txs' proofs are stripped unless
36
+ * `includeProof` is set.
34
37
  * @param limit - The number of items to returns
35
38
  * @param after - The last known pending tx. Used for pagination
39
+ * @param options - Options for the returned txs (eg whether to include their proofs).
36
40
  * @returns An array of Txs.
37
41
  */
38
- getPendingTxs(limit?: number, after?: TxHash): Promise<Tx[]>;
42
+ getPendingTxs(limit?: number, after?: TxHash, options?: GetTxByHashOptions): Promise<Tx[]>;
39
43
 
40
44
  /** Returns the number of pending txs in the p2p tx pool. */
41
45
  getPendingTxCount(): Promise<number>;
@@ -66,17 +70,32 @@ export interface P2PApi {
66
70
  ): Promise<CheckpointAttestation[]>;
67
71
  }
68
72
 
73
+ export type ProposalsForSlot = {
74
+ blockProposals: BlockProposal[];
75
+ checkpointProposals: CheckpointProposalCore[];
76
+ };
77
+
69
78
  export interface P2PClient extends P2PApi {
70
79
  /** Manually adds checkpoint attestations to the p2p client attestation pool. */
71
80
  addOwnCheckpointAttestations(attestations: CheckpointAttestation[]): Promise<void>;
72
81
 
73
82
  /** Returns retained signed proposals for a slot. */
74
- getProposalsForSlot(slot: SlotNumber): Promise<{
75
- blockProposals: BlockProposal[];
76
- checkpointProposals: CheckpointProposalCore[];
77
- }>;
83
+ getProposalsForSlot(slot: SlotNumber): Promise<ProposalsForSlot>;
84
+
85
+ /** Returns whether a checkpoint proposal was retained for a slot. */
86
+ hasCheckpointProposalForSlot(slot: SlotNumber): Promise<boolean>;
78
87
  }
79
88
 
89
+ const MAX_PROPOSALS_FOR_SLOT_RPC_LEN = 256;
90
+
91
+ export const BlockProposalSchema = bufferSchemaFor(BlockProposal);
92
+ export const CheckpointProposalSchema = bufferSchemaFor(CheckpointProposal);
93
+
94
+ export const ProposalsForSlotSchema = z.object({
95
+ blockProposals: z.array(BlockProposalSchema).max(MAX_PROPOSALS_FOR_SLOT_RPC_LEN),
96
+ checkpointProposals: z.array(CheckpointProposalSchema).max(MAX_PROPOSALS_FOR_SLOT_RPC_LEN),
97
+ });
98
+
80
99
  export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
81
100
  getCheckpointAttestationsForSlot: z.function({
82
101
  input: z.tuple([
@@ -89,6 +108,7 @@ export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
89
108
  input: z.tuple([
90
109
  optional(z.number().gte(1).lte(MAX_RPC_TXS_LEN).default(MAX_RPC_TXS_LEN)),
91
110
  optional(TxHash.schema),
111
+ optional(GetTxByHashOptionsSchema),
92
112
  ]),
93
113
  output: z.array(Tx.schema),
94
114
  }),