@aztec/stdlib 0.0.1-commit.9b94fc1 → 0.0.1-commit.9badcec54

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 (1280) hide show
  1. package/dest/abi/abi.d.ts +740 -5
  2. package/dest/abi/abi.d.ts.map +1 -1
  3. package/dest/abi/abi.js +17 -9
  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/authorization_selector.js +2 -1
  7. package/dest/abi/buffer.d.ts +15 -5
  8. package/dest/abi/buffer.d.ts.map +1 -1
  9. package/dest/abi/buffer.js +26 -5
  10. package/dest/abi/contract_artifact.d.ts +2 -2
  11. package/dest/abi/contract_artifact.d.ts.map +1 -1
  12. package/dest/abi/contract_artifact.js +1 -1
  13. package/dest/abi/decoder.d.ts +7 -46
  14. package/dest/abi/decoder.d.ts.map +1 -1
  15. package/dest/abi/decoder.js +17 -70
  16. package/dest/abi/encoder.d.ts +2 -2
  17. package/dest/abi/encoder.d.ts.map +1 -1
  18. package/dest/abi/encoder.js +65 -8
  19. package/dest/abi/event_metadata_definition.d.ts +3 -1
  20. package/dest/abi/event_metadata_definition.d.ts.map +1 -1
  21. package/dest/abi/event_metadata_definition.js +1 -1
  22. package/dest/abi/event_selector.d.ts +4 -7
  23. package/dest/abi/event_selector.d.ts.map +1 -1
  24. package/dest/abi/event_selector.js +2 -1
  25. package/dest/abi/function_call.d.ts +48 -10
  26. package/dest/abi/function_call.d.ts.map +1 -1
  27. package/dest/abi/function_call.js +20 -3
  28. package/dest/abi/function_selector.d.ts +5 -7
  29. package/dest/abi/function_selector.d.ts.map +1 -1
  30. package/dest/abi/function_selector.js +11 -5
  31. package/dest/abi/function_signature_decoder.d.ts +43 -0
  32. package/dest/abi/function_signature_decoder.d.ts.map +1 -0
  33. package/dest/abi/function_signature_decoder.js +66 -0
  34. package/dest/abi/index.d.ts +2 -1
  35. package/dest/abi/index.d.ts.map +1 -1
  36. package/dest/abi/index.js +1 -0
  37. package/dest/abi/note_selector.d.ts +4 -7
  38. package/dest/abi/note_selector.d.ts.map +1 -1
  39. package/dest/abi/note_selector.js +3 -5
  40. package/dest/abi/selector.d.ts +3 -3
  41. package/dest/abi/selector.d.ts.map +1 -1
  42. package/dest/abi/selector.js +5 -3
  43. package/dest/abi/utils.d.ts +20 -1
  44. package/dest/abi/utils.d.ts.map +1 -1
  45. package/dest/abi/utils.js +22 -0
  46. package/dest/auth_witness/auth_witness.d.ts +3 -2
  47. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  48. package/dest/auth_witness/auth_witness.js +5 -5
  49. package/dest/avm/avm.d.ts +298 -86
  50. package/dest/avm/avm.d.ts.map +1 -1
  51. package/dest/avm/avm.js +238 -22
  52. package/dest/avm/avm_accumulated_data.d.ts +31 -4
  53. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  54. package/dest/avm/avm_accumulated_data.js +6 -3
  55. package/dest/avm/avm_circuit_public_inputs.d.ts +14 -12
  56. package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
  57. package/dest/avm/avm_circuit_public_inputs.js +4 -2
  58. package/dest/avm/avm_proving_request.d.ts +472 -468
  59. package/dest/avm/avm_proving_request.d.ts.map +1 -1
  60. package/dest/avm/contract_storage_read.d.ts +14 -2
  61. package/dest/avm/contract_storage_read.d.ts.map +1 -1
  62. package/dest/avm/contract_storage_read.js +1 -1
  63. package/dest/avm/contract_storage_update_request.d.ts +14 -2
  64. package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
  65. package/dest/avm/contract_storage_update_request.js +1 -1
  66. package/dest/avm/message_pack.d.ts +1 -1
  67. package/dest/avm/message_pack.d.ts.map +1 -1
  68. package/dest/avm/message_pack.js +2 -1
  69. package/dest/avm/public_call_stack_item_compressed.d.ts +4 -2
  70. package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
  71. package/dest/avm/public_call_stack_item_compressed.js +1 -1
  72. package/dest/avm/public_data_read.d.ts +11 -2
  73. package/dest/avm/public_data_read.d.ts.map +1 -1
  74. package/dest/avm/public_data_read.js +1 -1
  75. package/dest/avm/public_data_update_request.d.ts +11 -2
  76. package/dest/avm/public_data_update_request.d.ts.map +1 -1
  77. package/dest/avm/public_data_update_request.js +4 -2
  78. package/dest/avm/public_data_write.d.ts +8 -2
  79. package/dest/avm/public_data_write.d.ts.map +1 -1
  80. package/dest/avm/public_data_write.js +1 -1
  81. package/dest/avm/public_inner_call_request.d.ts +5 -2
  82. package/dest/avm/public_inner_call_request.d.ts.map +1 -1
  83. package/dest/avm/public_inner_call_request.js +3 -1
  84. package/dest/avm/revert_code.d.ts +13 -8
  85. package/dest/avm/revert_code.d.ts.map +1 -1
  86. package/dest/avm/revert_code.js +20 -23
  87. package/dest/aztec-address/index.d.ts +5 -7
  88. package/dest/aztec-address/index.d.ts.map +1 -1
  89. package/dest/aztec-address/index.js +6 -5
  90. package/dest/block/attestation_info.d.ts +5 -5
  91. package/dest/block/attestation_info.d.ts.map +1 -1
  92. package/dest/block/attestation_info.js +5 -5
  93. package/dest/block/block_data.d.ts +52 -0
  94. package/dest/block/block_data.d.ts.map +1 -0
  95. package/dest/block/block_data.js +12 -0
  96. package/dest/block/block_hash.d.ts +20 -15
  97. package/dest/block/block_hash.d.ts.map +1 -1
  98. package/dest/block/block_hash.js +23 -20
  99. package/dest/block/block_parameter.d.ts +6 -0
  100. package/dest/block/block_parameter.d.ts.map +1 -0
  101. package/dest/block/block_parameter.js +8 -0
  102. package/dest/block/body.d.ts +1 -1
  103. package/dest/block/body.d.ts.map +1 -1
  104. package/dest/block/body.js +5 -2
  105. package/dest/block/checkpointed_l2_block.d.ts +150 -0
  106. package/dest/block/checkpointed_l2_block.d.ts.map +1 -0
  107. package/dest/block/checkpointed_l2_block.js +46 -0
  108. package/dest/block/in_block.d.ts +34 -15
  109. package/dest/block/in_block.d.ts.map +1 -1
  110. package/dest/block/in_block.js +21 -12
  111. package/dest/block/index.d.ts +4 -5
  112. package/dest/block/index.d.ts.map +1 -1
  113. package/dest/block/index.js +3 -4
  114. package/dest/block/l2_block.d.ts +67 -59
  115. package/dest/block/l2_block.d.ts.map +1 -1
  116. package/dest/block/l2_block.js +78 -109
  117. package/dest/block/l2_block_info.d.ts +21 -15
  118. package/dest/block/l2_block_info.d.ts.map +1 -1
  119. package/dest/block/l2_block_info.js +14 -12
  120. package/dest/block/l2_block_source.d.ts +477 -153
  121. package/dest/block/l2_block_source.d.ts.map +1 -1
  122. package/dest/block/l2_block_source.js +30 -16
  123. package/dest/block/l2_block_stream/index.d.ts +2 -1
  124. package/dest/block/l2_block_stream/index.d.ts.map +1 -1
  125. package/dest/block/l2_block_stream/index.js +1 -0
  126. package/dest/block/l2_block_stream/interfaces.d.ts +20 -7
  127. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  128. package/dest/block/l2_block_stream/l2_block_stream.d.ts +13 -3
  129. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  130. package/dest/block/l2_block_stream/l2_block_stream.js +126 -32
  131. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +24 -15
  132. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  133. package/dest/block/l2_block_stream/l2_tips_memory_store.js +55 -59
  134. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +49 -0
  135. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -0
  136. package/dest/block/l2_block_stream/l2_tips_store_base.js +192 -0
  137. package/dest/block/proposal/attestations_and_signers.d.ts +2 -2
  138. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  139. package/dest/block/proposal/committee_attestation.d.ts +2 -2
  140. package/dest/block/proposal/committee_attestation.d.ts.map +1 -1
  141. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  142. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  143. package/dest/block/test/l2_tips_store_test_suite.js +483 -43
  144. package/dest/block/validate_block_result.d.ts +24 -24
  145. package/dest/block/validate_block_result.d.ts.map +1 -1
  146. package/dest/block/validate_block_result.js +18 -17
  147. package/dest/checkpoint/checkpoint.d.ts +81 -18
  148. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  149. package/dest/checkpoint/checkpoint.js +92 -17
  150. package/dest/checkpoint/checkpoint_data.d.ts +186 -0
  151. package/dest/checkpoint/checkpoint_data.d.ts.map +1 -0
  152. package/dest/checkpoint/checkpoint_data.js +36 -0
  153. package/dest/checkpoint/checkpoint_info.d.ts +38 -0
  154. package/dest/checkpoint/checkpoint_info.d.ts.map +1 -0
  155. package/dest/checkpoint/checkpoint_info.js +34 -0
  156. package/dest/checkpoint/index.d.ts +4 -1
  157. package/dest/checkpoint/index.d.ts.map +1 -1
  158. package/dest/checkpoint/index.js +3 -0
  159. package/dest/checkpoint/published_checkpoint.d.ts +58 -15
  160. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  161. package/dest/checkpoint/published_checkpoint.js +16 -6
  162. package/dest/checkpoint/validate.d.ts +36 -0
  163. package/dest/checkpoint/validate.d.ts.map +1 -0
  164. package/dest/checkpoint/validate.js +120 -0
  165. package/dest/config/chain-config.d.ts +1 -1
  166. package/dest/config/chain-config.d.ts.map +1 -1
  167. package/dest/config/chain-config.js +7 -1
  168. package/dest/config/index.d.ts +3 -1
  169. package/dest/config/index.d.ts.map +1 -1
  170. package/dest/config/index.js +2 -0
  171. package/dest/config/node-rpc-config.js +1 -1
  172. package/dest/config/pipelining-config.d.ts +19 -0
  173. package/dest/config/pipelining-config.d.ts.map +1 -0
  174. package/dest/config/pipelining-config.js +18 -0
  175. package/dest/config/sequencer-config.d.ts +12 -0
  176. package/dest/config/sequencer-config.d.ts.map +1 -0
  177. package/dest/config/sequencer-config.js +31 -0
  178. package/dest/contract/artifact_hash.d.ts +2 -2
  179. package/dest/contract/artifact_hash.d.ts.map +1 -1
  180. package/dest/contract/artifact_hash.js +2 -2
  181. package/dest/contract/complete_address.d.ts +5 -2
  182. package/dest/contract/complete_address.d.ts.map +1 -1
  183. package/dest/contract/complete_address.js +1 -1
  184. package/dest/contract/contract_address.d.ts +5 -5
  185. package/dest/contract/contract_address.d.ts.map +1 -1
  186. package/dest/contract/contract_address.js +9 -9
  187. package/dest/contract/contract_class.d.ts +3 -4
  188. package/dest/contract/contract_class.d.ts.map +1 -1
  189. package/dest/contract/contract_class.js +1 -1
  190. package/dest/contract/contract_class_id.d.ts +4 -4
  191. package/dest/contract/contract_class_id.d.ts.map +1 -1
  192. package/dest/contract/contract_class_id.js +9 -8
  193. package/dest/contract/contract_deployment_data.d.ts +5 -5
  194. package/dest/contract/contract_instance.d.ts +2 -2
  195. package/dest/contract/contract_instance.d.ts.map +1 -1
  196. package/dest/contract/contract_instance.js +1 -1
  197. package/dest/contract/contract_instance_update.d.ts +2 -2
  198. package/dest/contract/contract_instance_update.d.ts.map +1 -1
  199. package/dest/contract/contract_instance_update.js +1 -1
  200. package/dest/contract/deployment_info.d.ts +2 -2
  201. package/dest/contract/deployment_info.d.ts.map +1 -1
  202. package/dest/contract/index.d.ts +1 -5
  203. package/dest/contract/index.d.ts.map +1 -1
  204. package/dest/contract/index.js +0 -4
  205. package/dest/contract/interfaces/contract_class.d.ts +17 -165
  206. package/dest/contract/interfaces/contract_class.d.ts.map +1 -1
  207. package/dest/contract/interfaces/contract_class.js +24 -34
  208. package/dest/contract/interfaces/contract_data_source.d.ts +4 -3
  209. package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
  210. package/dest/contract/interfaces/contract_instance.d.ts +40 -31
  211. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  212. package/dest/contract/interfaces/contract_instance.js +30 -5
  213. package/dest/contract/interfaces/contract_instance_update.d.ts +7 -8
  214. package/dest/contract/interfaces/contract_instance_update.d.ts.map +1 -1
  215. package/dest/contract/interfaces/contract_instance_update.js +5 -5
  216. package/dest/contract/interfaces/node-info.d.ts +3 -1
  217. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  218. package/dest/contract/interfaces/node-info.js +2 -1
  219. package/dest/contract/partial_address.d.ts +2 -2
  220. package/dest/contract/partial_address.d.ts.map +1 -1
  221. package/dest/contract/private_function.d.ts +2 -2
  222. package/dest/contract/private_function.d.ts.map +1 -1
  223. package/dest/contract/private_function.js +7 -9
  224. package/dest/database-version/database_version.d.ts +58 -0
  225. package/dest/database-version/database_version.d.ts.map +1 -0
  226. package/dest/database-version/database_version.js +69 -0
  227. package/dest/database-version/version_manager.d.ts +3 -49
  228. package/dest/database-version/version_manager.d.ts.map +1 -1
  229. package/dest/database-version/version_manager.js +1 -64
  230. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +3 -3
  231. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
  232. package/dest/delayed_public_mutable/delayed_public_mutable_values.js +9 -12
  233. package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts +2 -2
  234. package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.d.ts.map +1 -1
  235. package/dest/delayed_public_mutable/delayed_public_mutable_values_with_hash.js +1 -1
  236. package/dest/delayed_public_mutable/scheduled_value_change.d.ts +2 -2
  237. package/dest/delayed_public_mutable/scheduled_value_change.d.ts.map +1 -1
  238. package/dest/delayed_public_mutable/scheduled_value_change.js +1 -1
  239. package/dest/deserialization/index.d.ts +11 -0
  240. package/dest/deserialization/index.d.ts.map +1 -0
  241. package/dest/deserialization/index.js +10 -0
  242. package/dest/epoch-helpers/index.d.ts +17 -1
  243. package/dest/epoch-helpers/index.d.ts.map +1 -1
  244. package/dest/epoch-helpers/index.js +26 -6
  245. package/dest/errors/proving_error.d.ts +2 -2
  246. package/dest/errors/proving_error.d.ts.map +1 -1
  247. package/dest/errors/simulation_error.d.ts +2 -2
  248. package/dest/errors/simulation_error.d.ts.map +1 -1
  249. package/dest/fees/transaction_fee.d.ts +2 -2
  250. package/dest/fees/transaction_fee.d.ts.map +1 -1
  251. package/dest/file-store/factory.d.ts +4 -3
  252. package/dest/file-store/factory.d.ts.map +1 -1
  253. package/dest/file-store/factory.js +2 -2
  254. package/dest/file-store/http.d.ts +9 -2
  255. package/dest/file-store/http.d.ts.map +1 -1
  256. package/dest/file-store/http.js +20 -9
  257. package/dest/file-store/index.d.ts +2 -1
  258. package/dest/file-store/index.d.ts.map +1 -1
  259. package/dest/file-store/local.d.ts +3 -3
  260. package/dest/file-store/local.d.ts.map +1 -1
  261. package/dest/file-store/local.js +13 -4
  262. package/dest/file-store/s3.d.ts +1 -1
  263. package/dest/file-store/s3.d.ts.map +1 -1
  264. package/dest/file-store/s3.js +11 -3
  265. package/dest/gas/fee_math.d.ts +49 -0
  266. package/dest/gas/fee_math.d.ts.map +1 -0
  267. package/dest/gas/fee_math.js +80 -0
  268. package/dest/gas/gas.d.ts +2 -2
  269. package/dest/gas/gas.d.ts.map +1 -1
  270. package/dest/gas/gas.js +4 -2
  271. package/dest/gas/gas_fees.d.ts +2 -2
  272. package/dest/gas/gas_fees.d.ts.map +1 -1
  273. package/dest/gas/gas_fees.js +16 -2
  274. package/dest/gas/gas_settings.d.ts +41 -4
  275. package/dest/gas/gas_settings.d.ts.map +1 -1
  276. package/dest/gas/gas_settings.js +51 -7
  277. package/dest/gas/index.d.ts +2 -1
  278. package/dest/gas/index.d.ts.map +1 -1
  279. package/dest/gas/index.js +1 -0
  280. package/dest/ha-signing/config.d.ts +136 -0
  281. package/dest/ha-signing/config.d.ts.map +1 -0
  282. package/dest/ha-signing/config.js +97 -0
  283. package/dest/ha-signing/index.d.ts +4 -0
  284. package/dest/ha-signing/index.d.ts.map +1 -0
  285. package/dest/ha-signing/index.js +3 -0
  286. package/dest/ha-signing/local_config.d.ts +63 -0
  287. package/dest/ha-signing/local_config.d.ts.map +1 -0
  288. package/dest/ha-signing/local_config.js +24 -0
  289. package/dest/ha-signing/types.d.ts +90 -0
  290. package/dest/ha-signing/types.d.ts.map +1 -0
  291. package/dest/ha-signing/types.js +39 -0
  292. package/dest/hash/hash.d.ts +34 -8
  293. package/dest/hash/hash.d.ts.map +1 -1
  294. package/dest/hash/hash.js +77 -21
  295. package/dest/hash/map_slot.d.ts +2 -2
  296. package/dest/hash/map_slot.d.ts.map +1 -1
  297. package/dest/hash/map_slot.js +4 -3
  298. package/dest/interfaces/allowed_element.d.ts +31 -26
  299. package/dest/interfaces/allowed_element.d.ts.map +1 -1
  300. package/dest/interfaces/allowed_element.js +11 -11
  301. package/dest/interfaces/api_limit.d.ts +3 -1
  302. package/dest/interfaces/api_limit.d.ts.map +1 -1
  303. package/dest/interfaces/api_limit.js +2 -0
  304. package/dest/interfaces/archiver.d.ts +12 -7
  305. package/dest/interfaces/archiver.d.ts.map +1 -1
  306. package/dest/interfaces/archiver.js +45 -23
  307. package/dest/interfaces/aztec-node-admin.d.ts +212 -78
  308. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  309. package/dest/interfaces/aztec-node-admin.js +18 -10
  310. package/dest/interfaces/aztec-node-debug.d.ts +21 -0
  311. package/dest/interfaces/aztec-node-debug.d.ts.map +1 -0
  312. package/dest/interfaces/aztec-node-debug.js +18 -0
  313. package/dest/interfaces/aztec-node.d.ts +107 -97
  314. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  315. package/dest/interfaces/aztec-node.js +37 -33
  316. package/dest/interfaces/block-builder.d.ts +55 -18
  317. package/dest/interfaces/block-builder.d.ts.map +1 -1
  318. package/dest/interfaces/block-builder.js +23 -1
  319. package/dest/interfaces/client.d.ts +2 -1
  320. package/dest/interfaces/client.d.ts.map +1 -1
  321. package/dest/interfaces/client.js +1 -0
  322. package/dest/interfaces/configs.d.ts +127 -53
  323. package/dest/interfaces/configs.d.ts.map +1 -1
  324. package/dest/interfaces/configs.js +21 -8
  325. package/dest/interfaces/epoch-prover.d.ts +5 -5
  326. package/dest/interfaces/epoch-prover.d.ts.map +1 -1
  327. package/dest/interfaces/get_logs_response.d.ts +30 -6
  328. package/dest/interfaces/get_logs_response.d.ts.map +1 -1
  329. package/dest/interfaces/get_logs_response.js +5 -4
  330. package/dest/interfaces/l2_logs_source.d.ts +23 -15
  331. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  332. package/dest/interfaces/merkle_tree_operations.d.ts +16 -24
  333. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  334. package/dest/interfaces/p2p.d.ts +9 -16
  335. package/dest/interfaces/p2p.d.ts.map +1 -1
  336. package/dest/interfaces/p2p.js +3 -4
  337. package/dest/interfaces/prover-broker.d.ts +16 -1
  338. package/dest/interfaces/prover-broker.d.ts.map +1 -1
  339. package/dest/interfaces/prover-broker.js +4 -1
  340. package/dest/interfaces/prover-client.d.ts +24 -3
  341. package/dest/interfaces/prover-client.d.ts.map +1 -1
  342. package/dest/interfaces/prover-client.js +22 -7
  343. package/dest/interfaces/proving-job.d.ts +226 -222
  344. package/dest/interfaces/proving-job.d.ts.map +1 -1
  345. package/dest/interfaces/proving-job.js +1 -7
  346. package/dest/interfaces/public_state_source.d.ts +2 -2
  347. package/dest/interfaces/public_state_source.d.ts.map +1 -1
  348. package/dest/interfaces/server_circuit_prover.d.ts +4 -3
  349. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  350. package/dest/interfaces/slasher.d.ts +9 -10
  351. package/dest/interfaces/slasher.d.ts.map +1 -1
  352. package/dest/interfaces/slasher.js +5 -5
  353. package/dest/interfaces/validator.d.ts +243 -57
  354. package/dest/interfaces/validator.d.ts.map +1 -1
  355. package/dest/interfaces/validator.js +17 -9
  356. package/dest/interfaces/world_state.d.ts +26 -33
  357. package/dest/interfaces/world_state.d.ts.map +1 -1
  358. package/dest/interfaces/world_state.js +4 -3
  359. package/dest/kernel/claimed_length_array.d.ts +2 -2
  360. package/dest/kernel/claimed_length_array.d.ts.map +1 -1
  361. package/dest/kernel/claimed_length_array.js +3 -1
  362. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +7 -6
  363. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
  364. package/dest/kernel/hints/build_note_hash_read_request_hints.js +31 -19
  365. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +5 -5
  366. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  367. package/dest/kernel/hints/build_nullifier_read_request_hints.js +28 -17
  368. package/dest/kernel/hints/build_transient_data_hints.d.ts +5 -2
  369. package/dest/kernel/hints/build_transient_data_hints.d.ts.map +1 -1
  370. package/dest/kernel/hints/build_transient_data_hints.js +9 -3
  371. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +1 -1
  372. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
  373. package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +1 -3
  374. package/dest/kernel/hints/index.d.ts +2 -2
  375. package/dest/kernel/hints/index.js +2 -2
  376. package/dest/kernel/hints/key_validation_hint.d.ts +3 -2
  377. package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
  378. package/dest/kernel/hints/key_validation_hint.js +1 -1
  379. package/dest/kernel/hints/key_validation_request.d.ts +5 -3
  380. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  381. package/dest/kernel/hints/key_validation_request.js +2 -1
  382. package/dest/kernel/hints/key_validation_request_and_separator.d.ts +24 -0
  383. package/dest/kernel/hints/key_validation_request_and_separator.d.ts.map +1 -0
  384. package/dest/kernel/hints/{key_validation_request_and_generator.js → key_validation_request_and_separator.js} +13 -16
  385. package/dest/kernel/hints/note_hash_read_request_hints.d.ts +2 -2
  386. package/dest/kernel/hints/note_hash_read_request_hints.d.ts.map +1 -1
  387. package/dest/kernel/hints/note_hash_read_request_hints.js +1 -1
  388. package/dest/kernel/hints/private_kernel_reset_hints.d.ts +13 -1
  389. package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
  390. package/dest/kernel/hints/read_request.d.ts +8 -2
  391. package/dest/kernel/hints/read_request.d.ts.map +1 -1
  392. package/dest/kernel/hints/read_request.js +1 -1
  393. package/dest/kernel/hints/read_request_hints.d.ts +7 -1
  394. package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
  395. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts → scoped_key_validation_request_and_separator.d.ts} +9 -9
  396. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.d.ts.map → scoped_key_validation_request_and_separator.d.ts.map} +1 -1
  397. package/dest/kernel/hints/{scoped_key_validation_request_and_generator.js → scoped_key_validation_request_and_separator.js} +6 -6
  398. package/dest/kernel/hints/scoped_value_cache.d.ts +2 -2
  399. package/dest/kernel/hints/scoped_value_cache.d.ts.map +1 -1
  400. package/dest/kernel/hints/transient_data_squashing_hint.d.ts +2 -2
  401. package/dest/kernel/hints/transient_data_squashing_hint.d.ts.map +1 -1
  402. package/dest/kernel/hints/transient_data_squashing_hint.js +4 -2
  403. package/dest/kernel/hints/tree_leaf_read_request.d.ts +2 -2
  404. package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +1 -1
  405. package/dest/kernel/hints/tree_leaf_read_request.js +1 -1
  406. package/dest/kernel/log_hash.d.ts +2 -2
  407. package/dest/kernel/log_hash.d.ts.map +1 -1
  408. package/dest/kernel/log_hash.js +4 -2
  409. package/dest/kernel/note_hash.d.ts +2 -2
  410. package/dest/kernel/note_hash.d.ts.map +1 -1
  411. package/dest/kernel/note_hash.js +1 -1
  412. package/dest/kernel/nullifier.d.ts +2 -2
  413. package/dest/kernel/nullifier.d.ts.map +1 -1
  414. package/dest/kernel/nullifier.js +1 -1
  415. package/dest/kernel/padded_side_effects.d.ts +2 -2
  416. package/dest/kernel/padded_side_effects.d.ts.map +1 -1
  417. package/dest/kernel/padded_side_effects.js +1 -1
  418. package/dest/kernel/private_accumulated_data.d.ts +23 -1
  419. package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
  420. package/dest/kernel/private_call_data.d.ts +26 -2
  421. package/dest/kernel/private_call_data.d.ts.map +1 -1
  422. package/dest/kernel/private_call_data.js +1 -1
  423. package/dest/kernel/private_call_request.d.ts +17 -2
  424. package/dest/kernel/private_call_request.d.ts.map +1 -1
  425. package/dest/kernel/private_call_request.js +1 -1
  426. package/dest/kernel/private_circuit_public_inputs.d.ts +127 -54
  427. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  428. package/dest/kernel/private_circuit_public_inputs.js +72 -72
  429. package/dest/kernel/private_context_inputs.d.ts +2 -2
  430. package/dest/kernel/private_context_inputs.d.ts.map +1 -1
  431. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +34 -4
  432. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  433. package/dest/kernel/private_kernel_circuit_public_inputs.js +5 -5
  434. package/dest/kernel/private_kernel_data.d.ts +7 -1
  435. package/dest/kernel/private_kernel_data.d.ts.map +1 -1
  436. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +23 -2
  437. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  438. package/dest/kernel/private_kernel_init_circuit_private_inputs.js +1 -1
  439. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +7 -1
  440. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
  441. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -1
  442. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
  443. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +12 -3
  444. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
  445. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +4 -4
  446. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +27 -4
  447. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  448. package/dest/kernel/private_kernel_tail_circuit_public_inputs.js +12 -8
  449. package/dest/kernel/private_log_data.d.ts +2 -2
  450. package/dest/kernel/private_log_data.d.ts.map +1 -1
  451. package/dest/kernel/private_log_data.js +5 -2
  452. package/dest/kernel/private_to_avm_accumulated_data.d.ts +4 -4
  453. package/dest/kernel/private_to_avm_accumulated_data.d.ts.map +1 -1
  454. package/dest/kernel/private_to_avm_accumulated_data.js +6 -3
  455. package/dest/kernel/private_to_public_accumulated_data.d.ts +2 -2
  456. package/dest/kernel/private_to_public_accumulated_data.d.ts.map +1 -1
  457. package/dest/kernel/private_to_public_accumulated_data.js +4 -2
  458. package/dest/kernel/private_to_public_accumulated_data_builder.d.ts +2 -2
  459. package/dest/kernel/private_to_public_accumulated_data_builder.d.ts.map +1 -1
  460. package/dest/kernel/private_to_public_accumulated_data_builder.js +1 -1
  461. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +4 -4
  462. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  463. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +8 -8
  464. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +18 -2
  465. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  466. package/dest/kernel/private_to_rollup_accumulated_data.js +4 -2
  467. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +19 -4
  468. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  469. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.js +8 -8
  470. package/dest/kernel/private_validation_requests.d.ts +13 -4
  471. package/dest/kernel/private_validation_requests.d.ts.map +1 -1
  472. package/dest/kernel/private_validation_requests.js +12 -10
  473. package/dest/kernel/public_call_request.d.ts +23 -2
  474. package/dest/kernel/public_call_request.d.ts.map +1 -1
  475. package/dest/kernel/public_call_request.js +6 -3
  476. package/dest/kernel/utils/optional_number.d.ts +8 -2
  477. package/dest/kernel/utils/optional_number.d.ts.map +1 -1
  478. package/dest/keys/derivation.d.ts +7 -6
  479. package/dest/keys/derivation.d.ts.map +1 -1
  480. package/dest/keys/derivation.js +20 -17
  481. package/dest/keys/key_types.d.ts +3 -3
  482. package/dest/keys/key_types.d.ts.map +1 -1
  483. package/dest/keys/public_key.d.ts +2 -2
  484. package/dest/keys/public_key.d.ts.map +1 -1
  485. package/dest/keys/public_keys.d.ts +7 -2
  486. package/dest/keys/public_keys.d.ts.map +1 -1
  487. package/dest/keys/public_keys.js +5 -4
  488. package/dest/keys/utils.d.ts +1 -1
  489. package/dest/keys/utils.d.ts.map +1 -1
  490. package/dest/keys/utils.js +8 -4
  491. package/dest/kv-store/config.d.ts +17 -0
  492. package/dest/kv-store/config.d.ts.map +1 -0
  493. package/dest/kv-store/config.js +26 -0
  494. package/dest/kv-store/index.d.ts +2 -0
  495. package/dest/kv-store/index.d.ts.map +1 -0
  496. package/dest/kv-store/index.js +1 -0
  497. package/dest/l1-contracts/index.d.ts +2 -2
  498. package/dest/l1-contracts/index.d.ts.map +1 -1
  499. package/dest/l1-contracts/index.js +1 -1
  500. package/dest/logs/contract_class_log.d.ts +2 -2
  501. package/dest/logs/contract_class_log.d.ts.map +1 -1
  502. package/dest/logs/contract_class_log.js +5 -3
  503. package/dest/logs/debug_log.d.ts +2 -2
  504. package/dest/logs/debug_log.d.ts.map +1 -1
  505. package/dest/logs/debug_log.js +1 -1
  506. package/dest/logs/debug_log_store.d.ts +30 -0
  507. package/dest/logs/debug_log_store.d.ts.map +1 -0
  508. package/dest/logs/debug_log_store.js +30 -0
  509. package/dest/logs/extended_contract_class_log.d.ts +3 -1
  510. package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
  511. package/dest/logs/extended_directional_app_tagging_secret.d.ts +47 -0
  512. package/dest/logs/extended_directional_app_tagging_secret.d.ts.map +1 -0
  513. package/dest/logs/{directional_app_tagging_secret.js → extended_directional_app_tagging_secret.js} +38 -22
  514. package/dest/logs/extended_public_log.d.ts +20 -4
  515. package/dest/logs/extended_public_log.d.ts.map +1 -1
  516. package/dest/logs/index.d.ts +6 -3
  517. package/dest/logs/index.d.ts.map +1 -1
  518. package/dest/logs/index.js +5 -2
  519. package/dest/logs/log_filter.d.ts +4 -1
  520. package/dest/logs/log_filter.d.ts.map +1 -1
  521. package/dest/logs/log_filter.js +2 -1
  522. package/dest/logs/log_id.d.ts +29 -11
  523. package/dest/logs/log_id.d.ts.map +1 -1
  524. package/dest/logs/log_id.js +26 -16
  525. package/dest/logs/message_context.d.ts +5 -8
  526. package/dest/logs/message_context.d.ts.map +1 -1
  527. package/dest/logs/message_context.js +24 -10
  528. package/dest/logs/pending_tagged_log.d.ts +3 -4
  529. package/dest/logs/pending_tagged_log.d.ts.map +1 -1
  530. package/dest/logs/pending_tagged_log.js +3 -3
  531. package/dest/logs/pre_tag.d.ts +16 -11
  532. package/dest/logs/pre_tag.d.ts.map +1 -1
  533. package/dest/logs/pre_tag.js +2 -2
  534. package/dest/logs/private_log.d.ts +3 -3
  535. package/dest/logs/private_log.d.ts.map +1 -1
  536. package/dest/logs/private_log.js +6 -3
  537. package/dest/logs/public_log.d.ts +6 -4
  538. package/dest/logs/public_log.d.ts.map +1 -1
  539. package/dest/logs/public_log.js +9 -3
  540. package/dest/logs/shared_secret_derivation.d.ts +11 -10
  541. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  542. package/dest/logs/shared_secret_derivation.js +16 -10
  543. package/dest/logs/siloed_tag.d.ts +26 -0
  544. package/dest/logs/siloed_tag.d.ts.map +1 -0
  545. package/dest/logs/siloed_tag.js +40 -0
  546. package/dest/logs/tag.d.ts +20 -0
  547. package/dest/logs/tag.d.ts.map +1 -0
  548. package/dest/logs/tag.js +34 -0
  549. package/dest/logs/tagging_index_range.d.ts +40 -0
  550. package/dest/logs/tagging_index_range.d.ts.map +1 -0
  551. package/dest/logs/tagging_index_range.js +8 -0
  552. package/dest/logs/tx_scoped_l2_log.d.ts +34 -38
  553. package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
  554. package/dest/logs/tx_scoped_l2_log.js +46 -44
  555. package/dest/messaging/in_hash.d.ts +5 -3
  556. package/dest/messaging/in_hash.d.ts.map +1 -1
  557. package/dest/messaging/in_hash.js +4 -2
  558. package/dest/messaging/inbox_leaf.d.ts +10 -7
  559. package/dest/messaging/inbox_leaf.d.ts.map +1 -1
  560. package/dest/messaging/inbox_leaf.js +10 -9
  561. package/dest/messaging/l1_actor.d.ts +8 -2
  562. package/dest/messaging/l1_actor.d.ts.map +1 -1
  563. package/dest/messaging/l1_actor.js +2 -2
  564. package/dest/messaging/l1_to_l2_message.d.ts +9 -3
  565. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  566. package/dest/messaging/l1_to_l2_message.js +13 -15
  567. package/dest/messaging/l1_to_l2_message_source.d.ts +9 -11
  568. package/dest/messaging/l1_to_l2_message_source.d.ts.map +1 -1
  569. package/dest/messaging/l2_actor.d.ts +8 -2
  570. package/dest/messaging/l2_actor.d.ts.map +1 -1
  571. package/dest/messaging/l2_actor.js +2 -2
  572. package/dest/messaging/l2_to_l1_membership.d.ts +117 -8
  573. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  574. package/dest/messaging/l2_to_l1_membership.js +210 -49
  575. package/dest/messaging/l2_to_l1_message.d.ts +3 -2
  576. package/dest/messaging/l2_to_l1_message.d.ts.map +1 -1
  577. package/dest/messaging/l2_to_l1_message.js +4 -1
  578. package/dest/messaging/out_hash.d.ts +42 -4
  579. package/dest/messaging/out_hash.d.ts.map +1 -1
  580. package/dest/messaging/out_hash.js +55 -20
  581. package/dest/noir/index.d.ts +3 -3
  582. package/dest/noir/index.d.ts.map +1 -1
  583. package/dest/note/index.d.ts +1 -2
  584. package/dest/note/index.d.ts.map +1 -1
  585. package/dest/note/index.js +0 -1
  586. package/dest/note/note.d.ts +2 -2
  587. package/dest/note/note.d.ts.map +1 -1
  588. package/dest/note/note.js +5 -2
  589. package/dest/note/note_dao.d.ts +48 -9
  590. package/dest/note/note_dao.d.ts.map +1 -1
  591. package/dest/note/note_dao.js +27 -16
  592. package/dest/p2p/attestation_utils.d.ts +13 -3
  593. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  594. package/dest/p2p/attestation_utils.js +46 -1
  595. package/dest/p2p/block_proposal.d.ts +106 -29
  596. package/dest/p2p/block_proposal.d.ts.map +1 -1
  597. package/dest/p2p/block_proposal.js +142 -47
  598. package/dest/p2p/checkpoint_attestation.d.ts +80 -0
  599. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -0
  600. package/dest/p2p/{block_attestation.js → checkpoint_attestation.js} +24 -25
  601. package/dest/p2p/checkpoint_proposal.d.ts +172 -0
  602. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -0
  603. package/dest/p2p/checkpoint_proposal.js +214 -0
  604. package/dest/p2p/client_type.d.ts +2 -5
  605. package/dest/p2p/client_type.d.ts.map +1 -1
  606. package/dest/p2p/client_type.js +0 -7
  607. package/dest/p2p/consensus_payload.d.ts +21 -12
  608. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  609. package/dest/p2p/consensus_payload.js +25 -20
  610. package/dest/p2p/constants.d.ts +5 -0
  611. package/dest/p2p/constants.d.ts.map +1 -0
  612. package/dest/p2p/constants.js +3 -0
  613. package/dest/p2p/gossipable.d.ts +7 -6
  614. package/dest/p2p/gossipable.d.ts.map +1 -1
  615. package/dest/p2p/gossipable.js +16 -5
  616. package/dest/p2p/index.d.ts +5 -3
  617. package/dest/p2p/index.d.ts.map +1 -1
  618. package/dest/p2p/index.js +4 -2
  619. package/dest/p2p/message_validator.d.ts +18 -3
  620. package/dest/p2p/message_validator.d.ts.map +1 -1
  621. package/dest/p2p/message_validator.js +2 -1
  622. package/dest/p2p/peer_error.d.ts +3 -1
  623. package/dest/p2p/peer_error.d.ts.map +1 -1
  624. package/dest/p2p/peer_error.js +5 -0
  625. package/dest/p2p/signature_utils.d.ts +5 -3
  626. package/dest/p2p/signature_utils.d.ts.map +1 -1
  627. package/dest/p2p/signature_utils.js +5 -2
  628. package/dest/p2p/signed_txs.d.ts +42 -0
  629. package/dest/p2p/signed_txs.d.ts.map +1 -0
  630. package/dest/p2p/signed_txs.js +75 -0
  631. package/dest/p2p/topic_type.d.ts +5 -5
  632. package/dest/p2p/topic_type.d.ts.map +1 -1
  633. package/dest/p2p/topic_type.js +9 -19
  634. package/dest/parity/parity_base_private_inputs.d.ts +4 -2
  635. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  636. package/dest/parity/parity_base_private_inputs.js +1 -1
  637. package/dest/parity/parity_public_inputs.d.ts +5 -2
  638. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  639. package/dest/parity/parity_public_inputs.js +1 -1
  640. package/dest/parity/parity_root_private_inputs.d.ts +2 -1
  641. package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
  642. package/dest/proofs/chonk_proof.d.ts +47 -3
  643. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  644. package/dest/proofs/chonk_proof.js +96 -16
  645. package/dest/proofs/proof.d.ts +5 -2
  646. package/dest/proofs/proof.d.ts.map +1 -1
  647. package/dest/proofs/proof.js +1 -1
  648. package/dest/proofs/proof_data.d.ts +13 -1
  649. package/dest/proofs/proof_data.d.ts.map +1 -1
  650. package/dest/proofs/proof_data.js +17 -0
  651. package/dest/proofs/recursive_proof.d.ts +11 -2
  652. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  653. package/dest/proofs/recursive_proof.js +1 -1
  654. package/dest/rollup/avm_proof_data.d.ts +3 -5
  655. package/dest/rollup/avm_proof_data.d.ts.map +1 -1
  656. package/dest/rollup/avm_proof_data.js +1 -9
  657. package/dest/rollup/base_rollup_hints.d.ts +35 -2
  658. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  659. package/dest/rollup/base_rollup_hints.js +1 -1
  660. package/dest/rollup/block_constant_data.d.ts +13 -2
  661. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  662. package/dest/rollup/block_constant_data.js +1 -1
  663. package/dest/rollup/block_headers_hash.d.ts +2 -2
  664. package/dest/rollup/block_headers_hash.d.ts.map +1 -1
  665. package/dest/rollup/block_headers_hash.js +10 -4
  666. package/dest/rollup/block_merge_rollup_private_inputs.d.ts +4 -1
  667. package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
  668. package/dest/rollup/block_rollup_public_inputs.d.ts +48 -12
  669. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  670. package/dest/rollup/block_rollup_public_inputs.js +9 -13
  671. package/dest/rollup/block_root_rollup_private_inputs.d.ts +65 -2
  672. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  673. package/dest/rollup/block_root_rollup_private_inputs.js +1 -1
  674. package/dest/rollup/checkpoint_constant_data.d.ts +12 -2
  675. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
  676. package/dest/rollup/checkpoint_constant_data.js +5 -2
  677. package/dest/rollup/checkpoint_header.d.ts +47 -13
  678. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  679. package/dest/rollup/checkpoint_header.js +55 -22
  680. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +4 -1
  681. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
  682. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +47 -7
  683. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  684. package/dest/rollup/checkpoint_rollup_public_inputs.js +12 -4
  685. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +46 -4
  686. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  687. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +15 -3
  688. package/dest/rollup/epoch_constant_data.d.ts +17 -2
  689. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  690. package/dest/rollup/epoch_constant_data.js +1 -1
  691. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts +2 -2
  692. package/dest/rollup/public_chonk_verifier_private_inputs.d.ts.map +1 -1
  693. package/dest/rollup/public_chonk_verifier_private_inputs.js +1 -1
  694. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts +2 -2
  695. package/dest/rollup/public_chonk_verifier_public_inputs.d.ts.map +1 -1
  696. package/dest/rollup/public_chonk_verifier_public_inputs.js +1 -1
  697. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +1 -1
  698. package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
  699. package/dest/rollup/public_tx_base_rollup_private_inputs.js +2 -2
  700. package/dest/rollup/root_rollup_private_inputs.d.ts +6 -1
  701. package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
  702. package/dest/rollup/root_rollup_public_inputs.d.ts +22 -7
  703. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  704. package/dest/rollup/root_rollup_public_inputs.js +11 -5
  705. package/dest/rollup/tree_snapshot_diff_hints.d.ts +25 -2
  706. package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
  707. package/dest/rollup/tree_snapshot_diff_hints.js +1 -1
  708. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +4 -1
  709. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
  710. package/dest/rollup/tx_rollup_public_inputs.d.ts +30 -2
  711. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  712. package/dest/rollup/tx_rollup_public_inputs.js +1 -1
  713. package/dest/schemas/schemas.d.ts +7 -4
  714. package/dest/schemas/schemas.d.ts.map +1 -1
  715. package/dest/schemas/schemas.js +2 -1
  716. package/dest/slashing/helpers.d.ts +2 -2
  717. package/dest/slashing/helpers.d.ts.map +1 -1
  718. package/dest/slashing/helpers.js +6 -0
  719. package/dest/slashing/index.d.ts +2 -3
  720. package/dest/slashing/index.d.ts.map +1 -1
  721. package/dest/slashing/index.js +1 -2
  722. package/dest/slashing/serialization.d.ts +2 -6
  723. package/dest/slashing/serialization.d.ts.map +1 -1
  724. package/dest/slashing/serialization.js +0 -60
  725. package/dest/slashing/types.d.ts +11 -94
  726. package/dest/slashing/types.d.ts.map +1 -1
  727. package/dest/slashing/types.js +16 -18
  728. package/dest/slashing/{tally.d.ts → votes.d.ts} +8 -2
  729. package/dest/slashing/votes.d.ts.map +1 -0
  730. package/dest/slashing/{tally.js → votes.js} +35 -3
  731. package/dest/snapshots/types.d.ts +1 -1
  732. package/dest/snapshots/types.d.ts.map +1 -1
  733. package/dest/snapshots/types.js +5 -5
  734. package/dest/stats/stats.d.ts +10 -8
  735. package/dest/stats/stats.d.ts.map +1 -1
  736. package/dest/tests/factories.d.ts +46 -21
  737. package/dest/tests/factories.d.ts.map +1 -1
  738. package/dest/tests/factories.js +130 -78
  739. package/dest/tests/jest.js +1 -1
  740. package/dest/tests/mocks.d.ts +92 -19
  741. package/dest/tests/mocks.d.ts.map +1 -1
  742. package/dest/tests/mocks.js +197 -67
  743. package/dest/timetable/index.d.ts +87 -0
  744. package/dest/timetable/index.d.ts.map +1 -0
  745. package/dest/timetable/index.js +229 -0
  746. package/dest/trees/append_only_tree_snapshot.d.ts +14 -2
  747. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  748. package/dest/trees/append_only_tree_snapshot.js +4 -2
  749. package/dest/trees/database_public_state_source.d.ts +2 -2
  750. package/dest/trees/database_public_state_source.d.ts.map +1 -1
  751. package/dest/trees/database_public_state_source.js +1 -1
  752. package/dest/trees/nullifier_leaf.d.ts +15 -2
  753. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  754. package/dest/trees/nullifier_leaf.js +4 -1
  755. package/dest/trees/nullifier_membership_witness.d.ts +11 -2
  756. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  757. package/dest/trees/nullifier_membership_witness.js +1 -1
  758. package/dest/trees/public_data_leaf.d.ts +18 -2
  759. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  760. package/dest/trees/public_data_leaf.js +8 -7
  761. package/dest/trees/public_data_witness.d.ts +12 -2
  762. package/dest/trees/public_data_witness.d.ts.map +1 -1
  763. package/dest/trees/public_data_witness.js +1 -1
  764. package/dest/tx/block_header.d.ts +27 -12
  765. package/dest/tx/block_header.d.ts.map +1 -1
  766. package/dest/tx/block_header.js +20 -5
  767. package/dest/tx/call_context.d.ts +14 -2
  768. package/dest/tx/call_context.d.ts.map +1 -1
  769. package/dest/tx/call_context.js +3 -1
  770. package/dest/tx/capsule.d.ts +10 -3
  771. package/dest/tx/capsule.d.ts.map +1 -1
  772. package/dest/tx/capsule.js +10 -4
  773. package/dest/tx/execution_payload.d.ts +9 -1
  774. package/dest/tx/execution_payload.d.ts.map +1 -1
  775. package/dest/tx/fee_provider.d.ts +10 -0
  776. package/dest/tx/fee_provider.d.ts.map +1 -0
  777. package/dest/tx/fee_provider.js +1 -0
  778. package/dest/tx/function_data.d.ts +5 -3
  779. package/dest/tx/function_data.d.ts.map +1 -1
  780. package/dest/tx/function_data.js +1 -1
  781. package/dest/tx/global_variable_builder.d.ts +5 -4
  782. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  783. package/dest/tx/global_variables.d.ts +27 -12
  784. package/dest/tx/global_variables.d.ts.map +1 -1
  785. package/dest/tx/global_variables.js +11 -9
  786. package/dest/tx/hashed_values.d.ts +8 -2
  787. package/dest/tx/hashed_values.d.ts.map +1 -1
  788. package/dest/tx/hashed_values.js +1 -1
  789. package/dest/tx/in_tx.d.ts +26 -0
  790. package/dest/tx/in_tx.d.ts.map +1 -0
  791. package/dest/tx/in_tx.js +14 -0
  792. package/dest/tx/index.d.ts +3 -2
  793. package/dest/tx/index.d.ts.map +1 -1
  794. package/dest/tx/index.js +2 -1
  795. package/dest/tx/indexed_tx_effect.d.ts +14 -10
  796. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  797. package/dest/tx/indexed_tx_effect.js +7 -6
  798. package/dest/tx/offchain_effect.d.ts +2 -2
  799. package/dest/tx/offchain_effect.d.ts.map +1 -1
  800. package/dest/tx/offchain_effect.js +1 -1
  801. package/dest/tx/partial_state_reference.d.ts +5 -2
  802. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  803. package/dest/tx/private_execution_result.d.ts +30 -13
  804. package/dest/tx/private_execution_result.d.ts.map +1 -1
  805. package/dest/tx/private_execution_result.js +10 -27
  806. package/dest/tx/private_tx_constant_data.d.ts +17 -2
  807. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  808. package/dest/tx/private_tx_constant_data.js +1 -1
  809. package/dest/tx/processed_tx.d.ts +5 -4
  810. package/dest/tx/processed_tx.d.ts.map +1 -1
  811. package/dest/tx/processed_tx.js +8 -7
  812. package/dest/tx/profiling.d.ts +166 -31
  813. package/dest/tx/profiling.d.ts.map +1 -1
  814. package/dest/tx/profiling.js +60 -13
  815. package/dest/tx/protocol_contracts.d.ts +3 -3
  816. package/dest/tx/protocol_contracts.d.ts.map +1 -1
  817. package/dest/tx/protocol_contracts.js +3 -3
  818. package/dest/tx/public_call_request_with_calldata.d.ts +8 -2
  819. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  820. package/dest/tx/public_call_request_with_calldata.js +4 -2
  821. package/dest/tx/public_simulation_output.d.ts +5 -3
  822. package/dest/tx/public_simulation_output.d.ts.map +1 -1
  823. package/dest/tx/public_simulation_output.js +8 -4
  824. package/dest/tx/simulated_tx.d.ts +1146 -11
  825. package/dest/tx/simulated_tx.d.ts.map +1 -1
  826. package/dest/tx/simulated_tx.js +7 -4
  827. package/dest/tx/state_reference.d.ts +4 -2
  828. package/dest/tx/state_reference.d.ts.map +1 -1
  829. package/dest/tx/state_reference.js +3 -1
  830. package/dest/tx/tree_snapshots.d.ts +2 -2
  831. package/dest/tx/tree_snapshots.d.ts.map +1 -1
  832. package/dest/tx/tree_snapshots.js +3 -1
  833. package/dest/tx/tx.d.ts +42 -11
  834. package/dest/tx/tx.d.ts.map +1 -1
  835. package/dest/tx/tx.js +37 -12
  836. package/dest/tx/tx_constant_data.d.ts +2 -2
  837. package/dest/tx/tx_constant_data.d.ts.map +1 -1
  838. package/dest/tx/tx_constant_data.js +1 -1
  839. package/dest/tx/tx_context.d.ts +3 -2
  840. package/dest/tx/tx_context.d.ts.map +1 -1
  841. package/dest/tx/tx_context.js +1 -1
  842. package/dest/tx/tx_effect.d.ts +33 -7
  843. package/dest/tx/tx_effect.d.ts.map +1 -1
  844. package/dest/tx/tx_effect.js +8 -11
  845. package/dest/tx/tx_execution_request.d.ts +31 -2
  846. package/dest/tx/tx_execution_request.d.ts.map +1 -1
  847. package/dest/tx/tx_execution_request.js +7 -3
  848. package/dest/tx/tx_hash.d.ts +3 -2
  849. package/dest/tx/tx_hash.d.ts.map +1 -1
  850. package/dest/tx/tx_hash.js +1 -1
  851. package/dest/tx/tx_receipt.d.ts +76 -18
  852. package/dest/tx/tx_receipt.d.ts.map +1 -1
  853. package/dest/tx/tx_receipt.js +65 -29
  854. package/dest/tx/tx_request.d.ts +7 -2
  855. package/dest/tx/tx_request.d.ts.map +1 -1
  856. package/dest/tx/tx_request.js +4 -4
  857. package/dest/tx/validator/empty_validator.d.ts +2 -2
  858. package/dest/tx/validator/empty_validator.d.ts.map +1 -1
  859. package/dest/tx/validator/error_texts.d.ts +11 -2
  860. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  861. package/dest/tx/validator/error_texts.js +13 -1
  862. package/dest/tx/validator/tx_validator.d.ts +2 -5
  863. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  864. package/dest/tx/validator/tx_validator.js +4 -4
  865. package/dest/types/shared.d.ts +4 -10
  866. package/dest/types/shared.d.ts.map +1 -1
  867. package/dest/types/shared.js +0 -9
  868. package/dest/update-checker/index.d.ts +3 -2
  869. package/dest/update-checker/index.d.ts.map +1 -1
  870. package/dest/update-checker/index.js +2 -1
  871. package/dest/update-checker/package_version.d.ts +3 -0
  872. package/dest/update-checker/package_version.d.ts.map +1 -0
  873. package/dest/update-checker/package_version.js +24 -0
  874. package/dest/update-checker/version_checker.d.ts +25 -0
  875. package/dest/update-checker/version_checker.d.ts.map +1 -0
  876. package/dest/update-checker/version_checker.js +50 -0
  877. package/dest/validators/errors.d.ts +7 -2
  878. package/dest/validators/errors.d.ts.map +1 -1
  879. package/dest/validators/errors.js +7 -0
  880. package/dest/validators/schemas.d.ts +38 -38
  881. package/dest/validators/schemas.d.ts.map +1 -1
  882. package/dest/validators/schemas.js +17 -16
  883. package/dest/validators/types.d.ts +3 -3
  884. package/dest/validators/types.d.ts.map +1 -1
  885. package/dest/versioning/versioning.d.ts +5 -3
  886. package/dest/versioning/versioning.d.ts.map +1 -1
  887. package/dest/versioning/versioning.js +4 -1
  888. package/dest/vks/verification_key.d.ts +2 -116
  889. package/dest/vks/verification_key.d.ts.map +1 -1
  890. package/dest/vks/verification_key.js +5 -126
  891. package/dest/vks/vk_data.d.ts +8 -2
  892. package/dest/vks/vk_data.d.ts.map +1 -1
  893. package/dest/vks/vk_data.js +1 -1
  894. package/dest/world-state/genesis_data.d.ts +11 -0
  895. package/dest/world-state/genesis_data.d.ts.map +1 -0
  896. package/dest/world-state/genesis_data.js +4 -0
  897. package/dest/world-state/index.d.ts +2 -1
  898. package/dest/world-state/index.d.ts.map +1 -1
  899. package/dest/world-state/index.js +1 -0
  900. package/dest/zkpassport/index.d.ts +4 -5
  901. package/dest/zkpassport/index.d.ts.map +1 -1
  902. package/dest/zkpassport/index.js +11 -11
  903. package/package.json +35 -15
  904. package/src/abi/abi.ts +64 -35
  905. package/src/abi/authorization_selector.ts +5 -10
  906. package/src/abi/buffer.ts +26 -5
  907. package/src/abi/contract_artifact.ts +10 -10
  908. package/src/abi/decoder.ts +37 -83
  909. package/src/abi/encoder.ts +86 -7
  910. package/src/abi/event_metadata_definition.ts +2 -0
  911. package/src/abi/event_selector.ts +5 -10
  912. package/src/abi/function_call.ts +26 -4
  913. package/src/abi/function_selector.ts +15 -15
  914. package/src/abi/function_signature_decoder.ts +77 -0
  915. package/src/abi/index.ts +1 -0
  916. package/src/abi/note_selector.ts +5 -14
  917. package/src/abi/selector.ts +2 -2
  918. package/src/abi/utils.ts +42 -0
  919. package/src/auth_witness/auth_witness.ts +5 -5
  920. package/src/avm/avm.ts +338 -20
  921. package/src/avm/avm_accumulated_data.ts +1 -1
  922. package/src/avm/avm_circuit_public_inputs.ts +1 -1
  923. package/src/avm/contract_storage_read.ts +1 -1
  924. package/src/avm/contract_storage_update_request.ts +1 -1
  925. package/src/avm/message_pack.ts +2 -1
  926. package/src/avm/public_call_stack_item_compressed.ts +1 -1
  927. package/src/avm/public_data_read.ts +1 -1
  928. package/src/avm/public_data_update_request.ts +1 -1
  929. package/src/avm/public_data_write.ts +1 -1
  930. package/src/avm/public_inner_call_request.ts +1 -1
  931. package/src/avm/revert_code.ts +27 -26
  932. package/src/aztec-address/index.ts +6 -11
  933. package/src/block/attestation_info.ts +10 -7
  934. package/src/block/block_data.ts +25 -0
  935. package/src/block/block_hash.ts +32 -24
  936. package/src/block/block_parameter.ts +10 -0
  937. package/src/block/body.ts +2 -1
  938. package/src/block/checkpointed_l2_block.ts +70 -0
  939. package/src/block/in_block.ts +28 -15
  940. package/src/block/index.ts +3 -4
  941. package/src/block/l2_block.ts +117 -139
  942. package/src/block/l2_block_info.ts +19 -16
  943. package/src/block/l2_block_source.ts +239 -75
  944. package/src/block/l2_block_stream/index.ts +1 -0
  945. package/src/block/l2_block_stream/interfaces.ts +21 -6
  946. package/src/block/l2_block_stream/l2_block_stream.ts +163 -37
  947. package/src/block/l2_block_stream/l2_tips_memory_store.ts +63 -54
  948. package/src/block/l2_block_stream/l2_tips_store_base.ts +238 -0
  949. package/src/block/proposal/attestations_and_signers.ts +1 -1
  950. package/src/block/proposal/committee_attestation.ts +1 -1
  951. package/src/block/test/l2_tips_store_test_suite.ts +493 -36
  952. package/src/block/validate_block_result.ts +40 -35
  953. package/src/checkpoint/checkpoint.ts +135 -28
  954. package/src/checkpoint/checkpoint_data.ts +87 -0
  955. package/src/checkpoint/checkpoint_info.ts +52 -0
  956. package/src/checkpoint/index.ts +3 -0
  957. package/src/checkpoint/published_checkpoint.ts +26 -9
  958. package/src/checkpoint/validate.ts +230 -0
  959. package/src/config/chain-config.ts +7 -1
  960. package/src/config/index.ts +2 -0
  961. package/src/config/node-rpc-config.ts +1 -1
  962. package/src/config/pipelining-config.ts +31 -0
  963. package/src/config/sequencer-config.ts +47 -0
  964. package/src/contract/artifact_hash.ts +2 -2
  965. package/src/contract/complete_address.ts +1 -1
  966. package/src/contract/contract_address.ts +9 -9
  967. package/src/contract/contract_class.ts +5 -5
  968. package/src/contract/contract_class_id.ts +9 -8
  969. package/src/contract/contract_instance.ts +1 -1
  970. package/src/contract/contract_instance_update.ts +1 -1
  971. package/src/contract/deployment_info.ts +1 -1
  972. package/src/contract/index.ts +0 -4
  973. package/src/contract/interfaces/contract_class.ts +48 -97
  974. package/src/contract/interfaces/contract_data_source.ts +3 -2
  975. package/src/contract/interfaces/contract_instance.ts +48 -16
  976. package/src/contract/interfaces/contract_instance_update.ts +12 -10
  977. package/src/contract/interfaces/node-info.ts +3 -0
  978. package/src/contract/partial_address.ts +1 -1
  979. package/src/contract/private_function.ts +8 -6
  980. package/src/database-version/database_version.ts +87 -0
  981. package/src/database-version/version_manager.ts +1 -77
  982. package/src/delayed_public_mutable/delayed_public_mutable_values.ts +11 -12
  983. package/src/delayed_public_mutable/delayed_public_mutable_values_with_hash.ts +1 -1
  984. package/src/delayed_public_mutable/scheduled_value_change.ts +1 -1
  985. package/src/deserialization/index.ts +21 -0
  986. package/src/epoch-helpers/index.ts +51 -10
  987. package/src/errors/simulation_error.ts +1 -1
  988. package/src/fees/transaction_fee.ts +1 -1
  989. package/src/file-store/factory.ts +13 -4
  990. package/src/file-store/http.ts +29 -10
  991. package/src/file-store/index.ts +1 -0
  992. package/src/file-store/local.ts +15 -5
  993. package/src/file-store/s3.ts +12 -3
  994. package/src/gas/README.md +154 -0
  995. package/src/gas/fee_math.ts +120 -0
  996. package/src/gas/gas.ts +1 -1
  997. package/src/gas/gas_fees.ts +16 -2
  998. package/src/gas/gas_settings.ts +66 -13
  999. package/src/gas/index.ts +1 -0
  1000. package/src/ha-signing/config.ts +156 -0
  1001. package/src/ha-signing/index.ts +29 -0
  1002. package/src/ha-signing/local_config.ts +46 -0
  1003. package/src/ha-signing/types.ts +126 -0
  1004. package/src/hash/hash.ts +74 -19
  1005. package/src/hash/map_slot.ts +4 -3
  1006. package/src/interfaces/allowed_element.ts +35 -13
  1007. package/src/interfaces/api_limit.ts +2 -0
  1008. package/src/interfaces/archiver.ts +59 -31
  1009. package/src/interfaces/aztec-node-admin.ts +38 -13
  1010. package/src/interfaces/aztec-node-debug.ts +40 -0
  1011. package/src/interfaces/aztec-node.ts +195 -176
  1012. package/src/interfaces/block-builder.ts +102 -27
  1013. package/src/interfaces/client.ts +1 -0
  1014. package/src/interfaces/configs.ts +99 -37
  1015. package/src/interfaces/epoch-prover.ts +4 -4
  1016. package/src/interfaces/get_logs_response.ts +13 -9
  1017. package/src/interfaces/l2_logs_source.ts +27 -14
  1018. package/src/interfaces/merkle_tree_operations.ts +18 -23
  1019. package/src/interfaces/p2p.ts +10 -25
  1020. package/src/interfaces/prover-broker.ts +22 -0
  1021. package/src/interfaces/prover-client.ts +45 -15
  1022. package/src/interfaces/proving-job.ts +2 -11
  1023. package/src/interfaces/public_state_source.ts +1 -1
  1024. package/src/interfaces/server_circuit_prover.ts +3 -3
  1025. package/src/interfaces/slasher.ts +26 -26
  1026. package/src/interfaces/validator.ts +135 -48
  1027. package/src/interfaces/world_state.ts +29 -20
  1028. package/src/kernel/claimed_length_array.ts +1 -1
  1029. package/src/kernel/hints/build_note_hash_read_request_hints.ts +34 -30
  1030. package/src/kernel/hints/build_nullifier_read_request_hints.ts +33 -33
  1031. package/src/kernel/hints/build_transient_data_hints.ts +17 -2
  1032. package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +2 -4
  1033. package/src/kernel/hints/index.ts +2 -2
  1034. package/src/kernel/hints/key_validation_hint.ts +1 -1
  1035. package/src/kernel/hints/key_validation_request.ts +2 -1
  1036. package/src/kernel/hints/key_validation_request_and_separator.ts +49 -0
  1037. package/src/kernel/hints/note_hash_read_request_hints.ts +1 -1
  1038. package/src/kernel/hints/read_request.ts +1 -1
  1039. package/src/kernel/hints/{scoped_key_validation_request_and_generator.ts → scoped_key_validation_request_and_separator.ts} +11 -11
  1040. package/src/kernel/hints/scoped_value_cache.ts +1 -1
  1041. package/src/kernel/hints/transient_data_squashing_hint.ts +1 -1
  1042. package/src/kernel/hints/tree_leaf_read_request.ts +1 -1
  1043. package/src/kernel/log_hash.ts +1 -1
  1044. package/src/kernel/note_hash.ts +1 -1
  1045. package/src/kernel/nullifier.ts +1 -1
  1046. package/src/kernel/padded_side_effects.ts +1 -1
  1047. package/src/kernel/private_call_data.ts +1 -1
  1048. package/src/kernel/private_call_request.ts +1 -1
  1049. package/src/kernel/private_circuit_public_inputs.ts +100 -100
  1050. package/src/kernel/private_context_inputs.ts +1 -1
  1051. package/src/kernel/private_kernel_circuit_public_inputs.ts +3 -3
  1052. package/src/kernel/private_kernel_init_circuit_private_inputs.ts +1 -1
  1053. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +2 -2
  1054. package/src/kernel/private_kernel_tail_circuit_public_inputs.ts +15 -6
  1055. package/src/kernel/private_log_data.ts +1 -1
  1056. package/src/kernel/private_to_avm_accumulated_data.ts +1 -1
  1057. package/src/kernel/private_to_public_accumulated_data.ts +1 -1
  1058. package/src/kernel/private_to_public_accumulated_data_builder.ts +1 -1
  1059. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +7 -7
  1060. package/src/kernel/private_to_rollup_accumulated_data.ts +1 -1
  1061. package/src/kernel/private_to_rollup_kernel_circuit_public_inputs.ts +7 -7
  1062. package/src/kernel/private_validation_requests.ts +8 -8
  1063. package/src/kernel/public_call_request.ts +1 -1
  1064. package/src/kernel/utils/optional_number.ts +1 -1
  1065. package/src/keys/derivation.ts +20 -17
  1066. package/src/keys/key_types.ts +6 -2
  1067. package/src/keys/public_key.ts +1 -1
  1068. package/src/keys/public_keys.ts +5 -4
  1069. package/src/keys/utils.ts +8 -4
  1070. package/src/kv-store/config.ts +36 -0
  1071. package/src/kv-store/index.ts +1 -0
  1072. package/src/l1-contracts/index.ts +1 -1
  1073. package/src/logs/contract_class_log.ts +2 -2
  1074. package/src/logs/debug_log.ts +1 -1
  1075. package/src/logs/debug_log_store.ts +54 -0
  1076. package/src/logs/{directional_app_tagging_secret.ts → extended_directional_app_tagging_secret.ts} +45 -24
  1077. package/src/logs/index.ts +5 -2
  1078. package/src/logs/log_filter.ts +5 -0
  1079. package/src/logs/log_id.ts +31 -17
  1080. package/src/logs/message_context.ts +18 -8
  1081. package/src/logs/pending_tagged_log.ts +2 -4
  1082. package/src/logs/pre_tag.ts +5 -5
  1083. package/src/logs/private_log.ts +3 -2
  1084. package/src/logs/public_log.ts +12 -3
  1085. package/src/logs/shared_secret_derivation.ts +22 -11
  1086. package/src/logs/siloed_tag.ts +54 -0
  1087. package/src/logs/tag.ts +42 -0
  1088. package/src/logs/tagging_index_range.ts +24 -0
  1089. package/src/logs/tx_scoped_l2_log.ts +62 -43
  1090. package/src/messaging/in_hash.ts +4 -2
  1091. package/src/messaging/inbox_leaf.ts +11 -10
  1092. package/src/messaging/l1_actor.ts +2 -2
  1093. package/src/messaging/l1_to_l2_message.ts +14 -10
  1094. package/src/messaging/l1_to_l2_message_source.ts +8 -11
  1095. package/src/messaging/l2_actor.ts +2 -2
  1096. package/src/messaging/l2_to_l1_membership.ts +253 -61
  1097. package/src/messaging/l2_to_l1_message.ts +5 -1
  1098. package/src/messaging/out_hash.ts +63 -22
  1099. package/src/noir/index.ts +2 -2
  1100. package/src/note/index.ts +0 -1
  1101. package/src/note/note.ts +5 -2
  1102. package/src/note/note_dao.ts +49 -16
  1103. package/src/p2p/attestation_utils.ts +59 -3
  1104. package/src/p2p/block_proposal.ts +226 -56
  1105. package/src/p2p/{block_attestation.ts → checkpoint_attestation.ts} +41 -33
  1106. package/src/p2p/checkpoint_proposal.ts +358 -0
  1107. package/src/p2p/client_type.ts +0 -6
  1108. package/src/p2p/consensus_payload.ts +30 -19
  1109. package/src/p2p/constants.ts +6 -0
  1110. package/src/p2p/gossipable.ts +18 -8
  1111. package/src/p2p/index.ts +4 -2
  1112. package/src/p2p/message_validator.ts +14 -2
  1113. package/src/p2p/peer_error.ts +7 -0
  1114. package/src/p2p/signature_utils.ts +5 -2
  1115. package/src/p2p/signed_txs.ts +88 -0
  1116. package/src/p2p/topic_type.ts +10 -16
  1117. package/src/parity/parity_base_private_inputs.ts +1 -1
  1118. package/src/parity/parity_public_inputs.ts +1 -1
  1119. package/src/proofs/chonk_proof.ts +102 -12
  1120. package/src/proofs/proof.ts +1 -1
  1121. package/src/proofs/proof_data.ts +24 -0
  1122. package/src/proofs/recursive_proof.ts +1 -1
  1123. package/src/rollup/avm_proof_data.ts +2 -9
  1124. package/src/rollup/base_rollup_hints.ts +1 -1
  1125. package/src/rollup/block_constant_data.ts +1 -1
  1126. package/src/rollup/block_headers_hash.ts +13 -4
  1127. package/src/rollup/block_rollup_public_inputs.ts +6 -12
  1128. package/src/rollup/block_root_rollup_private_inputs.ts +1 -1
  1129. package/src/rollup/checkpoint_constant_data.ts +2 -1
  1130. package/src/rollup/checkpoint_header.ts +69 -20
  1131. package/src/rollup/checkpoint_rollup_public_inputs.ts +18 -6
  1132. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +16 -2
  1133. package/src/rollup/epoch_constant_data.ts +1 -1
  1134. package/src/rollup/public_chonk_verifier_private_inputs.ts +1 -1
  1135. package/src/rollup/public_chonk_verifier_public_inputs.ts +1 -1
  1136. package/src/rollup/public_tx_base_rollup_private_inputs.ts +2 -2
  1137. package/src/rollup/root_rollup_public_inputs.ts +17 -8
  1138. package/src/rollup/tree_snapshot_diff_hints.ts +1 -1
  1139. package/src/rollup/tx_rollup_public_inputs.ts +1 -1
  1140. package/src/schemas/schemas.ts +6 -1
  1141. package/src/slashing/helpers.ts +8 -0
  1142. package/src/slashing/index.ts +1 -2
  1143. package/src/slashing/serialization.ts +1 -81
  1144. package/src/slashing/types.ts +26 -40
  1145. package/src/slashing/{tally.ts → votes.ts} +41 -2
  1146. package/src/snapshots/types.ts +33 -29
  1147. package/src/stats/stats.ts +10 -7
  1148. package/src/tests/factories.ts +158 -104
  1149. package/src/tests/jest.ts +1 -1
  1150. package/src/tests/mocks.ts +318 -90
  1151. package/src/timetable/index.ts +346 -0
  1152. package/src/trees/append_only_tree_snapshot.ts +1 -1
  1153. package/src/trees/database_public_state_source.ts +1 -1
  1154. package/src/trees/nullifier_leaf.ts +5 -1
  1155. package/src/trees/nullifier_membership_witness.ts +1 -1
  1156. package/src/trees/public_data_leaf.ts +12 -6
  1157. package/src/trees/public_data_witness.ts +1 -1
  1158. package/src/tx/block_header.ts +33 -13
  1159. package/src/tx/call_context.ts +1 -1
  1160. package/src/tx/capsule.ts +11 -3
  1161. package/src/tx/fee_provider.ts +10 -0
  1162. package/src/tx/function_data.ts +1 -1
  1163. package/src/tx/global_variable_builder.ts +10 -4
  1164. package/src/tx/global_variables.ts +16 -10
  1165. package/src/tx/hashed_values.ts +1 -1
  1166. package/src/tx/in_tx.ts +24 -0
  1167. package/src/tx/index.ts +2 -1
  1168. package/src/tx/indexed_tx_effect.ts +8 -7
  1169. package/src/tx/offchain_effect.ts +1 -1
  1170. package/src/tx/partial_state_reference.ts +1 -1
  1171. package/src/tx/private_execution_result.ts +10 -25
  1172. package/src/tx/private_tx_constant_data.ts +1 -1
  1173. package/src/tx/processed_tx.ts +19 -16
  1174. package/src/tx/profiling.ts +61 -10
  1175. package/src/tx/protocol_contracts.ts +4 -4
  1176. package/src/tx/public_call_request_with_calldata.ts +1 -1
  1177. package/src/tx/public_simulation_output.ts +5 -1
  1178. package/src/tx/simulated_tx.ts +14 -3
  1179. package/src/tx/state_reference.ts +1 -1
  1180. package/src/tx/tree_snapshots.ts +1 -1
  1181. package/src/tx/tx.ts +44 -26
  1182. package/src/tx/tx_constant_data.ts +1 -1
  1183. package/src/tx/tx_context.ts +1 -1
  1184. package/src/tx/tx_effect.ts +5 -12
  1185. package/src/tx/tx_execution_request.ts +3 -1
  1186. package/src/tx/tx_hash.ts +1 -1
  1187. package/src/tx/tx_receipt.ts +100 -30
  1188. package/src/tx/tx_request.ts +4 -4
  1189. package/src/tx/validator/empty_validator.ts +1 -1
  1190. package/src/tx/validator/error_texts.ts +16 -1
  1191. package/src/tx/validator/tx_validator.ts +9 -7
  1192. package/src/types/shared.ts +0 -10
  1193. package/src/update-checker/index.ts +2 -1
  1194. package/src/update-checker/package_version.ts +30 -0
  1195. package/src/update-checker/version_checker.ts +65 -0
  1196. package/src/validators/errors.ts +10 -1
  1197. package/src/validators/schemas.ts +61 -48
  1198. package/src/validators/types.ts +5 -4
  1199. package/src/versioning/versioning.ts +5 -2
  1200. package/src/vks/verification_key.ts +5 -184
  1201. package/src/vks/vk_data.ts +1 -1
  1202. package/src/world-state/genesis_data.ts +15 -0
  1203. package/src/world-state/index.ts +1 -0
  1204. package/src/zkpassport/index.ts +13 -14
  1205. package/dest/abi/mocked_keys.d.ts +0 -2
  1206. package/dest/abi/mocked_keys.d.ts.map +0 -1
  1207. package/dest/abi/mocked_keys.js +0 -1
  1208. package/dest/block/l2_block_code_to_purge.d.ts +0 -12
  1209. package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
  1210. package/dest/block/l2_block_code_to_purge.js +0 -61
  1211. package/dest/block/l2_block_header.d.ts +0 -98
  1212. package/dest/block/l2_block_header.d.ts.map +0 -1
  1213. package/dest/block/l2_block_header.js +0 -153
  1214. package/dest/block/l2_block_new.d.ts +0 -108
  1215. package/dest/block/l2_block_new.d.ts.map +0 -1
  1216. package/dest/block/l2_block_new.js +0 -135
  1217. package/dest/block/l2_block_number.d.ts +0 -5
  1218. package/dest/block/l2_block_number.d.ts.map +0 -1
  1219. package/dest/block/l2_block_number.js +0 -6
  1220. package/dest/block/published_l2_block.d.ts +0 -130
  1221. package/dest/block/published_l2_block.d.ts.map +0 -1
  1222. package/dest/block/published_l2_block.js +0 -48
  1223. package/dest/contract/contract_class_metadata.d.ts +0 -8
  1224. package/dest/contract/contract_class_metadata.d.ts.map +0 -1
  1225. package/dest/contract/contract_class_metadata.js +0 -1
  1226. package/dest/contract/contract_metadata.d.ts +0 -7
  1227. package/dest/contract/contract_metadata.d.ts.map +0 -1
  1228. package/dest/contract/contract_metadata.js +0 -1
  1229. package/dest/contract/private_function_membership_proof.d.ts +0 -32
  1230. package/dest/contract/private_function_membership_proof.d.ts.map +0 -1
  1231. package/dest/contract/private_function_membership_proof.js +0 -124
  1232. package/dest/contract/utility_function_membership_proof.d.ts +0 -27
  1233. package/dest/contract/utility_function_membership_proof.d.ts.map +0 -1
  1234. package/dest/contract/utility_function_membership_proof.js +0 -87
  1235. package/dest/database-version/index.d.ts +0 -2
  1236. package/dest/database-version/index.d.ts.map +0 -1
  1237. package/dest/database-version/index.js +0 -1
  1238. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +0 -25
  1239. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +0 -1
  1240. package/dest/l1-contracts/slash_factory.d.ts +0 -44
  1241. package/dest/l1-contracts/slash_factory.d.ts.map +0 -1
  1242. package/dest/l1-contracts/slash_factory.js +0 -157
  1243. package/dest/logs/directional_app_tagging_secret.d.ts +0 -40
  1244. package/dest/logs/directional_app_tagging_secret.d.ts.map +0 -1
  1245. package/dest/logs/log_with_tx_data.d.ts +0 -19
  1246. package/dest/logs/log_with_tx_data.d.ts.map +0 -1
  1247. package/dest/logs/log_with_tx_data.js +0 -49
  1248. package/dest/note/notes_filter.d.ts +0 -25
  1249. package/dest/note/notes_filter.d.ts.map +0 -1
  1250. package/dest/note/notes_filter.js +0 -10
  1251. package/dest/p2p/block_attestation.d.ts +0 -80
  1252. package/dest/p2p/block_attestation.d.ts.map +0 -1
  1253. package/dest/slashing/empire.d.ts +0 -31
  1254. package/dest/slashing/empire.d.ts.map +0 -1
  1255. package/dest/slashing/empire.js +0 -85
  1256. package/dest/slashing/tally.d.ts.map +0 -1
  1257. package/dest/tx/content_commitment.d.ts +0 -48
  1258. package/dest/tx/content_commitment.d.ts.map +0 -1
  1259. package/dest/tx/content_commitment.js +0 -82
  1260. package/dest/update-checker/update-checker.d.ts +0 -49
  1261. package/dest/update-checker/update-checker.d.ts.map +0 -1
  1262. package/dest/update-checker/update-checker.js +0 -130
  1263. package/src/abi/mocked_keys.ts +0 -2
  1264. package/src/block/l2_block_code_to_purge.ts +0 -88
  1265. package/src/block/l2_block_header.ts +0 -246
  1266. package/src/block/l2_block_new.ts +0 -171
  1267. package/src/block/l2_block_number.ts +0 -8
  1268. package/src/block/published_l2_block.ts +0 -65
  1269. package/src/contract/contract_class_metadata.ts +0 -8
  1270. package/src/contract/contract_metadata.ts +0 -7
  1271. package/src/contract/private_function_membership_proof.ts +0 -167
  1272. package/src/contract/utility_function_membership_proof.ts +0 -118
  1273. package/src/database-version/index.ts +0 -1
  1274. package/src/kernel/hints/key_validation_request_and_generator.ts +0 -52
  1275. package/src/l1-contracts/slash_factory.ts +0 -177
  1276. package/src/logs/log_with_tx_data.ts +0 -46
  1277. package/src/note/notes_filter.ts +0 -35
  1278. package/src/slashing/empire.ts +0 -102
  1279. package/src/tx/content_commitment.ts +0 -104
  1280. package/src/update-checker/update-checker.ts +0 -165
@@ -1,4 +1,4 @@
1
- import { Buffer32 } from '@aztec/foundation/buffer';
1
+ import { BaseBuffer32 } from '@aztec/foundation/buffer';
2
2
  import { BufferReader, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
3
3
 
4
4
  import type { TopicType } from './topic_type.js';
@@ -7,23 +7,33 @@ export class P2PMessage {
7
7
  constructor(
8
8
  public readonly payload: Buffer,
9
9
  public readonly timestamp?: Date,
10
+ public readonly traceContext?: string,
10
11
  ) {}
11
12
 
12
- static fromGossipable(message: Gossipable, instrumentMessages = false): P2PMessage {
13
- return new P2PMessage(message.toBuffer(), instrumentMessages ? new Date() : undefined);
13
+ static fromGossipable(message: Gossipable, instrumentMessages = false, traceContext?: string): P2PMessage {
14
+ if (!instrumentMessages) {
15
+ return new P2PMessage(message.toBuffer());
16
+ }
17
+ return new P2PMessage(message.toBuffer(), new Date(), traceContext);
14
18
  }
15
19
 
16
20
  static fromMessageData(messageData: Buffer, instrumentMessages = false): P2PMessage {
17
21
  const reader = new BufferReader(messageData);
18
- const timestamp = instrumentMessages ? new Date(Number(reader.readUInt64())) : undefined;
22
+ let timestamp: Date | undefined;
23
+ let traceContext: string | undefined;
24
+ if (instrumentMessages) {
25
+ timestamp = new Date(Number(reader.readUInt64()));
26
+ traceContext = reader.readString();
27
+ }
19
28
  const payload = reader.readBuffer();
20
- return new P2PMessage(payload, timestamp);
29
+ return new P2PMessage(payload, timestamp, traceContext);
21
30
  }
22
31
 
23
32
  toMessageData(): Buffer {
24
33
  const arr: Buffer[] = [];
25
34
  if (this.timestamp) {
26
35
  arr.push(bigintToUInt64BE(BigInt(this.timestamp.getTime())));
36
+ arr.push(serializeToBuffer(this.traceContext ?? ''));
27
37
  }
28
38
  arr.push(serializeToBuffer(this.payload.length, this.payload));
29
39
  return serializeToBuffer(arr);
@@ -36,7 +46,7 @@ export class P2PMessage {
36
46
  * Any class which extends gossipable will be able to be Gossiped over the p2p network
37
47
  */
38
48
  export abstract class Gossipable {
39
- private cachedId: Buffer32 | undefined;
49
+ private cachedId: BaseBuffer32 | undefined;
40
50
  /** The p2p topic identifier, this determines how the message is handled */
41
51
  static p2pTopic: TopicType;
42
52
 
@@ -44,7 +54,7 @@ export abstract class Gossipable {
44
54
  * A digest of the message information **used for logging only**.
45
55
  * The identifier used for deduplication is `getMsgIdFn` as defined in `encoding.ts` which is a hash over topic and data.
46
56
  */
47
- async p2pMessageLoggingIdentifier(): Promise<Buffer32> {
57
+ async p2pMessageLoggingIdentifier(): Promise<BaseBuffer32> {
48
58
  if (this.cachedId) {
49
59
  return this.cachedId;
50
60
  }
@@ -52,7 +62,7 @@ export abstract class Gossipable {
52
62
  return this.cachedId;
53
63
  }
54
64
 
55
- abstract generateP2PMessageIdentifier(): Promise<Buffer32>;
65
+ abstract generateP2PMessageIdentifier(): Promise<BaseBuffer32>;
56
66
 
57
67
  abstract toBuffer(): Buffer;
58
68
 
package/src/p2p/index.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  export * from './attestation_utils.js';
2
- export * from './block_attestation.js';
3
2
  export * from './block_proposal.js';
3
+ export * from './checkpoint_attestation.js';
4
+ export * from './checkpoint_proposal.js';
4
5
  export * from './consensus_payload.js';
5
6
  export * from './gossipable.js';
6
7
  export * from './interface.js';
7
8
  export * from './signature_utils.js';
9
+ export * from './signed_txs.js';
8
10
  export * from './topic_type.js';
9
- export * from './client_type.js';
10
11
  export * from './message_validator.js';
11
12
  export * from './peer_error.js';
13
+ export * from './constants.js';
@@ -1,10 +1,22 @@
1
1
  import type { PeerErrorSeverity } from './peer_error.js';
2
2
 
3
+ /**
4
+ * Result of validating a P2P message.
5
+ * - 'accept': Message is valid and should be accepted and processed
6
+ * - 'ignore': Message should be ignored (not propagated or processed, but sender not penalized)
7
+ * - 'reject': Message is invalid (rejected and sender penalized)
8
+ */
9
+ export type ValidationResult =
10
+ | { result: 'accept' }
11
+ | { result: 'ignore' }
12
+ | { result: 'reject'; severity: PeerErrorSeverity };
13
+
3
14
  /**
4
15
  * P2PValidator
5
16
  *
6
- * A validator for P2P messages, which returns a severity of error to be applied to the peer
17
+ * A validator for P2P messages, which returns a ValidationResult indicating
18
+ * whether to accept, ignore, or reject the message
7
19
  */
8
20
  export interface P2PValidator<T> {
9
- validate(message: T): Promise<PeerErrorSeverity | undefined>;
21
+ validate(message: T): Promise<ValidationResult>;
10
22
  }
@@ -15,3 +15,10 @@ export enum PeerErrorSeverity {
15
15
  */
16
16
  HighToleranceError = 'HighToleranceError',
17
17
  }
18
+
19
+ /** Severities ordered from mildest to harshest. */
20
+ export const PeerErrorSeverityByHarshness = [
21
+ PeerErrorSeverity.HighToleranceError,
22
+ PeerErrorSeverity.MidToleranceError,
23
+ PeerErrorSeverity.LowToleranceError,
24
+ ] as const;
@@ -1,10 +1,13 @@
1
1
  import { Buffer32 } from '@aztec/foundation/buffer';
2
- import { keccak256, makeEthSignDigest } from '@aztec/foundation/crypto';
2
+ import { keccak256 } from '@aztec/foundation/crypto/keccak';
3
+ import { makeEthSignDigest } from '@aztec/foundation/crypto/secp256k1-signer';
3
4
 
4
5
  export enum SignatureDomainSeparator {
5
6
  blockProposal = 0,
6
- blockAttestation = 1,
7
+ checkpointAttestation = 1,
7
8
  attestationsAndSigners = 2,
9
+ checkpointProposal = 3,
10
+ signedTxs = 4,
8
11
  }
9
12
 
10
13
  export interface Signable {
@@ -0,0 +1,88 @@
1
+ import { Buffer32 } from '@aztec/foundation/buffer';
2
+ import { tryRecoverAddress } from '@aztec/foundation/crypto/secp256k1-signer';
3
+ import type { EthAddress } from '@aztec/foundation/eth-address';
4
+ import { Signature } from '@aztec/foundation/eth-signature';
5
+ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
6
+
7
+ import { MAX_TXS_PER_BLOCK } from '../deserialization/index.js';
8
+ import { Tx } from '../tx/tx.js';
9
+ import {
10
+ SignatureDomainSeparator,
11
+ getHashedSignaturePayload,
12
+ getHashedSignaturePayloadEthSignedMessage,
13
+ } from './signature_utils.js';
14
+
15
+ /**
16
+ * A signed collection of transactions.
17
+ * The signature is over the transaction objects themselves, providing
18
+ * data availability guarantees beyond just the transaction hashes.
19
+ */
20
+ export class SignedTxs {
21
+ private sender: EthAddress | undefined;
22
+
23
+ constructor(
24
+ /** The transactions */
25
+ public readonly txs: Tx[],
26
+ /** The proposer's signature over the transactions */
27
+ public readonly signature: Signature,
28
+ ) {}
29
+
30
+ /**
31
+ * Get the payload to sign for this signed txs.
32
+ */
33
+ getPayloadToSign(domainSeparator: SignatureDomainSeparator): Buffer {
34
+ return serializeToBuffer([domainSeparator, this.txs.length, this.txs]);
35
+ }
36
+
37
+ /**
38
+ * Lazily evaluate the sender of the signed txs; result is cached
39
+ * @returns The sender address, or undefined if signature recovery fails
40
+ */
41
+ getSender(): EthAddress | undefined {
42
+ if (!this.sender) {
43
+ const hashed = getHashedSignaturePayloadEthSignedMessage(this, SignatureDomainSeparator.signedTxs);
44
+ this.sender = tryRecoverAddress(hashed, this.signature);
45
+ }
46
+ return this.sender;
47
+ }
48
+
49
+ /**
50
+ * Create SignedTxs from a signer function
51
+ */
52
+ static async createFromSigner(
53
+ txs: Tx[],
54
+ payloadSigner: (payload: Buffer32) => Promise<Signature>,
55
+ ): Promise<SignedTxs> {
56
+ const tempSignedTxs = new SignedTxs(txs, Signature.empty());
57
+ const hashed = getHashedSignaturePayload(tempSignedTxs, SignatureDomainSeparator.signedTxs);
58
+ const signature = await payloadSigner(hashed);
59
+ return new SignedTxs(txs, signature);
60
+ }
61
+
62
+ toBuffer(): Buffer {
63
+ return serializeToBuffer([this.txs.length, this.txs, this.signature]);
64
+ }
65
+
66
+ static fromBuffer(buf: Buffer | BufferReader): SignedTxs {
67
+ const reader = BufferReader.asReader(buf);
68
+ const txCount = reader.readNumber();
69
+ if (txCount > MAX_TXS_PER_BLOCK) {
70
+ throw new Error(`txs count ${txCount} exceeds maximum ${MAX_TXS_PER_BLOCK}`);
71
+ }
72
+ const txs = reader.readArray(txCount, Tx);
73
+ const signature = reader.readObject(Signature);
74
+ return new SignedTxs(txs, signature);
75
+ }
76
+
77
+ getSize(): number {
78
+ return 4 /* txs.length */ + this.txs.reduce((acc, tx) => acc + tx.getSize(), 0) + this.signature.getSize();
79
+ }
80
+
81
+ static empty(): SignedTxs {
82
+ return new SignedTxs([], Signature.empty());
83
+ }
84
+
85
+ static random(): SignedTxs {
86
+ return new SignedTxs([Tx.random(), Tx.random()], Signature.random());
87
+ }
88
+ }
@@ -1,5 +1,3 @@
1
- import { P2PClientType } from './client_type.js';
2
-
3
1
  /**
4
2
  * Creates the topic channel identifier string from a given topic type
5
3
  */
@@ -23,22 +21,18 @@ export function getTopicFromString(topicStr: string): TopicType | undefined {
23
21
  export enum TopicType {
24
22
  tx = 'tx',
25
23
  block_proposal = 'block_proposal',
26
- block_attestation = 'block_attestation',
27
- }
28
-
29
- export function getTopicTypeForClientType(clientType: P2PClientType) {
30
- if (clientType === P2PClientType.Full) {
31
- return Object.values(TopicType);
32
- } else if (clientType === P2PClientType.Prover) {
33
- return [TopicType.tx, TopicType.block_proposal];
34
- } else {
35
- const _: never = clientType;
36
- return [TopicType.tx];
37
- }
24
+ checkpoint_proposal = 'checkpoint_proposal',
25
+ checkpoint_attestation = 'checkpoint_attestation',
38
26
  }
39
27
 
40
- export function getTopicsForClientAndConfig(clientType: P2PClientType, disableTransactions: boolean) {
41
- const topics = getTopicTypeForClientType(clientType);
28
+ /** Returns all gossip topics, optionally filtering out transactions. */
29
+ export function getTopicsForConfig(disableTransactions: boolean) {
30
+ const topics = [
31
+ TopicType.tx,
32
+ TopicType.block_proposal,
33
+ TopicType.checkpoint_proposal,
34
+ TopicType.checkpoint_attestation,
35
+ ];
42
36
  if (disableTransactions) {
43
37
  return topics.filter(topic => topic !== TopicType.tx);
44
38
  }
@@ -1,5 +1,5 @@
1
1
  import { NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, NUM_MSGS_PER_BASE_PARITY } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { bufferSchemaFor } from '@aztec/foundation/schemas';
4
4
  import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { bufferSchemaFor } from '@aztec/foundation/schemas';
3
3
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
4
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
@@ -1,20 +1,41 @@
1
+ import { BarretenbergSync, flattenChonkProofFields } from '@aztec/bb.js';
1
2
  import { CHONK_PROOF_LENGTH } from '@aztec/constants';
2
- import { randomBytes } from '@aztec/foundation/crypto';
3
- import { Fr } from '@aztec/foundation/fields';
3
+ import { times } from '@aztec/foundation/collection';
4
+ import { randomBytes } from '@aztec/foundation/crypto/random';
5
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
6
  import { bufferSchemaFor } from '@aztec/foundation/schemas';
5
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
7
+ import { BufferReader, numToUInt32BE, serializeToBuffer } from '@aztec/foundation/serialize';
8
+
9
+ /**
10
+ * Serialization format detection for ChonkProof is size-based:
11
+ * - UNCOMPRESSED (legacy): [field_count=1632: uint32] [fields...] → total ≈ 52KB (>= 40KB)
12
+ * - COMPRESSED: [byte_count: uint32] [compressed_bytes] → total ≈ 35KB (< 40KB)
13
+ *
14
+ * Detection: if the first uint32 equals CHONK_PROOF_LENGTH (1632), it's legacy format
15
+ * (field count). Otherwise, it's compressed format (byte count). The old uncompressed
16
+ * format is never smaller than 40KB; compressed proofs are always smaller than 40KB.
17
+ */
6
18
 
7
19
  // CHONK: "Client Honk" - An UltraHonk variant with incremental folding and delayed non-native arithmetic.
8
20
  export class ChonkProof {
21
+ /**
22
+ * Optional compressed proof bytes from chonk compression (point compression + u256 encoding).
23
+ * When set, toBuffer() will serialize in compressed format (~1.7x smaller).
24
+ * When reading from compressed format, this is populated and fields are decompressed on demand.
25
+ */
26
+ public compressedProof?: Buffer;
27
+
9
28
  constructor(
10
29
  // The proof fields.
11
30
  // For native verification, attach public inputs via `attachPublicInputs(publicInputs)`.
12
31
  // Not using Tuple here due to the length being too high.
13
32
  public fields: Fr[],
33
+ compressedProof?: Buffer,
14
34
  ) {
15
35
  if (fields.length !== CHONK_PROOF_LENGTH) {
16
36
  throw new Error(`Invalid ChonkProof length: ${fields.length}`);
17
37
  }
38
+ this.compressedProof = compressedProof;
18
39
  }
19
40
 
20
41
  public attachPublicInputs(publicInputs: Fr[]) {
@@ -31,12 +52,15 @@ export class ChonkProof {
31
52
 
32
53
  static random() {
33
54
  // NB: Not using Fr.random here because it slows down some tests that require a large number of txs significantly.
55
+ // NB2: generate one fewer random bytes to not have to deal with buffers representing numbers greater than the field modulus
56
+ // NB3: a chonk proof can be compressed. Simulate this by filling 1/4 of the proof with zero data
34
57
  const reducedFrSize = Fr.SIZE_IN_BYTES - 1;
35
- const randomFields = randomBytes(CHONK_PROOF_LENGTH * reducedFrSize);
36
- const proof = Array.from(
37
- { length: CHONK_PROOF_LENGTH },
38
- (_, i) => new Fr(randomFields.subarray(i * reducedFrSize, (i + 1) * reducedFrSize)),
39
- );
58
+ const nonZeroFields = Math.floor((3 * CHONK_PROOF_LENGTH) / 4);
59
+ const randomFields = randomBytes(nonZeroFields * Fr.SIZE_IN_BYTES);
60
+ const proof = [
61
+ ...times(nonZeroFields, i => new Fr(randomFields.subarray(i * reducedFrSize, (i + 1) * reducedFrSize))),
62
+ ...times(CHONK_PROOF_LENGTH - nonZeroFields, () => Fr.ZERO),
63
+ ];
40
64
  return new ChonkProof(proof);
41
65
  }
42
66
 
@@ -49,19 +73,84 @@ export class ChonkProof {
49
73
  return this.toBuffer();
50
74
  }
51
75
 
76
+ /**
77
+ * Deserialize a ChonkProof from a buffer.
78
+ * Supports both legacy (field elements) and compressed (chonk compression) formats.
79
+ *
80
+ * Size-based format detection:
81
+ * - First uint32 == CHONK_PROOF_LENGTH (1632): legacy format, read field elements
82
+ * Total proof data ≈ 52KB (always >= 40KB)
83
+ * - Otherwise: compressed format, first uint32 is byte count of compressed data
84
+ * Total proof data ≈ 35KB (always < 40KB)
85
+ */
52
86
  static fromBuffer(buffer: Buffer | BufferReader): ChonkProof {
53
87
  const reader = BufferReader.asReader(buffer);
54
- const proofLength = reader.readNumber();
55
- const proof = reader.readArray(proofLength, Fr);
56
- return new ChonkProof(proof);
88
+ const firstUint32 = reader.readNumber();
89
+
90
+ if (firstUint32 === CHONK_PROOF_LENGTH) {
91
+ // Legacy format: firstUint32 is the field count (1632)
92
+ // Widen to `number` to prevent TS from narrowing to literal 1632,
93
+ // which would cause Tuple<Fr, 1632> to exceed the recursion limit.
94
+ const fieldCount: number = firstUint32;
95
+ const proof = reader.readArray(fieldCount, Fr);
96
+ return new ChonkProof(proof);
97
+ }
98
+
99
+ // Compressed format: firstUint32 is the compressed byte count
100
+ const compressedBytes = reader.readBytes(firstUint32);
101
+ return ChonkProof.fromCompressedBytes(Buffer.from(compressedBytes));
102
+ }
103
+
104
+ /**
105
+ * Create a ChonkProof from compressed bytes by decompressing via the BarretenbergSync API.
106
+ * The compressed format uses point compression and u256 encoding (from PR #20645).
107
+ *
108
+ * @param compressed - Compressed proof bytes from chonk compression
109
+ * @returns ChonkProof with both fields and compressed bytes populated
110
+ */
111
+ static fromCompressedBytes(compressed: Buffer): ChonkProof {
112
+ const api = BarretenbergSync.getSingleton();
113
+ const result = api.chonkDecompressProof({ compressedProof: new Uint8Array(compressed) });
114
+
115
+ // Flatten the structured bb.js ChonkProof into flat Fr[] field elements
116
+ const flatFields = flattenChonkProofFields(result.proof);
117
+ const fields = flatFields.map(f => Fr.fromBuffer(Buffer.from(f)));
118
+
119
+ // The decompressed proof includes public inputs in hidingOinkProof.
120
+ // Since ChonkProof stores fields WITHOUT public inputs, strip them.
121
+ // The number of public inputs = total fields - CHONK_PROOF_LENGTH
122
+ if (fields.length > CHONK_PROOF_LENGTH) {
123
+ const numPubInputs = fields.length - CHONK_PROOF_LENGTH;
124
+ const proofFields = fields.slice(numPubInputs);
125
+ return new ChonkProof(proofFields, compressed);
126
+ }
127
+
128
+ return new ChonkProof(fields, compressed);
57
129
  }
58
130
 
131
+ /**
132
+ * Serialize the proof to a buffer.
133
+ * If compressed bytes are available, uses the compressed format (~1.7x smaller).
134
+ * Otherwise falls back to legacy field element format.
135
+ */
59
136
  public toBuffer() {
137
+ if (this.compressedProof) {
138
+ // Compressed format: [compressed_byte_count: uint32] [compressed_bytes]
139
+ return Buffer.concat([numToUInt32BE(this.compressedProof.length), this.compressedProof]);
140
+ }
141
+ // Legacy format: [field_count=1632: uint32] [fields...]
60
142
  return serializeToBuffer(this.fields.length, this.fields);
61
143
  }
62
144
  }
63
145
 
64
146
  export class ChonkProofWithPublicInputs {
147
+ /**
148
+ * Optional compressed proof bytes (covers the full proof WITH public inputs).
149
+ * Set by the prover when using chonk compression. Flows through to ChonkProof
150
+ * via removePublicInputs() so the Tx can serialize in compressed format.
151
+ */
152
+ public compressedProof?: Buffer;
153
+
65
154
  constructor(
66
155
  // The proof fields with public inputs.
67
156
  // For recursive verification, use without public inputs via `removePublicInputs()`.
@@ -79,7 +168,8 @@ export class ChonkProofWithPublicInputs {
79
168
 
80
169
  public removePublicInputs() {
81
170
  const numPublicInputs = this.fieldsWithPublicInputs.length - CHONK_PROOF_LENGTH;
82
- return new ChonkProof(this.fieldsWithPublicInputs.slice(numPublicInputs));
171
+ // Flow compressed proof bytes through so the ChonkProof can serialize efficiently
172
+ return new ChonkProof(this.fieldsWithPublicInputs.slice(numPublicInputs), this.compressedProof);
83
173
  }
84
174
 
85
175
  public isEmpty() {
@@ -1,5 +1,5 @@
1
1
  import { PAIRING_POINTS_SIZE } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
4
4
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
5
5
 
@@ -29,6 +29,30 @@ export class ProofData<T extends Bufferable, PROOF_LENGTH extends number> {
29
29
  }
30
30
  }
31
31
 
32
+ /**
33
+ * Represents the data of a recursive proof for a circuit with a fixed verification key.
34
+ */
35
+ export class ProofDataForFixedVk<T extends Bufferable, PROOF_LENGTH extends number> {
36
+ constructor(
37
+ public publicInputs: T,
38
+ public proof: RecursiveProof<PROOF_LENGTH>,
39
+ ) {}
40
+
41
+ public toBuffer(): Buffer {
42
+ return serializeToBuffer(this.publicInputs, this.proof);
43
+ }
44
+
45
+ public static fromBuffer<T extends Bufferable, PROOF_LENGTH extends number>(
46
+ buffer: Buffer | BufferReader,
47
+ publicInputs: {
48
+ fromBuffer: (reader: BufferReader) => T;
49
+ },
50
+ ): ProofDataForFixedVk<T, PROOF_LENGTH> {
51
+ const reader = BufferReader.asReader(buffer);
52
+ return new ProofDataForFixedVk(reader.readObject(publicInputs), RecursiveProof.fromBuffer(reader));
53
+ }
54
+ }
55
+
32
56
  export type ChonkProofData<T extends Bufferable> = ProofData<T, typeof CHONK_PROOF_LENGTH>;
33
57
 
34
58
  export type UltraHonkProofData<T extends Bufferable> = ProofData<T, typeof RECURSIVE_PROOF_LENGTH>;
@@ -1,5 +1,5 @@
1
1
  import { makeTuple } from '@aztec/foundation/array';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { schemas } from '@aztec/foundation/schemas';
4
4
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
@@ -1,13 +1,6 @@
1
1
  import { AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
3
2
 
4
3
  import { AvmCircuitPublicInputs } from '../avm/avm_circuit_public_inputs.js';
5
- import type { ProofData } from '../proofs/proof_data.js';
4
+ import type { ProofDataForFixedVk } from '../proofs/proof_data.js';
6
5
 
7
- export type AvmProofData = ProofData<AvmCircuitPublicInputs, typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>;
8
-
9
- // TODO(#14234)[Unconditional PIs validation]: remove this function.
10
- export function enhanceProofWithPiValidationFlag(proof: Fr[], skipPublicInputsValidation: boolean): Fr[] {
11
- const skipPublicInputsField = skipPublicInputsValidation ? new Fr(1) : new Fr(0);
12
- return [skipPublicInputsField].concat(proof).slice(0, AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED);
13
- }
6
+ export type AvmProofData = ProofDataForFixedVk<AvmCircuitPublicInputs, typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>;
@@ -1,7 +1,7 @@
1
1
  import { SpongeBlob } from '@aztec/blob-lib/types';
2
2
  import { ARCHIVE_HEIGHT, MAX_CONTRACT_CLASS_LOGS_PER_TX } from '@aztec/constants';
3
3
  import { makeTuple } from '@aztec/foundation/array';
4
- import { Fr } from '@aztec/foundation/fields';
4
+ import { Fr } from '@aztec/foundation/curves/bn254';
5
5
  import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize';
6
6
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
7
7
  import type { FieldsOf } from '@aztec/foundation/types';
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
3
  import type { FieldsOf } from '@aztec/foundation/types';
4
4
 
@@ -1,12 +1,21 @@
1
- import { Fr } from '@aztec/foundation/fields';
2
- import { computeUnbalancedPoseidonRoot } from '@aztec/foundation/trees';
1
+ import { DomainSeparator } from '@aztec/constants';
2
+ import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
+ import { computeUnbalancedMerkleTreeRootAsync } from '@aztec/foundation/trees';
3
5
 
4
6
  import type { BlockHeader } from '../tx/block_header.js';
5
7
 
6
8
  export async function computeBlockHeadersHash(blockHeaders: BlockHeader[]): Promise<Fr> {
7
9
  const blockHeaderHashes = await Promise.all(blockHeaders.map(header => header.hash()));
8
- // Must match the implementation in merge_block_rollups.nr, with the **wonky** rollup structure
10
+ // Must match the implementation in merge_block_rollups.nr, with the **unbalanced** rollup structure
9
11
  // (see validate_consecutive_block_rollups.nr > assert_rollups_filled_greedily.nr).
10
- const blockHeadersHash = await computeUnbalancedPoseidonRoot(blockHeaderHashes.map(hash => hash.toBuffer()));
12
+ const blockHeadersHasher = async (left: Uint8Array, right: Uint8Array) =>
13
+ (
14
+ await poseidon2HashWithSeparator([Buffer.from(left), Buffer.from(right)], DomainSeparator.BLOCK_HEADERS_HASH)
15
+ ).toBuffer() as Buffer<ArrayBuffer>;
16
+ const blockHeadersHash = await computeUnbalancedMerkleTreeRootAsync(
17
+ blockHeaderHashes.map(hash => hash.toBuffer()),
18
+ blockHeadersHasher,
19
+ );
11
20
  return Fr.fromBuffer(blockHeadersHash);
12
21
  }
@@ -1,5 +1,5 @@
1
1
  import { SpongeBlob } from '@aztec/blob-lib/types';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { bufferSchemaFor } from '@aztec/foundation/schemas';
4
4
  import { BufferReader, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
  import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
@@ -43,17 +43,13 @@ export class BlockRollupPublicInputs {
43
43
  */
44
44
  public endSpongeBlob: SpongeBlob,
45
45
  /**
46
- * Timestamp of the first block in this block range.
46
+ * Timestamp of the blocks in this block range.
47
47
  */
48
- public startTimestamp: UInt64,
49
- /**
50
- * Timestamp of the last block in this block range.
51
- */
52
- public endTimestamp: UInt64,
48
+ public timestamp: UInt64,
53
49
  /**
54
50
  * Hash of the headers of all blocks in this block range. It will be combined with the `blockHeadersHash` from
55
- * other blocks in the same checkpoint to form a wonky tree. The root of that tree becomes the final hash stored in
56
- * the checkpoint header, enabling validation of the blocks included in a checkpoint given their headers.
51
+ * other blocks in the same checkpoint to form an unbalanced tree. The root of that tree becomes the final hash
52
+ * stored in the checkpoint header, enabling validation of the blocks included in a checkpoint given their headers.
57
53
  */
58
54
  public blockHeadersHash: Fr,
59
55
  /**
@@ -85,7 +81,6 @@ export class BlockRollupPublicInputs {
85
81
  reader.readObject(SpongeBlob),
86
82
  reader.readObject(SpongeBlob),
87
83
  reader.readUInt64(),
88
- reader.readUInt64(),
89
84
  Fr.fromBuffer(reader),
90
85
  Fr.fromBuffer(reader),
91
86
  Fr.fromBuffer(reader),
@@ -103,8 +98,7 @@ export class BlockRollupPublicInputs {
103
98
  this.endState,
104
99
  this.startSpongeBlob,
105
100
  this.endSpongeBlob,
106
- bigintToUInt64BE(this.startTimestamp),
107
- bigintToUInt64BE(this.endTimestamp),
101
+ bigintToUInt64BE(this.timestamp),
108
102
  this.blockHeadersHash,
109
103
  this.inHash,
110
104
  this.outHash,
@@ -1,5 +1,5 @@
1
1
  import { ARCHIVE_HEIGHT, L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { bufferSchemaFor } from '@aztec/foundation/schemas';
4
4
  import { BufferReader, type Tuple, bigintToUInt64BE, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
  import type { FieldsOf } from '@aztec/foundation/types';
@@ -1,6 +1,6 @@
1
1
  import { SlotNumber } from '@aztec/foundation/branded-types';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
3
  import { EthAddress } from '@aztec/foundation/eth-address';
3
- import { Fr } from '@aztec/foundation/fields';
4
4
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
5
5
  import type { FieldsOf } from '@aztec/foundation/types';
6
6
 
@@ -11,6 +11,7 @@ import { GasFees } from '../gas/gas_fees.js';
11
11
 
12
12
  /**
13
13
  * Constants that are the same for the entire checkpoint.
14
+ * Used in circuits during rollup proving.
14
15
  */
15
16
  export class CheckpointConstantData {
16
17
  constructor(