@aztec/stdlib 0.0.1-commit.c7c42ec → 0.0.1-commit.f295ac2

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/contract_artifact.d.ts +2 -2
  2. package/dest/abi/contract_artifact.d.ts.map +1 -1
  3. package/dest/abi/contract_artifact.js +1 -1
  4. package/dest/abi/function_call.d.ts +9 -1
  5. package/dest/abi/function_call.d.ts.map +1 -1
  6. package/dest/abi/selector.js +3 -1
  7. package/dest/abi/utils.d.ts +7 -1
  8. package/dest/abi/utils.d.ts.map +1 -1
  9. package/dest/abi/utils.js +7 -0
  10. package/dest/auth_witness/auth_witness.d.ts +2 -1
  11. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  12. package/dest/avm/avm.d.ts +62 -62
  13. package/dest/avm/avm_accumulated_data.d.ts +30 -3
  14. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  15. package/dest/avm/avm_accumulated_data.js +5 -2
  16. package/dest/avm/avm_circuit_public_inputs.d.ts +9 -9
  17. package/dest/avm/avm_circuit_public_inputs.js +3 -1
  18. package/dest/avm/avm_proving_request.d.ts +299 -299
  19. package/dest/avm/contract_storage_read.d.ts +13 -1
  20. package/dest/avm/contract_storage_read.d.ts.map +1 -1
  21. package/dest/avm/contract_storage_update_request.d.ts +13 -1
  22. package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
  23. package/dest/avm/public_call_stack_item_compressed.d.ts +3 -1
  24. package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
  25. package/dest/avm/public_data_read.d.ts +10 -1
  26. package/dest/avm/public_data_read.d.ts.map +1 -1
  27. package/dest/avm/public_data_update_request.d.ts +10 -1
  28. package/dest/avm/public_data_update_request.d.ts.map +1 -1
  29. package/dest/avm/public_data_update_request.js +3 -1
  30. package/dest/avm/public_data_write.d.ts +7 -1
  31. package/dest/avm/public_data_write.d.ts.map +1 -1
  32. package/dest/avm/public_inner_call_request.d.ts +4 -1
  33. package/dest/avm/public_inner_call_request.d.ts.map +1 -1
  34. package/dest/avm/public_inner_call_request.js +3 -1
  35. package/dest/avm/revert_code.d.ts +4 -4
  36. package/dest/avm/revert_code.d.ts.map +1 -1
  37. package/dest/avm/revert_code.js +3 -1
  38. package/dest/aztec-address/index.js +4 -2
  39. package/dest/block/attestation_info.d.ts +5 -5
  40. package/dest/block/attestation_info.d.ts.map +1 -1
  41. package/dest/block/attestation_info.js +4 -4
  42. package/dest/block/block_hash.d.ts +7 -1
  43. package/dest/block/block_hash.d.ts.map +1 -1
  44. package/dest/block/block_hash.js +12 -0
  45. package/dest/block/block_parameter.d.ts +4 -3
  46. package/dest/block/block_parameter.d.ts.map +1 -1
  47. package/dest/block/block_parameter.js +2 -0
  48. package/dest/block/body.d.ts +1 -1
  49. package/dest/block/body.d.ts.map +1 -1
  50. package/dest/block/body.js +5 -2
  51. package/dest/block/checkpointed_l2_block.d.ts +16 -133
  52. package/dest/block/checkpointed_l2_block.d.ts.map +1 -1
  53. package/dest/block/checkpointed_l2_block.js +5 -43
  54. package/dest/block/in_block.d.ts +3 -3
  55. package/dest/block/in_block.d.ts.map +1 -1
  56. package/dest/block/index.d.ts +1 -3
  57. package/dest/block/index.d.ts.map +1 -1
  58. package/dest/block/index.js +0 -2
  59. package/dest/block/l2_block_new.d.ts +20 -13
  60. package/dest/block/l2_block_new.d.ts.map +1 -1
  61. package/dest/block/l2_block_new.js +13 -7
  62. package/dest/block/l2_block_source.d.ts +276 -55
  63. package/dest/block/l2_block_source.d.ts.map +1 -1
  64. package/dest/block/l2_block_source.js +25 -6
  65. package/dest/block/l2_block_stream/index.d.ts +2 -1
  66. package/dest/block/l2_block_stream/index.d.ts.map +1 -1
  67. package/dest/block/l2_block_stream/index.js +1 -0
  68. package/dest/block/l2_block_stream/interfaces.d.ts +15 -5
  69. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  70. package/dest/block/l2_block_stream/l2_block_stream.d.ts +4 -2
  71. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  72. package/dest/block/l2_block_stream/l2_block_stream.js +93 -30
  73. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +24 -16
  74. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  75. package/dest/block/l2_block_stream/l2_tips_memory_store.js +55 -61
  76. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +49 -0
  77. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -0
  78. package/dest/block/l2_block_stream/l2_tips_store_base.js +179 -0
  79. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  80. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  81. package/dest/block/test/l2_tips_store_test_suite.js +478 -38
  82. package/dest/block/validate_block_result.d.ts +24 -24
  83. package/dest/block/validate_block_result.d.ts.map +1 -1
  84. package/dest/block/validate_block_result.js +18 -17
  85. package/dest/checkpoint/checkpoint.d.ts +24 -14
  86. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  87. package/dest/checkpoint/checkpoint.js +16 -3
  88. package/dest/checkpoint/checkpoint_info.d.ts +32 -3
  89. package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
  90. package/dest/checkpoint/checkpoint_info.js +34 -1
  91. package/dest/checkpoint/index.d.ts +2 -1
  92. package/dest/checkpoint/index.d.ts.map +1 -1
  93. package/dest/checkpoint/index.js +1 -0
  94. package/dest/checkpoint/published_checkpoint.d.ts +15 -13
  95. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  96. package/dest/checkpoint/published_checkpoint.js +4 -3
  97. package/dest/contract/complete_address.d.ts +4 -1
  98. package/dest/contract/complete_address.d.ts.map +1 -1
  99. package/dest/contract/contract_deployment_data.d.ts +5 -5
  100. package/dest/contract/index.d.ts +1 -3
  101. package/dest/contract/index.d.ts.map +1 -1
  102. package/dest/contract/index.js +0 -2
  103. package/dest/contract/interfaces/contract_instance.d.ts +16 -16
  104. package/dest/database-version/version_manager.d.ts +4 -2
  105. package/dest/database-version/version_manager.d.ts.map +1 -1
  106. package/dest/database-version/version_manager.js +3 -1
  107. package/dest/deserialization/index.d.ts +11 -0
  108. package/dest/deserialization/index.d.ts.map +1 -0
  109. package/dest/deserialization/index.js +10 -0
  110. package/dest/errors/proving_error.d.ts +2 -2
  111. package/dest/errors/proving_error.d.ts.map +1 -1
  112. package/dest/gas/gas.js +3 -1
  113. package/dest/gas/gas_fees.js +3 -1
  114. package/dest/interfaces/api_limit.d.ts +2 -1
  115. package/dest/interfaces/api_limit.d.ts.map +1 -1
  116. package/dest/interfaces/api_limit.js +1 -0
  117. package/dest/interfaces/archiver.d.ts +6 -6
  118. package/dest/interfaces/archiver.d.ts.map +1 -1
  119. package/dest/interfaces/archiver.js +16 -12
  120. package/dest/interfaces/aztec-node-admin.d.ts +64 -31
  121. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  122. package/dest/interfaces/aztec-node-admin.js +2 -2
  123. package/dest/interfaces/aztec-node.d.ts +45 -49
  124. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  125. package/dest/interfaces/aztec-node.js +15 -12
  126. package/dest/interfaces/block-builder.d.ts +19 -17
  127. package/dest/interfaces/block-builder.d.ts.map +1 -1
  128. package/dest/interfaces/configs.d.ts +12 -7
  129. package/dest/interfaces/configs.d.ts.map +1 -1
  130. package/dest/interfaces/configs.js +2 -1
  131. package/dest/interfaces/get_logs_response.d.ts +1 -1
  132. package/dest/interfaces/p2p.d.ts +7 -9
  133. package/dest/interfaces/p2p.d.ts.map +1 -1
  134. package/dest/interfaces/p2p.js +3 -4
  135. package/dest/interfaces/proving-job.d.ts +184 -184
  136. package/dest/interfaces/proving-job.d.ts.map +1 -1
  137. package/dest/interfaces/proving-job.js +1 -7
  138. package/dest/interfaces/server_circuit_prover.d.ts +4 -3
  139. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  140. package/dest/interfaces/validator.d.ts +108 -18
  141. package/dest/interfaces/validator.d.ts.map +1 -1
  142. package/dest/interfaces/validator.js +5 -3
  143. package/dest/kernel/claimed_length_array.js +3 -1
  144. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +6 -5
  145. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
  146. package/dest/kernel/hints/build_note_hash_read_request_hints.js +19 -10
  147. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +1 -1
  148. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  149. package/dest/kernel/hints/build_nullifier_read_request_hints.js +14 -4
  150. package/dest/kernel/hints/key_validation_hint.d.ts +2 -1
  151. package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
  152. package/dest/kernel/hints/key_validation_request.d.ts +2 -1
  153. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  154. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +6 -1
  155. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +1 -1
  156. package/dest/kernel/hints/private_kernel_reset_hints.d.ts +13 -1
  157. package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
  158. package/dest/kernel/hints/read_request.d.ts +7 -1
  159. package/dest/kernel/hints/read_request.d.ts.map +1 -1
  160. package/dest/kernel/hints/read_request_hints.d.ts +7 -1
  161. package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
  162. package/dest/kernel/hints/transient_data_squashing_hint.js +3 -1
  163. package/dest/kernel/log_hash.js +3 -1
  164. package/dest/kernel/private_accumulated_data.d.ts +23 -1
  165. package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
  166. package/dest/kernel/private_call_data.d.ts +25 -1
  167. package/dest/kernel/private_call_data.d.ts.map +1 -1
  168. package/dest/kernel/private_call_request.d.ts +16 -1
  169. package/dest/kernel/private_call_request.d.ts.map +1 -1
  170. package/dest/kernel/private_circuit_public_inputs.d.ts +74 -1
  171. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  172. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +31 -1
  173. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  174. package/dest/kernel/private_kernel_data.d.ts +7 -1
  175. package/dest/kernel/private_kernel_data.d.ts.map +1 -1
  176. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +22 -1
  177. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  178. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +7 -1
  179. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
  180. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -1
  181. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
  182. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +10 -1
  183. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
  184. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +23 -1
  185. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  186. package/dest/kernel/private_log_data.js +5 -2
  187. package/dest/kernel/private_to_avm_accumulated_data.d.ts +2 -2
  188. package/dest/kernel/private_to_avm_accumulated_data.js +5 -2
  189. package/dest/kernel/private_to_public_accumulated_data.js +3 -1
  190. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +17 -1
  191. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  192. package/dest/kernel/private_to_rollup_accumulated_data.js +3 -1
  193. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +16 -1
  194. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  195. package/dest/kernel/private_validation_requests.d.ts +10 -1
  196. package/dest/kernel/private_validation_requests.d.ts.map +1 -1
  197. package/dest/kernel/private_validation_requests.js +3 -1
  198. package/dest/kernel/public_call_request.d.ts +22 -1
  199. package/dest/kernel/public_call_request.d.ts.map +1 -1
  200. package/dest/kernel/public_call_request.js +5 -2
  201. package/dest/kernel/utils/optional_number.d.ts +7 -1
  202. package/dest/kernel/utils/optional_number.d.ts.map +1 -1
  203. package/dest/keys/public_keys.d.ts +5 -1
  204. package/dest/keys/public_keys.d.ts.map +1 -1
  205. package/dest/logs/contract_class_log.js +3 -1
  206. package/dest/logs/extended_contract_class_log.d.ts +3 -1
  207. package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
  208. package/dest/logs/extended_public_log.d.ts +5 -3
  209. package/dest/logs/extended_public_log.d.ts.map +1 -1
  210. package/dest/logs/log_id.d.ts +5 -1
  211. package/dest/logs/log_id.d.ts.map +1 -1
  212. package/dest/logs/private_log.js +3 -1
  213. package/dest/logs/public_log.js +3 -1
  214. package/dest/messaging/in_hash.d.ts +4 -2
  215. package/dest/messaging/in_hash.d.ts.map +1 -1
  216. package/dest/messaging/in_hash.js +3 -1
  217. package/dest/messaging/inbox_leaf.d.ts +3 -1
  218. package/dest/messaging/inbox_leaf.d.ts.map +1 -1
  219. package/dest/messaging/l1_actor.d.ts +7 -1
  220. package/dest/messaging/l1_actor.d.ts.map +1 -1
  221. package/dest/messaging/l1_to_l2_message.d.ts +6 -1
  222. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  223. package/dest/messaging/l2_actor.d.ts +7 -1
  224. package/dest/messaging/l2_actor.d.ts.map +1 -1
  225. package/dest/messaging/l2_to_l1_membership.d.ts +88 -6
  226. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  227. package/dest/messaging/l2_to_l1_membership.js +160 -42
  228. package/dest/messaging/out_hash.d.ts +41 -3
  229. package/dest/messaging/out_hash.d.ts.map +1 -1
  230. package/dest/messaging/out_hash.js +54 -19
  231. package/dest/note/note_dao.d.ts +36 -5
  232. package/dest/note/note_dao.d.ts.map +1 -1
  233. package/dest/note/note_dao.js +15 -12
  234. package/dest/p2p/attestation_utils.d.ts +3 -3
  235. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  236. package/dest/p2p/attestation_utils.js +1 -1
  237. package/dest/p2p/block_proposal.d.ts +93 -21
  238. package/dest/p2p/block_proposal.d.ts.map +1 -1
  239. package/dest/p2p/block_proposal.js +140 -39
  240. package/dest/p2p/checkpoint_attestation.d.ts +81 -0
  241. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -0
  242. package/dest/p2p/{block_attestation.js → checkpoint_attestation.js} +22 -19
  243. package/dest/p2p/checkpoint_proposal.d.ts +160 -0
  244. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -0
  245. package/dest/p2p/checkpoint_proposal.js +229 -0
  246. package/dest/p2p/consensus_payload.d.ts +9 -9
  247. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  248. package/dest/p2p/consensus_payload.js +3 -5
  249. package/dest/p2p/gossipable.d.ts +4 -3
  250. package/dest/p2p/gossipable.d.ts.map +1 -1
  251. package/dest/p2p/gossipable.js +16 -5
  252. package/dest/p2p/index.d.ts +4 -2
  253. package/dest/p2p/index.d.ts.map +1 -1
  254. package/dest/p2p/index.js +3 -1
  255. package/dest/p2p/signature_utils.d.ts +5 -3
  256. package/dest/p2p/signature_utils.d.ts.map +1 -1
  257. package/dest/p2p/signature_utils.js +3 -1
  258. package/dest/p2p/signed_txs.d.ts +42 -0
  259. package/dest/p2p/signed_txs.d.ts.map +1 -0
  260. package/dest/p2p/signed_txs.js +75 -0
  261. package/dest/p2p/topic_type.d.ts +3 -2
  262. package/dest/p2p/topic_type.d.ts.map +1 -1
  263. package/dest/p2p/topic_type.js +10 -3
  264. package/dest/parity/parity_base_private_inputs.d.ts +3 -1
  265. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  266. package/dest/parity/parity_public_inputs.d.ts +4 -1
  267. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  268. package/dest/parity/parity_root_private_inputs.d.ts +2 -1
  269. package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
  270. package/dest/proofs/chonk_proof.d.ts +1 -1
  271. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  272. package/dest/proofs/chonk_proof.js +9 -4
  273. package/dest/proofs/proof.d.ts +4 -1
  274. package/dest/proofs/proof.d.ts.map +1 -1
  275. package/dest/proofs/recursive_proof.d.ts +10 -1
  276. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  277. package/dest/rollup/base_rollup_hints.d.ts +34 -1
  278. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  279. package/dest/rollup/block_constant_data.d.ts +12 -1
  280. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  281. package/dest/rollup/block_headers_hash.js +1 -1
  282. package/dest/rollup/block_merge_rollup_private_inputs.d.ts +4 -1
  283. package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
  284. package/dest/rollup/block_rollup_public_inputs.d.ts +47 -11
  285. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  286. package/dest/rollup/block_rollup_public_inputs.js +8 -12
  287. package/dest/rollup/block_root_rollup_private_inputs.d.ts +64 -1
  288. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  289. package/dest/rollup/checkpoint_constant_data.d.ts +10 -1
  290. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
  291. package/dest/rollup/checkpoint_constant_data.js +3 -1
  292. package/dest/rollup/checkpoint_header.d.ts +42 -12
  293. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  294. package/dest/rollup/checkpoint_header.js +49 -19
  295. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +4 -1
  296. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
  297. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +41 -1
  298. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  299. package/dest/rollup/checkpoint_rollup_public_inputs.js +10 -2
  300. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +44 -3
  301. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  302. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +13 -2
  303. package/dest/rollup/epoch_constant_data.d.ts +16 -1
  304. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  305. package/dest/rollup/root_rollup_private_inputs.d.ts +6 -1
  306. package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
  307. package/dest/rollup/root_rollup_public_inputs.d.ts +18 -3
  308. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  309. package/dest/rollup/root_rollup_public_inputs.js +9 -3
  310. package/dest/rollup/tree_snapshot_diff_hints.d.ts +24 -1
  311. package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
  312. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +4 -1
  313. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
  314. package/dest/rollup/tx_rollup_public_inputs.d.ts +29 -1
  315. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  316. package/dest/schemas/schemas.d.ts +1 -1
  317. package/dest/tests/factories.d.ts +16 -10
  318. package/dest/tests/factories.d.ts.map +1 -1
  319. package/dest/tests/factories.js +60 -25
  320. package/dest/tests/jest.d.ts +4 -4
  321. package/dest/tests/jest.js +9 -9
  322. package/dest/tests/mocks.d.ts +66 -16
  323. package/dest/tests/mocks.d.ts.map +1 -1
  324. package/dest/tests/mocks.js +114 -54
  325. package/dest/trees/append_only_tree_snapshot.d.ts +13 -1
  326. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  327. package/dest/trees/append_only_tree_snapshot.js +3 -1
  328. package/dest/trees/nullifier_leaf.d.ts +13 -1
  329. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  330. package/dest/trees/nullifier_membership_witness.d.ts +10 -1
  331. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  332. package/dest/trees/public_data_leaf.d.ts +16 -1
  333. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  334. package/dest/trees/public_data_witness.d.ts +11 -1
  335. package/dest/trees/public_data_witness.d.ts.map +1 -1
  336. package/dest/tx/block_header.d.ts +12 -1
  337. package/dest/tx/block_header.d.ts.map +1 -1
  338. package/dest/tx/block_header.js +6 -1
  339. package/dest/tx/call_context.d.ts +13 -1
  340. package/dest/tx/call_context.d.ts.map +1 -1
  341. package/dest/tx/call_context.js +3 -1
  342. package/dest/tx/capsule.d.ts +4 -1
  343. package/dest/tx/capsule.d.ts.map +1 -1
  344. package/dest/tx/execution_payload.d.ts +9 -1
  345. package/dest/tx/execution_payload.d.ts.map +1 -1
  346. package/dest/tx/function_data.d.ts +4 -2
  347. package/dest/tx/function_data.d.ts.map +1 -1
  348. package/dest/tx/global_variable_builder.d.ts +2 -2
  349. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  350. package/dest/tx/global_variables.d.ts +9 -1
  351. package/dest/tx/global_variables.d.ts.map +1 -1
  352. package/dest/tx/global_variables.js +3 -1
  353. package/dest/tx/hashed_values.d.ts +7 -1
  354. package/dest/tx/hashed_values.d.ts.map +1 -1
  355. package/dest/tx/in_tx.d.ts +1 -1
  356. package/dest/tx/index.d.ts +1 -2
  357. package/dest/tx/index.d.ts.map +1 -1
  358. package/dest/tx/index.js +0 -1
  359. package/dest/tx/partial_state_reference.d.ts +4 -1
  360. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  361. package/dest/tx/private_execution_result.d.ts +23 -6
  362. package/dest/tx/private_execution_result.d.ts.map +1 -1
  363. package/dest/tx/private_execution_result.js +4 -21
  364. package/dest/tx/private_tx_constant_data.d.ts +16 -1
  365. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  366. package/dest/tx/profiling.d.ts +149 -26
  367. package/dest/tx/profiling.d.ts.map +1 -1
  368. package/dest/tx/profiling.js +44 -7
  369. package/dest/tx/protocol_contracts.d.ts +1 -1
  370. package/dest/tx/public_call_request_with_calldata.d.ts +7 -1
  371. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  372. package/dest/tx/public_call_request_with_calldata.js +3 -1
  373. package/dest/tx/state_reference.d.ts +3 -1
  374. package/dest/tx/state_reference.d.ts.map +1 -1
  375. package/dest/tx/state_reference.js +3 -1
  376. package/dest/tx/tree_snapshots.js +3 -1
  377. package/dest/tx/tx.d.ts +23 -1
  378. package/dest/tx/tx.d.ts.map +1 -1
  379. package/dest/tx/tx.js +3 -1
  380. package/dest/tx/tx_context.d.ts +2 -1
  381. package/dest/tx/tx_context.d.ts.map +1 -1
  382. package/dest/tx/tx_effect.d.ts +32 -6
  383. package/dest/tx/tx_effect.d.ts.map +1 -1
  384. package/dest/tx/tx_effect.js +3 -8
  385. package/dest/tx/tx_execution_request.d.ts +30 -1
  386. package/dest/tx/tx_execution_request.d.ts.map +1 -1
  387. package/dest/tx/tx_execution_request.js +6 -2
  388. package/dest/tx/tx_hash.d.ts +2 -1
  389. package/dest/tx/tx_hash.d.ts.map +1 -1
  390. package/dest/tx/tx_receipt.d.ts +7 -1
  391. package/dest/tx/tx_receipt.d.ts.map +1 -1
  392. package/dest/tx/tx_request.d.ts +6 -1
  393. package/dest/tx/tx_request.d.ts.map +1 -1
  394. package/dest/types/shared.d.ts +4 -1
  395. package/dest/types/shared.d.ts.map +1 -1
  396. package/dest/validators/schemas.d.ts +8 -8
  397. package/dest/vks/verification_key.d.ts +22 -1
  398. package/dest/vks/verification_key.d.ts.map +1 -1
  399. package/dest/vks/vk_data.d.ts +7 -1
  400. package/dest/vks/vk_data.d.ts.map +1 -1
  401. package/dest/zkpassport/index.d.ts +3 -4
  402. package/dest/zkpassport/index.d.ts.map +1 -1
  403. package/dest/zkpassport/index.js +9 -9
  404. package/package.json +12 -10
  405. package/src/abi/contract_artifact.ts +10 -10
  406. package/src/abi/utils.ts +17 -0
  407. package/src/block/attestation_info.ts +9 -6
  408. package/src/block/block_hash.ts +22 -0
  409. package/src/block/block_parameter.ts +4 -2
  410. package/src/block/body.ts +2 -1
  411. package/src/block/checkpointed_l2_block.ts +5 -55
  412. package/src/block/in_block.ts +2 -2
  413. package/src/block/index.ts +0 -2
  414. package/src/block/l2_block_new.ts +30 -9
  415. package/src/block/l2_block_source.ts +100 -30
  416. package/src/block/l2_block_stream/index.ts +1 -0
  417. package/src/block/l2_block_stream/interfaces.ts +15 -4
  418. package/src/block/l2_block_stream/l2_block_stream.ts +111 -37
  419. package/src/block/l2_block_stream/l2_tips_memory_store.ts +62 -56
  420. package/src/block/l2_block_stream/l2_tips_store_base.ts +226 -0
  421. package/src/block/test/l2_tips_store_test_suite.ts +480 -36
  422. package/src/block/validate_block_result.ts +40 -35
  423. package/src/checkpoint/checkpoint.ts +28 -5
  424. package/src/checkpoint/checkpoint_info.ts +45 -2
  425. package/src/checkpoint/index.ts +1 -0
  426. package/src/checkpoint/published_checkpoint.ts +4 -3
  427. package/src/contract/index.ts +0 -2
  428. package/src/deserialization/index.ts +21 -0
  429. package/src/interfaces/api_limit.ts +1 -0
  430. package/src/interfaces/archiver.ts +24 -14
  431. package/src/interfaces/aztec-node-admin.ts +5 -2
  432. package/src/interfaces/aztec-node.ts +81 -69
  433. package/src/interfaces/block-builder.ts +33 -26
  434. package/src/interfaces/configs.ts +5 -0
  435. package/src/interfaces/p2p.ts +8 -12
  436. package/src/interfaces/proving-job.ts +2 -11
  437. package/src/interfaces/server_circuit_prover.ts +3 -2
  438. package/src/interfaces/validator.ts +64 -14
  439. package/src/kernel/hints/build_note_hash_read_request_hints.ts +20 -12
  440. package/src/kernel/hints/build_nullifier_read_request_hints.ts +22 -10
  441. package/src/messaging/in_hash.ts +3 -1
  442. package/src/messaging/l2_to_l1_membership.ts +178 -52
  443. package/src/messaging/out_hash.ts +62 -21
  444. package/src/note/note_dao.ts +18 -13
  445. package/src/p2p/attestation_utils.ts +3 -3
  446. package/src/p2p/block_proposal.ts +204 -44
  447. package/src/p2p/{block_attestation.ts → checkpoint_attestation.ts} +31 -25
  448. package/src/p2p/checkpoint_proposal.ts +348 -0
  449. package/src/p2p/consensus_payload.ts +5 -7
  450. package/src/p2p/gossipable.ts +14 -4
  451. package/src/p2p/index.ts +3 -1
  452. package/src/p2p/signature_utils.ts +3 -1
  453. package/src/p2p/signed_txs.ts +88 -0
  454. package/src/p2p/topic_type.ts +4 -3
  455. package/src/proofs/chonk_proof.ts +9 -5
  456. package/src/rollup/block_headers_hash.ts +1 -1
  457. package/src/rollup/block_rollup_public_inputs.ts +5 -11
  458. package/src/rollup/checkpoint_header.ts +63 -20
  459. package/src/rollup/checkpoint_rollup_public_inputs.ts +12 -0
  460. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +14 -1
  461. package/src/rollup/root_rollup_public_inputs.ts +9 -0
  462. package/src/tests/factories.ts +56 -40
  463. package/src/tests/jest.ts +9 -9
  464. package/src/tests/mocks.ts +198 -85
  465. package/src/tx/block_header.ts +5 -0
  466. package/src/tx/global_variable_builder.ts +1 -1
  467. package/src/tx/index.ts +0 -1
  468. package/src/tx/private_execution_result.ts +1 -16
  469. package/src/tx/profiling.ts +46 -4
  470. package/src/tx/tx.ts +2 -0
  471. package/src/tx/tx_effect.ts +0 -9
  472. package/src/tx/tx_execution_request.ts +2 -0
  473. package/src/zkpassport/index.ts +11 -12
  474. package/dest/block/l2_block.d.ts +0 -143
  475. package/dest/block/l2_block.d.ts.map +0 -1
  476. package/dest/block/l2_block.js +0 -198
  477. package/dest/block/l2_block_code_to_purge.d.ts +0 -12
  478. package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
  479. package/dest/block/l2_block_code_to_purge.js +0 -61
  480. package/dest/block/l2_block_header.d.ts +0 -98
  481. package/dest/block/l2_block_header.d.ts.map +0 -1
  482. package/dest/block/l2_block_header.js +0 -153
  483. package/dest/contract/contract_class_metadata.d.ts +0 -8
  484. package/dest/contract/contract_class_metadata.d.ts.map +0 -1
  485. package/dest/contract/contract_class_metadata.js +0 -1
  486. package/dest/contract/contract_metadata.d.ts +0 -7
  487. package/dest/contract/contract_metadata.d.ts.map +0 -1
  488. package/dest/contract/contract_metadata.js +0 -1
  489. package/dest/p2p/block_attestation.d.ts +0 -80
  490. package/dest/p2p/block_attestation.d.ts.map +0 -1
  491. package/dest/tx/content_commitment.d.ts +0 -49
  492. package/dest/tx/content_commitment.d.ts.map +0 -1
  493. package/dest/tx/content_commitment.js +0 -90
  494. package/src/block/l2_block.ts +0 -271
  495. package/src/block/l2_block_code_to_purge.ts +0 -88
  496. package/src/block/l2_block_header.ts +0 -246
  497. package/src/contract/contract_class_metadata.ts +0 -8
  498. package/src/contract/contract_metadata.ts +0 -7
  499. package/src/tx/content_commitment.ts +0 -113
@@ -10,6 +10,9 @@ import {
10
10
  BlockNumber,
11
11
  BlockNumberPositiveSchema,
12
12
  BlockNumberSchema,
13
+ CheckpointNumberPositiveSchema,
14
+ EpochNumber,
15
+ EpochNumberSchema,
13
16
  type SlotNumber,
14
17
  } from '@aztec/foundation/branded-types';
15
18
  import type { Fr } from '@aztec/foundation/curves/bn254';
@@ -21,10 +24,11 @@ import { z } from 'zod';
21
24
 
22
25
  import type { AztecAddress } from '../aztec-address/index.js';
23
26
  import { type BlockParameter, BlockParameterSchema } from '../block/block_parameter.js';
24
- import { PublishedL2Block } from '../block/checkpointed_l2_block.js';
27
+ import { CheckpointedL2Block } from '../block/checkpointed_l2_block.js';
25
28
  import { type DataInBlock, dataInBlockSchemaFor } from '../block/in_block.js';
26
- import { L2Block } from '../block/l2_block.js';
29
+ import { L2BlockNew } from '../block/l2_block_new.js';
27
30
  import { type L2BlockSource, type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
31
+ import { PublishedCheckpoint } from '../checkpoint/published_checkpoint.js';
28
32
  import {
29
33
  type ContractClassPublic,
30
34
  ContractClassPublicSchema,
@@ -57,7 +61,7 @@ import { SingleValidatorStatsSchema, ValidatorsStatsSchema } from '../validators
57
61
  import type { SingleValidatorStats, ValidatorsStats } from '../validators/types.js';
58
62
  import { type ComponentsVersions, getVersioningResponseHandler } from '../versioning/index.js';
59
63
  import { type AllowedElement, AllowedElementSchema } from './allowed_element.js';
60
- import { MAX_RPC_BLOCKS_LEN, MAX_RPC_LEN, MAX_RPC_TXS_LEN } from './api_limit.js';
64
+ import { MAX_RPC_BLOCKS_LEN, MAX_RPC_CHECKPOINTS_LEN, MAX_RPC_LEN, MAX_RPC_TXS_LEN } from './api_limit.js';
61
65
  import {
62
66
  type GetContractClassLogsResponse,
63
67
  GetContractClassLogsResponseSchema,
@@ -71,7 +75,16 @@ import { type WorldStateSyncStatus, WorldStateSyncStatusSchema } from './world_s
71
75
  * We will probably implement the additional interfaces by means other than Aztec Node as it's currently a privacy leak
72
76
  */
73
77
  export interface AztecNode
74
- extends Pick<L2BlockSource, 'getBlocks' | 'getPublishedBlocks' | 'getBlockHeader' | 'getL2Tips'> {
78
+ extends Pick<
79
+ L2BlockSource,
80
+ | 'getBlocks'
81
+ | 'getL2BlocksNew'
82
+ | 'getPublishedBlocks'
83
+ | 'getPublishedCheckpoints'
84
+ | 'getBlockHeader'
85
+ | 'getL2Tips'
86
+ | 'getCheckpointedBlocks'
87
+ > {
75
88
  /**
76
89
  * Returns the tips of the L2 chain.
77
90
  */
@@ -85,72 +98,63 @@ export interface AztecNode
85
98
  /**
86
99
  * Find the indexes of the given leaves in the given tree along with a block metadata pointing to the block in which
87
100
  * the leaves were inserted.
88
- * @param blockNumber - The block number at which to get the data or 'latest' for latest data.
101
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
89
102
  * @param treeId - The tree to search in.
90
103
  * @param leafValues - The values to search for.
91
104
  * @returns The indices of leaves and the block metadata of a block in which the leaves were inserted.
92
105
  */
93
106
  findLeavesIndexes(
94
- blockNumber: BlockParameter,
107
+ block: BlockParameter,
95
108
  treeId: MerkleTreeId,
96
109
  leafValues: Fr[],
97
110
  ): Promise<(DataInBlock<bigint> | undefined)[]>;
98
111
 
99
112
  /**
100
113
  * Returns a sibling path for the given index in the nullifier tree.
101
- * @param blockNumber - The block number at which to get the data.
114
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
102
115
  * @param leafIndex - The index of the leaf for which the sibling path is required.
103
116
  * @returns The sibling path for the leaf index.
104
117
  */
105
- getNullifierSiblingPath(
106
- blockNumber: BlockParameter,
107
- leafIndex: bigint,
108
- ): Promise<SiblingPath<typeof NULLIFIER_TREE_HEIGHT>>;
118
+ getNullifierSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof NULLIFIER_TREE_HEIGHT>>;
109
119
 
110
120
  /**
111
121
  * Returns a sibling path for the given index in the note hash tree.
112
- * @param blockNumber - The block number at which to get the data.
122
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
113
123
  * @param leafIndex - The index of the leaf for which the sibling path is required.
114
124
  * @returns The sibling path for the leaf index.
115
125
  */
116
- getNoteHashSiblingPath(
117
- blockNumber: BlockParameter,
118
- leafIndex: bigint,
119
- ): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>>;
126
+ getNoteHashSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>>;
120
127
 
121
128
  /**
122
129
  * Returns a sibling path for a leaf in the committed historic blocks tree.
123
- * @param blockNumber - The block number at which to get the data.
130
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
124
131
  * @param leafIndex - Index of the leaf in the tree.
125
132
  * @returns The sibling path.
126
133
  */
127
- getArchiveSiblingPath(blockNumber: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof ARCHIVE_HEIGHT>>;
134
+ getArchiveSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof ARCHIVE_HEIGHT>>;
128
135
 
129
136
  /**
130
137
  * Returns a sibling path for a leaf in the committed public data tree.
131
- * @param blockNumber - The block number at which to get the data.
138
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
132
139
  * @param leafIndex - Index of the leaf in the tree.
133
140
  * @returns The sibling path.
134
141
  */
135
142
  getPublicDataSiblingPath(
136
- blockNumber: BlockParameter,
143
+ block: BlockParameter,
137
144
  leafIndex: bigint,
138
145
  ): Promise<SiblingPath<typeof PUBLIC_DATA_TREE_HEIGHT>>;
139
146
 
140
147
  /**
141
148
  * Returns a nullifier membership witness for a given nullifier at a given block.
142
- * @param blockNumber - The block number at which to get the data.
149
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
143
150
  * @param nullifier - Nullifier we try to find witness for.
144
151
  * @returns The nullifier membership witness (if found).
145
152
  */
146
- getNullifierMembershipWitness(
147
- blockNumber: BlockParameter,
148
- nullifier: Fr,
149
- ): Promise<NullifierMembershipWitness | undefined>;
153
+ getNullifierMembershipWitness(block: BlockParameter, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
150
154
 
151
155
  /**
152
156
  * Returns a low nullifier membership witness for a given nullifier at a given block.
153
- * @param blockNumber - The block number at which to get the data.
157
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
154
158
  * @param nullifier - Nullifier we try to find the low nullifier witness for.
155
159
  * @returns The low nullifier membership witness (if found).
156
160
  * @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
@@ -158,49 +162,49 @@ export interface AztecNode
158
162
  * we are trying to prove non-inclusion for.
159
163
  */
160
164
  getLowNullifierMembershipWitness(
161
- blockNumber: BlockParameter,
165
+ block: BlockParameter,
162
166
  nullifier: Fr,
163
167
  ): Promise<NullifierMembershipWitness | undefined>;
164
168
 
165
169
  /**
166
170
  * Returns a public data tree witness for a given leaf slot at a given block.
167
- * @param blockNumber - The block number at which to get the data.
171
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
168
172
  * @param leafSlot - The leaf slot we try to find the witness for.
169
173
  * @returns The public data witness (if found).
170
174
  * @remarks The witness can be used to compute the current value of the public data tree leaf. If the low leaf preimage corresponds to an
171
175
  * "in range" slot, means that the slot doesn't exist and the value is 0. If the low leaf preimage corresponds to the exact slot, the current value
172
176
  * is contained in the leaf preimage.
173
177
  */
174
- getPublicDataWitness(blockNumber: BlockParameter, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
178
+ getPublicDataWitness(block: BlockParameter, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
175
179
 
176
180
  /**
177
181
  * Returns a membership witness for a given archive leaf at a given block.
178
- * @param blockNumber - The block number at which to get the data.
182
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
179
183
  * @param archive - The archive leaf we try to find the witness for.
180
184
  */
181
185
  getArchiveMembershipWitness(
182
- blockNumber: BlockParameter,
186
+ block: BlockParameter,
183
187
  archive: Fr,
184
188
  ): Promise<MembershipWitness<typeof ARCHIVE_HEIGHT> | undefined>;
185
189
 
186
190
  /**
187
191
  * Returns a membership witness for a given note hash at a given block.
188
- * @param blockNumber - The block number at which to get the data.
192
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
189
193
  * @param noteHash - The note hash we try to find the witness for.
190
194
  */
191
195
  getNoteHashMembershipWitness(
192
- blockNumber: BlockParameter,
196
+ block: BlockParameter,
193
197
  noteHash: Fr,
194
198
  ): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT> | undefined>;
195
199
 
196
200
  /**
197
201
  * Returns the index and a sibling path for a leaf in the committed l1 to l2 data tree.
198
- * @param blockNumber - The block number at which to get the data.
202
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
199
203
  * @param l1ToL2Message - The l1ToL2Message to get the index / sibling path for.
200
204
  * @returns A tuple of the index and the sibling path of the L1ToL2Message (undefined if not found).
201
205
  */
202
206
  getL1ToL2MessageMembershipWitness(
203
- blockNumber: BlockParameter,
207
+ block: BlockParameter,
204
208
  l1ToL2Message: Fr,
205
209
  ): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>] | undefined>;
206
210
 
@@ -216,32 +220,33 @@ export interface AztecNode
216
220
  isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
217
221
 
218
222
  /**
219
- * Returns all the L2 to L1 messages in a block.
220
- * @param blockNumber - The block number at which to get the data.
221
- * @returns The L2 to L1 messages (undefined if the block number is not found).
223
+ * Returns all the L2 to L1 messages in an epoch.
224
+ * @param epoch - The epoch at which to get the data.
225
+ * @returns A nested array of the L2 to L1 messages in each tx of each block in each checkpoint in the epoch (empty
226
+ * array if the epoch is not found).
222
227
  */
223
- getL2ToL1Messages(blockNumber: BlockParameter): Promise<Fr[][] | undefined>;
228
+ getL2ToL1Messages(epoch: EpochNumber): Promise<Fr[][][][]>;
224
229
 
225
230
  /**
226
- * Get a block specified by its number.
227
- * @param number - The block number being requested.
231
+ * Get a block specified by its block number or 'latest'.
232
+ * @param number - The block number or 'latest'.
228
233
  * @returns The requested block.
229
234
  */
230
- getBlock(number: BlockParameter): Promise<L2Block | undefined>;
235
+ getBlock(number: BlockParameter): Promise<L2BlockNew | undefined>;
231
236
 
232
237
  /**
233
238
  * Get a block specified by its hash.
234
239
  * @param blockHash - The block hash being requested.
235
240
  * @returns The requested block.
236
241
  */
237
- getBlockByHash(blockHash: Fr): Promise<L2Block | undefined>;
242
+ getBlockByHash(blockHash: Fr): Promise<L2BlockNew | undefined>;
238
243
 
239
244
  /**
240
245
  * Get a block specified by its archive root.
241
246
  * @param archive - The archive root being requested.
242
247
  * @returns The requested block.
243
248
  */
244
- getBlockByArchive(archive: Fr): Promise<L2Block | undefined>;
249
+ getBlockByArchive(archive: Fr): Promise<L2BlockNew | undefined>;
245
250
 
246
251
  /**
247
252
  * Method to fetch the latest block number synchronized by the node.
@@ -274,13 +279,13 @@ export interface AztecNode
274
279
  * @param limit - The maximum number of blocks to return.
275
280
  * @returns The blocks requested.
276
281
  */
277
- getBlocks(from: BlockNumber, limit: number): Promise<L2Block[]>;
282
+ getBlocks(from: BlockNumber, limit: number): Promise<L2BlockNew[]>;
278
283
 
279
284
  /**
280
- * Method to fetch the current base fees.
281
- * @returns The current base fees.
285
+ * Method to fetch the current min fees.
286
+ * @returns The current min fees.
282
287
  */
283
- getCurrentBaseFees(): Promise<GasFees>;
288
+ getCurrentMinFees(): Promise<GasFees>;
284
289
 
285
290
  /**
286
291
  * Method to fetch the current max priority fee of txs in the mempool.
@@ -405,25 +410,19 @@ export interface AztecNode
405
410
  * @remarks The storage slot here refers to the slot as it is defined in Noir not the index in the merkle tree.
406
411
  * Aztec's version of `eth_getStorageAt`.
407
412
  *
413
+ * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
408
414
  * @param contract - Address of the contract to query.
409
415
  * @param slot - Slot to query.
410
- * @param blockNumber - The block number at which to get the data or 'latest'.
411
416
  * @returns Storage value at the given contract slot.
412
417
  */
413
- getPublicStorageAt(blockNumber: BlockParameter, contract: AztecAddress, slot: Fr): Promise<Fr>;
418
+ getPublicStorageAt(block: BlockParameter, contract: AztecAddress, slot: Fr): Promise<Fr>;
414
419
 
415
420
  /**
416
- * Returns the currently committed block header.
417
- * @returns The current committed block header.
418
- */
419
- getBlockHeader(blockNumber?: BlockParameter): Promise<BlockHeader | undefined>;
420
-
421
- /**
422
- * Get a block header specified by its hash.
423
- * @param blockHash - The block hash being requested.
421
+ * Returns the block header for a given block number, block hash, or 'latest'.
422
+ * @param block - The block parameter (block number, block hash, or 'latest'). Defaults to 'latest'.
424
423
  * @returns The requested block header.
425
424
  */
426
- getBlockHeaderByHash(blockHash: Fr): Promise<BlockHeader | undefined>;
425
+ getBlockHeader(block?: BlockParameter): Promise<BlockHeader | undefined>;
427
426
 
428
427
  /**
429
428
  * Get a block header specified by its archive root.
@@ -552,14 +551,14 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
552
551
 
553
552
  getL2ToL1Messages: z
554
553
  .function()
555
- .args(BlockParameterSchema)
556
- .returns(z.array(z.array(schemas.Fr)).optional()),
554
+ .args(EpochNumberSchema)
555
+ .returns(z.array(z.array(z.array(z.array(schemas.Fr))))),
557
556
 
558
- getBlock: z.function().args(BlockParameterSchema).returns(L2Block.schema.optional()),
557
+ getBlock: z.function().args(BlockParameterSchema).returns(L2BlockNew.schema.optional()),
559
558
 
560
- getBlockByHash: z.function().args(schemas.Fr).returns(L2Block.schema.optional()),
559
+ getBlockByHash: z.function().args(schemas.Fr).returns(L2BlockNew.schema.optional()),
561
560
 
562
- getBlockByArchive: z.function().args(schemas.Fr).returns(L2Block.schema.optional()),
561
+ getBlockByArchive: z.function().args(schemas.Fr).returns(L2BlockNew.schema.optional()),
563
562
 
564
563
  getBlockNumber: z.function().returns(BlockNumberSchema),
565
564
 
@@ -572,14 +571,29 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
572
571
  getBlocks: z
573
572
  .function()
574
573
  .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
575
- .returns(z.array(L2Block.schema)),
574
+ .returns(z.array(L2BlockNew.schema)),
576
575
 
577
576
  getPublishedBlocks: z
578
577
  .function()
579
578
  .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
580
- .returns(z.array(PublishedL2Block.schema)),
579
+ .returns(z.array(CheckpointedL2Block.schema)),
581
580
 
582
- getCurrentBaseFees: z.function().returns(GasFees.schema),
581
+ getPublishedCheckpoints: z
582
+ .function()
583
+ .args(CheckpointNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_CHECKPOINTS_LEN))
584
+ .returns(z.array(PublishedCheckpoint.schema)),
585
+
586
+ getL2BlocksNew: z
587
+ .function()
588
+ .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
589
+ .returns(z.array(L2BlockNew.schema)),
590
+
591
+ getCheckpointedBlocks: z
592
+ .function()
593
+ .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN), optional(z.boolean()))
594
+ .returns(z.array(CheckpointedL2Block.schema)),
595
+
596
+ getCurrentMinFees: z.function().returns(GasFees.schema),
583
597
 
584
598
  getMaxPriorityFees: z.function().returns(GasFees.schema),
585
599
 
@@ -633,8 +647,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
633
647
 
634
648
  getBlockHeader: z.function().args(optional(BlockParameterSchema)).returns(BlockHeader.schema.optional()),
635
649
 
636
- getBlockHeaderByHash: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
637
-
638
650
  getBlockHeaderByArchive: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
639
651
 
640
652
  getValidatorsStats: z.function().returns(ValidatorsStatsSchema),
@@ -1,17 +1,16 @@
1
- import type { BlockNumber } from '@aztec/foundation/branded-types';
1
+ import type { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
2
2
  import type { Fr } from '@aztec/foundation/curves/bn254';
3
- import type { Timer } from '@aztec/foundation/timer';
4
3
 
5
- import type { L2Block } from '../block/l2_block.js';
4
+ import type { L2BlockNew } from '../block/l2_block_new.js';
6
5
  import type { ChainConfig, SequencerConfig } from '../config/chain-config.js';
7
6
  import type { L1RollupConstants } from '../epoch-helpers/index.js';
8
7
  import type { Gas } from '../gas/gas.js';
9
- import type { MerkleTreeWriteOperations } from '../trees/index.js';
10
8
  import type { BlockHeader } from '../tx/block_header.js';
11
- import type { GlobalVariables } from '../tx/global_variables.js';
9
+ import type { CheckpointGlobalVariables, GlobalVariables } from '../tx/global_variables.js';
12
10
  import type { FailedTx, ProcessedTx } from '../tx/processed_tx.js';
13
11
  import { Tx } from '../tx/tx.js';
14
12
  import type { TxValidator } from '../tx/validator/tx_validator.js';
13
+ import type { MerkleTreeWriteOperations } from './merkle_tree_operations.js';
15
14
  import type { ProcessedTxHandler } from './processed-tx-handler.js';
16
15
 
17
16
  /** The interface to a block builder. Generates an L2 block out of a set of processed txs. */
@@ -32,7 +31,7 @@ export interface IBlockFactory extends ProcessedTxHandler {
32
31
  /**
33
32
  * Assembles the block and updates the archive tree.
34
33
  */
35
- setBlockCompleted(expectedBlockHeader?: BlockHeader): Promise<L2Block>;
34
+ setBlockCompleted(expectedBlockHeader?: BlockHeader): Promise<L2BlockNew>;
36
35
  }
37
36
 
38
37
  export interface PublicProcessorLimits {
@@ -47,16 +46,6 @@ export interface PublicProcessorValidator {
47
46
  preprocessValidator?: TxValidator<Tx>;
48
47
  nullifierCache?: { addNullifiers: (nullifiers: Buffer[]) => void };
49
48
  }
50
- export interface BuildBlockResult {
51
- block: L2Block;
52
- publicGas: Gas;
53
- publicProcessorDuration: number;
54
- numMsgs: number;
55
- numTxs: number;
56
- failedTxs: FailedTx[];
57
- blockBuildingTimer: Timer;
58
- usedTxs: Tx[];
59
- }
60
49
 
61
50
  export type FullNodeBlockBuilderConfig = Pick<L1RollupConstants, 'l1GenesisTime' | 'slotDuration'> &
62
51
  Pick<ChainConfig, 'l1ChainId' | 'rollupVersion'> &
@@ -72,18 +61,36 @@ export const FullNodeBlockBuilderConfigKeys: (keyof FullNodeBlockBuilderConfig)[
72
61
  'fakeThrowAfterProcessingTxCount',
73
62
  ] as const;
74
63
 
75
- export interface IFullNodeBlockBuilder {
76
- getConfig(): FullNodeBlockBuilderConfig;
77
-
78
- updateConfig(config: Partial<FullNodeBlockBuilderConfig>): void;
64
+ /** Result of building a block within a checkpoint. */
65
+ export interface BuildBlockInCheckpointResult {
66
+ block: L2BlockNew;
67
+ publicGas: Gas;
68
+ publicProcessorDuration: number;
69
+ numTxs: number;
70
+ failedTxs: FailedTx[];
71
+ usedTxs: Tx[];
72
+ usedTxBlobFields: number;
73
+ }
79
74
 
75
+ /** Interface for building blocks within a checkpoint context. */
76
+ export interface ICheckpointBlockBuilder {
80
77
  buildBlock(
81
- txs: Iterable<Tx> | AsyncIterable<Tx>,
82
- l1ToL2Messages: Fr[],
83
- globalVariables: GlobalVariables,
84
- options: PublicProcessorLimits,
85
- fork?: MerkleTreeWriteOperations,
86
- ): Promise<BuildBlockResult>;
78
+ pendingTxs: Iterable<Tx> | AsyncIterable<Tx>,
79
+ blockNumber: BlockNumber,
80
+ timestamp: bigint,
81
+ opts: PublicProcessorLimits,
82
+ ): Promise<BuildBlockInCheckpointResult>;
83
+ }
87
84
 
85
+ /** Interface for creating checkpoint builders. */
86
+ export interface ICheckpointsBuilder {
88
87
  getFork(blockNumber: BlockNumber): Promise<MerkleTreeWriteOperations>;
88
+
89
+ startCheckpoint(
90
+ checkpointNumber: CheckpointNumber,
91
+ constants: CheckpointGlobalVariables,
92
+ l1ToL2Messages: Fr[],
93
+ previousCheckpointOutHashes: Fr[],
94
+ fork: MerkleTreeWriteOperations,
95
+ ): Promise<ICheckpointBlockBuilder>;
89
96
  }
@@ -67,6 +67,10 @@ export interface SequencerConfig {
67
67
  blockDurationMs?: number;
68
68
  /** Have sequencer build and publish an empty checkpoint if there are no txs */
69
69
  buildCheckpointIfEmpty?: boolean;
70
+
71
+ // TODO(palla/mbps): Change default to false once block sync is stable
72
+ /** Skip pushing proposed blocks to archiver (default: true) */
73
+ skipPushProposedBlocksToArchiver?: boolean;
70
74
  }
71
75
 
72
76
  export const SequencerConfigSchema = zodFor<SequencerConfig>()(
@@ -100,6 +104,7 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
100
104
  shuffleAttestationOrdering: z.boolean().optional(),
101
105
  blockDurationMs: z.number().positive().optional(),
102
106
  buildCheckpointIfEmpty: z.boolean().optional(),
107
+ skipPushProposedBlocksToArchiver: z.boolean().optional(),
103
108
  }),
104
109
  );
105
110
 
@@ -2,7 +2,7 @@ import type { SlotNumber } from '@aztec/foundation/branded-types';
2
2
 
3
3
  import { z } from 'zod';
4
4
 
5
- import { BlockAttestation } from '../p2p/block_attestation.js';
5
+ import { CheckpointAttestation } from '../p2p/checkpoint_attestation.js';
6
6
  import type { P2PClientType } from '../p2p/client_type.js';
7
7
  import { type ApiSchemaFor, optional, schemas } from '../schemas/index.js';
8
8
  import { Tx } from '../tx/tx.js';
@@ -52,21 +52,18 @@ export interface P2PApiWithoutAttestations {
52
52
 
53
53
  export interface P2PApiWithAttestations extends P2PApiWithoutAttestations {
54
54
  /**
55
- * Queries the Attestation pool for attestations for the given slot
55
+ * Queries the Attestation pool for checkpoint attestations for the given slot
56
56
  *
57
57
  * @param slot - the slot to query
58
58
  * @param proposalId - the proposal id to query, or undefined to query all proposals for the slot
59
- * @returns BlockAttestations
59
+ * @returns CheckpointAttestations
60
60
  */
61
- getAttestationsForSlot(slot: SlotNumber, proposalId?: string): Promise<BlockAttestation[]>;
62
-
63
- /** Deletes a given attestation manually from the p2p client attestation pool. */
64
- deleteAttestation(attestation: BlockAttestation): Promise<void>;
61
+ getCheckpointAttestationsForSlot(slot: SlotNumber, proposalId?: string): Promise<CheckpointAttestation[]>;
65
62
  }
66
63
 
67
64
  export interface P2PClient extends P2PApiWithAttestations {
68
- /** Manually adds an attestation to the p2p client attestation pool. */
69
- addAttestations(attestations: BlockAttestation[]): Promise<void>;
65
+ /** Manually adds checkpoint attestations to the p2p client attestation pool. */
66
+ addCheckpointAttestations(attestations: CheckpointAttestation[]): Promise<void>;
70
67
  }
71
68
 
72
69
  export type P2PApi<T extends P2PClientType = P2PClientType.Full> = T extends P2PClientType.Full
@@ -78,10 +75,10 @@ export type P2PApiFull<T extends P2PClientType = P2PClientType.Full> = T extends
78
75
  : P2PApiWithoutAttestations;
79
76
 
80
77
  export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
81
- getAttestationsForSlot: z
78
+ getCheckpointAttestationsForSlot: z
82
79
  .function()
83
80
  .args(schemas.SlotNumber, optional(z.string()))
84
- .returns(z.array(BlockAttestation.schema)),
81
+ .returns(z.array(CheckpointAttestation.schema)),
85
82
  getPendingTxs: z
86
83
  .function()
87
84
  .args(optional(z.number().gte(1).lte(MAX_RPC_TXS_LEN).default(MAX_RPC_TXS_LEN)), optional(TxHash.schema))
@@ -90,5 +87,4 @@ export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
90
87
  getPendingTxCount: z.function().returns(schemas.Integer),
91
88
  getEncodedEnr: z.function().returns(z.string().optional()),
92
89
  getPeers: z.function().args(optional(z.boolean())).returns(z.array(PeerInfoSchema)),
93
- deleteAttestation: z.function().args(BlockAttestation.schema).returns(z.void()),
94
90
  };
@@ -47,15 +47,6 @@ export type ProofAndVerificationKey<N extends number> = {
47
47
  verificationKey: VerificationKeyData;
48
48
  };
49
49
 
50
- function schemaForRecursiveProofAndVerificationKey<N extends number>(
51
- proofLength: N,
52
- ): ZodFor<ProofAndVerificationKey<N>> {
53
- return z.object({
54
- proof: RecursiveProof.schemaFor(proofLength),
55
- verificationKey: VerificationKeyData.schema,
56
- });
57
- }
58
-
59
50
  export function makeProofAndVerificationKey<N extends number>(
60
51
  proof: RecursiveProof<N>,
61
52
  verificationKey: VerificationKeyData,
@@ -213,7 +204,7 @@ export type ProvingJobInputsMap = {
213
204
  export const ProvingJobResult = z.discriminatedUnion('type', [
214
205
  z.object({
215
206
  type: z.literal(ProvingRequestType.PUBLIC_VM),
216
- result: schemaForRecursiveProofAndVerificationKey(AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED),
207
+ result: RecursiveProof.schemaFor(AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED),
217
208
  }),
218
209
  z.object({
219
210
  type: z.literal(ProvingRequestType.PUBLIC_CHONK_VERIFIER),
@@ -328,7 +319,7 @@ export const ProvingJobResult = z.discriminatedUnion('type', [
328
319
  ]);
329
320
  export type ProvingJobResult = z.infer<typeof ProvingJobResult>;
330
321
  export type ProvingJobResultsMap = {
331
- [ProvingRequestType.PUBLIC_VM]: ProofAndVerificationKey<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>;
322
+ [ProvingRequestType.PUBLIC_VM]: RecursiveProof<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>;
332
323
  [ProvingRequestType.PUBLIC_CHONK_VERIFIER]: PublicInputsAndRecursiveProof<
333
324
  PublicChonkVerifierPublicInputs,
334
325
  typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH
@@ -9,6 +9,7 @@ import type { AvmCircuitInputs } from '../avm/avm.js';
9
9
  import type { ParityBasePrivateInputs } from '../parity/parity_base_private_inputs.js';
10
10
  import type { ParityPublicInputs } from '../parity/parity_public_inputs.js';
11
11
  import type { ParityRootPrivateInputs } from '../parity/parity_root_private_inputs.js';
12
+ import type { RecursiveProof } from '../proofs/recursive_proof.js';
12
13
  import type { BlockMergeRollupPrivateInputs } from '../rollup/block_merge_rollup_private_inputs.js';
13
14
  import type { BlockRollupPublicInputs } from '../rollup/block_rollup_public_inputs.js';
14
15
  import type {
@@ -34,7 +35,7 @@ import type { RootRollupPublicInputs } from '../rollup/root_rollup_public_inputs
34
35
  import type { TxMergeRollupPrivateInputs } from '../rollup/tx_merge_rollup_private_inputs.js';
35
36
  import type { TxRollupPublicInputs } from '../rollup/tx_rollup_public_inputs.js';
36
37
  import type { Tx } from '../tx/tx.js';
37
- import type { ProofAndVerificationKey, PublicInputsAndRecursiveProof } from './proving-job.js';
38
+ import type { PublicInputsAndRecursiveProof } from './proving-job.js';
38
39
 
39
40
  /**
40
41
  * Generates proofs for parity and rollup circuits.
@@ -188,7 +189,7 @@ export interface ServerCircuitProver {
188
189
  inputs: AvmCircuitInputs,
189
190
  signal?: AbortSignal,
190
191
  epochNumber?: number,
191
- ): Promise<ProofAndVerificationKey<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>>;
192
+ ): Promise<RecursiveProof<typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>>;
192
193
  }
193
194
 
194
195
  export type IVCProofVerificationResult = {