@aztec/stdlib 0.0.1-commit.7d4e6cd → 0.0.1-commit.7ffbba4

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 (744) hide show
  1. package/dest/abi/decoder.d.ts +2 -2
  2. package/dest/abi/decoder.d.ts.map +1 -1
  3. package/dest/abi/decoder.js +7 -5
  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 +37 -6
  7. package/dest/abi/event_metadata_definition.d.ts +3 -1
  8. package/dest/abi/event_metadata_definition.d.ts.map +1 -1
  9. package/dest/abi/event_metadata_definition.js +1 -1
  10. package/dest/abi/function_call.d.ts +47 -9
  11. package/dest/abi/function_call.d.ts.map +1 -1
  12. package/dest/abi/function_call.js +20 -3
  13. package/dest/abi/utils.d.ts +20 -1
  14. package/dest/abi/utils.d.ts.map +1 -1
  15. package/dest/abi/utils.js +22 -0
  16. package/dest/auth_witness/auth_witness.d.ts +2 -1
  17. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  18. package/dest/auth_witness/auth_witness.js +3 -3
  19. package/dest/avm/avm.d.ts +362 -362
  20. package/dest/avm/avm_accumulated_data.d.ts +30 -3
  21. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  22. package/dest/avm/avm_circuit_public_inputs.d.ts +9 -9
  23. package/dest/avm/avm_proving_request.d.ts +465 -465
  24. package/dest/avm/contract_storage_read.d.ts +13 -1
  25. package/dest/avm/contract_storage_read.d.ts.map +1 -1
  26. package/dest/avm/contract_storage_update_request.d.ts +13 -1
  27. package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
  28. package/dest/avm/public_call_stack_item_compressed.d.ts +3 -1
  29. package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
  30. package/dest/avm/public_data_read.d.ts +10 -1
  31. package/dest/avm/public_data_read.d.ts.map +1 -1
  32. package/dest/avm/public_data_update_request.d.ts +10 -1
  33. package/dest/avm/public_data_update_request.d.ts.map +1 -1
  34. package/dest/avm/public_data_write.d.ts +7 -1
  35. package/dest/avm/public_data_write.d.ts.map +1 -1
  36. package/dest/avm/public_inner_call_request.d.ts +4 -1
  37. package/dest/avm/public_inner_call_request.d.ts.map +1 -1
  38. package/dest/avm/revert_code.d.ts +19 -4
  39. package/dest/avm/revert_code.d.ts.map +1 -1
  40. package/dest/avm/revert_code.js +15 -5
  41. package/dest/block/block_data.d.ts +52 -0
  42. package/dest/block/block_data.d.ts.map +1 -0
  43. package/dest/block/block_data.js +12 -0
  44. package/dest/block/block_hash.d.ts +18 -14
  45. package/dest/block/block_hash.d.ts.map +1 -1
  46. package/dest/block/block_hash.js +22 -20
  47. package/dest/block/block_parameter.d.ts +4 -3
  48. package/dest/block/block_parameter.d.ts.map +1 -1
  49. package/dest/block/block_parameter.js +2 -0
  50. package/dest/block/body.d.ts +1 -1
  51. package/dest/block/body.d.ts.map +1 -1
  52. package/dest/block/body.js +2 -1
  53. package/dest/block/checkpointed_l2_block.d.ts +20 -137
  54. package/dest/block/checkpointed_l2_block.d.ts.map +1 -1
  55. package/dest/block/checkpointed_l2_block.js +7 -45
  56. package/dest/block/in_block.d.ts +9 -9
  57. package/dest/block/in_block.d.ts.map +1 -1
  58. package/dest/block/in_block.js +5 -5
  59. package/dest/block/index.d.ts +2 -3
  60. package/dest/block/index.d.ts.map +1 -1
  61. package/dest/block/index.js +1 -2
  62. package/dest/block/l2_block.d.ts +64 -59
  63. package/dest/block/l2_block.d.ts.map +1 -1
  64. package/dest/block/l2_block.js +73 -109
  65. package/dest/block/l2_block_source.d.ts +89 -39
  66. package/dest/block/l2_block_source.d.ts.map +1 -1
  67. package/dest/block/l2_block_source.js +2 -1
  68. package/dest/block/l2_block_stream/interfaces.d.ts +9 -6
  69. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  70. package/dest/block/l2_block_stream/l2_block_stream.d.ts +6 -3
  71. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  72. package/dest/block/l2_block_stream/l2_block_stream.js +47 -34
  73. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +3 -3
  74. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
  75. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  76. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  77. package/dest/block/test/l2_tips_store_test_suite.js +2 -7
  78. package/dest/block/validate_block_result.d.ts +1 -1
  79. package/dest/block/validate_block_result.d.ts.map +1 -1
  80. package/dest/block/validate_block_result.js +5 -4
  81. package/dest/checkpoint/checkpoint.d.ts +44 -19
  82. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  83. package/dest/checkpoint/checkpoint.js +45 -17
  84. package/dest/checkpoint/checkpoint_data.d.ts +120 -0
  85. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
  86. package/dest/checkpoint/checkpoint_data.js +26 -0
  87. package/dest/checkpoint/index.d.ts +3 -1
  88. package/dest/checkpoint/index.d.ts.map +1 -1
  89. package/dest/checkpoint/index.js +2 -0
  90. package/dest/checkpoint/published_checkpoint.d.ts +33 -16
  91. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  92. package/dest/checkpoint/published_checkpoint.js +5 -5
  93. package/dest/checkpoint/validate.d.ts +36 -0
  94. package/dest/checkpoint/validate.d.ts.map +1 -0
  95. package/dest/checkpoint/validate.js +120 -0
  96. package/dest/config/index.d.ts +2 -1
  97. package/dest/config/index.d.ts.map +1 -1
  98. package/dest/config/index.js +1 -0
  99. package/dest/config/node-rpc-config.js +1 -1
  100. package/dest/config/sequencer-config.d.ts +12 -0
  101. package/dest/config/sequencer-config.d.ts.map +1 -0
  102. package/dest/config/sequencer-config.js +24 -0
  103. package/dest/contract/complete_address.d.ts +4 -1
  104. package/dest/contract/complete_address.d.ts.map +1 -1
  105. package/dest/contract/contract_address.js +4 -4
  106. package/dest/contract/contract_class.d.ts +2 -3
  107. package/dest/contract/contract_class.d.ts.map +1 -1
  108. package/dest/contract/contract_class_id.d.ts +2 -2
  109. package/dest/contract/contract_class_id.d.ts.map +1 -1
  110. package/dest/contract/contract_class_id.js +6 -5
  111. package/dest/contract/contract_deployment_data.d.ts +5 -5
  112. package/dest/contract/index.d.ts +1 -3
  113. package/dest/contract/index.d.ts.map +1 -1
  114. package/dest/contract/index.js +0 -2
  115. package/dest/contract/interfaces/contract_instance.d.ts +16 -16
  116. package/dest/contract/interfaces/node-info.d.ts +3 -1
  117. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  118. package/dest/contract/interfaces/node-info.js +2 -1
  119. package/dest/contract/private_function.d.ts +1 -1
  120. package/dest/contract/private_function.d.ts.map +1 -1
  121. package/dest/contract/private_function.js +3 -4
  122. package/dest/contract/private_function_membership_proof.d.ts +1 -1
  123. package/dest/contract/private_function_membership_proof.js +1 -1
  124. package/dest/database-version/database_version.d.ts +58 -0
  125. package/dest/database-version/database_version.d.ts.map +1 -0
  126. package/dest/database-version/database_version.js +69 -0
  127. package/dest/database-version/version_manager.d.ts +3 -49
  128. package/dest/database-version/version_manager.d.ts.map +1 -1
  129. package/dest/database-version/version_manager.js +1 -66
  130. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +2 -2
  131. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
  132. package/dest/delayed_public_mutable/delayed_public_mutable_values.js +7 -10
  133. package/dest/deserialization/index.d.ts +11 -0
  134. package/dest/deserialization/index.d.ts.map +1 -0
  135. package/dest/deserialization/index.js +10 -0
  136. package/dest/epoch-helpers/index.d.ts +7 -1
  137. package/dest/epoch-helpers/index.d.ts.map +1 -1
  138. package/dest/epoch-helpers/index.js +9 -3
  139. package/dest/errors/proving_error.d.ts +2 -2
  140. package/dest/errors/proving_error.d.ts.map +1 -1
  141. package/dest/file-store/local.d.ts +3 -3
  142. package/dest/file-store/local.d.ts.map +1 -1
  143. package/dest/file-store/local.js +13 -4
  144. package/dest/file-store/s3.d.ts +1 -1
  145. package/dest/file-store/s3.d.ts.map +1 -1
  146. package/dest/file-store/s3.js +11 -3
  147. package/dest/gas/gas_fees.d.ts +1 -1
  148. package/dest/gas/gas_fees.d.ts.map +1 -1
  149. package/dest/gas/gas_fees.js +4 -1
  150. package/dest/ha-signing/config.d.ts +136 -0
  151. package/dest/ha-signing/config.d.ts.map +1 -0
  152. package/dest/ha-signing/config.js +97 -0
  153. package/dest/ha-signing/index.d.ts +4 -0
  154. package/dest/ha-signing/index.d.ts.map +1 -0
  155. package/dest/ha-signing/index.js +3 -0
  156. package/dest/ha-signing/local_config.d.ts +63 -0
  157. package/dest/ha-signing/local_config.d.ts.map +1 -0
  158. package/dest/ha-signing/local_config.js +24 -0
  159. package/dest/ha-signing/types.d.ts +85 -0
  160. package/dest/ha-signing/types.d.ts.map +1 -0
  161. package/dest/ha-signing/types.js +32 -0
  162. package/dest/hash/hash.d.ts +2 -1
  163. package/dest/hash/hash.d.ts.map +1 -1
  164. package/dest/hash/hash.js +16 -10
  165. package/dest/hash/map_slot.d.ts +1 -1
  166. package/dest/hash/map_slot.d.ts.map +1 -1
  167. package/dest/hash/map_slot.js +4 -3
  168. package/dest/interfaces/allowed_element.d.ts +26 -20
  169. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  170. package/dest/interfaces/allowed_element.js +8 -8
  171. package/dest/interfaces/api_limit.d.ts +2 -1
  172. package/dest/interfaces/api_limit.d.ts.map +1 -1
  173. package/dest/interfaces/api_limit.js +1 -0
  174. package/dest/interfaces/archiver.d.ts +1 -1
  175. package/dest/interfaces/archiver.d.ts.map +1 -1
  176. package/dest/interfaces/archiver.js +24 -15
  177. package/dest/interfaces/aztec-node-admin.d.ts +164 -51
  178. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  179. package/dest/interfaces/aztec-node-admin.js +12 -4
  180. package/dest/interfaces/aztec-node.d.ts +75 -73
  181. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  182. package/dest/interfaces/aztec-node.js +13 -18
  183. package/dest/interfaces/block-builder.d.ts +30 -16
  184. package/dest/interfaces/block-builder.d.ts.map +1 -1
  185. package/dest/interfaces/block-builder.js +14 -2
  186. package/dest/interfaces/configs.d.ts +76 -36
  187. package/dest/interfaces/configs.d.ts.map +1 -1
  188. package/dest/interfaces/configs.js +9 -3
  189. package/dest/interfaces/get_logs_response.d.ts +16 -9
  190. package/dest/interfaces/get_logs_response.d.ts.map +1 -1
  191. package/dest/interfaces/l2_logs_source.d.ts +14 -5
  192. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  193. package/dest/interfaces/merkle_tree_operations.d.ts +2 -2
  194. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  195. package/dest/interfaces/p2p.d.ts +4 -9
  196. package/dest/interfaces/p2p.d.ts.map +1 -1
  197. package/dest/interfaces/prover-broker.d.ts +16 -1
  198. package/dest/interfaces/prover-broker.d.ts.map +1 -1
  199. package/dest/interfaces/prover-broker.js +4 -1
  200. package/dest/interfaces/prover-client.d.ts +15 -1
  201. package/dest/interfaces/prover-client.d.ts.map +1 -1
  202. package/dest/interfaces/prover-client.js +12 -1
  203. package/dest/interfaces/proving-job.d.ts +216 -216
  204. package/dest/interfaces/slasher.d.ts +9 -1
  205. package/dest/interfaces/slasher.d.ts.map +1 -1
  206. package/dest/interfaces/slasher.js +2 -0
  207. package/dest/interfaces/tx_provider.d.ts +3 -3
  208. package/dest/interfaces/tx_provider.d.ts.map +1 -1
  209. package/dest/interfaces/validator.d.ts +203 -39
  210. package/dest/interfaces/validator.d.ts.map +1 -1
  211. package/dest/interfaces/validator.js +11 -4
  212. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +3 -3
  213. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
  214. package/dest/kernel/hints/build_note_hash_read_request_hints.js +29 -16
  215. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +4 -4
  216. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  217. package/dest/kernel/hints/build_nullifier_read_request_hints.js +28 -17
  218. package/dest/kernel/hints/build_transient_data_hints.d.ts +5 -2
  219. package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
  220. package/dest/kernel/hints/build_transient_data_hints.js +9 -3
  221. package/dest/kernel/hints/index.d.ts +2 -2
  222. package/dest/kernel/hints/index.js +2 -2
  223. package/dest/kernel/hints/key_validation_hint.d.ts +2 -1
  224. package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
  225. package/dest/kernel/hints/key_validation_request.d.ts +2 -1
  226. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  227. package/dest/kernel/hints/key_validation_request_and_separator.d.ts +24 -0
  228. package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
  229. package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +12 -15
  230. package/dest/kernel/hints/private_kernel_reset_hints.d.ts +13 -1
  231. package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
  232. package/dest/kernel/hints/read_request.d.ts +7 -1
  233. package/dest/kernel/hints/read_request.d.ts.map +1 -1
  234. package/dest/kernel/hints/read_request_hints.d.ts +7 -1
  235. package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
  236. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +8 -8
  237. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
  238. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
  239. package/dest/kernel/private_accumulated_data.d.ts +23 -1
  240. package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
  241. package/dest/kernel/private_call_data.d.ts +25 -1
  242. package/dest/kernel/private_call_data.d.ts.map +1 -1
  243. package/dest/kernel/private_call_request.d.ts +16 -1
  244. package/dest/kernel/private_call_request.d.ts.map +1 -1
  245. package/dest/kernel/private_circuit_public_inputs.d.ts +81 -8
  246. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  247. package/dest/kernel/private_circuit_public_inputs.js +16 -16
  248. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +33 -3
  249. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  250. package/dest/kernel/private_kernel_circuit_public_inputs.js +4 -4
  251. package/dest/kernel/private_kernel_data.d.ts +7 -1
  252. package/dest/kernel/private_kernel_data.d.ts.map +1 -1
  253. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +22 -1
  254. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  255. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +7 -1
  256. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
  257. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -1
  258. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
  259. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +12 -3
  260. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
  261. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
  262. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +26 -3
  263. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  264. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +11 -7
  265. package/dest/kernel/private_to_avm_accumulated_data.d.ts +2 -2
  266. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +3 -3
  267. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  268. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -7
  269. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +17 -1
  270. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  271. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +18 -3
  272. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  273. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -7
  274. package/dest/kernel/private_validation_requests.d.ts +13 -4
  275. package/dest/kernel/private_validation_requests.d.ts.map +1 -1
  276. package/dest/kernel/private_validation_requests.js +9 -9
  277. package/dest/kernel/public_call_request.d.ts +22 -1
  278. package/dest/kernel/public_call_request.d.ts.map +1 -1
  279. package/dest/kernel/utils/optional_number.d.ts +7 -1
  280. package/dest/kernel/utils/optional_number.d.ts.map +1 -1
  281. package/dest/keys/derivation.d.ts +3 -3
  282. package/dest/keys/derivation.js +15 -15
  283. package/dest/keys/key_types.d.ts +3 -3
  284. package/dest/keys/key_types.d.ts.map +1 -1
  285. package/dest/keys/public_keys.d.ts +5 -1
  286. package/dest/keys/public_keys.d.ts.map +1 -1
  287. package/dest/keys/public_keys.js +2 -2
  288. package/dest/keys/utils.d.ts +1 -1
  289. package/dest/keys/utils.d.ts.map +1 -1
  290. package/dest/keys/utils.js +8 -4
  291. package/dest/kv-store/config.d.ts +17 -0
  292. package/dest/kv-store/config.d.ts.map +1 -0
  293. package/dest/kv-store/config.js +26 -0
  294. package/dest/kv-store/index.d.ts +2 -0
  295. package/dest/kv-store/index.d.ts.map +1 -0
  296. package/dest/kv-store/index.js +1 -0
  297. package/dest/l1-contracts/slash_factory.d.ts +1 -1
  298. package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
  299. package/dest/l1-contracts/slash_factory.js +1 -0
  300. package/dest/logs/debug_log_store.d.ts +30 -0
  301. package/dest/logs/debug_log_store.d.ts.map +1 -0
  302. package/dest/logs/debug_log_store.js +30 -0
  303. package/dest/logs/extended_contract_class_log.d.ts +3 -1
  304. package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
  305. package/dest/logs/extended_directional_app_tagging_secret.d.ts +47 -0
  306. package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +1 -0
  307. package/dest/logs/{directional_app_tagging_secret.js → extended_directional_app_tagging_secret.js} +23 -15
  308. package/dest/logs/extended_public_log.d.ts +17 -9
  309. package/dest/logs/extended_public_log.d.ts.map +1 -1
  310. package/dest/logs/index.d.ts +3 -2
  311. package/dest/logs/index.d.ts.map +1 -1
  312. package/dest/logs/index.js +2 -1
  313. package/dest/logs/log_id.d.ts +21 -14
  314. package/dest/logs/log_id.d.ts.map +1 -1
  315. package/dest/logs/log_id.js +20 -17
  316. package/dest/logs/pre_tag.d.ts +16 -11
  317. package/dest/logs/pre_tag.d.ts.map +1 -1
  318. package/dest/logs/pre_tag.js +2 -2
  319. package/dest/logs/private_log.d.ts +2 -2
  320. package/dest/logs/private_log.d.ts.map +1 -1
  321. package/dest/logs/public_log.d.ts +4 -3
  322. package/dest/logs/public_log.d.ts.map +1 -1
  323. package/dest/logs/public_log.js +2 -1
  324. package/dest/logs/siloed_tag.d.ts +5 -3
  325. package/dest/logs/siloed_tag.d.ts.map +1 -1
  326. package/dest/logs/siloed_tag.js +8 -6
  327. package/dest/logs/tag.js +1 -1
  328. package/dest/messaging/inbox_leaf.d.ts +3 -1
  329. package/dest/messaging/inbox_leaf.d.ts.map +1 -1
  330. package/dest/messaging/l1_actor.d.ts +7 -1
  331. package/dest/messaging/l1_actor.d.ts.map +1 -1
  332. package/dest/messaging/l1_to_l2_message.d.ts +6 -1
  333. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  334. package/dest/messaging/l2_actor.d.ts +7 -1
  335. package/dest/messaging/l2_actor.d.ts.map +1 -1
  336. package/dest/messaging/l2_to_l1_membership.d.ts +3 -3
  337. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  338. package/dest/messaging/l2_to_l1_membership.js +8 -6
  339. package/dest/messaging/out_hash.d.ts +41 -4
  340. package/dest/messaging/out_hash.d.ts.map +1 -1
  341. package/dest/messaging/out_hash.js +52 -26
  342. package/dest/note/index.d.ts +1 -2
  343. package/dest/note/index.d.ts.map +1 -1
  344. package/dest/note/index.js +0 -1
  345. package/dest/note/note_dao.d.ts +36 -5
  346. package/dest/note/note_dao.d.ts.map +1 -1
  347. package/dest/note/note_dao.js +15 -12
  348. package/dest/p2p/attestation_utils.d.ts +11 -1
  349. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  350. package/dest/p2p/attestation_utils.js +45 -0
  351. package/dest/p2p/block_proposal.d.ts +23 -8
  352. package/dest/p2p/block_proposal.d.ts.map +1 -1
  353. package/dest/p2p/block_proposal.js +26 -10
  354. package/dest/p2p/checkpoint_attestation.d.ts +6 -1
  355. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  356. package/dest/p2p/checkpoint_attestation.js +1 -1
  357. package/dest/p2p/checkpoint_proposal.d.ts +34 -14
  358. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  359. package/dest/p2p/checkpoint_proposal.js +46 -32
  360. package/dest/p2p/client_type.d.ts +2 -5
  361. package/dest/p2p/client_type.d.ts.map +1 -1
  362. package/dest/p2p/client_type.js +0 -7
  363. package/dest/p2p/consensus_payload.d.ts +15 -5
  364. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  365. package/dest/p2p/consensus_payload.js +22 -18
  366. package/dest/p2p/constants.d.ts +5 -0
  367. package/dest/p2p/constants.d.ts.map +1 -0
  368. package/dest/p2p/constants.js +3 -0
  369. package/dest/p2p/index.d.ts +2 -2
  370. package/dest/p2p/index.d.ts.map +1 -1
  371. package/dest/p2p/index.js +1 -1
  372. package/dest/p2p/message_validator.d.ts +18 -3
  373. package/dest/p2p/message_validator.d.ts.map +1 -1
  374. package/dest/p2p/message_validator.js +2 -1
  375. package/dest/p2p/peer_error.d.ts +3 -1
  376. package/dest/p2p/peer_error.d.ts.map +1 -1
  377. package/dest/p2p/peer_error.js +5 -0
  378. package/dest/p2p/signed_txs.d.ts +3 -1
  379. package/dest/p2p/signed_txs.d.ts.map +1 -1
  380. package/dest/p2p/signed_txs.js +6 -1
  381. package/dest/p2p/topic_type.d.ts +3 -4
  382. package/dest/p2p/topic_type.d.ts.map +1 -1
  383. package/dest/p2p/topic_type.js +7 -23
  384. package/dest/parity/parity_base_private_inputs.d.ts +3 -1
  385. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  386. package/dest/parity/parity_public_inputs.d.ts +4 -1
  387. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  388. package/dest/parity/parity_root_private_inputs.d.ts +2 -1
  389. package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
  390. package/dest/proofs/chonk_proof.d.ts +1 -1
  391. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  392. package/dest/proofs/chonk_proof.js +9 -4
  393. package/dest/proofs/proof.d.ts +4 -1
  394. package/dest/proofs/proof.d.ts.map +1 -1
  395. package/dest/proofs/recursive_proof.d.ts +10 -1
  396. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  397. package/dest/rollup/base_rollup_hints.d.ts +34 -1
  398. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  399. package/dest/rollup/block_constant_data.d.ts +12 -1
  400. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  401. package/dest/rollup/block_headers_hash.js +1 -1
  402. package/dest/rollup/block_merge_rollup_private_inputs.d.ts +4 -1
  403. package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
  404. package/dest/rollup/block_rollup_public_inputs.d.ts +44 -3
  405. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  406. package/dest/rollup/block_rollup_public_inputs.js +2 -2
  407. package/dest/rollup/block_root_rollup_private_inputs.d.ts +64 -1
  408. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  409. package/dest/rollup/checkpoint_constant_data.d.ts +10 -1
  410. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
  411. package/dest/rollup/checkpoint_header.d.ts +31 -4
  412. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  413. package/dest/rollup/checkpoint_header.js +23 -7
  414. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +4 -1
  415. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
  416. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +45 -10
  417. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  418. package/dest/rollup/checkpoint_rollup_public_inputs.js +11 -7
  419. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +44 -3
  420. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  421. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +13 -2
  422. package/dest/rollup/epoch_constant_data.d.ts +16 -1
  423. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  424. package/dest/rollup/root_rollup_private_inputs.d.ts +6 -1
  425. package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
  426. package/dest/rollup/root_rollup_public_inputs.d.ts +17 -7
  427. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  428. package/dest/rollup/root_rollup_public_inputs.js +7 -4
  429. package/dest/rollup/tree_snapshot_diff_hints.d.ts +24 -1
  430. package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
  431. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +4 -1
  432. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
  433. package/dest/rollup/tx_rollup_public_inputs.d.ts +29 -1
  434. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  435. package/dest/schemas/schemas.d.ts +1 -1
  436. package/dest/slashing/empire.d.ts +1 -1
  437. package/dest/slashing/empire.d.ts.map +1 -1
  438. package/dest/slashing/empire.js +2 -0
  439. package/dest/slashing/helpers.d.ts +2 -2
  440. package/dest/slashing/helpers.d.ts.map +1 -1
  441. package/dest/slashing/helpers.js +6 -0
  442. package/dest/slashing/tally.d.ts +8 -2
  443. package/dest/slashing/tally.d.ts.map +1 -1
  444. package/dest/slashing/tally.js +35 -3
  445. package/dest/slashing/types.d.ts +7 -3
  446. package/dest/slashing/types.d.ts.map +1 -1
  447. package/dest/slashing/types.js +13 -1
  448. package/dest/stats/stats.d.ts +1 -3
  449. package/dest/stats/stats.d.ts.map +1 -1
  450. package/dest/tests/factories.d.ts +4 -4
  451. package/dest/tests/factories.d.ts.map +1 -1
  452. package/dest/tests/factories.js +26 -27
  453. package/dest/tests/jest.js +1 -1
  454. package/dest/tests/mocks.d.ts +26 -15
  455. package/dest/tests/mocks.d.ts.map +1 -1
  456. package/dest/tests/mocks.js +75 -47
  457. package/dest/timetable/index.d.ts +37 -0
  458. package/dest/timetable/index.d.ts.map +1 -0
  459. package/dest/timetable/index.js +39 -0
  460. package/dest/trees/append_only_tree_snapshot.d.ts +13 -1
  461. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  462. package/dest/trees/nullifier_leaf.d.ts +13 -1
  463. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  464. package/dest/trees/nullifier_membership_witness.d.ts +10 -1
  465. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  466. package/dest/trees/public_data_leaf.d.ts +17 -1
  467. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  468. package/dest/trees/public_data_leaf.js +7 -6
  469. package/dest/trees/public_data_witness.d.ts +11 -1
  470. package/dest/trees/public_data_witness.d.ts.map +1 -1
  471. package/dest/tx/block_header.d.ts +16 -2
  472. package/dest/tx/block_header.d.ts.map +1 -1
  473. package/dest/tx/block_header.js +10 -2
  474. package/dest/tx/call_context.d.ts +13 -1
  475. package/dest/tx/call_context.d.ts.map +1 -1
  476. package/dest/tx/capsule.d.ts +4 -1
  477. package/dest/tx/capsule.d.ts.map +1 -1
  478. package/dest/tx/execution_payload.d.ts +9 -1
  479. package/dest/tx/execution_payload.d.ts.map +1 -1
  480. package/dest/tx/function_data.d.ts +4 -2
  481. package/dest/tx/function_data.d.ts.map +1 -1
  482. package/dest/tx/global_variables.d.ts +12 -4
  483. package/dest/tx/global_variables.d.ts.map +1 -1
  484. package/dest/tx/hashed_values.d.ts +7 -1
  485. package/dest/tx/hashed_values.d.ts.map +1 -1
  486. package/dest/tx/in_tx.d.ts +4 -4
  487. package/dest/tx/indexed_tx_effect.d.ts +5 -5
  488. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  489. package/dest/tx/indexed_tx_effect.js +3 -2
  490. package/dest/tx/partial_state_reference.d.ts +4 -1
  491. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  492. package/dest/tx/private_execution_result.d.ts +23 -2
  493. package/dest/tx/private_execution_result.d.ts.map +1 -1
  494. package/dest/tx/private_execution_result.js +1 -1
  495. package/dest/tx/private_tx_constant_data.d.ts +16 -1
  496. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  497. package/dest/tx/profiling.d.ts +152 -29
  498. package/dest/tx/profiling.d.ts.map +1 -1
  499. package/dest/tx/profiling.js +47 -10
  500. package/dest/tx/protocol_contracts.d.ts +2 -2
  501. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  502. package/dest/tx/protocol_contracts.js +2 -2
  503. package/dest/tx/public_call_request_with_calldata.d.ts +7 -1
  504. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  505. package/dest/tx/public_simulation_output.d.ts +4 -2
  506. package/dest/tx/public_simulation_output.d.ts.map +1 -1
  507. package/dest/tx/public_simulation_output.js +7 -3
  508. package/dest/tx/simulated_tx.d.ts +5 -2
  509. package/dest/tx/simulated_tx.d.ts.map +1 -1
  510. package/dest/tx/simulated_tx.js +4 -1
  511. package/dest/tx/state_reference.d.ts +3 -1
  512. package/dest/tx/state_reference.d.ts.map +1 -1
  513. package/dest/tx/tx.d.ts +29 -5
  514. package/dest/tx/tx.d.ts.map +1 -1
  515. package/dest/tx/tx.js +24 -9
  516. package/dest/tx/tx_context.d.ts +2 -1
  517. package/dest/tx/tx_context.d.ts.map +1 -1
  518. package/dest/tx/tx_effect.d.ts +32 -6
  519. package/dest/tx/tx_effect.d.ts.map +1 -1
  520. package/dest/tx/tx_effect.js +0 -7
  521. package/dest/tx/tx_execution_request.d.ts +30 -1
  522. package/dest/tx/tx_execution_request.d.ts.map +1 -1
  523. package/dest/tx/tx_hash.d.ts +2 -1
  524. package/dest/tx/tx_hash.d.ts.map +1 -1
  525. package/dest/tx/tx_receipt.d.ts +62 -14
  526. package/dest/tx/tx_receipt.d.ts.map +1 -1
  527. package/dest/tx/tx_receipt.js +55 -16
  528. package/dest/tx/tx_request.d.ts +6 -1
  529. package/dest/tx/tx_request.d.ts.map +1 -1
  530. package/dest/tx/tx_request.js +2 -2
  531. package/dest/tx/validator/empty_validator.d.ts +2 -2
  532. package/dest/tx/validator/empty_validator.d.ts.map +1 -1
  533. package/dest/tx/validator/error_texts.d.ts +7 -2
  534. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  535. package/dest/tx/validator/error_texts.js +7 -1
  536. package/dest/tx/validator/tx_validator.d.ts +2 -2
  537. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  538. package/dest/types/shared.d.ts +4 -1
  539. package/dest/types/shared.d.ts.map +1 -1
  540. package/dest/update-checker/index.d.ts +3 -2
  541. package/dest/update-checker/index.d.ts.map +1 -1
  542. package/dest/update-checker/index.js +2 -1
  543. package/dest/update-checker/package_version.d.ts +3 -0
  544. package/dest/update-checker/package_version.d.ts.map +1 -0
  545. package/dest/update-checker/package_version.js +11 -0
  546. package/dest/update-checker/version_checker.d.ts +25 -0
  547. package/dest/update-checker/version_checker.d.ts.map +1 -0
  548. package/dest/update-checker/version_checker.js +50 -0
  549. package/dest/validators/schemas.d.ts +38 -38
  550. package/dest/validators/schemas.d.ts.map +1 -1
  551. package/dest/validators/schemas.js +4 -3
  552. package/dest/validators/types.d.ts +3 -3
  553. package/dest/validators/types.d.ts.map +1 -1
  554. package/dest/vks/verification_key.d.ts +22 -1
  555. package/dest/vks/verification_key.d.ts.map +1 -1
  556. package/dest/vks/vk_data.d.ts +7 -1
  557. package/dest/vks/vk_data.d.ts.map +1 -1
  558. package/dest/zkpassport/index.d.ts +3 -4
  559. package/dest/zkpassport/index.d.ts.map +1 -1
  560. package/dest/zkpassport/index.js +9 -9
  561. package/package.json +29 -14
  562. package/src/abi/decoder.ts +15 -6
  563. package/src/abi/encoder.ts +49 -6
  564. package/src/abi/event_metadata_definition.ts +2 -0
  565. package/src/abi/function_call.ts +25 -3
  566. package/src/abi/utils.ts +42 -0
  567. package/src/auth_witness/auth_witness.ts +3 -3
  568. package/src/avm/revert_code.ts +15 -0
  569. package/src/block/block_data.ts +26 -0
  570. package/src/block/block_hash.ts +26 -25
  571. package/src/block/block_parameter.ts +4 -2
  572. package/src/block/body.ts +2 -1
  573. package/src/block/checkpointed_l2_block.ts +8 -58
  574. package/src/block/in_block.ts +6 -6
  575. package/src/block/index.ts +1 -2
  576. package/src/block/l2_block.ts +112 -148
  577. package/src/block/l2_block_source.ts +99 -42
  578. package/src/block/l2_block_stream/interfaces.ts +8 -5
  579. package/src/block/l2_block_stream/l2_block_stream.ts +66 -37
  580. package/src/block/l2_block_stream/l2_tips_store_base.ts +2 -2
  581. package/src/block/test/l2_tips_store_test_suite.ts +4 -9
  582. package/src/block/validate_block_result.ts +5 -4
  583. package/src/checkpoint/checkpoint.ts +72 -23
  584. package/src/checkpoint/checkpoint_data.ts +51 -0
  585. package/src/checkpoint/index.ts +2 -0
  586. package/src/checkpoint/published_checkpoint.ts +7 -4
  587. package/src/checkpoint/validate.ts +230 -0
  588. package/src/config/index.ts +1 -0
  589. package/src/config/node-rpc-config.ts +1 -1
  590. package/src/config/sequencer-config.ts +37 -0
  591. package/src/contract/contract_address.ts +4 -4
  592. package/src/contract/contract_class.ts +3 -3
  593. package/src/contract/contract_class_id.ts +6 -5
  594. package/src/contract/index.ts +0 -2
  595. package/src/contract/interfaces/node-info.ts +3 -0
  596. package/src/contract/private_function.ts +3 -4
  597. package/src/contract/private_function_membership_proof.ts +1 -1
  598. package/src/database-version/database_version.ts +87 -0
  599. package/src/database-version/version_manager.ts +1 -77
  600. package/src/delayed_public_mutable/delayed_public_mutable_values.ts +9 -10
  601. package/src/deserialization/index.ts +21 -0
  602. package/src/epoch-helpers/index.ts +13 -1
  603. package/src/file-store/local.ts +15 -5
  604. package/src/file-store/s3.ts +12 -3
  605. package/src/gas/gas_fees.ts +7 -1
  606. package/src/ha-signing/config.ts +156 -0
  607. package/src/ha-signing/index.ts +27 -0
  608. package/src/ha-signing/local_config.ts +46 -0
  609. package/src/ha-signing/types.ts +112 -0
  610. package/src/hash/hash.ts +14 -10
  611. package/src/hash/map_slot.ts +3 -2
  612. package/src/interfaces/allowed_element.ts +29 -9
  613. package/src/interfaces/api_limit.ts +1 -0
  614. package/src/interfaces/archiver.ts +24 -24
  615. package/src/interfaces/aztec-node-admin.ts +26 -2
  616. package/src/interfaces/aztec-node.ts +100 -139
  617. package/src/interfaces/block-builder.ts +64 -26
  618. package/src/interfaces/configs.ts +34 -11
  619. package/src/interfaces/l2_logs_source.ts +17 -4
  620. package/src/interfaces/merkle_tree_operations.ts +1 -1
  621. package/src/interfaces/p2p.ts +3 -14
  622. package/src/interfaces/prover-broker.ts +22 -0
  623. package/src/interfaces/prover-client.ts +22 -0
  624. package/src/interfaces/slasher.ts +4 -0
  625. package/src/interfaces/tx_provider.ts +2 -2
  626. package/src/interfaces/validator.ts +61 -31
  627. package/src/kernel/hints/build_note_hash_read_request_hints.ts +31 -24
  628. package/src/kernel/hints/build_nullifier_read_request_hints.ts +32 -32
  629. package/src/kernel/hints/build_transient_data_hints.ts +17 -2
  630. package/src/kernel/hints/index.ts +2 -2
  631. package/src/kernel/hints/{key_validation_request_and_generator.ts → key_validation_request_and_separator.ts} +12 -15
  632. package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +10 -10
  633. package/src/kernel/private_circuit_public_inputs.ts +14 -14
  634. package/src/kernel/private_kernel_circuit_public_inputs.ts +2 -2
  635. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
  636. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +14 -5
  637. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +5 -5
  638. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +5 -5
  639. package/src/kernel/private_validation_requests.ts +8 -8
  640. package/src/keys/derivation.ts +15 -15
  641. package/src/keys/key_types.ts +6 -2
  642. package/src/keys/public_keys.ts +2 -2
  643. package/src/keys/utils.ts +8 -4
  644. package/src/kv-store/config.ts +36 -0
  645. package/src/kv-store/index.ts +1 -0
  646. package/src/l1-contracts/slash_factory.ts +1 -0
  647. package/src/logs/debug_log_store.ts +54 -0
  648. package/src/logs/{directional_app_tagging_secret.ts → extended_directional_app_tagging_secret.ts} +24 -16
  649. package/src/logs/index.ts +2 -1
  650. package/src/logs/log_id.ts +22 -18
  651. package/src/logs/pre_tag.ts +5 -5
  652. package/src/logs/public_log.ts +4 -2
  653. package/src/logs/siloed_tag.ts +10 -4
  654. package/src/logs/tag.ts +1 -1
  655. package/src/messaging/l2_to_l1_membership.ts +8 -6
  656. package/src/messaging/out_hash.ts +60 -29
  657. package/src/note/index.ts +0 -1
  658. package/src/note/note_dao.ts +18 -13
  659. package/src/p2p/attestation_utils.ts +56 -0
  660. package/src/p2p/block_proposal.ts +36 -15
  661. package/src/p2p/checkpoint_attestation.ts +6 -1
  662. package/src/p2p/checkpoint_proposal.ts +74 -41
  663. package/src/p2p/client_type.ts +0 -6
  664. package/src/p2p/consensus_payload.ts +25 -17
  665. package/src/p2p/constants.ts +6 -0
  666. package/src/p2p/index.ts +1 -1
  667. package/src/p2p/message_validator.ts +14 -2
  668. package/src/p2p/peer_error.ts +7 -0
  669. package/src/p2p/signed_txs.ts +6 -1
  670. package/src/p2p/topic_type.ts +8 -15
  671. package/src/proofs/chonk_proof.ts +9 -5
  672. package/src/rollup/block_headers_hash.ts +1 -1
  673. package/src/rollup/block_rollup_public_inputs.ts +2 -2
  674. package/src/rollup/checkpoint_header.ts +22 -2
  675. package/src/rollup/checkpoint_rollup_public_inputs.ts +16 -10
  676. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +14 -1
  677. package/src/rollup/root_rollup_public_inputs.ts +11 -8
  678. package/src/slashing/empire.ts +3 -1
  679. package/src/slashing/helpers.ts +8 -0
  680. package/src/slashing/tally.ts +41 -2
  681. package/src/slashing/types.ts +14 -0
  682. package/src/stats/stats.ts +0 -2
  683. package/src/tests/factories.ts +32 -43
  684. package/src/tests/jest.ts +1 -1
  685. package/src/tests/mocks.ts +106 -60
  686. package/src/timetable/index.ts +66 -0
  687. package/src/trees/public_data_leaf.ts +11 -5
  688. package/src/tx/block_header.ts +18 -4
  689. package/src/tx/global_variables.ts +3 -3
  690. package/src/tx/indexed_tx_effect.ts +3 -2
  691. package/src/tx/private_execution_result.ts +1 -1
  692. package/src/tx/profiling.ts +51 -9
  693. package/src/tx/protocol_contracts.ts +2 -2
  694. package/src/tx/public_simulation_output.ts +4 -0
  695. package/src/tx/simulated_tx.ts +8 -1
  696. package/src/tx/tx.ts +28 -20
  697. package/src/tx/tx_effect.ts +0 -9
  698. package/src/tx/tx_receipt.ts +85 -18
  699. package/src/tx/tx_request.ts +2 -2
  700. package/src/tx/validator/empty_validator.ts +1 -1
  701. package/src/tx/validator/error_texts.ts +8 -1
  702. package/src/tx/validator/tx_validator.ts +1 -1
  703. package/src/update-checker/index.ts +2 -1
  704. package/src/update-checker/package_version.ts +17 -0
  705. package/src/update-checker/version_checker.ts +65 -0
  706. package/src/validators/schemas.ts +8 -1
  707. package/src/validators/types.ts +5 -4
  708. package/src/zkpassport/index.ts +11 -12
  709. package/dest/block/l2_block_code_to_purge.d.ts +0 -11
  710. package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
  711. package/dest/block/l2_block_code_to_purge.js +0 -55
  712. package/dest/block/l2_block_header.d.ts +0 -94
  713. package/dest/block/l2_block_header.d.ts.map +0 -1
  714. package/dest/block/l2_block_header.js +0 -160
  715. package/dest/block/l2_block_new.d.ts +0 -134
  716. package/dest/block/l2_block_new.d.ts.map +0 -1
  717. package/dest/block/l2_block_new.js +0 -155
  718. package/dest/contract/contract_class_metadata.d.ts +0 -8
  719. package/dest/contract/contract_class_metadata.d.ts.map +0 -1
  720. package/dest/contract/contract_class_metadata.js +0 -1
  721. package/dest/contract/contract_metadata.d.ts +0 -7
  722. package/dest/contract/contract_metadata.d.ts.map +0 -1
  723. package/dest/contract/contract_metadata.js +0 -1
  724. package/dest/database-version/index.d.ts +0 -2
  725. package/dest/database-version/index.d.ts.map +0 -1
  726. package/dest/database-version/index.js +0 -1
  727. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -25
  728. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
  729. package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
  730. package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
  731. package/dest/note/notes_filter.d.ts +0 -27
  732. package/dest/note/notes_filter.d.ts.map +0 -1
  733. package/dest/note/notes_filter.js +0 -11
  734. package/dest/update-checker/update-checker.d.ts +0 -49
  735. package/dest/update-checker/update-checker.d.ts.map +0 -1
  736. package/dest/update-checker/update-checker.js +0 -130
  737. package/src/block/l2_block_code_to_purge.ts +0 -80
  738. package/src/block/l2_block_header.ts +0 -255
  739. package/src/block/l2_block_new.ts +0 -211
  740. package/src/contract/contract_class_metadata.ts +0 -8
  741. package/src/contract/contract_metadata.ts +0 -7
  742. package/src/database-version/index.ts +0 -1
  743. package/src/note/notes_filter.ts +0 -38
  744. package/src/update-checker/update-checker.ts +0 -166
@@ -6,9 +6,35 @@ import { z } from 'zod';
6
6
  import type { AztecNode } from '../interfaces/aztec-node.js';
7
7
  import { type PrivateExecutionStep, PrivateExecutionStepSchema } from '../kernel/private_kernel_prover_output.js';
8
8
 
9
- export type NodeStats = Partial<Record<keyof AztecNode, { times: number[] }>>;
9
+ export type RoundTripStats = {
10
+ /** Number of round trips (times we blocked waiting for node responses) */
11
+ roundTrips: number;
12
+ /** Total wall-clock time spent waiting on node (excludes parallel overlap) */
13
+ totalBlockingTime: number;
14
+ /** Individual round trip durations */
15
+ roundTripDurations: number[];
16
+ /** Methods called in each round trip (parallel calls grouped together) */
17
+ roundTripMethods: string[][];
18
+ };
19
+
20
+ const RoundTripStatsSchema = z.object({
21
+ roundTrips: z.number(),
22
+ totalBlockingTime: z.number(),
23
+ roundTripDurations: z.array(z.number()),
24
+ roundTripMethods: z.array(z.array(z.string())),
25
+ });
26
+
27
+ export type NodeStats = {
28
+ /** Per-method call stats */
29
+ perMethod: Partial<Record<keyof AztecNode, { times: number[] }>>;
30
+ /** Round trip stats tracking actual blocking waits */
31
+ roundTrips: RoundTripStats;
32
+ };
10
33
 
11
- const NodeStatsSchema = z.record(z.string(), z.object({ times: z.array(z.number()) }));
34
+ const NodeStatsSchema = z.object({
35
+ perMethod: z.record(z.string(), z.object({ times: z.array(z.number()) })),
36
+ roundTrips: RoundTripStatsSchema,
37
+ });
12
38
 
13
39
  type FunctionTiming = {
14
40
  functionName: string;
@@ -105,7 +131,15 @@ export class TxProfileResult {
105
131
  },
106
132
  ],
107
133
  {
108
- nodeRPCCalls: { getBlockHeader: { times: [1] } },
134
+ nodeRPCCalls: {
135
+ perMethod: { getBlockHeader: { times: [1] } },
136
+ roundTrips: {
137
+ roundTrips: 1,
138
+ totalBlockingTime: 1,
139
+ roundTripDurations: [1],
140
+ roundTripMethods: [['getBlockHeader']],
141
+ },
142
+ },
109
143
  timings: {
110
144
  sync: 1,
111
145
  proving: 1,
@@ -123,24 +157,32 @@ export class TxProfileResult {
123
157
  }
124
158
  }
125
159
 
126
- export class UtilitySimulationResult {
160
+ export class UtilityExecutionResult {
127
161
  constructor(
128
162
  public result: Fr[],
129
163
  public stats?: SimulationStats,
130
164
  ) {}
131
165
 
132
- static get schema(): ZodFor<UtilitySimulationResult> {
166
+ static get schema(): ZodFor<UtilityExecutionResult> {
133
167
  return z
134
168
  .object({
135
169
  result: z.array(schemas.Fr),
136
170
  stats: optional(SimulationStatsSchema),
137
171
  })
138
- .transform(({ result, stats }) => new UtilitySimulationResult(result, stats));
172
+ .transform(({ result, stats }) => new UtilityExecutionResult(result, stats));
139
173
  }
140
174
 
141
- static random(): UtilitySimulationResult {
142
- return new UtilitySimulationResult([Fr.random()], {
143
- nodeRPCCalls: { getBlockHeader: { times: [1] } },
175
+ static random(): UtilityExecutionResult {
176
+ return new UtilityExecutionResult([Fr.random()], {
177
+ nodeRPCCalls: {
178
+ perMethod: { getBlockHeader: { times: [1] } },
179
+ roundTrips: {
180
+ roundTrips: 1,
181
+ totalBlockingTime: 1,
182
+ roundTripDurations: [1],
183
+ roundTripMethods: [['getBlockHeader']],
184
+ },
185
+ },
144
186
  timings: {
145
187
  sync: 1,
146
188
  publicSimulation: 1,
@@ -1,4 +1,4 @@
1
- import { GeneratorIndex, MAX_PROTOCOL_CONTRACTS } from '@aztec/constants';
1
+ import { DomainSeparator, MAX_PROTOCOL_CONTRACTS } from '@aztec/constants';
2
2
  import { makeTuple } from '@aztec/foundation/array';
3
3
  import { arraySerializedSizeOfNonEmpty } from '@aztec/foundation/collection';
4
4
  import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
@@ -71,7 +71,7 @@ export class ProtocolContracts {
71
71
  }
72
72
 
73
73
  hash() {
74
- return poseidon2HashWithSeparator(this.derivedAddresses, GeneratorIndex.PROTOCOL_CONTRACTS);
74
+ return poseidon2HashWithSeparator(this.derivedAddresses, DomainSeparator.PROTOCOL_CONTRACTS);
75
75
  }
76
76
 
77
77
  static get schema() {
@@ -7,6 +7,7 @@ import { z } from 'zod';
7
7
  import { SimulationError } from '../errors/simulation_error.js';
8
8
  import { Gas } from '../gas/gas.js';
9
9
  import type { GasUsed } from '../gas/gas_used.js';
10
+ import { DebugLog } from '../logs/debug_log.js';
10
11
  import { NullishToUndefined } from '../schemas/schemas.js';
11
12
  import { TxEffect } from '../tx/tx_effect.js';
12
13
  import { GlobalVariables } from './global_variables.js';
@@ -71,6 +72,7 @@ export class PublicSimulationOutput {
71
72
  public txEffect: TxEffect,
72
73
  public publicReturnValues: NestedProcessReturnValues[],
73
74
  public gasUsed: GasUsed,
75
+ public debugLogs: DebugLog[] = [],
74
76
  ) {}
75
77
 
76
78
  static get schema(): ZodFor<PublicSimulationOutput> {
@@ -86,6 +88,7 @@ export class PublicSimulationOutput {
86
88
  publicGas: Gas.schema,
87
89
  billedGas: Gas.schema,
88
90
  }),
91
+ debugLogs: z.array(DebugLog.schema).default([]),
89
92
  })
90
93
  .transform(
91
94
  fields =>
@@ -95,6 +98,7 @@ export class PublicSimulationOutput {
95
98
  fields.txEffect,
96
99
  fields.publicReturnValues,
97
100
  fields.gasUsed,
101
+ fields.debugLogs,
98
102
  ),
99
103
  );
100
104
  }
@@ -12,9 +12,11 @@ import { Gas } from '../gas/gas.js';
12
12
  import type { GasUsed } from '../gas/gas_used.js';
13
13
  import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
14
14
  import { ChonkProof } from '../proofs/chonk_proof.js';
15
+ import type { OffchainEffect } from './offchain_effect.js';
15
16
  import {
16
17
  PrivateCallExecutionResult,
17
18
  PrivateExecutionResult,
19
+ collectOffchainEffects,
18
20
  collectSortedContractClassLogs,
19
21
  } from './private_execution_result.js';
20
22
  import { type SimulationStats, SimulationStatsSchema } from './profiling.js';
@@ -84,6 +86,11 @@ export class TxSimulationResult {
84
86
  public stats?: SimulationStats,
85
87
  ) {}
86
88
 
89
+ /** Returns offchain effects collected from private execution. */
90
+ get offchainEffects(): OffchainEffect[] {
91
+ return collectOffchainEffects(this.privateExecutionResult);
92
+ }
93
+
87
94
  get gasUsed(): GasUsed {
88
95
  return (
89
96
  this.publicOutput?.gasUsed ?? {
@@ -106,7 +113,7 @@ export class TxSimulationResult {
106
113
  .transform(TxSimulationResult.from);
107
114
  }
108
115
 
109
- static from(fields: Omit<FieldsOf<TxSimulationResult>, 'gasUsed'>) {
116
+ static from(fields: Omit<FieldsOf<TxSimulationResult>, 'gasUsed' | 'offchainEffects'>) {
110
117
  return new TxSimulationResult(
111
118
  fields.privateExecutionResult,
112
119
  fields.publicInputs,
package/src/tx/tx.ts CHANGED
@@ -1,9 +1,9 @@
1
+ import { DA_GAS_PER_FIELD, TX_DA_GAS_OVERHEAD } from '@aztec/constants';
1
2
  import { Buffer32 } from '@aztec/foundation/buffer';
2
- import { arraySerializedSizeOfNonEmpty } from '@aztec/foundation/collection';
3
3
  import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import type { ZodFor } from '@aztec/foundation/schemas';
5
5
  import { BufferReader, serializeArrayOfBufferableToVector, serializeToBuffer } from '@aztec/foundation/serialize';
6
- import type { FieldsOf } from '@aztec/foundation/types';
6
+ import { type FieldsOf, unfreeze } from '@aztec/foundation/types';
7
7
 
8
8
  import { z } from 'zod';
9
9
 
@@ -247,7 +247,7 @@ export class Tx extends Gossipable {
247
247
  contractClassLogSize: this.data.getEmittedContractClassLogsLength(),
248
248
 
249
249
  proofSize: this.chonkProof.fields.length,
250
- size: this.toBuffer().length,
250
+ size: this.getSize(),
251
251
 
252
252
  feePaymentMethod:
253
253
  // needsSetup? then we pay through a fee payment contract
@@ -255,26 +255,34 @@ export class Tx extends Gossipable {
255
255
  };
256
256
  }
257
257
 
258
- getSize() {
259
- return (
260
- this.data.getSize() +
261
- this.chonkProof.fields.length * Fr.SIZE_IN_BYTES +
262
- arraySerializedSizeOfNonEmpty(this.contractClassLogFields) +
263
- this.publicFunctionCalldata.reduce((accum, cd) => accum + cd.getSize(), 0)
264
- );
258
+ private sizeCache: number | undefined;
259
+
260
+ getSize(): number {
261
+ if (this.sizeCache == undefined) {
262
+ this.sizeCache = this.toBuffer().length;
263
+ }
264
+ return this.sizeCache;
265
265
  }
266
266
 
267
267
  /**
268
- * Estimates the tx size based on its private effects. Note that the actual size of the tx
269
- * after processing will probably be larger, as public execution would generate more data.
268
+ * Returns the number of fields this tx's effects will occupy in the blob,
269
+ * based on its private side effects only. Accurate for txs without public calls.
270
+ * For txs with public calls, the actual size will be larger due to public execution outputs.
270
271
  */
271
- getEstimatedPrivateTxEffectsSize() {
272
- return (
273
- this.data.getNonEmptyNoteHashes().length * Fr.SIZE_IN_BYTES +
274
- this.data.getNonEmptyNullifiers().length * Fr.SIZE_IN_BYTES +
275
- this.data.getEmittedPrivateLogsLength() * Fr.SIZE_IN_BYTES +
276
- this.data.getEmittedContractClassLogsLength() * Fr.SIZE_IN_BYTES
277
- );
272
+ getPrivateTxEffectsSizeInFields(): number {
273
+ // 3 fields overhead: tx_start_marker, tx_hash, tx_fee.
274
+ // TX_DA_GAS_OVERHEAD is defined as N * DA_GAS_PER_FIELD, so this division is always exact.
275
+ const overheadFields = TX_DA_GAS_OVERHEAD / DA_GAS_PER_FIELD;
276
+ const noteHashes = this.data.getNonEmptyNoteHashes().length;
277
+ const nullifiers = this.data.getNonEmptyNullifiers().length;
278
+ const l2ToL1Msgs = this.data.getNonEmptyL2ToL1Msgs().length;
279
+ // Each private log occupies (emittedLength + 1) fields: content + length field
280
+ const privateLogFields = this.data.getNonEmptyPrivateLogs().reduce((acc, log) => acc + log.emittedLength + 1, 0);
281
+ // Each contract class log occupies (length + 1) fields: content + contract address
282
+ const contractClassLogFields = this.data
283
+ .getNonEmptyContractClassLogsHashes()
284
+ .reduce((acc, log) => acc + log.logHash.length + 1, 0);
285
+ return overheadFields + noteHashes + nullifiers + l2ToL1Msgs + privateLogFields + contractClassLogFields;
278
286
  }
279
287
 
280
288
  /**
@@ -310,7 +318,7 @@ export class Tx extends Gossipable {
310
318
 
311
319
  /** Recomputes the tx hash. Used for testing purposes only when a property of the tx was mutated. */
312
320
  public async recomputeHash(): Promise<TxHash> {
313
- (this as any).txHash = await Tx.computeTxHash(this);
321
+ unfreeze(this).txHash = await Tx.computeTxHash(this);
314
322
  return this.txHash;
315
323
  }
316
324
 
@@ -28,7 +28,6 @@ import { RevertCode } from '../avm/revert_code.js';
28
28
  import { ContractClassLog } from '../logs/contract_class_log.js';
29
29
  import { PrivateLog } from '../logs/private_log.js';
30
30
  import { FlatPublicLogs, PublicLog } from '../logs/public_log.js';
31
- import { computeTxOutHash } from '../messaging/out_hash.js';
32
31
  import { TxHash } from './tx_hash.js';
33
32
 
34
33
  export class TxEffect {
@@ -184,14 +183,6 @@ export class TxEffect {
184
183
  );
185
184
  }
186
185
 
187
- /**
188
- * Computes txOutHash of this tx effect.
189
- * @dev Follows new_sha in unbalanced_merkle_tree.nr
190
- */
191
- txOutHash(): Fr {
192
- return computeTxOutHash(this.l2ToL1Msgs);
193
- }
194
-
195
186
  static async random({
196
187
  numNoteHashes,
197
188
  numNullifiers,
@@ -1,19 +1,35 @@
1
1
  import { BlockNumber, BlockNumberSchema } from '@aztec/foundation/branded-types';
2
- import type { FieldsOf } from '@aztec/foundation/types';
3
2
 
4
3
  import { z } from 'zod';
5
4
 
6
5
  import { RevertCode } from '../avm/revert_code.js';
7
- import { L2BlockHash } from '../block/block_hash.js';
6
+ import { BlockHash } from '../block/block_hash.js';
7
+ import { DebugLog } from '../logs/debug_log.js';
8
8
  import { type ZodFor, schemas } from '../schemas/schemas.js';
9
9
  import { TxHash } from './tx_hash.js';
10
10
 
11
- /**
12
- * Possible status of a transaction.
13
- */
11
+ /** Block inclusion/finalization status. */
14
12
  export enum TxStatus {
15
13
  DROPPED = 'dropped',
16
14
  PENDING = 'pending',
15
+ PROPOSED = 'proposed',
16
+ CHECKPOINTED = 'checkpointed',
17
+ PROVEN = 'proven',
18
+ FINALIZED = 'finalized', // TODO(#13569): Implement finalized status properly
19
+ }
20
+
21
+ /** Tx status sorted by finalization progress. */
22
+ export const SortedTxStatuses: TxStatus[] = [
23
+ TxStatus.DROPPED,
24
+ TxStatus.PENDING,
25
+ TxStatus.PROPOSED,
26
+ TxStatus.CHECKPOINTED,
27
+ TxStatus.PROVEN,
28
+ TxStatus.FINALIZED,
29
+ ];
30
+
31
+ /** Execution result - only set when tx is in a block. */
32
+ export enum TxExecutionResult {
17
33
  SUCCESS = 'success',
18
34
  APP_LOGIC_REVERTED = 'app_logic_reverted',
19
35
  TEARDOWN_REVERTED = 'teardown_reverted',
@@ -30,20 +46,58 @@ export class TxReceipt {
30
46
  constructor(
31
47
  /** A unique identifier for a transaction. */
32
48
  public txHash: TxHash,
33
- /** The transaction's status. */
49
+ /** The transaction's block finalization status. */
34
50
  public status: TxStatus,
51
+ /** The execution result of the transaction, only set when tx is in a block. */
52
+ public executionResult: TxExecutionResult | undefined,
35
53
  /** Description of transaction error, if any. */
36
- public error: string,
54
+ public error: string | undefined,
37
55
  /** The transaction fee paid for the transaction. */
38
56
  public transactionFee?: bigint,
39
57
  /** The hash of the block containing the transaction. */
40
- public blockHash?: L2BlockHash,
58
+ public blockHash?: BlockHash,
41
59
  /** The block number in which the transaction was included. */
42
60
  public blockNumber?: BlockNumber,
61
+ /**
62
+ * Debug logs collected during public function execution. Served only when the node is in test mode and placed on
63
+ * the receipt only because it's a convenient place for it (the logs are printed out by the wallet when a mined
64
+ * tx receipt is obtained).
65
+ */
66
+ public debugLogs?: DebugLog[],
43
67
  ) {}
44
68
 
69
+ /** Returns true if the transaction was executed successfully. */
70
+ hasExecutionSucceeded(): boolean {
71
+ return this.executionResult === TxExecutionResult.SUCCESS;
72
+ }
73
+
74
+ /** Returns true if the transaction execution reverted. */
75
+ hasExecutionReverted(): boolean {
76
+ return this.executionResult !== undefined && this.executionResult !== TxExecutionResult.SUCCESS;
77
+ }
78
+
79
+ /** Returns true if the transaction has been included in a block (proposed, checkpointed, proven, or finalized). */
80
+ isMined(): boolean {
81
+ return (
82
+ this.status === TxStatus.PROPOSED ||
83
+ this.status === TxStatus.CHECKPOINTED ||
84
+ this.status === TxStatus.PROVEN ||
85
+ this.status === TxStatus.FINALIZED
86
+ );
87
+ }
88
+
89
+ /** Returns true if the transaction is pending. */
90
+ isPending(): boolean {
91
+ return this.status === TxStatus.PENDING;
92
+ }
93
+
94
+ /** Returns true if the transaction was dropped. */
95
+ isDropped(): boolean {
96
+ return this.status === TxStatus.DROPPED;
97
+ }
98
+
45
99
  static empty() {
46
- return new TxReceipt(TxHash.zero(), TxStatus.DROPPED, '');
100
+ return new TxReceipt(TxHash.zero(), TxStatus.DROPPED, undefined, undefined);
47
101
  }
48
102
 
49
103
  static get schema(): ZodFor<TxReceipt> {
@@ -51,34 +105,47 @@ export class TxReceipt {
51
105
  .object({
52
106
  txHash: TxHash.schema,
53
107
  status: z.nativeEnum(TxStatus),
54
- error: z.string(),
55
- blockHash: L2BlockHash.schema.optional(),
108
+ executionResult: z.nativeEnum(TxExecutionResult).optional(),
109
+ error: z.string().optional(),
110
+ blockHash: BlockHash.schema.optional(),
56
111
  blockNumber: BlockNumberSchema.optional(),
57
112
  transactionFee: schemas.BigInt.optional(),
113
+ debugLogs: z.array(DebugLog.schema).optional(),
58
114
  })
59
- .transform(TxReceipt.from);
115
+ .transform(fields => TxReceipt.from(fields));
60
116
  }
61
117
 
62
- static from(fields: FieldsOf<TxReceipt>) {
118
+ static from(fields: {
119
+ txHash: TxHash;
120
+ status: TxStatus;
121
+ executionResult?: TxExecutionResult;
122
+ error?: string;
123
+ transactionFee?: bigint;
124
+ blockHash?: BlockHash;
125
+ blockNumber?: BlockNumber;
126
+ debugLogs?: DebugLog[];
127
+ }) {
63
128
  return new TxReceipt(
64
129
  fields.txHash,
65
130
  fields.status,
131
+ fields.executionResult,
66
132
  fields.error,
67
133
  fields.transactionFee,
68
134
  fields.blockHash,
69
135
  fields.blockNumber,
136
+ fields.debugLogs,
70
137
  );
71
138
  }
72
139
 
73
- public static statusFromRevertCode(revertCode: RevertCode) {
140
+ public static executionResultFromRevertCode(revertCode: RevertCode): TxExecutionResult {
74
141
  if (revertCode.equals(RevertCode.OK)) {
75
- return TxStatus.SUCCESS;
142
+ return TxExecutionResult.SUCCESS;
76
143
  } else if (revertCode.equals(RevertCode.APP_LOGIC_REVERTED)) {
77
- return TxStatus.APP_LOGIC_REVERTED;
144
+ return TxExecutionResult.APP_LOGIC_REVERTED;
78
145
  } else if (revertCode.equals(RevertCode.TEARDOWN_REVERTED)) {
79
- return TxStatus.TEARDOWN_REVERTED;
146
+ return TxExecutionResult.TEARDOWN_REVERTED;
80
147
  } else if (revertCode.equals(RevertCode.BOTH_REVERTED)) {
81
- return TxStatus.BOTH_REVERTED;
148
+ return TxExecutionResult.BOTH_REVERTED;
82
149
  } else {
83
150
  throw new Error(`Unknown revert code: ${revertCode.getCode()}`);
84
151
  }
@@ -1,4 +1,4 @@
1
- import { GeneratorIndex, TX_REQUEST_LENGTH } from '@aztec/constants';
1
+ import { DomainSeparator, TX_REQUEST_LENGTH } from '@aztec/constants';
2
2
  import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
3
3
  import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { BufferReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
@@ -68,7 +68,7 @@ export class TxRequest {
68
68
  }
69
69
 
70
70
  hash() {
71
- return poseidon2HashWithSeparator(this.toFields(), GeneratorIndex.TX_REQUEST);
71
+ return poseidon2HashWithSeparator(this.toFields(), DomainSeparator.TX_REQUEST);
72
72
  }
73
73
 
74
74
  static empty() {
@@ -1,6 +1,6 @@
1
1
  import type { AnyTx, TxValidationResult, TxValidator } from './tx_validator.js';
2
2
 
3
- export class EmptyTxValidator<T extends AnyTx = AnyTx> implements TxValidator<T> {
3
+ export class EmptyTxValidator<T = AnyTx> implements TxValidator<T> {
4
4
  public validateTx(_tx: T): Promise<TxValidationResult> {
5
5
  return Promise.resolve({ result: 'valid' });
6
6
  }
@@ -6,13 +6,17 @@ export const TX_ERROR_GAS_LIMIT_TOO_HIGH = 'Gas limit is higher than the amount
6
6
 
7
7
  // Phases
8
8
  export const TX_ERROR_SETUP_FUNCTION_NOT_ALLOWED = 'Setup function not on allow list';
9
+ export const TX_ERROR_SETUP_FUNCTION_UNKNOWN_CONTRACT = 'Setup function targets unknown contract';
10
+ export const TX_ERROR_SETUP_ONLY_SELF_WRONG_SENDER = 'Setup only_self function called with incorrect msg_sender';
11
+ export const TX_ERROR_SETUP_NULL_MSG_SENDER = 'Setup function called with null msg sender';
12
+ export const TX_ERROR_SETUP_WRONG_CALLDATA_LENGTH = 'Setup function called with wrong calldata length';
9
13
 
10
14
  // Nullifiers
11
15
  export const TX_ERROR_DUPLICATE_NULLIFIER_IN_TX = 'Duplicate nullifier in tx';
12
16
  export const TX_ERROR_EXISTING_NULLIFIER = 'Existing nullifier';
13
17
 
14
18
  // Metadata
15
- export const TX_ERROR_INVALID_INCLUDE_BY_TIMESTAMP = 'Invalid expiration timestamp';
19
+ export const TX_ERROR_INVALID_EXPIRATION_TIMESTAMP = 'Invalid expiration timestamp';
16
20
  export const TX_ERROR_INCORRECT_L1_CHAIN_ID = 'Incorrect L1 chain id';
17
21
  export const TX_ERROR_INCORRECT_ROLLUP_VERSION = 'Incorrect rollup version';
18
22
  export const TX_ERROR_INCORRECT_VK_TREE_ROOT = 'Incorrect verification keys tree root';
@@ -31,6 +35,9 @@ export const TX_ERROR_CONTRACT_CLASS_LOGS = 'Mismatched contract class logs';
31
35
  export const TX_ERROR_CONTRACT_CLASS_LOG_SORTING = 'Incorrectly sorted contract class logs';
32
36
  export const TX_ERROR_INCORRECT_HASH = 'Incorrect tx hash';
33
37
 
38
+ // Size
39
+ export const TX_ERROR_SIZE_ABOVE_LIMIT = 'Transaction size above size limit';
40
+
34
41
  // Block header
35
42
  export const TX_ERROR_BLOCK_HEADER = 'Block header not found';
36
43
 
@@ -20,7 +20,7 @@ export type TxValidationResult =
20
20
  | { result: 'invalid'; reason: string[] }
21
21
  | { result: 'skipped'; reason: string[] };
22
22
 
23
- export interface TxValidator<T extends AnyTx = AnyTx> {
23
+ export interface TxValidator<T = AnyTx> {
24
24
  validateTx(tx: T): Promise<TxValidationResult>;
25
25
  }
26
26
 
@@ -1 +1,2 @@
1
- export { UpdateChecker, getPackageVersion } from './update-checker.js';
1
+ export * from './package_version.js';
2
+ export * from './version_checker.js';
@@ -0,0 +1,17 @@
1
+ import { fileURLToPath } from '@aztec/foundation/url';
2
+
3
+ import { readFileSync } from 'fs';
4
+ import { dirname, resolve } from 'path';
5
+
6
+ /** Returns the package version from the release-please manifest, or undefined if not found. */
7
+ export function getPackageVersion(): string | undefined {
8
+ try {
9
+ const releasePleaseManifestPath = resolve(
10
+ dirname(fileURLToPath(import.meta.url)),
11
+ '../../../../.release-please-manifest.json',
12
+ );
13
+ return JSON.parse(readFileSync(releasePleaseManifestPath).toString())['.'];
14
+ } catch {
15
+ return undefined;
16
+ }
17
+ }
@@ -0,0 +1,65 @@
1
+ import { createLogger } from '@aztec/foundation/log';
2
+ import { RunningPromise } from '@aztec/foundation/promise';
3
+
4
+ import { EventEmitter } from 'node:events';
5
+
6
+ export type EventMap = {
7
+ newVersion: [{ name: string; currentVersion: string; latestVersion: string }];
8
+ };
9
+
10
+ export type VersionCheck = {
11
+ name: string;
12
+ currentVersion: string;
13
+ getLatestVersion: () => Promise<string | undefined>;
14
+ };
15
+
16
+ export class VersionChecker extends EventEmitter<EventMap> {
17
+ private runningPromise: RunningPromise;
18
+ constructor(
19
+ private checks: Array<VersionCheck>,
20
+ intervalCheckMs = 60_000,
21
+ private logger = createLogger('version_checker'),
22
+ ) {
23
+ super();
24
+ this.runningPromise = new RunningPromise(this.run, logger, intervalCheckMs);
25
+ }
26
+
27
+ public start(): void {
28
+ if (this.runningPromise.isRunning()) {
29
+ this.logger.warn('VersionChecker is already running');
30
+ return;
31
+ }
32
+
33
+ this.runningPromise.start();
34
+ this.logger.info('Version check started');
35
+ }
36
+
37
+ public trigger(): Promise<void> {
38
+ return this.runningPromise.trigger();
39
+ }
40
+
41
+ public async stop(): Promise<void> {
42
+ if (!this.runningPromise.isRunning()) {
43
+ this.logger.warn('VersionChecker is not running');
44
+ return;
45
+ }
46
+
47
+ await this.runningPromise.stop();
48
+ this.logger.info('Version checker stopped');
49
+ }
50
+
51
+ private run = async () => {
52
+ await Promise.allSettled(this.checks.map(check => this.checkVersion(check)));
53
+ };
54
+
55
+ private async checkVersion({ name, currentVersion, getLatestVersion }: VersionCheck): Promise<void> {
56
+ try {
57
+ const latestVersion = await getLatestVersion();
58
+ if (latestVersion && latestVersion !== currentVersion) {
59
+ this.emit('newVersion', { name, latestVersion, currentVersion });
60
+ }
61
+ } catch (err) {
62
+ this.logger.warn(`Error checking for new ${name} versions: ${err}`, { err });
63
+ }
64
+ }
65
+ }
@@ -12,7 +12,14 @@ import type {
12
12
  } from './types.js';
13
13
 
14
14
  export const ValidatorStatusInSlotSchema = zodFor<ValidatorStatusInSlot>()(
15
- z.enum(['block-mined', 'block-proposed', 'block-missed', 'attestation-sent', 'attestation-missed']),
15
+ z.enum([
16
+ 'checkpoint-mined',
17
+ 'checkpoint-proposed',
18
+ 'checkpoint-missed',
19
+ 'blocks-missed',
20
+ 'attestation-sent',
21
+ 'attestation-missed',
22
+ ]),
16
23
  );
17
24
 
18
25
  export const ValidatorStatusHistorySchema = zodFor<ValidatorStatusHistory>()(
@@ -1,12 +1,13 @@
1
1
  import type { EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
2
2
  import type { EthAddress } from '@aztec/foundation/eth-address';
3
3
 
4
- export type ValidatorStatusType = 'block' | 'attestation';
4
+ export type ValidatorStatusType = 'proposer' | 'attestation';
5
5
 
6
6
  export type ValidatorStatusInSlot =
7
- | 'block-mined'
8
- | 'block-proposed'
9
- | 'block-missed'
7
+ | 'checkpoint-mined'
8
+ | 'checkpoint-proposed'
9
+ | 'checkpoint-missed'
10
+ | 'blocks-missed'
10
11
  | 'attestation-sent'
11
12
  | 'attestation-missed';
12
13