@aztec/stdlib 0.0.1-commit.04852196a → 0.0.1-commit.04d373f

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 (898) hide show
  1. package/dest/abi/abi.d.ts +142 -1081
  2. package/dest/abi/abi.d.ts.map +1 -1
  3. package/dest/abi/abi.js +41 -18
  4. package/dest/abi/authorization_selector.d.ts +4 -7
  5. package/dest/abi/authorization_selector.d.ts.map +1 -1
  6. package/dest/abi/buffer.d.ts +14 -4
  7. package/dest/abi/buffer.d.ts.map +1 -1
  8. package/dest/abi/buffer.js +25 -4
  9. package/dest/abi/contract_artifact.d.ts +1 -1
  10. package/dest/abi/contract_artifact.d.ts.map +1 -1
  11. package/dest/abi/contract_artifact.js +14 -7
  12. package/dest/abi/decoder.d.ts +5 -44
  13. package/dest/abi/decoder.d.ts.map +1 -1
  14. package/dest/abi/decoder.js +12 -67
  15. package/dest/abi/encoder.d.ts +1 -1
  16. package/dest/abi/encoder.d.ts.map +1 -1
  17. package/dest/abi/encoder.js +32 -6
  18. package/dest/abi/event_selector.d.ts +4 -7
  19. package/dest/abi/event_selector.d.ts.map +1 -1
  20. package/dest/abi/function_call.d.ts +7 -25
  21. package/dest/abi/function_call.d.ts.map +1 -1
  22. package/dest/abi/function_selector.d.ts +3 -6
  23. package/dest/abi/function_selector.d.ts.map +1 -1
  24. package/dest/abi/function_selector.js +2 -4
  25. package/dest/abi/function_signature_decoder.d.ts +43 -0
  26. package/dest/abi/function_signature_decoder.d.ts.map +1 -0
  27. package/dest/abi/function_signature_decoder.js +66 -0
  28. package/dest/abi/index.d.ts +2 -1
  29. package/dest/abi/index.d.ts.map +1 -1
  30. package/dest/abi/index.js +1 -0
  31. package/dest/abi/note_selector.d.ts +4 -7
  32. package/dest/abi/note_selector.d.ts.map +1 -1
  33. package/dest/abi/note_selector.js +1 -3
  34. package/dest/abi/selector.d.ts +2 -2
  35. package/dest/abi/selector.d.ts.map +1 -1
  36. package/dest/abi/selector.js +1 -1
  37. package/dest/abi/utils.d.ts +1 -1
  38. package/dest/abi/utils.d.ts.map +1 -1
  39. package/dest/abi/utils.js +1 -1
  40. package/dest/auth_witness/auth_witness.d.ts +2 -2
  41. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  42. package/dest/avm/avm.d.ts +1756 -10463
  43. package/dest/avm/avm.d.ts.map +1 -1
  44. package/dest/avm/avm.js +6 -3
  45. package/dest/avm/avm_accumulated_data.d.ts +22 -86
  46. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  47. package/dest/avm/avm_circuit_public_inputs.d.ts +180 -932
  48. package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
  49. package/dest/avm/avm_proving_request.d.ts +653 -5446
  50. package/dest/avm/avm_proving_request.d.ts.map +1 -1
  51. package/dest/avm/message_pack.js +12 -3
  52. package/dest/avm/public_data_write.d.ts +6 -12
  53. package/dest/avm/public_data_write.d.ts.map +1 -1
  54. package/dest/avm/revert_code.d.ts +5 -21
  55. package/dest/avm/revert_code.d.ts.map +1 -1
  56. package/dest/avm/revert_code.js +12 -30
  57. package/dest/aztec-address/index.d.ts +8 -8
  58. package/dest/aztec-address/index.d.ts.map +1 -1
  59. package/dest/aztec-address/index.js +9 -6
  60. package/dest/block/attestation_info.d.ts +3 -2
  61. package/dest/block/attestation_info.d.ts.map +1 -1
  62. package/dest/block/attestation_info.js +7 -5
  63. package/dest/block/block_data.d.ts +13 -38
  64. package/dest/block/block_data.d.ts.map +1 -1
  65. package/dest/block/block_data.js +2 -2
  66. package/dest/block/block_hash.d.ts +11 -10
  67. package/dest/block/block_hash.d.ts.map +1 -1
  68. package/dest/block/block_hash.js +10 -9
  69. package/dest/block/block_parameter.d.ts +37 -4
  70. package/dest/block/block_parameter.d.ts.map +1 -1
  71. package/dest/block/block_parameter.js +53 -2
  72. package/dest/block/in_block.d.ts +5 -24
  73. package/dest/block/in_block.d.ts.map +1 -1
  74. package/dest/block/index.d.ts +1 -2
  75. package/dest/block/index.d.ts.map +1 -1
  76. package/dest/block/index.js +0 -1
  77. package/dest/block/l2_block.d.ts +13 -41
  78. package/dest/block/l2_block.d.ts.map +1 -1
  79. package/dest/block/l2_block_info.d.ts +10 -29
  80. package/dest/block/l2_block_info.d.ts.map +1 -1
  81. package/dest/block/l2_block_info.js +6 -5
  82. package/dest/block/l2_block_source.d.ts +203 -355
  83. package/dest/block/l2_block_source.d.ts.map +1 -1
  84. package/dest/block/l2_block_source.js +67 -1
  85. package/dest/block/l2_block_stream/interfaces.d.ts +6 -3
  86. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  87. package/dest/block/l2_block_stream/l2_block_stream.d.ts +2 -2
  88. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  89. package/dest/block/l2_block_stream/l2_block_stream.js +44 -17
  90. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +3 -1
  91. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  92. package/dest/block/l2_block_stream/l2_tips_memory_store.js +3 -0
  93. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +4 -1
  94. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
  95. package/dest/block/l2_block_stream/l2_tips_store_base.js +43 -11
  96. package/dest/block/proposal/attestations_and_signers.d.ts +19 -30
  97. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  98. package/dest/block/proposal/attestations_and_signers.js +26 -18
  99. package/dest/block/proposal/committee_attestation.d.ts +6 -12
  100. package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
  101. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  102. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  103. package/dest/block/test/l2_tips_store_test_suite.js +5 -4
  104. package/dest/checkpoint/checkpoint.d.ts +30 -96
  105. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  106. package/dest/checkpoint/checkpoint.js +9 -1
  107. package/dest/checkpoint/checkpoint_data.d.ts +68 -91
  108. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -1
  109. package/dest/checkpoint/checkpoint_data.js +12 -0
  110. package/dest/checkpoint/checkpoint_info.d.ts +7 -23
  111. package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
  112. package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts +60 -0
  113. package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts.map +1 -0
  114. package/dest/checkpoint/checkpoint_reexecution_tracker.js +108 -0
  115. package/dest/checkpoint/digest.d.ts +18 -0
  116. package/dest/checkpoint/digest.d.ts.map +1 -0
  117. package/dest/checkpoint/digest.js +12 -0
  118. package/dest/checkpoint/index.d.ts +4 -1
  119. package/dest/checkpoint/index.d.ts.map +1 -1
  120. package/dest/checkpoint/index.js +3 -0
  121. package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts +33 -0
  122. package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts.map +1 -0
  123. package/dest/checkpoint/previous_checkpoint_out_hashes.js +45 -0
  124. package/dest/checkpoint/published_checkpoint.d.ts +42 -194
  125. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  126. package/dest/checkpoint/validate.js +2 -2
  127. package/dest/config/chain-config.d.ts +4 -9
  128. package/dest/config/chain-config.d.ts.map +1 -1
  129. package/dest/config/chain-config.js +13 -12
  130. package/dest/config/index.d.ts +2 -1
  131. package/dest/config/index.d.ts.map +1 -1
  132. package/dest/config/index.js +1 -0
  133. package/dest/config/pipelining-config.d.ts +15 -0
  134. package/dest/config/pipelining-config.d.ts.map +1 -0
  135. package/dest/config/pipelining-config.js +18 -0
  136. package/dest/config/sequencer-config.d.ts +5 -3
  137. package/dest/config/sequencer-config.d.ts.map +1 -1
  138. package/dest/config/sequencer-config.js +18 -4
  139. package/dest/contract/complete_address.d.ts +3 -2
  140. package/dest/contract/complete_address.d.ts.map +1 -1
  141. package/dest/contract/complete_address.js +6 -2
  142. package/dest/contract/contract_address.d.ts +6 -6
  143. package/dest/contract/contract_address.d.ts.map +1 -1
  144. package/dest/contract/contract_address.js +6 -5
  145. package/dest/contract/contract_class_id.d.ts +2 -2
  146. package/dest/contract/contract_class_id.js +2 -2
  147. package/dest/contract/contract_deployment_data.d.ts +15 -61
  148. package/dest/contract/contract_deployment_data.d.ts.map +1 -1
  149. package/dest/contract/contract_instance.d.ts +4 -2
  150. package/dest/contract/contract_instance.d.ts.map +1 -1
  151. package/dest/contract/contract_instance.js +10 -3
  152. package/dest/contract/index.d.ts +1 -3
  153. package/dest/contract/index.d.ts.map +1 -1
  154. package/dest/contract/index.js +0 -2
  155. package/dest/contract/interfaces/contract_class.d.ts +17 -241
  156. package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
  157. package/dest/contract/interfaces/contract_class.js +1 -28
  158. package/dest/contract/interfaces/contract_instance.d.ts +41 -95
  159. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  160. package/dest/contract/interfaces/contract_instance.js +4 -2
  161. package/dest/contract/interfaces/contract_instance_update.d.ts +6 -26
  162. package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
  163. package/dest/contract/interfaces/protocol_contract_addresses.d.ts +2 -12
  164. package/dest/contract/interfaces/protocol_contract_addresses.d.ts.map +1 -1
  165. package/dest/contract/private_function.d.ts +1 -1
  166. package/dest/contract/private_function.d.ts.map +1 -1
  167. package/dest/contract/private_function.js +2 -4
  168. package/dest/database-version/database_version.d.ts +5 -11
  169. package/dest/database-version/database_version.d.ts.map +1 -1
  170. package/dest/database-version/version_manager.d.ts +6 -2
  171. package/dest/database-version/version_manager.d.ts.map +1 -1
  172. package/dest/database-version/version_manager.js +12 -1
  173. package/dest/epoch-helpers/index.d.ts +12 -20
  174. package/dest/epoch-helpers/index.d.ts.map +1 -1
  175. package/dest/epoch-helpers/index.js +16 -2
  176. package/dest/file-store/factory.d.ts +4 -3
  177. package/dest/file-store/factory.d.ts.map +1 -1
  178. package/dest/file-store/factory.js +2 -2
  179. package/dest/file-store/http.d.ts +9 -2
  180. package/dest/file-store/http.d.ts.map +1 -1
  181. package/dest/file-store/http.js +20 -9
  182. package/dest/file-store/index.d.ts +2 -1
  183. package/dest/file-store/index.d.ts.map +1 -1
  184. package/dest/gas/fee_math.d.ts +49 -0
  185. package/dest/gas/fee_math.d.ts.map +1 -0
  186. package/dest/gas/fee_math.js +80 -0
  187. package/dest/gas/gas.d.ts +9 -14
  188. package/dest/gas/gas.d.ts.map +1 -1
  189. package/dest/gas/gas.js +6 -3
  190. package/dest/gas/gas_fees.d.ts +13 -14
  191. package/dest/gas/gas_fees.d.ts.map +1 -1
  192. package/dest/gas/gas_fees.js +17 -4
  193. package/dest/gas/gas_settings.d.ts +66 -86
  194. package/dest/gas/gas_settings.d.ts.map +1 -1
  195. package/dest/gas/gas_settings.js +56 -9
  196. package/dest/gas/index.d.ts +2 -1
  197. package/dest/gas/index.d.ts.map +1 -1
  198. package/dest/gas/index.js +1 -0
  199. package/dest/ha-signing/config.d.ts +11 -75
  200. package/dest/ha-signing/config.d.ts.map +1 -1
  201. package/dest/ha-signing/config.js +9 -18
  202. package/dest/ha-signing/index.d.ts +2 -2
  203. package/dest/ha-signing/index.d.ts.map +1 -1
  204. package/dest/ha-signing/index.js +1 -1
  205. package/dest/ha-signing/local_config.d.ts +3 -34
  206. package/dest/ha-signing/local_config.d.ts.map +1 -1
  207. package/dest/ha-signing/local_config.js +2 -2
  208. package/dest/ha-signing/types.d.ts +37 -32
  209. package/dest/ha-signing/types.d.ts.map +1 -1
  210. package/dest/ha-signing/types.js +13 -6
  211. package/dest/hash/hash.d.ts +34 -1
  212. package/dest/hash/hash.d.ts.map +1 -1
  213. package/dest/hash/hash.js +63 -2
  214. package/dest/interfaces/allowed_element.d.ts +4 -28
  215. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  216. package/dest/interfaces/api_limit.d.ts +1 -1
  217. package/dest/interfaces/api_limit.js +1 -1
  218. package/dest/interfaces/archiver.d.ts +22 -32
  219. package/dest/interfaces/archiver.d.ts.map +1 -1
  220. package/dest/interfaces/archiver.js +208 -69
  221. package/dest/interfaces/aztec-node-admin.d.ts +67 -299
  222. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  223. package/dest/interfaces/aztec-node-admin.js +59 -16
  224. package/dest/interfaces/aztec-node-debug.d.ts +21 -0
  225. package/dest/interfaces/aztec-node-debug.d.ts.map +1 -0
  226. package/dest/interfaces/aztec-node-debug.js +21 -0
  227. package/dest/interfaces/aztec-node.d.ts +80 -102
  228. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  229. package/dest/interfaces/aztec-node.js +297 -68
  230. package/dest/interfaces/block-builder.d.ts +34 -11
  231. package/dest/interfaces/block-builder.d.ts.map +1 -1
  232. package/dest/interfaces/block-builder.js +6 -4
  233. package/dest/interfaces/block_response.d.ts +90 -0
  234. package/dest/interfaces/block_response.d.ts.map +1 -0
  235. package/dest/interfaces/block_response.js +30 -0
  236. package/dest/interfaces/chain_tips.d.ts +50 -0
  237. package/dest/interfaces/chain_tips.d.ts.map +1 -0
  238. package/dest/interfaces/chain_tips.js +11 -0
  239. package/dest/interfaces/checkpoint_parameter.d.ts +14 -0
  240. package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -0
  241. package/dest/interfaces/checkpoint_parameter.js +18 -0
  242. package/dest/interfaces/checkpoint_response.d.ts +122 -0
  243. package/dest/interfaces/checkpoint_response.d.ts.map +1 -0
  244. package/dest/interfaces/checkpoint_response.js +26 -0
  245. package/dest/interfaces/client.d.ts +8 -2
  246. package/dest/interfaces/client.d.ts.map +1 -1
  247. package/dest/interfaces/client.js +7 -1
  248. package/dest/interfaces/configs.d.ts +44 -128
  249. package/dest/interfaces/configs.d.ts.map +1 -1
  250. package/dest/interfaces/configs.js +10 -1
  251. package/dest/interfaces/l1_publish_info.d.ts +29 -0
  252. package/dest/interfaces/l1_publish_info.d.ts.map +1 -0
  253. package/dest/interfaces/l1_publish_info.js +26 -0
  254. package/dest/interfaces/l2_logs_source.d.ts +14 -34
  255. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  256. package/dest/interfaces/l2_logs_source.js +5 -0
  257. package/dest/interfaces/merkle_tree_operations.d.ts +12 -21
  258. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  259. package/dest/interfaces/p2p-bootstrap.js +8 -2
  260. package/dest/interfaces/p2p.d.ts +15 -5
  261. package/dest/interfaces/p2p.d.ts.map +1 -1
  262. package/dest/interfaces/p2p.js +28 -5
  263. package/dest/interfaces/private_kernel_prover.d.ts +62 -2
  264. package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
  265. package/dest/interfaces/prover-agent.d.ts +5 -23
  266. package/dest/interfaces/prover-agent.d.ts.map +1 -1
  267. package/dest/interfaces/prover-agent.js +4 -1
  268. package/dest/interfaces/prover-client.d.ts +9 -25
  269. package/dest/interfaces/prover-client.d.ts.map +1 -1
  270. package/dest/interfaces/prover-client.js +7 -4
  271. package/dest/interfaces/prover-node.js +22 -8
  272. package/dest/interfaces/proving-job-source.js +24 -4
  273. package/dest/interfaces/proving-job.d.ts +742 -5793
  274. package/dest/interfaces/proving-job.d.ts.map +1 -1
  275. package/dest/interfaces/proving-job.js +1 -1
  276. package/dest/interfaces/public_storage_override.d.ts +22 -0
  277. package/dest/interfaces/public_storage_override.d.ts.map +1 -0
  278. package/dest/interfaces/public_storage_override.js +7 -0
  279. package/dest/interfaces/server.d.ts +6 -1
  280. package/dest/interfaces/server.d.ts.map +1 -1
  281. package/dest/interfaces/server.js +5 -0
  282. package/dest/interfaces/slasher.d.ts +25 -65
  283. package/dest/interfaces/slasher.d.ts.map +1 -1
  284. package/dest/interfaces/slasher.js +8 -4
  285. package/dest/interfaces/tx_provider.d.ts +6 -1
  286. package/dest/interfaces/tx_provider.d.ts.map +1 -1
  287. package/dest/interfaces/validator.d.ts +48 -248
  288. package/dest/interfaces/validator.d.ts.map +1 -1
  289. package/dest/interfaces/validator.js +5 -1
  290. package/dest/interfaces/world_state.d.ts +6 -5
  291. package/dest/interfaces/world_state.d.ts.map +1 -1
  292. package/dest/kernel/hints/key_validation_request.d.ts +12 -8
  293. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  294. package/dest/kernel/hints/key_validation_request.js +20 -18
  295. package/dest/kernel/index.d.ts +5 -1
  296. package/dest/kernel/index.d.ts.map +1 -1
  297. package/dest/kernel/index.js +4 -0
  298. package/dest/kernel/log_hash.d.ts +6 -2
  299. package/dest/kernel/log_hash.d.ts.map +1 -1
  300. package/dest/kernel/log_hash.js +21 -9
  301. package/dest/kernel/private_circuit_public_inputs.d.ts +2 -2
  302. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  303. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +2 -2
  304. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  305. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +23 -0
  306. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -0
  307. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +35 -0
  308. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +24 -0
  309. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -0
  310. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +37 -0
  311. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts +16 -0
  312. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts.map +1 -0
  313. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.js +23 -0
  314. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts +17 -0
  315. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts.map +1 -0
  316. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.js +25 -0
  317. package/dest/kernel/private_kernel_prover_output.d.ts +3 -29
  318. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
  319. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +9 -6
  320. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  321. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +22 -7
  322. package/dest/kernel/private_to_avm_accumulated_data.d.ts +25 -69
  323. package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
  324. package/dest/kernel/private_to_avm_accumulated_data.js +11 -5
  325. package/dest/kernel/private_to_public_accumulated_data.d.ts +4 -3
  326. package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
  327. package/dest/kernel/private_to_public_accumulated_data.js +6 -3
  328. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +5 -4
  329. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  330. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -3
  331. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +5 -4
  332. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  333. package/dest/kernel/private_to_rollup_accumulated_data.js +6 -3
  334. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +5 -4
  335. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  336. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +7 -3
  337. package/dest/kernel/public_call_request.d.ts +15 -30
  338. package/dest/kernel/public_call_request.d.ts.map +1 -1
  339. package/dest/kernel/public_call_request.js +16 -7
  340. package/dest/keys/derivation.d.ts +6 -2
  341. package/dest/keys/derivation.d.ts.map +1 -1
  342. package/dest/keys/derivation.js +16 -6
  343. package/dest/keys/public_key.d.ts +22 -3
  344. package/dest/keys/public_key.d.ts.map +1 -1
  345. package/dest/keys/public_key.js +20 -1
  346. package/dest/keys/public_keys.d.ts +55 -82
  347. package/dest/keys/public_keys.d.ts.map +1 -1
  348. package/dest/keys/public_keys.js +102 -74
  349. package/dest/kv-store/config.d.ts +3 -6
  350. package/dest/kv-store/config.d.ts.map +1 -1
  351. package/dest/kv-store/config.js +2 -7
  352. package/dest/l1-contracts/index.d.ts +2 -2
  353. package/dest/l1-contracts/index.d.ts.map +1 -1
  354. package/dest/l1-contracts/index.js +1 -1
  355. package/dest/logs/app_tagging_secret.d.ts +46 -0
  356. package/dest/logs/app_tagging_secret.d.ts.map +1 -0
  357. package/dest/logs/app_tagging_secret.js +109 -0
  358. package/dest/logs/app_tagging_secret_kind.d.ts +6 -0
  359. package/dest/logs/app_tagging_secret_kind.d.ts.map +1 -0
  360. package/dest/logs/app_tagging_secret_kind.js +4 -0
  361. package/dest/logs/contract_class_log.d.ts +16 -34
  362. package/dest/logs/contract_class_log.d.ts.map +1 -1
  363. package/dest/logs/contract_class_log.js +11 -9
  364. package/dest/logs/index.d.ts +8 -7
  365. package/dest/logs/index.d.ts.map +1 -1
  366. package/dest/logs/index.js +7 -6
  367. package/dest/logs/log_cursor.d.ts +51 -0
  368. package/dest/logs/log_cursor.d.ts.map +1 -0
  369. package/dest/logs/log_cursor.js +82 -0
  370. package/dest/logs/log_result.d.ts +54 -0
  371. package/dest/logs/log_result.d.ts.map +1 -0
  372. package/dest/logs/log_result.js +56 -0
  373. package/dest/logs/logs_query.d.ts +82 -0
  374. package/dest/logs/logs_query.d.ts.map +1 -0
  375. package/dest/logs/logs_query.js +50 -0
  376. package/dest/logs/message_context.d.ts +4 -7
  377. package/dest/logs/message_context.d.ts.map +1 -1
  378. package/dest/logs/message_context.js +23 -9
  379. package/dest/logs/pending_tagged_log.d.ts +2 -3
  380. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  381. package/dest/logs/pending_tagged_log.js +2 -2
  382. package/dest/logs/pre_tag.d.ts +11 -24
  383. package/dest/logs/pre_tag.d.ts.map +1 -1
  384. package/dest/logs/pre_tag.js +2 -2
  385. package/dest/logs/private_log.d.ts +7 -12
  386. package/dest/logs/private_log.d.ts.map +1 -1
  387. package/dest/logs/private_log.js +6 -3
  388. package/dest/logs/query_all_logs_by_tags.d.ts +24 -0
  389. package/dest/logs/query_all_logs_by_tags.d.ts.map +1 -0
  390. package/dest/logs/query_all_logs_by_tags.js +64 -0
  391. package/dest/logs/shared_secret_derivation.d.ts +11 -10
  392. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  393. package/dest/logs/shared_secret_derivation.js +15 -9
  394. package/dest/logs/siloed_tag.d.ts +8 -7
  395. package/dest/logs/siloed_tag.d.ts.map +1 -1
  396. package/dest/logs/siloed_tag.js +13 -3
  397. package/dest/logs/tag.d.ts +5 -6
  398. package/dest/logs/tag.d.ts.map +1 -1
  399. package/dest/logs/tag.js +4 -0
  400. package/dest/logs/tagging_index_range.d.ts +22 -0
  401. package/dest/logs/tagging_index_range.d.ts.map +1 -0
  402. package/dest/logs/tagging_index_range.js +8 -0
  403. package/dest/messaging/append_l1_to_l2_messages.d.ts +9 -0
  404. package/dest/messaging/append_l1_to_l2_messages.d.ts.map +1 -0
  405. package/dest/messaging/append_l1_to_l2_messages.js +12 -0
  406. package/dest/messaging/index.d.ts +2 -1
  407. package/dest/messaging/index.d.ts.map +1 -1
  408. package/dest/messaging/index.js +1 -0
  409. package/dest/messaging/l1_to_l2_message.d.ts +3 -2
  410. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  411. package/dest/messaging/l1_to_l2_message.js +11 -13
  412. package/dest/messaging/l1_to_l2_message_source.d.ts +4 -2
  413. package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
  414. package/dest/messaging/l2_to_l1_membership.d.ts +62 -6
  415. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  416. package/dest/messaging/l2_to_l1_membership.js +115 -27
  417. package/dest/messaging/l2_to_l1_message.d.ts +38 -112
  418. package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
  419. package/dest/messaging/l2_to_l1_message.js +21 -12
  420. package/dest/noir/index.d.ts +5 -3
  421. package/dest/noir/index.d.ts.map +1 -1
  422. package/dest/note/note.d.ts +2 -2
  423. package/dest/note/note.d.ts.map +1 -1
  424. package/dest/note/note_dao.d.ts +1 -1
  425. package/dest/note/note_dao.d.ts.map +1 -1
  426. package/dest/note/note_dao.js +1 -4
  427. package/dest/p2p/block_proposal.d.ts +31 -14
  428. package/dest/p2p/block_proposal.d.ts.map +1 -1
  429. package/dest/p2p/block_proposal.js +57 -39
  430. package/dest/p2p/checkpoint_attestation.d.ts +15 -9
  431. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  432. package/dest/p2p/checkpoint_attestation.js +23 -24
  433. package/dest/p2p/checkpoint_proposal.d.ts +35 -16
  434. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  435. package/dest/p2p/checkpoint_proposal.js +59 -49
  436. package/dest/p2p/consensus_payload.d.ts +26 -20
  437. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  438. package/dest/p2p/consensus_payload.js +38 -19
  439. package/dest/p2p/gossipable.d.ts +4 -4
  440. package/dest/p2p/gossipable.d.ts.map +1 -1
  441. package/dest/p2p/signature_utils.d.ts +28 -19
  442. package/dest/p2p/signature_utils.d.ts.map +1 -1
  443. package/dest/p2p/signature_utils.js +118 -21
  444. package/dest/p2p/signed_txs.d.ts +15 -13
  445. package/dest/p2p/signed_txs.d.ts.map +1 -1
  446. package/dest/p2p/signed_txs.js +26 -24
  447. package/dest/parity/parity_base_private_inputs.d.ts +8 -4
  448. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  449. package/dest/parity/parity_base_private_inputs.js +7 -5
  450. package/dest/parity/parity_public_inputs.d.ts +8 -4
  451. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  452. package/dest/parity/parity_public_inputs.js +6 -3
  453. package/dest/parity/parity_root_private_inputs.d.ts +2 -2
  454. package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
  455. package/dest/proofs/chonk_proof.d.ts +57 -7
  456. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  457. package/dest/proofs/chonk_proof.js +112 -15
  458. package/dest/proofs/recursive_proof.d.ts +2 -2
  459. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  460. package/dest/rollup/block_headers_hash.d.ts +1 -1
  461. package/dest/rollup/block_headers_hash.d.ts.map +1 -1
  462. package/dest/rollup/block_headers_hash.js +8 -2
  463. package/dest/rollup/block_merge_rollup_private_inputs.d.ts +2 -2
  464. package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
  465. package/dest/rollup/block_rollup_public_inputs.d.ts +12 -2
  466. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  467. package/dest/rollup/block_rollup_public_inputs.js +12 -0
  468. package/dest/rollup/block_root_rollup_private_inputs.d.ts +6 -6
  469. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  470. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +2 -2
  471. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
  472. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +9 -2
  473. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  474. package/dest/rollup/checkpoint_rollup_public_inputs.js +9 -0
  475. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +5 -5
  476. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  477. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts +2 -2
  478. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +1 -1
  479. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +2 -2
  480. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
  481. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +2 -2
  482. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
  483. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +2 -2
  484. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
  485. package/dest/rollup/root_rollup_private_inputs.d.ts +2 -2
  486. package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
  487. package/dest/rollup/root_rollup_public_inputs.d.ts +2 -2
  488. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  489. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +2 -2
  490. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
  491. package/dest/rollup/tx_rollup_public_inputs.d.ts +2 -2
  492. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  493. package/dest/schemas/schemas.d.ts +32 -78
  494. package/dest/schemas/schemas.d.ts.map +1 -1
  495. package/dest/schemas/schemas.js +2 -2
  496. package/dest/slashing/helpers.d.ts +2 -2
  497. package/dest/slashing/helpers.d.ts.map +1 -1
  498. package/dest/slashing/helpers.js +10 -7
  499. package/dest/slashing/index.d.ts +2 -3
  500. package/dest/slashing/index.d.ts.map +1 -1
  501. package/dest/slashing/index.js +1 -2
  502. package/dest/slashing/serialization.d.ts +2 -6
  503. package/dest/slashing/serialization.d.ts.map +1 -1
  504. package/dest/slashing/serialization.js +0 -60
  505. package/dest/slashing/types.d.ts +18 -112
  506. package/dest/slashing/types.d.ts.map +1 -1
  507. package/dest/slashing/types.js +16 -24
  508. package/dest/slashing/{tally.d.ts → votes.d.ts} +1 -1
  509. package/dest/slashing/{tally.d.ts.map → votes.d.ts.map} +1 -1
  510. package/dest/slashing/{tally.js → votes.js} +1 -1
  511. package/dest/snapshots/types.d.ts +15 -78
  512. package/dest/snapshots/types.d.ts.map +1 -1
  513. package/dest/stats/stats.d.ts +2 -2
  514. package/dest/stats/stats.d.ts.map +1 -1
  515. package/dest/tests/factories.d.ts +25 -32
  516. package/dest/tests/factories.d.ts.map +1 -1
  517. package/dest/tests/factories.js +82 -82
  518. package/dest/tests/mocks.d.ts +8 -5
  519. package/dest/tests/mocks.d.ts.map +1 -1
  520. package/dest/tests/mocks.js +42 -54
  521. package/dest/timetable/index.d.ts +51 -1
  522. package/dest/timetable/index.d.ts.map +1 -1
  523. package/dest/timetable/index.js +218 -14
  524. package/dest/trees/append_only_tree_snapshot.d.ts +9 -14
  525. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  526. package/dest/trees/append_only_tree_snapshot.js +6 -3
  527. package/dest/trees/nullifier_leaf.d.ts +19 -42
  528. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  529. package/dest/trees/nullifier_leaf.js +3 -0
  530. package/dest/trees/nullifier_membership_witness.d.ts +16 -59
  531. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  532. package/dest/trees/nullifier_membership_witness.js +2 -14
  533. package/dest/trees/public_data_leaf.d.ts +21 -53
  534. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  535. package/dest/trees/public_data_witness.d.ts +16 -58
  536. package/dest/trees/public_data_witness.d.ts.map +1 -1
  537. package/dest/tx/block_header.d.ts +5 -4
  538. package/dest/tx/block_header.d.ts.map +1 -1
  539. package/dest/tx/block_header.js +7 -4
  540. package/dest/tx/call_context.d.ts +4 -14
  541. package/dest/tx/call_context.d.ts.map +1 -1
  542. package/dest/tx/capsule.d.ts +7 -3
  543. package/dest/tx/capsule.d.ts.map +1 -1
  544. package/dest/tx/capsule.js +9 -3
  545. package/dest/tx/fee_provider.d.ts +10 -0
  546. package/dest/tx/fee_provider.d.ts.map +1 -0
  547. package/dest/tx/fee_provider.js +1 -0
  548. package/dest/tx/function_data.d.ts +4 -10
  549. package/dest/tx/function_data.d.ts.map +1 -1
  550. package/dest/tx/global_variable_builder.d.ts +3 -4
  551. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  552. package/dest/tx/global_variables.d.ts +16 -49
  553. package/dest/tx/global_variables.d.ts.map +1 -1
  554. package/dest/tx/global_variables.js +8 -12
  555. package/dest/tx/hashed_values.d.ts +4 -3
  556. package/dest/tx/hashed_values.d.ts.map +1 -1
  557. package/dest/tx/hashed_values.js +6 -3
  558. package/dest/tx/in_tx.d.ts +5 -17
  559. package/dest/tx/in_tx.d.ts.map +1 -1
  560. package/dest/tx/index.d.ts +2 -1
  561. package/dest/tx/index.d.ts.map +1 -1
  562. package/dest/tx/index.js +1 -0
  563. package/dest/tx/indexed_tx_effect.d.ts +4 -18
  564. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  565. package/dest/tx/indexed_tx_effect.js +1 -2
  566. package/dest/tx/partial_state_reference.d.ts +22 -65
  567. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  568. package/dest/tx/partial_state_reference.js +6 -3
  569. package/dest/tx/private_execution_result.d.ts +11 -21
  570. package/dest/tx/private_execution_result.d.ts.map +1 -1
  571. package/dest/tx/private_execution_result.js +6 -6
  572. package/dest/tx/profiling.d.ts +67 -353
  573. package/dest/tx/profiling.d.ts.map +1 -1
  574. package/dest/tx/profiling.js +17 -7
  575. package/dest/tx/protocol_contracts.d.ts +5 -9
  576. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  577. package/dest/tx/proven_tx.d.ts +30 -74
  578. package/dest/tx/proven_tx.d.ts.map +1 -1
  579. package/dest/tx/proven_tx.js +6 -0
  580. package/dest/tx/public_call_request_with_calldata.d.ts +4 -3
  581. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  582. package/dest/tx/public_call_request_with_calldata.js +6 -3
  583. package/dest/tx/simulated_tx.d.ts +64 -1143
  584. package/dest/tx/simulated_tx.d.ts.map +1 -1
  585. package/dest/tx/simulated_tx.js +13 -11
  586. package/dest/tx/state_reference.d.ts +30 -117
  587. package/dest/tx/state_reference.d.ts.map +1 -1
  588. package/dest/tx/state_reference.js +6 -4
  589. package/dest/tx/tree_snapshots.d.ts +27 -84
  590. package/dest/tx/tree_snapshots.d.ts.map +1 -1
  591. package/dest/tx/tree_snapshots.js +6 -4
  592. package/dest/tx/tx.d.ts +7 -13
  593. package/dest/tx/tx.d.ts.map +1 -1
  594. package/dest/tx/tx.js +22 -23
  595. package/dest/tx/tx_constant_data.d.ts +4 -3
  596. package/dest/tx/tx_constant_data.d.ts.map +1 -1
  597. package/dest/tx/tx_constant_data.js +6 -3
  598. package/dest/tx/tx_context.d.ts +32 -131
  599. package/dest/tx/tx_context.d.ts.map +1 -1
  600. package/dest/tx/tx_context.js +6 -6
  601. package/dest/tx/tx_hash.d.ts +6 -4
  602. package/dest/tx/tx_hash.d.ts.map +1 -1
  603. package/dest/tx/tx_hash.js +13 -5
  604. package/dest/tx/tx_receipt.d.ts +8 -5
  605. package/dest/tx/tx_receipt.d.ts.map +1 -1
  606. package/dest/tx/tx_receipt.js +8 -18
  607. package/dest/tx/validator/error_texts.d.ts +5 -1
  608. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  609. package/dest/tx/validator/error_texts.js +6 -0
  610. package/dest/tx/validator/tx_validator.d.ts +5 -27
  611. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  612. package/dest/tx/validator/tx_validator.js +0 -4
  613. package/dest/types/shared.d.ts +4 -12
  614. package/dest/types/shared.d.ts.map +1 -1
  615. package/dest/types/shared.js +6 -12
  616. package/dest/update-checker/dev_version.d.ts +3 -0
  617. package/dest/update-checker/dev_version.d.ts.map +1 -0
  618. package/dest/update-checker/dev_version.js +1 -0
  619. package/dest/update-checker/index.d.ts +2 -1
  620. package/dest/update-checker/index.d.ts.map +1 -1
  621. package/dest/update-checker/index.js +1 -0
  622. package/dest/update-checker/package_version.d.ts +6 -3
  623. package/dest/update-checker/package_version.d.ts.map +1 -1
  624. package/dest/update-checker/package_version.js +9 -7
  625. package/dest/validators/errors.d.ts +6 -1
  626. package/dest/validators/errors.d.ts.map +1 -1
  627. package/dest/validators/errors.js +7 -0
  628. package/dest/validators/schemas.d.ts +147 -614
  629. package/dest/validators/schemas.d.ts.map +1 -1
  630. package/dest/validators/schemas.js +6 -4
  631. package/dest/validators/types.d.ts +20 -3
  632. package/dest/validators/types.d.ts.map +1 -1
  633. package/dest/versioning/versioning.d.ts +4 -2
  634. package/dest/versioning/versioning.d.ts.map +1 -1
  635. package/dest/versioning/versioning.js +5 -2
  636. package/dest/vks/verification_key.d.ts +4 -139
  637. package/dest/vks/verification_key.d.ts.map +1 -1
  638. package/dest/vks/verification_key.js +5 -126
  639. package/dest/world-state/genesis_data.d.ts +13 -0
  640. package/dest/world-state/genesis_data.d.ts.map +1 -0
  641. package/dest/world-state/genesis_data.js +7 -0
  642. package/dest/world-state/index.d.ts +2 -1
  643. package/dest/world-state/index.d.ts.map +1 -1
  644. package/dest/world-state/index.js +1 -0
  645. package/dest/world-state/world_state_revision.d.ts +15 -26
  646. package/dest/world-state/world_state_revision.d.ts.map +1 -1
  647. package/dest/world-state/world_state_revision.js +7 -1
  648. package/package.json +12 -11
  649. package/src/abi/abi.ts +78 -21
  650. package/src/abi/authorization_selector.ts +2 -8
  651. package/src/abi/buffer.ts +25 -4
  652. package/src/abi/contract_artifact.ts +11 -6
  653. package/src/abi/decoder.ts +23 -78
  654. package/src/abi/encoder.ts +42 -6
  655. package/src/abi/event_selector.ts +2 -8
  656. package/src/abi/function_selector.ts +4 -13
  657. package/src/abi/function_signature_decoder.ts +77 -0
  658. package/src/abi/index.ts +1 -0
  659. package/src/abi/note_selector.ts +3 -12
  660. package/src/abi/selector.ts +1 -1
  661. package/src/abi/utils.ts +6 -4
  662. package/src/avm/avm.ts +5 -0
  663. package/src/avm/message_pack.ts +12 -3
  664. package/src/avm/revert_code.ts +19 -39
  665. package/src/aztec-address/index.ts +15 -12
  666. package/src/block/attestation_info.ts +11 -11
  667. package/src/block/block_data.ts +3 -4
  668. package/src/block/block_hash.ts +21 -14
  669. package/src/block/block_parameter.ts +72 -4
  670. package/src/block/index.ts +0 -1
  671. package/src/block/l2_block_info.ts +8 -6
  672. package/src/block/l2_block_source.ts +198 -145
  673. package/src/block/l2_block_stream/interfaces.ts +6 -2
  674. package/src/block/l2_block_stream/l2_block_stream.ts +39 -28
  675. package/src/block/l2_block_stream/l2_tips_memory_store.ts +5 -0
  676. package/src/block/l2_block_stream/l2_tips_store_base.ts +53 -19
  677. package/src/block/proposal/attestations_and_signers.ts +32 -17
  678. package/src/block/test/l2_tips_store_test_suite.ts +10 -3
  679. package/src/checkpoint/checkpoint.ts +11 -1
  680. package/src/checkpoint/checkpoint_data.ts +44 -4
  681. package/src/checkpoint/checkpoint_reexecution_tracker.ts +167 -0
  682. package/src/checkpoint/digest.ts +28 -0
  683. package/src/checkpoint/index.ts +3 -0
  684. package/src/checkpoint/previous_checkpoint_out_hashes.ts +61 -0
  685. package/src/checkpoint/validate.ts +2 -2
  686. package/src/config/chain-config.ts +13 -16
  687. package/src/config/index.ts +1 -0
  688. package/src/config/pipelining-config.ts +31 -0
  689. package/src/config/sequencer-config.ts +34 -6
  690. package/src/contract/complete_address.ts +7 -3
  691. package/src/contract/contract_address.ts +7 -7
  692. package/src/contract/contract_class_id.ts +2 -2
  693. package/src/contract/contract_instance.ts +11 -2
  694. package/src/contract/index.ts +0 -2
  695. package/src/contract/interfaces/contract_class.ts +2 -82
  696. package/src/contract/interfaces/contract_instance.ts +6 -2
  697. package/src/contract/private_function.ts +3 -1
  698. package/src/database-version/version_manager.ts +17 -0
  699. package/src/epoch-helpers/index.ts +27 -0
  700. package/src/file-store/factory.ts +13 -4
  701. package/src/file-store/http.ts +29 -10
  702. package/src/file-store/index.ts +1 -0
  703. package/src/gas/README.md +154 -0
  704. package/src/gas/fee_math.ts +120 -0
  705. package/src/gas/gas.ts +8 -3
  706. package/src/gas/gas_fees.ts +26 -13
  707. package/src/gas/gas_settings.ts +73 -15
  708. package/src/gas/index.ts +1 -0
  709. package/src/ha-signing/config.ts +14 -18
  710. package/src/ha-signing/index.ts +3 -1
  711. package/src/ha-signing/local_config.ts +2 -2
  712. package/src/ha-signing/types.ts +48 -34
  713. package/src/hash/hash.ts +63 -2
  714. package/src/interfaces/api_limit.ts +1 -1
  715. package/src/interfaces/archiver.ts +82 -92
  716. package/src/interfaces/aztec-node-admin.ts +35 -20
  717. package/src/interfaces/aztec-node-debug.ts +40 -0
  718. package/src/interfaces/aztec-node.ts +254 -244
  719. package/src/interfaces/block-builder.ts +41 -13
  720. package/src/interfaces/block_response.ts +92 -0
  721. package/src/interfaces/chain_tips.ts +24 -0
  722. package/src/interfaces/checkpoint_parameter.ts +20 -0
  723. package/src/interfaces/checkpoint_response.ts +84 -0
  724. package/src/interfaces/client.ts +7 -1
  725. package/src/interfaces/configs.ts +43 -1
  726. package/src/interfaces/l1_publish_info.ts +40 -0
  727. package/src/interfaces/l2_logs_source.ts +13 -39
  728. package/src/interfaces/merkle_tree_operations.ts +11 -20
  729. package/src/interfaces/p2p-bootstrap.ts +2 -2
  730. package/src/interfaces/p2p.ts +35 -15
  731. package/src/interfaces/private_kernel_prover.ts +88 -0
  732. package/src/interfaces/prover-agent.ts +1 -1
  733. package/src/interfaces/prover-client.ts +10 -5
  734. package/src/interfaces/prover-node.ts +7 -7
  735. package/src/interfaces/proving-job-source.ts +4 -4
  736. package/src/interfaces/proving-job.ts +3 -3
  737. package/src/interfaces/public_storage_override.ts +26 -0
  738. package/src/interfaces/server.ts +5 -0
  739. package/src/interfaces/slasher.ts +17 -10
  740. package/src/interfaces/tx_provider.ts +6 -0
  741. package/src/interfaces/validator.ts +34 -15
  742. package/src/interfaces/world_state.ts +5 -4
  743. package/src/kernel/hints/key_validation_request.ts +18 -16
  744. package/src/kernel/index.ts +4 -0
  745. package/src/kernel/log_hash.ts +29 -9
  746. package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +49 -0
  747. package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +52 -0
  748. package/src/kernel/private_kernel_inner_2_circuit_private_inputs.ts +29 -0
  749. package/src/kernel/private_kernel_inner_3_circuit_private_inputs.ts +31 -0
  750. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +29 -14
  751. package/src/kernel/private_to_avm_accumulated_data.ts +16 -5
  752. package/src/kernel/private_to_public_accumulated_data.ts +9 -3
  753. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +10 -4
  754. package/src/kernel/private_to_rollup_accumulated_data.ts +8 -3
  755. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +9 -9
  756. package/src/kernel/public_call_request.ts +22 -7
  757. package/src/keys/derivation.ts +21 -9
  758. package/src/keys/public_key.ts +26 -2
  759. package/src/keys/public_keys.ts +124 -110
  760. package/src/kv-store/config.ts +3 -10
  761. package/src/l1-contracts/index.ts +1 -1
  762. package/src/logs/app_tagging_secret.ts +137 -0
  763. package/src/logs/app_tagging_secret_kind.ts +6 -0
  764. package/src/logs/contract_class_log.ts +15 -5
  765. package/src/logs/index.ts +7 -6
  766. package/src/logs/log_cursor.ts +110 -0
  767. package/src/logs/log_result.ts +104 -0
  768. package/src/logs/logs_query.ts +138 -0
  769. package/src/logs/message_context.ts +17 -7
  770. package/src/logs/pending_tagged_log.ts +1 -3
  771. package/src/logs/pre_tag.ts +3 -6
  772. package/src/logs/private_log.ts +9 -3
  773. package/src/logs/query_all_logs_by_tags.ts +98 -0
  774. package/src/logs/shared_secret_derivation.ts +21 -10
  775. package/src/logs/siloed_tag.ts +20 -11
  776. package/src/logs/tag.ts +8 -8
  777. package/src/logs/tagging_index_range.ts +18 -0
  778. package/src/messaging/append_l1_to_l2_messages.ts +21 -0
  779. package/src/messaging/index.ts +1 -0
  780. package/src/messaging/l1_to_l2_message.ts +12 -9
  781. package/src/messaging/l1_to_l2_message_source.ts +3 -1
  782. package/src/messaging/l2_to_l1_membership.ts +171 -34
  783. package/src/messaging/l2_to_l1_message.ts +29 -9
  784. package/src/noir/index.ts +4 -2
  785. package/src/note/note_dao.ts +1 -4
  786. package/src/p2p/block_proposal.ts +111 -36
  787. package/src/p2p/checkpoint_attestation.ts +27 -31
  788. package/src/p2p/checkpoint_proposal.ts +126 -68
  789. package/src/p2p/consensus_payload.ts +59 -28
  790. package/src/p2p/gossipable.ts +4 -4
  791. package/src/p2p/signature_utils.ts +110 -25
  792. package/src/p2p/signed_txs.ts +46 -28
  793. package/src/parity/parity_base_private_inputs.ts +10 -4
  794. package/src/parity/parity_public_inputs.ts +9 -2
  795. package/src/proofs/chonk_proof.ts +132 -12
  796. package/src/rollup/block_headers_hash.ts +11 -2
  797. package/src/rollup/block_rollup_public_inputs.ts +13 -0
  798. package/src/rollup/checkpoint_rollup_public_inputs.ts +10 -0
  799. package/src/schemas/schemas.ts +6 -1
  800. package/src/slashing/helpers.ts +13 -9
  801. package/src/slashing/index.ts +1 -2
  802. package/src/slashing/serialization.ts +1 -81
  803. package/src/slashing/types.ts +24 -49
  804. package/src/slashing/{tally.ts → votes.ts} +1 -1
  805. package/src/stats/stats.ts +4 -0
  806. package/src/tests/factories.ts +103 -111
  807. package/src/tests/mocks.ts +66 -70
  808. package/src/timetable/index.ts +308 -13
  809. package/src/trees/append_only_tree_snapshot.ts +8 -3
  810. package/src/trees/nullifier_leaf.ts +4 -0
  811. package/src/trees/nullifier_membership_witness.ts +2 -12
  812. package/src/tx/block_header.ts +10 -5
  813. package/src/tx/capsule.ts +10 -2
  814. package/src/tx/fee_provider.ts +10 -0
  815. package/src/tx/global_variable_builder.ts +2 -3
  816. package/src/tx/global_variables.ts +10 -18
  817. package/src/tx/hashed_values.ts +8 -3
  818. package/src/tx/index.ts +1 -0
  819. package/src/tx/indexed_tx_effect.ts +1 -2
  820. package/src/tx/partial_state_reference.ts +8 -3
  821. package/src/tx/private_execution_result.ts +5 -5
  822. package/src/tx/profiling.ts +15 -6
  823. package/src/tx/proven_tx.ts +6 -0
  824. package/src/tx/public_call_request_with_calldata.ts +8 -3
  825. package/src/tx/simulated_tx.ts +22 -21
  826. package/src/tx/state_reference.ts +9 -4
  827. package/src/tx/tree_snapshots.ts +9 -4
  828. package/src/tx/tx.ts +33 -24
  829. package/src/tx/tx_constant_data.ts +8 -3
  830. package/src/tx/tx_context.ts +8 -3
  831. package/src/tx/tx_hash.ts +20 -5
  832. package/src/tx/tx_receipt.ts +9 -16
  833. package/src/tx/validator/error_texts.ts +8 -0
  834. package/src/tx/validator/tx_validator.ts +1 -5
  835. package/src/types/shared.ts +8 -13
  836. package/src/update-checker/dev_version.ts +2 -0
  837. package/src/update-checker/index.ts +1 -0
  838. package/src/update-checker/package_version.ts +11 -11
  839. package/src/validators/errors.ts +9 -0
  840. package/src/validators/schemas.ts +6 -4
  841. package/src/validators/types.ts +21 -2
  842. package/src/versioning/versioning.ts +5 -2
  843. package/src/vks/verification_key.ts +5 -184
  844. package/src/world-state/genesis_data.ts +27 -0
  845. package/src/world-state/index.ts +1 -0
  846. package/src/world-state/world_state_revision.ts +9 -1
  847. package/dest/abi/mocked_keys.d.ts +0 -2
  848. package/dest/abi/mocked_keys.d.ts.map +0 -1
  849. package/dest/abi/mocked_keys.js +0 -1
  850. package/dest/block/checkpointed_l2_block.d.ts +0 -150
  851. package/dest/block/checkpointed_l2_block.d.ts.map +0 -1
  852. package/dest/block/checkpointed_l2_block.js +0 -46
  853. package/dest/contract/private_function_membership_proof.d.ts +0 -32
  854. package/dest/contract/private_function_membership_proof.d.ts.map +0 -1
  855. package/dest/contract/private_function_membership_proof.js +0 -124
  856. package/dest/contract/utility_function_membership_proof.d.ts +0 -27
  857. package/dest/contract/utility_function_membership_proof.d.ts.map +0 -1
  858. package/dest/contract/utility_function_membership_proof.js +0 -87
  859. package/dest/interfaces/get_logs_response.d.ts +0 -97
  860. package/dest/interfaces/get_logs_response.d.ts.map +0 -1
  861. package/dest/interfaces/get_logs_response.js +0 -12
  862. package/dest/l1-contracts/slash_factory.d.ts +0 -45
  863. package/dest/l1-contracts/slash_factory.d.ts.map +0 -1
  864. package/dest/l1-contracts/slash_factory.js +0 -158
  865. package/dest/logs/extended_contract_class_log.d.ts +0 -51
  866. package/dest/logs/extended_contract_class_log.d.ts.map +0 -1
  867. package/dest/logs/extended_contract_class_log.js +0 -67
  868. package/dest/logs/extended_directional_app_tagging_secret.d.ts +0 -47
  869. package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +0 -1
  870. package/dest/logs/extended_directional_app_tagging_secret.js +0 -72
  871. package/dest/logs/extended_public_log.d.ts +0 -106
  872. package/dest/logs/extended_public_log.d.ts.map +0 -1
  873. package/dest/logs/extended_public_log.js +0 -73
  874. package/dest/logs/log_filter.d.ts +0 -22
  875. package/dest/logs/log_filter.d.ts.map +0 -1
  876. package/dest/logs/log_filter.js +0 -11
  877. package/dest/logs/log_id.d.ts +0 -85
  878. package/dest/logs/log_id.d.ts.map +0 -1
  879. package/dest/logs/log_id.js +0 -94
  880. package/dest/logs/tx_scoped_l2_log.d.ts +0 -49
  881. package/dest/logs/tx_scoped_l2_log.d.ts.map +0 -1
  882. package/dest/logs/tx_scoped_l2_log.js +0 -70
  883. package/dest/slashing/empire.d.ts +0 -31
  884. package/dest/slashing/empire.d.ts.map +0 -1
  885. package/dest/slashing/empire.js +0 -87
  886. package/src/abi/mocked_keys.ts +0 -2
  887. package/src/block/checkpointed_l2_block.ts +0 -70
  888. package/src/contract/private_function_membership_proof.ts +0 -167
  889. package/src/contract/utility_function_membership_proof.ts +0 -118
  890. package/src/interfaces/get_logs_response.ts +0 -35
  891. package/src/l1-contracts/slash_factory.ts +0 -180
  892. package/src/logs/extended_contract_class_log.ts +0 -87
  893. package/src/logs/extended_directional_app_tagging_secret.ts +0 -87
  894. package/src/logs/extended_public_log.ts +0 -94
  895. package/src/logs/log_filter.ts +0 -31
  896. package/src/logs/log_id.ts +0 -125
  897. package/src/logs/tx_scoped_l2_log.ts +0 -98
  898. package/src/slashing/empire.ts +0 -104
@@ -3,6 +3,7 @@ import { type ZodFor, optional, schemas } from '@aztec/foundation/schemas';
3
3
 
4
4
  import { z } from 'zod';
5
5
 
6
+ import { AztecAddress } from '../aztec-address/index.js';
6
7
  import type { AztecNode } from '../interfaces/aztec-node.js';
7
8
  import { type PrivateExecutionStep, PrivateExecutionStepSchema } from '../kernel/private_kernel_prover_output.js';
8
9
 
@@ -132,12 +133,12 @@ export class TxProfileResult {
132
133
  ],
133
134
  {
134
135
  nodeRPCCalls: {
135
- perMethod: { getBlockHeader: { times: [1] } },
136
+ perMethod: { getBlock: { times: [1] } },
136
137
  roundTrips: {
137
138
  roundTrips: 1,
138
139
  totalBlockingTime: 1,
139
140
  roundTripDurations: [1],
140
- roundTripMethods: [['getBlockHeader']],
141
+ roundTripMethods: [['getBlock']],
141
142
  },
142
143
  },
143
144
  timings: {
@@ -160,6 +161,9 @@ export class TxProfileResult {
160
161
  export class UtilityExecutionResult {
161
162
  constructor(
162
163
  public result: Fr[],
164
+ public offchainEffects: { data: Fr[]; contractAddress: AztecAddress }[],
165
+ /** Timestamp of the anchor block used during utility execution. */
166
+ public anchorBlockTimestamp: bigint,
163
167
  public stats?: SimulationStats,
164
168
  ) {}
165
169
 
@@ -167,20 +171,25 @@ export class UtilityExecutionResult {
167
171
  return z
168
172
  .object({
169
173
  result: z.array(schemas.Fr),
174
+ offchainEffects: z.array(z.object({ data: z.array(schemas.Fr), contractAddress: AztecAddress.schema })),
175
+ anchorBlockTimestamp: schemas.BigInt,
170
176
  stats: optional(SimulationStatsSchema),
171
177
  })
172
- .transform(({ result, stats }) => new UtilityExecutionResult(result, stats));
178
+ .transform(
179
+ ({ result, offchainEffects, anchorBlockTimestamp, stats }) =>
180
+ new UtilityExecutionResult(result, offchainEffects, anchorBlockTimestamp, stats),
181
+ );
173
182
  }
174
183
 
175
184
  static random(): UtilityExecutionResult {
176
- return new UtilityExecutionResult([Fr.random()], {
185
+ return new UtilityExecutionResult([Fr.random()], [], 0n, {
177
186
  nodeRPCCalls: {
178
- perMethod: { getBlockHeader: { times: [1] } },
187
+ perMethod: { getBlock: { times: [1] } },
179
188
  roundTrips: {
180
189
  roundTrips: 1,
181
190
  totalBlockingTime: 1,
182
191
  roundTripDurations: [1],
183
- roundTripMethods: [['getBlockHeader']],
192
+ roundTripMethods: [['getBlock']],
184
193
  },
185
194
  },
186
195
  timings: {
@@ -13,6 +13,7 @@ import {
13
13
  } from './private_execution_result.js';
14
14
  import { type ProvingStats, ProvingTimingsSchema } from './profiling.js';
15
15
  import { Tx } from './tx.js';
16
+ import type { TxHash } from './tx_hash.js';
16
17
 
17
18
  export class TxProvingResult {
18
19
  constructor(
@@ -22,6 +23,11 @@ export class TxProvingResult {
22
23
  public stats?: ProvingStats,
23
24
  ) {}
24
25
 
26
+ getTxHash(): Promise<TxHash> {
27
+ // Equivalent to `(await this.toTx()).txHash` but skips walking the execution result tree to collect logs.
28
+ return Tx.computeTxHash({ data: this.publicInputs });
29
+ }
30
+
25
31
  async toTx(): Promise<Tx> {
26
32
  const contractClassLogs = collectSortedContractClassLogs(this.privateExecutionResult);
27
33
 
@@ -1,5 +1,5 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
2
+ import { BufferReader, BufferSink, serializeToSink } from '@aztec/foundation/serialize';
3
3
 
4
4
  import { inspect } from 'util';
5
5
  import { z } from 'zod';
@@ -63,8 +63,13 @@ export class PublicCallRequestWithCalldata {
63
63
  );
64
64
  }
65
65
 
66
- toBuffer() {
67
- return serializeToBuffer(this.request, new Vector(this.calldata));
66
+ toBuffer(): Buffer;
67
+ toBuffer(sink: BufferSink): void;
68
+ toBuffer(sink?: BufferSink): Buffer | void {
69
+ if (!sink) {
70
+ return BufferSink.serialize(this);
71
+ }
72
+ serializeToSink(sink, this.request, new Vector(this.calldata));
68
73
  }
69
74
 
70
75
  static fromBuffer(buffer: Buffer | BufferReader) {
@@ -3,13 +3,13 @@ import type { FieldsOf } from '@aztec/foundation/types';
3
3
 
4
4
  import { z } from 'zod';
5
5
 
6
- import { type ContractArtifact, ContractArtifactSchema } from '../abi/abi.js';
7
6
  import {
8
7
  type ContractInstanceWithAddress,
9
8
  ContractInstanceWithAddressSchema,
10
9
  } from '../contract/interfaces/contract_instance.js';
11
10
  import { Gas } from '../gas/gas.js';
12
11
  import type { GasUsed } from '../gas/gas_used.js';
12
+ import { type PublicStorageOverride, PublicStorageOverrideSchema } from '../interfaces/public_storage_override.js';
13
13
  import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
14
14
  import { ChonkProof } from '../proofs/chonk_proof.js';
15
15
  import type { OffchainEffect } from './offchain_effect.js';
@@ -24,35 +24,36 @@ import { NestedProcessReturnValues, PublicSimulationOutput } from './public_simu
24
24
  import { Tx } from './tx.js';
25
25
 
26
26
  /*
27
- * If passed during the execution of a user circuit, the contract function simulator will replace the instance and class
28
- * of the contract with the one provided in the overrides for that address. An example use case
29
- * would be overriding your own account contract so that valid signatures don't have to be provided while simulating.
27
+ * If passed during the execution of a user circuit, the contract function simulator will replace
28
+ * the contract instance at that address with the one provided. An example use case would be
29
+ * overriding your own account contract so that valid signatures don't have to be provided while
30
+ * simulating. The override's `currentContractClassId` resolves through PXE's locally registered
31
+ * classes, so pre-register the target artifact via `pxe.registerContractClass(...)`.
30
32
  */
31
- export type ContractOverrides = Record<
32
- string /* AztecAddress as string */,
33
- { instance: ContractInstanceWithAddress; artifact: ContractArtifact }
34
- >;
33
+ export type ContractOverrides = Record<string /* AztecAddress as string */, { instance: ContractInstanceWithAddress }>;
35
34
 
36
35
  /*
37
- * Optional values that can be overridden during simulation. In order to simulate a transaction with these
38
- * set, it *must* be run without the kernel circuits, or validations will fail
36
+ * Optional values that can be overridden during simulation. `publicStorage` writes to the public-data
37
+ * tree fork. `contracts` overrides contract instances in the contract DB.
38
+ * In order to simulate a transaction with these set, it *must* be run without the kernel circuits,
39
+ * or validations will fail.
39
40
  */
40
41
  export class SimulationOverrides {
41
- constructor(public contracts?: ContractOverrides) {}
42
+ public publicStorage?: PublicStorageOverride[];
43
+ public contracts?: ContractOverrides;
44
+
45
+ constructor(args: { publicStorage?: PublicStorageOverride[]; contracts?: ContractOverrides } = {}) {
46
+ this.publicStorage = args.publicStorage?.length ? args.publicStorage : undefined;
47
+ this.contracts = args.contracts && Object.keys(args.contracts).length > 0 ? args.contracts : undefined;
48
+ }
42
49
 
43
50
  static get schema() {
44
51
  return z
45
52
  .object({
46
- contracts: optional(
47
- z.record(
48
- z.string(),
49
- z.object({ instance: ContractInstanceWithAddressSchema, artifact: ContractArtifactSchema }),
50
- ),
51
- ),
53
+ publicStorage: optional(z.array(PublicStorageOverrideSchema)),
54
+ contracts: optional(z.record(z.string(), z.object({ instance: ContractInstanceWithAddressSchema }))),
52
55
  })
53
- .transform(({ contracts }) => {
54
- return new SimulationOverrides(contracts);
55
- });
56
+ .transform(args => new SimulationOverrides(args));
56
57
  }
57
58
  }
58
59
 
@@ -157,7 +158,7 @@ export class TxSimulationResult {
157
158
  }
158
159
 
159
160
  /**
160
- * Recursively accummulate the return values of a call result and its nested executions,
161
+ * Recursively accumulate the return values of a call result and its nested executions,
161
162
  * so they can be retrieved in order.
162
163
  * @param executionResult
163
164
  * @returns
@@ -5,7 +5,7 @@ import {
5
5
  STATE_REFERENCE_LENGTH,
6
6
  } from '@aztec/constants';
7
7
  import type { Fr } from '@aztec/foundation/curves/bn254';
8
- import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
8
+ import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
9
9
  import type { FieldsOf } from '@aztec/foundation/types';
10
10
 
11
11
  import { inspect } from 'util';
@@ -46,9 +46,14 @@ export class StateReference {
46
46
  return new StateReference(...StateReference.getFields(fields));
47
47
  }
48
48
 
49
- toBuffer() {
50
- // Note: The order here must match the order in the ProposedHeaderLib solidity library.
51
- return serializeToBuffer(this.l1ToL2MessageTree, this.partial);
49
+ // Note: The order here must match the order in the ProposedHeaderLib solidity library.
50
+ toBuffer(): Buffer;
51
+ toBuffer(sink: BufferSink): void;
52
+ toBuffer(sink?: BufferSink): Buffer | void {
53
+ if (!sink) {
54
+ return BufferSink.serialize(this);
55
+ }
56
+ serializeToSink(sink, this.l1ToL2MessageTree, this.partial);
52
57
  }
53
58
 
54
59
  toFields(): Fr[] {
@@ -1,6 +1,6 @@
1
1
  import { TREE_SNAPSHOTS_LENGTH } from '@aztec/constants';
2
2
  import type { Fr } from '@aztec/foundation/curves/bn254';
3
- import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
+ import { BufferReader, BufferSink, FieldReader, serializeToSink } from '@aztec/foundation/serialize';
4
4
 
5
5
  import { inspect } from 'util';
6
6
  import { z } from 'zod';
@@ -51,9 +51,14 @@ export class TreeSnapshots {
51
51
  );
52
52
  }
53
53
 
54
- toBuffer() {
55
- // Note: The order here must match the order in the ProposedHeaderLib solidity library.
56
- return serializeToBuffer(this.l1ToL2MessageTree, this.noteHashTree, this.nullifierTree, this.publicDataTree);
54
+ // Note: The order here must match the order in the ProposedHeaderLib solidity library.
55
+ toBuffer(): Buffer;
56
+ toBuffer(sink: BufferSink): void;
57
+ toBuffer(sink?: BufferSink): Buffer | void {
58
+ if (!sink) {
59
+ return BufferSink.serialize(this);
60
+ }
61
+ serializeToSink(sink, this.l1ToL2MessageTree, this.noteHashTree, this.nullifierTree, this.publicDataTree);
57
62
  }
58
63
 
59
64
  static fromFields(fields: Fr[] | FieldReader) {
package/src/tx/tx.ts CHANGED
@@ -1,15 +1,19 @@
1
1
  import { DA_GAS_PER_FIELD, TX_DA_GAS_OVERHEAD } from '@aztec/constants';
2
- import { Buffer32 } from '@aztec/foundation/buffer';
2
+ import { type BaseBuffer32, Buffer32 } from '@aztec/foundation/buffer';
3
3
  import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import type { ZodFor } from '@aztec/foundation/schemas';
5
- import { BufferReader, serializeArrayOfBufferableToVector, serializeToBuffer } from '@aztec/foundation/serialize';
5
+ import {
6
+ BufferReader,
7
+ BufferSink,
8
+ serializeArrayOfBufferableToVector,
9
+ serializeArrayToSink,
10
+ serializeToSink,
11
+ } from '@aztec/foundation/serialize';
6
12
  import { type FieldsOf, unfreeze } from '@aztec/foundation/types';
7
13
 
8
14
  import { z } from 'zod';
9
15
 
10
16
  import type { GasSettings } from '../gas/gas_settings.js';
11
- import type { GetPublicLogsResponse } from '../interfaces/get_logs_response.js';
12
- import type { L2LogsSource } from '../interfaces/l2_logs_source.js';
13
17
  import type { PublicCallRequest } from '../kernel/index.js';
14
18
  import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
15
19
  import { ContractClassLog, ContractClassLogFields } from '../logs/contract_class_log.js';
@@ -21,6 +25,14 @@ import { HashedValues } from './hashed_values.js';
21
25
  import { PublicCallRequestWithCalldata } from './public_call_request_with_calldata.js';
22
26
  import { TxHash } from './tx_hash.js';
23
27
 
28
+ // Static presize hint for the BufferSink the no-sink Tx.toBuffer() path allocates. Empirically a
29
+ // public-with-enqueued-calls Tx serialized by the bootstrapped bench (yarn-project/stdlib/src/tx/
30
+ // tx_bench.test.ts) is ~129128 bytes; a private-only Tx is ~81763 bytes. 128 KiB covers both shapes
31
+ // without a single doubling-growth `ensure()` resize on the cold path. Real-world Txs that happen to
32
+ // exceed this still serialize correctly — the sink falls back to its standard doubling growth — just
33
+ // with the existing cost.
34
+ const TX_SINK_PRESIZE_BYTES = 131072;
35
+
24
36
  /**
25
37
  * The interface of an L2 transaction.
26
38
  */
@@ -64,7 +76,7 @@ export class Tx extends Gossipable {
64
76
  // docs:end:tx_class
65
77
 
66
78
  // Gossipable method
67
- override generateP2PMessageIdentifier(): Promise<Buffer32> {
79
+ override generateP2PMessageIdentifier(): Promise<BaseBuffer32> {
68
80
  return Promise.resolve(new Buffer32(this.getTxHash().toBuffer()));
69
81
  }
70
82
 
@@ -127,14 +139,15 @@ export class Tx extends Gossipable {
127
139
  * Serializes the Tx object into a Buffer.
128
140
  * @returns Buffer representation of the Tx object.
129
141
  */
130
- toBuffer() {
131
- return serializeToBuffer([
132
- this.txHash,
133
- this.data,
134
- this.chonkProof,
135
- serializeArrayOfBufferableToVector(this.contractClassLogFields, 1),
136
- serializeArrayOfBufferableToVector(this.publicFunctionCalldata, 1),
137
- ]);
142
+ toBuffer(): Buffer;
143
+ toBuffer(sink: BufferSink): void;
144
+ toBuffer(sink?: BufferSink): Buffer | void {
145
+ if (!sink) {
146
+ return BufferSink.serialize(this, TX_SINK_PRESIZE_BYTES);
147
+ }
148
+ serializeToSink(sink, this.txHash, this.data, this.chonkProof);
149
+ serializeArrayToSink(sink, this.contractClassLogFields, 1);
150
+ serializeArrayToSink(sink, this.publicFunctionCalldata, 1);
138
151
  }
139
152
 
140
153
  static get schema(): ZodFor<Tx> {
@@ -180,15 +193,6 @@ export class Tx extends Gossipable {
180
193
  return this.txHash.equals(expectedHash);
181
194
  }
182
195
 
183
- /**
184
- * Gets public logs emitted by this tx.
185
- * @param logsSource - An instance of `L2LogsSource` which can be used to obtain the logs.
186
- * @returns The requested logs.
187
- */
188
- public getPublicLogs(logsSource: L2LogsSource): Promise<GetPublicLogsResponse> {
189
- return logsSource.getPublicLogs({ txHash: this.getTxHash() });
190
- }
191
-
192
196
  getContractClassLogs(): ContractClassLog[] {
193
197
  const logHashes = this.data.getNonEmptyContractClassLogsHashes();
194
198
  return logHashes.map((logHash, i) =>
@@ -345,7 +349,12 @@ export class TxArray extends Array<Tx> {
345
349
  }
346
350
  }
347
351
 
348
- public toBuffer(): Buffer {
349
- return serializeArrayOfBufferableToVector(this);
352
+ public toBuffer(): Buffer;
353
+ public toBuffer(sink: BufferSink): void;
354
+ public toBuffer(sink?: BufferSink): Buffer | void {
355
+ if (!sink) {
356
+ return serializeArrayOfBufferableToVector(this);
357
+ }
358
+ serializeArrayToSink(sink, [...this]);
350
359
  }
351
360
  }
@@ -1,6 +1,6 @@
1
1
  import { TX_CONSTANT_DATA_LENGTH } from '@aztec/constants';
2
2
  import { Fr } from '@aztec/foundation/curves/bn254';
3
- import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
3
+ import { BufferReader, BufferSink, FieldReader, serializeToFields, serializeToSink } from '@aztec/foundation/serialize';
4
4
  import type { FieldsOf } from '@aztec/foundation/types';
5
5
 
6
6
  import { BlockHeader } from './block_header.js';
@@ -57,8 +57,13 @@ export class TxConstantData {
57
57
  );
58
58
  }
59
59
 
60
- toBuffer() {
61
- return serializeToBuffer(...TxConstantData.getFields(this));
60
+ toBuffer(): Buffer;
61
+ toBuffer(sink: BufferSink): void;
62
+ toBuffer(sink?: BufferSink): Buffer | void {
63
+ if (!sink) {
64
+ return BufferSink.serialize(this);
65
+ }
66
+ serializeToSink(sink, ...TxConstantData.getFields(this));
62
67
  }
63
68
 
64
69
  static empty() {
@@ -1,7 +1,7 @@
1
1
  import { TX_CONTEXT_LENGTH } from '@aztec/constants';
2
2
  import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { schemas } from '@aztec/foundation/schemas';
4
- import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
4
+ import { BufferReader, BufferSink, FieldReader, serializeToFields, serializeToSink } from '@aztec/foundation/serialize';
5
5
  import type { FieldsOf } from '@aztec/foundation/types';
6
6
 
7
7
  import { z } from 'zod';
@@ -49,8 +49,13 @@ export class TxContext {
49
49
  * Serialize as a buffer.
50
50
  * @returns The buffer.
51
51
  */
52
- toBuffer() {
53
- return serializeToBuffer(...TxContext.getFields(this));
52
+ toBuffer(): Buffer;
53
+ toBuffer(sink: BufferSink): void;
54
+ toBuffer(sink?: BufferSink): Buffer | void {
55
+ if (!sink) {
56
+ return BufferSink.serialize(this);
57
+ }
58
+ serializeToSink(sink, ...TxContext.getFields(this));
54
59
  }
55
60
 
56
61
  static fromFields(fields: Fr[] | FieldReader): TxContext {
package/src/tx/tx_hash.ts CHANGED
@@ -1,5 +1,10 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
- import { BufferReader, serializeArrayOfBufferableToVector } from '@aztec/foundation/serialize';
2
+ import {
3
+ BufferReader,
4
+ type BufferSink,
5
+ serializeArrayOfBufferableToVector,
6
+ serializeArrayToSink,
7
+ } from '@aztec/foundation/serialize';
3
8
 
4
9
  import { schemas } from '../schemas/index.js';
5
10
 
@@ -34,8 +39,13 @@ export class TxHash {
34
39
  return new TxHash(value);
35
40
  }
36
41
 
37
- public toBuffer() {
38
- return this.hash.toBuffer();
42
+ public toBuffer(): Buffer;
43
+ public toBuffer(sink: BufferSink): void;
44
+ public toBuffer(sink?: BufferSink): Buffer | void {
45
+ if (!sink) {
46
+ return this.hash.toBuffer();
47
+ }
48
+ this.hash.toBuffer(sink);
39
49
  }
40
50
 
41
51
  public toString() {
@@ -82,7 +92,12 @@ export class TxHashArray extends Array<TxHash> {
82
92
  }
83
93
  }
84
94
 
85
- public toBuffer(): Buffer {
86
- return serializeArrayOfBufferableToVector([...this]);
95
+ public toBuffer(): Buffer;
96
+ public toBuffer(sink: BufferSink): void;
97
+ public toBuffer(sink?: BufferSink): Buffer | void {
98
+ if (!sink) {
99
+ return serializeArrayOfBufferableToVector([...this]);
100
+ }
101
+ serializeArrayToSink(sink, [...this]);
87
102
  }
88
103
  }
@@ -1,4 +1,4 @@
1
- import { BlockNumber, BlockNumberSchema } from '@aztec/foundation/branded-types';
1
+ import { BlockNumber, BlockNumberSchema, EpochNumber, EpochNumberSchema } from '@aztec/foundation/branded-types';
2
2
 
3
3
  import { z } from 'zod';
4
4
 
@@ -15,7 +15,7 @@ export enum TxStatus {
15
15
  PROPOSED = 'proposed',
16
16
  CHECKPOINTED = 'checkpointed',
17
17
  PROVEN = 'proven',
18
- FINALIZED = 'finalized', // TODO(#13569): Implement finalized status properly
18
+ FINALIZED = 'finalized',
19
19
  }
20
20
 
21
21
  /** Tx status sorted by finalization progress. */
@@ -31,9 +31,7 @@ export const SortedTxStatuses: TxStatus[] = [
31
31
  /** Execution result - only set when tx is in a block. */
32
32
  export enum TxExecutionResult {
33
33
  SUCCESS = 'success',
34
- APP_LOGIC_REVERTED = 'app_logic_reverted',
35
- TEARDOWN_REVERTED = 'teardown_reverted',
36
- BOTH_REVERTED = 'both_reverted',
34
+ REVERTED = 'reverted',
37
35
  }
38
36
 
39
37
  /**
@@ -58,6 +56,8 @@ export class TxReceipt {
58
56
  public blockHash?: BlockHash,
59
57
  /** The block number in which the transaction was included. */
60
58
  public blockNumber?: BlockNumber,
59
+ /** The epoch number in which the transaction was included. */
60
+ public epochNumber?: EpochNumber,
61
61
  /**
62
62
  * Debug logs collected during public function execution. Served only when the node is in test mode and placed on
63
63
  * the receipt only because it's a convenient place for it (the logs are printed out by the wallet when a mined
@@ -109,6 +109,7 @@ export class TxReceipt {
109
109
  error: z.string().optional(),
110
110
  blockHash: BlockHash.schema.optional(),
111
111
  blockNumber: BlockNumberSchema.optional(),
112
+ epochNumber: EpochNumberSchema.optional(),
112
113
  transactionFee: schemas.BigInt.optional(),
113
114
  debugLogs: z.array(DebugLog.schema).optional(),
114
115
  })
@@ -123,6 +124,7 @@ export class TxReceipt {
123
124
  transactionFee?: bigint;
124
125
  blockHash?: BlockHash;
125
126
  blockNumber?: BlockNumber;
127
+ epochNumber?: EpochNumber;
126
128
  debugLogs?: DebugLog[];
127
129
  }) {
128
130
  return new TxReceipt(
@@ -133,21 +135,12 @@ export class TxReceipt {
133
135
  fields.transactionFee,
134
136
  fields.blockHash,
135
137
  fields.blockNumber,
138
+ fields.epochNumber,
136
139
  fields.debugLogs,
137
140
  );
138
141
  }
139
142
 
140
143
  public static executionResultFromRevertCode(revertCode: RevertCode): TxExecutionResult {
141
- if (revertCode.equals(RevertCode.OK)) {
142
- return TxExecutionResult.SUCCESS;
143
- } else if (revertCode.equals(RevertCode.APP_LOGIC_REVERTED)) {
144
- return TxExecutionResult.APP_LOGIC_REVERTED;
145
- } else if (revertCode.equals(RevertCode.TEARDOWN_REVERTED)) {
146
- return TxExecutionResult.TEARDOWN_REVERTED;
147
- } else if (revertCode.equals(RevertCode.BOTH_REVERTED)) {
148
- return TxExecutionResult.BOTH_REVERTED;
149
- } else {
150
- throw new Error(`Unknown revert code: ${revertCode.getCode()}`);
151
- }
144
+ return revertCode.isOK() ? TxExecutionResult.SUCCESS : TxExecutionResult.REVERTED;
152
145
  }
153
146
  }
@@ -41,5 +41,13 @@ export const TX_ERROR_SIZE_ABOVE_LIMIT = 'Transaction size above size limit';
41
41
  // Block header
42
42
  export const TX_ERROR_BLOCK_HEADER = 'Block header not found';
43
43
 
44
+ // Contract instance
45
+ export const TX_ERROR_INCORRECT_CONTRACT_ADDRESS = 'Incorrect contract instance deployment address';
46
+ export const TX_ERROR_MALFORMED_CONTRACT_INSTANCE_LOG = 'Failed to parse contract instance deployment log';
47
+
48
+ // Contract class
49
+ export const TX_ERROR_INCORRECT_CONTRACT_CLASS_ID = 'Incorrect contract class id';
50
+ export const TX_ERROR_MALFORMED_CONTRACT_CLASS_LOG = 'Failed to parse contract class registration log';
51
+
44
52
  // General
45
53
  export const TX_ERROR_DURING_VALIDATION = 'Unexpected error during validation';
@@ -15,10 +15,7 @@ export function hasPublicCalls(tx: AnyTx): boolean {
15
15
  return tx.data.numberOfPublicCallRequests() > 0;
16
16
  }
17
17
 
18
- export type TxValidationResult =
19
- | { result: 'valid' }
20
- | { result: 'invalid'; reason: string[] }
21
- | { result: 'skipped'; reason: string[] };
18
+ export type TxValidationResult = { result: 'valid' } | { result: 'invalid'; reason: string[] };
22
19
 
23
20
  export interface TxValidator<T = AnyTx> {
24
21
  validateTx(tx: T): Promise<TxValidationResult>;
@@ -28,6 +25,5 @@ export const TxValidationResultSchema = zodFor<TxValidationResult>()(
28
25
  z.discriminatedUnion('result', [
29
26
  z.object({ result: z.literal('valid') }),
30
27
  z.object({ result: z.literal('invalid'), reason: z.array(z.string()) }),
31
- z.object({ result: z.literal('skipped'), reason: z.array(z.string()) }),
32
28
  ]),
33
29
  );
@@ -1,4 +1,4 @@
1
- import { type Bufferable, serializeToBuffer } from '@aztec/foundation/serialize';
1
+ import { BufferSink, type Bufferable, type Sinkable, serializeToSink } from '@aztec/foundation/serialize';
2
2
 
3
3
  /**
4
4
  * Implementation of a vector. Matches how we are serializing and deserializing vectors in cpp (length in the first position, followed by the items).
@@ -11,8 +11,13 @@ export class Vector<T extends Bufferable> {
11
11
  public items: T[],
12
12
  ) {}
13
13
 
14
- toBuffer() {
15
- return serializeToBuffer(this.items.length, this.items);
14
+ toBuffer(): Buffer;
15
+ toBuffer(sink: BufferSink): void;
16
+ toBuffer(sink?: BufferSink): Buffer | void {
17
+ if (!sink) {
18
+ return BufferSink.serialize(this);
19
+ }
20
+ serializeToSink(sink, this.items.length, this.items as Sinkable[]);
16
21
  }
17
22
 
18
23
  toFriendlyJSON() {
@@ -34,13 +39,3 @@ export type UInt64 = bigint;
34
39
  * A type alias for a 128-bit unsigned integer.
35
40
  */
36
41
  export type UInt128 = bigint;
37
-
38
- /**
39
- * CircuitType replaces ComposerType for now. When using Plonk, CircuitType is equivalent to the information of the proving system that will be used
40
- * to construct a proof. In the future Aztec zk stack, more information must be specified (e.g., the curve over which circuits are constructed;
41
- * Plonk vs Honk; zk-SNARK or just SNARK; etc).
42
- */
43
- export enum CircuitType {
44
- STANDARD = 0,
45
- ULTRA = 1,
46
- }
@@ -0,0 +1,2 @@
1
+ /** Placeholder version returned when running from a local monorepo checkout rather than an npm-installed package. */
2
+ export const DEV_VERSION = 'dev';
@@ -1,2 +1,3 @@
1
+ export * from './dev_version.js';
1
2
  export * from './package_version.js';
2
3
  export * from './version_checker.js';
@@ -3,15 +3,15 @@ import { fileURLToPath } from '@aztec/foundation/url';
3
3
  import { readFileSync } from 'fs';
4
4
  import { dirname, resolve } from 'path';
5
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
- }
6
+ import { DEV_VERSION } from './dev_version.js';
7
+
8
+ /**
9
+ * Returns the package version from the stdlib `package.json`, or `DEV_VERSION` when the version is the `0.1.0`
10
+ * placeholder (which indicates a local monorepo checkout rather than an npm-installed package).
11
+ */
12
+ export function getPackageVersion(): string {
13
+ const dir = dirname(fileURLToPath(import.meta.url));
14
+ const packageJsonPath = resolve(dir, '../../package.json');
15
+ const version = JSON.parse(readFileSync(packageJsonPath).toString()).version;
16
+ return version === '0.1.0' ? DEV_VERSION : version;
17
17
  }
@@ -36,6 +36,15 @@ export class FailedToReExecuteTransactionsError extends ValidatorError {
36
36
  }
37
37
  }
38
38
 
39
+ export class ReExInitialStateMismatchError extends ValidatorError {
40
+ constructor(
41
+ public readonly expectedArchiveRoot: Fr,
42
+ public readonly actualArchiveRoot: Fr,
43
+ ) {
44
+ super('Re-execution initial state mismatch');
45
+ }
46
+ }
47
+
39
48
  export class ReExStateMismatchError extends ValidatorError {
40
49
  constructor(
41
50
  public readonly expectedArchiveRoot: Fr,