@aztec/stdlib 0.0.1-commit.03f7ef2 → 0.0.1-commit.04852196a

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 (834) 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/decoder.d.ts +2 -2
  5. package/dest/abi/decoder.d.ts.map +1 -1
  6. package/dest/abi/decoder.js +7 -5
  7. package/dest/abi/encoder.d.ts +1 -1
  8. package/dest/abi/encoder.d.ts.map +1 -1
  9. package/dest/abi/encoder.js +37 -6
  10. package/dest/abi/event_metadata_definition.d.ts +3 -1
  11. package/dest/abi/event_metadata_definition.d.ts.map +1 -1
  12. package/dest/abi/event_metadata_definition.js +1 -1
  13. package/dest/abi/function_call.d.ts +47 -9
  14. package/dest/abi/function_call.d.ts.map +1 -1
  15. package/dest/abi/function_call.js +20 -3
  16. package/dest/abi/selector.js +3 -1
  17. package/dest/abi/utils.d.ts +20 -1
  18. package/dest/abi/utils.d.ts.map +1 -1
  19. package/dest/abi/utils.js +22 -0
  20. package/dest/auth_witness/auth_witness.d.ts +2 -1
  21. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  22. package/dest/auth_witness/auth_witness.js +3 -3
  23. package/dest/avm/avm.d.ts +362 -362
  24. package/dest/avm/avm_accumulated_data.d.ts +30 -3
  25. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  26. package/dest/avm/avm_accumulated_data.js +5 -2
  27. package/dest/avm/avm_circuit_public_inputs.d.ts +9 -9
  28. package/dest/avm/avm_circuit_public_inputs.js +3 -1
  29. package/dest/avm/avm_proving_request.d.ts +465 -465
  30. package/dest/avm/contract_storage_read.d.ts +13 -1
  31. package/dest/avm/contract_storage_read.d.ts.map +1 -1
  32. package/dest/avm/contract_storage_update_request.d.ts +13 -1
  33. package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
  34. package/dest/avm/public_call_stack_item_compressed.d.ts +3 -1
  35. package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
  36. package/dest/avm/public_data_read.d.ts +10 -1
  37. package/dest/avm/public_data_read.d.ts.map +1 -1
  38. package/dest/avm/public_data_update_request.d.ts +10 -1
  39. package/dest/avm/public_data_update_request.d.ts.map +1 -1
  40. package/dest/avm/public_data_update_request.js +3 -1
  41. package/dest/avm/public_data_write.d.ts +7 -1
  42. package/dest/avm/public_data_write.d.ts.map +1 -1
  43. package/dest/avm/public_inner_call_request.d.ts +4 -1
  44. package/dest/avm/public_inner_call_request.d.ts.map +1 -1
  45. package/dest/avm/public_inner_call_request.js +3 -1
  46. package/dest/avm/revert_code.d.ts +19 -4
  47. package/dest/avm/revert_code.d.ts.map +1 -1
  48. package/dest/avm/revert_code.js +18 -6
  49. package/dest/aztec-address/index.js +4 -2
  50. package/dest/block/attestation_info.d.ts +5 -5
  51. package/dest/block/attestation_info.d.ts.map +1 -1
  52. package/dest/block/attestation_info.js +4 -4
  53. package/dest/block/block_data.d.ts +52 -0
  54. package/dest/block/block_data.d.ts.map +1 -0
  55. package/dest/block/block_data.js +12 -0
  56. package/dest/block/block_hash.d.ts +18 -14
  57. package/dest/block/block_hash.d.ts.map +1 -1
  58. package/dest/block/block_hash.js +22 -20
  59. package/dest/block/block_parameter.d.ts +4 -3
  60. package/dest/block/block_parameter.d.ts.map +1 -1
  61. package/dest/block/block_parameter.js +2 -0
  62. package/dest/block/body.d.ts +1 -1
  63. package/dest/block/body.d.ts.map +1 -1
  64. package/dest/block/body.js +5 -2
  65. package/dest/block/checkpointed_l2_block.d.ts +20 -137
  66. package/dest/block/checkpointed_l2_block.d.ts.map +1 -1
  67. package/dest/block/checkpointed_l2_block.js +7 -45
  68. package/dest/block/in_block.d.ts +9 -9
  69. package/dest/block/in_block.d.ts.map +1 -1
  70. package/dest/block/in_block.js +5 -5
  71. package/dest/block/index.d.ts +2 -3
  72. package/dest/block/index.d.ts.map +1 -1
  73. package/dest/block/index.js +1 -2
  74. package/dest/block/l2_block.d.ts +65 -57
  75. package/dest/block/l2_block.d.ts.map +1 -1
  76. package/dest/block/l2_block.js +73 -107
  77. package/dest/block/l2_block_source.d.ts +322 -68
  78. package/dest/block/l2_block_source.d.ts.map +1 -1
  79. package/dest/block/l2_block_source.js +25 -6
  80. package/dest/block/l2_block_stream/index.d.ts +2 -1
  81. package/dest/block/l2_block_stream/index.d.ts.map +1 -1
  82. package/dest/block/l2_block_stream/index.js +1 -0
  83. package/dest/block/l2_block_stream/interfaces.d.ts +15 -5
  84. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  85. package/dest/block/l2_block_stream/l2_block_stream.d.ts +8 -3
  86. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  87. package/dest/block/l2_block_stream/l2_block_stream.js +116 -31
  88. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +24 -16
  89. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  90. package/dest/block/l2_block_stream/l2_tips_memory_store.js +55 -61
  91. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +49 -0
  92. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -0
  93. package/dest/block/l2_block_stream/l2_tips_store_base.js +179 -0
  94. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  95. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  96. package/dest/block/test/l2_tips_store_test_suite.js +478 -38
  97. package/dest/block/validate_block_result.d.ts +24 -24
  98. package/dest/block/validate_block_result.d.ts.map +1 -1
  99. package/dest/block/validate_block_result.js +18 -17
  100. package/dest/checkpoint/checkpoint.d.ts +44 -19
  101. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  102. package/dest/checkpoint/checkpoint.js +46 -17
  103. package/dest/checkpoint/checkpoint_data.d.ts +120 -0
  104. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
  105. package/dest/checkpoint/checkpoint_data.js +26 -0
  106. package/dest/checkpoint/checkpoint_info.d.ts +32 -3
  107. package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
  108. package/dest/checkpoint/checkpoint_info.js +34 -1
  109. package/dest/checkpoint/index.d.ts +4 -1
  110. package/dest/checkpoint/index.d.ts.map +1 -1
  111. package/dest/checkpoint/index.js +3 -0
  112. package/dest/checkpoint/published_checkpoint.d.ts +33 -16
  113. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  114. package/dest/checkpoint/published_checkpoint.js +5 -5
  115. package/dest/checkpoint/validate.d.ts +36 -0
  116. package/dest/checkpoint/validate.d.ts.map +1 -0
  117. package/dest/checkpoint/validate.js +120 -0
  118. package/dest/config/index.d.ts +2 -1
  119. package/dest/config/index.d.ts.map +1 -1
  120. package/dest/config/index.js +1 -0
  121. package/dest/config/node-rpc-config.js +1 -1
  122. package/dest/config/sequencer-config.d.ts +12 -0
  123. package/dest/config/sequencer-config.d.ts.map +1 -0
  124. package/dest/config/sequencer-config.js +24 -0
  125. package/dest/contract/complete_address.d.ts +4 -1
  126. package/dest/contract/complete_address.d.ts.map +1 -1
  127. package/dest/contract/contract_address.js +4 -4
  128. package/dest/contract/contract_class.d.ts +2 -3
  129. package/dest/contract/contract_class.d.ts.map +1 -1
  130. package/dest/contract/contract_class_id.d.ts +2 -2
  131. package/dest/contract/contract_class_id.d.ts.map +1 -1
  132. package/dest/contract/contract_class_id.js +6 -5
  133. package/dest/contract/contract_deployment_data.d.ts +5 -5
  134. package/dest/contract/index.d.ts +1 -3
  135. package/dest/contract/index.d.ts.map +1 -1
  136. package/dest/contract/index.js +0 -2
  137. package/dest/contract/interfaces/contract_instance.d.ts +16 -16
  138. package/dest/contract/interfaces/node-info.d.ts +3 -1
  139. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  140. package/dest/contract/interfaces/node-info.js +2 -1
  141. package/dest/contract/private_function.d.ts +1 -1
  142. package/dest/contract/private_function.d.ts.map +1 -1
  143. package/dest/contract/private_function.js +3 -4
  144. package/dest/contract/private_function_membership_proof.d.ts +1 -1
  145. package/dest/contract/private_function_membership_proof.js +1 -1
  146. package/dest/database-version/database_version.d.ts +58 -0
  147. package/dest/database-version/database_version.d.ts.map +1 -0
  148. package/dest/database-version/database_version.js +69 -0
  149. package/dest/database-version/version_manager.d.ts +3 -49
  150. package/dest/database-version/version_manager.d.ts.map +1 -1
  151. package/dest/database-version/version_manager.js +1 -64
  152. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +2 -2
  153. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
  154. package/dest/delayed_public_mutable/delayed_public_mutable_values.js +7 -10
  155. package/dest/deserialization/index.d.ts +11 -0
  156. package/dest/deserialization/index.d.ts.map +1 -0
  157. package/dest/deserialization/index.js +10 -0
  158. package/dest/epoch-helpers/index.d.ts +7 -1
  159. package/dest/epoch-helpers/index.d.ts.map +1 -1
  160. package/dest/epoch-helpers/index.js +9 -3
  161. package/dest/errors/proving_error.d.ts +2 -2
  162. package/dest/errors/proving_error.d.ts.map +1 -1
  163. package/dest/file-store/local.d.ts +3 -3
  164. package/dest/file-store/local.d.ts.map +1 -1
  165. package/dest/file-store/local.js +13 -4
  166. package/dest/file-store/s3.d.ts +1 -1
  167. package/dest/file-store/s3.d.ts.map +1 -1
  168. package/dest/file-store/s3.js +11 -3
  169. package/dest/gas/gas.js +3 -1
  170. package/dest/gas/gas_fees.d.ts +1 -1
  171. package/dest/gas/gas_fees.d.ts.map +1 -1
  172. package/dest/gas/gas_fees.js +7 -2
  173. package/dest/ha-signing/config.d.ts +136 -0
  174. package/dest/ha-signing/config.d.ts.map +1 -0
  175. package/dest/ha-signing/config.js +97 -0
  176. package/dest/ha-signing/index.d.ts +4 -0
  177. package/dest/ha-signing/index.d.ts.map +1 -0
  178. package/dest/ha-signing/index.js +3 -0
  179. package/dest/ha-signing/local_config.d.ts +63 -0
  180. package/dest/ha-signing/local_config.d.ts.map +1 -0
  181. package/dest/ha-signing/local_config.js +24 -0
  182. package/dest/ha-signing/types.d.ts +85 -0
  183. package/dest/ha-signing/types.d.ts.map +1 -0
  184. package/dest/ha-signing/types.js +32 -0
  185. package/dest/hash/hash.d.ts +2 -1
  186. package/dest/hash/hash.d.ts.map +1 -1
  187. package/dest/hash/hash.js +16 -10
  188. package/dest/hash/map_slot.d.ts +1 -1
  189. package/dest/hash/map_slot.d.ts.map +1 -1
  190. package/dest/hash/map_slot.js +4 -3
  191. package/dest/interfaces/allowed_element.d.ts +26 -20
  192. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  193. package/dest/interfaces/allowed_element.js +8 -8
  194. package/dest/interfaces/api_limit.d.ts +3 -1
  195. package/dest/interfaces/api_limit.d.ts.map +1 -1
  196. package/dest/interfaces/api_limit.js +2 -0
  197. package/dest/interfaces/archiver.d.ts +6 -6
  198. package/dest/interfaces/archiver.d.ts.map +1 -1
  199. package/dest/interfaces/archiver.js +28 -17
  200. package/dest/interfaces/aztec-node-admin.d.ts +178 -59
  201. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  202. package/dest/interfaces/aztec-node-admin.js +15 -7
  203. package/dest/interfaces/aztec-node.d.ts +83 -80
  204. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  205. package/dest/interfaces/aztec-node.js +17 -17
  206. package/dest/interfaces/block-builder.d.ts +30 -16
  207. package/dest/interfaces/block-builder.d.ts.map +1 -1
  208. package/dest/interfaces/block-builder.js +14 -2
  209. package/dest/interfaces/configs.d.ts +80 -35
  210. package/dest/interfaces/configs.d.ts.map +1 -1
  211. package/dest/interfaces/configs.js +10 -3
  212. package/dest/interfaces/get_logs_response.d.ts +16 -9
  213. package/dest/interfaces/get_logs_response.d.ts.map +1 -1
  214. package/dest/interfaces/l2_logs_source.d.ts +14 -5
  215. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  216. package/dest/interfaces/merkle_tree_operations.d.ts +2 -2
  217. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  218. package/dest/interfaces/p2p.d.ts +9 -16
  219. package/dest/interfaces/p2p.d.ts.map +1 -1
  220. package/dest/interfaces/p2p.js +3 -4
  221. package/dest/interfaces/prover-broker.d.ts +16 -1
  222. package/dest/interfaces/prover-broker.d.ts.map +1 -1
  223. package/dest/interfaces/prover-broker.js +4 -1
  224. package/dest/interfaces/prover-client.d.ts +15 -1
  225. package/dest/interfaces/prover-client.d.ts.map +1 -1
  226. package/dest/interfaces/prover-client.js +12 -1
  227. package/dest/interfaces/proving-job.d.ts +52 -52
  228. package/dest/interfaces/proving-job.d.ts.map +1 -1
  229. package/dest/interfaces/proving-job.js +1 -7
  230. package/dest/interfaces/server_circuit_prover.d.ts +4 -3
  231. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  232. package/dest/interfaces/slasher.d.ts +9 -1
  233. package/dest/interfaces/slasher.d.ts.map +1 -1
  234. package/dest/interfaces/slasher.js +2 -0
  235. package/dest/interfaces/tx_provider.d.ts +3 -3
  236. package/dest/interfaces/tx_provider.d.ts.map +1 -1
  237. package/dest/interfaces/validator.d.ts +240 -42
  238. package/dest/interfaces/validator.d.ts.map +1 -1
  239. package/dest/interfaces/validator.js +13 -4
  240. package/dest/interfaces/world_state.d.ts +8 -6
  241. package/dest/interfaces/world_state.d.ts.map +1 -1
  242. package/dest/kernel/claimed_length_array.js +3 -1
  243. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +7 -6
  244. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
  245. package/dest/kernel/hints/build_note_hash_read_request_hints.js +31 -19
  246. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +4 -4
  247. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  248. package/dest/kernel/hints/build_nullifier_read_request_hints.js +28 -17
  249. package/dest/kernel/hints/build_transient_data_hints.d.ts +5 -2
  250. package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
  251. package/dest/kernel/hints/build_transient_data_hints.js +9 -3
  252. package/dest/kernel/hints/index.d.ts +2 -2
  253. package/dest/kernel/hints/index.js +2 -2
  254. package/dest/kernel/hints/key_validation_hint.d.ts +2 -1
  255. package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
  256. package/dest/kernel/hints/key_validation_request.d.ts +2 -1
  257. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  258. package/dest/kernel/hints/key_validation_request_and_separator.d.ts +24 -0
  259. package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
  260. package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +12 -15
  261. package/dest/kernel/hints/private_kernel_reset_hints.d.ts +13 -1
  262. package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
  263. package/dest/kernel/hints/read_request.d.ts +7 -1
  264. package/dest/kernel/hints/read_request.d.ts.map +1 -1
  265. package/dest/kernel/hints/read_request_hints.d.ts +7 -1
  266. package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
  267. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +8 -8
  268. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
  269. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
  270. package/dest/kernel/hints/transient_data_squashing_hint.js +3 -1
  271. package/dest/kernel/log_hash.js +3 -1
  272. package/dest/kernel/private_accumulated_data.d.ts +23 -1
  273. package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
  274. package/dest/kernel/private_call_data.d.ts +25 -1
  275. package/dest/kernel/private_call_data.d.ts.map +1 -1
  276. package/dest/kernel/private_call_request.d.ts +16 -1
  277. package/dest/kernel/private_call_request.d.ts.map +1 -1
  278. package/dest/kernel/private_circuit_public_inputs.d.ts +81 -8
  279. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  280. package/dest/kernel/private_circuit_public_inputs.js +16 -16
  281. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +33 -3
  282. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  283. package/dest/kernel/private_kernel_circuit_public_inputs.js +4 -4
  284. package/dest/kernel/private_kernel_data.d.ts +7 -1
  285. package/dest/kernel/private_kernel_data.d.ts.map +1 -1
  286. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +22 -1
  287. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  288. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +7 -1
  289. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
  290. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -1
  291. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
  292. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +12 -3
  293. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
  294. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
  295. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +26 -3
  296. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  297. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +11 -7
  298. package/dest/kernel/private_log_data.js +5 -2
  299. package/dest/kernel/private_to_avm_accumulated_data.d.ts +2 -2
  300. package/dest/kernel/private_to_avm_accumulated_data.js +5 -2
  301. package/dest/kernel/private_to_public_accumulated_data.js +3 -1
  302. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +3 -3
  303. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  304. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -7
  305. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +17 -1
  306. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  307. package/dest/kernel/private_to_rollup_accumulated_data.js +3 -1
  308. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +18 -3
  309. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  310. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -7
  311. package/dest/kernel/private_validation_requests.d.ts +13 -4
  312. package/dest/kernel/private_validation_requests.d.ts.map +1 -1
  313. package/dest/kernel/private_validation_requests.js +12 -10
  314. package/dest/kernel/public_call_request.d.ts +22 -1
  315. package/dest/kernel/public_call_request.d.ts.map +1 -1
  316. package/dest/kernel/public_call_request.js +5 -2
  317. package/dest/kernel/utils/optional_number.d.ts +7 -1
  318. package/dest/kernel/utils/optional_number.d.ts.map +1 -1
  319. package/dest/keys/derivation.d.ts +3 -3
  320. package/dest/keys/derivation.js +15 -15
  321. package/dest/keys/key_types.d.ts +3 -3
  322. package/dest/keys/key_types.d.ts.map +1 -1
  323. package/dest/keys/public_keys.d.ts +5 -1
  324. package/dest/keys/public_keys.d.ts.map +1 -1
  325. package/dest/keys/public_keys.js +2 -2
  326. package/dest/keys/utils.d.ts +1 -1
  327. package/dest/keys/utils.d.ts.map +1 -1
  328. package/dest/keys/utils.js +8 -4
  329. package/dest/kv-store/config.d.ts +17 -0
  330. package/dest/kv-store/config.d.ts.map +1 -0
  331. package/dest/kv-store/config.js +26 -0
  332. package/dest/kv-store/index.d.ts +2 -0
  333. package/dest/kv-store/index.d.ts.map +1 -0
  334. package/dest/kv-store/index.js +1 -0
  335. package/dest/l1-contracts/slash_factory.d.ts +1 -1
  336. package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
  337. package/dest/l1-contracts/slash_factory.js +1 -0
  338. package/dest/logs/contract_class_log.js +3 -1
  339. package/dest/logs/debug_log_store.d.ts +30 -0
  340. package/dest/logs/debug_log_store.d.ts.map +1 -0
  341. package/dest/logs/debug_log_store.js +30 -0
  342. package/dest/logs/extended_contract_class_log.d.ts +3 -1
  343. package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
  344. package/dest/logs/extended_directional_app_tagging_secret.d.ts +47 -0
  345. package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +1 -0
  346. package/dest/logs/{directional_app_tagging_secret.js → extended_directional_app_tagging_secret.js} +23 -15
  347. package/dest/logs/extended_public_log.d.ts +17 -9
  348. package/dest/logs/extended_public_log.d.ts.map +1 -1
  349. package/dest/logs/index.d.ts +3 -3
  350. package/dest/logs/index.d.ts.map +1 -1
  351. package/dest/logs/index.js +2 -2
  352. package/dest/logs/log_id.d.ts +21 -14
  353. package/dest/logs/log_id.d.ts.map +1 -1
  354. package/dest/logs/log_id.js +20 -17
  355. package/dest/logs/pre_tag.d.ts +16 -11
  356. package/dest/logs/pre_tag.d.ts.map +1 -1
  357. package/dest/logs/pre_tag.js +2 -2
  358. package/dest/logs/private_log.d.ts +2 -2
  359. package/dest/logs/private_log.d.ts.map +1 -1
  360. package/dest/logs/private_log.js +3 -1
  361. package/dest/logs/public_log.d.ts +4 -3
  362. package/dest/logs/public_log.d.ts.map +1 -1
  363. package/dest/logs/public_log.js +5 -2
  364. package/dest/logs/siloed_tag.d.ts +5 -3
  365. package/dest/logs/siloed_tag.d.ts.map +1 -1
  366. package/dest/logs/siloed_tag.js +8 -6
  367. package/dest/logs/tag.js +1 -1
  368. package/dest/logs/tx_scoped_l2_log.d.ts +18 -39
  369. package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
  370. package/dest/logs/tx_scoped_l2_log.js +29 -50
  371. package/dest/messaging/in_hash.d.ts +4 -2
  372. package/dest/messaging/in_hash.d.ts.map +1 -1
  373. package/dest/messaging/in_hash.js +3 -1
  374. package/dest/messaging/inbox_leaf.d.ts +3 -1
  375. package/dest/messaging/inbox_leaf.d.ts.map +1 -1
  376. package/dest/messaging/l1_actor.d.ts +7 -1
  377. package/dest/messaging/l1_actor.d.ts.map +1 -1
  378. package/dest/messaging/l1_to_l2_message.d.ts +6 -1
  379. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  380. package/dest/messaging/l2_actor.d.ts +7 -1
  381. package/dest/messaging/l2_actor.d.ts.map +1 -1
  382. package/dest/messaging/l2_to_l1_membership.d.ts +88 -6
  383. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  384. package/dest/messaging/l2_to_l1_membership.js +160 -42
  385. package/dest/messaging/out_hash.d.ts +41 -3
  386. package/dest/messaging/out_hash.d.ts.map +1 -1
  387. package/dest/messaging/out_hash.js +54 -19
  388. package/dest/note/index.d.ts +1 -2
  389. package/dest/note/index.d.ts.map +1 -1
  390. package/dest/note/index.js +0 -1
  391. package/dest/note/note_dao.d.ts +36 -5
  392. package/dest/note/note_dao.d.ts.map +1 -1
  393. package/dest/note/note_dao.js +15 -12
  394. package/dest/p2p/attestation_utils.d.ts +13 -3
  395. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  396. package/dest/p2p/attestation_utils.js +46 -1
  397. package/dest/p2p/block_proposal.d.ts +102 -23
  398. package/dest/p2p/block_proposal.d.ts.map +1 -1
  399. package/dest/p2p/block_proposal.js +138 -39
  400. package/dest/p2p/checkpoint_attestation.d.ts +82 -0
  401. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -0
  402. package/dest/p2p/{block_attestation.js → checkpoint_attestation.js} +22 -19
  403. package/dest/p2p/checkpoint_proposal.d.ts +174 -0
  404. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -0
  405. package/dest/p2p/checkpoint_proposal.js +231 -0
  406. package/dest/p2p/client_type.d.ts +2 -5
  407. package/dest/p2p/client_type.d.ts.map +1 -1
  408. package/dest/p2p/client_type.js +0 -7
  409. package/dest/p2p/consensus_payload.d.ts +20 -11
  410. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  411. package/dest/p2p/consensus_payload.js +24 -19
  412. package/dest/p2p/constants.d.ts +5 -0
  413. package/dest/p2p/constants.d.ts.map +1 -0
  414. package/dest/p2p/constants.js +3 -0
  415. package/dest/p2p/gossipable.d.ts +4 -3
  416. package/dest/p2p/gossipable.d.ts.map +1 -1
  417. package/dest/p2p/gossipable.js +16 -5
  418. package/dest/p2p/index.d.ts +5 -3
  419. package/dest/p2p/index.d.ts.map +1 -1
  420. package/dest/p2p/index.js +4 -2
  421. package/dest/p2p/message_validator.d.ts +18 -3
  422. package/dest/p2p/message_validator.d.ts.map +1 -1
  423. package/dest/p2p/message_validator.js +2 -1
  424. package/dest/p2p/peer_error.d.ts +3 -1
  425. package/dest/p2p/peer_error.d.ts.map +1 -1
  426. package/dest/p2p/peer_error.js +5 -0
  427. package/dest/p2p/signature_utils.d.ts +5 -3
  428. package/dest/p2p/signature_utils.d.ts.map +1 -1
  429. package/dest/p2p/signature_utils.js +3 -1
  430. package/dest/p2p/signed_txs.d.ts +42 -0
  431. package/dest/p2p/signed_txs.d.ts.map +1 -0
  432. package/dest/p2p/signed_txs.js +75 -0
  433. package/dest/p2p/topic_type.d.ts +5 -5
  434. package/dest/p2p/topic_type.d.ts.map +1 -1
  435. package/dest/p2p/topic_type.js +9 -19
  436. package/dest/parity/parity_base_private_inputs.d.ts +3 -1
  437. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  438. package/dest/parity/parity_public_inputs.d.ts +4 -1
  439. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  440. package/dest/parity/parity_root_private_inputs.d.ts +2 -1
  441. package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
  442. package/dest/proofs/chonk_proof.d.ts +1 -1
  443. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  444. package/dest/proofs/chonk_proof.js +9 -4
  445. package/dest/proofs/proof.d.ts +4 -1
  446. package/dest/proofs/proof.d.ts.map +1 -1
  447. package/dest/proofs/recursive_proof.d.ts +10 -1
  448. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  449. package/dest/rollup/base_rollup_hints.d.ts +34 -1
  450. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  451. package/dest/rollup/block_constant_data.d.ts +12 -1
  452. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  453. package/dest/rollup/block_headers_hash.js +1 -1
  454. package/dest/rollup/block_merge_rollup_private_inputs.d.ts +4 -1
  455. package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
  456. package/dest/rollup/block_rollup_public_inputs.d.ts +47 -11
  457. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  458. package/dest/rollup/block_rollup_public_inputs.js +8 -12
  459. package/dest/rollup/block_root_rollup_private_inputs.d.ts +64 -1
  460. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  461. package/dest/rollup/checkpoint_constant_data.d.ts +10 -1
  462. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
  463. package/dest/rollup/checkpoint_constant_data.js +3 -1
  464. package/dest/rollup/checkpoint_header.d.ts +43 -13
  465. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  466. package/dest/rollup/checkpoint_header.js +50 -20
  467. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +4 -1
  468. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
  469. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +46 -6
  470. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  471. package/dest/rollup/checkpoint_rollup_public_inputs.js +11 -3
  472. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +44 -3
  473. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  474. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +13 -2
  475. package/dest/rollup/epoch_constant_data.d.ts +16 -1
  476. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  477. package/dest/rollup/root_rollup_private_inputs.d.ts +6 -1
  478. package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
  479. package/dest/rollup/root_rollup_public_inputs.d.ts +21 -6
  480. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  481. package/dest/rollup/root_rollup_public_inputs.js +10 -4
  482. package/dest/rollup/tree_snapshot_diff_hints.d.ts +24 -1
  483. package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
  484. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +4 -1
  485. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
  486. package/dest/rollup/tx_rollup_public_inputs.d.ts +29 -1
  487. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  488. package/dest/schemas/schemas.d.ts +1 -1
  489. package/dest/slashing/empire.d.ts +1 -1
  490. package/dest/slashing/empire.d.ts.map +1 -1
  491. package/dest/slashing/empire.js +2 -0
  492. package/dest/slashing/helpers.d.ts +2 -2
  493. package/dest/slashing/helpers.d.ts.map +1 -1
  494. package/dest/slashing/helpers.js +6 -0
  495. package/dest/slashing/tally.d.ts +8 -2
  496. package/dest/slashing/tally.d.ts.map +1 -1
  497. package/dest/slashing/tally.js +35 -3
  498. package/dest/slashing/types.d.ts +7 -3
  499. package/dest/slashing/types.d.ts.map +1 -1
  500. package/dest/slashing/types.js +13 -1
  501. package/dest/stats/stats.d.ts +1 -3
  502. package/dest/stats/stats.d.ts.map +1 -1
  503. package/dest/tests/factories.d.ts +41 -10
  504. package/dest/tests/factories.d.ts.map +1 -1
  505. package/dest/tests/factories.js +99 -36
  506. package/dest/tests/jest.js +1 -1
  507. package/dest/tests/mocks.d.ts +79 -19
  508. package/dest/tests/mocks.d.ts.map +1 -1
  509. package/dest/tests/mocks.js +148 -72
  510. package/dest/timetable/index.d.ts +37 -0
  511. package/dest/timetable/index.d.ts.map +1 -0
  512. package/dest/timetable/index.js +39 -0
  513. package/dest/trees/append_only_tree_snapshot.d.ts +13 -1
  514. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  515. package/dest/trees/append_only_tree_snapshot.js +3 -1
  516. package/dest/trees/nullifier_leaf.d.ts +13 -1
  517. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  518. package/dest/trees/nullifier_membership_witness.d.ts +10 -1
  519. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  520. package/dest/trees/public_data_leaf.d.ts +17 -1
  521. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  522. package/dest/trees/public_data_leaf.js +7 -6
  523. package/dest/trees/public_data_witness.d.ts +11 -1
  524. package/dest/trees/public_data_witness.d.ts.map +1 -1
  525. package/dest/tx/block_header.d.ts +16 -2
  526. package/dest/tx/block_header.d.ts.map +1 -1
  527. package/dest/tx/block_header.js +13 -3
  528. package/dest/tx/call_context.d.ts +13 -1
  529. package/dest/tx/call_context.d.ts.map +1 -1
  530. package/dest/tx/call_context.js +3 -1
  531. package/dest/tx/capsule.d.ts +4 -1
  532. package/dest/tx/capsule.d.ts.map +1 -1
  533. package/dest/tx/execution_payload.d.ts +9 -1
  534. package/dest/tx/execution_payload.d.ts.map +1 -1
  535. package/dest/tx/function_data.d.ts +4 -2
  536. package/dest/tx/function_data.d.ts.map +1 -1
  537. package/dest/tx/global_variable_builder.d.ts +2 -2
  538. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  539. package/dest/tx/global_variables.d.ts +12 -4
  540. package/dest/tx/global_variables.d.ts.map +1 -1
  541. package/dest/tx/global_variables.js +3 -1
  542. package/dest/tx/hashed_values.d.ts +7 -1
  543. package/dest/tx/hashed_values.d.ts.map +1 -1
  544. package/dest/tx/in_tx.d.ts +4 -4
  545. package/dest/tx/index.d.ts +1 -2
  546. package/dest/tx/index.d.ts.map +1 -1
  547. package/dest/tx/index.js +0 -1
  548. package/dest/tx/indexed_tx_effect.d.ts +5 -5
  549. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  550. package/dest/tx/indexed_tx_effect.js +3 -2
  551. package/dest/tx/partial_state_reference.d.ts +4 -1
  552. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  553. package/dest/tx/private_execution_result.d.ts +23 -6
  554. package/dest/tx/private_execution_result.d.ts.map +1 -1
  555. package/dest/tx/private_execution_result.js +4 -21
  556. package/dest/tx/private_tx_constant_data.d.ts +16 -1
  557. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  558. package/dest/tx/profiling.d.ts +152 -29
  559. package/dest/tx/profiling.d.ts.map +1 -1
  560. package/dest/tx/profiling.js +47 -10
  561. package/dest/tx/protocol_contracts.d.ts +2 -2
  562. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  563. package/dest/tx/protocol_contracts.js +2 -2
  564. package/dest/tx/public_call_request_with_calldata.d.ts +7 -1
  565. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  566. package/dest/tx/public_call_request_with_calldata.js +3 -1
  567. package/dest/tx/public_simulation_output.d.ts +4 -2
  568. package/dest/tx/public_simulation_output.d.ts.map +1 -1
  569. package/dest/tx/public_simulation_output.js +7 -3
  570. package/dest/tx/simulated_tx.d.ts +5 -2
  571. package/dest/tx/simulated_tx.d.ts.map +1 -1
  572. package/dest/tx/simulated_tx.js +4 -1
  573. package/dest/tx/state_reference.d.ts +3 -1
  574. package/dest/tx/state_reference.d.ts.map +1 -1
  575. package/dest/tx/state_reference.js +3 -1
  576. package/dest/tx/tree_snapshots.js +3 -1
  577. package/dest/tx/tx.d.ts +38 -7
  578. package/dest/tx/tx.d.ts.map +1 -1
  579. package/dest/tx/tx.js +36 -12
  580. package/dest/tx/tx_context.d.ts +2 -1
  581. package/dest/tx/tx_context.d.ts.map +1 -1
  582. package/dest/tx/tx_effect.d.ts +32 -6
  583. package/dest/tx/tx_effect.d.ts.map +1 -1
  584. package/dest/tx/tx_effect.js +6 -9
  585. package/dest/tx/tx_execution_request.d.ts +30 -1
  586. package/dest/tx/tx_execution_request.d.ts.map +1 -1
  587. package/dest/tx/tx_execution_request.js +6 -2
  588. package/dest/tx/tx_hash.d.ts +2 -1
  589. package/dest/tx/tx_hash.d.ts.map +1 -1
  590. package/dest/tx/tx_receipt.d.ts +62 -14
  591. package/dest/tx/tx_receipt.d.ts.map +1 -1
  592. package/dest/tx/tx_receipt.js +55 -16
  593. package/dest/tx/tx_request.d.ts +6 -1
  594. package/dest/tx/tx_request.d.ts.map +1 -1
  595. package/dest/tx/tx_request.js +2 -2
  596. package/dest/tx/validator/empty_validator.d.ts +2 -2
  597. package/dest/tx/validator/empty_validator.d.ts.map +1 -1
  598. package/dest/tx/validator/error_texts.d.ts +7 -2
  599. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  600. package/dest/tx/validator/error_texts.js +7 -1
  601. package/dest/tx/validator/tx_validator.d.ts +2 -2
  602. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  603. package/dest/types/shared.d.ts +4 -1
  604. package/dest/types/shared.d.ts.map +1 -1
  605. package/dest/update-checker/index.d.ts +3 -2
  606. package/dest/update-checker/index.d.ts.map +1 -1
  607. package/dest/update-checker/index.js +2 -1
  608. package/dest/update-checker/package_version.d.ts +3 -0
  609. package/dest/update-checker/package_version.d.ts.map +1 -0
  610. package/dest/update-checker/package_version.js +11 -0
  611. package/dest/update-checker/version_checker.d.ts +25 -0
  612. package/dest/update-checker/version_checker.d.ts.map +1 -0
  613. package/dest/update-checker/version_checker.js +50 -0
  614. package/dest/validators/schemas.d.ts +38 -38
  615. package/dest/validators/schemas.d.ts.map +1 -1
  616. package/dest/validators/schemas.js +4 -3
  617. package/dest/validators/types.d.ts +3 -3
  618. package/dest/validators/types.d.ts.map +1 -1
  619. package/dest/vks/verification_key.d.ts +22 -1
  620. package/dest/vks/verification_key.d.ts.map +1 -1
  621. package/dest/vks/vk_data.d.ts +7 -1
  622. package/dest/vks/vk_data.d.ts.map +1 -1
  623. package/dest/zkpassport/index.d.ts +3 -4
  624. package/dest/zkpassport/index.d.ts.map +1 -1
  625. package/dest/zkpassport/index.js +9 -9
  626. package/package.json +29 -14
  627. package/src/abi/contract_artifact.ts +10 -10
  628. package/src/abi/decoder.ts +15 -6
  629. package/src/abi/encoder.ts +49 -6
  630. package/src/abi/event_metadata_definition.ts +2 -0
  631. package/src/abi/function_call.ts +25 -3
  632. package/src/abi/utils.ts +42 -0
  633. package/src/auth_witness/auth_witness.ts +3 -3
  634. package/src/avm/revert_code.ts +15 -0
  635. package/src/block/attestation_info.ts +9 -6
  636. package/src/block/block_data.ts +26 -0
  637. package/src/block/block_hash.ts +26 -25
  638. package/src/block/block_parameter.ts +4 -2
  639. package/src/block/body.ts +2 -1
  640. package/src/block/checkpointed_l2_block.ts +8 -58
  641. package/src/block/in_block.ts +6 -6
  642. package/src/block/index.ts +1 -2
  643. package/src/block/l2_block.ts +112 -147
  644. package/src/block/l2_block_source.ts +151 -44
  645. package/src/block/l2_block_stream/index.ts +1 -0
  646. package/src/block/l2_block_stream/interfaces.ts +15 -4
  647. package/src/block/l2_block_stream/l2_block_stream.ts +151 -39
  648. package/src/block/l2_block_stream/l2_tips_memory_store.ts +62 -56
  649. package/src/block/l2_block_stream/l2_tips_store_base.ts +226 -0
  650. package/src/block/test/l2_tips_store_test_suite.ts +480 -36
  651. package/src/block/validate_block_result.ts +40 -35
  652. package/src/checkpoint/checkpoint.ts +73 -23
  653. package/src/checkpoint/checkpoint_data.ts +51 -0
  654. package/src/checkpoint/checkpoint_info.ts +45 -2
  655. package/src/checkpoint/index.ts +3 -0
  656. package/src/checkpoint/published_checkpoint.ts +7 -4
  657. package/src/checkpoint/validate.ts +230 -0
  658. package/src/config/index.ts +1 -0
  659. package/src/config/node-rpc-config.ts +1 -1
  660. package/src/config/sequencer-config.ts +37 -0
  661. package/src/contract/contract_address.ts +4 -4
  662. package/src/contract/contract_class.ts +3 -3
  663. package/src/contract/contract_class_id.ts +6 -5
  664. package/src/contract/index.ts +0 -2
  665. package/src/contract/interfaces/node-info.ts +3 -0
  666. package/src/contract/private_function.ts +3 -4
  667. package/src/contract/private_function_membership_proof.ts +1 -1
  668. package/src/database-version/database_version.ts +87 -0
  669. package/src/database-version/version_manager.ts +1 -77
  670. package/src/delayed_public_mutable/delayed_public_mutable_values.ts +9 -10
  671. package/src/deserialization/index.ts +21 -0
  672. package/src/epoch-helpers/index.ts +13 -1
  673. package/src/file-store/local.ts +15 -5
  674. package/src/file-store/s3.ts +12 -3
  675. package/src/gas/gas_fees.ts +7 -1
  676. package/src/ha-signing/config.ts +156 -0
  677. package/src/ha-signing/index.ts +27 -0
  678. package/src/ha-signing/local_config.ts +46 -0
  679. package/src/ha-signing/types.ts +112 -0
  680. package/src/hash/hash.ts +14 -10
  681. package/src/hash/map_slot.ts +3 -2
  682. package/src/interfaces/allowed_element.ts +29 -9
  683. package/src/interfaces/api_limit.ts +2 -0
  684. package/src/interfaces/archiver.ts +32 -24
  685. package/src/interfaces/aztec-node-admin.ts +33 -6
  686. package/src/interfaces/aztec-node.ts +124 -133
  687. package/src/interfaces/block-builder.ts +64 -26
  688. package/src/interfaces/configs.ts +36 -8
  689. package/src/interfaces/l2_logs_source.ts +17 -4
  690. package/src/interfaces/merkle_tree_operations.ts +1 -1
  691. package/src/interfaces/p2p.ts +10 -25
  692. package/src/interfaces/prover-broker.ts +22 -0
  693. package/src/interfaces/prover-client.ts +22 -0
  694. package/src/interfaces/proving-job.ts +2 -11
  695. package/src/interfaces/server_circuit_prover.ts +3 -2
  696. package/src/interfaces/slasher.ts +4 -0
  697. package/src/interfaces/tx_provider.ts +2 -2
  698. package/src/interfaces/validator.ts +112 -32
  699. package/src/interfaces/world_state.ts +9 -7
  700. package/src/kernel/hints/build_note_hash_read_request_hints.ts +34 -30
  701. package/src/kernel/hints/build_nullifier_read_request_hints.ts +32 -32
  702. package/src/kernel/hints/build_transient_data_hints.ts +17 -2
  703. package/src/kernel/hints/index.ts +2 -2
  704. package/src/kernel/hints/{key_validation_request_and_generator.ts → key_validation_request_and_separator.ts} +12 -15
  705. package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +10 -10
  706. package/src/kernel/private_circuit_public_inputs.ts +14 -14
  707. package/src/kernel/private_kernel_circuit_public_inputs.ts +2 -2
  708. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
  709. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +14 -5
  710. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +5 -5
  711. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +5 -5
  712. package/src/kernel/private_validation_requests.ts +8 -8
  713. package/src/keys/derivation.ts +15 -15
  714. package/src/keys/key_types.ts +6 -2
  715. package/src/keys/public_keys.ts +2 -2
  716. package/src/keys/utils.ts +8 -4
  717. package/src/kv-store/config.ts +36 -0
  718. package/src/kv-store/index.ts +1 -0
  719. package/src/l1-contracts/slash_factory.ts +1 -0
  720. package/src/logs/debug_log_store.ts +54 -0
  721. package/src/logs/{directional_app_tagging_secret.ts → extended_directional_app_tagging_secret.ts} +24 -16
  722. package/src/logs/index.ts +2 -2
  723. package/src/logs/log_id.ts +22 -18
  724. package/src/logs/pre_tag.ts +5 -5
  725. package/src/logs/public_log.ts +4 -2
  726. package/src/logs/siloed_tag.ts +10 -4
  727. package/src/logs/tag.ts +1 -1
  728. package/src/logs/tx_scoped_l2_log.ts +37 -53
  729. package/src/messaging/in_hash.ts +3 -1
  730. package/src/messaging/l2_to_l1_membership.ts +178 -52
  731. package/src/messaging/out_hash.ts +62 -21
  732. package/src/note/index.ts +0 -1
  733. package/src/note/note_dao.ts +18 -13
  734. package/src/p2p/attestation_utils.ts +59 -3
  735. package/src/p2p/block_proposal.ts +211 -46
  736. package/src/p2p/{block_attestation.ts → checkpoint_attestation.ts} +36 -25
  737. package/src/p2p/checkpoint_proposal.ts +370 -0
  738. package/src/p2p/client_type.ts +0 -6
  739. package/src/p2p/consensus_payload.ts +29 -18
  740. package/src/p2p/constants.ts +6 -0
  741. package/src/p2p/gossipable.ts +14 -4
  742. package/src/p2p/index.ts +4 -2
  743. package/src/p2p/message_validator.ts +14 -2
  744. package/src/p2p/peer_error.ts +7 -0
  745. package/src/p2p/signature_utils.ts +3 -1
  746. package/src/p2p/signed_txs.ts +88 -0
  747. package/src/p2p/topic_type.ts +10 -16
  748. package/src/proofs/chonk_proof.ts +9 -5
  749. package/src/rollup/block_headers_hash.ts +1 -1
  750. package/src/rollup/block_rollup_public_inputs.ts +5 -11
  751. package/src/rollup/checkpoint_header.ts +64 -21
  752. package/src/rollup/checkpoint_rollup_public_inputs.ts +17 -5
  753. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +14 -1
  754. package/src/rollup/root_rollup_public_inputs.ts +16 -7
  755. package/src/slashing/empire.ts +3 -1
  756. package/src/slashing/helpers.ts +8 -0
  757. package/src/slashing/tally.ts +41 -2
  758. package/src/slashing/types.ts +14 -0
  759. package/src/stats/stats.ts +0 -2
  760. package/src/tests/factories.ts +124 -54
  761. package/src/tests/jest.ts +1 -1
  762. package/src/tests/mocks.ts +251 -103
  763. package/src/timetable/index.ts +66 -0
  764. package/src/trees/public_data_leaf.ts +11 -5
  765. package/src/tx/block_header.ts +18 -4
  766. package/src/tx/global_variable_builder.ts +1 -1
  767. package/src/tx/global_variables.ts +3 -3
  768. package/src/tx/index.ts +0 -1
  769. package/src/tx/indexed_tx_effect.ts +3 -2
  770. package/src/tx/private_execution_result.ts +1 -16
  771. package/src/tx/profiling.ts +51 -9
  772. package/src/tx/protocol_contracts.ts +2 -2
  773. package/src/tx/public_simulation_output.ts +4 -0
  774. package/src/tx/simulated_tx.ts +8 -1
  775. package/src/tx/tx.ts +39 -22
  776. package/src/tx/tx_effect.ts +3 -10
  777. package/src/tx/tx_execution_request.ts +2 -0
  778. package/src/tx/tx_receipt.ts +85 -18
  779. package/src/tx/tx_request.ts +2 -2
  780. package/src/tx/validator/empty_validator.ts +1 -1
  781. package/src/tx/validator/error_texts.ts +8 -1
  782. package/src/tx/validator/tx_validator.ts +1 -1
  783. package/src/update-checker/index.ts +2 -1
  784. package/src/update-checker/package_version.ts +17 -0
  785. package/src/update-checker/version_checker.ts +65 -0
  786. package/src/validators/schemas.ts +8 -1
  787. package/src/validators/types.ts +5 -4
  788. package/src/zkpassport/index.ts +11 -12
  789. package/dest/block/l2_block_code_to_purge.d.ts +0 -12
  790. package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
  791. package/dest/block/l2_block_code_to_purge.js +0 -61
  792. package/dest/block/l2_block_header.d.ts +0 -98
  793. package/dest/block/l2_block_header.d.ts.map +0 -1
  794. package/dest/block/l2_block_header.js +0 -153
  795. package/dest/block/l2_block_new.d.ts +0 -135
  796. package/dest/block/l2_block_new.d.ts.map +0 -1
  797. package/dest/block/l2_block_new.js +0 -152
  798. package/dest/contract/contract_class_metadata.d.ts +0 -8
  799. package/dest/contract/contract_class_metadata.d.ts.map +0 -1
  800. package/dest/contract/contract_class_metadata.js +0 -1
  801. package/dest/contract/contract_metadata.d.ts +0 -7
  802. package/dest/contract/contract_metadata.d.ts.map +0 -1
  803. package/dest/contract/contract_metadata.js +0 -1
  804. package/dest/database-version/index.d.ts +0 -2
  805. package/dest/database-version/index.d.ts.map +0 -1
  806. package/dest/database-version/index.js +0 -1
  807. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -25
  808. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
  809. package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
  810. package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
  811. package/dest/logs/log_with_tx_data.d.ts +0 -19
  812. package/dest/logs/log_with_tx_data.d.ts.map +0 -1
  813. package/dest/logs/log_with_tx_data.js +0 -49
  814. package/dest/note/notes_filter.d.ts +0 -27
  815. package/dest/note/notes_filter.d.ts.map +0 -1
  816. package/dest/note/notes_filter.js +0 -11
  817. package/dest/p2p/block_attestation.d.ts +0 -80
  818. package/dest/p2p/block_attestation.d.ts.map +0 -1
  819. package/dest/tx/content_commitment.d.ts +0 -49
  820. package/dest/tx/content_commitment.d.ts.map +0 -1
  821. package/dest/tx/content_commitment.js +0 -90
  822. package/dest/update-checker/update-checker.d.ts +0 -49
  823. package/dest/update-checker/update-checker.d.ts.map +0 -1
  824. package/dest/update-checker/update-checker.js +0 -130
  825. package/src/block/l2_block_code_to_purge.ts +0 -88
  826. package/src/block/l2_block_header.ts +0 -246
  827. package/src/block/l2_block_new.ts +0 -207
  828. package/src/contract/contract_class_metadata.ts +0 -8
  829. package/src/contract/contract_metadata.ts +0 -7
  830. package/src/database-version/index.ts +0 -1
  831. package/src/logs/log_with_tx_data.ts +0 -46
  832. package/src/note/notes_filter.ts +0 -38
  833. package/src/tx/content_commitment.ts +0 -113
  834. package/src/update-checker/update-checker.ts +0 -166
@@ -1,15 +1,14 @@
1
- import {
2
- ARCHIVE_HEIGHT,
3
- L1_TO_L2_MSG_TREE_HEIGHT,
4
- NOTE_HASH_TREE_HEIGHT,
5
- NULLIFIER_TREE_HEIGHT,
6
- PUBLIC_DATA_TREE_HEIGHT,
7
- } from '@aztec/constants';
1
+ import { ARCHIVE_HEIGHT, L1_TO_L2_MSG_TREE_HEIGHT, NOTE_HASH_TREE_HEIGHT } from '@aztec/constants';
8
2
  import { type L1ContractAddresses, L1ContractAddressesSchema } from '@aztec/ethereum/l1-contract-addresses';
9
3
  import {
10
4
  BlockNumber,
11
5
  BlockNumberPositiveSchema,
12
6
  BlockNumberSchema,
7
+ CheckpointNumber,
8
+ CheckpointNumberPositiveSchema,
9
+ CheckpointNumberSchema,
10
+ EpochNumber,
11
+ EpochNumberSchema,
13
12
  type SlotNumber,
14
13
  } from '@aztec/foundation/branded-types';
15
14
  import type { Fr } from '@aztec/foundation/curves/bn254';
@@ -20,11 +19,13 @@ import { MembershipWitness, SiblingPath } from '@aztec/foundation/trees';
20
19
  import { z } from 'zod';
21
20
 
22
21
  import type { AztecAddress } from '../aztec-address/index.js';
22
+ import { BlockHash } from '../block/block_hash.js';
23
23
  import { type BlockParameter, BlockParameterSchema } from '../block/block_parameter.js';
24
- import { PublishedL2Block } from '../block/checkpointed_l2_block.js';
24
+ import { CheckpointedL2Block } from '../block/checkpointed_l2_block.js';
25
25
  import { type DataInBlock, dataInBlockSchemaFor } from '../block/in_block.js';
26
26
  import { L2Block } from '../block/l2_block.js';
27
27
  import { type L2BlockSource, type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
28
+ import { PublishedCheckpoint } from '../checkpoint/published_checkpoint.js';
28
29
  import {
29
30
  type ContractClassPublic,
30
31
  ContractClassPublicSchema,
@@ -57,7 +58,7 @@ import { SingleValidatorStatsSchema, ValidatorsStatsSchema } from '../validators
57
58
  import type { SingleValidatorStats, ValidatorsStats } from '../validators/types.js';
58
59
  import { type ComponentsVersions, getVersioningResponseHandler } from '../versioning/index.js';
59
60
  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';
61
+ import { MAX_RPC_BLOCKS_LEN, MAX_RPC_CHECKPOINTS_LEN, MAX_RPC_LEN, MAX_RPC_TXS_LEN } from './api_limit.js';
61
62
  import {
62
63
  type GetContractClassLogsResponse,
63
64
  GetContractClassLogsResponseSchema,
@@ -71,7 +72,10 @@ import { type WorldStateSyncStatus, WorldStateSyncStatusSchema } from './world_s
71
72
  * We will probably implement the additional interfaces by means other than Aztec Node as it's currently a privacy leak
72
73
  */
73
74
  export interface AztecNode
74
- extends Pick<L2BlockSource, 'getBlocks' | 'getPublishedBlocks' | 'getBlockHeader' | 'getL2Tips'> {
75
+ extends Pick<
76
+ L2BlockSource,
77
+ 'getBlocks' | 'getCheckpoints' | 'getBlockHeader' | 'getL2Tips' | 'getCheckpointedBlocks'
78
+ > {
75
79
  /**
76
80
  * Returns the tips of the L2 chain.
77
81
  */
@@ -85,72 +89,31 @@ export interface AztecNode
85
89
  /**
86
90
  * Find the indexes of the given leaves in the given tree along with a block metadata pointing to the block in which
87
91
  * the leaves were inserted.
88
- * @param blockNumber - The block number at which to get the data or 'latest' for latest data.
92
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
89
93
  * @param treeId - The tree to search in.
90
94
  * @param leafValues - The values to search for.
91
95
  * @returns The indices of leaves and the block metadata of a block in which the leaves were inserted.
92
96
  */
93
97
  findLeavesIndexes(
94
- blockNumber: BlockParameter,
98
+ referenceBlock: BlockParameter,
95
99
  treeId: MerkleTreeId,
96
100
  leafValues: Fr[],
97
101
  ): Promise<(DataInBlock<bigint> | undefined)[]>;
98
102
 
99
- /**
100
- * Returns a sibling path for the given index in the nullifier tree.
101
- * @param blockNumber - The block number at which to get the data.
102
- * @param leafIndex - The index of the leaf for which the sibling path is required.
103
- * @returns The sibling path for the leaf index.
104
- */
105
- getNullifierSiblingPath(
106
- blockNumber: BlockParameter,
107
- leafIndex: bigint,
108
- ): Promise<SiblingPath<typeof NULLIFIER_TREE_HEIGHT>>;
109
-
110
- /**
111
- * 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.
113
- * @param leafIndex - The index of the leaf for which the sibling path is required.
114
- * @returns The sibling path for the leaf index.
115
- */
116
- getNoteHashSiblingPath(
117
- blockNumber: BlockParameter,
118
- leafIndex: bigint,
119
- ): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>>;
120
-
121
- /**
122
- * 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.
124
- * @param leafIndex - Index of the leaf in the tree.
125
- * @returns The sibling path.
126
- */
127
- getArchiveSiblingPath(blockNumber: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof ARCHIVE_HEIGHT>>;
128
-
129
- /**
130
- * 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.
132
- * @param leafIndex - Index of the leaf in the tree.
133
- * @returns The sibling path.
134
- */
135
- getPublicDataSiblingPath(
136
- blockNumber: BlockParameter,
137
- leafIndex: bigint,
138
- ): Promise<SiblingPath<typeof PUBLIC_DATA_TREE_HEIGHT>>;
139
-
140
103
  /**
141
104
  * 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.
105
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
143
106
  * @param nullifier - Nullifier we try to find witness for.
144
107
  * @returns The nullifier membership witness (if found).
145
108
  */
146
109
  getNullifierMembershipWitness(
147
- blockNumber: BlockParameter,
110
+ referenceBlock: BlockParameter,
148
111
  nullifier: Fr,
149
112
  ): Promise<NullifierMembershipWitness | undefined>;
150
113
 
151
114
  /**
152
115
  * 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.
116
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
154
117
  * @param nullifier - Nullifier we try to find the low nullifier witness for.
155
118
  * @returns The low nullifier membership witness (if found).
156
119
  * @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
@@ -158,83 +121,91 @@ export interface AztecNode
158
121
  * we are trying to prove non-inclusion for.
159
122
  */
160
123
  getLowNullifierMembershipWitness(
161
- blockNumber: BlockParameter,
124
+ referenceBlock: BlockParameter,
162
125
  nullifier: Fr,
163
126
  ): Promise<NullifierMembershipWitness | undefined>;
164
127
 
165
128
  /**
166
129
  * 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.
130
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
168
131
  * @param leafSlot - The leaf slot we try to find the witness for.
169
132
  * @returns The public data witness (if found).
170
133
  * @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
134
  * "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
135
  * is contained in the leaf preimage.
173
136
  */
174
- getPublicDataWitness(blockNumber: BlockParameter, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
137
+ getPublicDataWitness(referenceBlock: BlockParameter, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
175
138
 
176
139
  /**
177
- * 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.
179
- * @param archive - The archive leaf we try to find the witness for.
140
+ * Returns a membership witness for a given block hash in the archive tree.
141
+ *
142
+ * Block hashes are the leaves of the archive tree. Each time a new block is added to the chain,
143
+ * its block hash is appended as a new leaf to the archive tree. This method finds the membership
144
+ * witness (leaf index and sibling path) for a given block hash, which can be used to prove that
145
+ * a specific block exists in the chain's history.
146
+ *
147
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data
148
+ * (which contains the root of the archive tree in which we are searching for the block hash).
149
+ * @param blockHash - The block hash to find in the archive tree.
180
150
  */
181
- getArchiveMembershipWitness(
182
- blockNumber: BlockParameter,
183
- archive: Fr,
151
+ getBlockHashMembershipWitness(
152
+ referenceBlock: BlockParameter,
153
+ blockHash: BlockHash,
184
154
  ): Promise<MembershipWitness<typeof ARCHIVE_HEIGHT> | undefined>;
185
155
 
186
156
  /**
187
157
  * 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.
158
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
189
159
  * @param noteHash - The note hash we try to find the witness for.
190
160
  */
191
161
  getNoteHashMembershipWitness(
192
- blockNumber: BlockParameter,
162
+ referenceBlock: BlockParameter,
193
163
  noteHash: Fr,
194
164
  ): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT> | undefined>;
195
165
 
196
166
  /**
197
167
  * 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.
168
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
199
169
  * @param l1ToL2Message - The l1ToL2Message to get the index / sibling path for.
200
170
  * @returns A tuple of the index and the sibling path of the L1ToL2Message (undefined if not found).
201
171
  */
202
172
  getL1ToL2MessageMembershipWitness(
203
- blockNumber: BlockParameter,
173
+ referenceBlock: BlockParameter,
204
174
  l1ToL2Message: Fr,
205
175
  ): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>] | undefined>;
206
176
 
207
- /** Returns the L2 block number in which this L1 to L2 message becomes available, or undefined if not found. */
208
- getL1ToL2MessageBlock(l1ToL2Message: Fr): Promise<BlockNumber | undefined>;
177
+ /** Returns the L2 checkpoint number in which this L1 to L2 message becomes available, or undefined if not found. */
178
+ getL1ToL2MessageCheckpoint(l1ToL2Message: Fr): Promise<CheckpointNumber | undefined>;
209
179
 
210
180
  /**
211
181
  * Returns whether an L1 to L2 message is synced by archiver.
212
182
  * @param l1ToL2Message - The L1 to L2 message to check.
213
183
  * @returns Whether the message is synced.
214
- * @deprecated Use `getL1ToL2MessageBlock` instead. This method may return true even if the message is not ready to use.
184
+ * @deprecated Use `getL1ToL2MessageCheckpoint` instead. This method may return true even if the message is not ready to use.
215
185
  */
216
186
  isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
217
187
 
218
188
  /**
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).
189
+ * Returns all the L2 to L1 messages in an epoch.
190
+ * @param epoch - The epoch at which to get the data.
191
+ * @returns A nested array of the L2 to L1 messages in each tx of each block in each checkpoint in the epoch (empty
192
+ * array if the epoch is not found).
222
193
  */
223
- getL2ToL1Messages(blockNumber: BlockParameter): Promise<Fr[][] | undefined>;
194
+ getL2ToL1Messages(epoch: EpochNumber): Promise<Fr[][][][]>;
224
195
 
225
196
  /**
226
- * Get a block specified by its number.
227
- * @param number - The block number being requested.
197
+ * Get a block specified by its block number or 'latest'.
198
+ * @param blockParameter - The block parameter (block number, block hash, or 'latest').
228
199
  * @returns The requested block.
229
200
  */
230
- getBlock(number: BlockParameter): Promise<L2Block | undefined>;
201
+ getBlock(blockParameter: BlockParameter): Promise<L2Block | undefined>;
231
202
 
232
203
  /**
233
204
  * Get a block specified by its hash.
234
205
  * @param blockHash - The block hash being requested.
235
206
  * @returns The requested block.
236
207
  */
237
- getBlockByHash(blockHash: Fr): Promise<L2Block | undefined>;
208
+ getBlockByHash(blockHash: BlockHash): Promise<L2Block | undefined>;
238
209
 
239
210
  /**
240
211
  * Get a block specified by its archive root.
@@ -255,6 +226,18 @@ export interface AztecNode
255
226
  */
256
227
  getProvenBlockNumber(): Promise<BlockNumber>;
257
228
 
229
+ /**
230
+ * Fetches the latest checkpointed block number.
231
+ * @returns The block number.
232
+ */
233
+ getCheckpointedBlockNumber(): Promise<BlockNumber>;
234
+
235
+ /**
236
+ * Method to fetch the latest checkpoint number synchronized by the node.
237
+ * @returns The checkpoint number.
238
+ */
239
+ getCheckpointNumber(): Promise<CheckpointNumber>;
240
+
258
241
  /**
259
242
  * Method to determine if the node is ready to accept transactions.
260
243
  * @returns - Flag indicating the readiness for tx submission.
@@ -277,10 +260,10 @@ export interface AztecNode
277
260
  getBlocks(from: BlockNumber, limit: number): Promise<L2Block[]>;
278
261
 
279
262
  /**
280
- * Method to fetch the current base fees.
281
- * @returns The current base fees.
263
+ * Method to fetch the current min fees.
264
+ * @returns The current min fees.
282
265
  */
283
- getCurrentBaseFees(): Promise<GasFees>;
266
+ getCurrentMinFees(): Promise<GasFees>;
284
267
 
285
268
  /**
286
269
  * Method to fetch the current max priority fee of txs in the mempool.
@@ -338,16 +321,38 @@ export interface AztecNode
338
321
  getContractClassLogs(filter: LogFilter): Promise<GetContractClassLogsResponse>;
339
322
 
340
323
  /**
341
- * Gets all private logs that match any of the `tags`. For each tag, an array of matching logs is returned. An empty
324
+ * Gets private logs that match any of the `tags`. For each tag, an array of matching logs is returned. An empty
342
325
  * array implies no logs match that tag.
326
+ * @param tags - The tags to search for.
327
+ * @param page - The page number (0-indexed) for pagination.
328
+ * @param referenceBlock - Optional block hash used to ensure the block still exists before logs are retrieved.
329
+ * This block is expected to represent the latest block to which the client has synced (called anchor block in PXE).
330
+ * If specified and the block is not found, an error is thrown. This helps detect reorgs, which could result in
331
+ * undefined behavior in the client's code.
332
+ * @returns An array of log arrays, one per tag. Returns at most 10 logs per tag per page. If 10 logs are returned
333
+ * for a tag, the caller should fetch the next page to check for more logs.
343
334
  */
344
- getPrivateLogsByTags(tags: SiloedTag[]): Promise<TxScopedL2Log[][]>;
335
+ getPrivateLogsByTags(tags: SiloedTag[], page?: number, referenceBlock?: BlockHash): Promise<TxScopedL2Log[][]>;
345
336
 
346
337
  /**
347
- * Gets all public logs that match any of the `tags` from the specified contract. For each tag, an array of matching
338
+ * Gets public logs that match any of the `tags` from the specified contract. For each tag, an array of matching
348
339
  * logs is returned. An empty array implies no logs match that tag.
349
- */
350
- getPublicLogsByTagsFromContract(contractAddress: AztecAddress, tags: Tag[]): Promise<TxScopedL2Log[][]>;
340
+ * @param contractAddress - The contract address to search logs for.
341
+ * @param tags - The tags to search for.
342
+ * @param page - The page number (0-indexed) for pagination.
343
+ * @param referenceBlock - Optional block hash used to ensure the block still exists before logs are retrieved.
344
+ * This block is expected to represent the latest block to which the client has synced (called anchor block in PXE).
345
+ * If specified and the block is not found, an error is thrown. This helps detect reorgs, which could result in
346
+ * undefined behavior in the client's code.
347
+ * @returns An array of log arrays, one per tag. Returns at most 10 logs per tag per page. If 10 logs are returned
348
+ * for a tag, the caller should fetch the next page to check for more logs.
349
+ */
350
+ getPublicLogsByTagsFromContract(
351
+ contractAddress: AztecAddress,
352
+ tags: Tag[],
353
+ page?: number,
354
+ referenceBlock?: BlockHash,
355
+ ): Promise<TxScopedL2Log[][]>;
351
356
 
352
357
  /**
353
358
  * Method to submit a transaction to the p2p pool.
@@ -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 referenceBlock - 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>;
414
-
415
- /**
416
- * Returns the currently committed block header.
417
- * @returns The current committed block header.
418
- */
419
- getBlockHeader(blockNumber?: BlockParameter): Promise<BlockHeader | undefined>;
418
+ getPublicStorageAt(referenceBlock: BlockParameter, contract: AztecAddress, slot: Fr): Promise<Fr>;
420
419
 
421
420
  /**
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.
@@ -452,7 +451,7 @@ export interface AztecNode
452
451
  /**
453
452
  * Returns true if the transaction is valid for inclusion at the current state. Valid transactions can be
454
453
  * made invalid by *other* transactions if e.g. they emit the same nullifiers, or come become invalid
455
- * due to e.g. the include_by_timestamp property.
454
+ * due to e.g. the expiration_timestamp property.
456
455
  * @param tx - The transaction to validate for correctness.
457
456
  * @param isSimulation - True if the transaction is a simulated one without generated proofs. (Optional)
458
457
  * @param skipFeeEnforcement - True if the validation of the fee should be skipped. Useful when the simulation is for estimating fee (Optional)
@@ -496,26 +495,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
496
495
  .args(BlockParameterSchema, z.nativeEnum(MerkleTreeId), z.array(schemas.Fr).max(MAX_RPC_LEN))
497
496
  .returns(z.array(optional(dataInBlockSchemaFor(schemas.BigInt)))),
498
497
 
499
- getNullifierSiblingPath: z
500
- .function()
501
- .args(BlockParameterSchema, schemas.BigInt)
502
- .returns(SiblingPath.schemaFor(NULLIFIER_TREE_HEIGHT)),
503
-
504
- getNoteHashSiblingPath: z
505
- .function()
506
- .args(BlockParameterSchema, schemas.BigInt)
507
- .returns(SiblingPath.schemaFor(NOTE_HASH_TREE_HEIGHT)),
508
-
509
- getArchiveSiblingPath: z
510
- .function()
511
- .args(BlockParameterSchema, schemas.BigInt)
512
- .returns(SiblingPath.schemaFor(ARCHIVE_HEIGHT)),
513
-
514
- getPublicDataSiblingPath: z
515
- .function()
516
- .args(BlockParameterSchema, schemas.BigInt)
517
- .returns(SiblingPath.schemaFor(PUBLIC_DATA_TREE_HEIGHT)),
518
-
519
498
  getNullifierMembershipWitness: z
520
499
  .function()
521
500
  .args(BlockParameterSchema, schemas.Fr)
@@ -531,9 +510,9 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
531
510
  .args(BlockParameterSchema, schemas.Fr)
532
511
  .returns(PublicDataWitness.schema.optional()),
533
512
 
534
- getArchiveMembershipWitness: z
513
+ getBlockHashMembershipWitness: z
535
514
  .function()
536
- .args(BlockParameterSchema, schemas.Fr)
515
+ .args(BlockParameterSchema, BlockHash.schema)
537
516
  .returns(MembershipWitness.schemaFor(ARCHIVE_HEIGHT).optional()),
538
517
 
539
518
  getNoteHashMembershipWitness: z
@@ -546,25 +525,29 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
546
525
  .args(BlockParameterSchema, schemas.Fr)
547
526
  .returns(z.tuple([schemas.BigInt, SiblingPath.schemaFor(L1_TO_L2_MSG_TREE_HEIGHT)]).optional()),
548
527
 
549
- getL1ToL2MessageBlock: z.function().args(schemas.Fr).returns(BlockNumberSchema.optional()),
528
+ getL1ToL2MessageCheckpoint: z.function().args(schemas.Fr).returns(CheckpointNumberSchema.optional()),
550
529
 
551
530
  isL1ToL2MessageSynced: z.function().args(schemas.Fr).returns(z.boolean()),
552
531
 
553
532
  getL2ToL1Messages: z
554
533
  .function()
555
- .args(BlockParameterSchema)
556
- .returns(z.array(z.array(schemas.Fr)).optional()),
534
+ .args(EpochNumberSchema)
535
+ .returns(z.array(z.array(z.array(z.array(schemas.Fr))))),
557
536
 
558
537
  getBlock: z.function().args(BlockParameterSchema).returns(L2Block.schema.optional()),
559
538
 
560
- getBlockByHash: z.function().args(schemas.Fr).returns(L2Block.schema.optional()),
539
+ getBlockByHash: z.function().args(BlockHash.schema).returns(L2Block.schema.optional()),
561
540
 
562
541
  getBlockByArchive: z.function().args(schemas.Fr).returns(L2Block.schema.optional()),
563
542
 
564
543
  getBlockNumber: z.function().returns(BlockNumberSchema),
565
544
 
545
+ getCheckpointNumber: z.function().returns(CheckpointNumberSchema),
546
+
566
547
  getProvenBlockNumber: z.function().returns(BlockNumberSchema),
567
548
 
549
+ getCheckpointedBlockNumber: z.function().returns(BlockNumberSchema),
550
+
568
551
  isReady: z.function().returns(z.boolean()),
569
552
 
570
553
  getNodeInfo: z.function().returns(NodeInfoSchema),
@@ -574,12 +557,17 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
574
557
  .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
575
558
  .returns(z.array(L2Block.schema)),
576
559
 
577
- getPublishedBlocks: z
560
+ getCheckpoints: z
561
+ .function()
562
+ .args(CheckpointNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_CHECKPOINTS_LEN))
563
+ .returns(z.array(PublishedCheckpoint.schema)),
564
+
565
+ getCheckpointedBlocks: z
578
566
  .function()
579
567
  .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
580
- .returns(z.array(PublishedL2Block.schema)),
568
+ .returns(z.array(CheckpointedL2Block.schema)),
581
569
 
582
- getCurrentBaseFees: z.function().returns(GasFees.schema),
570
+ getCurrentMinFees: z.function().returns(GasFees.schema),
583
571
 
584
572
  getMaxPriorityFees: z.function().returns(GasFees.schema),
585
573
 
@@ -604,12 +592,17 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
604
592
 
605
593
  getPrivateLogsByTags: z
606
594
  .function()
607
- .args(z.array(SiloedTag.schema).max(MAX_RPC_LEN))
595
+ .args(z.array(SiloedTag.schema).max(MAX_RPC_LEN), optional(z.number().gte(0)), optional(BlockHash.schema))
608
596
  .returns(z.array(z.array(TxScopedL2Log.schema))),
609
597
 
610
598
  getPublicLogsByTagsFromContract: z
611
599
  .function()
612
- .args(schemas.AztecAddress, z.array(Tag.schema).max(MAX_RPC_LEN))
600
+ .args(
601
+ schemas.AztecAddress,
602
+ z.array(Tag.schema).max(MAX_RPC_LEN),
603
+ optional(z.number().gte(0)),
604
+ optional(BlockHash.schema),
605
+ )
613
606
  .returns(z.array(z.array(TxScopedL2Log.schema))),
614
607
 
615
608
  sendTx: z.function().args(Tx.schema).returns(z.void()),
@@ -633,8 +626,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
633
626
 
634
627
  getBlockHeader: z.function().args(optional(BlockParameterSchema)).returns(BlockHeader.schema.optional()),
635
628
 
636
- getBlockHeaderByHash: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
637
-
638
629
  getBlockHeaderByArchive: z.function().args(schemas.Fr).returns(BlockHeader.schema.optional()),
639
630
 
640
631
  getValidatorsStats: z.function().returns(ValidatorsStatsSchema),
@@ -1,17 +1,17 @@
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';
3
+ import type { LoggerBindings } from '@aztec/foundation/log';
4
4
 
5
5
  import type { L2Block } from '../block/l2_block.js';
6
6
  import type { ChainConfig, SequencerConfig } from '../config/chain-config.js';
7
7
  import type { L1RollupConstants } from '../epoch-helpers/index.js';
8
8
  import type { Gas } from '../gas/gas.js';
9
- import type { MerkleTreeWriteOperations } from '../trees/index.js';
10
9
  import type { BlockHeader } from '../tx/block_header.js';
11
- import type { GlobalVariables } from '../tx/global_variables.js';
10
+ import type { CheckpointGlobalVariables, GlobalVariables } from '../tx/global_variables.js';
12
11
  import type { FailedTx, ProcessedTx } from '../tx/processed_tx.js';
13
12
  import { Tx } from '../tx/tx.js';
14
13
  import type { TxValidator } from '../tx/validator/tx_validator.js';
14
+ import type { MerkleTreeWriteOperations } from './merkle_tree_operations.js';
15
15
  import type { ProcessedTxHandler } from './processed-tx-handler.js';
16
16
 
17
17
  /** The interface to a block builder. Generates an L2 block out of a set of processed txs. */
@@ -36,54 +36,92 @@ export interface IBlockFactory extends ProcessedTxHandler {
36
36
  }
37
37
 
38
38
  export interface PublicProcessorLimits {
39
+ /** Maximum number of txs to process. */
39
40
  maxTransactions?: number;
40
- maxBlockSize?: number;
41
+ /** L2 and DA gas limits. */
41
42
  maxBlockGas?: Gas;
43
+ /** Maximum number of blob fields allowed. */
42
44
  maxBlobFields?: number;
45
+ /** Deadline for processing the txs. Processor will stop as soon as it hits this time. */
43
46
  deadline?: Date;
47
+ /** Whether this processor is building a proposal (as opposed to re-executing one). Skipping txs due to gas or blob limits is only done during proposal building. */
48
+ isBuildingProposal?: boolean;
44
49
  }
45
50
 
46
51
  export interface PublicProcessorValidator {
47
52
  preprocessValidator?: TxValidator<Tx>;
48
53
  nullifierCache?: { addNullifiers: (nullifiers: Buffer[]) => void };
49
54
  }
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
55
 
61
56
  export type FullNodeBlockBuilderConfig = Pick<L1RollupConstants, 'l1GenesisTime' | 'slotDuration'> &
62
57
  Pick<ChainConfig, 'l1ChainId' | 'rollupVersion'> &
63
- Pick<SequencerConfig, 'txPublicSetupAllowList' | 'fakeProcessingDelayPerTxMs' | 'fakeThrowAfterProcessingTxCount'>;
58
+ Pick<
59
+ SequencerConfig,
60
+ | 'txPublicSetupAllowListExtend'
61
+ | 'fakeProcessingDelayPerTxMs'
62
+ | 'fakeThrowAfterProcessingTxCount'
63
+ | 'maxTxsPerBlock'
64
+ | 'maxTxsPerCheckpoint'
65
+ | 'maxL2BlockGas'
66
+ | 'maxDABlockGas'
67
+ > & {
68
+ /** Total L2 gas (mana) allowed per checkpoint. Fetched from L1 getManaLimit(). */
69
+ rollupManaLimit: number;
70
+ };
64
71
 
65
72
  export const FullNodeBlockBuilderConfigKeys: (keyof FullNodeBlockBuilderConfig)[] = [
66
73
  'l1GenesisTime',
67
74
  'slotDuration',
68
75
  'l1ChainId',
69
76
  'rollupVersion',
70
- 'txPublicSetupAllowList',
77
+ 'txPublicSetupAllowListExtend',
71
78
  'fakeProcessingDelayPerTxMs',
72
79
  'fakeThrowAfterProcessingTxCount',
80
+ 'maxTxsPerBlock',
81
+ 'maxTxsPerCheckpoint',
82
+ 'maxL2BlockGas',
83
+ 'maxDABlockGas',
84
+ 'rollupManaLimit',
73
85
  ] as const;
74
86
 
75
- export interface IFullNodeBlockBuilder {
76
- getConfig(): FullNodeBlockBuilderConfig;
87
+ /** Thrown when no valid transactions are available to include in a block after processing, and this is not the first block in a checkpoint. */
88
+ export class NoValidTxsError extends Error {
89
+ constructor(public readonly failedTxs: FailedTx[]) {
90
+ super('No valid transactions to include in block');
91
+ this.name = 'NoValidTxsError';
92
+ }
93
+ }
77
94
 
78
- updateConfig(config: Partial<FullNodeBlockBuilderConfig>): void;
95
+ /** Result of building a block within a checkpoint. */
96
+ export type BuildBlockInCheckpointResult = {
97
+ block: L2Block;
98
+ publicProcessorDuration: number;
99
+ numTxs: number;
100
+ failedTxs: FailedTx[];
101
+ usedTxs: Tx[];
102
+ };
79
103
 
104
+ /** Interface for building blocks within a checkpoint context. */
105
+ export interface ICheckpointBlockBuilder {
80
106
  buildBlock(
81
- txs: Iterable<Tx> | AsyncIterable<Tx>,
82
- l1ToL2Messages: Fr[],
83
- globalVariables: GlobalVariables,
84
- options: PublicProcessorLimits,
85
- fork?: MerkleTreeWriteOperations,
86
- ): Promise<BuildBlockResult>;
107
+ pendingTxs: Iterable<Tx> | AsyncIterable<Tx>,
108
+ blockNumber: BlockNumber,
109
+ timestamp: bigint,
110
+ opts: PublicProcessorLimits,
111
+ ): Promise<BuildBlockInCheckpointResult>;
112
+ }
87
113
 
114
+ /** Interface for creating checkpoint builders. */
115
+ export interface ICheckpointsBuilder {
88
116
  getFork(blockNumber: BlockNumber): Promise<MerkleTreeWriteOperations>;
117
+
118
+ startCheckpoint(
119
+ checkpointNumber: CheckpointNumber,
120
+ constants: CheckpointGlobalVariables,
121
+ feeAssetPriceModifier: bigint,
122
+ l1ToL2Messages: Fr[],
123
+ previousCheckpointOutHashes: Fr[],
124
+ fork: MerkleTreeWriteOperations,
125
+ bindings?: LoggerBindings,
126
+ ): Promise<ICheckpointBlockBuilder>;
89
127
  }