@aztec/stdlib 0.0.1-commit.96bb3f7 → 0.0.1-commit.993d240

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 (1187) 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 +6 -45
  13. package/dest/abi/decoder.d.ts.map +1 -1
  14. package/dest/abi/decoder.js +17 -70
  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 +64 -7
  18. package/dest/abi/event_metadata_definition.d.ts +3 -1
  19. package/dest/abi/event_metadata_definition.d.ts.map +1 -1
  20. package/dest/abi/event_metadata_definition.js +1 -1
  21. package/dest/abi/event_selector.d.ts +4 -7
  22. package/dest/abi/event_selector.d.ts.map +1 -1
  23. package/dest/abi/function_call.d.ts +30 -10
  24. package/dest/abi/function_call.d.ts.map +1 -1
  25. package/dest/abi/function_call.js +20 -3
  26. package/dest/abi/function_selector.d.ts +3 -6
  27. package/dest/abi/function_selector.d.ts.map +1 -1
  28. package/dest/abi/function_selector.js +2 -4
  29. package/dest/abi/function_signature_decoder.d.ts +43 -0
  30. package/dest/abi/function_signature_decoder.d.ts.map +1 -0
  31. package/dest/abi/function_signature_decoder.js +66 -0
  32. package/dest/abi/index.d.ts +2 -1
  33. package/dest/abi/index.d.ts.map +1 -1
  34. package/dest/abi/index.js +1 -0
  35. package/dest/abi/note_selector.d.ts +4 -7
  36. package/dest/abi/note_selector.d.ts.map +1 -1
  37. package/dest/abi/note_selector.js +1 -3
  38. package/dest/abi/selector.d.ts +2 -2
  39. package/dest/abi/selector.d.ts.map +1 -1
  40. package/dest/abi/selector.js +1 -1
  41. package/dest/abi/utils.d.ts +20 -1
  42. package/dest/abi/utils.d.ts.map +1 -1
  43. package/dest/abi/utils.js +22 -0
  44. package/dest/auth_witness/auth_witness.d.ts +3 -2
  45. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  46. package/dest/auth_witness/auth_witness.js +3 -3
  47. package/dest/avm/avm.d.ts +1777 -10484
  48. package/dest/avm/avm.d.ts.map +1 -1
  49. package/dest/avm/avm.js +6 -3
  50. package/dest/avm/avm_accumulated_data.d.ts +50 -87
  51. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  52. package/dest/avm/avm_circuit_public_inputs.d.ts +185 -937
  53. package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
  54. package/dest/avm/avm_proving_request.d.ts +824 -5617
  55. package/dest/avm/avm_proving_request.d.ts.map +1 -1
  56. package/dest/avm/contract_storage_read.d.ts +13 -1
  57. package/dest/avm/contract_storage_read.d.ts.map +1 -1
  58. package/dest/avm/contract_storage_update_request.d.ts +13 -1
  59. package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
  60. package/dest/avm/message_pack.js +12 -3
  61. package/dest/avm/public_call_stack_item_compressed.d.ts +3 -1
  62. package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
  63. package/dest/avm/public_data_read.d.ts +10 -1
  64. package/dest/avm/public_data_read.d.ts.map +1 -1
  65. package/dest/avm/public_data_update_request.d.ts +10 -1
  66. package/dest/avm/public_data_update_request.d.ts.map +1 -1
  67. package/dest/avm/public_data_write.d.ts +12 -12
  68. package/dest/avm/public_data_write.d.ts.map +1 -1
  69. package/dest/avm/public_inner_call_request.d.ts +4 -1
  70. package/dest/avm/public_inner_call_request.d.ts.map +1 -1
  71. package/dest/avm/revert_code.d.ts +9 -10
  72. package/dest/avm/revert_code.d.ts.map +1 -1
  73. package/dest/avm/revert_code.js +13 -21
  74. package/dest/aztec-address/index.d.ts +8 -8
  75. package/dest/aztec-address/index.d.ts.map +1 -1
  76. package/dest/aztec-address/index.js +9 -6
  77. package/dest/block/attestation_info.d.ts +3 -2
  78. package/dest/block/attestation_info.d.ts.map +1 -1
  79. package/dest/block/attestation_info.js +7 -5
  80. package/dest/block/block_data.d.ts +27 -0
  81. package/dest/block/block_data.d.ts.map +1 -0
  82. package/dest/block/block_data.js +12 -0
  83. package/dest/block/block_hash.d.ts +20 -15
  84. package/dest/block/block_hash.d.ts.map +1 -1
  85. package/dest/block/block_hash.js +23 -20
  86. package/dest/block/block_parameter.d.ts +38 -4
  87. package/dest/block/block_parameter.d.ts.map +1 -1
  88. package/dest/block/block_parameter.js +55 -2
  89. package/dest/block/body.d.ts +1 -1
  90. package/dest/block/body.d.ts.map +1 -1
  91. package/dest/block/body.js +2 -1
  92. package/dest/block/in_block.d.ts +9 -28
  93. package/dest/block/in_block.d.ts.map +1 -1
  94. package/dest/block/in_block.js +5 -5
  95. package/dest/block/index.d.ts +2 -4
  96. package/dest/block/index.d.ts.map +1 -1
  97. package/dest/block/index.js +1 -3
  98. package/dest/block/l2_block.d.ts +64 -87
  99. package/dest/block/l2_block.d.ts.map +1 -1
  100. package/dest/block/l2_block.js +73 -109
  101. package/dest/block/l2_block_info.d.ts +10 -29
  102. package/dest/block/l2_block_info.d.ts.map +1 -1
  103. package/dest/block/l2_block_info.js +6 -5
  104. package/dest/block/l2_block_source.d.ts +220 -322
  105. package/dest/block/l2_block_source.d.ts.map +1 -1
  106. package/dest/block/l2_block_source.js +69 -2
  107. package/dest/block/l2_block_stream/interfaces.d.ts +14 -8
  108. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  109. package/dest/block/l2_block_stream/l2_block_stream.d.ts +6 -3
  110. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  111. package/dest/block/l2_block_stream/l2_block_stream.js +80 -40
  112. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +3 -1
  113. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  114. package/dest/block/l2_block_stream/l2_tips_memory_store.js +3 -0
  115. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +6 -3
  116. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
  117. package/dest/block/l2_block_stream/l2_tips_store_base.js +43 -11
  118. package/dest/block/proposal/attestations_and_signers.d.ts +19 -30
  119. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  120. package/dest/block/proposal/attestations_and_signers.js +26 -18
  121. package/dest/block/proposal/committee_attestation.d.ts +6 -12
  122. package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
  123. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  124. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  125. package/dest/block/test/l2_tips_store_test_suite.js +7 -11
  126. package/dest/block/validate_block_result.d.ts +1 -1
  127. package/dest/block/validate_block_result.d.ts.map +1 -1
  128. package/dest/block/validate_block_result.js +5 -4
  129. package/dest/checkpoint/checkpoint.d.ts +61 -102
  130. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  131. package/dest/checkpoint/checkpoint.js +53 -17
  132. package/dest/checkpoint/checkpoint_data.d.ts +97 -0
  133. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
  134. package/dest/checkpoint/checkpoint_data.js +38 -0
  135. package/dest/checkpoint/checkpoint_info.d.ts +7 -23
  136. package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
  137. package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts +60 -0
  138. package/dest/checkpoint/checkpoint_reexecution_tracker.d.ts.map +1 -0
  139. package/dest/checkpoint/checkpoint_reexecution_tracker.js +108 -0
  140. package/dest/checkpoint/digest.d.ts +18 -0
  141. package/dest/checkpoint/digest.d.ts.map +1 -0
  142. package/dest/checkpoint/digest.js +12 -0
  143. package/dest/checkpoint/index.d.ts +6 -1
  144. package/dest/checkpoint/index.d.ts.map +1 -1
  145. package/dest/checkpoint/index.js +5 -0
  146. package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts +33 -0
  147. package/dest/checkpoint/previous_checkpoint_out_hashes.d.ts.map +1 -0
  148. package/dest/checkpoint/previous_checkpoint_out_hashes.js +45 -0
  149. package/dest/checkpoint/published_checkpoint.d.ts +55 -190
  150. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  151. package/dest/checkpoint/published_checkpoint.js +5 -5
  152. package/dest/checkpoint/validate.d.ts +36 -0
  153. package/dest/checkpoint/validate.d.ts.map +1 -0
  154. package/dest/checkpoint/validate.js +120 -0
  155. package/dest/config/chain-config.d.ts +4 -9
  156. package/dest/config/chain-config.d.ts.map +1 -1
  157. package/dest/config/chain-config.js +13 -12
  158. package/dest/config/index.d.ts +3 -1
  159. package/dest/config/index.d.ts.map +1 -1
  160. package/dest/config/index.js +2 -0
  161. package/dest/config/node-rpc-config.js +1 -1
  162. package/dest/config/pipelining-config.d.ts +15 -0
  163. package/dest/config/pipelining-config.d.ts.map +1 -0
  164. package/dest/config/pipelining-config.js +18 -0
  165. package/dest/config/sequencer-config.d.ts +14 -0
  166. package/dest/config/sequencer-config.d.ts.map +1 -0
  167. package/dest/config/sequencer-config.js +38 -0
  168. package/dest/contract/complete_address.d.ts +6 -2
  169. package/dest/contract/complete_address.d.ts.map +1 -1
  170. package/dest/contract/complete_address.js +6 -2
  171. package/dest/contract/contract_address.d.ts +6 -6
  172. package/dest/contract/contract_address.d.ts.map +1 -1
  173. package/dest/contract/contract_address.js +9 -8
  174. package/dest/contract/contract_class.d.ts +2 -3
  175. package/dest/contract/contract_class.d.ts.map +1 -1
  176. package/dest/contract/contract_class_id.d.ts +3 -3
  177. package/dest/contract/contract_class_id.d.ts.map +1 -1
  178. package/dest/contract/contract_class_id.js +7 -6
  179. package/dest/contract/contract_deployment_data.d.ts +18 -64
  180. package/dest/contract/contract_deployment_data.d.ts.map +1 -1
  181. package/dest/contract/contract_instance.d.ts +4 -2
  182. package/dest/contract/contract_instance.d.ts.map +1 -1
  183. package/dest/contract/contract_instance.js +10 -3
  184. package/dest/contract/index.d.ts +1 -5
  185. package/dest/contract/index.d.ts.map +1 -1
  186. package/dest/contract/index.js +0 -4
  187. package/dest/contract/interfaces/contract_class.d.ts +17 -241
  188. package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
  189. package/dest/contract/interfaces/contract_class.js +1 -28
  190. package/dest/contract/interfaces/contract_instance.d.ts +41 -95
  191. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  192. package/dest/contract/interfaces/contract_instance.js +4 -2
  193. package/dest/contract/interfaces/contract_instance_update.d.ts +6 -26
  194. package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
  195. package/dest/contract/interfaces/node-info.d.ts +3 -1
  196. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  197. package/dest/contract/interfaces/node-info.js +2 -1
  198. package/dest/contract/interfaces/protocol_contract_addresses.d.ts +2 -12
  199. package/dest/contract/interfaces/protocol_contract_addresses.d.ts.map +1 -1
  200. package/dest/contract/private_function.d.ts +1 -1
  201. package/dest/contract/private_function.d.ts.map +1 -1
  202. package/dest/contract/private_function.js +5 -8
  203. package/dest/database-version/database_version.d.ts +52 -0
  204. package/dest/database-version/database_version.d.ts.map +1 -0
  205. package/dest/database-version/database_version.js +69 -0
  206. package/dest/database-version/version_manager.d.ts +8 -50
  207. package/dest/database-version/version_manager.d.ts.map +1 -1
  208. package/dest/database-version/version_manager.js +13 -67
  209. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +2 -2
  210. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
  211. package/dest/delayed_public_mutable/delayed_public_mutable_values.js +7 -10
  212. package/dest/deserialization/index.d.ts +11 -0
  213. package/dest/deserialization/index.d.ts.map +1 -0
  214. package/dest/deserialization/index.js +10 -0
  215. package/dest/epoch-helpers/index.d.ts +16 -18
  216. package/dest/epoch-helpers/index.d.ts.map +1 -1
  217. package/dest/epoch-helpers/index.js +23 -3
  218. package/dest/errors/proving_error.d.ts +2 -2
  219. package/dest/errors/proving_error.d.ts.map +1 -1
  220. package/dest/file-store/factory.d.ts +4 -3
  221. package/dest/file-store/factory.d.ts.map +1 -1
  222. package/dest/file-store/factory.js +2 -2
  223. package/dest/file-store/http.d.ts +9 -2
  224. package/dest/file-store/http.d.ts.map +1 -1
  225. package/dest/file-store/http.js +20 -9
  226. package/dest/file-store/index.d.ts +2 -1
  227. package/dest/file-store/index.d.ts.map +1 -1
  228. package/dest/file-store/local.d.ts +3 -3
  229. package/dest/file-store/local.d.ts.map +1 -1
  230. package/dest/file-store/local.js +13 -4
  231. package/dest/file-store/s3.d.ts +1 -1
  232. package/dest/file-store/s3.d.ts.map +1 -1
  233. package/dest/file-store/s3.js +11 -3
  234. package/dest/gas/fee_math.d.ts +49 -0
  235. package/dest/gas/fee_math.d.ts.map +1 -0
  236. package/dest/gas/fee_math.js +80 -0
  237. package/dest/gas/gas.d.ts +9 -14
  238. package/dest/gas/gas.d.ts.map +1 -1
  239. package/dest/gas/gas.js +6 -3
  240. package/dest/gas/gas_fees.d.ts +13 -14
  241. package/dest/gas/gas_fees.d.ts.map +1 -1
  242. package/dest/gas/gas_fees.js +20 -4
  243. package/dest/gas/gas_settings.d.ts +66 -86
  244. package/dest/gas/gas_settings.d.ts.map +1 -1
  245. package/dest/gas/gas_settings.js +56 -9
  246. package/dest/gas/index.d.ts +2 -1
  247. package/dest/gas/index.d.ts.map +1 -1
  248. package/dest/gas/index.js +1 -0
  249. package/dest/ha-signing/config.d.ts +72 -0
  250. package/dest/ha-signing/config.d.ts.map +1 -0
  251. package/dest/ha-signing/config.js +88 -0
  252. package/dest/ha-signing/index.d.ts +4 -0
  253. package/dest/ha-signing/index.d.ts.map +1 -0
  254. package/dest/ha-signing/index.js +3 -0
  255. package/dest/ha-signing/local_config.d.ts +32 -0
  256. package/dest/ha-signing/local_config.d.ts.map +1 -0
  257. package/dest/ha-signing/local_config.js +24 -0
  258. package/dest/ha-signing/types.d.ts +90 -0
  259. package/dest/ha-signing/types.d.ts.map +1 -0
  260. package/dest/ha-signing/types.js +39 -0
  261. package/dest/hash/hash.d.ts +35 -1
  262. package/dest/hash/hash.d.ts.map +1 -1
  263. package/dest/hash/hash.js +78 -11
  264. package/dest/hash/map_slot.d.ts +1 -1
  265. package/dest/hash/map_slot.d.ts.map +1 -1
  266. package/dest/hash/map_slot.js +4 -3
  267. package/dest/interfaces/allowed_element.d.ts +17 -35
  268. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  269. package/dest/interfaces/allowed_element.js +8 -8
  270. package/dest/interfaces/api_limit.d.ts +2 -1
  271. package/dest/interfaces/api_limit.d.ts.map +1 -1
  272. package/dest/interfaces/api_limit.js +1 -0
  273. package/dest/interfaces/archiver.d.ts +22 -32
  274. package/dest/interfaces/archiver.d.ts.map +1 -1
  275. package/dest/interfaces/archiver.js +209 -61
  276. package/dest/interfaces/aztec-node-admin.d.ts +111 -230
  277. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  278. package/dest/interfaces/aztec-node-admin.js +68 -17
  279. package/dest/interfaces/aztec-node-debug.d.ts +21 -0
  280. package/dest/interfaces/aztec-node-debug.d.ts.map +1 -0
  281. package/dest/interfaces/aztec-node-debug.js +21 -0
  282. package/dest/interfaces/aztec-node.d.ts +111 -131
  283. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  284. package/dest/interfaces/aztec-node.js +300 -76
  285. package/dest/interfaces/block-builder.d.ts +55 -18
  286. package/dest/interfaces/block-builder.d.ts.map +1 -1
  287. package/dest/interfaces/block-builder.js +16 -2
  288. package/dest/interfaces/block_response.d.ts +90 -0
  289. package/dest/interfaces/block_response.d.ts.map +1 -0
  290. package/dest/interfaces/block_response.js +30 -0
  291. package/dest/interfaces/chain_tips.d.ts +50 -0
  292. package/dest/interfaces/chain_tips.d.ts.map +1 -0
  293. package/dest/interfaces/chain_tips.js +11 -0
  294. package/dest/interfaces/checkpoint_parameter.d.ts +14 -0
  295. package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -0
  296. package/dest/interfaces/checkpoint_parameter.js +18 -0
  297. package/dest/interfaces/checkpoint_response.d.ts +122 -0
  298. package/dest/interfaces/checkpoint_response.d.ts.map +1 -0
  299. package/dest/interfaces/checkpoint_response.js +26 -0
  300. package/dest/interfaces/client.d.ts +8 -2
  301. package/dest/interfaces/client.d.ts.map +1 -1
  302. package/dest/interfaces/client.js +7 -1
  303. package/dest/interfaces/configs.d.ts +75 -119
  304. package/dest/interfaces/configs.d.ts.map +1 -1
  305. package/dest/interfaces/configs.js +18 -3
  306. package/dest/interfaces/l1_publish_info.d.ts +29 -0
  307. package/dest/interfaces/l1_publish_info.d.ts.map +1 -0
  308. package/dest/interfaces/l1_publish_info.js +26 -0
  309. package/dest/interfaces/l2_logs_source.d.ts +14 -25
  310. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  311. package/dest/interfaces/l2_logs_source.js +5 -0
  312. package/dest/interfaces/merkle_tree_operations.d.ts +13 -22
  313. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  314. package/dest/interfaces/p2p-bootstrap.js +8 -2
  315. package/dest/interfaces/p2p.d.ts +18 -13
  316. package/dest/interfaces/p2p.d.ts.map +1 -1
  317. package/dest/interfaces/p2p.js +28 -5
  318. package/dest/interfaces/private_kernel_prover.d.ts +62 -2
  319. package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
  320. package/dest/interfaces/prover-agent.d.ts +5 -23
  321. package/dest/interfaces/prover-agent.d.ts.map +1 -1
  322. package/dest/interfaces/prover-agent.js +4 -1
  323. package/dest/interfaces/prover-broker.d.ts +16 -1
  324. package/dest/interfaces/prover-broker.d.ts.map +1 -1
  325. package/dest/interfaces/prover-broker.js +4 -1
  326. package/dest/interfaces/prover-client.d.ts +19 -21
  327. package/dest/interfaces/prover-client.d.ts.map +1 -1
  328. package/dest/interfaces/prover-client.js +18 -4
  329. package/dest/interfaces/prover-node.js +22 -8
  330. package/dest/interfaces/proving-job-source.js +24 -4
  331. package/dest/interfaces/proving-job.d.ts +751 -5802
  332. package/dest/interfaces/proving-job.d.ts.map +1 -1
  333. package/dest/interfaces/proving-job.js +1 -1
  334. package/dest/interfaces/public_storage_override.d.ts +22 -0
  335. package/dest/interfaces/public_storage_override.d.ts.map +1 -0
  336. package/dest/interfaces/public_storage_override.js +7 -0
  337. package/dest/interfaces/server.d.ts +6 -1
  338. package/dest/interfaces/server.d.ts.map +1 -1
  339. package/dest/interfaces/server.js +5 -0
  340. package/dest/interfaces/slasher.d.ts +27 -59
  341. package/dest/interfaces/slasher.d.ts.map +1 -1
  342. package/dest/interfaces/slasher.js +10 -4
  343. package/dest/interfaces/tx_provider.d.ts +8 -3
  344. package/dest/interfaces/tx_provider.d.ts.map +1 -1
  345. package/dest/interfaces/validator.d.ts +95 -131
  346. package/dest/interfaces/validator.d.ts.map +1 -1
  347. package/dest/interfaces/validator.js +16 -5
  348. package/dest/interfaces/world_state.d.ts +6 -5
  349. package/dest/interfaces/world_state.d.ts.map +1 -1
  350. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +3 -3
  351. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
  352. package/dest/kernel/hints/build_note_hash_read_request_hints.js +29 -16
  353. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +4 -4
  354. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  355. package/dest/kernel/hints/build_nullifier_read_request_hints.js +28 -17
  356. package/dest/kernel/hints/build_transient_data_hints.d.ts +5 -2
  357. package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
  358. package/dest/kernel/hints/build_transient_data_hints.js +9 -3
  359. package/dest/kernel/hints/index.d.ts +2 -2
  360. package/dest/kernel/hints/index.js +2 -2
  361. package/dest/kernel/hints/key_validation_hint.d.ts +2 -1
  362. package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
  363. package/dest/kernel/hints/key_validation_request.d.ts +12 -7
  364. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  365. package/dest/kernel/hints/key_validation_request.js +20 -18
  366. package/dest/kernel/hints/key_validation_request_and_separator.d.ts +24 -0
  367. package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
  368. package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +12 -15
  369. package/dest/kernel/hints/private_kernel_reset_hints.d.ts +13 -1
  370. package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
  371. package/dest/kernel/hints/read_request.d.ts +7 -1
  372. package/dest/kernel/hints/read_request.d.ts.map +1 -1
  373. package/dest/kernel/hints/read_request_hints.d.ts +7 -1
  374. package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
  375. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +8 -8
  376. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
  377. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
  378. package/dest/kernel/index.d.ts +5 -1
  379. package/dest/kernel/index.d.ts.map +1 -1
  380. package/dest/kernel/index.js +4 -0
  381. package/dest/kernel/log_hash.d.ts +6 -2
  382. package/dest/kernel/log_hash.d.ts.map +1 -1
  383. package/dest/kernel/log_hash.js +21 -9
  384. package/dest/kernel/private_accumulated_data.d.ts +23 -1
  385. package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
  386. package/dest/kernel/private_call_data.d.ts +25 -1
  387. package/dest/kernel/private_call_data.d.ts.map +1 -1
  388. package/dest/kernel/private_call_request.d.ts +16 -1
  389. package/dest/kernel/private_call_request.d.ts.map +1 -1
  390. package/dest/kernel/private_circuit_public_inputs.d.ts +82 -9
  391. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  392. package/dest/kernel/private_circuit_public_inputs.js +16 -16
  393. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +34 -4
  394. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  395. package/dest/kernel/private_kernel_circuit_public_inputs.js +4 -4
  396. package/dest/kernel/private_kernel_data.d.ts +7 -1
  397. package/dest/kernel/private_kernel_data.d.ts.map +1 -1
  398. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +23 -0
  399. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -0
  400. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +35 -0
  401. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +24 -0
  402. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -0
  403. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +37 -0
  404. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +22 -1
  405. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  406. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts +16 -0
  407. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.d.ts.map +1 -0
  408. package/dest/kernel/private_kernel_inner_2_circuit_private_inputs.js +23 -0
  409. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts +17 -0
  410. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.d.ts.map +1 -0
  411. package/dest/kernel/private_kernel_inner_3_circuit_private_inputs.js +25 -0
  412. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +7 -1
  413. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
  414. package/dest/kernel/private_kernel_prover_output.d.ts +3 -29
  415. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
  416. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -1
  417. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
  418. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +12 -3
  419. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
  420. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
  421. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +34 -8
  422. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  423. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +32 -13
  424. package/dest/kernel/private_to_avm_accumulated_data.d.ts +26 -70
  425. package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
  426. package/dest/kernel/private_to_avm_accumulated_data.js +11 -5
  427. package/dest/kernel/private_to_public_accumulated_data.d.ts +4 -3
  428. package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
  429. package/dest/kernel/private_to_public_accumulated_data.js +6 -3
  430. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +7 -6
  431. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  432. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +13 -9
  433. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +21 -4
  434. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  435. package/dest/kernel/private_to_rollup_accumulated_data.js +6 -3
  436. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +22 -6
  437. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  438. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +13 -9
  439. package/dest/kernel/private_validation_requests.d.ts +13 -4
  440. package/dest/kernel/private_validation_requests.d.ts.map +1 -1
  441. package/dest/kernel/private_validation_requests.js +9 -9
  442. package/dest/kernel/public_call_request.d.ts +36 -30
  443. package/dest/kernel/public_call_request.d.ts.map +1 -1
  444. package/dest/kernel/public_call_request.js +16 -7
  445. package/dest/kernel/utils/optional_number.d.ts +7 -1
  446. package/dest/kernel/utils/optional_number.d.ts.map +1 -1
  447. package/dest/keys/derivation.d.ts +9 -5
  448. package/dest/keys/derivation.d.ts.map +1 -1
  449. package/dest/keys/derivation.js +28 -18
  450. package/dest/keys/key_types.d.ts +3 -3
  451. package/dest/keys/key_types.d.ts.map +1 -1
  452. package/dest/keys/public_key.d.ts +22 -3
  453. package/dest/keys/public_key.d.ts.map +1 -1
  454. package/dest/keys/public_key.js +20 -1
  455. package/dest/keys/public_keys.d.ts +56 -79
  456. package/dest/keys/public_keys.d.ts.map +1 -1
  457. package/dest/keys/public_keys.js +102 -74
  458. package/dest/keys/utils.d.ts +1 -1
  459. package/dest/keys/utils.d.ts.map +1 -1
  460. package/dest/keys/utils.js +8 -4
  461. package/dest/kv-store/config.d.ts +14 -0
  462. package/dest/kv-store/config.d.ts.map +1 -0
  463. package/dest/kv-store/config.js +21 -0
  464. package/dest/kv-store/index.d.ts +2 -0
  465. package/dest/kv-store/index.d.ts.map +1 -0
  466. package/dest/kv-store/index.js +1 -0
  467. package/dest/l1-contracts/index.d.ts +2 -2
  468. package/dest/l1-contracts/index.d.ts.map +1 -1
  469. package/dest/l1-contracts/index.js +1 -1
  470. package/dest/logs/app_tagging_secret.d.ts +46 -0
  471. package/dest/logs/app_tagging_secret.d.ts.map +1 -0
  472. package/dest/logs/app_tagging_secret.js +109 -0
  473. package/dest/logs/app_tagging_secret_kind.d.ts +6 -0
  474. package/dest/logs/app_tagging_secret_kind.d.ts.map +1 -0
  475. package/dest/logs/app_tagging_secret_kind.js +4 -0
  476. package/dest/logs/contract_class_log.d.ts +16 -34
  477. package/dest/logs/contract_class_log.d.ts.map +1 -1
  478. package/dest/logs/contract_class_log.js +11 -9
  479. package/dest/logs/debug_log_store.d.ts +30 -0
  480. package/dest/logs/debug_log_store.d.ts.map +1 -0
  481. package/dest/logs/debug_log_store.js +30 -0
  482. package/dest/logs/index.d.ts +9 -7
  483. package/dest/logs/index.d.ts.map +1 -1
  484. package/dest/logs/index.js +8 -6
  485. package/dest/logs/log_cursor.d.ts +51 -0
  486. package/dest/logs/log_cursor.d.ts.map +1 -0
  487. package/dest/logs/log_cursor.js +82 -0
  488. package/dest/logs/log_result.d.ts +54 -0
  489. package/dest/logs/log_result.d.ts.map +1 -0
  490. package/dest/logs/log_result.js +56 -0
  491. package/dest/logs/logs_query.d.ts +82 -0
  492. package/dest/logs/logs_query.d.ts.map +1 -0
  493. package/dest/logs/logs_query.js +50 -0
  494. package/dest/logs/message_context.d.ts +4 -7
  495. package/dest/logs/message_context.d.ts.map +1 -1
  496. package/dest/logs/message_context.js +23 -9
  497. package/dest/logs/pending_tagged_log.d.ts +2 -3
  498. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  499. package/dest/logs/pending_tagged_log.js +2 -2
  500. package/dest/logs/pre_tag.d.ts +14 -22
  501. package/dest/logs/pre_tag.d.ts.map +1 -1
  502. package/dest/logs/pre_tag.js +2 -2
  503. package/dest/logs/private_log.d.ts +8 -13
  504. package/dest/logs/private_log.d.ts.map +1 -1
  505. package/dest/logs/private_log.js +6 -3
  506. package/dest/logs/public_log.d.ts +4 -3
  507. package/dest/logs/public_log.d.ts.map +1 -1
  508. package/dest/logs/public_log.js +2 -1
  509. package/dest/logs/query_all_logs_by_tags.d.ts +24 -0
  510. package/dest/logs/query_all_logs_by_tags.d.ts.map +1 -0
  511. package/dest/logs/query_all_logs_by_tags.js +64 -0
  512. package/dest/logs/shared_secret_derivation.d.ts +11 -10
  513. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  514. package/dest/logs/shared_secret_derivation.js +15 -9
  515. package/dest/logs/siloed_tag.d.ts +12 -9
  516. package/dest/logs/siloed_tag.d.ts.map +1 -1
  517. package/dest/logs/siloed_tag.js +18 -6
  518. package/dest/logs/tag.d.ts +5 -6
  519. package/dest/logs/tag.d.ts.map +1 -1
  520. package/dest/logs/tag.js +5 -1
  521. package/dest/logs/tagging_index_range.d.ts +22 -0
  522. package/dest/logs/tagging_index_range.d.ts.map +1 -0
  523. package/dest/logs/tagging_index_range.js +8 -0
  524. package/dest/messaging/append_l1_to_l2_messages.d.ts +9 -0
  525. package/dest/messaging/append_l1_to_l2_messages.d.ts.map +1 -0
  526. package/dest/messaging/append_l1_to_l2_messages.js +12 -0
  527. package/dest/messaging/inbox_leaf.d.ts +3 -1
  528. package/dest/messaging/inbox_leaf.d.ts.map +1 -1
  529. package/dest/messaging/index.d.ts +2 -1
  530. package/dest/messaging/index.d.ts.map +1 -1
  531. package/dest/messaging/index.js +1 -0
  532. package/dest/messaging/l1_actor.d.ts +7 -1
  533. package/dest/messaging/l1_actor.d.ts.map +1 -1
  534. package/dest/messaging/l1_to_l2_message.d.ts +8 -2
  535. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  536. package/dest/messaging/l1_to_l2_message.js +11 -13
  537. package/dest/messaging/l1_to_l2_message_source.d.ts +4 -2
  538. package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
  539. package/dest/messaging/l2_actor.d.ts +7 -1
  540. package/dest/messaging/l2_actor.d.ts.map +1 -1
  541. package/dest/messaging/l2_to_l1_membership.d.ts +64 -8
  542. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  543. package/dest/messaging/l2_to_l1_membership.js +122 -32
  544. package/dest/messaging/l2_to_l1_message.d.ts +38 -112
  545. package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
  546. package/dest/messaging/l2_to_l1_message.js +21 -12
  547. package/dest/messaging/out_hash.d.ts +41 -4
  548. package/dest/messaging/out_hash.d.ts.map +1 -1
  549. package/dest/messaging/out_hash.js +52 -26
  550. package/dest/noir/index.d.ts +5 -3
  551. package/dest/noir/index.d.ts.map +1 -1
  552. package/dest/note/index.d.ts +1 -2
  553. package/dest/note/index.d.ts.map +1 -1
  554. package/dest/note/index.js +0 -1
  555. package/dest/note/note.d.ts +2 -2
  556. package/dest/note/note.d.ts.map +1 -1
  557. package/dest/note/note_dao.d.ts +36 -5
  558. package/dest/note/note_dao.d.ts.map +1 -1
  559. package/dest/note/note_dao.js +14 -14
  560. package/dest/p2p/attestation_utils.d.ts +11 -1
  561. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  562. package/dest/p2p/attestation_utils.js +45 -0
  563. package/dest/p2p/block_proposal.d.ts +51 -19
  564. package/dest/p2p/block_proposal.d.ts.map +1 -1
  565. package/dest/p2p/block_proposal.js +77 -43
  566. package/dest/p2p/checkpoint_attestation.d.ts +20 -9
  567. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  568. package/dest/p2p/checkpoint_attestation.js +23 -24
  569. package/dest/p2p/checkpoint_proposal.d.ts +65 -26
  570. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  571. package/dest/p2p/checkpoint_proposal.js +90 -66
  572. package/dest/p2p/client_type.d.ts +2 -5
  573. package/dest/p2p/client_type.d.ts.map +1 -1
  574. package/dest/p2p/client_type.js +0 -7
  575. package/dest/p2p/consensus_payload.d.ts +35 -19
  576. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  577. package/dest/p2p/consensus_payload.js +47 -24
  578. package/dest/p2p/constants.d.ts +5 -0
  579. package/dest/p2p/constants.d.ts.map +1 -0
  580. package/dest/p2p/constants.js +3 -0
  581. package/dest/p2p/gossipable.d.ts +4 -4
  582. package/dest/p2p/gossipable.d.ts.map +1 -1
  583. package/dest/p2p/index.d.ts +2 -2
  584. package/dest/p2p/index.d.ts.map +1 -1
  585. package/dest/p2p/index.js +1 -1
  586. package/dest/p2p/message_validator.d.ts +18 -3
  587. package/dest/p2p/message_validator.d.ts.map +1 -1
  588. package/dest/p2p/message_validator.js +2 -1
  589. package/dest/p2p/peer_error.d.ts +3 -1
  590. package/dest/p2p/peer_error.d.ts.map +1 -1
  591. package/dest/p2p/peer_error.js +5 -0
  592. package/dest/p2p/signature_utils.d.ts +28 -19
  593. package/dest/p2p/signature_utils.d.ts.map +1 -1
  594. package/dest/p2p/signature_utils.js +118 -21
  595. package/dest/p2p/signed_txs.d.ts +17 -13
  596. package/dest/p2p/signed_txs.d.ts.map +1 -1
  597. package/dest/p2p/signed_txs.js +32 -25
  598. package/dest/p2p/topic_type.d.ts +3 -4
  599. package/dest/p2p/topic_type.d.ts.map +1 -1
  600. package/dest/p2p/topic_type.js +7 -23
  601. package/dest/parity/parity_base_private_inputs.d.ts +10 -4
  602. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  603. package/dest/parity/parity_base_private_inputs.js +7 -5
  604. package/dest/parity/parity_public_inputs.d.ts +11 -4
  605. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  606. package/dest/parity/parity_public_inputs.js +6 -3
  607. package/dest/parity/parity_root_private_inputs.d.ts +3 -2
  608. package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
  609. package/dest/proofs/chonk_proof.d.ts +57 -7
  610. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  611. package/dest/proofs/chonk_proof.js +121 -19
  612. package/dest/proofs/proof.d.ts +4 -1
  613. package/dest/proofs/proof.d.ts.map +1 -1
  614. package/dest/proofs/recursive_proof.d.ts +11 -2
  615. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  616. package/dest/rollup/base_rollup_hints.d.ts +34 -1
  617. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  618. package/dest/rollup/block_constant_data.d.ts +12 -1
  619. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  620. package/dest/rollup/block_headers_hash.d.ts +1 -1
  621. package/dest/rollup/block_headers_hash.d.ts.map +1 -1
  622. package/dest/rollup/block_headers_hash.js +9 -3
  623. package/dest/rollup/block_merge_rollup_private_inputs.d.ts +5 -2
  624. package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
  625. package/dest/rollup/block_rollup_public_inputs.d.ts +55 -4
  626. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  627. package/dest/rollup/block_rollup_public_inputs.js +14 -2
  628. package/dest/rollup/block_root_rollup_private_inputs.d.ts +69 -6
  629. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  630. package/dest/rollup/checkpoint_constant_data.d.ts +10 -1
  631. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
  632. package/dest/rollup/checkpoint_header.d.ts +31 -4
  633. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  634. package/dest/rollup/checkpoint_header.js +23 -7
  635. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +5 -2
  636. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
  637. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +53 -11
  638. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  639. package/dest/rollup/checkpoint_rollup_public_inputs.js +20 -7
  640. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +48 -7
  641. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  642. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +13 -2
  643. package/dest/rollup/epoch_constant_data.d.ts +16 -1
  644. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  645. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts +2 -2
  646. package/dest/rollup/private_tx_base_rollup_private_inputs.d.ts.map +1 -1
  647. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +2 -2
  648. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
  649. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +2 -2
  650. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
  651. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +2 -2
  652. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
  653. package/dest/rollup/root_rollup_private_inputs.d.ts +7 -2
  654. package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
  655. package/dest/rollup/root_rollup_public_inputs.d.ts +18 -8
  656. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  657. package/dest/rollup/root_rollup_public_inputs.js +7 -4
  658. package/dest/rollup/tree_snapshot_diff_hints.d.ts +24 -1
  659. package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
  660. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +5 -2
  661. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
  662. package/dest/rollup/tx_rollup_public_inputs.d.ts +30 -2
  663. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  664. package/dest/schemas/schemas.d.ts +33 -79
  665. package/dest/schemas/schemas.d.ts.map +1 -1
  666. package/dest/schemas/schemas.js +2 -2
  667. package/dest/slashing/helpers.d.ts +2 -2
  668. package/dest/slashing/helpers.d.ts.map +1 -1
  669. package/dest/slashing/helpers.js +16 -7
  670. package/dest/slashing/index.d.ts +2 -3
  671. package/dest/slashing/index.d.ts.map +1 -1
  672. package/dest/slashing/index.js +1 -2
  673. package/dest/slashing/serialization.d.ts +2 -6
  674. package/dest/slashing/serialization.d.ts.map +1 -1
  675. package/dest/slashing/serialization.js +0 -60
  676. package/dest/slashing/types.d.ts +21 -111
  677. package/dest/slashing/types.d.ts.map +1 -1
  678. package/dest/slashing/types.js +28 -24
  679. package/dest/slashing/{tally.d.ts → votes.d.ts} +8 -2
  680. package/dest/slashing/votes.d.ts.map +1 -0
  681. package/dest/slashing/{tally.js → votes.js} +35 -3
  682. package/dest/snapshots/types.d.ts +15 -78
  683. package/dest/snapshots/types.d.ts.map +1 -1
  684. package/dest/stats/stats.d.ts +2 -4
  685. package/dest/stats/stats.d.ts.map +1 -1
  686. package/dest/tests/factories.d.ts +26 -33
  687. package/dest/tests/factories.d.ts.map +1 -1
  688. package/dest/tests/factories.js +99 -100
  689. package/dest/tests/jest.js +1 -1
  690. package/dest/tests/mocks.d.ts +31 -17
  691. package/dest/tests/mocks.d.ts.map +1 -1
  692. package/dest/tests/mocks.js +100 -84
  693. package/dest/timetable/index.d.ts +87 -0
  694. package/dest/timetable/index.d.ts.map +1 -0
  695. package/dest/timetable/index.js +243 -0
  696. package/dest/trees/append_only_tree_snapshot.d.ts +21 -14
  697. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  698. package/dest/trees/append_only_tree_snapshot.js +6 -3
  699. package/dest/trees/nullifier_leaf.d.ts +31 -42
  700. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  701. package/dest/trees/nullifier_leaf.js +3 -0
  702. package/dest/trees/nullifier_membership_witness.d.ts +25 -59
  703. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  704. package/dest/trees/nullifier_membership_witness.js +2 -14
  705. package/dest/trees/public_data_leaf.d.ts +37 -53
  706. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  707. package/dest/trees/public_data_leaf.js +7 -6
  708. package/dest/trees/public_data_witness.d.ts +26 -58
  709. package/dest/trees/public_data_witness.d.ts.map +1 -1
  710. package/dest/tx/block_header.d.ts +19 -4
  711. package/dest/tx/block_header.d.ts.map +1 -1
  712. package/dest/tx/block_header.js +16 -5
  713. package/dest/tx/call_context.d.ts +16 -14
  714. package/dest/tx/call_context.d.ts.map +1 -1
  715. package/dest/tx/capsule.d.ts +10 -3
  716. package/dest/tx/capsule.d.ts.map +1 -1
  717. package/dest/tx/capsule.js +9 -3
  718. package/dest/tx/execution_payload.d.ts +9 -1
  719. package/dest/tx/execution_payload.d.ts.map +1 -1
  720. package/dest/tx/fee_provider.d.ts +10 -0
  721. package/dest/tx/fee_provider.d.ts.map +1 -0
  722. package/dest/tx/fee_provider.js +1 -0
  723. package/dest/tx/function_data.d.ts +7 -11
  724. package/dest/tx/function_data.d.ts.map +1 -1
  725. package/dest/tx/global_variable_builder.d.ts +3 -4
  726. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  727. package/dest/tx/global_variables.d.ts +27 -52
  728. package/dest/tx/global_variables.d.ts.map +1 -1
  729. package/dest/tx/global_variables.js +8 -12
  730. package/dest/tx/hashed_values.d.ts +10 -3
  731. package/dest/tx/hashed_values.d.ts.map +1 -1
  732. package/dest/tx/hashed_values.js +6 -3
  733. package/dest/tx/in_tx.d.ts +6 -18
  734. package/dest/tx/in_tx.d.ts.map +1 -1
  735. package/dest/tx/index.d.ts +2 -1
  736. package/dest/tx/index.d.ts.map +1 -1
  737. package/dest/tx/index.js +1 -0
  738. package/dest/tx/indexed_tx_effect.d.ts +6 -20
  739. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  740. package/dest/tx/indexed_tx_effect.js +2 -2
  741. package/dest/tx/partial_state_reference.d.ts +25 -65
  742. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  743. package/dest/tx/partial_state_reference.js +6 -3
  744. package/dest/tx/private_execution_result.d.ts +32 -21
  745. package/dest/tx/private_execution_result.d.ts.map +1 -1
  746. package/dest/tx/private_execution_result.js +7 -7
  747. package/dest/tx/private_tx_constant_data.d.ts +16 -1
  748. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  749. package/dest/tx/profiling.d.ts +115 -278
  750. package/dest/tx/profiling.d.ts.map +1 -1
  751. package/dest/tx/profiling.js +59 -12
  752. package/dest/tx/protocol_contracts.d.ts +5 -9
  753. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  754. package/dest/tx/protocol_contracts.js +2 -2
  755. package/dest/tx/proven_tx.d.ts +30 -74
  756. package/dest/tx/proven_tx.d.ts.map +1 -1
  757. package/dest/tx/proven_tx.js +6 -0
  758. package/dest/tx/public_call_request_with_calldata.d.ts +10 -3
  759. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  760. package/dest/tx/public_call_request_with_calldata.js +6 -3
  761. package/dest/tx/public_simulation_output.d.ts +4 -2
  762. package/dest/tx/public_simulation_output.d.ts.map +1 -1
  763. package/dest/tx/public_simulation_output.js +7 -3
  764. package/dest/tx/simulated_tx.d.ts +68 -1144
  765. package/dest/tx/simulated_tx.d.ts.map +1 -1
  766. package/dest/tx/simulated_tx.js +17 -12
  767. package/dest/tx/state_reference.d.ts +32 -117
  768. package/dest/tx/state_reference.d.ts.map +1 -1
  769. package/dest/tx/state_reference.js +6 -4
  770. package/dest/tx/tree_snapshots.d.ts +27 -84
  771. package/dest/tx/tree_snapshots.d.ts.map +1 -1
  772. package/dest/tx/tree_snapshots.js +6 -4
  773. package/dest/tx/tx.d.ts +35 -17
  774. package/dest/tx/tx.d.ts.map +1 -1
  775. package/dest/tx/tx.js +46 -32
  776. package/dest/tx/tx_constant_data.d.ts +4 -3
  777. package/dest/tx/tx_constant_data.d.ts.map +1 -1
  778. package/dest/tx/tx_constant_data.js +6 -3
  779. package/dest/tx/tx_context.d.ts +33 -131
  780. package/dest/tx/tx_context.d.ts.map +1 -1
  781. package/dest/tx/tx_context.js +6 -6
  782. package/dest/tx/tx_effect.d.ts +32 -6
  783. package/dest/tx/tx_effect.d.ts.map +1 -1
  784. package/dest/tx/tx_effect.js +0 -7
  785. package/dest/tx/tx_execution_request.d.ts +30 -1
  786. package/dest/tx/tx_execution_request.d.ts.map +1 -1
  787. package/dest/tx/tx_hash.d.ts +7 -4
  788. package/dest/tx/tx_hash.d.ts.map +1 -1
  789. package/dest/tx/tx_hash.js +13 -5
  790. package/dest/tx/tx_receipt.d.ts +69 -18
  791. package/dest/tx/tx_receipt.d.ts.map +1 -1
  792. package/dest/tx/tx_receipt.js +58 -29
  793. package/dest/tx/tx_request.d.ts +6 -1
  794. package/dest/tx/tx_request.d.ts.map +1 -1
  795. package/dest/tx/tx_request.js +2 -2
  796. package/dest/tx/validator/empty_validator.d.ts +2 -2
  797. package/dest/tx/validator/empty_validator.d.ts.map +1 -1
  798. package/dest/tx/validator/error_texts.d.ts +11 -2
  799. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  800. package/dest/tx/validator/error_texts.js +13 -1
  801. package/dest/tx/validator/tx_validator.d.ts +6 -28
  802. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  803. package/dest/tx/validator/tx_validator.js +0 -4
  804. package/dest/types/shared.d.ts +7 -12
  805. package/dest/types/shared.d.ts.map +1 -1
  806. package/dest/types/shared.js +6 -12
  807. package/dest/update-checker/dev_version.d.ts +3 -0
  808. package/dest/update-checker/dev_version.d.ts.map +1 -0
  809. package/dest/update-checker/dev_version.js +1 -0
  810. package/dest/update-checker/index.d.ts +4 -2
  811. package/dest/update-checker/index.d.ts.map +1 -1
  812. package/dest/update-checker/index.js +3 -1
  813. package/dest/update-checker/package_version.d.ts +6 -0
  814. package/dest/update-checker/package_version.d.ts.map +1 -0
  815. package/dest/update-checker/package_version.js +13 -0
  816. package/dest/update-checker/version_checker.d.ts +25 -0
  817. package/dest/update-checker/version_checker.d.ts.map +1 -0
  818. package/dest/update-checker/version_checker.js +50 -0
  819. package/dest/validators/errors.d.ts +6 -1
  820. package/dest/validators/errors.d.ts.map +1 -1
  821. package/dest/validators/errors.js +7 -0
  822. package/dest/validators/schemas.d.ts +147 -614
  823. package/dest/validators/schemas.d.ts.map +1 -1
  824. package/dest/validators/schemas.js +9 -6
  825. package/dest/validators/types.d.ts +21 -4
  826. package/dest/validators/types.d.ts.map +1 -1
  827. package/dest/versioning/versioning.d.ts +4 -2
  828. package/dest/versioning/versioning.d.ts.map +1 -1
  829. package/dest/versioning/versioning.js +5 -2
  830. package/dest/vks/verification_key.d.ts +4 -118
  831. package/dest/vks/verification_key.d.ts.map +1 -1
  832. package/dest/vks/verification_key.js +5 -126
  833. package/dest/vks/vk_data.d.ts +7 -1
  834. package/dest/vks/vk_data.d.ts.map +1 -1
  835. package/dest/world-state/genesis_data.d.ts +13 -0
  836. package/dest/world-state/genesis_data.d.ts.map +1 -0
  837. package/dest/world-state/genesis_data.js +7 -0
  838. package/dest/world-state/index.d.ts +2 -1
  839. package/dest/world-state/index.d.ts.map +1 -1
  840. package/dest/world-state/index.js +1 -0
  841. package/dest/world-state/world_state_revision.d.ts +15 -26
  842. package/dest/world-state/world_state_revision.d.ts.map +1 -1
  843. package/dest/world-state/world_state_revision.js +7 -1
  844. package/dest/zkpassport/index.d.ts +3 -4
  845. package/dest/zkpassport/index.d.ts.map +1 -1
  846. package/dest/zkpassport/index.js +9 -9
  847. package/package.json +32 -16
  848. package/src/abi/abi.ts +78 -21
  849. package/src/abi/authorization_selector.ts +2 -8
  850. package/src/abi/buffer.ts +25 -4
  851. package/src/abi/contract_artifact.ts +11 -6
  852. package/src/abi/decoder.ts +36 -82
  853. package/src/abi/encoder.ts +85 -6
  854. package/src/abi/event_metadata_definition.ts +2 -0
  855. package/src/abi/event_selector.ts +2 -8
  856. package/src/abi/function_call.ts +25 -3
  857. package/src/abi/function_selector.ts +4 -13
  858. package/src/abi/function_signature_decoder.ts +77 -0
  859. package/src/abi/index.ts +1 -0
  860. package/src/abi/note_selector.ts +3 -12
  861. package/src/abi/selector.ts +1 -1
  862. package/src/abi/utils.ts +44 -0
  863. package/src/auth_witness/auth_witness.ts +3 -3
  864. package/src/avm/avm.ts +5 -0
  865. package/src/avm/message_pack.ts +12 -3
  866. package/src/avm/revert_code.ts +20 -25
  867. package/src/aztec-address/index.ts +15 -12
  868. package/src/block/attestation_info.ts +11 -11
  869. package/src/block/block_data.ts +25 -0
  870. package/src/block/block_hash.ts +32 -24
  871. package/src/block/block_parameter.ts +74 -4
  872. package/src/block/body.ts +2 -1
  873. package/src/block/in_block.ts +6 -6
  874. package/src/block/index.ts +1 -3
  875. package/src/block/l2_block.ts +112 -148
  876. package/src/block/l2_block_info.ts +8 -6
  877. package/src/block/l2_block_source.ts +216 -106
  878. package/src/block/l2_block_stream/interfaces.ts +14 -7
  879. package/src/block/l2_block_stream/l2_block_stream.ts +87 -47
  880. package/src/block/l2_block_stream/l2_tips_memory_store.ts +5 -0
  881. package/src/block/l2_block_stream/l2_tips_store_base.ts +55 -21
  882. package/src/block/proposal/attestations_and_signers.ts +32 -17
  883. package/src/block/test/l2_tips_store_test_suite.ts +14 -12
  884. package/src/block/validate_block_result.ts +5 -4
  885. package/src/checkpoint/checkpoint.ts +82 -23
  886. package/src/checkpoint/checkpoint_data.ts +91 -0
  887. package/src/checkpoint/checkpoint_reexecution_tracker.ts +167 -0
  888. package/src/checkpoint/digest.ts +28 -0
  889. package/src/checkpoint/index.ts +5 -0
  890. package/src/checkpoint/previous_checkpoint_out_hashes.ts +61 -0
  891. package/src/checkpoint/published_checkpoint.ts +7 -4
  892. package/src/checkpoint/validate.ts +230 -0
  893. package/src/config/chain-config.ts +13 -16
  894. package/src/config/index.ts +2 -0
  895. package/src/config/node-rpc-config.ts +1 -1
  896. package/src/config/pipelining-config.ts +31 -0
  897. package/src/config/sequencer-config.ts +65 -0
  898. package/src/contract/complete_address.ts +7 -3
  899. package/src/contract/contract_address.ts +10 -10
  900. package/src/contract/contract_class.ts +3 -3
  901. package/src/contract/contract_class_id.ts +7 -6
  902. package/src/contract/contract_instance.ts +11 -2
  903. package/src/contract/index.ts +0 -4
  904. package/src/contract/interfaces/contract_class.ts +2 -82
  905. package/src/contract/interfaces/contract_instance.ts +6 -2
  906. package/src/contract/interfaces/node-info.ts +3 -0
  907. package/src/contract/private_function.ts +6 -5
  908. package/src/database-version/database_version.ts +87 -0
  909. package/src/database-version/version_manager.ts +18 -77
  910. package/src/delayed_public_mutable/delayed_public_mutable_values.ts +9 -10
  911. package/src/deserialization/index.ts +21 -0
  912. package/src/epoch-helpers/index.ts +40 -1
  913. package/src/file-store/factory.ts +13 -4
  914. package/src/file-store/http.ts +29 -10
  915. package/src/file-store/index.ts +1 -0
  916. package/src/file-store/local.ts +15 -5
  917. package/src/file-store/s3.ts +12 -3
  918. package/src/gas/README.md +154 -0
  919. package/src/gas/fee_math.ts +120 -0
  920. package/src/gas/gas.ts +8 -3
  921. package/src/gas/gas_fees.ts +29 -10
  922. package/src/gas/gas_settings.ts +73 -15
  923. package/src/gas/index.ts +1 -0
  924. package/src/ha-signing/config.ts +152 -0
  925. package/src/ha-signing/index.ts +29 -0
  926. package/src/ha-signing/local_config.ts +46 -0
  927. package/src/ha-signing/types.ts +126 -0
  928. package/src/hash/hash.ts +76 -11
  929. package/src/hash/map_slot.ts +3 -2
  930. package/src/interfaces/allowed_element.ts +29 -9
  931. package/src/interfaces/api_limit.ts +1 -0
  932. package/src/interfaces/archiver.ts +83 -93
  933. package/src/interfaces/aztec-node-admin.ts +57 -18
  934. package/src/interfaces/aztec-node-debug.ts +40 -0
  935. package/src/interfaces/aztec-node.ts +293 -322
  936. package/src/interfaces/block-builder.ts +95 -29
  937. package/src/interfaces/block_response.ts +92 -0
  938. package/src/interfaces/chain_tips.ts +24 -0
  939. package/src/interfaces/checkpoint_parameter.ts +20 -0
  940. package/src/interfaces/checkpoint_response.ts +84 -0
  941. package/src/interfaces/client.ts +7 -1
  942. package/src/interfaces/configs.ts +76 -11
  943. package/src/interfaces/l1_publish_info.ts +40 -0
  944. package/src/interfaces/l2_logs_source.ts +13 -26
  945. package/src/interfaces/merkle_tree_operations.ts +12 -21
  946. package/src/interfaces/p2p-bootstrap.ts +2 -2
  947. package/src/interfaces/p2p.ts +38 -29
  948. package/src/interfaces/private_kernel_prover.ts +88 -0
  949. package/src/interfaces/prover-agent.ts +1 -1
  950. package/src/interfaces/prover-broker.ts +22 -0
  951. package/src/interfaces/prover-client.ts +32 -5
  952. package/src/interfaces/prover-node.ts +7 -7
  953. package/src/interfaces/proving-job-source.ts +4 -4
  954. package/src/interfaces/proving-job.ts +3 -3
  955. package/src/interfaces/public_storage_override.ts +26 -0
  956. package/src/interfaces/server.ts +5 -0
  957. package/src/interfaces/slasher.ts +21 -10
  958. package/src/interfaces/tx_provider.ts +8 -2
  959. package/src/interfaces/validator.ts +87 -38
  960. package/src/interfaces/world_state.ts +5 -4
  961. package/src/kernel/hints/build_note_hash_read_request_hints.ts +31 -24
  962. package/src/kernel/hints/build_nullifier_read_request_hints.ts +32 -32
  963. package/src/kernel/hints/build_transient_data_hints.ts +17 -2
  964. package/src/kernel/hints/index.ts +2 -2
  965. package/src/kernel/hints/key_validation_request.ts +18 -16
  966. package/src/kernel/hints/{key_validation_request_and_generator.ts → key_validation_request_and_separator.ts} +12 -15
  967. package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +10 -10
  968. package/src/kernel/index.ts +4 -0
  969. package/src/kernel/log_hash.ts +29 -9
  970. package/src/kernel/private_circuit_public_inputs.ts +14 -14
  971. package/src/kernel/private_kernel_circuit_public_inputs.ts +2 -2
  972. package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +49 -0
  973. package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +52 -0
  974. package/src/kernel/private_kernel_inner_2_circuit_private_inputs.ts +29 -0
  975. package/src/kernel/private_kernel_inner_3_circuit_private_inputs.ts +31 -0
  976. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
  977. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +42 -18
  978. package/src/kernel/private_to_avm_accumulated_data.ts +16 -5
  979. package/src/kernel/private_to_public_accumulated_data.ts +9 -3
  980. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +14 -8
  981. package/src/kernel/private_to_rollup_accumulated_data.ts +8 -3
  982. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +13 -13
  983. package/src/kernel/private_validation_requests.ts +8 -8
  984. package/src/kernel/public_call_request.ts +22 -7
  985. package/src/keys/derivation.ts +33 -21
  986. package/src/keys/key_types.ts +6 -2
  987. package/src/keys/public_key.ts +26 -2
  988. package/src/keys/public_keys.ts +125 -111
  989. package/src/keys/utils.ts +8 -4
  990. package/src/kv-store/config.ts +29 -0
  991. package/src/kv-store/index.ts +1 -0
  992. package/src/l1-contracts/index.ts +1 -1
  993. package/src/logs/app_tagging_secret.ts +137 -0
  994. package/src/logs/app_tagging_secret_kind.ts +6 -0
  995. package/src/logs/contract_class_log.ts +15 -5
  996. package/src/logs/debug_log_store.ts +54 -0
  997. package/src/logs/index.ts +8 -6
  998. package/src/logs/log_cursor.ts +110 -0
  999. package/src/logs/log_result.ts +104 -0
  1000. package/src/logs/logs_query.ts +138 -0
  1001. package/src/logs/message_context.ts +17 -7
  1002. package/src/logs/pending_tagged_log.ts +1 -3
  1003. package/src/logs/pre_tag.ts +3 -6
  1004. package/src/logs/private_log.ts +9 -3
  1005. package/src/logs/public_log.ts +4 -2
  1006. package/src/logs/query_all_logs_by_tags.ts +98 -0
  1007. package/src/logs/shared_secret_derivation.ts +21 -10
  1008. package/src/logs/siloed_tag.ts +28 -13
  1009. package/src/logs/tag.ts +9 -9
  1010. package/src/logs/tagging_index_range.ts +18 -0
  1011. package/src/messaging/append_l1_to_l2_messages.ts +21 -0
  1012. package/src/messaging/index.ts +1 -0
  1013. package/src/messaging/l1_to_l2_message.ts +12 -9
  1014. package/src/messaging/l1_to_l2_message_source.ts +3 -1
  1015. package/src/messaging/l2_to_l1_membership.ts +178 -39
  1016. package/src/messaging/l2_to_l1_message.ts +29 -9
  1017. package/src/messaging/out_hash.ts +60 -29
  1018. package/src/noir/index.ts +4 -2
  1019. package/src/note/index.ts +0 -1
  1020. package/src/note/note_dao.ts +17 -15
  1021. package/src/p2p/attestation_utils.ts +56 -0
  1022. package/src/p2p/block_proposal.ts +141 -45
  1023. package/src/p2p/checkpoint_attestation.ts +33 -32
  1024. package/src/p2p/checkpoint_proposal.ts +181 -90
  1025. package/src/p2p/client_type.ts +0 -6
  1026. package/src/p2p/consensus_payload.ts +68 -29
  1027. package/src/p2p/constants.ts +6 -0
  1028. package/src/p2p/gossipable.ts +4 -4
  1029. package/src/p2p/index.ts +1 -1
  1030. package/src/p2p/message_validator.ts +14 -2
  1031. package/src/p2p/peer_error.ts +7 -0
  1032. package/src/p2p/signature_utils.ts +110 -25
  1033. package/src/p2p/signed_txs.ts +52 -29
  1034. package/src/p2p/topic_type.ts +8 -15
  1035. package/src/parity/parity_base_private_inputs.ts +10 -4
  1036. package/src/parity/parity_public_inputs.ts +9 -2
  1037. package/src/proofs/chonk_proof.ts +141 -17
  1038. package/src/rollup/block_headers_hash.ts +12 -3
  1039. package/src/rollup/block_rollup_public_inputs.ts +15 -2
  1040. package/src/rollup/checkpoint_header.ts +22 -2
  1041. package/src/rollup/checkpoint_rollup_public_inputs.ts +26 -10
  1042. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +14 -1
  1043. package/src/rollup/root_rollup_public_inputs.ts +11 -8
  1044. package/src/schemas/schemas.ts +6 -1
  1045. package/src/slashing/helpers.ts +21 -9
  1046. package/src/slashing/index.ts +1 -2
  1047. package/src/slashing/serialization.ts +1 -81
  1048. package/src/slashing/types.ts +38 -49
  1049. package/src/slashing/{tally.ts → votes.ts} +41 -2
  1050. package/src/stats/stats.ts +4 -2
  1051. package/src/tests/factories.ts +126 -145
  1052. package/src/tests/jest.ts +1 -1
  1053. package/src/tests/mocks.ts +154 -112
  1054. package/src/timetable/index.ts +361 -0
  1055. package/src/trees/append_only_tree_snapshot.ts +8 -3
  1056. package/src/trees/nullifier_leaf.ts +4 -0
  1057. package/src/trees/nullifier_membership_witness.ts +2 -12
  1058. package/src/trees/public_data_leaf.ts +11 -5
  1059. package/src/tx/block_header.ts +26 -7
  1060. package/src/tx/capsule.ts +10 -2
  1061. package/src/tx/fee_provider.ts +10 -0
  1062. package/src/tx/global_variable_builder.ts +2 -3
  1063. package/src/tx/global_variables.ts +13 -21
  1064. package/src/tx/hashed_values.ts +8 -3
  1065. package/src/tx/index.ts +1 -0
  1066. package/src/tx/indexed_tx_effect.ts +2 -2
  1067. package/src/tx/partial_state_reference.ts +8 -3
  1068. package/src/tx/private_execution_result.ts +6 -6
  1069. package/src/tx/profiling.ts +60 -9
  1070. package/src/tx/protocol_contracts.ts +2 -2
  1071. package/src/tx/proven_tx.ts +6 -0
  1072. package/src/tx/public_call_request_with_calldata.ts +8 -3
  1073. package/src/tx/public_simulation_output.ts +4 -0
  1074. package/src/tx/simulated_tx.ts +30 -22
  1075. package/src/tx/state_reference.ts +9 -4
  1076. package/src/tx/tree_snapshots.ts +9 -4
  1077. package/src/tx/tx.ts +61 -44
  1078. package/src/tx/tx_constant_data.ts +8 -3
  1079. package/src/tx/tx_context.ts +8 -3
  1080. package/src/tx/tx_effect.ts +0 -9
  1081. package/src/tx/tx_hash.ts +20 -5
  1082. package/src/tx/tx_receipt.ts +89 -29
  1083. package/src/tx/tx_request.ts +2 -2
  1084. package/src/tx/validator/empty_validator.ts +1 -1
  1085. package/src/tx/validator/error_texts.ts +16 -1
  1086. package/src/tx/validator/tx_validator.ts +2 -6
  1087. package/src/types/shared.ts +8 -13
  1088. package/src/update-checker/dev_version.ts +2 -0
  1089. package/src/update-checker/index.ts +3 -1
  1090. package/src/update-checker/package_version.ts +17 -0
  1091. package/src/update-checker/version_checker.ts +65 -0
  1092. package/src/validators/errors.ts +9 -0
  1093. package/src/validators/schemas.ts +13 -4
  1094. package/src/validators/types.ts +25 -5
  1095. package/src/versioning/versioning.ts +5 -2
  1096. package/src/vks/verification_key.ts +5 -184
  1097. package/src/world-state/genesis_data.ts +27 -0
  1098. package/src/world-state/index.ts +1 -0
  1099. package/src/world-state/world_state_revision.ts +9 -1
  1100. package/src/zkpassport/index.ts +11 -12
  1101. package/dest/abi/mocked_keys.d.ts +0 -2
  1102. package/dest/abi/mocked_keys.d.ts.map +0 -1
  1103. package/dest/abi/mocked_keys.js +0 -1
  1104. package/dest/block/checkpointed_l2_block.d.ts +0 -267
  1105. package/dest/block/checkpointed_l2_block.d.ts.map +0 -1
  1106. package/dest/block/checkpointed_l2_block.js +0 -84
  1107. package/dest/block/l2_block_code_to_purge.d.ts +0 -11
  1108. package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
  1109. package/dest/block/l2_block_code_to_purge.js +0 -55
  1110. package/dest/block/l2_block_header.d.ts +0 -94
  1111. package/dest/block/l2_block_header.d.ts.map +0 -1
  1112. package/dest/block/l2_block_header.js +0 -160
  1113. package/dest/block/l2_block_new.d.ts +0 -134
  1114. package/dest/block/l2_block_new.d.ts.map +0 -1
  1115. package/dest/block/l2_block_new.js +0 -155
  1116. package/dest/contract/contract_class_metadata.d.ts +0 -8
  1117. package/dest/contract/contract_class_metadata.d.ts.map +0 -1
  1118. package/dest/contract/contract_class_metadata.js +0 -1
  1119. package/dest/contract/contract_metadata.d.ts +0 -7
  1120. package/dest/contract/contract_metadata.d.ts.map +0 -1
  1121. package/dest/contract/contract_metadata.js +0 -1
  1122. package/dest/contract/private_function_membership_proof.d.ts +0 -32
  1123. package/dest/contract/private_function_membership_proof.d.ts.map +0 -1
  1124. package/dest/contract/private_function_membership_proof.js +0 -124
  1125. package/dest/contract/utility_function_membership_proof.d.ts +0 -27
  1126. package/dest/contract/utility_function_membership_proof.d.ts.map +0 -1
  1127. package/dest/contract/utility_function_membership_proof.js +0 -87
  1128. package/dest/database-version/index.d.ts +0 -2
  1129. package/dest/database-version/index.d.ts.map +0 -1
  1130. package/dest/database-version/index.js +0 -1
  1131. package/dest/interfaces/get_logs_response.d.ts +0 -90
  1132. package/dest/interfaces/get_logs_response.d.ts.map +0 -1
  1133. package/dest/interfaces/get_logs_response.js +0 -12
  1134. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -25
  1135. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
  1136. package/dest/l1-contracts/slash_factory.d.ts +0 -45
  1137. package/dest/l1-contracts/slash_factory.d.ts.map +0 -1
  1138. package/dest/l1-contracts/slash_factory.js +0 -157
  1139. package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
  1140. package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
  1141. package/dest/logs/directional_app_tagging_secret.js +0 -64
  1142. package/dest/logs/extended_contract_class_log.d.ts +0 -49
  1143. package/dest/logs/extended_contract_class_log.d.ts.map +0 -1
  1144. package/dest/logs/extended_contract_class_log.js +0 -67
  1145. package/dest/logs/extended_public_log.d.ts +0 -98
  1146. package/dest/logs/extended_public_log.d.ts.map +0 -1
  1147. package/dest/logs/extended_public_log.js +0 -73
  1148. package/dest/logs/log_filter.d.ts +0 -22
  1149. package/dest/logs/log_filter.d.ts.map +0 -1
  1150. package/dest/logs/log_filter.js +0 -11
  1151. package/dest/logs/log_id.d.ts +0 -78
  1152. package/dest/logs/log_id.d.ts.map +0 -1
  1153. package/dest/logs/log_id.js +0 -91
  1154. package/dest/logs/tx_scoped_l2_log.d.ts +0 -49
  1155. package/dest/logs/tx_scoped_l2_log.d.ts.map +0 -1
  1156. package/dest/logs/tx_scoped_l2_log.js +0 -70
  1157. package/dest/note/notes_filter.d.ts +0 -27
  1158. package/dest/note/notes_filter.d.ts.map +0 -1
  1159. package/dest/note/notes_filter.js +0 -11
  1160. package/dest/slashing/empire.d.ts +0 -31
  1161. package/dest/slashing/empire.d.ts.map +0 -1
  1162. package/dest/slashing/empire.js +0 -85
  1163. package/dest/slashing/tally.d.ts.map +0 -1
  1164. package/dest/update-checker/update-checker.d.ts +0 -49
  1165. package/dest/update-checker/update-checker.d.ts.map +0 -1
  1166. package/dest/update-checker/update-checker.js +0 -130
  1167. package/src/abi/mocked_keys.ts +0 -2
  1168. package/src/block/checkpointed_l2_block.ts +0 -120
  1169. package/src/block/l2_block_code_to_purge.ts +0 -80
  1170. package/src/block/l2_block_header.ts +0 -255
  1171. package/src/block/l2_block_new.ts +0 -211
  1172. package/src/contract/contract_class_metadata.ts +0 -8
  1173. package/src/contract/contract_metadata.ts +0 -7
  1174. package/src/contract/private_function_membership_proof.ts +0 -167
  1175. package/src/contract/utility_function_membership_proof.ts +0 -118
  1176. package/src/database-version/index.ts +0 -1
  1177. package/src/interfaces/get_logs_response.ts +0 -35
  1178. package/src/l1-contracts/slash_factory.ts +0 -179
  1179. package/src/logs/directional_app_tagging_secret.ts +0 -79
  1180. package/src/logs/extended_contract_class_log.ts +0 -87
  1181. package/src/logs/extended_public_log.ts +0 -94
  1182. package/src/logs/log_filter.ts +0 -31
  1183. package/src/logs/log_id.ts +0 -121
  1184. package/src/logs/tx_scoped_l2_log.ts +0 -98
  1185. package/src/note/notes_filter.ts +0 -38
  1186. package/src/slashing/empire.ts +0 -102
  1187. package/src/update-checker/update-checker.ts +0 -166
package/src/tx/index.ts CHANGED
@@ -24,6 +24,7 @@ export * from './validator/tx_validator.js';
24
24
  export * from './validator/empty_validator.js';
25
25
  export * from './validator/error_texts.js';
26
26
  export * from './capsule.js';
27
+ export * from './fee_provider.js';
27
28
  export * from './global_variable_builder.js';
28
29
  export * from './hashed_values.js';
29
30
  export * from './indexed_tx_effect.js';
@@ -2,7 +2,7 @@ import { BlockNumber } from '@aztec/foundation/branded-types';
2
2
  import { schemas } from '@aztec/foundation/schemas';
3
3
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
4
 
5
- import { L2BlockHash } from '../block/block_hash.js';
5
+ import { BlockHash } from '../block/block_hash.js';
6
6
  import { type DataInBlock, dataInBlockSchemaFor, randomDataInBlock } from '../block/in_block.js';
7
7
  import { TxEffect } from './tx_effect.js';
8
8
 
@@ -26,7 +26,7 @@ export function serializeIndexedTxEffect(effect: IndexedTxEffect): Buffer {
26
26
  export function deserializeIndexedTxEffect(buffer: Buffer): IndexedTxEffect {
27
27
  const reader = BufferReader.asReader(buffer);
28
28
 
29
- const l2BlockHash = reader.readObject(L2BlockHash);
29
+ const l2BlockHash = BlockHash.fromBuffer(reader);
30
30
  const l2BlockNumber = BlockNumber(reader.readNumber());
31
31
  const txIndexInBlock = reader.readNumber();
32
32
  const data = reader.readObject(TxEffect);
@@ -1,6 +1,6 @@
1
1
  import { PARTIAL_STATE_REFERENCE_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
  import type { FieldsOf } from '@aztec/foundation/types';
5
5
 
6
6
  import { z } from 'zod';
@@ -88,8 +88,13 @@ export class PartialStateReference {
88
88
  );
89
89
  }
90
90
 
91
- toBuffer() {
92
- return serializeToBuffer(this.noteHashTree, this.nullifierTree, this.publicDataTree);
91
+ toBuffer(): Buffer;
92
+ toBuffer(sink: BufferSink): void;
93
+ toBuffer(sink?: BufferSink): Buffer | void {
94
+ if (!sink) {
95
+ return BufferSink.serialize(this);
96
+ }
97
+ serializeToSink(sink, this.noteHashTree, this.nullifierTree, this.publicDataTree);
93
98
  }
94
99
 
95
100
  toFields() {
@@ -11,7 +11,7 @@ import { PrivateCircuitPublicInputs } from '../kernel/private_circuit_public_inp
11
11
  import type { IsEmpty } from '../kernel/utils/interfaces.js';
12
12
  import { sortByCounter } from '../kernel/utils/order_and_comparison.js';
13
13
  import { ContractClassLog, ContractClassLogFields } from '../logs/contract_class_log.js';
14
- import { type PreTag, PreTagSchema } from '../logs/pre_tag.js';
14
+ import { type TaggingIndexRange, TaggingIndexRangeSchema } from '../logs/tagging_index_range.js';
15
15
  import { Note } from '../note/note.js';
16
16
  import { type ZodFor, mapSchema, schemas } from '../schemas/index.js';
17
17
  import { HashedValues } from './hashed_values.js';
@@ -79,7 +79,7 @@ export class CountedContractClassLog implements IsEmpty {
79
79
  export class PrivateExecutionResult {
80
80
  constructor(
81
81
  public entrypoint: PrivateCallExecutionResult,
82
- /** The first non revertible nullifier, or zero if there was none. */
82
+ /** The first non-revertible nullifier emitted by any private call, or the protocol nullifier if there was none. */
83
83
  public firstNullifier: Fr,
84
84
  /** An array of calldata for the enqueued public function calls and the teardown function call. */
85
85
  public publicFunctionCalldata: HashedValues[],
@@ -137,8 +137,8 @@ export class PrivateCallExecutionResult {
137
137
  public returnValues: Fr[],
138
138
  /** The offchain effects emitted during execution of this function call via the `emit_offchain_effect` oracle. */
139
139
  public offchainEffects: { data: Fr[] }[],
140
- /** The pre-tags used in this tx to compute tags for private logs */
141
- public preTags: PreTag[],
140
+ /** The tagging index ranges used in this tx to compute tags for private logs */
141
+ public taggingIndexRanges: TaggingIndexRange[],
142
142
  /** The nested executions. */
143
143
  public nestedExecutionResults: PrivateCallExecutionResult[],
144
144
  /**
@@ -161,7 +161,7 @@ export class PrivateCallExecutionResult {
161
161
  noteHashNullifierCounterMap: mapSchema(z.coerce.number(), z.number()),
162
162
  returnValues: z.array(schemas.Fr),
163
163
  offchainEffects: z.array(z.object({ data: z.array(schemas.Fr) })),
164
- preTags: z.array(PreTagSchema),
164
+ taggingIndexRanges: z.array(TaggingIndexRangeSchema),
165
165
  nestedExecutionResults: z.array(z.lazy(() => PrivateCallExecutionResult.schema)),
166
166
  contractClassLogs: z.array(CountedContractClassLog.schema),
167
167
  })
@@ -178,7 +178,7 @@ export class PrivateCallExecutionResult {
178
178
  fields.noteHashNullifierCounterMap,
179
179
  fields.returnValues,
180
180
  fields.offchainEffects,
181
- fields.preTags,
181
+ fields.taggingIndexRanges,
182
182
  fields.nestedExecutionResults,
183
183
  fields.contractClassLogs,
184
184
  );
@@ -3,12 +3,39 @@ 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
 
9
- export type NodeStats = Partial<Record<keyof AztecNode, { times: number[] }>>;
10
+ export type RoundTripStats = {
11
+ /** Number of round trips (times we blocked waiting for node responses) */
12
+ roundTrips: number;
13
+ /** Total wall-clock time spent waiting on node (excludes parallel overlap) */
14
+ totalBlockingTime: number;
15
+ /** Individual round trip durations */
16
+ roundTripDurations: number[];
17
+ /** Methods called in each round trip (parallel calls grouped together) */
18
+ roundTripMethods: string[][];
19
+ };
20
+
21
+ const RoundTripStatsSchema = z.object({
22
+ roundTrips: z.number(),
23
+ totalBlockingTime: z.number(),
24
+ roundTripDurations: z.array(z.number()),
25
+ roundTripMethods: z.array(z.array(z.string())),
26
+ });
27
+
28
+ export type NodeStats = {
29
+ /** Per-method call stats */
30
+ perMethod: Partial<Record<keyof AztecNode, { times: number[] }>>;
31
+ /** Round trip stats tracking actual blocking waits */
32
+ roundTrips: RoundTripStats;
33
+ };
10
34
 
11
- const NodeStatsSchema = z.record(z.string(), z.object({ times: z.array(z.number()) }));
35
+ const NodeStatsSchema = z.object({
36
+ perMethod: z.record(z.string(), z.object({ times: z.array(z.number()) })),
37
+ roundTrips: RoundTripStatsSchema,
38
+ });
12
39
 
13
40
  type FunctionTiming = {
14
41
  functionName: string;
@@ -105,7 +132,15 @@ export class TxProfileResult {
105
132
  },
106
133
  ],
107
134
  {
108
- nodeRPCCalls: { getBlockHeader: { times: [1] } },
135
+ nodeRPCCalls: {
136
+ perMethod: { getBlock: { times: [1] } },
137
+ roundTrips: {
138
+ roundTrips: 1,
139
+ totalBlockingTime: 1,
140
+ roundTripDurations: [1],
141
+ roundTripMethods: [['getBlock']],
142
+ },
143
+ },
109
144
  timings: {
110
145
  sync: 1,
111
146
  proving: 1,
@@ -123,24 +158,40 @@ export class TxProfileResult {
123
158
  }
124
159
  }
125
160
 
126
- export class UtilitySimulationResult {
161
+ export class UtilityExecutionResult {
127
162
  constructor(
128
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,
129
167
  public stats?: SimulationStats,
130
168
  ) {}
131
169
 
132
- static get schema(): ZodFor<UtilitySimulationResult> {
170
+ static get schema(): ZodFor<UtilityExecutionResult> {
133
171
  return z
134
172
  .object({
135
173
  result: z.array(schemas.Fr),
174
+ offchainEffects: z.array(z.object({ data: z.array(schemas.Fr), contractAddress: AztecAddress.schema })),
175
+ anchorBlockTimestamp: schemas.BigInt,
136
176
  stats: optional(SimulationStatsSchema),
137
177
  })
138
- .transform(({ result, stats }) => new UtilitySimulationResult(result, stats));
178
+ .transform(
179
+ ({ result, offchainEffects, anchorBlockTimestamp, stats }) =>
180
+ new UtilityExecutionResult(result, offchainEffects, anchorBlockTimestamp, stats),
181
+ );
139
182
  }
140
183
 
141
- static random(): UtilitySimulationResult {
142
- return new UtilitySimulationResult([Fr.random()], {
143
- nodeRPCCalls: { getBlockHeader: { times: [1] } },
184
+ static random(): UtilityExecutionResult {
185
+ return new UtilityExecutionResult([Fr.random()], [], 0n, {
186
+ nodeRPCCalls: {
187
+ perMethod: { getBlock: { times: [1] } },
188
+ roundTrips: {
189
+ roundTrips: 1,
190
+ totalBlockingTime: 1,
191
+ roundTripDurations: [1],
192
+ roundTripMethods: [['getBlock']],
193
+ },
194
+ },
144
195
  timings: {
145
196
  sync: 1,
146
197
  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() {
@@ -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) {
@@ -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
  }
@@ -3,18 +3,20 @@ 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
+ 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';
@@ -22,35 +24,36 @@ import { NestedProcessReturnValues, PublicSimulationOutput } from './public_simu
22
24
  import { Tx } from './tx.js';
23
25
 
24
26
  /*
25
- * If passed during the execution of a user circuit, the contract function simulator will replace the instance and class
26
- * of the contract with the one provided in the overrides for that address. An example use case
27
- * 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(...)`.
28
32
  */
29
- export type ContractOverrides = Record<
30
- string /* AztecAddress as string */,
31
- { instance: ContractInstanceWithAddress; artifact: ContractArtifact }
32
- >;
33
+ export type ContractOverrides = Record<string /* AztecAddress as string */, { instance: ContractInstanceWithAddress }>;
33
34
 
34
35
  /*
35
- * Optional values that can be overridden during simulation. In order to simulate a transaction with these
36
- * 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.
37
40
  */
38
41
  export class SimulationOverrides {
39
- 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
+ }
40
49
 
41
50
  static get schema() {
42
51
  return z
43
52
  .object({
44
- contracts: optional(
45
- z.record(
46
- z.string(),
47
- z.object({ instance: ContractInstanceWithAddressSchema, artifact: ContractArtifactSchema }),
48
- ),
49
- ),
53
+ publicStorage: optional(z.array(PublicStorageOverrideSchema)),
54
+ contracts: optional(z.record(z.string(), z.object({ instance: ContractInstanceWithAddressSchema }))),
50
55
  })
51
- .transform(({ contracts }) => {
52
- return new SimulationOverrides(contracts);
53
- });
56
+ .transform(args => new SimulationOverrides(args));
54
57
  }
55
58
  }
56
59
 
@@ -84,6 +87,11 @@ export class TxSimulationResult {
84
87
  public stats?: SimulationStats,
85
88
  ) {}
86
89
 
90
+ /** Returns offchain effects collected from private execution. */
91
+ get offchainEffects(): OffchainEffect[] {
92
+ return collectOffchainEffects(this.privateExecutionResult);
93
+ }
94
+
87
95
  get gasUsed(): GasUsed {
88
96
  return (
89
97
  this.publicOutput?.gasUsed ?? {
@@ -106,7 +114,7 @@ export class TxSimulationResult {
106
114
  .transform(TxSimulationResult.from);
107
115
  }
108
116
 
109
- static from(fields: Omit<FieldsOf<TxSimulationResult>, 'gasUsed'>) {
117
+ static from(fields: Omit<FieldsOf<TxSimulationResult>, 'gasUsed' | 'offchainEffects'>) {
110
118
  return new TxSimulationResult(
111
119
  fields.privateExecutionResult,
112
120
  fields.publicInputs,
@@ -150,7 +158,7 @@ export class TxSimulationResult {
150
158
  }
151
159
 
152
160
  /**
153
- * 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,
154
162
  * so they can be retrieved in order.
155
163
  * @param executionResult
156
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
- import { Buffer32 } from '@aztec/foundation/buffer';
2
- import { arraySerializedSizeOfNonEmpty } from '@aztec/foundation/collection';
1
+ import { DA_GAS_PER_FIELD, TX_DA_GAS_OVERHEAD } from '@aztec/constants';
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';
6
- import type { FieldsOf } from '@aztec/foundation/types';
5
+ import {
6
+ BufferReader,
7
+ BufferSink,
8
+ serializeArrayOfBufferableToVector,
9
+ serializeArrayToSink,
10
+ serializeToSink,
11
+ } from '@aztec/foundation/serialize';
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) =>
@@ -247,7 +251,7 @@ export class Tx extends Gossipable {
247
251
  contractClassLogSize: this.data.getEmittedContractClassLogsLength(),
248
252
 
249
253
  proofSize: this.chonkProof.fields.length,
250
- size: this.toBuffer().length,
254
+ size: this.getSize(),
251
255
 
252
256
  feePaymentMethod:
253
257
  // needsSetup? then we pay through a fee payment contract
@@ -255,26 +259,34 @@ export class Tx extends Gossipable {
255
259
  };
256
260
  }
257
261
 
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
- );
262
+ private sizeCache: number | undefined;
263
+
264
+ getSize(): number {
265
+ if (this.sizeCache == undefined) {
266
+ this.sizeCache = this.toBuffer().length;
267
+ }
268
+ return this.sizeCache;
265
269
  }
266
270
 
267
271
  /**
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.
272
+ * Returns the number of fields this tx's effects will occupy in the blob,
273
+ * based on its private side effects only. Accurate for txs without public calls.
274
+ * For txs with public calls, the actual size will be larger due to public execution outputs.
270
275
  */
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
- );
276
+ getPrivateTxEffectsSizeInFields(): number {
277
+ // 3 fields overhead: tx_start_marker, tx_hash, tx_fee.
278
+ // TX_DA_GAS_OVERHEAD is defined as N * DA_GAS_PER_FIELD, so this division is always exact.
279
+ const overheadFields = TX_DA_GAS_OVERHEAD / DA_GAS_PER_FIELD;
280
+ const noteHashes = this.data.getNonEmptyNoteHashes().length;
281
+ const nullifiers = this.data.getNonEmptyNullifiers().length;
282
+ const l2ToL1Msgs = this.data.getNonEmptyL2ToL1Msgs().length;
283
+ // Each private log occupies (emittedLength + 1) fields: content + length field
284
+ const privateLogFields = this.data.getNonEmptyPrivateLogs().reduce((acc, log) => acc + log.emittedLength + 1, 0);
285
+ // Each contract class log occupies (length + 1) fields: content + contract address
286
+ const contractClassLogFields = this.data
287
+ .getNonEmptyContractClassLogsHashes()
288
+ .reduce((acc, log) => acc + log.logHash.length + 1, 0);
289
+ return overheadFields + noteHashes + nullifiers + l2ToL1Msgs + privateLogFields + contractClassLogFields;
278
290
  }
279
291
 
280
292
  /**
@@ -310,7 +322,7 @@ export class Tx extends Gossipable {
310
322
 
311
323
  /** Recomputes the tx hash. Used for testing purposes only when a property of the tx was mutated. */
312
324
  public async recomputeHash(): Promise<TxHash> {
313
- (this as any).txHash = await Tx.computeTxHash(this);
325
+ unfreeze(this).txHash = await Tx.computeTxHash(this);
314
326
  return this.txHash;
315
327
  }
316
328
 
@@ -337,7 +349,12 @@ export class TxArray extends Array<Tx> {
337
349
  }
338
350
  }
339
351
 
340
- public toBuffer(): Buffer {
341
- 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]);
342
359
  }
343
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() {