@aztec/stdlib 0.0.1-commit.2f68f620 → 0.0.1-commit.3100065

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 (491) hide show
  1. package/dest/abi/buffer.d.ts +6 -2
  2. package/dest/abi/buffer.d.ts.map +1 -1
  3. package/dest/abi/buffer.js +13 -1
  4. package/dest/abi/contract_artifact.d.ts +14 -1
  5. package/dest/abi/contract_artifact.d.ts.map +1 -1
  6. package/dest/abi/contract_artifact.js +17 -0
  7. package/dest/avm/avm.js +1 -1
  8. package/dest/avm/avm_proving_request.d.ts +70 -70
  9. package/dest/avm/contract_storage_read.d.ts +58 -0
  10. package/dest/avm/contract_storage_read.d.ts.map +1 -0
  11. package/dest/avm/contract_storage_read.js +65 -0
  12. package/dest/avm/contract_storage_update_request.d.ts +65 -0
  13. package/dest/avm/contract_storage_update_request.d.ts.map +1 -0
  14. package/dest/avm/contract_storage_update_request.js +80 -0
  15. package/dest/avm/index.d.ts +6 -1
  16. package/dest/avm/index.d.ts.map +1 -1
  17. package/dest/avm/index.js +5 -0
  18. package/dest/avm/public_call_stack_item_compressed.d.ts +43 -0
  19. package/dest/avm/public_call_stack_item_compressed.d.ts.map +1 -0
  20. package/dest/avm/public_call_stack_item_compressed.js +70 -0
  21. package/dest/avm/public_data_update_request.d.ts +62 -0
  22. package/dest/avm/public_data_update_request.d.ts.map +1 -0
  23. package/dest/avm/public_data_update_request.js +67 -0
  24. package/dest/avm/public_inner_call_request.d.ts +50 -0
  25. package/dest/avm/public_inner_call_request.d.ts.map +1 -0
  26. package/dest/avm/public_inner_call_request.js +74 -0
  27. package/dest/aztec-address/index.d.ts +35 -5
  28. package/dest/aztec-address/index.d.ts.map +1 -1
  29. package/dest/aztec-address/index.js +32 -8
  30. package/dest/block/attestation_info.d.ts +1 -1
  31. package/dest/block/attestation_info.d.ts.map +1 -1
  32. package/dest/block/attestation_info.js +7 -4
  33. package/dest/block/l2_block_source.d.ts +46 -23
  34. package/dest/block/l2_block_source.d.ts.map +1 -1
  35. package/dest/block/l2_block_source.js +15 -1
  36. package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts +39 -0
  37. package/dest/block/l2_block_stream/event_driven_l2_block_stream.d.ts.map +1 -0
  38. package/dest/block/l2_block_stream/event_driven_l2_block_stream.js +165 -0
  39. package/dest/block/l2_block_stream/index.d.ts +2 -1
  40. package/dest/block/l2_block_stream/index.d.ts.map +1 -1
  41. package/dest/block/l2_block_stream/index.js +1 -0
  42. package/dest/block/l2_block_stream/interfaces.d.ts +81 -11
  43. package/dest/block/l2_block_stream/interfaces.d.ts.map +1 -1
  44. package/dest/block/l2_block_stream/interfaces.js +25 -1
  45. package/dest/block/l2_block_stream/l2_block_stream.d.ts +23 -15
  46. package/dest/block/l2_block_stream/l2_block_stream.d.ts.map +1 -1
  47. package/dest/block/l2_block_stream/l2_block_stream.js +149 -152
  48. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts +6 -12
  49. package/dest/block/l2_block_stream/l2_tips_memory_store.d.ts.map +1 -1
  50. package/dest/block/l2_block_stream/l2_tips_memory_store.js +8 -32
  51. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts +17 -18
  52. package/dest/block/l2_block_stream/l2_tips_store_base.d.ts.map +1 -1
  53. package/dest/block/l2_block_stream/l2_tips_store_base.js +70 -58
  54. package/dest/block/proposal/attestations_and_signers.d.ts +19 -1
  55. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -1
  56. package/dest/block/proposal/attestations_and_signers.js +47 -7
  57. package/dest/block/test/l2_tips_store_test_suite.d.ts +1 -1
  58. package/dest/block/test/l2_tips_store_test_suite.d.ts.map +1 -1
  59. package/dest/block/test/l2_tips_store_test_suite.js +296 -37
  60. package/dest/block/validate_block_result.d.ts +16 -1
  61. package/dest/block/validate_block_result.d.ts.map +1 -1
  62. package/dest/block/validate_block_result.js +18 -3
  63. package/dest/checkpoint/checkpoint.js +2 -2
  64. package/dest/checkpoint/index.d.ts +2 -1
  65. package/dest/checkpoint/index.d.ts.map +1 -1
  66. package/dest/checkpoint/index.js +1 -0
  67. package/dest/checkpoint/simulation_overrides.d.ts +61 -0
  68. package/dest/checkpoint/simulation_overrides.d.ts.map +1 -0
  69. package/dest/checkpoint/simulation_overrides.js +98 -0
  70. package/dest/checkpoint/validate.d.ts +11 -3
  71. package/dest/checkpoint/validate.d.ts.map +1 -1
  72. package/dest/checkpoint/validate.js +9 -6
  73. package/dest/config/index.d.ts +2 -1
  74. package/dest/config/index.d.ts.map +1 -1
  75. package/dest/config/index.js +1 -0
  76. package/dest/config/network-consensus-config.d.ts +72 -0
  77. package/dest/config/network-consensus-config.d.ts.map +1 -0
  78. package/dest/config/network-consensus-config.js +223 -0
  79. package/dest/config/sequencer-config.d.ts +4 -2
  80. package/dest/config/sequencer-config.d.ts.map +1 -1
  81. package/dest/config/sequencer-config.js +22 -3
  82. package/dest/contract/contract_address.d.ts +5 -4
  83. package/dest/contract/contract_address.d.ts.map +1 -1
  84. package/dest/contract/contract_instance.d.ts +16 -2
  85. package/dest/contract/contract_instance.d.ts.map +1 -1
  86. package/dest/contract/contract_instance.js +45 -0
  87. package/dest/contract/deployment_info.d.ts +24 -0
  88. package/dest/contract/deployment_info.d.ts.map +1 -0
  89. package/dest/contract/deployment_info.js +3 -0
  90. package/dest/contract/index.d.ts +2 -1
  91. package/dest/contract/index.d.ts.map +1 -1
  92. package/dest/contract/index.js +1 -0
  93. package/dest/contract/interfaces/contract_data_source.d.ts +3 -5
  94. package/dest/contract/interfaces/contract_data_source.d.ts.map +1 -1
  95. package/dest/contract/interfaces/contract_instance.d.ts +71 -10
  96. package/dest/contract/interfaces/contract_instance.d.ts.map +1 -1
  97. package/dest/contract/interfaces/contract_instance.js +7 -2
  98. package/dest/contract/interfaces/node-info.d.ts +11 -1
  99. package/dest/contract/interfaces/node-info.d.ts.map +1 -1
  100. package/dest/contract/interfaces/node-info.js +7 -1
  101. package/dest/contract/partial_address.d.ts +9 -3
  102. package/dest/contract/partial_address.d.ts.map +1 -1
  103. package/dest/contract/partial_address.js +8 -2
  104. package/dest/database-version/version_manager.d.ts +18 -4
  105. package/dest/database-version/version_manager.d.ts.map +1 -1
  106. package/dest/database-version/version_manager.js +76 -6
  107. package/dest/deserialization/index.d.ts +35 -3
  108. package/dest/deserialization/index.d.ts.map +1 -1
  109. package/dest/deserialization/index.js +32 -1
  110. package/dest/file-store/factory.d.ts +1 -1
  111. package/dest/file-store/factory.d.ts.map +1 -1
  112. package/dest/file-store/factory.js +7 -0
  113. package/dest/file-store/index.d.ts +2 -1
  114. package/dest/file-store/index.d.ts.map +1 -1
  115. package/dest/file-store/index.js +1 -0
  116. package/dest/file-store/memory.d.ts +24 -0
  117. package/dest/file-store/memory.d.ts.map +1 -0
  118. package/dest/file-store/memory.js +80 -0
  119. package/dest/gas/gas_settings.d.ts +7 -13
  120. package/dest/gas/gas_settings.d.ts.map +1 -1
  121. package/dest/gas/gas_settings.js +9 -16
  122. package/dest/gas/index.d.ts +2 -1
  123. package/dest/gas/index.d.ts.map +1 -1
  124. package/dest/gas/index.js +1 -0
  125. package/dest/gas/tx_gas_limits.d.ts +72 -0
  126. package/dest/gas/tx_gas_limits.d.ts.map +1 -0
  127. package/dest/gas/tx_gas_limits.js +85 -0
  128. package/dest/ha-signing/config.d.ts +19 -5
  129. package/dest/ha-signing/config.d.ts.map +1 -1
  130. package/dest/ha-signing/config.js +9 -3
  131. package/dest/ha-signing/local_config.d.ts +10 -2
  132. package/dest/ha-signing/local_config.d.ts.map +1 -1
  133. package/dest/ha-signing/local_config.js +8 -2
  134. package/dest/hash/hash.d.ts +1 -2
  135. package/dest/hash/hash.d.ts.map +1 -1
  136. package/dest/hash/hash.js +0 -7
  137. package/dest/interfaces/archiver.d.ts +12 -7
  138. package/dest/interfaces/archiver.d.ts.map +1 -1
  139. package/dest/interfaces/archiver.js +4 -2
  140. package/dest/interfaces/aztec-node-admin.d.ts +24 -17
  141. package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
  142. package/dest/interfaces/aztec-node-admin.js +1 -1
  143. package/dest/interfaces/aztec-node-debug.d.ts +40 -2
  144. package/dest/interfaces/aztec-node-debug.d.ts.map +1 -1
  145. package/dest/interfaces/aztec-node-debug.js +29 -1
  146. package/dest/interfaces/aztec-node.d.ts +69 -28
  147. package/dest/interfaces/aztec-node.d.ts.map +1 -1
  148. package/dest/interfaces/aztec-node.js +56 -20
  149. package/dest/interfaces/block-builder.d.ts +3 -1
  150. package/dest/interfaces/block-builder.d.ts.map +1 -1
  151. package/dest/interfaces/chain_tips.d.ts +8 -47
  152. package/dest/interfaces/chain_tips.d.ts.map +1 -1
  153. package/dest/interfaces/chain_tips.js +1 -6
  154. package/dest/interfaces/checkpoint_parameter.d.ts +3 -3
  155. package/dest/interfaces/checkpoint_parameter.d.ts.map +1 -1
  156. package/dest/interfaces/checkpoint_parameter.js +3 -3
  157. package/dest/interfaces/client.d.ts +2 -1
  158. package/dest/interfaces/client.d.ts.map +1 -1
  159. package/dest/interfaces/configs.d.ts +27 -6
  160. package/dest/interfaces/configs.d.ts.map +1 -1
  161. package/dest/interfaces/configs.js +5 -1
  162. package/dest/interfaces/get_tx_by_hash_options.d.ts +9 -0
  163. package/dest/interfaces/get_tx_by_hash_options.d.ts.map +1 -0
  164. package/dest/interfaces/get_tx_by_hash_options.js +4 -0
  165. package/dest/interfaces/merkle_tree_operations.d.ts +3 -9
  166. package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
  167. package/dest/interfaces/p2p.d.ts +38 -9
  168. package/dest/interfaces/p2p.d.ts.map +1 -1
  169. package/dest/interfaces/p2p.js +14 -2
  170. package/dest/interfaces/private_kernel_prover.d.ts +9 -11
  171. package/dest/interfaces/private_kernel_prover.d.ts.map +1 -1
  172. package/dest/interfaces/prover-client.d.ts +2 -3
  173. package/dest/interfaces/prover-client.d.ts.map +1 -1
  174. package/dest/interfaces/prover-coordination.d.ts +15 -0
  175. package/dest/interfaces/prover-coordination.d.ts.map +1 -0
  176. package/dest/interfaces/prover-coordination.js +1 -0
  177. package/dest/interfaces/prover-node.d.ts +12 -8
  178. package/dest/interfaces/prover-node.d.ts.map +1 -1
  179. package/dest/interfaces/prover-node.js +24 -17
  180. package/dest/interfaces/proving-job.d.ts +87 -74
  181. package/dest/interfaces/proving-job.d.ts.map +1 -1
  182. package/dest/interfaces/proving-job.js +13 -4
  183. package/dest/interfaces/server.d.ts +2 -2
  184. package/dest/interfaces/server.d.ts.map +1 -1
  185. package/dest/interfaces/server.js +1 -1
  186. package/dest/interfaces/server_circuit_prover.d.ts +3 -3
  187. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  188. package/dest/interfaces/validator.d.ts +15 -4
  189. package/dest/interfaces/validator.d.ts.map +1 -1
  190. package/dest/interfaces/validator.js +3 -1
  191. package/dest/interfaces/world_state.d.ts +14 -1
  192. package/dest/interfaces/world_state.d.ts.map +1 -1
  193. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts +8 -2
  194. package/dest/kernel/hints/find_private_kernel_reset_dimensions.d.ts.map +1 -1
  195. package/dest/kernel/hints/find_private_kernel_reset_dimensions.js +12 -74
  196. package/dest/kernel/hints/index.d.ts +2 -1
  197. package/dest/kernel/hints/index.d.ts.map +1 -1
  198. package/dest/kernel/hints/index.js +1 -0
  199. package/dest/kernel/hints/read_request.js +1 -1
  200. package/dest/kernel/hints/tree_leaf_read_request.d.ts +14 -0
  201. package/dest/kernel/hints/tree_leaf_read_request.d.ts.map +1 -0
  202. package/dest/kernel/hints/tree_leaf_read_request.js +33 -0
  203. package/dest/kernel/index.d.ts +2 -2
  204. package/dest/kernel/index.d.ts.map +1 -1
  205. package/dest/kernel/index.js +1 -1
  206. package/dest/kernel/log_hash.d.ts +1 -1
  207. package/dest/kernel/log_hash.d.ts.map +1 -1
  208. package/dest/kernel/log_hash.js +2 -2
  209. package/dest/kernel/note_hash.js +1 -1
  210. package/dest/kernel/nullifier.js +1 -1
  211. package/dest/kernel/private_circuit_public_inputs.d.ts +13 -3
  212. package/dest/kernel/private_circuit_public_inputs.d.ts.map +1 -1
  213. package/dest/kernel/private_circuit_public_inputs.js +14 -7
  214. package/dest/kernel/private_context_inputs.d.ts +4 -3
  215. package/dest/kernel/private_context_inputs.d.ts.map +1 -1
  216. package/dest/kernel/private_context_inputs.js +7 -3
  217. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts +7 -1
  218. package/dest/kernel/private_kernel_circuit_public_inputs.d.ts.map +1 -1
  219. package/dest/kernel/private_kernel_circuit_public_inputs.js +7 -0
  220. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts +2 -3
  221. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.d.ts.map +1 -1
  222. package/dest/kernel/private_kernel_init_2_circuit_private_inputs.js +3 -5
  223. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts +2 -3
  224. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.d.ts.map +1 -1
  225. package/dest/kernel/private_kernel_init_3_circuit_private_inputs.js +3 -5
  226. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts +1 -9
  227. package/dest/kernel/private_kernel_init_circuit_private_inputs.d.ts.map +1 -1
  228. package/dest/kernel/private_kernel_init_circuit_private_inputs.js +2 -6
  229. package/dest/kernel/private_kernel_reset_dimensions.d.ts +7 -8
  230. package/dest/kernel/private_kernel_reset_dimensions.d.ts.map +1 -1
  231. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts +29 -0
  232. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.d.ts.map +1 -0
  233. package/dest/kernel/private_kernel_reset_tail_circuit_private_inputs.js +36 -0
  234. package/dest/kernel/private_kernel_simulated_output.d.ts +7 -1
  235. package/dest/kernel/private_kernel_simulated_output.d.ts.map +1 -1
  236. package/dest/kernel/private_kernel_simulated_output.js +1 -2
  237. package/dest/kernel/private_log_data.d.ts +1 -1
  238. package/dest/kernel/private_log_data.d.ts.map +1 -1
  239. package/dest/kernel/private_log_data.js +1 -1
  240. package/dest/kernel/utils/index.d.ts +2 -1
  241. package/dest/kernel/utils/index.d.ts.map +1 -1
  242. package/dest/kernel/utils/index.js +1 -0
  243. package/dest/kernel/utils/optional_number.d.ts +31 -0
  244. package/dest/kernel/utils/optional_number.d.ts.map +1 -0
  245. package/dest/kernel/utils/optional_number.js +42 -0
  246. package/dest/keys/derivation.d.ts +41 -6
  247. package/dest/keys/derivation.d.ts.map +1 -1
  248. package/dest/keys/derivation.js +49 -26
  249. package/dest/logs/app_tagging_secret.d.ts +30 -7
  250. package/dest/logs/app_tagging_secret.d.ts.map +1 -1
  251. package/dest/logs/app_tagging_secret.js +46 -39
  252. package/dest/logs/app_tagging_secret_kind.js +1 -1
  253. package/dest/logs/contract_class_log.d.ts +1 -2
  254. package/dest/logs/contract_class_log.d.ts.map +1 -1
  255. package/dest/logs/contract_class_log.js +0 -4
  256. package/dest/logs/index.d.ts +1 -3
  257. package/dest/logs/index.d.ts.map +1 -1
  258. package/dest/logs/index.js +0 -2
  259. package/dest/logs/shared_secret_derivation.d.ts +19 -6
  260. package/dest/logs/shared_secret_derivation.d.ts.map +1 -1
  261. package/dest/logs/shared_secret_derivation.js +26 -11
  262. package/dest/messaging/l1_to_l2_message.d.ts +23 -2
  263. package/dest/messaging/l1_to_l2_message.d.ts.map +1 -1
  264. package/dest/messaging/l1_to_l2_message.js +36 -11
  265. package/dest/p2p/attestation_utils.d.ts +1 -1
  266. package/dest/p2p/attestation_utils.d.ts.map +1 -1
  267. package/dest/p2p/attestation_utils.js +8 -1
  268. package/dest/p2p/checkpoint_attestation.d.ts +10 -1
  269. package/dest/p2p/checkpoint_attestation.d.ts.map +1 -1
  270. package/dest/p2p/checkpoint_attestation.js +10 -0
  271. package/dest/p2p/checkpoint_proposal.d.ts +2 -1
  272. package/dest/p2p/checkpoint_proposal.d.ts.map +1 -1
  273. package/dest/p2p/consensus_payload.d.ts +2 -1
  274. package/dest/p2p/consensus_payload.d.ts.map +1 -1
  275. package/dest/p2p/index.d.ts +2 -1
  276. package/dest/p2p/index.d.ts.map +1 -1
  277. package/dest/p2p/index.js +1 -0
  278. package/dest/p2p/interface.d.ts +5 -0
  279. package/dest/p2p/interface.d.ts.map +1 -0
  280. package/dest/p2p/interface.js +1 -0
  281. package/dest/p2p/signature_utils.d.ts +10 -1
  282. package/dest/p2p/signature_utils.d.ts.map +1 -1
  283. package/dest/p2p/signature_utils.js +9 -1
  284. package/dest/rollup/avm_proof_data.d.ts +3 -3
  285. package/dest/rollup/avm_proof_data.d.ts.map +1 -1
  286. package/dest/rollup/checkpoint_header.d.ts +8 -3
  287. package/dest/rollup/checkpoint_header.d.ts.map +1 -1
  288. package/dest/rollup/checkpoint_header.js +20 -10
  289. package/dest/stats/stats.d.ts +2 -2
  290. package/dest/stats/stats.d.ts.map +1 -1
  291. package/dest/tests/factories.d.ts +27 -1
  292. package/dest/tests/factories.d.ts.map +1 -1
  293. package/dest/tests/factories.js +40 -15
  294. package/dest/tests/mocks.d.ts +1 -1
  295. package/dest/tests/mocks.d.ts.map +1 -1
  296. package/dest/tests/mocks.js +3 -2
  297. package/dest/timetable/budgets.d.ts +57 -0
  298. package/dest/timetable/budgets.d.ts.map +1 -0
  299. package/dest/timetable/budgets.js +56 -0
  300. package/dest/timetable/build_proposer_timetable.d.ts +21 -0
  301. package/dest/timetable/build_proposer_timetable.d.ts.map +1 -0
  302. package/dest/timetable/build_proposer_timetable.js +17 -0
  303. package/dest/timetable/consensus_timetable.d.ts +70 -0
  304. package/dest/timetable/consensus_timetable.d.ts.map +1 -0
  305. package/dest/timetable/consensus_timetable.js +89 -0
  306. package/dest/timetable/index.d.ts +5 -84
  307. package/dest/timetable/index.d.ts.map +1 -1
  308. package/dest/timetable/index.js +4 -209
  309. package/dest/timetable/proposer_timetable.d.ts +106 -0
  310. package/dest/timetable/proposer_timetable.d.ts.map +1 -0
  311. package/dest/timetable/proposer_timetable.js +132 -0
  312. package/dest/trees/nullifier_membership_witness.d.ts +5 -8
  313. package/dest/trees/nullifier_membership_witness.d.ts.map +1 -1
  314. package/dest/trees/nullifier_membership_witness.js +0 -9
  315. package/dest/trees/public_data_witness.d.ts +7 -17
  316. package/dest/trees/public_data_witness.d.ts.map +1 -1
  317. package/dest/trees/public_data_witness.js +0 -27
  318. package/dest/tx/execution_payload.d.ts +1 -1
  319. package/dest/tx/execution_payload.d.ts.map +1 -1
  320. package/dest/tx/execution_payload.js +1 -1
  321. package/dest/tx/fee_provider.d.ts +2 -2
  322. package/dest/tx/fee_provider.d.ts.map +1 -1
  323. package/dest/tx/global_variable_builder.d.ts +2 -12
  324. package/dest/tx/global_variable_builder.d.ts.map +1 -1
  325. package/dest/tx/global_variables.js +2 -2
  326. package/dest/tx/index.d.ts +2 -1
  327. package/dest/tx/index.d.ts.map +1 -1
  328. package/dest/tx/index.js +1 -0
  329. package/dest/tx/private_tx_constant_data.d.ts +18 -2
  330. package/dest/tx/private_tx_constant_data.d.ts.map +1 -1
  331. package/dest/tx/private_tx_constant_data.js +13 -4
  332. package/dest/tx/simulated_tx.d.ts +10 -6
  333. package/dest/tx/simulated_tx.d.ts.map +1 -1
  334. package/dest/tx/tx.d.ts +9 -1
  335. package/dest/tx/tx.d.ts.map +1 -1
  336. package/dest/tx/tx.js +15 -0
  337. package/dest/tx/validator/empty_validator.d.ts +5 -0
  338. package/dest/tx/validator/empty_validator.d.ts.map +1 -0
  339. package/dest/tx/validator/empty_validator.js +7 -0
  340. package/dest/tx/validator/error_texts.d.ts +2 -2
  341. package/dest/tx/validator/error_texts.d.ts.map +1 -1
  342. package/dest/tx/validator/error_texts.js +1 -1
  343. package/dest/world-state/genesis_data.d.ts +9 -1
  344. package/dest/world-state/genesis_data.d.ts.map +1 -1
  345. package/dest/world-state/genesis_data.js +1 -0
  346. package/dest/world-state/world_state_revision.d.ts +18 -1
  347. package/dest/world-state/world_state_revision.d.ts.map +1 -1
  348. package/dest/world-state/world_state_revision.js +20 -0
  349. package/package.json +8 -8
  350. package/src/abi/buffer.ts +13 -1
  351. package/src/abi/contract_artifact.ts +19 -0
  352. package/src/avm/avm.ts +1 -1
  353. package/src/avm/contract_storage_read.ts +77 -0
  354. package/src/avm/contract_storage_update_request.ts +93 -0
  355. package/src/avm/index.ts +5 -0
  356. package/src/avm/public_call_stack_item_compressed.ts +113 -0
  357. package/src/avm/public_data_update_request.ts +106 -0
  358. package/src/avm/public_inner_call_request.ts +85 -0
  359. package/src/aztec-address/index.ts +36 -6
  360. package/src/block/attestation_info.ts +7 -2
  361. package/src/block/l2_block_source.ts +67 -13
  362. package/src/block/l2_block_stream/event_driven_l2_block_stream.ts +207 -0
  363. package/src/block/l2_block_stream/index.ts +1 -0
  364. package/src/block/l2_block_stream/interfaces.ts +96 -10
  365. package/src/block/l2_block_stream/l2_block_stream.ts +216 -175
  366. package/src/block/l2_block_stream/l2_tips_memory_store.ts +12 -41
  367. package/src/block/l2_block_stream/l2_tips_store_base.ts +84 -93
  368. package/src/block/proposal/attestations_and_signers.ts +53 -7
  369. package/src/block/test/l2_tips_store_test_suite.ts +270 -28
  370. package/src/block/validate_block_result.ts +48 -2
  371. package/src/checkpoint/checkpoint.ts +2 -2
  372. package/src/checkpoint/index.ts +1 -0
  373. package/src/checkpoint/simulation_overrides.ts +171 -0
  374. package/src/checkpoint/validate.ts +16 -6
  375. package/src/config/index.ts +1 -0
  376. package/src/config/network-consensus-config.ts +291 -0
  377. package/src/config/sequencer-config.ts +36 -5
  378. package/src/contract/contract_address.ts +4 -3
  379. package/src/contract/contract_instance.ts +62 -1
  380. package/src/contract/deployment_info.ts +25 -0
  381. package/src/contract/index.ts +1 -0
  382. package/src/contract/interfaces/contract_data_source.ts +2 -4
  383. package/src/contract/interfaces/contract_instance.ts +26 -8
  384. package/src/contract/interfaces/node-info.ts +11 -0
  385. package/src/contract/partial_address.ts +8 -2
  386. package/src/database-version/version_manager.ts +96 -6
  387. package/src/deserialization/index.ts +35 -2
  388. package/src/file-store/factory.ts +7 -0
  389. package/src/file-store/index.ts +1 -0
  390. package/src/file-store/memory.ts +94 -0
  391. package/src/gas/README.md +92 -0
  392. package/src/gas/gas_settings.ts +11 -21
  393. package/src/gas/index.ts +1 -0
  394. package/src/gas/tx_gas_limits.ts +123 -0
  395. package/src/ha-signing/config.ts +23 -5
  396. package/src/ha-signing/local_config.ts +20 -1
  397. package/src/hash/hash.ts +0 -8
  398. package/src/interfaces/archiver.ts +14 -7
  399. package/src/interfaces/aztec-node-admin.ts +1 -1
  400. package/src/interfaces/aztec-node-debug.ts +54 -2
  401. package/src/interfaces/aztec-node.ts +121 -43
  402. package/src/interfaces/block-builder.ts +2 -0
  403. package/src/interfaces/chain_tips.ts +8 -16
  404. package/src/interfaces/checkpoint_parameter.ts +3 -3
  405. package/src/interfaces/client.ts +1 -0
  406. package/src/interfaces/configs.ts +27 -6
  407. package/src/interfaces/get_tx_by_hash_options.ts +14 -0
  408. package/src/interfaces/merkle_tree_operations.ts +2 -9
  409. package/src/interfaces/p2p.ts +29 -9
  410. package/src/interfaces/private_kernel_prover.ts +10 -12
  411. package/src/interfaces/prover-client.ts +1 -3
  412. package/src/interfaces/prover-coordination.ts +17 -0
  413. package/src/interfaces/prover-node.ts +32 -17
  414. package/src/interfaces/proving-job.ts +15 -3
  415. package/src/interfaces/server.ts +1 -1
  416. package/src/interfaces/server_circuit_prover.ts +2 -2
  417. package/src/interfaces/validator.ts +11 -0
  418. package/src/interfaces/world_state.ts +14 -0
  419. package/src/kernel/hints/find_private_kernel_reset_dimensions.ts +22 -112
  420. package/src/kernel/hints/index.ts +1 -0
  421. package/src/kernel/hints/read_request.ts +1 -1
  422. package/src/kernel/hints/tree_leaf_read_request.ts +35 -0
  423. package/src/kernel/index.ts +1 -1
  424. package/src/kernel/log_hash.ts +5 -2
  425. package/src/kernel/note_hash.ts +1 -1
  426. package/src/kernel/nullifier.ts +1 -1
  427. package/src/kernel/private_circuit_public_inputs.ts +12 -1
  428. package/src/kernel/private_context_inputs.ts +10 -3
  429. package/src/kernel/private_kernel_circuit_public_inputs.ts +9 -0
  430. package/src/kernel/private_kernel_init_2_circuit_private_inputs.ts +0 -3
  431. package/src/kernel/private_kernel_init_3_circuit_private_inputs.ts +0 -3
  432. package/src/kernel/private_kernel_init_circuit_private_inputs.ts +0 -6
  433. package/src/kernel/private_kernel_reset_dimensions.ts +15 -5
  434. package/src/kernel/private_kernel_reset_tail_circuit_private_inputs.ts +69 -0
  435. package/src/kernel/private_kernel_simulated_output.ts +7 -0
  436. package/src/kernel/private_log_data.ts +4 -1
  437. package/src/kernel/utils/index.ts +1 -0
  438. package/src/kernel/utils/optional_number.ts +50 -0
  439. package/src/keys/derivation.ts +69 -24
  440. package/src/logs/app_tagging_secret.ts +62 -39
  441. package/src/logs/app_tagging_secret_kind.ts +1 -1
  442. package/src/logs/contract_class_log.ts +0 -9
  443. package/src/logs/index.ts +0 -2
  444. package/src/logs/shared_secret_derivation.ts +31 -15
  445. package/src/messaging/l1_to_l2_message.ts +51 -13
  446. package/src/p2p/attestation_utils.ts +8 -1
  447. package/src/p2p/checkpoint_attestation.ts +12 -0
  448. package/src/p2p/index.ts +1 -0
  449. package/src/p2p/interface.ts +4 -0
  450. package/src/p2p/signature_utils.ts +9 -0
  451. package/src/rollup/avm_proof_data.ts +2 -2
  452. package/src/rollup/checkpoint_header.ts +16 -2
  453. package/src/stats/stats.ts +2 -2
  454. package/src/tests/factories.ts +51 -13
  455. package/src/tests/mocks.ts +7 -2
  456. package/src/timetable/README.md +609 -0
  457. package/src/timetable/budgets.ts +87 -0
  458. package/src/timetable/build_proposer_timetable.ts +42 -0
  459. package/src/timetable/consensus_timetable.ts +126 -0
  460. package/src/timetable/index.ts +4 -304
  461. package/src/timetable/proposer_timetable.ts +190 -0
  462. package/src/timetable/timetable-example.svg +108 -0
  463. package/src/trees/nullifier_membership_witness.ts +0 -11
  464. package/src/trees/public_data_witness.ts +0 -31
  465. package/src/tx/execution_payload.ts +2 -1
  466. package/src/tx/fee_provider.ts +1 -1
  467. package/src/tx/global_variable_builder.ts +1 -17
  468. package/src/tx/global_variables.ts +2 -2
  469. package/src/tx/index.ts +1 -0
  470. package/src/tx/private_tx_constant_data.ts +25 -2
  471. package/src/tx/tx.ts +17 -0
  472. package/src/tx/validator/empty_validator.ts +7 -0
  473. package/src/tx/validator/error_texts.ts +2 -1
  474. package/src/world-state/genesis_data.ts +10 -0
  475. package/src/world-state/world_state_revision.ts +33 -0
  476. package/dest/interfaces/epoch-prover.d.ts +0 -57
  477. package/dest/interfaces/epoch-prover.d.ts.map +0 -1
  478. package/dest/interfaces/epoch-prover.js +0 -1
  479. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts +0 -47
  480. package/dest/kernel/private_kernel_tail_circuit_private_inputs.d.ts.map +0 -1
  481. package/dest/kernel/private_kernel_tail_circuit_private_inputs.js +0 -38
  482. package/dest/logs/message_context.d.ts +0 -27
  483. package/dest/logs/message_context.d.ts.map +0 -1
  484. package/dest/logs/message_context.js +0 -74
  485. package/dest/logs/pending_tagged_log.d.ts +0 -13
  486. package/dest/logs/pending_tagged_log.d.ts.map +0 -1
  487. package/dest/logs/pending_tagged_log.js +0 -34
  488. package/src/interfaces/epoch-prover.ts +0 -72
  489. package/src/kernel/private_kernel_tail_circuit_private_inputs.ts +0 -58
  490. package/src/logs/message_context.ts +0 -76
  491. package/src/logs/pending_tagged_log.ts +0 -39
@@ -2,16 +2,28 @@ import { DomainSeparator } from '@aztec/constants';
2
2
  import { Grumpkin } from '@aztec/foundation/crypto/grumpkin';
3
3
  import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
4
4
  import type { Fr } from '@aztec/foundation/curves/bn254';
5
- import type { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin';
5
+ import type { GrumpkinScalar, Point } from '@aztec/foundation/curves/grumpkin';
6
6
 
7
7
  import type { AztecAddress } from '../aztec-address/index.js';
8
8
  import type { PublicKey } from '../keys/public_key.js';
9
9
 
10
10
  /**
11
- * Derives an app-siloed ECDH shared secret.
11
+ * Derives the raw ECDH shared secret point `S = secretKey * publicKey`.
12
12
  *
13
- * Computes the raw ECDH shared secret `S = secretKey * publicKey`, then app-silos it:
14
- * `s_app = h(DOM_SEP__APP_SILOED_ECDH_SHARED_SECRET, S.x, S.y, contractAddress)`
13
+ * @throws If the publicKey is zero.
14
+ */
15
+ export function deriveEcdhSharedSecretPoint(secretKey: GrumpkinScalar, publicKey: PublicKey): Promise<Point> {
16
+ if (publicKey.isZero()) {
17
+ throw new Error(
18
+ `Attempting to derive a shared secret with a zero public key. You have probably passed a zero public key in your Noir code somewhere thinking that the note won't be broadcast... but it was.`,
19
+ );
20
+ }
21
+ return Grumpkin.mul(publicKey, secretKey);
22
+ }
23
+
24
+ /**
25
+ * Derives an app-siloed ECDH shared secret from keys: ECDHs `S = secretKey * publicKey` via
26
+ * {@link deriveEcdhSharedSecretPoint}, then app-silos it via {@link appSiloEcdhSharedSecretPoint}.
15
27
  *
16
28
  * @param secretKey - The secret key used to derive shared secret.
17
29
  * @param publicKey - The public key used to derive shared secret.
@@ -19,19 +31,23 @@ import type { PublicKey } from '../keys/public_key.js';
19
31
  * @returns The app-siloed shared secret as a Field.
20
32
  * @throws If the publicKey is zero.
21
33
  */
22
- export async function deriveAppSiloedSharedSecret(
34
+ export async function appSiloEcdhSharedSecret(
23
35
  secretKey: GrumpkinScalar,
24
36
  publicKey: PublicKey,
25
37
  contractAddress: AztecAddress,
26
38
  ): Promise<Fr> {
27
- if (publicKey.isZero()) {
28
- throw new Error(
29
- `Attempting to derive a shared secret with a zero public key. You have probably passed a zero public key in your Noir code somewhere thinking that the note won't be broadcast... but it was.`,
30
- );
31
- }
32
- const rawSharedSecret = await Grumpkin.mul(publicKey, secretKey);
33
- return poseidon2HashWithSeparator(
34
- [rawSharedSecret.x, rawSharedSecret.y, contractAddress],
35
- DomainSeparator.APP_SILOED_ECDH_SHARED_SECRET,
36
- );
39
+ const rawSharedSecret = await deriveEcdhSharedSecretPoint(secretKey, publicKey);
40
+ return appSiloEcdhSharedSecretPoint(rawSharedSecret, contractAddress);
41
+ }
42
+
43
+ /**
44
+ * App-silos a shared secret point: `s_app = h(DOM_SEP__APP_SILOED_ECDH_SHARED_SECRET, S.x, S.y, app)`.
45
+ *
46
+ * Mirrors `compute_app_siloed_shared_secret` in aztec-nr.
47
+ *
48
+ * @param point - The raw shared secret point `S`.
49
+ * @param app - The contract address to silo to.
50
+ */
51
+ export function appSiloEcdhSharedSecretPoint(point: Point, app: AztecAddress): Promise<Fr> {
52
+ return poseidon2HashWithSeparator([point.x, point.y, app], DomainSeparator.APP_SILOED_ECDH_SHARED_SECRET);
37
53
  }
@@ -1,4 +1,5 @@
1
- import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
1
+ import { DomainSeparator, type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
2
+ import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
2
3
  import { sha256ToField } from '@aztec/foundation/crypto/sha256';
3
4
  import { Fr } from '@aztec/foundation/curves/bn254';
4
5
  import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
@@ -7,7 +8,7 @@ import { SiblingPath } from '@aztec/foundation/trees';
7
8
 
8
9
  import type { AztecAddress } from '../aztec-address/index.js';
9
10
  import type { BlockParameter } from '../block/block_parameter.js';
10
- import { computeL1ToL2MessageNullifier } from '../hash/hash.js';
11
+ import { siloNullifier } from '../hash/hash.js';
11
12
  import type { AztecNode } from '../interfaces/aztec-node.js';
12
13
  import { MerkleTreeId } from '../trees/merkle_tree_id.js';
13
14
  import { L1Actor } from './l1_actor.js';
@@ -74,28 +75,65 @@ export class L1ToL2Message {
74
75
  }
75
76
  }
76
77
 
77
- // This functionality is not on the node because we do not want to pass the node the secret, and give the node the ability to derive a valid nullifer for an L1 to L2 message.
78
- export async function getNonNullifiedL1ToL2MessageWitness(
78
+ /**
79
+ * The unsiloed nullifier a message consumer derives, together with the contract address needed to silo it.
80
+ */
81
+ export interface UnsiloedMessageNullifier {
82
+ contractAddress: AztecAddress;
83
+ nullifier: Fr;
84
+ }
85
+
86
+ /**
87
+ * Computes the unsiloed nullifier that the fee juice contract (and any consumer following the same scheme) derives when
88
+ * consuming an L1 to L2 message.
89
+ *
90
+ * This is not a general-purpose utility: other contracts may derive the secret hash and hence the nullifier
91
+ * differently. The result is unsiloed — callers silo it (with the consuming contract's address) before looking it up
92
+ * in the nullifier tree.
93
+ */
94
+ export function computeFeeJuiceMessageNullifier(messageHash: Fr, secret: Fr): Promise<Fr> {
95
+ return poseidon2HashWithSeparator([messageHash, secret], DomainSeparator.MESSAGE_NULLIFIER);
96
+ }
97
+
98
+ /**
99
+ * Fetches the membership witness of an L1 to L2 message. When `unsiloedNullifier` is provided, the message is
100
+ * additionally required to be un-nullified.
101
+ */
102
+ export async function getL1ToL2MessageWitness(
79
103
  node: AztecNode,
80
- contractAddress: AztecAddress,
81
104
  messageHash: Fr,
82
- secret: Fr,
105
+ unsiloedNullifier?: UnsiloedMessageNullifier,
83
106
  referenceBlock: BlockParameter = 'latest',
84
107
  ): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>]> {
85
- const messageNullifier = await computeL1ToL2MessageNullifier(contractAddress, messageHash, secret);
86
-
87
- const [l1ToL2Response, nullifierResponse] = await Promise.all([
88
- node.getL1ToL2MessageMembershipWitness(referenceBlock, messageHash),
89
- node.findLeavesIndexes(referenceBlock, MerkleTreeId.NULLIFIER_TREE, [messageNullifier]),
90
- ]);
108
+ // Both requests are dispatched before awaiting so they run concurrently.
109
+ const l1ToL2ResponsePromise = node.getL1ToL2MessageMembershipWitness(referenceBlock, messageHash);
110
+ const nullifierResponsePromise = unsiloedNullifier
111
+ ? siloNullifier(unsiloedNullifier.contractAddress, unsiloedNullifier.nullifier).then(siloed =>
112
+ node.findLeavesIndexes(referenceBlock, MerkleTreeId.NULLIFIER_TREE, [siloed]),
113
+ )
114
+ : undefined;
91
115
 
116
+ const l1ToL2Response = await l1ToL2ResponsePromise;
92
117
  if (!l1ToL2Response) {
93
118
  throw new Error(`No L1 to L2 message found for message hash ${messageHash.toString()}`);
94
119
  }
95
120
 
96
- if (nullifierResponse[0] !== undefined) {
121
+ const nullifierResponse = await nullifierResponsePromise;
122
+ if (nullifierResponse?.[0] !== undefined) {
97
123
  throw new Error(`No non-nullified L1 to L2 message found for message hash ${messageHash.toString()}`);
98
124
  }
99
125
 
100
126
  return l1ToL2Response;
101
127
  }
128
+
129
+ // This functionality is not on the node because we do not want to pass the node the secret, and give the node the ability to derive a valid nullifer for an L1 to L2 message.
130
+ export async function getNonNullifiedL1ToL2MessageWitness(
131
+ node: AztecNode,
132
+ contractAddress: AztecAddress,
133
+ messageHash: Fr,
134
+ secret: Fr,
135
+ referenceBlock: BlockParameter = 'latest',
136
+ ): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>]> {
137
+ const nullifier = await computeFeeJuiceMessageNullifier(messageHash, secret);
138
+ return getL1ToL2MessageWitness(node, messageHash, { contractAddress, nullifier }, referenceBlock);
139
+ }
@@ -1,3 +1,4 @@
1
+ import { normalizeSignature } from '@aztec/foundation/crypto/secp256k1-signer';
1
2
  import type { EthAddress } from '@aztec/foundation/eth-address';
2
3
 
3
4
  import { CommitteeAttestation } from '../block/index.js';
@@ -18,9 +19,15 @@ export function orderAttestations(
18
19
  for (const attestation of attestations) {
19
20
  const sender = attestation.getSender();
20
21
  if (sender) {
22
+ // Canonicalize the recovery byte to v ∈ {27, 28} before it reaches the L1 bundle. A committee
23
+ // member (or a peer mutating the byte in flight) can emit an equivalent signature in yParity form
24
+ // (v = 0/1); left as-is it makes `packAttestations` (empty iff v === 0) and `getSigners` (empty iff
25
+ // r,s,v all zero) disagree, reverting `propose()` with SignersSizeMismatch, and a v = 1 byte would
26
+ // later revert epoch proving in ECDSA.recover. `sender` recovered, so the signature is non-empty
27
+ // and low-s, and normalizeSignature preserves the recovered address.
21
28
  attestationMap.set(
22
29
  sender.toString(),
23
- CommitteeAttestation.fromAddressAndSignature(sender, attestation.signature),
30
+ CommitteeAttestation.fromAddressAndSignature(sender, normalizeSignature(attestation.signature)),
24
31
  );
25
32
  }
26
33
  }
@@ -1,5 +1,6 @@
1
1
  import { CheckpointProposalHash, type SlotNumber } from '@aztec/foundation/branded-types';
2
2
  import { type BaseBuffer32, Buffer32 } from '@aztec/foundation/buffer';
3
+ import { normalizeSignature } from '@aztec/foundation/crypto/secp256k1-signer';
3
4
  import type { Fr } from '@aztec/foundation/curves/bn254';
4
5
  import type { EthAddress } from '@aztec/foundation/eth-address';
5
6
  import { Signature } from '@aztec/foundation/eth-signature';
@@ -97,6 +98,17 @@ export class CheckpointAttestation extends Gossipable {
97
98
  return this.cachedProposer ?? undefined;
98
99
  }
99
100
 
101
+ /**
102
+ * Returns a copy with the attester signature canonicalized to v ∈ {27, 28}. Callers store attestations
103
+ * received from gossip verbatim; normalizing on ingress keeps a signature emitted in yParity form
104
+ * (v = 0/1) — whether by a malicious committee member or a peer mutating the byte in flight — from
105
+ * reaching the L1 bundle in a non-canonical form. Must only be called once the signature has recovered
106
+ * a sender (so it is non-empty and low-s); `normalizeSignature` throws on an all-zero signature.
107
+ */
108
+ withNormalizedSignature(): CheckpointAttestation {
109
+ return new CheckpointAttestation(this.payload, normalizeSignature(this.signature), this.proposerSignature);
110
+ }
111
+
100
112
  getPayload(): Buffer {
101
113
  return this.payload.getPayloadToSign();
102
114
  }
package/src/p2p/index.ts CHANGED
@@ -4,6 +4,7 @@ export * from './checkpoint_attestation.js';
4
4
  export * from './checkpoint_proposal.js';
5
5
  export * from './consensus_payload.js';
6
6
  export * from './gossipable.js';
7
+ export * from './interface.js';
7
8
  export * from './signature_utils.js';
8
9
  export * from './signed_txs.js';
9
10
  export * from './topic_type.js';
@@ -0,0 +1,4 @@
1
+ export interface RawGossipMessage {
2
+ topic: string;
3
+ data: Uint8Array;
4
+ }
@@ -112,6 +112,15 @@ export function getHashedSignaturePayloadTypedData(signable: Signable): Buffer32
112
112
  return Buffer32.fromString(hashTypedData(getCoordinationSignatureTypedData(signable)));
113
113
  }
114
114
 
115
+ /**
116
+ * Recovers the sender of a gossiped coordination message. Deliberately lenient (allowYParityAsV): a
117
+ * signature whose recovery byte is in yParity form (v ∈ {0, 1}) still resolves to its sender, so the P2P
118
+ * layer can attribute and accept it and then canonicalize on ingress (CheckpointAttestation.
119
+ * withNormalizedSignature, A-1351) before it reaches the L1 bundle. This is intentionally looser than
120
+ * on-chain checkpoint validation (getAttestationInfoFromPayload), which recovers strictly to mirror L1's
121
+ * ECDSA.recover — do not unify the two. These proposal/attestation signatures are P2P-only and never reach
122
+ * L1 verbatim, so leniency here cannot leak a non-canonical byte onto L1.
123
+ */
115
124
  export function recoverCoordinationSigner(signable: Signable, signature: Signature): EthAddress | undefined {
116
125
  const digest = getHashedSignaturePayloadTypedData(signable);
117
126
  return tryRecoverAddress(digest, signature, { allowYParityAsV: true });
@@ -1,6 +1,6 @@
1
- import { AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED } from '@aztec/constants';
1
+ import { AVM_V2_PROOF_LENGTH_IN_FIELDS } from '@aztec/constants';
2
2
 
3
3
  import { AvmCircuitPublicInputs } from '../avm/avm_circuit_public_inputs.js';
4
4
  import type { ProofDataForFixedVk } from '../proofs/proof_data.js';
5
5
 
6
- export type AvmProofData = ProofDataForFixedVk<AvmCircuitPublicInputs, typeof AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED>;
6
+ export type AvmProofData = ProofDataForFixedVk<AvmCircuitPublicInputs, typeof AVM_V2_PROOF_LENGTH_IN_FIELDS>;
@@ -52,6 +52,8 @@ export class CheckpointHeader {
52
52
  public gasFees: GasFees,
53
53
  /** Total mana used in the block, computed by the root rollup circuit */
54
54
  public totalManaUsed: Fr,
55
+ /** Total fees accrued across the checkpoint. */
56
+ public accumulatedFees: Fr,
55
57
  ) {}
56
58
 
57
59
  static get schema(): ZodFor<CheckpointHeader> {
@@ -68,6 +70,7 @@ export class CheckpointHeader {
68
70
  feeRecipient: schemas.AztecAddress,
69
71
  gasFees: GasFees.schema,
70
72
  totalManaUsed: schemas.Fr,
73
+ accumulatedFees: schemas.Fr,
71
74
  })
72
75
  .transform(CheckpointHeader.from);
73
76
  }
@@ -85,6 +88,7 @@ export class CheckpointHeader {
85
88
  fields.feeRecipient,
86
89
  fields.gasFees,
87
90
  fields.totalManaUsed,
91
+ fields.accumulatedFees,
88
92
  ] as const;
89
93
  }
90
94
 
@@ -107,6 +111,7 @@ export class CheckpointHeader {
107
111
  reader.readObject(AztecAddress),
108
112
  reader.readObject(GasFees),
109
113
  reader.readObject(Fr),
114
+ reader.readObject(Fr),
110
115
  );
111
116
  }
112
117
 
@@ -122,7 +127,8 @@ export class CheckpointHeader {
122
127
  this.coinbase.equals(other.coinbase) &&
123
128
  this.feeRecipient.equals(other.feeRecipient) &&
124
129
  this.gasFees.equals(other.gasFees) &&
125
- this.totalManaUsed.equals(other.totalManaUsed)
130
+ this.totalManaUsed.equals(other.totalManaUsed) &&
131
+ this.accumulatedFees.equals(other.accumulatedFees)
126
132
  );
127
133
  }
128
134
 
@@ -151,6 +157,7 @@ export class CheckpointHeader {
151
157
  this.feeRecipient,
152
158
  this.gasFees,
153
159
  this.totalManaUsed,
160
+ this.accumulatedFees,
154
161
  ]);
155
162
  }
156
163
 
@@ -171,6 +178,7 @@ export class CheckpointHeader {
171
178
  feeRecipient: AztecAddress.ZERO,
172
179
  gasFees: GasFees.empty(),
173
180
  totalManaUsed: Fr.ZERO,
181
+ accumulatedFees: Fr.ZERO,
174
182
  ...fields,
175
183
  });
176
184
  }
@@ -188,6 +196,7 @@ export class CheckpointHeader {
188
196
  feeRecipient: new AztecAddress(Fr.random()),
189
197
  gasFees: GasFees.random(),
190
198
  totalManaUsed: new Fr(BigInt(Math.floor(Math.random() * 1000000))),
199
+ accumulatedFees: new Fr(BigInt(Math.floor(Math.random() * 1000000))),
191
200
  ...overrides,
192
201
  });
193
202
  }
@@ -204,7 +213,8 @@ export class CheckpointHeader {
204
213
  this.coinbase.isZero() &&
205
214
  this.feeRecipient.isZero() &&
206
215
  this.gasFees.isEmpty() &&
207
- this.totalManaUsed.isZero()
216
+ this.totalManaUsed.isZero() &&
217
+ this.accumulatedFees.isZero()
208
218
  );
209
219
  }
210
220
 
@@ -233,6 +243,7 @@ export class CheckpointHeader {
233
243
  new AztecAddress(hexToBuffer(header.feeRecipient)),
234
244
  new GasFees(header.gasFees.feePerDaGas, header.gasFees.feePerL2Gas),
235
245
  new Fr(header.totalManaUsed),
246
+ new Fr(header.accumulatedFees),
236
247
  );
237
248
  }
238
249
 
@@ -260,6 +271,7 @@ export class CheckpointHeader {
260
271
  feePerL2Gas: this.gasFees.feePerL2Gas,
261
272
  },
262
273
  totalManaUsed: this.totalManaUsed.toBigInt(),
274
+ accumulatedFees: this.accumulatedFees.toBigInt(),
263
275
  };
264
276
  }
265
277
 
@@ -276,6 +288,7 @@ export class CheckpointHeader {
276
288
  feeRecipient: this.feeRecipient.toString(),
277
289
  gasFees: this.gasFees.toInspect(),
278
290
  totalManaUsed: this.totalManaUsed.toBigInt(),
291
+ accumulatedFees: this.accumulatedFees.toBigInt(),
279
292
  };
280
293
  }
281
294
 
@@ -292,6 +305,7 @@ export class CheckpointHeader {
292
305
  feeRecipient: ${this.feeRecipient.toString()},
293
306
  gasFees: { da:${this.gasFees.feePerDaGas}, l2:${this.gasFees.feePerL2Gas} },
294
307
  totalManaUsed: ${this.totalManaUsed.toBigInt()},
308
+ accumulatedFees: ${this.accumulatedFees.toBigInt()},
295
309
  }`;
296
310
  }
297
311
  }
@@ -90,8 +90,8 @@ export type ClientCircuitName =
90
90
  | 'private-kernel-inner-2'
91
91
  | 'private-kernel-inner-3'
92
92
  | 'private-kernel-reset'
93
- | 'private-kernel-tail'
94
- | 'private-kernel-tail-to-public'
93
+ | 'private-kernel-reset-tail'
94
+ | 'private-kernel-reset-tail-to-public'
95
95
  | 'hiding-kernel-to-rollup'
96
96
  | 'hiding-kernel-to-public'
97
97
  | 'app-circuit';
@@ -6,7 +6,7 @@ import {
6
6
  } from '@aztec/blob-lib/testing';
7
7
  import {
8
8
  ARCHIVE_HEIGHT,
9
- AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED,
9
+ AVM_V2_PROOF_LENGTH_IN_FIELDS,
10
10
  CHONK_PROOF_LENGTH,
11
11
  CONTRACT_CLASS_LOG_SIZE_IN_FIELDS,
12
12
  L1_TO_L2_MSG_SUBTREE_ROOT_SIBLING_PATH_LENGTH,
@@ -26,6 +26,7 @@ import {
26
26
  MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL,
27
27
  MAX_PRIVATE_LOGS_PER_CALL,
28
28
  MAX_PRIVATE_LOGS_PER_TX,
29
+ MAX_PROCESSABLE_L2_GAS,
29
30
  MAX_PROTOCOL_CONTRACTS,
30
31
  MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX,
31
32
  MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX,
@@ -53,6 +54,8 @@ import type { Bufferable, Serializable, Tuple } from '@aztec/foundation/serializ
53
54
  import { MembershipWitness } from '@aztec/foundation/trees';
54
55
 
55
56
  import { FunctionSelector } from '../abi/function_selector.js';
57
+ import { ContractStorageRead } from '../avm/contract_storage_read.js';
58
+ import { ContractStorageUpdateRequest } from '../avm/contract_storage_update_request.js';
56
59
  import {
57
60
  AvmAccumulatedData,
58
61
  AvmAccumulatedDataArrayLengths,
@@ -79,6 +82,7 @@ import {
79
82
  AvmSequentialInsertHintPublicDataTree,
80
83
  AvmTxHint,
81
84
  } from '../avm/index.js';
85
+ import { PublicDataRead } from '../avm/public_data_read.js';
82
86
  import { PublicDataWrite } from '../avm/public_data_write.js';
83
87
  import { AztecAddress } from '../aztec-address/index.js';
84
88
  import { BlockHash } from '../block/block_hash.js';
@@ -229,7 +233,12 @@ export function makeTxContext(seed: number = 1): TxContext {
229
233
  * Creates a default instance of gas settings. No seed value is used to ensure we allocate a sensible amount of gas for testing.
230
234
  */
231
235
  export function makeGasSettings() {
232
- return GasSettings.fallback({ maxFeesPerGas: new GasFees(10, 10) });
236
+ return GasSettings.fallback({
237
+ // Arbitrary daGas pinned to the pre-existing fixture value so avm_inputs.testdata.bin (consumed by
238
+ // the C++ vm2 tests) stays byte-stable; teardown derives to the same values the old fallback produced.
239
+ gasLimits: new Gas(196_608, MAX_PROCESSABLE_L2_GAS),
240
+ maxFeesPerGas: new GasFees(10, 10),
241
+ });
233
242
  }
234
243
 
235
244
  /**
@@ -267,6 +276,41 @@ export function makePublicDataWrite(seed = 1) {
267
276
  return new PublicDataWrite(fr(seed), fr(seed + 1));
268
277
  }
269
278
 
279
+ /**
280
+ * Creates arbitrary public data read.
281
+ * @param seed - The seed to use for generating the public data read.
282
+ * @returns A public data read.
283
+ */
284
+ export function makePublicDataRead(seed = 1): PublicDataRead {
285
+ return new PublicDataRead(fr(seed), fr(seed + 1), 0);
286
+ }
287
+
288
+ /**
289
+ * Creates empty public data read.
290
+ * @returns An empty public data read.
291
+ */
292
+ export function makeEmptyPublicDataRead(): PublicDataRead {
293
+ return new PublicDataRead(fr(0), fr(0), 0);
294
+ }
295
+
296
+ /**
297
+ * Creates arbitrary contract storage update request.
298
+ * @param seed - The seed to use for generating the contract storage update request.
299
+ * @returns A contract storage update request.
300
+ */
301
+ export function makeContractStorageUpdateRequest(seed = 1): ContractStorageUpdateRequest {
302
+ return new ContractStorageUpdateRequest(fr(seed), fr(seed + 1), seed + 2);
303
+ }
304
+
305
+ /**
306
+ * Creates arbitrary contract storage read.
307
+ * @param seed - The seed to use for generating the contract storage read.
308
+ * @returns A contract storage read.
309
+ */
310
+ export function makeContractStorageRead(seed = 1): ContractStorageRead {
311
+ return new ContractStorageRead(fr(seed), fr(seed + 1), seed + 2);
312
+ }
313
+
270
314
  function makeTxConstantData(seed = 1) {
271
315
  return new TxConstantData(
272
316
  makeBlockHeader(seed),
@@ -648,6 +692,7 @@ export function makePrivateCircuitPublicInputs(seed = 0): PrivateCircuitPublicIn
648
692
  anchorBlockHeader: makeBlockHeader(seed + 0xd00),
649
693
  txContext: makeTxContext(seed + 0x1400),
650
694
  isFeePayer: false,
695
+ txRequestSalt: fr(seed + 0x1500),
651
696
  });
652
697
  }
653
698
 
@@ -659,7 +704,7 @@ export function makeGlobalVariables(seed = 1, overrides: Partial<FieldsOf<Global
659
704
  slotNumber: SlotNumber(seed + 3),
660
705
  timestamp: BigInt(seed + 4),
661
706
  coinbase: EthAddress.fromField(new Fr(seed + 5)),
662
- feeRecipient: AztecAddress.fromField(new Fr(seed + 6)),
707
+ feeRecipient: AztecAddress.fromFieldUnsafe(new Fr(seed + 6)),
663
708
  gasFees: new GasFees(seed + 7, seed + 8),
664
709
  ...compact(overrides),
665
710
  });
@@ -709,7 +754,7 @@ export function makeBytes(size = 32, fill = 1): Buffer {
709
754
  * @returns An aztec address.
710
755
  */
711
756
  export function makeAztecAddress(seed = 1): AztecAddress {
712
- return AztecAddress.fromField(fr(seed));
757
+ return AztecAddress.fromFieldUnsafe(fr(seed));
713
758
  }
714
759
 
715
760
  function makeBlockConstantData(seed = 1, globalVariables?: GlobalVariables) {
@@ -872,6 +917,7 @@ export function makeCheckpointHeader(seed = 0, overrides: Partial<FieldsOf<Check
872
917
  feeRecipient: makeAztecAddress(seed + 0x600),
873
918
  gasFees: makeGasFees(seed + 0x700),
874
919
  totalManaUsed: fr(seed + 0x800),
920
+ accumulatedFees: fr(seed + 0x850),
875
921
  ...overrides,
876
922
  });
877
923
  }
@@ -1117,11 +1163,7 @@ export function makePublicTxBaseRollupPrivateInputs(seed = 0) {
1117
1163
  makePublicChonkVerifierPublicInputs,
1118
1164
  RECURSIVE_ROLLUP_HONK_PROOF_LENGTH,
1119
1165
  );
1120
- const avmProofData = makeProofDataForFixedVk(
1121
- seed + 0x100,
1122
- makeAvmCircuitPublicInputs,
1123
- AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED,
1124
- );
1166
+ const avmProofData = makeProofDataForFixedVk(seed + 0x100, makeAvmCircuitPublicInputs, AVM_V2_PROOF_LENGTH_IN_FIELDS);
1125
1167
  const hints = makePublicBaseRollupHints(seed + 0x200);
1126
1168
 
1127
1169
  return PublicTxBaseRollupPrivateInputs.from({
@@ -1701,10 +1743,6 @@ export function makeL2Tips(
1701
1743
  block: { number: bn, hash },
1702
1744
  checkpoint: { number: cpn, hash: cph },
1703
1745
  },
1704
- proposedCheckpoint: {
1705
- block: { number: bn, hash },
1706
- checkpoint: { number: cpn, hash: cph },
1707
- },
1708
1746
  proven: {
1709
1747
  block: { number: bn, hash },
1710
1748
  checkpoint: { number: cpn, hash: cph },
@@ -1,7 +1,9 @@
1
1
  import {
2
2
  MAX_ENQUEUED_CALLS_PER_TX,
3
3
  MAX_NULLIFIERS_PER_TX,
4
+ MAX_PROCESSABLE_L2_GAS,
4
5
  MAX_TOTAL_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX,
6
+ MAX_TX_DA_GAS,
5
7
  MAX_TX_LIFETIME,
6
8
  PRIVATE_TX_L2_GAS_OVERHEAD,
7
9
  PUBLIC_TX_L2_GAS_OVERHEAD,
@@ -110,7 +112,7 @@ export const mockTx = async (
110
112
  publicCalldataSize = 2,
111
113
  feePayer,
112
114
  chonkProof = ChonkProof.random(),
113
- gasLimits,
115
+ gasLimits = new Gas(MAX_TX_DA_GAS, MAX_PROCESSABLE_L2_GAS),
114
116
  maxFeesPerGas = new GasFees(10, 10),
115
117
  maxPriorityFeesPerGas,
116
118
  gasUsed = Gas.empty(),
@@ -212,7 +214,10 @@ export async function mockProcessedTx({
212
214
  db,
213
215
  chainId = Fr.ZERO,
214
216
  version = Fr.ZERO,
215
- gasSettings = GasSettings.fallback({ maxFeesPerGas: new GasFees(10, 10) }),
217
+ gasSettings = GasSettings.fallback({
218
+ gasLimits: new Gas(MAX_TX_DA_GAS, MAX_PROCESSABLE_L2_GAS),
219
+ maxFeesPerGas: new GasFees(10, 10),
220
+ }),
216
221
  vkTreeRoot = Fr.ZERO,
217
222
  protocolContracts = makeProtocolContracts(seed + 0x100),
218
223
  globalVariables = GlobalVariables.empty(),