@aztec/stdlib 0.0.1-commit.d431d1c → 0.0.1-commit.dbf9cec

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 (455) hide show
  1. package/dest/abi/decoder.d.ts +1 -1
  2. package/dest/abi/decoder.d.ts.map +1 -1
  3. package/dest/abi/decoder.js +1 -4
  4. package/dest/abi/encoder.d.ts +1 -1
  5. package/dest/abi/encoder.d.ts.map +1 -1
  6. package/dest/abi/encoder.js +9 -5
  7. package/dest/abi/function_call.d.ts +39 -9
  8. package/dest/abi/function_call.d.ts.map +1 -1
  9. package/dest/abi/function_call.js +20 -3
  10. package/dest/auth_witness/auth_witness.js +3 -3
  11. package/dest/avm/avm.d.ts +300 -300
  12. package/dest/avm/avm_proving_request.d.ts +166 -166
  13. package/dest/avm/revert_code.d.ts +16 -1
  14. package/dest/avm/revert_code.d.ts.map +1 -1
  15. package/dest/avm/revert_code.js +15 -5
  16. package/dest/block/block_data.d.ts +52 -0
  17. package/dest/block/block_data.d.ts.map +1 -0
  18. package/dest/block/block_data.js +12 -0
  19. package/dest/block/block_hash.d.ts +16 -18
  20. package/dest/block/block_hash.d.ts.map +1 -1
  21. package/dest/block/block_hash.js +21 -31
  22. package/dest/block/block_parameter.d.ts +4 -4
  23. package/dest/block/block_parameter.d.ts.map +1 -1
  24. package/dest/block/block_parameter.js +2 -2
  25. package/dest/block/checkpointed_l2_block.d.ts +6 -6
  26. package/dest/block/checkpointed_l2_block.d.ts.map +1 -1
  27. package/dest/block/checkpointed_l2_block.js +3 -3
  28. package/dest/block/in_block.d.ts +11 -11
  29. package/dest/block/in_block.d.ts.map +1 -1
  30. package/dest/block/in_block.js +5 -5
  31. package/dest/block/index.d.ts +3 -2
  32. package/dest/block/index.d.ts.map +1 -1
  33. package/dest/block/index.js +2 -1
  34. package/dest/block/{l2_block_new.d.ts → l2_block.d.ts} +8 -7
  35. package/dest/block/l2_block.d.ts.map +1 -0
  36. package/dest/block/{l2_block_new.js → l2_block.js} +5 -9
  37. package/dest/block/l2_block_source.d.ts +58 -30
  38. package/dest/block/l2_block_source.d.ts.map +1 -1
  39. package/dest/block/l2_block_stream/interfaces.d.ts +3 -3
  40. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  41. package/dest/block/l2_block_stream/l2_block_stream.d.ts +2 -3
  42. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  43. package/dest/block/l2_block_stream/l2_block_stream.js +14 -4
  44. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +3 -3
  45. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
  46. package/dest/block/test/l2_tips_store_test_suite.js +2 -2
  47. package/dest/checkpoint/checkpoint.d.ts +27 -13
  48. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  49. package/dest/checkpoint/checkpoint.js +27 -16
  50. package/dest/checkpoint/checkpoint_data.d.ts +120 -0
  51. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
  52. package/dest/checkpoint/checkpoint_data.js +26 -0
  53. package/dest/checkpoint/index.d.ts +2 -1
  54. package/dest/checkpoint/index.d.ts.map +1 -1
  55. package/dest/checkpoint/index.js +1 -0
  56. package/dest/checkpoint/published_checkpoint.d.ts +19 -4
  57. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  58. package/dest/checkpoint/published_checkpoint.js +1 -2
  59. package/dest/config/index.d.ts +2 -1
  60. package/dest/config/index.d.ts.map +1 -1
  61. package/dest/config/index.js +1 -0
  62. package/dest/config/node-rpc-config.js +1 -1
  63. package/dest/config/sequencer-config.d.ts +10 -0
  64. package/dest/config/sequencer-config.d.ts.map +1 -0
  65. package/dest/config/sequencer-config.js +18 -0
  66. package/dest/contract/contract_address.js +4 -4
  67. package/dest/contract/contract_class.d.ts +2 -3
  68. package/dest/contract/contract_class.d.ts.map +1 -1
  69. package/dest/contract/contract_class_id.d.ts +2 -2
  70. package/dest/contract/contract_class_id.d.ts.map +1 -1
  71. package/dest/contract/contract_class_id.js +6 -5
  72. package/dest/contract/interfaces/node-info.d.ts +3 -1
  73. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  74. package/dest/contract/interfaces/node-info.js +2 -1
  75. package/dest/contract/private_function.d.ts +1 -1
  76. package/dest/contract/private_function.d.ts.map +1 -1
  77. package/dest/contract/private_function.js +3 -4
  78. package/dest/contract/private_function_membership_proof.d.ts +1 -1
  79. package/dest/contract/private_function_membership_proof.js +1 -1
  80. package/dest/database-version/database_version.d.ts +58 -0
  81. package/dest/database-version/database_version.d.ts.map +1 -0
  82. package/dest/database-version/database_version.js +69 -0
  83. package/dest/database-version/version_manager.d.ts +2 -50
  84. package/dest/database-version/version_manager.d.ts.map +1 -1
  85. package/dest/database-version/version_manager.js +1 -66
  86. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +2 -2
  87. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
  88. package/dest/delayed_public_mutable/delayed_public_mutable_values.js +7 -10
  89. package/dest/epoch-helpers/index.d.ts +7 -1
  90. package/dest/epoch-helpers/index.d.ts.map +1 -1
  91. package/dest/epoch-helpers/index.js +9 -3
  92. package/dest/file-store/local.d.ts +3 -3
  93. package/dest/file-store/local.d.ts.map +1 -1
  94. package/dest/file-store/local.js +13 -4
  95. package/dest/file-store/s3.d.ts +1 -1
  96. package/dest/file-store/s3.d.ts.map +1 -1
  97. package/dest/file-store/s3.js +11 -3
  98. package/dest/ha-signing/config.d.ts +101 -0
  99. package/dest/ha-signing/config.d.ts.map +1 -0
  100. package/dest/ha-signing/config.js +92 -0
  101. package/dest/ha-signing/index.d.ts +3 -0
  102. package/dest/ha-signing/index.d.ts.map +1 -0
  103. package/dest/ha-signing/index.js +2 -0
  104. package/dest/ha-signing/types.d.ts +85 -0
  105. package/dest/ha-signing/types.d.ts.map +1 -0
  106. package/dest/ha-signing/types.js +32 -0
  107. package/dest/hash/hash.d.ts +2 -1
  108. package/dest/hash/hash.d.ts.map +1 -1
  109. package/dest/hash/hash.js +16 -10
  110. package/dest/hash/map_slot.d.ts +1 -1
  111. package/dest/hash/map_slot.d.ts.map +1 -1
  112. package/dest/hash/map_slot.js +4 -3
  113. package/dest/interfaces/archiver.d.ts +1 -1
  114. package/dest/interfaces/archiver.d.ts.map +1 -1
  115. package/dest/interfaces/archiver.js +22 -16
  116. package/dest/interfaces/aztec-node-admin.d.ts +49 -3
  117. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  118. package/dest/interfaces/aztec-node-admin.js +12 -4
  119. package/dest/interfaces/aztec-node.d.ts +51 -58
  120. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  121. package/dest/interfaces/aztec-node.js +13 -17
  122. package/dest/interfaces/block-builder.d.ts +13 -7
  123. package/dest/interfaces/block-builder.d.ts.map +1 -1
  124. package/dest/interfaces/block-builder.js +7 -0
  125. package/dest/interfaces/configs.d.ts +18 -3
  126. package/dest/interfaces/configs.d.ts.map +1 -1
  127. package/dest/interfaces/configs.js +4 -1
  128. package/dest/interfaces/get_logs_response.d.ts +15 -8
  129. package/dest/interfaces/get_logs_response.d.ts.map +1 -1
  130. package/dest/interfaces/merkle_tree_operations.d.ts +2 -2
  131. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  132. package/dest/interfaces/p2p.d.ts +4 -9
  133. package/dest/interfaces/p2p.d.ts.map +1 -1
  134. package/dest/interfaces/prover-broker.d.ts +16 -1
  135. package/dest/interfaces/prover-broker.d.ts.map +1 -1
  136. package/dest/interfaces/prover-broker.js +4 -1
  137. package/dest/interfaces/prover-client.d.ts +15 -1
  138. package/dest/interfaces/prover-client.d.ts.map +1 -1
  139. package/dest/interfaces/prover-client.js +12 -1
  140. package/dest/interfaces/proving-job.d.ts +202 -202
  141. package/dest/interfaces/slasher.d.ts +9 -1
  142. package/dest/interfaces/slasher.d.ts.map +1 -1
  143. package/dest/interfaces/slasher.js +2 -0
  144. package/dest/interfaces/tx_provider.d.ts +3 -3
  145. package/dest/interfaces/tx_provider.d.ts.map +1 -1
  146. package/dest/interfaces/validator.d.ts +52 -6
  147. package/dest/interfaces/validator.d.ts.map +1 -1
  148. package/dest/interfaces/validator.js +5 -2
  149. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +3 -3
  150. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
  151. package/dest/kernel/hints/build_note_hash_read_request_hints.js +13 -10
  152. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +4 -4
  153. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  154. package/dest/kernel/hints/build_nullifier_read_request_hints.js +16 -15
  155. package/dest/kernel/hints/build_transient_data_hints.d.ts +5 -2
  156. package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
  157. package/dest/kernel/hints/build_transient_data_hints.js +9 -3
  158. package/dest/kernel/hints/index.d.ts +2 -2
  159. package/dest/kernel/hints/index.js +2 -2
  160. package/dest/kernel/hints/key_validation_request_and_separator.d.ts +24 -0
  161. package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
  162. package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +12 -15
  163. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +8 -8
  164. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
  165. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
  166. package/dest/kernel/private_circuit_public_inputs.d.ts +9 -9
  167. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  168. package/dest/kernel/private_circuit_public_inputs.js +16 -16
  169. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +3 -3
  170. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  171. package/dest/kernel/private_kernel_circuit_public_inputs.js +4 -4
  172. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +3 -3
  173. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
  174. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
  175. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +3 -3
  176. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  177. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +7 -7
  178. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +3 -3
  179. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  180. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -7
  181. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +3 -3
  182. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  183. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -7
  184. package/dest/kernel/private_validation_requests.d.ts +3 -3
  185. package/dest/kernel/private_validation_requests.js +9 -9
  186. package/dest/keys/derivation.d.ts +3 -3
  187. package/dest/keys/derivation.js +15 -15
  188. package/dest/keys/key_types.d.ts +3 -3
  189. package/dest/keys/key_types.d.ts.map +1 -1
  190. package/dest/keys/public_keys.js +2 -2
  191. package/dest/keys/utils.d.ts +1 -1
  192. package/dest/keys/utils.d.ts.map +1 -1
  193. package/dest/keys/utils.js +8 -4
  194. package/dest/l1-contracts/slash_factory.d.ts +1 -1
  195. package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
  196. package/dest/l1-contracts/slash_factory.js +1 -0
  197. package/dest/logs/debug_log_store.d.ts +30 -0
  198. package/dest/logs/debug_log_store.d.ts.map +1 -0
  199. package/dest/logs/debug_log_store.js +30 -0
  200. package/dest/logs/extended_directional_app_tagging_secret.d.ts +47 -0
  201. package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +1 -0
  202. package/dest/logs/{directional_app_tagging_secret.js → extended_directional_app_tagging_secret.js} +23 -15
  203. package/dest/logs/extended_public_log.d.ts +13 -7
  204. package/dest/logs/extended_public_log.d.ts.map +1 -1
  205. package/dest/logs/index.d.ts +3 -2
  206. package/dest/logs/index.d.ts.map +1 -1
  207. package/dest/logs/index.js +2 -1
  208. package/dest/logs/log_id.d.ts +17 -14
  209. package/dest/logs/log_id.d.ts.map +1 -1
  210. package/dest/logs/log_id.js +20 -17
  211. package/dest/logs/pre_tag.d.ts +16 -11
  212. package/dest/logs/pre_tag.d.ts.map +1 -1
  213. package/dest/logs/pre_tag.js +2 -2
  214. package/dest/logs/private_log.d.ts +2 -2
  215. package/dest/logs/private_log.d.ts.map +1 -1
  216. package/dest/logs/siloed_tag.d.ts +5 -3
  217. package/dest/logs/siloed_tag.d.ts.map +1 -1
  218. package/dest/logs/siloed_tag.js +8 -6
  219. package/dest/logs/tag.js +1 -1
  220. package/dest/messaging/l2_to_l1_membership.d.ts +2 -2
  221. package/dest/messaging/l2_to_l1_membership.js +3 -3
  222. package/dest/note/index.d.ts +1 -2
  223. package/dest/note/index.d.ts.map +1 -1
  224. package/dest/note/index.js +0 -1
  225. package/dest/p2p/attestation_utils.d.ts +11 -1
  226. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  227. package/dest/p2p/attestation_utils.js +45 -0
  228. package/dest/p2p/block_proposal.d.ts +14 -7
  229. package/dest/p2p/block_proposal.d.ts.map +1 -1
  230. package/dest/p2p/block_proposal.js +3 -5
  231. package/dest/p2p/checkpoint_attestation.d.ts +2 -1
  232. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  233. package/dest/p2p/checkpoint_attestation.js +1 -1
  234. package/dest/p2p/checkpoint_proposal.d.ts +27 -8
  235. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  236. package/dest/p2p/checkpoint_proposal.js +30 -16
  237. package/dest/p2p/client_type.d.ts +2 -5
  238. package/dest/p2p/client_type.d.ts.map +1 -1
  239. package/dest/p2p/client_type.js +0 -7
  240. package/dest/p2p/consensus_payload.d.ts +12 -3
  241. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  242. package/dest/p2p/consensus_payload.js +22 -15
  243. package/dest/p2p/constants.d.ts +3 -1
  244. package/dest/p2p/constants.d.ts.map +1 -1
  245. package/dest/p2p/constants.js +1 -0
  246. package/dest/p2p/index.d.ts +1 -2
  247. package/dest/p2p/index.d.ts.map +1 -1
  248. package/dest/p2p/index.js +0 -1
  249. package/dest/p2p/message_validator.d.ts +18 -3
  250. package/dest/p2p/message_validator.d.ts.map +1 -1
  251. package/dest/p2p/message_validator.js +2 -1
  252. package/dest/p2p/topic_type.d.ts +3 -4
  253. package/dest/p2p/topic_type.d.ts.map +1 -1
  254. package/dest/p2p/topic_type.js +7 -24
  255. package/dest/rollup/checkpoint_header.d.ts +2 -2
  256. package/dest/rollup/checkpoint_header.js +2 -2
  257. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +6 -6
  258. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  259. package/dest/rollup/checkpoint_rollup_public_inputs.js +2 -2
  260. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +2 -2
  261. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  262. package/dest/rollup/root_rollup_public_inputs.d.ts +6 -6
  263. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  264. package/dest/rollup/root_rollup_public_inputs.js +3 -3
  265. package/dest/slashing/empire.d.ts +1 -1
  266. package/dest/slashing/empire.d.ts.map +1 -1
  267. package/dest/slashing/empire.js +2 -0
  268. package/dest/slashing/helpers.d.ts +2 -2
  269. package/dest/slashing/helpers.d.ts.map +1 -1
  270. package/dest/slashing/helpers.js +6 -0
  271. package/dest/slashing/tally.d.ts +2 -1
  272. package/dest/slashing/tally.d.ts.map +1 -1
  273. package/dest/slashing/tally.js +6 -2
  274. package/dest/slashing/types.d.ts +7 -3
  275. package/dest/slashing/types.d.ts.map +1 -1
  276. package/dest/slashing/types.js +13 -1
  277. package/dest/stats/stats.d.ts +1 -3
  278. package/dest/stats/stats.d.ts.map +1 -1
  279. package/dest/tests/factories.d.ts +3 -1
  280. package/dest/tests/factories.d.ts.map +1 -1
  281. package/dest/tests/factories.js +22 -14
  282. package/dest/tests/jest.d.ts +4 -4
  283. package/dest/tests/jest.js +9 -9
  284. package/dest/tests/mocks.d.ts +19 -11
  285. package/dest/tests/mocks.d.ts.map +1 -1
  286. package/dest/tests/mocks.js +37 -26
  287. package/dest/timetable/index.d.ts +37 -0
  288. package/dest/timetable/index.d.ts.map +1 -0
  289. package/dest/timetable/index.js +39 -0
  290. package/dest/trees/public_data_leaf.d.ts +2 -1
  291. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  292. package/dest/trees/public_data_leaf.js +7 -6
  293. package/dest/tx/block_header.d.ts +3 -2
  294. package/dest/tx/block_header.d.ts.map +1 -1
  295. package/dest/tx/block_header.js +4 -3
  296. package/dest/tx/global_variables.d.ts +4 -4
  297. package/dest/tx/global_variables.d.ts.map +1 -1
  298. package/dest/tx/in_tx.d.ts +3 -3
  299. package/dest/tx/indexed_tx_effect.d.ts +5 -5
  300. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  301. package/dest/tx/indexed_tx_effect.js +3 -2
  302. package/dest/tx/profiling.d.ts +4 -4
  303. package/dest/tx/profiling.d.ts.map +1 -1
  304. package/dest/tx/profiling.js +3 -3
  305. package/dest/tx/protocol_contracts.d.ts +1 -1
  306. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  307. package/dest/tx/protocol_contracts.js +2 -2
  308. package/dest/tx/public_simulation_output.d.ts +4 -2
  309. package/dest/tx/public_simulation_output.d.ts.map +1 -1
  310. package/dest/tx/public_simulation_output.js +7 -3
  311. package/dest/tx/tx_receipt.d.ts +57 -15
  312. package/dest/tx/tx_receipt.d.ts.map +1 -1
  313. package/dest/tx/tx_receipt.js +55 -16
  314. package/dest/tx/tx_request.js +2 -2
  315. package/dest/tx/validator/empty_validator.d.ts +2 -2
  316. package/dest/tx/validator/empty_validator.d.ts.map +1 -1
  317. package/dest/tx/validator/error_texts.d.ts +1 -1
  318. package/dest/tx/validator/error_texts.js +1 -1
  319. package/dest/tx/validator/tx_validator.d.ts +2 -2
  320. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  321. package/dest/validators/schemas.d.ts +30 -30
  322. package/dest/validators/schemas.d.ts.map +1 -1
  323. package/dest/validators/schemas.js +4 -3
  324. package/dest/validators/types.d.ts +3 -3
  325. package/dest/validators/types.d.ts.map +1 -1
  326. package/package.json +25 -13
  327. package/src/abi/decoder.ts +1 -4
  328. package/src/abi/encoder.ts +8 -5
  329. package/src/abi/function_call.ts +25 -3
  330. package/src/auth_witness/auth_witness.ts +3 -3
  331. package/src/avm/revert_code.ts +15 -0
  332. package/src/block/block_data.ts +26 -0
  333. package/src/block/block_hash.ts +26 -47
  334. package/src/block/block_parameter.ts +3 -3
  335. package/src/block/checkpointed_l2_block.ts +4 -4
  336. package/src/block/in_block.ts +8 -8
  337. package/src/block/index.ts +2 -1
  338. package/src/block/{l2_block_new.ts → l2_block.ts} +8 -12
  339. package/src/block/l2_block_source.ts +62 -31
  340. package/src/block/l2_block_stream/interfaces.ts +2 -2
  341. package/src/block/l2_block_stream/l2_block_stream.ts +26 -6
  342. package/src/block/l2_block_stream/l2_tips_store_base.ts +2 -2
  343. package/src/block/test/l2_tips_store_test_suite.ts +4 -4
  344. package/src/checkpoint/checkpoint.ts +38 -20
  345. package/src/checkpoint/checkpoint_data.ts +51 -0
  346. package/src/checkpoint/index.ts +1 -0
  347. package/src/checkpoint/published_checkpoint.ts +3 -1
  348. package/src/config/index.ts +1 -0
  349. package/src/config/node-rpc-config.ts +1 -1
  350. package/src/config/sequencer-config.ts +29 -0
  351. package/src/contract/contract_address.ts +4 -4
  352. package/src/contract/contract_class.ts +3 -3
  353. package/src/contract/contract_class_id.ts +6 -5
  354. package/src/contract/interfaces/node-info.ts +3 -0
  355. package/src/contract/private_function.ts +3 -4
  356. package/src/contract/private_function_membership_proof.ts +1 -1
  357. package/src/database-version/database_version.ts +87 -0
  358. package/src/database-version/version_manager.ts +1 -77
  359. package/src/delayed_public_mutable/delayed_public_mutable_values.ts +9 -10
  360. package/src/epoch-helpers/index.ts +13 -1
  361. package/src/file-store/local.ts +15 -5
  362. package/src/file-store/s3.ts +12 -3
  363. package/src/ha-signing/config.ts +149 -0
  364. package/src/ha-signing/index.ts +18 -0
  365. package/src/ha-signing/types.ts +112 -0
  366. package/src/hash/hash.ts +14 -10
  367. package/src/hash/map_slot.ts +3 -2
  368. package/src/interfaces/archiver.ts +22 -25
  369. package/src/interfaces/aztec-node-admin.ts +26 -2
  370. package/src/interfaces/aztec-node.ts +73 -117
  371. package/src/interfaces/block-builder.ts +16 -5
  372. package/src/interfaces/configs.ts +13 -4
  373. package/src/interfaces/merkle_tree_operations.ts +1 -1
  374. package/src/interfaces/p2p.ts +3 -14
  375. package/src/interfaces/prover-broker.ts +22 -0
  376. package/src/interfaces/prover-client.ts +22 -0
  377. package/src/interfaces/slasher.ts +4 -0
  378. package/src/interfaces/tx_provider.ts +2 -2
  379. package/src/interfaces/validator.ts +14 -6
  380. package/src/kernel/hints/build_note_hash_read_request_hints.ts +14 -18
  381. package/src/kernel/hints/build_nullifier_read_request_hints.ts +16 -28
  382. package/src/kernel/hints/build_transient_data_hints.ts +17 -2
  383. package/src/kernel/hints/index.ts +2 -2
  384. package/src/kernel/hints/{key_validation_request_and_generator.ts → key_validation_request_and_separator.ts} +12 -15
  385. package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +10 -10
  386. package/src/kernel/private_circuit_public_inputs.ts +14 -14
  387. package/src/kernel/private_kernel_circuit_public_inputs.ts +2 -2
  388. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
  389. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +5 -5
  390. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +5 -5
  391. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +5 -5
  392. package/src/kernel/private_validation_requests.ts +8 -8
  393. package/src/keys/derivation.ts +15 -15
  394. package/src/keys/key_types.ts +6 -2
  395. package/src/keys/public_keys.ts +2 -2
  396. package/src/keys/utils.ts +8 -4
  397. package/src/l1-contracts/slash_factory.ts +1 -0
  398. package/src/logs/debug_log_store.ts +54 -0
  399. package/src/logs/{directional_app_tagging_secret.ts → extended_directional_app_tagging_secret.ts} +24 -16
  400. package/src/logs/index.ts +2 -1
  401. package/src/logs/log_id.ts +22 -18
  402. package/src/logs/pre_tag.ts +5 -5
  403. package/src/logs/siloed_tag.ts +10 -4
  404. package/src/logs/tag.ts +1 -1
  405. package/src/messaging/l2_to_l1_membership.ts +3 -3
  406. package/src/note/index.ts +0 -1
  407. package/src/p2p/attestation_utils.ts +56 -0
  408. package/src/p2p/block_proposal.ts +13 -8
  409. package/src/p2p/checkpoint_attestation.ts +6 -1
  410. package/src/p2p/checkpoint_proposal.ts +55 -16
  411. package/src/p2p/client_type.ts +0 -6
  412. package/src/p2p/consensus_payload.ts +25 -12
  413. package/src/p2p/constants.ts +3 -0
  414. package/src/p2p/index.ts +0 -1
  415. package/src/p2p/message_validator.ts +14 -2
  416. package/src/p2p/topic_type.ts +8 -15
  417. package/src/rollup/checkpoint_header.ts +2 -2
  418. package/src/rollup/checkpoint_rollup_public_inputs.ts +5 -5
  419. package/src/rollup/root_rollup_public_inputs.ts +7 -7
  420. package/src/slashing/empire.ts +3 -1
  421. package/src/slashing/helpers.ts +8 -0
  422. package/src/slashing/tally.ts +8 -2
  423. package/src/slashing/types.ts +14 -0
  424. package/src/stats/stats.ts +0 -2
  425. package/src/tests/factories.ts +27 -18
  426. package/src/tests/jest.ts +9 -9
  427. package/src/tests/mocks.ts +54 -30
  428. package/src/timetable/index.ts +66 -0
  429. package/src/trees/public_data_leaf.ts +11 -5
  430. package/src/tx/block_header.ts +8 -5
  431. package/src/tx/global_variables.ts +3 -3
  432. package/src/tx/indexed_tx_effect.ts +3 -2
  433. package/src/tx/profiling.ts +5 -5
  434. package/src/tx/protocol_contracts.ts +2 -2
  435. package/src/tx/public_simulation_output.ts +4 -0
  436. package/src/tx/tx_receipt.ts +85 -18
  437. package/src/tx/tx_request.ts +2 -2
  438. package/src/tx/validator/empty_validator.ts +1 -1
  439. package/src/tx/validator/error_texts.ts +1 -1
  440. package/src/tx/validator/tx_validator.ts +1 -1
  441. package/src/validators/schemas.ts +8 -1
  442. package/src/validators/types.ts +5 -4
  443. package/dest/block/l2_block_new.d.ts.map +0 -1
  444. package/dest/database-version/index.d.ts +0 -2
  445. package/dest/database-version/index.d.ts.map +0 -1
  446. package/dest/database-version/index.js +0 -1
  447. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -30
  448. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
  449. package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
  450. package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
  451. package/dest/note/notes_filter.d.ts +0 -27
  452. package/dest/note/notes_filter.d.ts.map +0 -1
  453. package/dest/note/notes_filter.js +0 -11
  454. package/src/database-version/index.ts +0 -1
  455. package/src/note/notes_filter.ts +0 -38
@@ -1,10 +1,4 @@
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,
@@ -23,10 +17,11 @@ import { MembershipWitness, SiblingPath } from '@aztec/foundation/trees';
23
17
  import { z } from 'zod';
24
18
 
25
19
  import type { AztecAddress } from '../aztec-address/index.js';
20
+ import { BlockHash } from '../block/block_hash.js';
26
21
  import { type BlockParameter, BlockParameterSchema } from '../block/block_parameter.js';
27
22
  import { CheckpointedL2Block } from '../block/checkpointed_l2_block.js';
28
23
  import { type DataInBlock, dataInBlockSchemaFor } from '../block/in_block.js';
29
- import { L2BlockNew } from '../block/l2_block_new.js';
24
+ import { L2Block } from '../block/l2_block.js';
30
25
  import { type L2BlockSource, type L2Tips, L2TipsSchema } from '../block/l2_block_source.js';
31
26
  import { PublishedCheckpoint } from '../checkpoint/published_checkpoint.js';
32
27
  import {
@@ -77,13 +72,7 @@ import { type WorldStateSyncStatus, WorldStateSyncStatusSchema } from './world_s
77
72
  export interface AztecNode
78
73
  extends Pick<
79
74
  L2BlockSource,
80
- | 'getBlocks'
81
- | 'getL2BlocksNew'
82
- | 'getPublishedBlocks'
83
- | 'getPublishedCheckpoints'
84
- | 'getBlockHeader'
85
- | 'getL2Tips'
86
- | 'getCheckpointedBlocks'
75
+ 'getBlocks' | 'getCheckpoints' | 'getBlockHeader' | 'getL2Tips' | 'getCheckpointedBlocks'
87
76
  > {
88
77
  /**
89
78
  * Returns the tips of the L2 chain.
@@ -98,63 +87,31 @@ export interface AztecNode
98
87
  /**
99
88
  * Find the indexes of the given leaves in the given tree along with a block metadata pointing to the block in which
100
89
  * the leaves were inserted.
101
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
90
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
102
91
  * @param treeId - The tree to search in.
103
92
  * @param leafValues - The values to search for.
104
93
  * @returns The indices of leaves and the block metadata of a block in which the leaves were inserted.
105
94
  */
106
95
  findLeavesIndexes(
107
- block: BlockParameter,
96
+ referenceBlock: BlockParameter,
108
97
  treeId: MerkleTreeId,
109
98
  leafValues: Fr[],
110
99
  ): Promise<(DataInBlock<bigint> | undefined)[]>;
111
100
 
112
- /**
113
- * Returns a sibling path for the given index in the nullifier tree.
114
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
115
- * @param leafIndex - The index of the leaf for which the sibling path is required.
116
- * @returns The sibling path for the leaf index.
117
- */
118
- getNullifierSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof NULLIFIER_TREE_HEIGHT>>;
119
-
120
- /**
121
- * Returns a sibling path for the given index in the note hash tree.
122
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
123
- * @param leafIndex - The index of the leaf for which the sibling path is required.
124
- * @returns The sibling path for the leaf index.
125
- */
126
- getNoteHashSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof NOTE_HASH_TREE_HEIGHT>>;
127
-
128
- /**
129
- * Returns a sibling path for a leaf in the committed historic blocks tree.
130
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
131
- * @param leafIndex - Index of the leaf in the tree.
132
- * @returns The sibling path.
133
- */
134
- getArchiveSiblingPath(block: BlockParameter, leafIndex: bigint): Promise<SiblingPath<typeof ARCHIVE_HEIGHT>>;
135
-
136
- /**
137
- * Returns a sibling path for a leaf in the committed public data tree.
138
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
139
- * @param leafIndex - Index of the leaf in the tree.
140
- * @returns The sibling path.
141
- */
142
- getPublicDataSiblingPath(
143
- block: BlockParameter,
144
- leafIndex: bigint,
145
- ): Promise<SiblingPath<typeof PUBLIC_DATA_TREE_HEIGHT>>;
146
-
147
101
  /**
148
102
  * Returns a nullifier membership witness for a given nullifier at a given block.
149
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
103
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
150
104
  * @param nullifier - Nullifier we try to find witness for.
151
105
  * @returns The nullifier membership witness (if found).
152
106
  */
153
- getNullifierMembershipWitness(block: BlockParameter, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
107
+ getNullifierMembershipWitness(
108
+ referenceBlock: BlockParameter,
109
+ nullifier: Fr,
110
+ ): Promise<NullifierMembershipWitness | undefined>;
154
111
 
155
112
  /**
156
113
  * Returns a low nullifier membership witness for a given nullifier at a given block.
157
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
114
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
158
115
  * @param nullifier - Nullifier we try to find the low nullifier witness for.
159
116
  * @returns The low nullifier membership witness (if found).
160
117
  * @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
@@ -162,49 +119,56 @@ export interface AztecNode
162
119
  * we are trying to prove non-inclusion for.
163
120
  */
164
121
  getLowNullifierMembershipWitness(
165
- block: BlockParameter,
122
+ referenceBlock: BlockParameter,
166
123
  nullifier: Fr,
167
124
  ): Promise<NullifierMembershipWitness | undefined>;
168
125
 
169
126
  /**
170
127
  * Returns a public data tree witness for a given leaf slot at a given block.
171
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
128
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
172
129
  * @param leafSlot - The leaf slot we try to find the witness for.
173
130
  * @returns The public data witness (if found).
174
131
  * @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
175
132
  * "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
176
133
  * is contained in the leaf preimage.
177
134
  */
178
- getPublicDataWitness(block: BlockParameter, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
135
+ getPublicDataWitness(referenceBlock: BlockParameter, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
179
136
 
180
137
  /**
181
- * Returns a membership witness for a given archive leaf at a given block.
182
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
183
- * @param archive - The archive leaf we try to find the witness for.
138
+ * Returns a membership witness for a given block hash in the archive tree.
139
+ *
140
+ * Block hashes are the leaves of the archive tree. Each time a new block is added to the chain,
141
+ * its block hash is appended as a new leaf to the archive tree. This method finds the membership
142
+ * witness (leaf index and sibling path) for a given block hash, which can be used to prove that
143
+ * a specific block exists in the chain's history.
144
+ *
145
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data
146
+ * (which contains the root of the archive tree in which we are searching for the block hash).
147
+ * @param blockHash - The block hash to find in the archive tree.
184
148
  */
185
- getArchiveMembershipWitness(
186
- block: BlockParameter,
187
- archive: Fr,
149
+ getBlockHashMembershipWitness(
150
+ referenceBlock: BlockParameter,
151
+ blockHash: BlockHash,
188
152
  ): Promise<MembershipWitness<typeof ARCHIVE_HEIGHT> | undefined>;
189
153
 
190
154
  /**
191
155
  * Returns a membership witness for a given note hash at a given block.
192
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
156
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
193
157
  * @param noteHash - The note hash we try to find the witness for.
194
158
  */
195
159
  getNoteHashMembershipWitness(
196
- block: BlockParameter,
160
+ referenceBlock: BlockParameter,
197
161
  noteHash: Fr,
198
162
  ): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT> | undefined>;
199
163
 
200
164
  /**
201
165
  * Returns the index and a sibling path for a leaf in the committed l1 to l2 data tree.
202
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
166
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
203
167
  * @param l1ToL2Message - The l1ToL2Message to get the index / sibling path for.
204
168
  * @returns A tuple of the index and the sibling path of the L1ToL2Message (undefined if not found).
205
169
  */
206
170
  getL1ToL2MessageMembershipWitness(
207
- block: BlockParameter,
171
+ referenceBlock: BlockParameter,
208
172
  l1ToL2Message: Fr,
209
173
  ): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>] | undefined>;
210
174
 
@@ -229,24 +193,24 @@ export interface AztecNode
229
193
 
230
194
  /**
231
195
  * Get a block specified by its block number or 'latest'.
232
- * @param number - The block number or 'latest'.
196
+ * @param blockParameter - The block parameter (block number, block hash, or 'latest').
233
197
  * @returns The requested block.
234
198
  */
235
- getBlock(number: BlockParameter): Promise<L2BlockNew | undefined>;
199
+ getBlock(blockParameter: BlockParameter): Promise<L2Block | undefined>;
236
200
 
237
201
  /**
238
202
  * Get a block specified by its hash.
239
203
  * @param blockHash - The block hash being requested.
240
204
  * @returns The requested block.
241
205
  */
242
- getBlockByHash(blockHash: Fr): Promise<L2BlockNew | undefined>;
206
+ getBlockByHash(blockHash: BlockHash): Promise<L2Block | undefined>;
243
207
 
244
208
  /**
245
209
  * Get a block specified by its archive root.
246
210
  * @param archive - The archive root being requested.
247
211
  * @returns The requested block.
248
212
  */
249
- getBlockByArchive(archive: Fr): Promise<L2BlockNew | undefined>;
213
+ getBlockByArchive(archive: Fr): Promise<L2Block | undefined>;
250
214
 
251
215
  /**
252
216
  * Method to fetch the latest block number synchronized by the node.
@@ -260,6 +224,12 @@ export interface AztecNode
260
224
  */
261
225
  getProvenBlockNumber(): Promise<BlockNumber>;
262
226
 
227
+ /**
228
+ * Fetches the latest checkpointed block number.
229
+ * @returns The block number.
230
+ */
231
+ getCheckpointedBlockNumber(): Promise<BlockNumber>;
232
+
263
233
  /**
264
234
  * Method to determine if the node is ready to accept transactions.
265
235
  * @returns - Flag indicating the readiness for tx submission.
@@ -279,7 +249,7 @@ export interface AztecNode
279
249
  * @param limit - The maximum number of blocks to return.
280
250
  * @returns The blocks requested.
281
251
  */
282
- getBlocks(from: BlockNumber, limit: number): Promise<L2BlockNew[]>;
252
+ getBlocks(from: BlockNumber, limit: number): Promise<L2Block[]>;
283
253
 
284
254
  /**
285
255
  * Method to fetch the current min fees.
@@ -347,10 +317,14 @@ export interface AztecNode
347
317
  * array implies no logs match that tag.
348
318
  * @param tags - The tags to search for.
349
319
  * @param page - The page number (0-indexed) for pagination.
320
+ * @param referenceBlock - Optional block hash used to ensure the block still exists before logs are retrieved.
321
+ * This block is expected to represent the latest block to which the client has synced (called anchor block in PXE).
322
+ * If specified and the block is not found, an error is thrown. This helps detect reorgs, which could result in
323
+ * undefined behavior in the client's code.
350
324
  * @returns An array of log arrays, one per tag. Returns at most 10 logs per tag per page. If 10 logs are returned
351
325
  * for a tag, the caller should fetch the next page to check for more logs.
352
326
  */
353
- getPrivateLogsByTags(tags: SiloedTag[], page?: number): Promise<TxScopedL2Log[][]>;
327
+ getPrivateLogsByTags(tags: SiloedTag[], page?: number, referenceBlock?: BlockHash): Promise<TxScopedL2Log[][]>;
354
328
 
355
329
  /**
356
330
  * Gets public logs that match any of the `tags` from the specified contract. For each tag, an array of matching
@@ -358,6 +332,10 @@ export interface AztecNode
358
332
  * @param contractAddress - The contract address to search logs for.
359
333
  * @param tags - The tags to search for.
360
334
  * @param page - The page number (0-indexed) for pagination.
335
+ * @param referenceBlock - Optional block hash used to ensure the block still exists before logs are retrieved.
336
+ * This block is expected to represent the latest block to which the client has synced (called anchor block in PXE).
337
+ * If specified and the block is not found, an error is thrown. This helps detect reorgs, which could result in
338
+ * undefined behavior in the client's code.
361
339
  * @returns An array of log arrays, one per tag. Returns at most 10 logs per tag per page. If 10 logs are returned
362
340
  * for a tag, the caller should fetch the next page to check for more logs.
363
341
  */
@@ -365,6 +343,7 @@ export interface AztecNode
365
343
  contractAddress: AztecAddress,
366
344
  tags: Tag[],
367
345
  page?: number,
346
+ referenceBlock?: BlockHash,
368
347
  ): Promise<TxScopedL2Log[][]>;
369
348
 
370
349
  /**
@@ -423,12 +402,12 @@ export interface AztecNode
423
402
  * @remarks The storage slot here refers to the slot as it is defined in Noir not the index in the merkle tree.
424
403
  * Aztec's version of `eth_getStorageAt`.
425
404
  *
426
- * @param block - The block parameter (block number, block hash, or 'latest') at which to get the data.
405
+ * @param referenceBlock - The block parameter (block number, block hash, or 'latest') at which to get the data.
427
406
  * @param contract - Address of the contract to query.
428
407
  * @param slot - Slot to query.
429
408
  * @returns Storage value at the given contract slot.
430
409
  */
431
- getPublicStorageAt(block: BlockParameter, contract: AztecAddress, slot: Fr): Promise<Fr>;
410
+ getPublicStorageAt(referenceBlock: BlockParameter, contract: AztecAddress, slot: Fr): Promise<Fr>;
432
411
 
433
412
  /**
434
413
  * Returns the block header for a given block number, block hash, or 'latest'.
@@ -464,7 +443,7 @@ export interface AztecNode
464
443
  /**
465
444
  * Returns true if the transaction is valid for inclusion at the current state. Valid transactions can be
466
445
  * made invalid by *other* transactions if e.g. they emit the same nullifiers, or come become invalid
467
- * due to e.g. the include_by_timestamp property.
446
+ * due to e.g. the expiration_timestamp property.
468
447
  * @param tx - The transaction to validate for correctness.
469
448
  * @param isSimulation - True if the transaction is a simulated one without generated proofs. (Optional)
470
449
  * @param skipFeeEnforcement - True if the validation of the fee should be skipped. Useful when the simulation is for estimating fee (Optional)
@@ -508,26 +487,6 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
508
487
  .args(BlockParameterSchema, z.nativeEnum(MerkleTreeId), z.array(schemas.Fr).max(MAX_RPC_LEN))
509
488
  .returns(z.array(optional(dataInBlockSchemaFor(schemas.BigInt)))),
510
489
 
511
- getNullifierSiblingPath: z
512
- .function()
513
- .args(BlockParameterSchema, schemas.BigInt)
514
- .returns(SiblingPath.schemaFor(NULLIFIER_TREE_HEIGHT)),
515
-
516
- getNoteHashSiblingPath: z
517
- .function()
518
- .args(BlockParameterSchema, schemas.BigInt)
519
- .returns(SiblingPath.schemaFor(NOTE_HASH_TREE_HEIGHT)),
520
-
521
- getArchiveSiblingPath: z
522
- .function()
523
- .args(BlockParameterSchema, schemas.BigInt)
524
- .returns(SiblingPath.schemaFor(ARCHIVE_HEIGHT)),
525
-
526
- getPublicDataSiblingPath: z
527
- .function()
528
- .args(BlockParameterSchema, schemas.BigInt)
529
- .returns(SiblingPath.schemaFor(PUBLIC_DATA_TREE_HEIGHT)),
530
-
531
490
  getNullifierMembershipWitness: z
532
491
  .function()
533
492
  .args(BlockParameterSchema, schemas.Fr)
@@ -543,9 +502,9 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
543
502
  .args(BlockParameterSchema, schemas.Fr)
544
503
  .returns(PublicDataWitness.schema.optional()),
545
504
 
546
- getArchiveMembershipWitness: z
505
+ getBlockHashMembershipWitness: z
547
506
  .function()
548
- .args(BlockParameterSchema, schemas.Fr)
507
+ .args(BlockParameterSchema, BlockHash.schema)
549
508
  .returns(MembershipWitness.schemaFor(ARCHIVE_HEIGHT).optional()),
550
509
 
551
510
  getNoteHashMembershipWitness: z
@@ -567,16 +526,18 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
567
526
  .args(EpochNumberSchema)
568
527
  .returns(z.array(z.array(z.array(z.array(schemas.Fr))))),
569
528
 
570
- getBlock: z.function().args(BlockParameterSchema).returns(L2BlockNew.schema.optional()),
529
+ getBlock: z.function().args(BlockParameterSchema).returns(L2Block.schema.optional()),
571
530
 
572
- getBlockByHash: z.function().args(schemas.Fr).returns(L2BlockNew.schema.optional()),
531
+ getBlockByHash: z.function().args(BlockHash.schema).returns(L2Block.schema.optional()),
573
532
 
574
- getBlockByArchive: z.function().args(schemas.Fr).returns(L2BlockNew.schema.optional()),
533
+ getBlockByArchive: z.function().args(schemas.Fr).returns(L2Block.schema.optional()),
575
534
 
576
535
  getBlockNumber: z.function().returns(BlockNumberSchema),
577
536
 
578
537
  getProvenBlockNumber: z.function().returns(BlockNumberSchema),
579
538
 
539
+ getCheckpointedBlockNumber: z.function().returns(BlockNumberSchema),
540
+
580
541
  isReady: z.function().returns(z.boolean()),
581
542
 
582
543
  getNodeInfo: z.function().returns(NodeInfoSchema),
@@ -584,26 +545,16 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
584
545
  getBlocks: z
585
546
  .function()
586
547
  .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
587
- .returns(z.array(L2BlockNew.schema)),
548
+ .returns(z.array(L2Block.schema)),
588
549
 
589
- getPublishedBlocks: z
590
- .function()
591
- .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
592
- .returns(z.array(CheckpointedL2Block.schema)),
593
-
594
- getPublishedCheckpoints: z
550
+ getCheckpoints: z
595
551
  .function()
596
552
  .args(CheckpointNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_CHECKPOINTS_LEN))
597
553
  .returns(z.array(PublishedCheckpoint.schema)),
598
554
 
599
- getL2BlocksNew: z
600
- .function()
601
- .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
602
- .returns(z.array(L2BlockNew.schema)),
603
-
604
555
  getCheckpointedBlocks: z
605
556
  .function()
606
- .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN), optional(z.boolean()))
557
+ .args(BlockNumberPositiveSchema, z.number().gt(0).lte(MAX_RPC_BLOCKS_LEN))
607
558
  .returns(z.array(CheckpointedL2Block.schema)),
608
559
 
609
560
  getCurrentMinFees: z.function().returns(GasFees.schema),
@@ -631,12 +582,17 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
631
582
 
632
583
  getPrivateLogsByTags: z
633
584
  .function()
634
- .args(z.array(SiloedTag.schema).max(MAX_RPC_LEN), optional(z.number().gte(0)))
585
+ .args(z.array(SiloedTag.schema).max(MAX_RPC_LEN), optional(z.number().gte(0)), optional(BlockHash.schema))
635
586
  .returns(z.array(z.array(TxScopedL2Log.schema))),
636
587
 
637
588
  getPublicLogsByTagsFromContract: z
638
589
  .function()
639
- .args(schemas.AztecAddress, z.array(Tag.schema).max(MAX_RPC_LEN), optional(z.number().gte(0)))
590
+ .args(
591
+ schemas.AztecAddress,
592
+ z.array(Tag.schema).max(MAX_RPC_LEN),
593
+ optional(z.number().gte(0)),
594
+ optional(BlockHash.schema),
595
+ )
640
596
  .returns(z.array(z.array(TxScopedL2Log.schema))),
641
597
 
642
598
  sendTx: z.function().args(Tx.schema).returns(z.void()),
@@ -1,7 +1,8 @@
1
1
  import type { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
2
2
  import type { Fr } from '@aztec/foundation/curves/bn254';
3
+ import type { LoggerBindings } from '@aztec/foundation/log';
3
4
 
4
- import type { L2BlockNew } from '../block/l2_block_new.js';
5
+ import type { L2Block } from '../block/l2_block.js';
5
6
  import type { ChainConfig, SequencerConfig } from '../config/chain-config.js';
6
7
  import type { L1RollupConstants } from '../epoch-helpers/index.js';
7
8
  import type { Gas } from '../gas/gas.js';
@@ -31,7 +32,7 @@ export interface IBlockFactory extends ProcessedTxHandler {
31
32
  /**
32
33
  * Assembles the block and updates the archive tree.
33
34
  */
34
- setBlockCompleted(expectedBlockHeader?: BlockHeader): Promise<L2BlockNew>;
35
+ setBlockCompleted(expectedBlockHeader?: BlockHeader): Promise<L2Block>;
35
36
  }
36
37
 
37
38
  export interface PublicProcessorLimits {
@@ -61,16 +62,24 @@ export const FullNodeBlockBuilderConfigKeys: (keyof FullNodeBlockBuilderConfig)[
61
62
  'fakeThrowAfterProcessingTxCount',
62
63
  ] as const;
63
64
 
65
+ /** Thrown when no valid transactions are available to include in a block after processing, and this is not the first block in a checkpoint. */
66
+ export class NoValidTxsError extends Error {
67
+ constructor(public readonly failedTxs: FailedTx[]) {
68
+ super('No valid transactions to include in block');
69
+ this.name = 'NoValidTxsError';
70
+ }
71
+ }
72
+
64
73
  /** Result of building a block within a checkpoint. */
65
- export interface BuildBlockInCheckpointResult {
66
- block: L2BlockNew;
74
+ export type BuildBlockInCheckpointResult = {
75
+ block: L2Block;
67
76
  publicGas: Gas;
68
77
  publicProcessorDuration: number;
69
78
  numTxs: number;
70
79
  failedTxs: FailedTx[];
71
80
  usedTxs: Tx[];
72
81
  usedTxBlobFields: number;
73
- }
82
+ };
74
83
 
75
84
  /** Interface for building blocks within a checkpoint context. */
76
85
  export interface ICheckpointBlockBuilder {
@@ -89,8 +98,10 @@ export interface ICheckpointsBuilder {
89
98
  startCheckpoint(
90
99
  checkpointNumber: CheckpointNumber,
91
100
  constants: CheckpointGlobalVariables,
101
+ feeAssetPriceModifier: bigint,
92
102
  l1ToL2Messages: Fr[],
93
103
  previousCheckpointOutHashes: Fr[],
94
104
  fork: MerkleTreeWriteOperations,
105
+ bindings?: LoggerBindings,
95
106
  ): Promise<ICheckpointBlockBuilder>;
96
107
  }
@@ -65,12 +65,16 @@ export interface SequencerConfig {
65
65
  shuffleAttestationOrdering?: boolean;
66
66
  /** Duration per block in milliseconds when building multiple blocks per slot (default: undefined = single block per slot) */
67
67
  blockDurationMs?: number;
68
+ /** Expected number of block proposals per slot for P2P peer scoring. 0 disables scoring, undefined falls back to blocksPerSlot - 1. */
69
+ expectedBlockProposalsPerSlot?: number;
68
70
  /** Have sequencer build and publish an empty checkpoint if there are no txs */
69
71
  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) */
72
+ /** Skip pushing proposed blocks to archiver (default: false) */
73
73
  skipPushProposedBlocksToArchiver?: boolean;
74
+ /** Minimum number of blocks required for a checkpoint proposal (test only, defaults to undefined = no minimum) */
75
+ minBlocksForCheckpoint?: number;
76
+ /** Skip publishing checkpoint proposals probability (for testing checkpoint prunes only) */
77
+ skipPublishingCheckpointsPercent?: number;
74
78
  }
75
79
 
76
80
  export const SequencerConfigSchema = zodFor<SequencerConfig>()(
@@ -103,14 +107,18 @@ export const SequencerConfigSchema = zodFor<SequencerConfig>()(
103
107
  fishermanMode: z.boolean().optional(),
104
108
  shuffleAttestationOrdering: z.boolean().optional(),
105
109
  blockDurationMs: z.number().positive().optional(),
110
+ expectedBlockProposalsPerSlot: z.number().nonnegative().optional(),
106
111
  buildCheckpointIfEmpty: z.boolean().optional(),
107
112
  skipPushProposedBlocksToArchiver: z.boolean().optional(),
113
+ minBlocksForCheckpoint: z.number().positive().optional(),
114
+ skipPublishingCheckpointsPercent: z.number().gte(0).lte(100).optional(),
108
115
  }),
109
116
  );
110
117
 
111
118
  type SequencerConfigOptionalKeys =
112
119
  | 'governanceProposerPayload'
113
120
  | 'blockDurationMs'
121
+ | 'expectedBlockProposalsPerSlot'
114
122
  | 'coinbase'
115
123
  | 'feeRecipient'
116
124
  | 'acvmWorkingDirectory'
@@ -119,7 +127,8 @@ type SequencerConfigOptionalKeys =
119
127
  | 'fakeThrowAfterProcessingTxCount'
120
128
  | 'l1PublishingTime'
121
129
  | 'txPublicSetupAllowList'
122
- | 'minValidTxsPerBlock';
130
+ | 'minValidTxsPerBlock'
131
+ | 'minBlocksForCheckpoint';
123
132
 
124
133
  export type ResolvedSequencerConfig = Prettify<
125
134
  Required<Omit<SequencerConfig, SequencerConfigOptionalKeys>> & Pick<SequencerConfig, SequencerConfigOptionalKeys>
@@ -254,7 +254,7 @@ export interface MerkleTreeCheckpointOperations {
254
254
  export interface MerkleTreeWriteOperations
255
255
  extends MerkleTreeReadOperations,
256
256
  MerkleTreeCheckpointOperations,
257
- Disposable {
257
+ AsyncDisposable {
258
258
  /**
259
259
  * Appends leaves to a given tree.
260
260
  * @param treeId - The tree to be updated.
@@ -3,7 +3,6 @@ import type { SlotNumber } from '@aztec/foundation/branded-types';
3
3
  import { z } from 'zod';
4
4
 
5
5
  import { CheckpointAttestation } from '../p2p/checkpoint_attestation.js';
6
- import type { P2PClientType } from '../p2p/client_type.js';
7
6
  import { type ApiSchemaFor, optional, schemas } from '../schemas/index.js';
8
7
  import { Tx } from '../tx/tx.js';
9
8
  import { TxHash } from '../tx/tx_hash.js';
@@ -27,7 +26,7 @@ const PeerInfoSchema = z.discriminatedUnion('status', [
27
26
  ]);
28
27
 
29
28
  /** Exposed API to the P2P module. */
30
- export interface P2PApiWithoutAttestations {
29
+ export interface P2PApi {
31
30
  /**
32
31
  * Returns all pending transactions in the transaction pool.
33
32
  * @param limit - The number of items to returns
@@ -48,9 +47,7 @@ export interface P2PApiWithoutAttestations {
48
47
  * Returns info for all connected, dialing, and cached peers.
49
48
  */
50
49
  getPeers(includePending?: boolean): Promise<PeerInfo[]>;
51
- }
52
50
 
53
- export interface P2PApiWithAttestations extends P2PApiWithoutAttestations {
54
51
  /**
55
52
  * Queries the Attestation pool for checkpoint attestations for the given slot
56
53
  *
@@ -61,19 +58,11 @@ export interface P2PApiWithAttestations extends P2PApiWithoutAttestations {
61
58
  getCheckpointAttestationsForSlot(slot: SlotNumber, proposalId?: string): Promise<CheckpointAttestation[]>;
62
59
  }
63
60
 
64
- export interface P2PClient extends P2PApiWithAttestations {
61
+ export interface P2PClient extends P2PApi {
65
62
  /** Manually adds checkpoint attestations to the p2p client attestation pool. */
66
- addCheckpointAttestations(attestations: CheckpointAttestation[]): Promise<void>;
63
+ addOwnCheckpointAttestations(attestations: CheckpointAttestation[]): Promise<void>;
67
64
  }
68
65
 
69
- export type P2PApi<T extends P2PClientType = P2PClientType.Full> = T extends P2PClientType.Full
70
- ? P2PApiWithAttestations
71
- : P2PApiWithoutAttestations;
72
-
73
- export type P2PApiFull<T extends P2PClientType = P2PClientType.Full> = T extends P2PClientType.Full
74
- ? P2PApiWithAttestations & P2PClient
75
- : P2PApiWithoutAttestations;
76
-
77
66
  export const P2PApiSchema: ApiSchemaFor<P2PApi> = {
78
67
  getCheckpointAttestationsForSlot: z
79
68
  .function()
@@ -1,3 +1,5 @@
1
+ import type { EpochNumber } from '@aztec/foundation/branded-types';
2
+
1
3
  import type { ProvingRequestType } from '../proofs/proving_request_type.js';
2
4
  import type { ProofUri, ProvingJob, ProvingJobId, ProvingJobStatus } from './proving-job.js';
3
5
 
@@ -88,3 +90,23 @@ export interface ProvingJobConsumer {
88
90
  }
89
91
 
90
92
  export interface ProvingJobBroker extends ProvingJobProducer, ProvingJobConsumer {}
93
+
94
+ /**
95
+ * Debug interface for replaying proving jobs from stored inputs.
96
+ * Used for benchmarking different agent configurations against the same workload.
97
+ */
98
+ export interface ProvingJobBrokerDebug {
99
+ /**
100
+ * Replays a proving job by re-enqueuing it with inputs from the configured proof store.
101
+ * The proof type is parsed from the job ID (format: epoch:typeName:hash).
102
+ * @param jobId - The original job ID to replay
103
+ * @param epochNumber - The epoch number to assign
104
+ * @param inputsUri - The proof inputs location
105
+ */
106
+ replayProvingJob(
107
+ jobId: ProvingJobId,
108
+ type: ProvingRequestType,
109
+ epochNumber: EpochNumber,
110
+ inputsUri: ProofUri,
111
+ ): Promise<ProvingJobStatus>;
112
+ }
@@ -17,6 +17,12 @@ export type ActualProverConfig = {
17
17
  proverTestDelayMs: number;
18
18
  /** If using realistic delays, what percentage of realistic times to apply. */
19
19
  proverTestDelayFactor: number;
20
+ /**
21
+ * Whether to abort pending proving jobs when the orchestrator is cancelled.
22
+ * When false (default), jobs remain in the broker queue and can be reused on restart/reorg.
23
+ * When true, jobs are explicitly cancelled with the broker, which prevents reuse.
24
+ */
25
+ cancelJobsOnStop: boolean;
20
26
  };
21
27
 
22
28
  /**
@@ -29,6 +35,8 @@ export type ProverConfig = ActualProverConfig & {
29
35
  proverId?: EthAddress;
30
36
  /** Number of proving agents to start within the prover. */
31
37
  proverAgentCount: number;
38
+ /** Where to store proving request. Must be accessible to both prover node and agents. If not set will inline-encode the parameters */
39
+ proofStore?: string;
32
40
  /** Store for failed proof inputs. */
33
41
  failedProofStore?: string;
34
42
  };
@@ -42,7 +50,9 @@ export const ProverConfigSchema = zodFor<ProverConfig>()(
42
50
  proverTestDelayMs: z.number(),
43
51
  proverTestDelayFactor: z.number(),
44
52
  proverAgentCount: z.number(),
53
+ proofStore: z.string().optional(),
45
54
  failedProofStore: z.string().optional(),
55
+ cancelJobsOnStop: z.boolean(),
46
56
  }),
47
57
  );
48
58
 
@@ -80,11 +90,23 @@ export const proverConfigMappings: ConfigMappingsType<ProverConfig> = {
80
90
  description: 'The number of prover agents to start',
81
91
  ...numberConfigHelper(1),
82
92
  },
93
+ proofStore: {
94
+ env: 'PROVER_PROOF_STORE',
95
+ description: 'Optional proof input store for the prover',
96
+ },
83
97
  failedProofStore: {
84
98
  env: 'PROVER_FAILED_PROOF_STORE',
85
99
  description:
86
100
  'Store for failed proof inputs. Google cloud storage is only supported at the moment. Set this value as gs://bucket-name/path/to/store.',
87
101
  },
102
+ cancelJobsOnStop: {
103
+ env: 'PROVER_CANCEL_JOBS_ON_STOP',
104
+ description:
105
+ 'Whether to abort pending proving jobs when the orchestrator is cancelled. ' +
106
+ 'When false (default), jobs remain in the broker queue and can be reused on restart/reorg. ' +
107
+ 'When true, jobs are explicitly cancelled with the broker, which prevents reuse.',
108
+ ...booleanConfigHelper(false),
109
+ },
88
110
  };
89
111
 
90
112
  function parseProverId(str?: string) {
@@ -18,6 +18,8 @@ export interface SlasherConfig {
18
18
  slashDataWithholdingPenalty: bigint;
19
19
  slashInactivityPenalty: bigint;
20
20
  slashBroadcastedInvalidBlockPenalty: bigint;
21
+ slashDuplicateProposalPenalty: bigint;
22
+ slashDuplicateAttestationPenalty: bigint;
21
23
  slashProposeInvalidAttestationsPenalty: bigint;
22
24
  slashAttestDescendantOfInvalidPenalty: bigint;
23
25
  slashUnknownPenalty: bigint;
@@ -40,6 +42,8 @@ export const SlasherConfigSchema = zodFor<SlasherConfig>()(
40
42
  slashInactivityConsecutiveEpochThreshold: z.number(),
41
43
  slashInactivityPenalty: schemas.BigInt,
42
44
  slashProposeInvalidAttestationsPenalty: schemas.BigInt,
45
+ slashDuplicateProposalPenalty: schemas.BigInt,
46
+ slashDuplicateAttestationPenalty: schemas.BigInt,
43
47
  slashAttestDescendantOfInvalidPenalty: schemas.BigInt,
44
48
  slashUnknownPenalty: schemas.BigInt,
45
49
  slashOffenseExpirationRounds: z.number(),