@aztec/stdlib 0.0.1-commit.03f7ef2 → 0.0.1-commit.08c5969dc

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 (664) hide show
  1. package/dest/abi/contract_artifact.d.ts +2 -2
  2. package/dest/abi/contract_artifact.d.ts.map +1 -1
  3. package/dest/abi/contract_artifact.js +1 -1
  4. package/dest/abi/function_call.d.ts +47 -9
  5. package/dest/abi/function_call.d.ts.map +1 -1
  6. package/dest/abi/function_call.js +20 -3
  7. package/dest/abi/selector.js +3 -1
  8. package/dest/abi/utils.d.ts +7 -1
  9. package/dest/abi/utils.d.ts.map +1 -1
  10. package/dest/abi/utils.js +7 -0
  11. package/dest/auth_witness/auth_witness.d.ts +2 -1
  12. package/dest/auth_witness/auth_witness.d.ts.map +1 -1
  13. package/dest/avm/avm.d.ts +62 -62
  14. package/dest/avm/avm_accumulated_data.d.ts +30 -3
  15. package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
  16. package/dest/avm/avm_accumulated_data.js +5 -2
  17. package/dest/avm/avm_circuit_public_inputs.d.ts +9 -9
  18. package/dest/avm/avm_circuit_public_inputs.js +3 -1
  19. package/dest/avm/avm_proving_request.d.ts +299 -299
  20. package/dest/avm/contract_storage_read.d.ts +13 -1
  21. package/dest/avm/contract_storage_read.d.ts.map +1 -1
  22. package/dest/avm/contract_storage_update_request.d.ts +13 -1
  23. package/dest/avm/contract_storage_update_request.d.ts.map +1 -1
  24. package/dest/avm/public_call_stack_item_compressed.d.ts +3 -1
  25. package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -1
  26. package/dest/avm/public_data_read.d.ts +10 -1
  27. package/dest/avm/public_data_read.d.ts.map +1 -1
  28. package/dest/avm/public_data_update_request.d.ts +10 -1
  29. package/dest/avm/public_data_update_request.d.ts.map +1 -1
  30. package/dest/avm/public_data_update_request.js +3 -1
  31. package/dest/avm/public_data_write.d.ts +7 -1
  32. package/dest/avm/public_data_write.d.ts.map +1 -1
  33. package/dest/avm/public_inner_call_request.d.ts +4 -1
  34. package/dest/avm/public_inner_call_request.d.ts.map +1 -1
  35. package/dest/avm/public_inner_call_request.js +3 -1
  36. package/dest/avm/revert_code.d.ts +4 -4
  37. package/dest/avm/revert_code.d.ts.map +1 -1
  38. package/dest/avm/revert_code.js +3 -1
  39. package/dest/aztec-address/index.js +4 -2
  40. package/dest/block/attestation_info.d.ts +5 -5
  41. package/dest/block/attestation_info.d.ts.map +1 -1
  42. package/dest/block/attestation_info.js +4 -4
  43. package/dest/block/block_hash.d.ts +18 -14
  44. package/dest/block/block_hash.d.ts.map +1 -1
  45. package/dest/block/block_hash.js +22 -20
  46. package/dest/block/block_parameter.d.ts +4 -3
  47. package/dest/block/block_parameter.d.ts.map +1 -1
  48. package/dest/block/block_parameter.js +2 -0
  49. package/dest/block/body.d.ts +1 -1
  50. package/dest/block/body.d.ts.map +1 -1
  51. package/dest/block/body.js +5 -2
  52. package/dest/block/checkpointed_l2_block.d.ts +20 -137
  53. package/dest/block/checkpointed_l2_block.d.ts.map +1 -1
  54. package/dest/block/checkpointed_l2_block.js +7 -45
  55. package/dest/block/in_block.d.ts +9 -9
  56. package/dest/block/in_block.d.ts.map +1 -1
  57. package/dest/block/in_block.js +5 -5
  58. package/dest/block/index.d.ts +1 -3
  59. package/dest/block/index.d.ts.map +1 -1
  60. package/dest/block/index.js +0 -2
  61. package/dest/block/l2_block.d.ts +57 -57
  62. package/dest/block/l2_block.d.ts.map +1 -1
  63. package/dest/block/l2_block.js +64 -108
  64. package/dest/block/l2_block_source.d.ts +298 -68
  65. package/dest/block/l2_block_source.d.ts.map +1 -1
  66. package/dest/block/l2_block_source.js +25 -6
  67. package/dest/block/l2_block_stream/index.d.ts +2 -1
  68. package/dest/block/l2_block_stream/index.d.ts.map +1 -1
  69. package/dest/block/l2_block_stream/index.js +1 -0
  70. package/dest/block/l2_block_stream/interfaces.d.ts +15 -5
  71. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  72. package/dest/block/l2_block_stream/l2_block_stream.d.ts +8 -3
  73. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  74. package/dest/block/l2_block_stream/l2_block_stream.js +106 -31
  75. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +24 -16
  76. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  77. package/dest/block/l2_block_stream/l2_tips_memory_store.js +55 -61
  78. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +49 -0
  79. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -0
  80. package/dest/block/l2_block_stream/l2_tips_store_base.js +179 -0
  81. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  82. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  83. package/dest/block/test/l2_tips_store_test_suite.js +478 -38
  84. package/dest/block/validate_block_result.d.ts +24 -24
  85. package/dest/block/validate_block_result.d.ts.map +1 -1
  86. package/dest/block/validate_block_result.js +18 -17
  87. package/dest/checkpoint/checkpoint.d.ts +30 -20
  88. package/dest/checkpoint/checkpoint.d.ts.map +1 -1
  89. package/dest/checkpoint/checkpoint.js +19 -6
  90. package/dest/checkpoint/checkpoint_info.d.ts +32 -3
  91. package/dest/checkpoint/checkpoint_info.d.ts.map +1 -1
  92. package/dest/checkpoint/checkpoint_info.js +34 -1
  93. package/dest/checkpoint/index.d.ts +2 -1
  94. package/dest/checkpoint/index.d.ts.map +1 -1
  95. package/dest/checkpoint/index.js +1 -0
  96. package/dest/checkpoint/published_checkpoint.d.ts +17 -15
  97. package/dest/checkpoint/published_checkpoint.d.ts.map +1 -1
  98. package/dest/checkpoint/published_checkpoint.js +4 -3
  99. package/dest/config/index.d.ts +2 -1
  100. package/dest/config/index.d.ts.map +1 -1
  101. package/dest/config/index.js +1 -0
  102. package/dest/config/node-rpc-config.js +1 -1
  103. package/dest/config/sequencer-config.d.ts +10 -0
  104. package/dest/config/sequencer-config.d.ts.map +1 -0
  105. package/dest/config/sequencer-config.js +12 -0
  106. package/dest/contract/complete_address.d.ts +4 -1
  107. package/dest/contract/complete_address.d.ts.map +1 -1
  108. package/dest/contract/contract_address.js +1 -1
  109. package/dest/contract/contract_class_id.d.ts +1 -1
  110. package/dest/contract/contract_class_id.js +1 -1
  111. package/dest/contract/contract_deployment_data.d.ts +5 -5
  112. package/dest/contract/index.d.ts +1 -3
  113. package/dest/contract/index.d.ts.map +1 -1
  114. package/dest/contract/index.js +0 -2
  115. package/dest/contract/interfaces/contract_instance.d.ts +16 -16
  116. package/dest/contract/interfaces/node-info.d.ts +3 -1
  117. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  118. package/dest/contract/interfaces/node-info.js +2 -1
  119. package/dest/contract/private_function.d.ts +1 -1
  120. package/dest/contract/private_function.d.ts.map +1 -1
  121. package/dest/contract/private_function.js +2 -3
  122. package/dest/contract/private_function_membership_proof.d.ts +1 -1
  123. package/dest/contract/private_function_membership_proof.js +1 -1
  124. package/dest/database-version/database_version.d.ts +58 -0
  125. package/dest/database-version/database_version.d.ts.map +1 -0
  126. package/dest/database-version/database_version.js +69 -0
  127. package/dest/database-version/version_manager.d.ts +3 -49
  128. package/dest/database-version/version_manager.d.ts.map +1 -1
  129. package/dest/database-version/version_manager.js +1 -64
  130. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts +2 -2
  131. package/dest/delayed_public_mutable/delayed_public_mutable_values.d.ts.map +1 -1
  132. package/dest/delayed_public_mutable/delayed_public_mutable_values.js +7 -10
  133. package/dest/deserialization/index.d.ts +11 -0
  134. package/dest/deserialization/index.d.ts.map +1 -0
  135. package/dest/deserialization/index.js +10 -0
  136. package/dest/epoch-helpers/index.d.ts +7 -1
  137. package/dest/epoch-helpers/index.d.ts.map +1 -1
  138. package/dest/epoch-helpers/index.js +9 -3
  139. package/dest/errors/proving_error.d.ts +2 -2
  140. package/dest/errors/proving_error.d.ts.map +1 -1
  141. package/dest/gas/gas.js +3 -1
  142. package/dest/gas/gas_fees.js +3 -1
  143. package/dest/hash/hash.d.ts +2 -1
  144. package/dest/hash/hash.d.ts.map +1 -1
  145. package/dest/hash/hash.js +8 -2
  146. package/dest/hash/map_slot.d.ts +1 -1
  147. package/dest/hash/map_slot.d.ts.map +1 -1
  148. package/dest/hash/map_slot.js +4 -3
  149. package/dest/interfaces/api_limit.d.ts +3 -1
  150. package/dest/interfaces/api_limit.d.ts.map +1 -1
  151. package/dest/interfaces/api_limit.js +2 -0
  152. package/dest/interfaces/archiver.d.ts +6 -6
  153. package/dest/interfaces/archiver.d.ts.map +1 -1
  154. package/dest/interfaces/archiver.js +22 -17
  155. package/dest/interfaces/aztec-node-admin.d.ts +86 -35
  156. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  157. package/dest/interfaces/aztec-node-admin.js +6 -4
  158. package/dest/interfaces/aztec-node.d.ts +74 -76
  159. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  160. package/dest/interfaces/aztec-node.js +15 -16
  161. package/dest/interfaces/block-builder.d.ts +22 -14
  162. package/dest/interfaces/block-builder.d.ts.map +1 -1
  163. package/dest/interfaces/block-builder.js +7 -0
  164. package/dest/interfaces/configs.d.ts +12 -7
  165. package/dest/interfaces/configs.d.ts.map +1 -1
  166. package/dest/interfaces/configs.js +2 -1
  167. package/dest/interfaces/get_logs_response.d.ts +16 -9
  168. package/dest/interfaces/get_logs_response.d.ts.map +1 -1
  169. package/dest/interfaces/l2_logs_source.d.ts +14 -5
  170. package/dest/interfaces/l2_logs_source.d.ts.map +1 -1
  171. package/dest/interfaces/p2p.d.ts +7 -9
  172. package/dest/interfaces/p2p.d.ts.map +1 -1
  173. package/dest/interfaces/p2p.js +3 -4
  174. package/dest/interfaces/prover-broker.d.ts +16 -1
  175. package/dest/interfaces/prover-broker.d.ts.map +1 -1
  176. package/dest/interfaces/prover-broker.js +4 -1
  177. package/dest/interfaces/prover-client.d.ts +15 -1
  178. package/dest/interfaces/prover-client.d.ts.map +1 -1
  179. package/dest/interfaces/prover-client.js +12 -1
  180. package/dest/interfaces/proving-job.d.ts +52 -52
  181. package/dest/interfaces/proving-job.d.ts.map +1 -1
  182. package/dest/interfaces/proving-job.js +1 -7
  183. package/dest/interfaces/server_circuit_prover.d.ts +4 -3
  184. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  185. package/dest/interfaces/slasher.d.ts +9 -1
  186. package/dest/interfaces/slasher.d.ts.map +1 -1
  187. package/dest/interfaces/slasher.js +2 -0
  188. package/dest/interfaces/tx_provider.d.ts +3 -3
  189. package/dest/interfaces/tx_provider.d.ts.map +1 -1
  190. package/dest/interfaces/validator.d.ts +155 -19
  191. package/dest/interfaces/validator.d.ts.map +1 -1
  192. package/dest/interfaces/validator.js +8 -3
  193. package/dest/interfaces/world_state.d.ts +8 -6
  194. package/dest/interfaces/world_state.d.ts.map +1 -1
  195. package/dest/kernel/claimed_length_array.js +3 -1
  196. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts +6 -5
  197. package/dest/kernel/hints/build_note_hash_read_request_hints.d.ts.map +1 -1
  198. package/dest/kernel/hints/build_note_hash_read_request_hints.js +19 -10
  199. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts +3 -3
  200. package/dest/kernel/hints/build_nullifier_read_request_hints.d.ts.map +1 -1
  201. package/dest/kernel/hints/build_nullifier_read_request_hints.js +16 -8
  202. package/dest/kernel/hints/key_validation_hint.d.ts +2 -1
  203. package/dest/kernel/hints/key_validation_hint.d.ts.map +1 -1
  204. package/dest/kernel/hints/key_validation_request.d.ts +2 -1
  205. package/dest/kernel/hints/key_validation_request.d.ts.map +1 -1
  206. package/dest/kernel/hints/key_validation_request_and_generator.d.ts +6 -1
  207. package/dest/kernel/hints/key_validation_request_and_generator.d.ts.map +1 -1
  208. package/dest/kernel/hints/private_kernel_reset_hints.d.ts +13 -1
  209. package/dest/kernel/hints/private_kernel_reset_hints.d.ts.map +1 -1
  210. package/dest/kernel/hints/read_request.d.ts +7 -1
  211. package/dest/kernel/hints/read_request.d.ts.map +1 -1
  212. package/dest/kernel/hints/read_request_hints.d.ts +7 -1
  213. package/dest/kernel/hints/read_request_hints.d.ts.map +1 -1
  214. package/dest/kernel/hints/transient_data_squashing_hint.js +3 -1
  215. package/dest/kernel/log_hash.js +3 -1
  216. package/dest/kernel/private_accumulated_data.d.ts +23 -1
  217. package/dest/kernel/private_accumulated_data.d.ts.map +1 -1
  218. package/dest/kernel/private_call_data.d.ts +25 -1
  219. package/dest/kernel/private_call_data.d.ts.map +1 -1
  220. package/dest/kernel/private_call_request.d.ts +16 -1
  221. package/dest/kernel/private_call_request.d.ts.map +1 -1
  222. package/dest/kernel/private_circuit_public_inputs.d.ts +74 -1
  223. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  224. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +31 -1
  225. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  226. package/dest/kernel/private_kernel_data.d.ts +7 -1
  227. package/dest/kernel/private_kernel_data.d.ts.map +1 -1
  228. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +22 -1
  229. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  230. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts +7 -1
  231. package/dest/kernel/private_kernel_inner_circuit_private_inputs.d.ts.map +1 -1
  232. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts +4 -1
  233. package/dest/kernel/private_kernel_reset_circuit_private_inputs.d.ts.map +1 -1
  234. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +10 -1
  235. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +1 -1
  236. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts +23 -1
  237. package/dest/kernel/private_kernel_tail_circuit_public_inputs.d.ts.map +1 -1
  238. package/dest/kernel/private_log_data.js +5 -2
  239. package/dest/kernel/private_to_avm_accumulated_data.d.ts +2 -2
  240. package/dest/kernel/private_to_avm_accumulated_data.js +5 -2
  241. package/dest/kernel/private_to_public_accumulated_data.js +3 -1
  242. package/dest/kernel/private_to_rollup_accumulated_data.d.ts +17 -1
  243. package/dest/kernel/private_to_rollup_accumulated_data.d.ts.map +1 -1
  244. package/dest/kernel/private_to_rollup_accumulated_data.js +3 -1
  245. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts +16 -1
  246. package/dest/kernel/private_to_rollup_kernel_circuit_public_inputs.d.ts.map +1 -1
  247. package/dest/kernel/private_validation_requests.d.ts +10 -1
  248. package/dest/kernel/private_validation_requests.d.ts.map +1 -1
  249. package/dest/kernel/private_validation_requests.js +3 -1
  250. package/dest/kernel/public_call_request.d.ts +22 -1
  251. package/dest/kernel/public_call_request.d.ts.map +1 -1
  252. package/dest/kernel/public_call_request.js +5 -2
  253. package/dest/kernel/utils/optional_number.d.ts +7 -1
  254. package/dest/kernel/utils/optional_number.d.ts.map +1 -1
  255. package/dest/keys/derivation.d.ts +3 -3
  256. package/dest/keys/derivation.js +8 -8
  257. package/dest/keys/key_types.d.ts +1 -1
  258. package/dest/keys/public_keys.d.ts +5 -1
  259. package/dest/keys/public_keys.d.ts.map +1 -1
  260. package/dest/keys/utils.d.ts +1 -1
  261. package/dest/keys/utils.d.ts.map +1 -1
  262. package/dest/keys/utils.js +7 -3
  263. package/dest/l1-contracts/slash_factory.d.ts +1 -1
  264. package/dest/l1-contracts/slash_factory.d.ts.map +1 -1
  265. package/dest/l1-contracts/slash_factory.js +1 -0
  266. package/dest/logs/contract_class_log.js +3 -1
  267. package/dest/logs/extended_contract_class_log.d.ts +3 -1
  268. package/dest/logs/extended_contract_class_log.d.ts.map +1 -1
  269. package/dest/logs/extended_public_log.d.ts +17 -9
  270. package/dest/logs/extended_public_log.d.ts.map +1 -1
  271. package/dest/logs/index.d.ts +1 -2
  272. package/dest/logs/index.d.ts.map +1 -1
  273. package/dest/logs/index.js +0 -1
  274. package/dest/logs/log_id.d.ts +21 -14
  275. package/dest/logs/log_id.d.ts.map +1 -1
  276. package/dest/logs/log_id.js +20 -17
  277. package/dest/logs/private_log.js +3 -1
  278. package/dest/logs/public_log.js +3 -1
  279. package/dest/logs/siloed_tag.d.ts +1 -1
  280. package/dest/logs/siloed_tag.d.ts.map +1 -1
  281. package/dest/logs/siloed_tag.js +2 -5
  282. package/dest/logs/tx_scoped_l2_log.d.ts +18 -39
  283. package/dest/logs/tx_scoped_l2_log.d.ts.map +1 -1
  284. package/dest/logs/tx_scoped_l2_log.js +29 -50
  285. package/dest/messaging/in_hash.d.ts +4 -2
  286. package/dest/messaging/in_hash.d.ts.map +1 -1
  287. package/dest/messaging/in_hash.js +3 -1
  288. package/dest/messaging/inbox_leaf.d.ts +3 -1
  289. package/dest/messaging/inbox_leaf.d.ts.map +1 -1
  290. package/dest/messaging/l1_actor.d.ts +7 -1
  291. package/dest/messaging/l1_actor.d.ts.map +1 -1
  292. package/dest/messaging/l1_to_l2_message.d.ts +6 -1
  293. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  294. package/dest/messaging/l2_actor.d.ts +7 -1
  295. package/dest/messaging/l2_actor.d.ts.map +1 -1
  296. package/dest/messaging/l2_to_l1_membership.d.ts +88 -6
  297. package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
  298. package/dest/messaging/l2_to_l1_membership.js +160 -42
  299. package/dest/messaging/out_hash.d.ts +41 -3
  300. package/dest/messaging/out_hash.d.ts.map +1 -1
  301. package/dest/messaging/out_hash.js +54 -19
  302. package/dest/note/note_dao.d.ts +36 -5
  303. package/dest/note/note_dao.d.ts.map +1 -1
  304. package/dest/note/note_dao.js +15 -12
  305. package/dest/note/notes_filter.d.ts +5 -2
  306. package/dest/note/notes_filter.d.ts.map +1 -1
  307. package/dest/p2p/attestation_utils.d.ts +3 -3
  308. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  309. package/dest/p2p/attestation_utils.js +1 -1
  310. package/dest/p2p/block_proposal.d.ts +102 -23
  311. package/dest/p2p/block_proposal.d.ts.map +1 -1
  312. package/dest/p2p/block_proposal.js +140 -39
  313. package/dest/p2p/checkpoint_attestation.d.ts +81 -0
  314. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -0
  315. package/dest/p2p/{block_attestation.js → checkpoint_attestation.js} +22 -19
  316. package/dest/p2p/checkpoint_proposal.d.ts +174 -0
  317. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -0
  318. package/dest/p2p/checkpoint_proposal.js +238 -0
  319. package/dest/p2p/consensus_payload.d.ts +9 -9
  320. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  321. package/dest/p2p/consensus_payload.js +3 -5
  322. package/dest/p2p/constants.d.ts +5 -0
  323. package/dest/p2p/constants.d.ts.map +1 -0
  324. package/dest/p2p/constants.js +3 -0
  325. package/dest/p2p/gossipable.d.ts +4 -3
  326. package/dest/p2p/gossipable.d.ts.map +1 -1
  327. package/dest/p2p/gossipable.js +16 -5
  328. package/dest/p2p/index.d.ts +5 -2
  329. package/dest/p2p/index.d.ts.map +1 -1
  330. package/dest/p2p/index.js +4 -1
  331. package/dest/p2p/message_validator.d.ts +18 -3
  332. package/dest/p2p/message_validator.d.ts.map +1 -1
  333. package/dest/p2p/message_validator.js +2 -1
  334. package/dest/p2p/signature_utils.d.ts +5 -3
  335. package/dest/p2p/signature_utils.d.ts.map +1 -1
  336. package/dest/p2p/signature_utils.js +3 -1
  337. package/dest/p2p/signed_txs.d.ts +42 -0
  338. package/dest/p2p/signed_txs.d.ts.map +1 -0
  339. package/dest/p2p/signed_txs.js +75 -0
  340. package/dest/p2p/topic_type.d.ts +3 -2
  341. package/dest/p2p/topic_type.d.ts.map +1 -1
  342. package/dest/p2p/topic_type.js +10 -3
  343. package/dest/parity/parity_base_private_inputs.d.ts +3 -1
  344. package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
  345. package/dest/parity/parity_public_inputs.d.ts +4 -1
  346. package/dest/parity/parity_public_inputs.d.ts.map +1 -1
  347. package/dest/parity/parity_root_private_inputs.d.ts +2 -1
  348. package/dest/parity/parity_root_private_inputs.d.ts.map +1 -1
  349. package/dest/proofs/chonk_proof.d.ts +1 -1
  350. package/dest/proofs/chonk_proof.d.ts.map +1 -1
  351. package/dest/proofs/chonk_proof.js +9 -4
  352. package/dest/proofs/proof.d.ts +4 -1
  353. package/dest/proofs/proof.d.ts.map +1 -1
  354. package/dest/proofs/recursive_proof.d.ts +10 -1
  355. package/dest/proofs/recursive_proof.d.ts.map +1 -1
  356. package/dest/rollup/base_rollup_hints.d.ts +34 -1
  357. package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
  358. package/dest/rollup/block_constant_data.d.ts +12 -1
  359. package/dest/rollup/block_constant_data.d.ts.map +1 -1
  360. package/dest/rollup/block_headers_hash.js +1 -1
  361. package/dest/rollup/block_merge_rollup_private_inputs.d.ts +4 -1
  362. package/dest/rollup/block_merge_rollup_private_inputs.d.ts.map +1 -1
  363. package/dest/rollup/block_rollup_public_inputs.d.ts +47 -11
  364. package/dest/rollup/block_rollup_public_inputs.d.ts.map +1 -1
  365. package/dest/rollup/block_rollup_public_inputs.js +8 -12
  366. package/dest/rollup/block_root_rollup_private_inputs.d.ts +64 -1
  367. package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
  368. package/dest/rollup/checkpoint_constant_data.d.ts +10 -1
  369. package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
  370. package/dest/rollup/checkpoint_constant_data.js +3 -1
  371. package/dest/rollup/checkpoint_header.d.ts +42 -12
  372. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  373. package/dest/rollup/checkpoint_header.js +49 -19
  374. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts +4 -1
  375. package/dest/rollup/checkpoint_merge_rollup_private_inputs.d.ts.map +1 -1
  376. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts +46 -6
  377. package/dest/rollup/checkpoint_rollup_public_inputs.d.ts.map +1 -1
  378. package/dest/rollup/checkpoint_rollup_public_inputs.js +11 -3
  379. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts +44 -3
  380. package/dest/rollup/checkpoint_root_rollup_private_inputs.d.ts.map +1 -1
  381. package/dest/rollup/checkpoint_root_rollup_private_inputs.js +13 -2
  382. package/dest/rollup/epoch_constant_data.d.ts +16 -1
  383. package/dest/rollup/epoch_constant_data.d.ts.map +1 -1
  384. package/dest/rollup/root_rollup_private_inputs.d.ts +6 -1
  385. package/dest/rollup/root_rollup_private_inputs.d.ts.map +1 -1
  386. package/dest/rollup/root_rollup_public_inputs.d.ts +21 -6
  387. package/dest/rollup/root_rollup_public_inputs.d.ts.map +1 -1
  388. package/dest/rollup/root_rollup_public_inputs.js +10 -4
  389. package/dest/rollup/tree_snapshot_diff_hints.d.ts +24 -1
  390. package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -1
  391. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts +4 -1
  392. package/dest/rollup/tx_merge_rollup_private_inputs.d.ts.map +1 -1
  393. package/dest/rollup/tx_rollup_public_inputs.d.ts +29 -1
  394. package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
  395. package/dest/schemas/schemas.d.ts +1 -1
  396. package/dest/slashing/empire.d.ts +1 -1
  397. package/dest/slashing/empire.d.ts.map +1 -1
  398. package/dest/slashing/empire.js +2 -0
  399. package/dest/slashing/helpers.d.ts +2 -2
  400. package/dest/slashing/helpers.d.ts.map +1 -1
  401. package/dest/slashing/helpers.js +6 -0
  402. package/dest/slashing/tally.d.ts +2 -1
  403. package/dest/slashing/tally.d.ts.map +1 -1
  404. package/dest/slashing/tally.js +6 -2
  405. package/dest/slashing/types.d.ts +7 -3
  406. package/dest/slashing/types.d.ts.map +1 -1
  407. package/dest/slashing/types.js +13 -1
  408. package/dest/stats/stats.d.ts +1 -3
  409. package/dest/stats/stats.d.ts.map +1 -1
  410. package/dest/tests/factories.d.ts +39 -10
  411. package/dest/tests/factories.d.ts.map +1 -1
  412. package/dest/tests/factories.js +81 -26
  413. package/dest/tests/jest.js +1 -1
  414. package/dest/tests/mocks.d.ts +74 -19
  415. package/dest/tests/mocks.d.ts.map +1 -1
  416. package/dest/tests/mocks.js +123 -57
  417. package/dest/timetable/index.d.ts +37 -0
  418. package/dest/timetable/index.d.ts.map +1 -0
  419. package/dest/timetable/index.js +39 -0
  420. package/dest/trees/append_only_tree_snapshot.d.ts +13 -1
  421. package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
  422. package/dest/trees/append_only_tree_snapshot.js +3 -1
  423. package/dest/trees/nullifier_leaf.d.ts +13 -1
  424. package/dest/trees/nullifier_leaf.d.ts.map +1 -1
  425. package/dest/trees/nullifier_membership_witness.d.ts +10 -1
  426. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  427. package/dest/trees/public_data_leaf.d.ts +17 -1
  428. package/dest/trees/public_data_leaf.d.ts.map +1 -1
  429. package/dest/trees/public_data_leaf.js +7 -6
  430. package/dest/trees/public_data_witness.d.ts +11 -1
  431. package/dest/trees/public_data_witness.d.ts.map +1 -1
  432. package/dest/tx/block_header.d.ts +14 -2
  433. package/dest/tx/block_header.d.ts.map +1 -1
  434. package/dest/tx/block_header.js +8 -2
  435. package/dest/tx/call_context.d.ts +13 -1
  436. package/dest/tx/call_context.d.ts.map +1 -1
  437. package/dest/tx/call_context.js +3 -1
  438. package/dest/tx/capsule.d.ts +4 -1
  439. package/dest/tx/capsule.d.ts.map +1 -1
  440. package/dest/tx/execution_payload.d.ts +9 -1
  441. package/dest/tx/execution_payload.d.ts.map +1 -1
  442. package/dest/tx/function_data.d.ts +4 -2
  443. package/dest/tx/function_data.d.ts.map +1 -1
  444. package/dest/tx/global_variable_builder.d.ts +2 -2
  445. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  446. package/dest/tx/global_variables.d.ts +9 -1
  447. package/dest/tx/global_variables.d.ts.map +1 -1
  448. package/dest/tx/global_variables.js +3 -1
  449. package/dest/tx/hashed_values.d.ts +7 -1
  450. package/dest/tx/hashed_values.d.ts.map +1 -1
  451. package/dest/tx/in_tx.d.ts +4 -4
  452. package/dest/tx/index.d.ts +1 -2
  453. package/dest/tx/index.d.ts.map +1 -1
  454. package/dest/tx/index.js +0 -1
  455. package/dest/tx/indexed_tx_effect.d.ts +5 -5
  456. package/dest/tx/indexed_tx_effect.d.ts.map +1 -1
  457. package/dest/tx/indexed_tx_effect.js +3 -2
  458. package/dest/tx/partial_state_reference.d.ts +4 -1
  459. package/dest/tx/partial_state_reference.d.ts.map +1 -1
  460. package/dest/tx/private_execution_result.d.ts +23 -6
  461. package/dest/tx/private_execution_result.d.ts.map +1 -1
  462. package/dest/tx/private_execution_result.js +4 -21
  463. package/dest/tx/private_tx_constant_data.d.ts +16 -1
  464. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  465. package/dest/tx/profiling.d.ts +149 -26
  466. package/dest/tx/profiling.d.ts.map +1 -1
  467. package/dest/tx/profiling.js +44 -7
  468. package/dest/tx/protocol_contracts.d.ts +1 -1
  469. package/dest/tx/public_call_request_with_calldata.d.ts +7 -1
  470. package/dest/tx/public_call_request_with_calldata.d.ts.map +1 -1
  471. package/dest/tx/public_call_request_with_calldata.js +3 -1
  472. package/dest/tx/state_reference.d.ts +3 -1
  473. package/dest/tx/state_reference.d.ts.map +1 -1
  474. package/dest/tx/state_reference.js +3 -1
  475. package/dest/tx/tree_snapshots.js +3 -1
  476. package/dest/tx/tx.d.ts +33 -3
  477. package/dest/tx/tx.d.ts.map +1 -1
  478. package/dest/tx/tx.js +18 -6
  479. package/dest/tx/tx_context.d.ts +2 -1
  480. package/dest/tx/tx_context.d.ts.map +1 -1
  481. package/dest/tx/tx_effect.d.ts +32 -6
  482. package/dest/tx/tx_effect.d.ts.map +1 -1
  483. package/dest/tx/tx_effect.js +6 -9
  484. package/dest/tx/tx_execution_request.d.ts +30 -1
  485. package/dest/tx/tx_execution_request.d.ts.map +1 -1
  486. package/dest/tx/tx_execution_request.js +6 -2
  487. package/dest/tx/tx_hash.d.ts +2 -1
  488. package/dest/tx/tx_hash.d.ts.map +1 -1
  489. package/dest/tx/tx_receipt.d.ts +47 -13
  490. package/dest/tx/tx_receipt.d.ts.map +1 -1
  491. package/dest/tx/tx_receipt.js +46 -15
  492. package/dest/tx/tx_request.d.ts +6 -1
  493. package/dest/tx/tx_request.d.ts.map +1 -1
  494. package/dest/tx/validator/empty_validator.d.ts +2 -2
  495. package/dest/tx/validator/empty_validator.d.ts.map +1 -1
  496. package/dest/tx/validator/error_texts.d.ts +2 -1
  497. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  498. package/dest/tx/validator/error_texts.js +2 -0
  499. package/dest/tx/validator/tx_validator.d.ts +2 -2
  500. package/dest/tx/validator/tx_validator.d.ts.map +1 -1
  501. package/dest/types/shared.d.ts +4 -1
  502. package/dest/types/shared.d.ts.map +1 -1
  503. package/dest/validators/schemas.d.ts +38 -38
  504. package/dest/validators/schemas.d.ts.map +1 -1
  505. package/dest/validators/schemas.js +4 -3
  506. package/dest/validators/types.d.ts +3 -3
  507. package/dest/validators/types.d.ts.map +1 -1
  508. package/dest/vks/verification_key.d.ts +22 -1
  509. package/dest/vks/verification_key.d.ts.map +1 -1
  510. package/dest/vks/vk_data.d.ts +7 -1
  511. package/dest/vks/vk_data.d.ts.map +1 -1
  512. package/dest/zkpassport/index.d.ts +3 -4
  513. package/dest/zkpassport/index.d.ts.map +1 -1
  514. package/dest/zkpassport/index.js +9 -9
  515. package/package.json +27 -13
  516. package/src/abi/contract_artifact.ts +10 -10
  517. package/src/abi/function_call.ts +25 -3
  518. package/src/abi/utils.ts +17 -0
  519. package/src/block/attestation_info.ts +9 -6
  520. package/src/block/block_hash.ts +26 -25
  521. package/src/block/block_parameter.ts +4 -2
  522. package/src/block/body.ts +2 -1
  523. package/src/block/checkpointed_l2_block.ts +8 -58
  524. package/src/block/in_block.ts +6 -6
  525. package/src/block/index.ts +0 -2
  526. package/src/block/l2_block.ts +102 -149
  527. package/src/block/l2_block_source.ts +123 -44
  528. package/src/block/l2_block_stream/index.ts +1 -0
  529. package/src/block/l2_block_stream/interfaces.ts +15 -4
  530. package/src/block/l2_block_stream/l2_block_stream.ts +130 -39
  531. package/src/block/l2_block_stream/l2_tips_memory_store.ts +62 -56
  532. package/src/block/l2_block_stream/l2_tips_store_base.ts +226 -0
  533. package/src/block/test/l2_tips_store_test_suite.ts +480 -36
  534. package/src/block/validate_block_result.ts +40 -35
  535. package/src/checkpoint/checkpoint.ts +34 -11
  536. package/src/checkpoint/checkpoint_info.ts +45 -2
  537. package/src/checkpoint/index.ts +1 -0
  538. package/src/checkpoint/published_checkpoint.ts +4 -3
  539. package/src/config/index.ts +1 -0
  540. package/src/config/node-rpc-config.ts +1 -1
  541. package/src/config/sequencer-config.ts +19 -0
  542. package/src/contract/contract_address.ts +1 -1
  543. package/src/contract/contract_class_id.ts +1 -1
  544. package/src/contract/index.ts +0 -2
  545. package/src/contract/interfaces/node-info.ts +3 -0
  546. package/src/contract/private_function.ts +2 -3
  547. package/src/contract/private_function_membership_proof.ts +1 -1
  548. package/src/database-version/database_version.ts +87 -0
  549. package/src/database-version/version_manager.ts +1 -77
  550. package/src/delayed_public_mutable/delayed_public_mutable_values.ts +9 -10
  551. package/src/deserialization/index.ts +21 -0
  552. package/src/epoch-helpers/index.ts +13 -1
  553. package/src/hash/hash.ts +6 -2
  554. package/src/hash/map_slot.ts +3 -2
  555. package/src/interfaces/api_limit.ts +2 -0
  556. package/src/interfaces/archiver.ts +26 -24
  557. package/src/interfaces/aztec-node-admin.ts +10 -6
  558. package/src/interfaces/aztec-node.ts +109 -128
  559. package/src/interfaces/block-builder.ts +40 -23
  560. package/src/interfaces/configs.ts +3 -0
  561. package/src/interfaces/l2_logs_source.ts +17 -4
  562. package/src/interfaces/p2p.ts +8 -12
  563. package/src/interfaces/prover-broker.ts +22 -0
  564. package/src/interfaces/prover-client.ts +22 -0
  565. package/src/interfaces/proving-job.ts +2 -11
  566. package/src/interfaces/server_circuit_prover.ts +3 -2
  567. package/src/interfaces/slasher.ts +4 -0
  568. package/src/interfaces/tx_provider.ts +2 -2
  569. package/src/interfaces/validator.ts +72 -15
  570. package/src/interfaces/world_state.ts +9 -7
  571. package/src/kernel/hints/build_note_hash_read_request_hints.ts +20 -12
  572. package/src/kernel/hints/build_nullifier_read_request_hints.ts +17 -14
  573. package/src/keys/derivation.ts +8 -8
  574. package/src/keys/key_types.ts +1 -1
  575. package/src/keys/utils.ts +7 -3
  576. package/src/l1-contracts/slash_factory.ts +1 -0
  577. package/src/logs/index.ts +0 -1
  578. package/src/logs/log_id.ts +22 -18
  579. package/src/logs/siloed_tag.ts +2 -2
  580. package/src/logs/tx_scoped_l2_log.ts +37 -53
  581. package/src/messaging/in_hash.ts +3 -1
  582. package/src/messaging/l2_to_l1_membership.ts +178 -52
  583. package/src/messaging/out_hash.ts +62 -21
  584. package/src/note/note_dao.ts +18 -13
  585. package/src/note/notes_filter.ts +4 -1
  586. package/src/p2p/attestation_utils.ts +3 -3
  587. package/src/p2p/block_proposal.ts +213 -46
  588. package/src/p2p/{block_attestation.ts → checkpoint_attestation.ts} +31 -25
  589. package/src/p2p/checkpoint_proposal.ts +365 -0
  590. package/src/p2p/consensus_payload.ts +5 -7
  591. package/src/p2p/constants.ts +6 -0
  592. package/src/p2p/gossipable.ts +14 -4
  593. package/src/p2p/index.ts +4 -1
  594. package/src/p2p/message_validator.ts +14 -2
  595. package/src/p2p/signature_utils.ts +3 -1
  596. package/src/p2p/signed_txs.ts +88 -0
  597. package/src/p2p/topic_type.ts +4 -3
  598. package/src/proofs/chonk_proof.ts +9 -5
  599. package/src/rollup/block_headers_hash.ts +1 -1
  600. package/src/rollup/block_rollup_public_inputs.ts +5 -11
  601. package/src/rollup/checkpoint_header.ts +63 -20
  602. package/src/rollup/checkpoint_rollup_public_inputs.ts +17 -5
  603. package/src/rollup/checkpoint_root_rollup_private_inputs.ts +14 -1
  604. package/src/rollup/root_rollup_public_inputs.ts +16 -7
  605. package/src/slashing/empire.ts +3 -1
  606. package/src/slashing/helpers.ts +8 -0
  607. package/src/slashing/tally.ts +8 -2
  608. package/src/slashing/types.ts +14 -0
  609. package/src/stats/stats.ts +0 -2
  610. package/src/tests/factories.ts +103 -42
  611. package/src/tests/jest.ts +1 -1
  612. package/src/tests/mocks.ts +213 -91
  613. package/src/timetable/index.ts +66 -0
  614. package/src/trees/public_data_leaf.ts +11 -5
  615. package/src/tx/block_header.ts +11 -3
  616. package/src/tx/global_variable_builder.ts +1 -1
  617. package/src/tx/index.ts +0 -1
  618. package/src/tx/indexed_tx_effect.ts +3 -2
  619. package/src/tx/private_execution_result.ts +1 -16
  620. package/src/tx/profiling.ts +46 -4
  621. package/src/tx/tx.ts +19 -11
  622. package/src/tx/tx_effect.ts +3 -10
  623. package/src/tx/tx_execution_request.ts +2 -0
  624. package/src/tx/tx_receipt.ts +75 -18
  625. package/src/tx/validator/empty_validator.ts +1 -1
  626. package/src/tx/validator/error_texts.ts +3 -0
  627. package/src/tx/validator/tx_validator.ts +1 -1
  628. package/src/validators/schemas.ts +8 -1
  629. package/src/validators/types.ts +5 -4
  630. package/src/zkpassport/index.ts +11 -12
  631. package/dest/block/l2_block_code_to_purge.d.ts +0 -12
  632. package/dest/block/l2_block_code_to_purge.d.ts.map +0 -1
  633. package/dest/block/l2_block_code_to_purge.js +0 -61
  634. package/dest/block/l2_block_header.d.ts +0 -98
  635. package/dest/block/l2_block_header.d.ts.map +0 -1
  636. package/dest/block/l2_block_header.js +0 -153
  637. package/dest/block/l2_block_new.d.ts +0 -135
  638. package/dest/block/l2_block_new.d.ts.map +0 -1
  639. package/dest/block/l2_block_new.js +0 -152
  640. package/dest/contract/contract_class_metadata.d.ts +0 -8
  641. package/dest/contract/contract_class_metadata.d.ts.map +0 -1
  642. package/dest/contract/contract_class_metadata.js +0 -1
  643. package/dest/contract/contract_metadata.d.ts +0 -7
  644. package/dest/contract/contract_metadata.d.ts.map +0 -1
  645. package/dest/contract/contract_metadata.js +0 -1
  646. package/dest/database-version/index.d.ts +0 -2
  647. package/dest/database-version/index.d.ts.map +0 -1
  648. package/dest/database-version/index.js +0 -1
  649. package/dest/logs/log_with_tx_data.d.ts +0 -19
  650. package/dest/logs/log_with_tx_data.d.ts.map +0 -1
  651. package/dest/logs/log_with_tx_data.js +0 -49
  652. package/dest/p2p/block_attestation.d.ts +0 -80
  653. package/dest/p2p/block_attestation.d.ts.map +0 -1
  654. package/dest/tx/content_commitment.d.ts +0 -49
  655. package/dest/tx/content_commitment.d.ts.map +0 -1
  656. package/dest/tx/content_commitment.js +0 -90
  657. package/src/block/l2_block_code_to_purge.ts +0 -88
  658. package/src/block/l2_block_header.ts +0 -246
  659. package/src/block/l2_block_new.ts +0 -207
  660. package/src/contract/contract_class_metadata.ts +0 -8
  661. package/src/contract/contract_metadata.ts +0 -7
  662. package/src/database-version/index.ts +0 -1
  663. package/src/logs/log_with_tx_data.ts +0 -46
  664. package/src/tx/content_commitment.ts +0 -113
@@ -1,36 +1,77 @@
1
+ import { OUT_HASH_TREE_LEAF_COUNT } from '@aztec/constants';
2
+ import { padArrayEnd } from '@aztec/foundation/collection';
1
3
  import { Fr } from '@aztec/foundation/curves/bn254';
2
- import { UnbalancedMerkleTreeCalculator, computeUnbalancedShaRoot } from '@aztec/foundation/trees';
4
+ import { computeBalancedShaRoot, computeUnbalancedShaRoot, computeWonkyShaRoot } from '@aztec/foundation/trees';
3
5
 
6
+ /**
7
+ * Computes the out hash of a tx. It's the root of the unbalanced tree of all the L2-to-L1 messages emitted by the tx.
8
+ * @param messages - The L2-to-L1 messages emitted by the tx.
9
+ * @returns The out hash of the tx.
10
+ */
4
11
  export function computeTxOutHash(messages: Fr[]): Fr {
12
+ // Must match the implementation in `tx_base_public_inputs_composer.nr > compute_kernel_out_hash()`
5
13
  if (!messages.length) {
6
14
  return Fr.ZERO;
7
15
  }
8
- // Tx out hash is the root of the unbalanced merkle tree of all the messages.
9
- // Zero hashes (which should not happen) are not compressed.
16
+ // It's an unbalanced tree because zero hashes (which should not happen) will be included.
10
17
  return Fr.fromBuffer(computeUnbalancedShaRoot(messages.map(msg => msg.toBuffer())));
11
18
  }
12
19
 
13
- export function computeBlockOutHash(messagesPerBlock: Fr[][]): Fr {
14
- const txOutHashes = messagesPerBlock.map(messages => computeTxOutHash(messages));
15
- return aggregateOutHashes(txOutHashes);
20
+ /**
21
+ * Computes the out hash of a block. It's the root of the wonky tree of all the tx out hashes.
22
+ * @param messagesPerTx - The L2-to-L1 messages emitted by the txs in the block. This is an array of message arrays.
23
+ * The array at index 0 contains the messages emitted by the first tx, the array at index 1 contains the messages
24
+ * emitted by the second tx, and so on.
25
+ * @returns The out hash of the block.
26
+ */
27
+ export function computeBlockOutHash(messagesPerTx: Fr[][]): Fr {
28
+ // See how the tx out hashes are aggregated into a block out hash in `merge_tx_rollups.nr > accumulate_out_hash()`.
29
+ const txOutHashes = messagesPerTx.map(messages => computeTxOutHash(messages));
30
+ return Fr.fromBuffer(computeWonkyShaRoot(txOutHashes.map(hash => hash.toBuffer())));
16
31
  }
17
32
 
18
- export function computeCheckpointOutHash(messagesForAllTxs: Fr[][][]): Fr {
19
- const blockOutHashes = messagesForAllTxs.map(block => computeBlockOutHash(block));
20
- return aggregateOutHashes(blockOutHashes);
33
+ /**
34
+ * Computes the out hash of a checkpoint. It's the root of the wonky tree of all the block out hashes.
35
+ * @param messagesPerBlock - The L2-to-L1 messages emitted by the txs in the blocks in the checkpoint. This is an array
36
+ * of arrays of messages. The array at index 0 contains the arrays of messages emitted by the first block, the array at
37
+ * index 1 contains the arrays of messages emitted by the second block, and so on.
38
+ * @returns The out hash of the checkpoint.
39
+ */
40
+ export function computeCheckpointOutHash(messagesPerBlock: Fr[][][]): Fr {
41
+ // See how the block out hashes are aggregated into a checkpoint out hash in `merge_block_rollups.nr > accumulate_out_hash()`.
42
+ const blockOutHashes = messagesPerBlock.map(block => computeBlockOutHash(block));
43
+ return Fr.fromBuffer(computeWonkyShaRoot(blockOutHashes.map(hash => hash.toBuffer())));
21
44
  }
22
45
 
23
- // The root of this tree should match the `out_hash` calculated in the circuits. Zero hashes are compressed to reduce
24
- // cost if the non-zero leaves result in a shorter path.
25
- function aggregateOutHashes(outHashes: Fr[]): Fr {
26
- if (!outHashes.length) {
27
- return Fr.ZERO;
28
- }
29
-
30
- const valueToCompress = Buffer.alloc(32);
31
- const tree = UnbalancedMerkleTreeCalculator.create(
32
- outHashes.map(hash => hash.toBuffer()),
33
- valueToCompress,
46
+ /**
47
+ * Computes the accumulated (epoch) out hash of a checkpoint. It's the root of the balanced tree of all the out hashes
48
+ * from the first checkpoint in an epoch to the current checkpoint.
49
+ * It's this value that's set to the checkpoint header and validated on L1 instead of the checkpoint out hash.
50
+ * @param checkpointOutHashes - The out hashes of all checkpoints in the epoch.
51
+ * @returns The accumulated (epoch) out hash.
52
+ */
53
+ export function accumulateCheckpointOutHashes(checkpointOutHashes: Fr[]): Fr {
54
+ // See how the checkpoint out hashes are accumulated in `checkpoint_rollup_public_inputs_composer.nr > accumulate_checkpoint_out_hash()`.
55
+ const paddedOutHashes = padArrayEnd(
56
+ checkpointOutHashes.map(hash => hash.toBuffer()),
57
+ Buffer.alloc(32),
58
+ OUT_HASH_TREE_LEAF_COUNT,
34
59
  );
35
- return Fr.fromBuffer(tree.getRoot());
60
+ return Fr.fromBuffer(computeBalancedShaRoot(paddedOutHashes));
61
+ }
62
+
63
+ /**
64
+ * Computes the epoch out hash. It's the root of the balanced tree of all the checkpoint out hashes.
65
+ * It should match the **accumulated** out hash of the last checkpoint in the epoch.
66
+ * This value will be inserted into the Outbox on L1.
67
+ * @param messagesPerCheckpoint - The L2-to-L1 messages emitted by the txs in the blocks in the checkpoints in the epoch.
68
+ * This is an array of arrays of arrays of messages. The array at index 0 contains the arrays of arrays of messages
69
+ * emitted by the first checkpoint, the array at index 1 contains the arrays of arrays of messages emitted by the second
70
+ * checkpoint, and so on.
71
+ * @returns The epoch out hash.
72
+ */
73
+ export function computeEpochOutHash(messagesPerCheckpoint: Fr[][][][]): Fr {
74
+ // See how the accumulated out hash is assigned to the root rollup's public inputs in `root_rollup.nr`.
75
+ const checkpointOutHashes = messagesPerCheckpoint.map(checkpoint => computeCheckpointOutHash(checkpoint));
76
+ return accumulateCheckpointOutHashes(checkpointOutHashes);
36
77
  }
@@ -1,4 +1,3 @@
1
- import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
2
1
  import { BlockNumber } from '@aztec/foundation/branded-types';
3
2
  import { Fr } from '@aztec/foundation/curves/bn254';
4
3
  import { Point } from '@aztec/foundation/curves/grumpkin';
@@ -56,8 +55,10 @@ export class NoteDao {
56
55
  /** The L2 block hash in which the tx with this note was included. Used for note management while processing
57
56
  * reorgs.*/
58
57
  public l2BlockHash: string,
59
- /** The index of the leaf in the global note hash tree the note is stored at */
60
- public index: bigint,
58
+ /** The index of the tx within the block, used for ordering notes. */
59
+ public txIndexInBlock: number,
60
+ /** The index of the note within the tx (based on note hash position), used for ordering notes. */
61
+ public noteIndexInTx: number,
61
62
  ) {}
62
63
 
63
64
  toBuffer(): Buffer {
@@ -73,7 +74,8 @@ export class NoteDao {
73
74
  this.txHash,
74
75
  this.l2BlockNumber,
75
76
  Fr.fromHexString(this.l2BlockHash),
76
- this.index,
77
+ this.txIndexInBlock,
78
+ this.noteIndexInTx,
77
79
  ]);
78
80
  }
79
81
 
@@ -91,7 +93,8 @@ export class NoteDao {
91
93
  const txHash = reader.readObject(TxHash);
92
94
  const l2BlockNumber = BlockNumber(reader.readNumber());
93
95
  const l2BlockHash = Fr.fromBuffer(reader).toString();
94
- const index = toBigIntBE(reader.readBytes(32));
96
+ const txIndexInBlock = reader.readNumber();
97
+ const noteIndexInTx = reader.readNumber();
95
98
 
96
99
  return new NoteDao(
97
100
  note,
@@ -105,7 +108,8 @@ export class NoteDao {
105
108
  txHash,
106
109
  l2BlockNumber,
107
110
  l2BlockHash,
108
- index,
111
+ txIndexInBlock,
112
+ noteIndexInTx,
109
113
  );
110
114
  }
111
115
 
@@ -134,7 +138,8 @@ export class NoteDao {
134
138
  this.txHash.equals(other.txHash) &&
135
139
  this.l2BlockNumber === other.l2BlockNumber &&
136
140
  this.l2BlockHash === other.l2BlockHash &&
137
- this.index === other.index
141
+ this.txIndexInBlock === other.txIndexInBlock &&
142
+ this.noteIndexInTx === other.noteIndexInTx
138
143
  );
139
144
  }
140
145
 
@@ -143,11 +148,9 @@ export class NoteDao {
143
148
  * @returns - Its size in bytes.
144
149
  */
145
150
  public getSize() {
146
- const indexSize = Math.ceil(Math.log2(Number(this.index)));
147
151
  const noteSize = 4 + this.note.items.length * Fr.SIZE_IN_BYTES;
148
- return (
149
- noteSize + AztecAddress.SIZE_IN_BYTES * 2 + Fr.SIZE_IN_BYTES * 4 + TxHash.SIZE + Point.SIZE_IN_BYTES + indexSize
150
- );
152
+ // 2 numbers for txIndexInBlock and noteIndexInTx (4 bytes each)
153
+ return noteSize + AztecAddress.SIZE_IN_BYTES * 2 + Fr.SIZE_IN_BYTES * 4 + TxHash.SIZE + Point.SIZE_IN_BYTES + 8;
151
154
  }
152
155
 
153
156
  static async random({
@@ -162,7 +165,8 @@ export class NoteDao {
162
165
  txHash = TxHash.random(),
163
166
  l2BlockNumber = BlockNumber(Math.floor(Math.random() * 1000)),
164
167
  l2BlockHash = Fr.random().toString(),
165
- index = Fr.random().toBigInt(),
168
+ txIndexInBlock = Math.floor(Math.random() * 100),
169
+ noteIndexInTx = Math.floor(Math.random() * 100),
166
170
  }: Partial<NoteDao> = {}) {
167
171
  return new NoteDao(
168
172
  note,
@@ -176,7 +180,8 @@ export class NoteDao {
176
180
  txHash,
177
181
  l2BlockNumber,
178
182
  l2BlockHash,
179
- index,
183
+ txIndexInBlock,
184
+ noteIndexInTx,
180
185
  );
181
186
  }
182
187
  }
@@ -24,7 +24,10 @@ export type NotesFilter = {
24
24
  status?: NoteStatus;
25
25
  /** The siloed nullifier for the note. */
26
26
  siloedNullifier?: Fr;
27
- /** The scopes in which to get notes from. This defaults to all scopes. */
27
+ /**
28
+ * The scopes in which to get notes from
29
+ * Undefined scopes means all scopes, while empty list of scopes means no scope at all
30
+ */
28
31
  scopes?: AztecAddress[];
29
32
  };
30
33
 
@@ -1,7 +1,7 @@
1
1
  import type { EthAddress } from '@aztec/foundation/eth-address';
2
2
 
3
3
  import { CommitteeAttestation } from '../block/index.js';
4
- import type { BlockAttestation } from './block_attestation.js';
4
+ import type { CheckpointAttestation } from './checkpoint_attestation.js';
5
5
 
6
6
  /**
7
7
  * Returns attestation signatures in the order of a series of provided ethereum addresses
@@ -9,10 +9,10 @@ import type { BlockAttestation } from './block_attestation.js';
9
9
  * @todo: perform this logic within the memory attestation store instead?
10
10
  */
11
11
  export function orderAttestations(
12
- attestations: BlockAttestation[],
12
+ attestations: CheckpointAttestation[],
13
13
  orderAddresses: EthAddress[],
14
14
  ): CommitteeAttestation[] {
15
- // Create a map of sender addresses to BlockAttestations
15
+ // Create a map of sender addresses to attestations
16
16
  const attestationMap = new Map<string, CommitteeAttestation>();
17
17
 
18
18
  for (const attestation of attestations) {
@@ -1,4 +1,4 @@
1
- import { SlotNumber } from '@aztec/foundation/branded-types';
1
+ import { BlockNumber, IndexWithinCheckpoint, SlotNumber } from '@aztec/foundation/branded-types';
2
2
  import { Buffer32 } from '@aztec/foundation/buffer';
3
3
  import { keccak256 } from '@aztec/foundation/crypto/keccak';
4
4
  import { tryRecoverAddress } from '@aztec/foundation/crypto/secp256k1-signer';
@@ -6,17 +6,21 @@ import { Fr } from '@aztec/foundation/curves/bn254';
6
6
  import type { EthAddress } from '@aztec/foundation/eth-address';
7
7
  import { Signature } from '@aztec/foundation/eth-signature';
8
8
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
9
+ import { DutyType, type SigningContext } from '@aztec/validator-ha-signer/types';
9
10
 
11
+ import type { L2Block } from '../block/l2_block.js';
10
12
  import type { L2BlockInfo } from '../block/l2_block_info.js';
13
+ import { MAX_TXS_PER_BLOCK } from '../deserialization/index.js';
14
+ import { BlockHeader } from '../tx/block_header.js';
11
15
  import { TxHash } from '../tx/index.js';
12
- import { Tx } from '../tx/tx.js';
13
- import { ConsensusPayload } from './consensus_payload.js';
16
+ import type { Tx } from '../tx/tx.js';
14
17
  import { Gossipable } from './gossipable.js';
15
18
  import {
16
19
  SignatureDomainSeparator,
17
20
  getHashedSignaturePayload,
18
21
  getHashedSignaturePayloadEthSignedMessage,
19
22
  } from './signature_utils.js';
23
+ import { SignedTxs } from './signed_txs.js';
20
24
  import { TopicType } from './topic_type.js';
21
25
 
22
26
  export class BlockProposalHash extends Buffer32 {
@@ -26,16 +30,22 @@ export class BlockProposalHash extends Buffer32 {
26
30
  }
27
31
 
28
32
  export type BlockProposalOptions = {
29
- publishFullTxs: boolean;
30
- /** Whether to generate an invalid block proposal for broadcasting. Use only for testing. */
33
+ /**
34
+ * Whether to include the tx objects along with the block proposal.
35
+ * Dramatically increases size of the payload but eliminates failed reexecutions due to missing txs.
36
+ */
37
+ publishFullTxs?: boolean;
38
+ /**
39
+ * Whether to generate an invalid block proposal for broadcasting.
40
+ * Use only for testing.
41
+ */
31
42
  broadcastInvalidBlockProposal?: boolean;
32
43
  };
33
44
 
34
45
  /**
35
- * BlockProposal
36
- *
37
- * A block proposal is created by the leader of the chain proposing a sequence of transactions to
38
- * be included in the head of the chain
46
+ * A block proposal is created by the leader of the chain proposing a sequence of transactions
47
+ * to be included in a block within a checkpoint. This is used for non-last blocks in a slot.
48
+ * The last block is sent as part of a CheckpointProposal.
39
49
  */
40
50
  export class BlockProposal extends Gossipable {
41
51
  static override p2pTopic = TopicType.block_proposal;
@@ -43,18 +53,28 @@ export class BlockProposal extends Gossipable {
43
53
  private sender: EthAddress | undefined;
44
54
 
45
55
  constructor(
46
- /** The payload of the message, and what the signature is over */
47
- public readonly payload: ConsensusPayload,
56
+ /** The per-block header containing block state and global variables */
57
+ public readonly blockHeader: BlockHeader,
48
58
 
49
- /** The signer of the BlockProposal over the header of the new block*/
50
- public readonly signature: Signature,
59
+ // TODO(palla/mbps): Is this really needed? Can we just derive it from the indexWithinCheckpoint of the parent block and the slot number?
60
+ // See the block-proposal-handler, we have a lot of extra validations to check this is correct, so maybe we can avoid storing it here.
61
+ /** Index of this block within the checkpoint (0-indexed) */
62
+ public readonly indexWithinCheckpoint: IndexWithinCheckpoint,
63
+
64
+ /** Hash of L1 to L2 messages for this checkpoint (constant across all blocks in checkpoint) */
65
+ public readonly inHash: Fr,
66
+
67
+ /** Archive root after this block is applied */
68
+ public readonly archiveRoot: Fr,
51
69
 
52
70
  /** The sequence of transactions in the block */
53
71
  public readonly txHashes: TxHash[],
54
72
 
55
- // Note(md): this is placed after the txs payload in order to be backwards compatible with previous versions
56
- /** The transactions in the block */
57
- public readonly txs?: Tx[],
73
+ /** The proposer's signature over the block data */
74
+ public readonly signature: Signature,
75
+
76
+ /** The signed transactions in the block (optional, for DA guarantees) */
77
+ public readonly signedTxs?: SignedTxs,
58
78
  ) {
59
79
  super();
60
80
  }
@@ -64,59 +84,133 @@ export class BlockProposal extends Gossipable {
64
84
  }
65
85
 
66
86
  get archive(): Fr {
67
- return this.payload.archive;
87
+ return this.archiveRoot;
68
88
  }
69
89
 
70
90
  get slotNumber(): SlotNumber {
71
- return this.payload.header.slotNumber;
91
+ return this.blockHeader.getSlot();
92
+ }
93
+
94
+ get blockNumber(): BlockNumber {
95
+ return this.blockHeader.getBlockNumber();
96
+ }
97
+
98
+ /** Convenience getter for txs from signedTxs */
99
+ get txs(): Tx[] | undefined {
100
+ return this.signedTxs?.txs;
72
101
  }
73
102
 
74
103
  toBlockInfo(): Omit<L2BlockInfo, 'blockNumber'> {
75
104
  return {
76
105
  slotNumber: this.slotNumber,
77
- lastArchive: this.payload.header.lastArchiveRoot,
78
- timestamp: this.payload.header.timestamp,
79
- archive: this.archive,
106
+ lastArchive: this.blockHeader.lastArchive.root,
107
+ timestamp: this.blockHeader.globalVariables.timestamp,
108
+ archive: this.archiveRoot,
80
109
  txCount: this.txHashes.length,
81
110
  };
82
111
  }
83
112
 
113
+ /**
114
+ * Get the payload to sign for this block proposal.
115
+ * The signature is over: blockHeader + indexWithinCheckpoint + inHash + archiveRoot + txHashes
116
+ */
117
+ getPayloadToSign(domainSeparator: SignatureDomainSeparator): Buffer {
118
+ return serializeToBuffer([
119
+ domainSeparator,
120
+ this.blockHeader,
121
+ this.indexWithinCheckpoint,
122
+ this.inHash,
123
+ this.archiveRoot,
124
+ this.txHashes.length,
125
+ this.txHashes,
126
+ ]);
127
+ }
128
+
84
129
  static async createProposalFromSigner(
85
- payload: ConsensusPayload,
130
+ blockHeader: BlockHeader,
131
+ indexWithinCheckpoint: IndexWithinCheckpoint,
132
+ inHash: Fr,
133
+ archiveRoot: Fr,
86
134
  txHashes: TxHash[],
87
- // Note(md): Provided separately to tx hashes such that this function can be optional
88
135
  txs: Tx[] | undefined,
89
- payloadSigner: (payload: Buffer32) => Promise<Signature>,
90
- ) {
91
- const hashed = getHashedSignaturePayload(payload, SignatureDomainSeparator.blockProposal);
92
- const sig = await payloadSigner(hashed);
136
+ payloadSigner: (payload: Buffer32, context: SigningContext) => Promise<Signature>,
137
+ ): Promise<BlockProposal> {
138
+ // Create a temporary proposal to get the payload to sign
139
+ const tempProposal = new BlockProposal(
140
+ blockHeader,
141
+ indexWithinCheckpoint,
142
+ inHash,
143
+ archiveRoot,
144
+ txHashes,
145
+ Signature.empty(),
146
+ );
147
+
148
+ // Create the block signing context
149
+ const blockContext: SigningContext = {
150
+ slot: blockHeader.globalVariables.slotNumber,
151
+ blockNumber: blockHeader.globalVariables.blockNumber,
152
+ blockIndexWithinCheckpoint: indexWithinCheckpoint,
153
+ dutyType: DutyType.BLOCK_PROPOSAL,
154
+ };
155
+
156
+ const hashed = getHashedSignaturePayload(tempProposal, SignatureDomainSeparator.blockProposal);
157
+ const sig = await payloadSigner(hashed, blockContext);
158
+
159
+ // If txs are provided, sign them as well
160
+ let signedTxs: SignedTxs | undefined;
161
+ if (txs) {
162
+ const txsSigningContext: SigningContext = { dutyType: DutyType.TXS };
163
+ const txsSigner = (payload: Buffer32) => payloadSigner(payload, txsSigningContext);
164
+ signedTxs = await SignedTxs.createFromSigner(txs, txsSigner);
165
+ }
93
166
 
94
- return new BlockProposal(payload, sig, txHashes, txs);
167
+ return new BlockProposal(blockHeader, indexWithinCheckpoint, inHash, archiveRoot, txHashes, sig, signedTxs);
95
168
  }
96
169
 
97
- /**Get Sender
98
- * Lazily evaluate the sender of the proposal; result is cached
99
- * @returns The sender address, or undefined if signature recovery fails
170
+ /**
171
+ * Lazily evaluate the sender of the proposal; result is cached.
172
+ * If there's signedTxs, also verifies the signedTxs sender matches the block proposal sender.
173
+ * @returns The sender address, or undefined if signature recovery fails or senders don't match
100
174
  */
101
175
  getSender(): EthAddress | undefined {
102
176
  if (!this.sender) {
103
- const hashed = getHashedSignaturePayloadEthSignedMessage(this.payload, SignatureDomainSeparator.blockProposal);
177
+ const hashed = getHashedSignaturePayloadEthSignedMessage(this, SignatureDomainSeparator.blockProposal);
178
+ const blockSender = tryRecoverAddress(hashed, this.signature);
179
+
180
+ // If there's signedTxs, verify the sender matches
181
+ if (blockSender && this.signedTxs) {
182
+ const txsSender = this.signedTxs.getSender();
183
+ if (!txsSender || !txsSender.equals(blockSender)) {
184
+ return undefined; // Sender mismatch - fail
185
+ }
186
+ }
187
+
104
188
  // Cache the sender for later use
105
- this.sender = tryRecoverAddress(hashed, this.signature);
189
+ this.sender = blockSender;
106
190
  }
107
191
 
108
192
  return this.sender;
109
193
  }
110
194
 
111
195
  getPayload() {
112
- return this.payload.getPayloadToSign(SignatureDomainSeparator.blockProposal);
196
+ return this.getPayloadToSign(SignatureDomainSeparator.blockProposal);
113
197
  }
114
198
 
115
199
  toBuffer(): Buffer {
116
- const buffer: any[] = [this.payload, this.signature, this.txHashes.length, this.txHashes];
117
- if (this.txs) {
118
- buffer.push(this.txs.length);
119
- buffer.push(this.txs);
200
+ const buffer: any[] = [
201
+ this.blockHeader,
202
+ this.indexWithinCheckpoint,
203
+ this.inHash,
204
+ this.archiveRoot,
205
+ this.signature,
206
+ this.txHashes.length,
207
+ this.txHashes,
208
+ ];
209
+ if (this.signedTxs) {
210
+ buffer.push(1); // hasSignedTxs = true
211
+ buffer.push(this.signedTxs.toBuffer());
212
+ } else {
213
+ buffer.push(0); // hasSignedTxs = false
120
214
  }
121
215
  return serializeToBuffer(buffer);
122
216
  }
@@ -124,25 +218,98 @@ export class BlockProposal extends Gossipable {
124
218
  static fromBuffer(buf: Buffer | BufferReader): BlockProposal {
125
219
  const reader = BufferReader.asReader(buf);
126
220
 
127
- const payload = reader.readObject(ConsensusPayload);
128
- const sig = reader.readObject(Signature);
129
- const txHashes = reader.readArray(reader.readNumber(), TxHash);
221
+ const blockHeader = reader.readObject(BlockHeader);
222
+ const indexWithinCheckpoint = IndexWithinCheckpoint(reader.readNumber());
223
+ const inHash = reader.readObject(Fr);
224
+ const archiveRoot = reader.readObject(Fr);
225
+ const signature = reader.readObject(Signature);
226
+ const txHashCount = reader.readNumber();
227
+ if (txHashCount > MAX_TXS_PER_BLOCK) {
228
+ throw new Error(`txHashes count ${txHashCount} exceeds maximum ${MAX_TXS_PER_BLOCK}`);
229
+ }
230
+ const txHashes = reader.readArray(txHashCount, TxHash);
130
231
 
131
232
  if (!reader.isEmpty()) {
132
- const txs = reader.readArray(reader.readNumber(), Tx);
133
- return new BlockProposal(payload, sig, txHashes, txs);
233
+ const hasSignedTxs = reader.readNumber();
234
+ if (hasSignedTxs) {
235
+ const signedTxs = SignedTxs.fromBuffer(reader);
236
+ return new BlockProposal(
237
+ blockHeader,
238
+ indexWithinCheckpoint,
239
+ inHash,
240
+ archiveRoot,
241
+ txHashes,
242
+ signature,
243
+ signedTxs,
244
+ );
245
+ }
134
246
  }
135
247
 
136
- return new BlockProposal(payload, sig, txHashes);
248
+ return new BlockProposal(blockHeader, indexWithinCheckpoint, inHash, archiveRoot, txHashes, signature);
137
249
  }
138
250
 
139
251
  getSize(): number {
140
252
  return (
141
- this.payload.getSize() +
253
+ this.blockHeader.getSize() +
254
+ 4 /* indexWithinCheckpoint */ +
255
+ this.inHash.size +
256
+ this.archiveRoot.size +
142
257
  this.signature.getSize() +
143
258
  4 /* txHashes.length */ +
144
259
  this.txHashes.length * TxHash.SIZE +
145
- (this.txs ? 4 /* txs.length */ + this.txs.reduce((acc, tx) => acc + tx.getSize(), 0) : 0)
260
+ 4 /* hasSignedTxs flag */ +
261
+ (this.signedTxs ? this.signedTxs.getSize() : 0)
262
+ );
263
+ }
264
+
265
+ static empty(): BlockProposal {
266
+ return new BlockProposal(BlockHeader.empty(), IndexWithinCheckpoint(0), Fr.ZERO, Fr.ZERO, [], Signature.empty());
267
+ }
268
+
269
+ static random(): BlockProposal {
270
+ return new BlockProposal(
271
+ BlockHeader.random(),
272
+ IndexWithinCheckpoint(Math.floor(Math.random() * 5)),
273
+ Fr.random(),
274
+ Fr.random(),
275
+ [TxHash.random(), TxHash.random()],
276
+ Signature.random(),
277
+ );
278
+ }
279
+
280
+ toInspect() {
281
+ return {
282
+ blockHeader: this.blockHeader.toInspect(),
283
+ indexWithinCheckpoint: this.indexWithinCheckpoint,
284
+ inHash: this.inHash.toString(),
285
+ archiveRoot: this.archiveRoot.toString(),
286
+ signature: this.signature.toString(),
287
+ txHashes: this.txHashes.map(h => h.toString()),
288
+ };
289
+ }
290
+
291
+ /**
292
+ * Check if this proposal matches the given block.
293
+ * Compares the archive root and block header.
294
+ * @param block - The L2Block to compare against
295
+ * @returns True if the proposal matches the block
296
+ */
297
+ matchesBlock(block: L2Block): boolean {
298
+ return this.archiveRoot.equals(block.archive.root) && this.blockHeader.equals(block.header);
299
+ }
300
+
301
+ /**
302
+ * Returns a copy of this proposal without signedTxs.
303
+ * Used when storing proposals in attestation pool to avoid storing full tx data.
304
+ */
305
+ withoutSignedTxs(): BlockProposal {
306
+ return new BlockProposal(
307
+ this.blockHeader,
308
+ this.indexWithinCheckpoint,
309
+ this.inHash,
310
+ this.archiveRoot,
311
+ this.txHashes,
312
+ this.signature,
146
313
  );
147
314
  }
148
315
  }