@aztec/stdlib 0.0.1-commit.b2a5d0dd1 → 0.0.1-commit.b3d3157a

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 (700) hide show
  1. package/dest/abi/abi.d.ts +121 -1197
  2. package/dest/abi/abi.d.ts.map +1 -1
  3. package/dest/abi/abi.js +31 -16
  4. package/dest/abi/authorization_selector.d.ts +2 -2
  5. package/dest/abi/authorization_selector.d.ts.map +1 -1
  6. package/dest/abi/contract_artifact.d.ts +1 -1
  7. package/dest/abi/contract_artifact.d.ts.map +1 -1
  8. package/dest/abi/contract_artifact.js +14 -7
  9. package/dest/abi/event_selector.d.ts +2 -2
  10. package/dest/abi/event_selector.d.ts.map +1 -1
  11. package/dest/abi/function_call.d.ts +7 -25
  12. package/dest/abi/function_call.d.ts.map +1 -1
  13. package/dest/abi/note_selector.d.ts +2 -2
  14. package/dest/abi/note_selector.d.ts.map +1 -1
  15. package/dest/abi/utils.d.ts +1 -1
  16. package/dest/abi/utils.d.ts.map +1 -1
  17. package/dest/abi/utils.js +1 -1
  18. package/dest/auth_witness/auth_witness.d.ts +2 -2
  19. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  20. package/dest/avm/avm.d.ts +1756 -10463
  21. package/dest/avm/avm.d.ts.map +1 -1
  22. package/dest/avm/avm.js +6 -3
  23. package/dest/avm/avm_accumulated_data.d.ts +22 -86
  24. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  25. package/dest/avm/avm_circuit_public_inputs.d.ts +180 -932
  26. package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
  27. package/dest/avm/avm_proving_request.d.ts +653 -5446
  28. package/dest/avm/avm_proving_request.d.ts.map +1 -1
  29. package/dest/avm/message_pack.js +12 -3
  30. package/dest/avm/public_data_write.d.ts +6 -12
  31. package/dest/avm/public_data_write.d.ts.map +1 -1
  32. package/dest/avm/revert_code.d.ts +1 -7
  33. package/dest/avm/revert_code.d.ts.map +1 -1
  34. package/dest/avm/revert_code.js +0 -3
  35. package/dest/aztec-address/index.d.ts +6 -3
  36. package/dest/aztec-address/index.d.ts.map +1 -1
  37. package/dest/aztec-address/index.js +7 -2
  38. package/dest/block/attestation_info.d.ts +3 -2
  39. package/dest/block/attestation_info.d.ts.map +1 -1
  40. package/dest/block/attestation_info.js +7 -5
  41. package/dest/block/block_data.d.ts +9 -34
  42. package/dest/block/block_data.d.ts.map +1 -1
  43. package/dest/block/block_parameter.d.ts +37 -4
  44. package/dest/block/block_parameter.d.ts.map +1 -1
  45. package/dest/block/block_parameter.js +53 -2
  46. package/dest/block/in_block.d.ts +5 -24
  47. package/dest/block/in_block.d.ts.map +1 -1
  48. package/dest/block/index.d.ts +1 -2
  49. package/dest/block/index.d.ts.map +1 -1
  50. package/dest/block/index.js +0 -1
  51. package/dest/block/l2_block.d.ts +13 -41
  52. package/dest/block/l2_block.d.ts.map +1 -1
  53. package/dest/block/l2_block_info.d.ts +7 -27
  54. package/dest/block/l2_block_info.d.ts.map +1 -1
  55. package/dest/block/l2_block_source.d.ts +199 -425
  56. package/dest/block/l2_block_source.d.ts.map +1 -1
  57. package/dest/block/l2_block_source.js +66 -1
  58. package/dest/block/l2_block_stream/l2_block_stream.d.ts +2 -2
  59. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  60. package/dest/block/l2_block_stream/l2_block_stream.js +44 -17
  61. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +3 -1
  62. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  63. package/dest/block/l2_block_stream/l2_tips_memory_store.js +3 -0
  64. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +4 -1
  65. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
  66. package/dest/block/l2_block_stream/l2_tips_store_base.js +26 -7
  67. package/dest/block/proposal/attestations_and_signers.d.ts +19 -30
  68. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  69. package/dest/block/proposal/attestations_and_signers.js +26 -18
  70. package/dest/block/proposal/committee_attestation.d.ts +6 -12
  71. package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
  72. package/dest/block/test/l2_tips_store_test_suite.js +1 -1
  73. package/dest/checkpoint/checkpoint.d.ts +24 -96
  74. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  75. package/dest/checkpoint/checkpoint_data.d.ts +40 -129
  76. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -1
  77. package/dest/checkpoint/checkpoint_data.js +2 -0
  78. package/dest/checkpoint/checkpoint_info.d.ts +7 -23
  79. package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
  80. package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts +60 -0
  81. package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts.map +1 -0
  82. package/dest/checkpoint/checkpoint_reexecution_tracker.js +108 -0
  83. package/dest/checkpoint/digest.d.ts +18 -0
  84. package/dest/checkpoint/digest.d.ts.map +1 -0
  85. package/dest/checkpoint/digest.js +12 -0
  86. package/dest/checkpoint/index.d.ts +4 -1
  87. package/dest/checkpoint/index.d.ts.map +1 -1
  88. package/dest/checkpoint/index.js +3 -0
  89. package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts +33 -0
  90. package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts.map +1 -0
  91. package/dest/checkpoint/previous_checkpoint_out_hashes.js +45 -0
  92. package/dest/checkpoint/published_checkpoint.d.ts +42 -194
  93. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  94. package/dest/config/chain-config.d.ts +4 -9
  95. package/dest/config/chain-config.d.ts.map +1 -1
  96. package/dest/config/chain-config.js +6 -11
  97. package/dest/config/index.d.ts +1 -2
  98. package/dest/config/index.d.ts.map +1 -1
  99. package/dest/config/index.js +0 -1
  100. package/dest/config/sequencer-config.d.ts +5 -3
  101. package/dest/config/sequencer-config.d.ts.map +1 -1
  102. package/dest/config/sequencer-config.js +13 -6
  103. package/dest/contract/complete_address.d.ts +3 -2
  104. package/dest/contract/complete_address.d.ts.map +1 -1
  105. package/dest/contract/complete_address.js +6 -2
  106. package/dest/contract/contract_address.d.ts +5 -5
  107. package/dest/contract/contract_address.d.ts.map +1 -1
  108. package/dest/contract/contract_address.js +5 -4
  109. package/dest/contract/contract_deployment_data.d.ts +15 -61
  110. package/dest/contract/contract_deployment_data.d.ts.map +1 -1
  111. package/dest/contract/contract_instance.d.ts +4 -2
  112. package/dest/contract/contract_instance.d.ts.map +1 -1
  113. package/dest/contract/contract_instance.js +10 -3
  114. package/dest/contract/interfaces/contract_class.d.ts +15 -86
  115. package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
  116. package/dest/contract/interfaces/contract_instance.d.ts +41 -95
  117. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  118. package/dest/contract/interfaces/contract_instance.js +4 -2
  119. package/dest/contract/interfaces/contract_instance_update.d.ts +6 -26
  120. package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
  121. package/dest/contract/interfaces/protocol_contract_addresses.d.ts +2 -12
  122. package/dest/contract/interfaces/protocol_contract_addresses.d.ts.map +1 -1
  123. package/dest/database-version/database_version.d.ts +5 -11
  124. package/dest/database-version/database_version.d.ts.map +1 -1
  125. package/dest/database-version/version_manager.d.ts +6 -2
  126. package/dest/database-version/version_manager.d.ts.map +1 -1
  127. package/dest/database-version/version_manager.js +12 -1
  128. package/dest/epoch-helpers/index.d.ts +4 -22
  129. package/dest/epoch-helpers/index.d.ts.map +1 -1
  130. package/dest/gas/gas.d.ts +9 -14
  131. package/dest/gas/gas.d.ts.map +1 -1
  132. package/dest/gas/gas.js +6 -3
  133. package/dest/gas/gas_fees.d.ts +9 -14
  134. package/dest/gas/gas_fees.d.ts.map +1 -1
  135. package/dest/gas/gas_fees.js +7 -3
  136. package/dest/gas/gas_settings.d.ts +27 -84
  137. package/dest/gas/gas_settings.d.ts.map +1 -1
  138. package/dest/gas/gas_settings.js +6 -3
  139. package/dest/ha-signing/config.d.ts +9 -73
  140. package/dest/ha-signing/config.d.ts.map +1 -1
  141. package/dest/ha-signing/config.js +5 -15
  142. package/dest/ha-signing/local_config.d.ts +3 -34
  143. package/dest/ha-signing/local_config.d.ts.map +1 -1
  144. package/dest/ha-signing/local_config.js +2 -2
  145. package/dest/hash/hash.d.ts +1 -1
  146. package/dest/hash/hash.d.ts.map +1 -1
  147. package/dest/hash/hash.js +2 -2
  148. package/dest/interfaces/allowed_element.d.ts +4 -28
  149. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  150. package/dest/interfaces/api_limit.d.ts +1 -1
  151. package/dest/interfaces/api_limit.js +1 -1
  152. package/dest/interfaces/archiver.d.ts +16 -36
  153. package/dest/interfaces/archiver.d.ts.map +1 -1
  154. package/dest/interfaces/archiver.js +211 -71
  155. package/dest/interfaces/aztec-node-admin.d.ts +62 -292
  156. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  157. package/dest/interfaces/aztec-node-admin.js +57 -14
  158. package/dest/interfaces/aztec-node-debug.js +4 -1
  159. package/dest/interfaces/aztec-node.d.ts +100 -106
  160. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  161. package/dest/interfaces/aztec-node.js +308 -70
  162. package/dest/interfaces/block-builder.d.ts +3 -1
  163. package/dest/interfaces/block-builder.d.ts.map +1 -1
  164. package/dest/interfaces/block_response.d.ts +90 -0
  165. package/dest/interfaces/block_response.d.ts.map +1 -0
  166. package/dest/interfaces/block_response.js +30 -0
  167. package/dest/interfaces/chain_tips.d.ts +50 -0
  168. package/dest/interfaces/chain_tips.d.ts.map +1 -0
  169. package/dest/interfaces/chain_tips.js +11 -0
  170. package/dest/interfaces/checkpoint_parameter.d.ts +14 -0
  171. package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -0
  172. package/dest/interfaces/checkpoint_parameter.js +18 -0
  173. package/dest/interfaces/checkpoint_response.d.ts +122 -0
  174. package/dest/interfaces/checkpoint_response.d.ts.map +1 -0
  175. package/dest/interfaces/checkpoint_response.js +26 -0
  176. package/dest/interfaces/client.d.ts +7 -2
  177. package/dest/interfaces/client.d.ts.map +1 -1
  178. package/dest/interfaces/client.js +6 -1
  179. package/dest/interfaces/configs.d.ts +41 -130
  180. package/dest/interfaces/configs.d.ts.map +1 -1
  181. package/dest/interfaces/configs.js +9 -1
  182. package/dest/interfaces/l1_publish_info.d.ts +29 -0
  183. package/dest/interfaces/l1_publish_info.d.ts.map +1 -0
  184. package/dest/interfaces/l1_publish_info.js +26 -0
  185. package/dest/interfaces/l2_logs_source.d.ts +14 -36
  186. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  187. package/dest/interfaces/l2_logs_source.js +5 -0
  188. package/dest/interfaces/merkle_tree_operations.d.ts +9 -3
  189. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  190. package/dest/interfaces/p2p-bootstrap.js +8 -2
  191. package/dest/interfaces/p2p.d.ts +15 -5
  192. package/dest/interfaces/p2p.d.ts.map +1 -1
  193. package/dest/interfaces/p2p.js +28 -5
  194. package/dest/interfaces/private_kernel_prover.d.ts +62 -2
  195. package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
  196. package/dest/interfaces/prover-agent.d.ts +5 -23
  197. package/dest/interfaces/prover-agent.d.ts.map +1 -1
  198. package/dest/interfaces/prover-agent.js +4 -1
  199. package/dest/interfaces/prover-client.d.ts +6 -27
  200. package/dest/interfaces/prover-client.d.ts.map +1 -1
  201. package/dest/interfaces/prover-node.js +22 -8
  202. package/dest/interfaces/proving-job-source.js +24 -4
  203. package/dest/interfaces/proving-job.d.ts +725 -5776
  204. package/dest/interfaces/proving-job.d.ts.map +1 -1
  205. package/dest/interfaces/proving-job.js +1 -1
  206. package/dest/interfaces/public_storage_override.d.ts +22 -0
  207. package/dest/interfaces/public_storage_override.d.ts.map +1 -0
  208. package/dest/interfaces/public_storage_override.js +7 -0
  209. package/dest/interfaces/server.d.ts +6 -1
  210. package/dest/interfaces/server.d.ts.map +1 -1
  211. package/dest/interfaces/server.js +5 -0
  212. package/dest/interfaces/slasher.d.ts +25 -56
  213. package/dest/interfaces/slasher.d.ts.map +1 -1
  214. package/dest/interfaces/slasher.js +8 -2
  215. package/dest/interfaces/tx_provider.d.ts +6 -1
  216. package/dest/interfaces/tx_provider.d.ts.map +1 -1
  217. package/dest/interfaces/validator.d.ts +40 -229
  218. package/dest/interfaces/validator.d.ts.map +1 -1
  219. package/dest/interfaces/validator.js +5 -0
  220. package/dest/interfaces/world_state.d.ts +2 -2
  221. package/dest/interfaces/world_state.d.ts.map +1 -1
  222. package/dest/kernel/hints/key_validation_request.d.ts +12 -8
  223. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  224. package/dest/kernel/hints/key_validation_request.js +20 -18
  225. package/dest/kernel/index.d.ts +5 -1
  226. package/dest/kernel/index.d.ts.map +1 -1
  227. package/dest/kernel/index.js +4 -0
  228. package/dest/kernel/log_hash.d.ts +6 -2
  229. package/dest/kernel/log_hash.d.ts.map +1 -1
  230. package/dest/kernel/log_hash.js +21 -9
  231. package/dest/kernel/private_circuit_public_inputs.d.ts +2 -2
  232. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  233. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +2 -2
  234. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  235. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +23 -0
  236. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -0
  237. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +35 -0
  238. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +24 -0
  239. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -0
  240. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +37 -0
  241. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts +16 -0
  242. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts.map +1 -0
  243. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.js +23 -0
  244. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts +17 -0
  245. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts.map +1 -0
  246. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.js +25 -0
  247. package/dest/kernel/private_kernel_prover_output.d.ts +3 -29
  248. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
  249. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +9 -6
  250. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  251. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +22 -7
  252. package/dest/kernel/private_to_avm_accumulated_data.d.ts +25 -69
  253. package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
  254. package/dest/kernel/private_to_avm_accumulated_data.js +11 -5
  255. package/dest/kernel/private_to_public_accumulated_data.d.ts +4 -3
  256. package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
  257. package/dest/kernel/private_to_public_accumulated_data.js +6 -3
  258. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +5 -4
  259. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  260. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -3
  261. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +5 -4
  262. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  263. package/dest/kernel/private_to_rollup_accumulated_data.js +6 -3
  264. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +5 -4
  265. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  266. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -3
  267. package/dest/kernel/public_call_request.d.ts +15 -30
  268. package/dest/kernel/public_call_request.d.ts.map +1 -1
  269. package/dest/kernel/public_call_request.js +16 -7
  270. package/dest/keys/derivation.d.ts +6 -2
  271. package/dest/keys/derivation.d.ts.map +1 -1
  272. package/dest/keys/derivation.js +16 -6
  273. package/dest/keys/public_key.d.ts +22 -3
  274. package/dest/keys/public_key.d.ts.map +1 -1
  275. package/dest/keys/public_key.js +20 -1
  276. package/dest/keys/public_keys.d.ts +55 -82
  277. package/dest/keys/public_keys.d.ts.map +1 -1
  278. package/dest/keys/public_keys.js +102 -74
  279. package/dest/kv-store/config.d.ts +3 -6
  280. package/dest/kv-store/config.d.ts.map +1 -1
  281. package/dest/kv-store/config.js +2 -7
  282. package/dest/logs/app_tagging_secret.d.ts +46 -0
  283. package/dest/logs/app_tagging_secret.d.ts.map +1 -0
  284. package/dest/logs/{extended_directional_app_tagging_secret.js → app_tagging_secret.js} +51 -21
  285. package/dest/logs/app_tagging_secret_kind.d.ts +7 -0
  286. package/dest/logs/app_tagging_secret_kind.d.ts.map +1 -0
  287. package/dest/logs/app_tagging_secret_kind.js +17 -0
  288. package/dest/logs/contract_class_log.d.ts +16 -34
  289. package/dest/logs/contract_class_log.d.ts.map +1 -1
  290. package/dest/logs/contract_class_log.js +11 -9
  291. package/dest/logs/index.d.ts +7 -7
  292. package/dest/logs/index.d.ts.map +1 -1
  293. package/dest/logs/index.js +6 -6
  294. package/dest/logs/log_cursor.d.ts +51 -0
  295. package/dest/logs/log_cursor.d.ts.map +1 -0
  296. package/dest/logs/log_cursor.js +82 -0
  297. package/dest/logs/log_result.d.ts +54 -0
  298. package/dest/logs/log_result.d.ts.map +1 -0
  299. package/dest/logs/log_result.js +56 -0
  300. package/dest/logs/logs_query.d.ts +82 -0
  301. package/dest/logs/logs_query.d.ts.map +1 -0
  302. package/dest/logs/logs_query.js +50 -0
  303. package/dest/logs/message_context.d.ts +3 -2
  304. package/dest/logs/message_context.d.ts.map +1 -1
  305. package/dest/logs/message_context.js +4 -0
  306. package/dest/logs/pre_tag.d.ts +11 -24
  307. package/dest/logs/pre_tag.d.ts.map +1 -1
  308. package/dest/logs/pre_tag.js +2 -2
  309. package/dest/logs/private_log.d.ts +7 -12
  310. package/dest/logs/private_log.d.ts.map +1 -1
  311. package/dest/logs/private_log.js +6 -3
  312. package/dest/logs/query_all_logs_by_tags.d.ts +24 -0
  313. package/dest/logs/query_all_logs_by_tags.d.ts.map +1 -0
  314. package/dest/logs/query_all_logs_by_tags.js +64 -0
  315. package/dest/logs/siloed_tag.d.ts +1 -1
  316. package/dest/logs/siloed_tag.d.ts.map +1 -1
  317. package/dest/logs/siloed_tag.js +3 -1
  318. package/dest/logs/tagging_index_range.d.ts +13 -31
  319. package/dest/logs/tagging_index_range.d.ts.map +1 -1
  320. package/dest/logs/tagging_index_range.js +2 -2
  321. package/dest/messaging/append_l1_to_l2_messages.d.ts +9 -0
  322. package/dest/messaging/append_l1_to_l2_messages.d.ts.map +1 -0
  323. package/dest/messaging/append_l1_to_l2_messages.js +12 -0
  324. package/dest/messaging/index.d.ts +2 -1
  325. package/dest/messaging/index.d.ts.map +1 -1
  326. package/dest/messaging/index.js +1 -0
  327. package/dest/messaging/l2_to_l1_membership.d.ts +43 -6
  328. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  329. package/dest/messaging/l2_to_l1_membership.js +72 -12
  330. package/dest/messaging/l2_to_l1_message.d.ts +38 -112
  331. package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
  332. package/dest/messaging/l2_to_l1_message.js +21 -12
  333. package/dest/noir/index.d.ts +3 -1
  334. package/dest/noir/index.d.ts.map +1 -1
  335. package/dest/note/note.d.ts +2 -2
  336. package/dest/note/note.d.ts.map +1 -1
  337. package/dest/p2p/block_proposal.d.ts +29 -10
  338. package/dest/p2p/block_proposal.d.ts.map +1 -1
  339. package/dest/p2p/block_proposal.js +56 -33
  340. package/dest/p2p/checkpoint_attestation.d.ts +14 -6
  341. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  342. package/dest/p2p/checkpoint_attestation.js +24 -20
  343. package/dest/p2p/checkpoint_proposal.d.ts +31 -10
  344. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  345. package/dest/p2p/checkpoint_proposal.js +58 -31
  346. package/dest/p2p/consensus_payload.d.ts +26 -20
  347. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  348. package/dest/p2p/consensus_payload.js +38 -19
  349. package/dest/p2p/signature_utils.d.ts +28 -19
  350. package/dest/p2p/signature_utils.d.ts.map +1 -1
  351. package/dest/p2p/signature_utils.js +118 -21
  352. package/dest/p2p/signed_txs.d.ts +15 -13
  353. package/dest/p2p/signed_txs.d.ts.map +1 -1
  354. package/dest/p2p/signed_txs.js +26 -24
  355. package/dest/parity/parity_base_private_inputs.d.ts +8 -4
  356. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  357. package/dest/parity/parity_base_private_inputs.js +7 -5
  358. package/dest/parity/parity_public_inputs.d.ts +8 -4
  359. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  360. package/dest/parity/parity_public_inputs.js +6 -3
  361. package/dest/parity/parity_root_private_inputs.d.ts +2 -2
  362. package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
  363. package/dest/proofs/chonk_proof.d.ts +17 -11
  364. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  365. package/dest/proofs/chonk_proof.js +44 -22
  366. package/dest/proofs/recursive_proof.d.ts +2 -2
  367. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  368. package/dest/rollup/block_merge_rollup_private_inputs.d.ts +2 -2
  369. package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
  370. package/dest/rollup/block_rollup_public_inputs.d.ts +12 -2
  371. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  372. package/dest/rollup/block_rollup_public_inputs.js +12 -0
  373. package/dest/rollup/block_root_rollup_private_inputs.d.ts +6 -6
  374. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  375. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +2 -2
  376. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
  377. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +9 -2
  378. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  379. package/dest/rollup/checkpoint_rollup_public_inputs.js +9 -0
  380. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +5 -5
  381. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  382. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts +2 -2
  383. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +1 -1
  384. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +2 -2
  385. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
  386. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +2 -2
  387. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
  388. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +2 -2
  389. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
  390. package/dest/rollup/root_rollup_private_inputs.d.ts +2 -2
  391. package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
  392. package/dest/rollup/root_rollup_public_inputs.d.ts +2 -2
  393. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  394. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +2 -2
  395. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
  396. package/dest/rollup/tx_rollup_public_inputs.d.ts +2 -2
  397. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  398. package/dest/schemas/schemas.d.ts +32 -78
  399. package/dest/schemas/schemas.d.ts.map +1 -1
  400. package/dest/schemas/schemas.js +2 -2
  401. package/dest/slashing/helpers.d.ts +2 -2
  402. package/dest/slashing/helpers.d.ts.map +1 -1
  403. package/dest/slashing/helpers.js +10 -7
  404. package/dest/slashing/types.d.ts +15 -23
  405. package/dest/slashing/types.d.ts.map +1 -1
  406. package/dest/slashing/types.js +16 -10
  407. package/dest/snapshots/types.d.ts +15 -78
  408. package/dest/snapshots/types.d.ts.map +1 -1
  409. package/dest/stats/stats.d.ts +2 -2
  410. package/dest/stats/stats.d.ts.map +1 -1
  411. package/dest/tests/factories.d.ts +23 -23
  412. package/dest/tests/factories.d.ts.map +1 -1
  413. package/dest/tests/factories.js +70 -47
  414. package/dest/tests/mocks.d.ts +8 -5
  415. package/dest/tests/mocks.d.ts.map +1 -1
  416. package/dest/tests/mocks.js +31 -38
  417. package/dest/timetable/index.d.ts +7 -10
  418. package/dest/timetable/index.d.ts.map +1 -1
  419. package/dest/timetable/index.js +60 -80
  420. package/dest/trees/append_only_tree_snapshot.d.ts +9 -14
  421. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  422. package/dest/trees/append_only_tree_snapshot.js +6 -3
  423. package/dest/trees/nullifier_leaf.d.ts +18 -42
  424. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  425. package/dest/trees/nullifier_membership_witness.d.ts +16 -59
  426. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  427. package/dest/trees/nullifier_membership_witness.js +2 -14
  428. package/dest/trees/public_data_leaf.d.ts +21 -53
  429. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  430. package/dest/trees/public_data_witness.d.ts +16 -58
  431. package/dest/trees/public_data_witness.d.ts.map +1 -1
  432. package/dest/tx/block_header.d.ts +4 -3
  433. package/dest/tx/block_header.d.ts.map +1 -1
  434. package/dest/tx/block_header.js +6 -3
  435. package/dest/tx/call_context.d.ts +4 -14
  436. package/dest/tx/call_context.d.ts.map +1 -1
  437. package/dest/tx/capsule.d.ts +2 -2
  438. package/dest/tx/capsule.d.ts.map +1 -1
  439. package/dest/tx/function_data.d.ts +4 -10
  440. package/dest/tx/function_data.d.ts.map +1 -1
  441. package/dest/tx/global_variables.d.ts +16 -49
  442. package/dest/tx/global_variables.d.ts.map +1 -1
  443. package/dest/tx/global_variables.js +8 -12
  444. package/dest/tx/hashed_values.d.ts +4 -3
  445. package/dest/tx/hashed_values.d.ts.map +1 -1
  446. package/dest/tx/hashed_values.js +6 -3
  447. package/dest/tx/in_tx.d.ts +5 -17
  448. package/dest/tx/in_tx.d.ts.map +1 -1
  449. package/dest/tx/indexed_tx_effect.d.ts +8 -19
  450. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  451. package/dest/tx/indexed_tx_effect.js +8 -4
  452. package/dest/tx/partial_state_reference.d.ts +22 -65
  453. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  454. package/dest/tx/partial_state_reference.js +6 -3
  455. package/dest/tx/private_execution_result.d.ts +6 -16
  456. package/dest/tx/private_execution_result.d.ts.map +1 -1
  457. package/dest/tx/profiling.d.ts +54 -352
  458. package/dest/tx/profiling.d.ts.map +1 -1
  459. package/dest/tx/profiling.js +4 -4
  460. package/dest/tx/protocol_contracts.d.ts +5 -9
  461. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  462. package/dest/tx/proven_tx.d.ts +30 -74
  463. package/dest/tx/proven_tx.d.ts.map +1 -1
  464. package/dest/tx/proven_tx.js +6 -0
  465. package/dest/tx/public_call_request_with_calldata.d.ts +4 -3
  466. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  467. package/dest/tx/public_call_request_with_calldata.js +6 -3
  468. package/dest/tx/simulated_tx.d.ts +62 -1249
  469. package/dest/tx/simulated_tx.d.ts.map +1 -1
  470. package/dest/tx/simulated_tx.js +12 -10
  471. package/dest/tx/state_reference.d.ts +30 -117
  472. package/dest/tx/state_reference.d.ts.map +1 -1
  473. package/dest/tx/state_reference.js +6 -4
  474. package/dest/tx/tree_snapshots.d.ts +27 -84
  475. package/dest/tx/tree_snapshots.d.ts.map +1 -1
  476. package/dest/tx/tree_snapshots.js +6 -4
  477. package/dest/tx/tx.d.ts +12 -11
  478. package/dest/tx/tx.d.ts.map +1 -1
  479. package/dest/tx/tx.js +30 -23
  480. package/dest/tx/tx_constant_data.d.ts +4 -3
  481. package/dest/tx/tx_constant_data.d.ts.map +1 -1
  482. package/dest/tx/tx_constant_data.js +6 -3
  483. package/dest/tx/tx_context.d.ts +32 -131
  484. package/dest/tx/tx_context.d.ts.map +1 -1
  485. package/dest/tx/tx_context.js +6 -6
  486. package/dest/tx/tx_hash.d.ts +6 -4
  487. package/dest/tx/tx_hash.d.ts.map +1 -1
  488. package/dest/tx/tx_hash.js +13 -5
  489. package/dest/tx/tx_receipt.d.ts +144 -67
  490. package/dest/tx/tx_receipt.d.ts.map +1 -1
  491. package/dest/tx/tx_receipt.js +141 -51
  492. package/dest/tx/validator/tx_validator.d.ts +5 -27
  493. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  494. package/dest/tx/validator/tx_validator.js +0 -4
  495. package/dest/types/shared.d.ts +4 -3
  496. package/dest/types/shared.d.ts.map +1 -1
  497. package/dest/types/shared.js +6 -3
  498. package/dest/update-checker/dev_version.d.ts +3 -0
  499. package/dest/update-checker/dev_version.d.ts.map +1 -0
  500. package/dest/update-checker/dev_version.js +1 -0
  501. package/dest/update-checker/index.d.ts +2 -1
  502. package/dest/update-checker/index.d.ts.map +1 -1
  503. package/dest/update-checker/index.js +1 -0
  504. package/dest/update-checker/package_version.d.ts +6 -3
  505. package/dest/update-checker/package_version.d.ts.map +1 -1
  506. package/dest/update-checker/package_version.js +8 -19
  507. package/dest/validators/schemas.d.ts +147 -614
  508. package/dest/validators/schemas.d.ts.map +1 -1
  509. package/dest/validators/schemas.js +6 -4
  510. package/dest/validators/types.d.ts +20 -3
  511. package/dest/validators/types.d.ts.map +1 -1
  512. package/dest/versioning/versioning.js +1 -1
  513. package/dest/vks/verification_key.d.ts +3 -3
  514. package/dest/vks/verification_key.d.ts.map +1 -1
  515. package/dest/world-state/genesis_data.d.ts +3 -1
  516. package/dest/world-state/genesis_data.d.ts.map +1 -1
  517. package/dest/world-state/genesis_data.js +3 -0
  518. package/dest/world-state/world_state_revision.d.ts +4 -39
  519. package/dest/world-state/world_state_revision.d.ts.map +1 -1
  520. package/dest/world-state/world_state_revision.js +0 -20
  521. package/package.json +12 -11
  522. package/src/abi/abi.ts +53 -19
  523. package/src/abi/contract_artifact.ts +11 -6
  524. package/src/abi/utils.ts +6 -4
  525. package/src/avm/avm.ts +5 -0
  526. package/src/avm/message_pack.ts +12 -3
  527. package/src/avm/revert_code.ts +0 -6
  528. package/src/aztec-address/index.ts +12 -3
  529. package/src/block/attestation_info.ts +11 -11
  530. package/src/block/block_parameter.ts +72 -4
  531. package/src/block/index.ts +0 -1
  532. package/src/block/l2_block_source.ts +201 -149
  533. package/src/block/l2_block_stream/l2_block_stream.ts +39 -28
  534. package/src/block/l2_block_stream/l2_tips_memory_store.ts +5 -0
  535. package/src/block/l2_block_stream/l2_tips_store_base.ts +29 -7
  536. package/src/block/proposal/attestations_and_signers.ts +32 -17
  537. package/src/block/test/l2_tips_store_test_suite.ts +1 -1
  538. package/src/checkpoint/checkpoint_data.ts +4 -0
  539. package/src/checkpoint/checkpoint_reexecution_tracker.ts +167 -0
  540. package/src/checkpoint/digest.ts +28 -0
  541. package/src/checkpoint/index.ts +3 -0
  542. package/src/checkpoint/previous_checkpoint_out_hashes.ts +61 -0
  543. package/src/config/chain-config.ts +6 -15
  544. package/src/config/index.ts +0 -1
  545. package/src/config/sequencer-config.ts +25 -7
  546. package/src/contract/complete_address.ts +7 -3
  547. package/src/contract/contract_address.ts +6 -6
  548. package/src/contract/contract_instance.ts +11 -2
  549. package/src/contract/interfaces/contract_instance.ts +6 -2
  550. package/src/database-version/version_manager.ts +17 -0
  551. package/src/gas/gas.ts +8 -3
  552. package/src/gas/gas_fees.ts +9 -9
  553. package/src/gas/gas_settings.ts +8 -3
  554. package/src/ha-signing/config.ts +9 -16
  555. package/src/ha-signing/local_config.ts +2 -2
  556. package/src/hash/hash.ts +2 -2
  557. package/src/interfaces/api_limit.ts +1 -1
  558. package/src/interfaces/archiver.ts +80 -94
  559. package/src/interfaces/aztec-node-admin.ts +32 -15
  560. package/src/interfaces/aztec-node-debug.ts +1 -1
  561. package/src/interfaces/aztec-node.ts +296 -262
  562. package/src/interfaces/block-builder.ts +2 -0
  563. package/src/interfaces/block_response.ts +92 -0
  564. package/src/interfaces/chain_tips.ts +24 -0
  565. package/src/interfaces/checkpoint_parameter.ts +20 -0
  566. package/src/interfaces/checkpoint_response.ts +84 -0
  567. package/src/interfaces/client.ts +6 -1
  568. package/src/interfaces/configs.ts +40 -1
  569. package/src/interfaces/l1_publish_info.ts +40 -0
  570. package/src/interfaces/l2_logs_source.ts +13 -42
  571. package/src/interfaces/merkle_tree_operations.ts +9 -2
  572. package/src/interfaces/p2p-bootstrap.ts +2 -2
  573. package/src/interfaces/p2p.ts +35 -15
  574. package/src/interfaces/private_kernel_prover.ts +88 -0
  575. package/src/interfaces/prover-agent.ts +1 -1
  576. package/src/interfaces/prover-node.ts +7 -7
  577. package/src/interfaces/proving-job-source.ts +4 -4
  578. package/src/interfaces/proving-job.ts +3 -3
  579. package/src/interfaces/public_storage_override.ts +26 -0
  580. package/src/interfaces/server.ts +5 -0
  581. package/src/interfaces/slasher.ts +17 -4
  582. package/src/interfaces/tx_provider.ts +6 -0
  583. package/src/interfaces/validator.ts +18 -2
  584. package/src/interfaces/world_state.ts +1 -1
  585. package/src/kernel/hints/key_validation_request.ts +18 -16
  586. package/src/kernel/index.ts +4 -0
  587. package/src/kernel/log_hash.ts +29 -9
  588. package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +49 -0
  589. package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +52 -0
  590. package/src/kernel/private_kernel_inner_2_circuit_private_inputs.ts +29 -0
  591. package/src/kernel/private_kernel_inner_3_circuit_private_inputs.ts +31 -0
  592. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +29 -14
  593. package/src/kernel/private_to_avm_accumulated_data.ts +16 -5
  594. package/src/kernel/private_to_public_accumulated_data.ts +9 -3
  595. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +10 -4
  596. package/src/kernel/private_to_rollup_accumulated_data.ts +8 -3
  597. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +9 -9
  598. package/src/kernel/public_call_request.ts +22 -7
  599. package/src/keys/derivation.ts +21 -9
  600. package/src/keys/public_key.ts +26 -2
  601. package/src/keys/public_keys.ts +124 -110
  602. package/src/kv-store/config.ts +3 -10
  603. package/src/logs/{extended_directional_app_tagging_secret.ts → app_tagging_secret.ts} +62 -23
  604. package/src/logs/app_tagging_secret_kind.ts +21 -0
  605. package/src/logs/contract_class_log.ts +15 -5
  606. package/src/logs/index.ts +6 -6
  607. package/src/logs/log_cursor.ts +110 -0
  608. package/src/logs/log_result.ts +104 -0
  609. package/src/logs/logs_query.ts +138 -0
  610. package/src/logs/message_context.ts +5 -1
  611. package/src/logs/pre_tag.ts +3 -6
  612. package/src/logs/private_log.ts +9 -3
  613. package/src/logs/query_all_logs_by_tags.ts +98 -0
  614. package/src/logs/siloed_tag.ts +6 -1
  615. package/src/logs/tagging_index_range.ts +4 -10
  616. package/src/messaging/append_l1_to_l2_messages.ts +21 -0
  617. package/src/messaging/index.ts +1 -0
  618. package/src/messaging/l2_to_l1_membership.ts +108 -19
  619. package/src/messaging/l2_to_l1_message.ts +29 -9
  620. package/src/noir/index.ts +2 -0
  621. package/src/p2p/block_proposal.ts +99 -28
  622. package/src/p2p/checkpoint_attestation.ts +26 -26
  623. package/src/p2p/checkpoint_proposal.ts +109 -39
  624. package/src/p2p/consensus_payload.ts +59 -28
  625. package/src/p2p/signature_utils.ts +110 -25
  626. package/src/p2p/signed_txs.ts +46 -28
  627. package/src/parity/parity_base_private_inputs.ts +10 -4
  628. package/src/parity/parity_public_inputs.ts +9 -2
  629. package/src/proofs/chonk_proof.ts +49 -15
  630. package/src/rollup/block_rollup_public_inputs.ts +13 -0
  631. package/src/rollup/checkpoint_rollup_public_inputs.ts +10 -0
  632. package/src/schemas/schemas.ts +6 -1
  633. package/src/slashing/helpers.ts +13 -9
  634. package/src/slashing/types.ts +21 -14
  635. package/src/stats/stats.ts +4 -0
  636. package/src/tests/factories.ts +97 -68
  637. package/src/tests/mocks.ts +49 -57
  638. package/src/timetable/index.ts +63 -105
  639. package/src/trees/append_only_tree_snapshot.ts +8 -3
  640. package/src/trees/nullifier_membership_witness.ts +2 -12
  641. package/src/tx/block_header.ts +8 -3
  642. package/src/tx/global_variables.ts +10 -18
  643. package/src/tx/hashed_values.ts +8 -3
  644. package/src/tx/indexed_tx_effect.ts +17 -4
  645. package/src/tx/partial_state_reference.ts +8 -3
  646. package/src/tx/profiling.ts +4 -4
  647. package/src/tx/proven_tx.ts +6 -0
  648. package/src/tx/public_call_request_with_calldata.ts +8 -3
  649. package/src/tx/simulated_tx.ts +18 -21
  650. package/src/tx/state_reference.ts +9 -4
  651. package/src/tx/tree_snapshots.ts +9 -4
  652. package/src/tx/tx.ts +41 -22
  653. package/src/tx/tx_constant_data.ts +8 -3
  654. package/src/tx/tx_context.ts +8 -3
  655. package/src/tx/tx_hash.ts +20 -5
  656. package/src/tx/tx_receipt.ts +263 -80
  657. package/src/tx/validator/tx_validator.ts +1 -5
  658. package/src/types/shared.ts +8 -3
  659. package/src/update-checker/dev_version.ts +2 -0
  660. package/src/update-checker/index.ts +1 -0
  661. package/src/update-checker/package_version.ts +10 -23
  662. package/src/validators/schemas.ts +6 -4
  663. package/src/validators/types.ts +21 -2
  664. package/src/versioning/versioning.ts +1 -1
  665. package/src/world-state/genesis_data.ts +12 -0
  666. package/src/world-state/world_state_revision.ts +0 -33
  667. package/dest/block/checkpointed_l2_block.d.ts +0 -150
  668. package/dest/block/checkpointed_l2_block.d.ts.map +0 -1
  669. package/dest/block/checkpointed_l2_block.js +0 -46
  670. package/dest/config/pipelining-config.d.ts +0 -19
  671. package/dest/config/pipelining-config.d.ts.map +0 -1
  672. package/dest/config/pipelining-config.js +0 -18
  673. package/dest/interfaces/get_logs_response.d.ts +0 -97
  674. package/dest/interfaces/get_logs_response.d.ts.map +0 -1
  675. package/dest/interfaces/get_logs_response.js +0 -12
  676. package/dest/logs/extended_contract_class_log.d.ts +0 -51
  677. package/dest/logs/extended_contract_class_log.d.ts.map +0 -1
  678. package/dest/logs/extended_contract_class_log.js +0 -67
  679. package/dest/logs/extended_directional_app_tagging_secret.d.ts +0 -47
  680. package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +0 -1
  681. package/dest/logs/extended_public_log.d.ts +0 -106
  682. package/dest/logs/extended_public_log.d.ts.map +0 -1
  683. package/dest/logs/extended_public_log.js +0 -73
  684. package/dest/logs/log_filter.d.ts +0 -25
  685. package/dest/logs/log_filter.d.ts.map +0 -1
  686. package/dest/logs/log_filter.js +0 -12
  687. package/dest/logs/log_id.d.ts +0 -85
  688. package/dest/logs/log_id.d.ts.map +0 -1
  689. package/dest/logs/log_id.js +0 -93
  690. package/dest/logs/tx_scoped_l2_log.d.ts +0 -51
  691. package/dest/logs/tx_scoped_l2_log.d.ts.map +0 -1
  692. package/dest/logs/tx_scoped_l2_log.js +0 -77
  693. package/src/block/checkpointed_l2_block.ts +0 -70
  694. package/src/config/pipelining-config.ts +0 -31
  695. package/src/interfaces/get_logs_response.ts +0 -35
  696. package/src/logs/extended_contract_class_log.ts +0 -87
  697. package/src/logs/extended_public_log.ts +0 -94
  698. package/src/logs/log_filter.ts +0 -36
  699. package/src/logs/log_id.ts +0 -124
  700. package/src/logs/tx_scoped_l2_log.ts +0 -114
@@ -34,7 +34,6 @@ export type CheckpointTimingConfig = {
34
34
  l1PublishingTime?: number;
35
35
  minExecutionTime?: number;
36
36
  p2pPropagationTime?: number;
37
- pipelining?: boolean;
38
37
  };
39
38
 
40
39
  export interface CheckpointTiming {
@@ -64,13 +63,15 @@ export interface PipelinedCheckpointTiming extends CheckpointTiming {
64
63
  }
65
64
 
66
65
  /**
67
- * Shared base for checkpoint timing implementations.
66
+ * Checkpoint timing model for proposer pipelining.
68
67
  *
69
- * This class owns the common inputs and formulas used by both pipelined and
70
- * non-pipelined scheduling. Variant-specific deadline math is delegated to the
71
- * concrete subclasses below.
68
+ * The build work starts at the wall-clock slot boundary and the checkpoint
69
+ * proposal is broadcast early enough that attestations complete by the end of
70
+ * the build slot. L1 submission can then be sent at the boundary of the target
71
+ * slot. The target-slot window getters are intended for consumers such as P2P
72
+ * validators that need to validate pipelined messages against wallclock time.
72
73
  */
73
- abstract class BaseCheckpointTiming implements CheckpointTiming {
74
+ class CheckpointTimingModel implements PipelinedCheckpointTiming {
74
75
  public readonly aztecSlotDuration: number;
75
76
  public readonly blockDuration: number | undefined;
76
77
  public readonly checkpointAssembleTime: number;
@@ -78,6 +79,7 @@ abstract class BaseCheckpointTiming implements CheckpointTiming {
78
79
  public readonly l1PublishingTime: number;
79
80
  public readonly minExecutionTime: number;
80
81
  public readonly p2pPropagationTime: number;
82
+ private readonly ethereumSlotDuration: number;
81
83
 
82
84
  constructor(opts: CheckpointTimingConfig) {
83
85
  this.aztecSlotDuration = opts.aztecSlotDuration;
@@ -88,6 +90,7 @@ abstract class BaseCheckpointTiming implements CheckpointTiming {
88
90
  this.l1PublishingTime = opts.l1PublishingTime ?? DEFAULT_L1_PUBLISHING_TIME;
89
91
  this.minExecutionTime = opts.minExecutionTime ?? MIN_EXECUTION_TIME;
90
92
  this.p2pPropagationTime = opts.p2pPropagationTime ?? DEFAULT_P2P_PROPAGATION_TIME;
93
+ this.ethereumSlotDuration = opts.ethereumSlotDuration ?? this.l1PublishingTime;
91
94
  }
92
95
 
93
96
  public get checkpointFinalizationTime(): number {
@@ -98,142 +101,99 @@ abstract class BaseCheckpointTiming implements CheckpointTiming {
98
101
  return this.checkpointAssembleTime + this.p2pPropagationTime * 2 + this.l1PublishingTime;
99
102
  }
100
103
 
101
- public get pipeliningAttestationGracePeriod(): number {
102
- // Allow enough time to
103
- // - build the block
104
- // - pass it back over p2p
105
- return (this.blockDuration ?? 0) + this.p2pPropagationTime;
106
- }
107
-
108
- public abstract get timeReservedAtEnd(): number;
109
- public abstract get minimumBuildSlotWork(): number;
110
-
111
- public get initializeDeadline(): number {
112
- return this.aztecSlotDuration - this.minimumBuildSlotWork;
104
+ public get proposalWindowIntoTargetSlot(): number {
105
+ // Proposals no longer spill into the target slot: they are broadcast early
106
+ // enough in the build slot that attestations complete before the boundary.
107
+ // Any residual tolerance into the target slot is covered by clock disparity.
108
+ return 0;
113
109
  }
114
110
 
115
- public abstract get checkpointAssemblyDeadline(): number;
116
-
117
- public get checkpointAttestationStartDeadline(): number {
118
- return this.checkpointAssemblyDeadline;
111
+ public get attestationWindowIntoTargetSlot(): number {
112
+ // Span from the target-slot start to the L1 publish deadline (12s before the last L1 block of
113
+ // the target slot). The p2p layer accepts slot-N attestations until right before the publish
114
+ // deadline so the proposer can keep collecting useful attestations up to the latest moment the
115
+ // checkpoint can still land on L1 in the target slot.
116
+ return Math.max(0, this.aztecSlotDuration - 2 * this.ethereumSlotDuration);
119
117
  }
120
118
 
121
- public abstract get checkpointAttestationDeadline(): number;
122
- public abstract get checkpointPublishingDeadline(): number;
123
-
124
- public calculateMaxBlocksPerSlot(): number {
125
- if (!this.blockDuration) {
126
- return 1;
127
- }
128
-
129
- const timeAvailableForBlocks = this.aztecSlotDuration - this.checkpointInitializationTime - this.timeReservedAtEnd;
130
- return Math.floor(timeAvailableForBlocks / this.blockDuration);
119
+ public get pipeliningAttestationGracePeriod(): number {
120
+ // Under the early-pipelining regime attestations complete inside the build slot itself. Local
121
+ // networks can publish much faster than the Ethereum slot geometry, so they may use the target
122
+ // slot attestation window without moving the L1 publish cutoff.
123
+ return this.l1PublishingTime < this.ethereumSlotDuration ? this.attestationWindowIntoTargetSlot : 0;
131
124
  }
132
- }
133
125
 
134
- /**
135
- * Checkpoint timing model for the non-pipelined sequencer flow.
136
- *
137
- * In this mode, checkpoint assembly, attestation collection, and L1 publishing
138
- * must all complete within the current Aztec slot.
139
- */
140
- class StandardCheckpointTimingModel extends BaseCheckpointTiming {
141
126
  public get timeReservedAtEnd(): number {
142
- return (this.blockDuration ?? 0) + this.checkpointFinalizationTime;
127
+ // Reserve enough time at the end of the build slot for:
128
+ // - assembling and broadcasting the checkpoint proposal
129
+ // - round-trip p2p propagation (proposal out, attestations back)
130
+ // - validators re-executing the last block
131
+ return this.checkpointAssembleTime + 2 * this.p2pPropagationTime + (this.blockDuration ?? 0);
143
132
  }
144
133
 
145
134
  public get minimumBuildSlotWork(): number {
146
- return this.checkpointInitializationTime + this.minExecutionTime * 2 + this.checkpointFinalizationTime;
147
- }
148
-
149
- public get checkpointAssemblyDeadline(): number {
150
- return this.aztecSlotDuration - this.l1PublishingTime - 2 * this.p2pPropagationTime;
151
- }
152
-
153
- public get checkpointAttestationDeadline(): number {
154
- return this.aztecSlotDuration - this.l1PublishingTime;
135
+ return this.checkpointInitializationTime + this.minExecutionTime * 2;
155
136
  }
156
137
 
157
- public get checkpointPublishingDeadline(): number {
158
- return this.aztecSlotDuration - this.l1PublishingTime;
159
- }
160
- }
161
-
162
- /**
163
- * Checkpoint timing model for proposer pipelining.
164
- *
165
- * In this mode, the build work still starts in the current slot, but checkpoint
166
- * assembly and attestation collection can extend into the target slot. The extra
167
- * target-slot window getters are intended for consumers such as P2P validators
168
- * that need to validate pipelined messages against wallclock time.
169
- */
170
- class PipelinedCheckpointTimingModel extends BaseCheckpointTiming implements PipelinedCheckpointTiming {
171
- public get proposalWindowIntoTargetSlot(): number {
172
- // Allow the p2p propagation time to receive a checkpoint proposal from leader
173
- return this.p2pPropagationTime;
138
+ public get initializeDeadline(): number {
139
+ return this.aztecSlotDuration - this.minimumBuildSlotWork;
174
140
  }
175
141
 
176
- public get attestationWindowIntoTargetSlot(): number {
177
- return this.aztecSlotDuration - this.l1PublishingTime;
142
+ public get checkpointAssemblyDeadline(): number {
143
+ // Allow enough time to build all blocks and receive attestations. With
144
+ // `pipeliningAttestationGracePeriod = 0` this equals `aztecSlotDuration`.
145
+ return this.aztecSlotDuration + this.pipeliningAttestationGracePeriod;
178
146
  }
179
147
 
180
- public get timeReservedAtEnd(): number {
181
- return this.checkpointAssembleTime + this.p2pPropagationTime;
148
+ public get checkpointAttestationStartDeadline(): number {
149
+ return this.checkpointAssemblyDeadline;
182
150
  }
183
151
 
184
- public get minimumBuildSlotWork(): number {
185
- return this.checkpointInitializationTime + this.minExecutionTime * 2;
152
+ public get checkpointAttestationDeadline(): number {
153
+ // L1 publish deadline 12s (one Ethereum slot) before the last L1 block of the target L2 slot;
154
+ // the latest the checkpoint can be submitted and still land on L1 in the target slot. This is an
155
+ // L1-geometry bound (ethereumSlotDuration), matching the publisher's send lead in sendRequestsAt
156
+ // (which also targets one Ethereum slot before the target slot start).
157
+ return this.aztecSlotDuration * 2 - this.ethereumSlotDuration;
186
158
  }
187
159
 
188
- public get checkpointAssemblyDeadline(): number {
189
- // Allow enough time to
190
- // - build all blocks
191
- // - receive attestations
192
- return this.aztecSlotDuration + this.pipeliningAttestationGracePeriod;
160
+ public get checkpointPublishingDeadline(): number {
161
+ // L1 publish deadline — 12s (one Ethereum slot) before the last L1 block of the target L2 slot;
162
+ // the latest the checkpoint can be submitted and still land on L1 in the target slot.
163
+ return this.aztecSlotDuration * 2 - this.ethereumSlotDuration;
193
164
  }
194
165
 
195
- public get checkpointAttestationDeadline(): number {
196
- // Allowed to be into the next wallclock slot minus the allocated l1 publishing time
197
- return this.aztecSlotDuration * 2 - this.l1PublishingTime;
198
- }
166
+ public calculateMaxBlocksPerSlot(): number {
167
+ if (!this.blockDuration) {
168
+ return 1;
169
+ }
199
170
 
200
- public get checkpointPublishingDeadline(): number {
201
- // Allowed to be into the next wallclock slot minus the allocated l1 Publishing time
202
- return this.aztecSlotDuration * 2 - this.l1PublishingTime;
171
+ const timeAvailableForBlocks = this.aztecSlotDuration - this.checkpointInitializationTime - this.timeReservedAtEnd;
172
+ return Math.floor(timeAvailableForBlocks / this.blockDuration);
203
173
  }
204
174
  }
205
175
 
206
176
  /**
207
- * Creates a checkpoint timing model for the requested scheduling mode.
177
+ * Creates a checkpoint timing model.
208
178
  *
209
179
  * Most callers should use this factory and depend only on the shared
210
- * `CheckpointTiming` interface. The returned implementation is selected from
211
- * `opts.pipelining`.
180
+ * `CheckpointTiming` interface.
212
181
  */
213
182
  export function createCheckpointTimingModel(opts: CheckpointTimingConfig): CheckpointTiming {
214
- validateCheckpointTimingConfig(opts);
215
- const normalizedOpts = normalizeCheckpointTimingConfig(opts);
216
-
217
- const timing = normalizedOpts.pipelining
218
- ? new PipelinedCheckpointTimingModel(normalizedOpts)
219
- : new StandardCheckpointTimingModel(normalizedOpts);
220
- validateCheckpointTimingModel(timing);
221
- return timing;
183
+ return createPipelinedCheckpointTimingModel(opts);
222
184
  }
223
185
 
224
186
  /**
225
- * Creates a pipelined checkpoint timing model with target-slot window accessors.
187
+ * Creates a checkpoint timing model exposing the target-slot window accessors.
226
188
  *
227
- * Use this when the caller specifically needs the pipelined-only timing surface,
228
- * such as proposal or attestation acceptance windows into the target slot.
189
+ * Use this when the caller specifically needs the pipelined timing surface, such
190
+ * as proposal or attestation acceptance windows into the target slot.
229
191
  */
230
- export function createPipelinedCheckpointTimingModel(
231
- opts: Omit<CheckpointTimingConfig, 'pipelining'>,
232
- ): PipelinedCheckpointTiming {
192
+ export function createPipelinedCheckpointTimingModel(opts: CheckpointTimingConfig): PipelinedCheckpointTiming {
233
193
  validateCheckpointTimingConfig(opts);
234
194
  const normalizedOpts = normalizeCheckpointTimingConfig(opts);
235
195
 
236
- const timing = new PipelinedCheckpointTimingModel(normalizedOpts);
196
+ const timing = new CheckpointTimingModel(normalizedOpts);
237
197
  validateCheckpointTimingModel(timing);
238
198
  return timing;
239
199
  }
@@ -255,7 +215,6 @@ export function calculateMaxBlocksPerSlot(
255
215
  checkpointAssembleTime?: number;
256
216
  p2pPropagationTime?: number;
257
217
  l1PublishingTime?: number;
258
- pipelining?: boolean;
259
218
  } = {},
260
219
  ): number {
261
220
  return createCheckpointTimingModel({
@@ -265,7 +224,6 @@ export function calculateMaxBlocksPerSlot(
265
224
  checkpointInitializationTime: opts.checkpointInitializationTime,
266
225
  l1PublishingTime: opts.l1PublishingTime,
267
226
  p2pPropagationTime: opts.p2pPropagationTime,
268
- pipelining: opts.pipelining,
269
227
  }).calculateMaxBlocksPerSlot();
270
228
  }
271
229
 
@@ -1,6 +1,6 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { schemas } from '@aztec/foundation/schemas';
3
- import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
+ import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
4
4
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
5
5
 
6
6
  import { inspect } from 'util';
@@ -44,8 +44,13 @@ export class AppendOnlyTreeSnapshot {
44
44
  return this.root.size + 4;
45
45
  }
46
46
 
47
- toBuffer() {
48
- return serializeToBuffer(this.root, this.nextAvailableLeafIndex);
47
+ toBuffer(): Buffer;
48
+ toBuffer(sink: BufferSink): void;
49
+ toBuffer(sink?: BufferSink): Buffer | void {
50
+ if (!sink) {
51
+ return BufferSink.serialize(this);
52
+ }
53
+ serializeToSink(sink, this.root, this.nextAvailableLeafIndex);
49
54
  }
50
55
 
51
56
  toFields(): Fr[] {
@@ -53,22 +53,12 @@ export class NullifierMembershipWitness {
53
53
  return new MembershipWitness(NULLIFIER_TREE_HEIGHT, this.index, this.siblingPath.toTuple());
54
54
  }
55
55
 
56
- /**
57
- * Returns a field array representation of a nullifier witness.
58
- * @returns A field array representation of a nullifier witness.
59
- */
60
- public toFields(): Fr[] {
61
- return [new Fr(this.index), ...this.leafPreimage.toFields(), ...this.siblingPath.toFields()];
62
- }
63
-
64
- /**
65
- * Returns a representation of the nullifier membership witness as expected by intrinsic Noir deserialization.
66
- */
56
+ /** Serializes as `(NullifierLeafPreimage, MembershipWitness)` to match the Noir oracle return type. */
67
57
  public toNoirRepresentation(): (string | string[])[] {
68
58
  // TODO(#12874): remove the stupid as string conversion by modifying ForeignCallOutput type in acvm.js
69
59
  return [
70
- new Fr(this.index).toString() as string,
71
60
  ...(this.leafPreimage.toFields().map(fr => fr.toString()) as string[]),
61
+ new Fr(this.index).toString() as string,
72
62
  this.siblingPath.toFields().map(fr => fr.toString()) as string[],
73
63
  ];
74
64
  }
@@ -4,7 +4,7 @@ import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
4
4
  import { randomInt } from '@aztec/foundation/crypto/random';
5
5
  import { Fr } from '@aztec/foundation/curves/bn254';
6
6
  import { type ZodFor, schemas } from '@aztec/foundation/schemas';
7
- import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
7
+ import { BufferReader, BufferSink, FieldReader, serializeToFields, serializeToSink } from '@aztec/foundation/serialize';
8
8
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
9
9
  import type { FieldsOf } from '@aztec/foundation/types';
10
10
 
@@ -85,8 +85,13 @@ export class BlockHeader {
85
85
  );
86
86
  }
87
87
 
88
- toBuffer() {
89
- return serializeToBuffer(...BlockHeader.getFields(this));
88
+ toBuffer(): Buffer;
89
+ toBuffer(sink: BufferSink): void;
90
+ toBuffer(sink?: BufferSink): Buffer | void {
91
+ if (!sink) {
92
+ return BufferSink.serialize(this);
93
+ }
94
+ serializeToSink(sink, ...BlockHeader.getFields(this));
90
95
  }
91
96
 
92
97
  toFields(): Fr[] {
@@ -4,13 +4,7 @@ import { randomInt } from '@aztec/foundation/crypto/random';
4
4
  import { Fr } from '@aztec/foundation/curves/bn254';
5
5
  import { EthAddress } from '@aztec/foundation/eth-address';
6
6
  import { jsonStringify } from '@aztec/foundation/json-rpc';
7
- import {
8
- BufferReader,
9
- FieldReader,
10
- bigintToUInt64BE,
11
- serializeToBuffer,
12
- serializeToFields,
13
- } from '@aztec/foundation/serialize';
7
+ import { BufferReader, BufferSink, FieldReader, serializeToFields, serializeToSink } from '@aztec/foundation/serialize';
14
8
  import type { FieldsOf } from '@aztec/foundation/types';
15
9
 
16
10
  import { inspect } from 'util';
@@ -149,17 +143,15 @@ export class GlobalVariables {
149
143
  ] as const;
150
144
  }
151
145
 
152
- toBuffer() {
153
- return serializeToBuffer([
154
- this.chainId,
155
- this.version,
156
- this.blockNumber,
157
- this.slotNumber,
158
- bigintToUInt64BE(this.timestamp),
159
- this.coinbase,
160
- this.feeRecipient,
161
- this.gasFees,
162
- ]);
146
+ toBuffer(): Buffer;
147
+ toBuffer(sink: BufferSink): void;
148
+ toBuffer(sink?: BufferSink): Buffer | void {
149
+ if (!sink) {
150
+ return BufferSink.serialize(this);
151
+ }
152
+ serializeToSink(sink, this.chainId, this.version, this.blockNumber, this.slotNumber);
153
+ sink.writeUInt64(this.timestamp);
154
+ serializeToSink(sink, this.coinbase, this.feeRecipient, this.gasFees);
163
155
  }
164
156
 
165
157
  toFields() {
@@ -1,5 +1,5 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
2
+ import { BufferReader, BufferSink, serializeToSink } from '@aztec/foundation/serialize';
3
3
  import type { FieldsOf } from '@aztec/foundation/types';
4
4
 
5
5
  import { z } from 'zod';
@@ -48,8 +48,13 @@ export class HashedValues {
48
48
  return new HashedValues([Fr.random(), Fr.random()], Fr.random());
49
49
  }
50
50
 
51
- toBuffer() {
52
- return serializeToBuffer(new Vector(this.values), this.hash);
51
+ toBuffer(): Buffer;
52
+ toBuffer(sink: BufferSink): void;
53
+ toBuffer(sink?: BufferSink): Buffer | void {
54
+ if (!sink) {
55
+ return BufferSink.serialize(this);
56
+ }
57
+ serializeToSink(sink, new Vector(this.values), this.hash);
53
58
  }
54
59
 
55
60
  static fromBuffer(buffer: Buffer | BufferReader): HashedValues {
@@ -1,4 +1,4 @@
1
- import { BlockNumber } from '@aztec/foundation/branded-types';
1
+ import { BlockNumber, SlotNumber } from '@aztec/foundation/branded-types';
2
2
  import { schemas } from '@aztec/foundation/schemas';
3
3
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
4
 
@@ -6,21 +6,32 @@ import { BlockHash } from '../block/block_hash.js';
6
6
  import { type DataInBlock, dataInBlockSchemaFor, randomDataInBlock } from '../block/in_block.js';
7
7
  import { TxEffect } from './tx_effect.js';
8
8
 
9
- export type IndexedTxEffect = DataInBlock<TxEffect> & { txIndexInBlock: number };
9
+ /** A tx effect together with its position in the block (`txIndexInBlock`) and the slot the block was built in. */
10
+ export type IndexedTxEffect = DataInBlock<TxEffect> & { txIndexInBlock: number; slotNumber: SlotNumber };
10
11
 
11
12
  export function indexedTxSchema() {
12
- return dataInBlockSchemaFor(TxEffect.schema).extend({ txIndexInBlock: schemas.Integer });
13
+ return dataInBlockSchemaFor(TxEffect.schema).extend({
14
+ txIndexInBlock: schemas.Integer,
15
+ slotNumber: schemas.SlotNumber,
16
+ });
13
17
  }
14
18
 
15
19
  export async function randomIndexedTxEffect(): Promise<IndexedTxEffect> {
16
20
  return {
17
21
  ...randomDataInBlock(await TxEffect.random({ numNullifiers: 1 + Math.floor(Math.random() * 64) })),
18
22
  txIndexInBlock: Math.floor(Math.random() * 1000),
23
+ slotNumber: SlotNumber(Math.floor(Math.random() * 1000)),
19
24
  };
20
25
  }
21
26
 
22
27
  export function serializeIndexedTxEffect(effect: IndexedTxEffect): Buffer {
23
- return serializeToBuffer(effect.l2BlockHash, effect.l2BlockNumber, effect.txIndexInBlock, effect.data);
28
+ return serializeToBuffer(
29
+ effect.l2BlockHash,
30
+ effect.l2BlockNumber,
31
+ effect.txIndexInBlock,
32
+ effect.slotNumber,
33
+ effect.data,
34
+ );
24
35
  }
25
36
 
26
37
  export function deserializeIndexedTxEffect(buffer: Buffer): IndexedTxEffect {
@@ -29,12 +40,14 @@ export function deserializeIndexedTxEffect(buffer: Buffer): IndexedTxEffect {
29
40
  const l2BlockHash = BlockHash.fromBuffer(reader);
30
41
  const l2BlockNumber = BlockNumber(reader.readNumber());
31
42
  const txIndexInBlock = reader.readNumber();
43
+ const slotNumber = SlotNumber(reader.readNumber());
32
44
  const data = reader.readObject(TxEffect);
33
45
 
34
46
  return {
35
47
  l2BlockHash,
36
48
  l2BlockNumber,
37
49
  txIndexInBlock,
50
+ slotNumber,
38
51
  data,
39
52
  };
40
53
  }
@@ -1,6 +1,6 @@
1
1
  import { PARTIAL_STATE_REFERENCE_LENGTH } from '@aztec/constants';
2
2
  import type { Fr } from '@aztec/foundation/curves/bn254';
3
- import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
+ import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
4
4
  import type { FieldsOf } from '@aztec/foundation/types';
5
5
 
6
6
  import { z } from 'zod';
@@ -88,8 +88,13 @@ export class PartialStateReference {
88
88
  );
89
89
  }
90
90
 
91
- toBuffer() {
92
- return serializeToBuffer(this.noteHashTree, this.nullifierTree, this.publicDataTree);
91
+ toBuffer(): Buffer;
92
+ toBuffer(sink: BufferSink): void;
93
+ toBuffer(sink?: BufferSink): Buffer | void {
94
+ if (!sink) {
95
+ return BufferSink.serialize(this);
96
+ }
97
+ serializeToSink(sink, this.noteHashTree, this.nullifierTree, this.publicDataTree);
93
98
  }
94
99
 
95
100
  toFields() {
@@ -133,12 +133,12 @@ export class TxProfileResult {
133
133
  ],
134
134
  {
135
135
  nodeRPCCalls: {
136
- perMethod: { getBlockHeader: { times: [1] } },
136
+ perMethod: { getBlock: { times: [1] } },
137
137
  roundTrips: {
138
138
  roundTrips: 1,
139
139
  totalBlockingTime: 1,
140
140
  roundTripDurations: [1],
141
- roundTripMethods: [['getBlockHeader']],
141
+ roundTripMethods: [['getBlock']],
142
142
  },
143
143
  },
144
144
  timings: {
@@ -184,12 +184,12 @@ export class UtilityExecutionResult {
184
184
  static random(): UtilityExecutionResult {
185
185
  return new UtilityExecutionResult([Fr.random()], [], 0n, {
186
186
  nodeRPCCalls: {
187
- perMethod: { getBlockHeader: { times: [1] } },
187
+ perMethod: { getBlock: { times: [1] } },
188
188
  roundTrips: {
189
189
  roundTrips: 1,
190
190
  totalBlockingTime: 1,
191
191
  roundTripDurations: [1],
192
- roundTripMethods: [['getBlockHeader']],
192
+ roundTripMethods: [['getBlock']],
193
193
  },
194
194
  },
195
195
  timings: {
@@ -13,6 +13,7 @@ import {
13
13
  } from './private_execution_result.js';
14
14
  import { type ProvingStats, ProvingTimingsSchema } from './profiling.js';
15
15
  import { Tx } from './tx.js';
16
+ import type { TxHash } from './tx_hash.js';
16
17
 
17
18
  export class TxProvingResult {
18
19
  constructor(
@@ -22,6 +23,11 @@ export class TxProvingResult {
22
23
  public stats?: ProvingStats,
23
24
  ) {}
24
25
 
26
+ getTxHash(): Promise<TxHash> {
27
+ // Equivalent to `(await this.toTx()).txHash` but skips walking the execution result tree to collect logs.
28
+ return Tx.computeTxHash({ data: this.publicInputs });
29
+ }
30
+
25
31
  async toTx(): Promise<Tx> {
26
32
  const contractClassLogs = collectSortedContractClassLogs(this.privateExecutionResult);
27
33
 
@@ -1,5 +1,5 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
2
+ import { BufferReader, BufferSink, serializeToSink } from '@aztec/foundation/serialize';
3
3
 
4
4
  import { inspect } from 'util';
5
5
  import { z } from 'zod';
@@ -63,8 +63,13 @@ export class PublicCallRequestWithCalldata {
63
63
  );
64
64
  }
65
65
 
66
- toBuffer() {
67
- return serializeToBuffer(this.request, new Vector(this.calldata));
66
+ toBuffer(): Buffer;
67
+ toBuffer(sink: BufferSink): void;
68
+ toBuffer(sink?: BufferSink): Buffer | void {
69
+ if (!sink) {
70
+ return BufferSink.serialize(this);
71
+ }
72
+ serializeToSink(sink, this.request, new Vector(this.calldata));
68
73
  }
69
74
 
70
75
  static fromBuffer(buffer: Buffer | BufferReader) {
@@ -3,13 +3,13 @@ import type { FieldsOf } from '@aztec/foundation/types';
3
3
 
4
4
  import { z } from 'zod';
5
5
 
6
- import { type ContractArtifact, ContractArtifactSchema } from '../abi/abi.js';
7
6
  import {
8
7
  type ContractInstanceWithAddress,
9
8
  ContractInstanceWithAddressSchema,
10
9
  } from '../contract/interfaces/contract_instance.js';
11
10
  import { Gas } from '../gas/gas.js';
12
11
  import type { GasUsed } from '../gas/gas_used.js';
12
+ import { type PublicStorageOverride, PublicStorageOverrideSchema } from '../interfaces/public_storage_override.js';
13
13
  import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
14
14
  import { ChonkProof } from '../proofs/chonk_proof.js';
15
15
  import type { OffchainEffect } from './offchain_effect.js';
@@ -24,39 +24,36 @@ import { NestedProcessReturnValues, PublicSimulationOutput } from './public_simu
24
24
  import { Tx } from './tx.js';
25
25
 
26
26
  /*
27
- * If passed during the execution of a user circuit, the contract function simulator will replace the instance and class
28
- * of the contract with the one provided in the overrides for that address. An example use case
29
- * would be overriding your own account contract so that valid signatures don't have to be provided while simulating.
27
+ * If passed during the execution of a user circuit, the contract function simulator will replace
28
+ * the contract instance at that address with the one provided. An example use case would be
29
+ * overriding your own account contract so that valid signatures don't have to be provided while
30
+ * simulating. The override's `currentContractClassId` resolves through PXE's locally registered
31
+ * classes, so pre-register the target artifact via `pxe.registerContractClass(...)`.
30
32
  */
31
- export type ContractOverrides = Record<
32
- string /* AztecAddress as string */,
33
- { instance: ContractInstanceWithAddress; artifact: ContractArtifact }
34
- >;
33
+ export type ContractOverrides = Record<string /* AztecAddress as string */, { instance: ContractInstanceWithAddress }>;
35
34
 
36
35
  /*
37
- * Optional values that can be overridden during simulation. In order to simulate a transaction with these
38
- * set, it *must* be run without the kernel circuits, or validations will fail
36
+ * Optional values that can be overridden during simulation. `publicStorage` writes to the public-data
37
+ * tree fork. `contracts` overrides contract instances in the contract DB.
38
+ * In order to simulate a transaction with these set, it *must* be run without the kernel circuits,
39
+ * or validations will fail.
39
40
  */
40
41
  export class SimulationOverrides {
42
+ public publicStorage?: PublicStorageOverride[];
41
43
  public contracts?: ContractOverrides;
42
44
 
43
- constructor(contracts: ContractOverrides = {}) {
44
- this.contracts = Object.keys(contracts).length > 0 ? contracts : undefined;
45
+ constructor(args: { publicStorage?: PublicStorageOverride[]; contracts?: ContractOverrides } = {}) {
46
+ this.publicStorage = args.publicStorage?.length ? args.publicStorage : undefined;
47
+ this.contracts = args.contracts && Object.keys(args.contracts).length > 0 ? args.contracts : undefined;
45
48
  }
46
49
 
47
50
  static get schema() {
48
51
  return z
49
52
  .object({
50
- contracts: optional(
51
- z.record(
52
- z.string(),
53
- z.object({ instance: ContractInstanceWithAddressSchema, artifact: ContractArtifactSchema }),
54
- ),
55
- ),
53
+ publicStorage: optional(z.array(PublicStorageOverrideSchema)),
54
+ contracts: optional(z.record(z.string(), z.object({ instance: ContractInstanceWithAddressSchema }))),
56
55
  })
57
- .transform(({ contracts }) => {
58
- return new SimulationOverrides(contracts);
59
- });
56
+ .transform(args => new SimulationOverrides(args));
60
57
  }
61
58
  }
62
59
 
@@ -5,7 +5,7 @@ import {
5
5
  STATE_REFERENCE_LENGTH,
6
6
  } from '@aztec/constants';
7
7
  import type { Fr } from '@aztec/foundation/curves/bn254';
8
- import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
8
+ import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
9
9
  import type { FieldsOf } from '@aztec/foundation/types';
10
10
 
11
11
  import { inspect } from 'util';
@@ -46,9 +46,14 @@ export class StateReference {
46
46
  return new StateReference(...StateReference.getFields(fields));
47
47
  }
48
48
 
49
- toBuffer() {
50
- // Note: The order here must match the order in the ProposedHeaderLib solidity library.
51
- return serializeToBuffer(this.l1ToL2MessageTree, this.partial);
49
+ // Note: The order here must match the order in the ProposedHeaderLib solidity library.
50
+ toBuffer(): Buffer;
51
+ toBuffer(sink: BufferSink): void;
52
+ toBuffer(sink?: BufferSink): Buffer | void {
53
+ if (!sink) {
54
+ return BufferSink.serialize(this);
55
+ }
56
+ serializeToSink(sink, this.l1ToL2MessageTree, this.partial);
52
57
  }
53
58
 
54
59
  toFields(): Fr[] {