@aztec/pxe 0.0.1-commit.b655e406 → 0.0.1-commit.d1f2d6c

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 (388) hide show
  1. package/dest/bin/check_oracle_version.d.ts +1 -1
  2. package/dest/bin/check_oracle_version.js +105 -15
  3. package/dest/block_synchronizer/block_synchronizer.d.ts +43 -0
  4. package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -0
  5. package/dest/block_synchronizer/block_synchronizer.js +147 -0
  6. package/dest/block_synchronizer/index.d.ts +2 -0
  7. package/dest/block_synchronizer/index.d.ts.map +1 -0
  8. package/dest/block_synchronizer/index.js +1 -0
  9. package/dest/config/index.d.ts +6 -12
  10. package/dest/config/index.d.ts.map +1 -1
  11. package/dest/config/index.js +24 -13
  12. package/dest/config/package_info.d.ts +1 -1
  13. package/dest/config/package_info.js +1 -1
  14. package/dest/contract_function_simulator/benchmarked_node.d.ts +9 -0
  15. package/dest/contract_function_simulator/benchmarked_node.d.ts.map +1 -0
  16. package/dest/contract_function_simulator/benchmarked_node.js +77 -0
  17. package/dest/contract_function_simulator/contract_function_simulator.d.ts +44 -16
  18. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  19. package/dest/contract_function_simulator/contract_function_simulator.js +78 -38
  20. package/dest/contract_function_simulator/execution_note_cache.d.ts +25 -14
  21. package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
  22. package/dest/contract_function_simulator/execution_note_cache.js +59 -34
  23. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +2 -2
  24. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -1
  25. package/dest/contract_function_simulator/execution_tagging_index_cache.js +1 -1
  26. package/dest/contract_function_simulator/hashed_values_cache.d.ts +2 -2
  27. package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -1
  28. package/dest/contract_function_simulator/index.d.ts +2 -2
  29. package/dest/contract_function_simulator/index.d.ts.map +1 -1
  30. package/dest/contract_function_simulator/index.js +1 -1
  31. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +4 -3
  32. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
  33. package/dest/contract_function_simulator/noir-structs/event_validation_request.js +5 -2
  34. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +5 -4
  35. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -1
  36. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +7 -6
  37. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +3 -3
  38. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -1
  39. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +1 -1
  40. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +6 -4
  41. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
  42. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +12 -3
  43. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +4 -10
  44. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -1
  45. package/dest/contract_function_simulator/noir-structs/utility_context.js +7 -18
  46. package/dest/contract_function_simulator/oracle/index.d.ts +1 -1
  47. package/dest/contract_function_simulator/oracle/interfaces.d.ts +27 -17
  48. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
  49. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +2 -2
  50. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
  51. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +1 -1
  52. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +14 -8
  53. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
  54. package/dest/contract_function_simulator/oracle/note_packing_utils.js +16 -11
  55. package/dest/contract_function_simulator/oracle/oracle.d.ts +12 -9
  56. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
  57. package/dest/contract_function_simulator/oracle/oracle.js +67 -39
  58. package/dest/contract_function_simulator/oracle/private_execution.d.ts +10 -16
  59. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
  60. package/dest/contract_function_simulator/oracle/private_execution.js +28 -18
  61. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +37 -33
  62. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  63. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +59 -49
  64. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +76 -25
  65. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  66. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +171 -64
  67. package/dest/contract_function_simulator/pick_notes.d.ts +2 -2
  68. package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
  69. package/dest/contract_function_simulator/pick_notes.js +1 -1
  70. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +4 -4
  71. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
  72. package/dest/contract_function_simulator/proxied_contract_data_source.js +23 -5
  73. package/dest/debug/pxe_debug_utils.d.ts +31 -0
  74. package/dest/debug/pxe_debug_utils.d.ts.map +1 -0
  75. package/dest/debug/pxe_debug_utils.js +38 -0
  76. package/dest/entrypoints/client/bundle/index.d.ts +1 -2
  77. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  78. package/dest/entrypoints/client/bundle/index.js +0 -1
  79. package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
  80. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
  81. package/dest/entrypoints/client/bundle/utils.js +13 -4
  82. package/dest/entrypoints/client/lazy/index.d.ts +1 -2
  83. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  84. package/dest/entrypoints/client/lazy/index.js +0 -1
  85. package/dest/entrypoints/client/lazy/utils.d.ts +1 -1
  86. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
  87. package/dest/entrypoints/client/lazy/utils.js +13 -4
  88. package/dest/entrypoints/pxe_creation_options.d.ts +5 -2
  89. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
  90. package/dest/entrypoints/server/index.d.ts +3 -2
  91. package/dest/entrypoints/server/index.d.ts.map +1 -1
  92. package/dest/entrypoints/server/index.js +2 -1
  93. package/dest/entrypoints/server/utils.d.ts +1 -1
  94. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  95. package/dest/entrypoints/server/utils.js +13 -20
  96. package/dest/error_enriching.d.ts +4 -4
  97. package/dest/error_enriching.d.ts.map +1 -1
  98. package/dest/error_enriching.js +6 -6
  99. package/dest/events/event_service.d.ts +16 -0
  100. package/dest/events/event_service.d.ts.map +1 -0
  101. package/dest/events/event_service.js +45 -0
  102. package/dest/events/index.d.ts +2 -0
  103. package/dest/events/index.d.ts.map +1 -0
  104. package/dest/events/index.js +1 -0
  105. package/dest/events/private_event_filter_validator.d.ts +9 -0
  106. package/dest/events/private_event_filter_validator.d.ts.map +1 -0
  107. package/dest/events/private_event_filter_validator.js +38 -0
  108. package/dest/job_coordinator/job_coordinator.d.ts +74 -0
  109. package/dest/job_coordinator/job_coordinator.d.ts.map +1 -0
  110. package/dest/job_coordinator/job_coordinator.js +93 -0
  111. package/dest/logs/log_service.d.ts +27 -0
  112. package/dest/logs/log_service.d.ts.map +1 -0
  113. package/dest/logs/log_service.js +129 -0
  114. package/dest/notes/index.d.ts +2 -0
  115. package/dest/notes/index.d.ts.map +1 -0
  116. package/dest/notes/index.js +1 -0
  117. package/dest/notes/note_service.d.ts +49 -0
  118. package/dest/notes/note_service.d.ts.map +1 -0
  119. package/dest/notes/note_service.js +149 -0
  120. package/dest/oracle_version.d.ts +3 -3
  121. package/dest/oracle_version.d.ts.map +1 -1
  122. package/dest/oracle_version.js +4 -3
  123. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +1 -1
  124. package/dest/private_kernel/hints/index.d.ts +2 -2
  125. package/dest/private_kernel/hints/index.d.ts.map +1 -1
  126. package/dest/private_kernel/hints/index.js +1 -1
  127. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +28 -0
  128. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -0
  129. package/dest/private_kernel/hints/{build_private_kernel_reset_private_inputs.js → private_kernel_reset_private_inputs_builder.js} +19 -13
  130. package/dest/private_kernel/index.d.ts +1 -1
  131. package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
  132. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  133. package/dest/private_kernel/private_kernel_execution_prover.js +15 -15
  134. package/dest/private_kernel/private_kernel_oracle.d.ts +26 -29
  135. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
  136. package/dest/private_kernel/private_kernel_oracle.js +90 -2
  137. package/dest/pxe.d.ts +54 -83
  138. package/dest/pxe.d.ts.map +1 -1
  139. package/dest/pxe.js +193 -241
  140. package/dest/storage/address_store/address_store.d.ts +11 -0
  141. package/dest/storage/address_store/address_store.d.ts.map +1 -0
  142. package/dest/storage/{address_data_provider/address_data_provider.js → address_store/address_store.js} +1 -1
  143. package/dest/storage/address_store/index.d.ts +2 -0
  144. package/dest/storage/address_store/index.d.ts.map +1 -0
  145. package/dest/storage/address_store/index.js +1 -0
  146. package/dest/storage/anchor_block_store/anchor_block_store.d.ts +9 -0
  147. package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -0
  148. package/dest/storage/{sync_data_provider/sync_data_provider.js → anchor_block_store/anchor_block_store.js} +2 -9
  149. package/dest/storage/anchor_block_store/index.d.ts +2 -0
  150. package/dest/storage/anchor_block_store/index.d.ts.map +1 -0
  151. package/dest/storage/anchor_block_store/index.js +1 -0
  152. package/dest/storage/capsule_store/capsule_store.d.ts +72 -0
  153. package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -0
  154. package/dest/storage/capsule_store/capsule_store.js +255 -0
  155. package/dest/storage/capsule_store/index.d.ts +2 -0
  156. package/dest/storage/capsule_store/index.d.ts.map +1 -0
  157. package/dest/storage/capsule_store/index.js +1 -0
  158. package/dest/storage/{contract_data_provider/contract_data_provider.d.ts → contract_store/contract_store.d.ts} +8 -15
  159. package/dest/storage/contract_store/contract_store.d.ts.map +1 -0
  160. package/dest/storage/{contract_data_provider/contract_data_provider.js → contract_store/contract_store.js} +46 -15
  161. package/dest/storage/contract_store/index.d.ts +2 -0
  162. package/dest/storage/contract_store/index.d.ts.map +1 -0
  163. package/dest/storage/contract_store/index.js +1 -0
  164. package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.d.ts +1 -1
  165. package/dest/storage/contract_store/private_functions_tree.d.ts.map +1 -0
  166. package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.js +1 -1
  167. package/dest/storage/index.d.ts +8 -8
  168. package/dest/storage/index.d.ts.map +1 -1
  169. package/dest/storage/index.js +7 -7
  170. package/dest/storage/metadata.d.ts +1 -1
  171. package/dest/storage/note_store/index.d.ts +3 -0
  172. package/dest/storage/note_store/index.d.ts.map +1 -0
  173. package/dest/storage/note_store/index.js +2 -0
  174. package/dest/storage/note_store/note_store.d.ts +73 -0
  175. package/dest/storage/note_store/note_store.d.ts.map +1 -0
  176. package/dest/storage/note_store/note_store.js +303 -0
  177. package/dest/storage/note_store/stored_note.d.ts +16 -0
  178. package/dest/storage/note_store/stored_note.d.ts.map +1 -0
  179. package/dest/storage/note_store/stored_note.js +43 -0
  180. package/dest/storage/private_event_store/private_event_store.d.ts +91 -0
  181. package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -0
  182. package/dest/storage/private_event_store/private_event_store.js +250 -0
  183. package/dest/storage/private_event_store/stored_private_event.d.ts +23 -0
  184. package/dest/storage/private_event_store/stored_private_event.d.ts.map +1 -0
  185. package/dest/storage/private_event_store/stored_private_event.js +56 -0
  186. package/dest/storage/tagging_store/index.d.ts +4 -0
  187. package/dest/storage/tagging_store/index.d.ts.map +1 -0
  188. package/dest/storage/tagging_store/index.js +3 -0
  189. package/dest/storage/tagging_store/recipient_tagging_store.d.ts +28 -0
  190. package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -0
  191. package/dest/storage/tagging_store/recipient_tagging_store.js +99 -0
  192. package/dest/storage/tagging_store/sender_address_book_store.d.ts +14 -0
  193. package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +1 -0
  194. package/dest/storage/tagging_store/sender_address_book_store.js +30 -0
  195. package/dest/storage/tagging_store/sender_tagging_store.d.ts +77 -0
  196. package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -0
  197. package/dest/storage/tagging_store/sender_tagging_store.js +278 -0
  198. package/dest/tagging/constants.d.ts +2 -2
  199. package/dest/tagging/constants.d.ts.map +1 -1
  200. package/dest/tagging/constants.js +10 -2
  201. package/dest/tagging/get_all_logs_by_tags.d.ts +24 -0
  202. package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -0
  203. package/dest/tagging/get_all_logs_by_tags.js +46 -0
  204. package/dest/tagging/index.d.ts +16 -6
  205. package/dest/tagging/index.d.ts.map +1 -1
  206. package/dest/tagging/index.js +15 -5
  207. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +15 -0
  208. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -0
  209. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +99 -0
  210. package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts +12 -0
  211. package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts.map +1 -0
  212. package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +20 -0
  213. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +15 -0
  214. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -0
  215. package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +32 -0
  216. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +21 -0
  217. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -0
  218. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +74 -0
  219. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +11 -0
  220. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -0
  221. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +29 -0
  222. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +21 -0
  223. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -0
  224. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +60 -0
  225. package/package.json +20 -19
  226. package/src/bin/check_oracle_version.ts +130 -20
  227. package/src/block_synchronizer/block_synchronizer.ts +174 -0
  228. package/src/block_synchronizer/index.ts +1 -0
  229. package/src/config/index.ts +24 -25
  230. package/src/config/package_info.ts +1 -1
  231. package/src/contract_function_simulator/benchmarked_node.ts +103 -0
  232. package/src/contract_function_simulator/contract_function_simulator.ts +127 -42
  233. package/src/contract_function_simulator/execution_note_cache.ts +58 -28
  234. package/src/contract_function_simulator/execution_tagging_index_cache.ts +1 -1
  235. package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
  236. package/src/contract_function_simulator/index.ts +1 -1
  237. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +5 -1
  238. package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +6 -5
  239. package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +2 -2
  240. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +14 -2
  241. package/src/contract_function_simulator/noir-structs/utility_context.ts +6 -25
  242. package/src/contract_function_simulator/oracle/interfaces.ts +40 -15
  243. package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
  244. package/src/contract_function_simulator/oracle/note_packing_utils.ts +30 -14
  245. package/src/contract_function_simulator/oracle/oracle.ts +86 -41
  246. package/src/contract_function_simulator/oracle/private_execution.ts +42 -30
  247. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +139 -60
  248. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +260 -70
  249. package/src/contract_function_simulator/pick_notes.ts +1 -1
  250. package/src/contract_function_simulator/proxied_contract_data_source.ts +24 -7
  251. package/src/debug/pxe_debug_utils.ts +49 -0
  252. package/src/entrypoints/client/bundle/index.ts +0 -1
  253. package/src/entrypoints/client/bundle/utils.ts +10 -4
  254. package/src/entrypoints/client/lazy/index.ts +0 -1
  255. package/src/entrypoints/client/lazy/utils.ts +10 -5
  256. package/src/entrypoints/pxe_creation_options.ts +4 -1
  257. package/src/entrypoints/server/index.ts +2 -1
  258. package/src/entrypoints/server/utils.ts +13 -31
  259. package/src/error_enriching.ts +7 -15
  260. package/src/events/event_service.ts +73 -0
  261. package/src/events/index.ts +1 -0
  262. package/src/events/private_event_filter_validator.ts +46 -0
  263. package/src/job_coordinator/job_coordinator.ts +149 -0
  264. package/src/logs/log_service.ts +221 -0
  265. package/src/notes/index.ts +1 -0
  266. package/src/notes/note_service.ts +198 -0
  267. package/src/oracle_version.ts +4 -3
  268. package/src/private_kernel/hints/index.ts +1 -1
  269. package/src/private_kernel/hints/{build_private_kernel_reset_private_inputs.ts → private_kernel_reset_private_inputs_builder.ts} +38 -31
  270. package/src/private_kernel/private_kernel_execution_prover.ts +15 -21
  271. package/src/private_kernel/private_kernel_oracle.ts +118 -37
  272. package/src/pxe.ts +263 -313
  273. package/src/storage/{address_data_provider/address_data_provider.ts → address_store/address_store.ts} +1 -1
  274. package/src/storage/address_store/index.ts +1 -0
  275. package/src/storage/{sync_data_provider/sync_data_provider.ts → anchor_block_store/anchor_block_store.ts} +2 -11
  276. package/src/storage/anchor_block_store/index.ts +1 -0
  277. package/src/storage/capsule_store/capsule_store.ts +315 -0
  278. package/src/storage/capsule_store/index.ts +1 -0
  279. package/src/storage/{contract_data_provider/contract_data_provider.ts → contract_store/contract_store.ts} +65 -20
  280. package/src/storage/contract_store/index.ts +1 -0
  281. package/src/storage/{contract_data_provider → contract_store}/private_functions_tree.ts +1 -1
  282. package/src/storage/index.ts +7 -7
  283. package/src/storage/note_store/index.ts +2 -0
  284. package/src/storage/note_store/note_store.ts +381 -0
  285. package/src/storage/note_store/stored_note.ts +48 -0
  286. package/src/storage/private_event_store/private_event_store.ts +363 -0
  287. package/src/storage/private_event_store/stored_private_event.ts +73 -0
  288. package/src/storage/tagging_store/index.ts +3 -0
  289. package/src/storage/tagging_store/recipient_tagging_store.ts +129 -0
  290. package/src/storage/tagging_store/sender_address_book_store.ts +42 -0
  291. package/src/storage/tagging_store/sender_tagging_store.ts +345 -0
  292. package/src/tagging/constants.ts +10 -2
  293. package/src/tagging/get_all_logs_by_tags.ts +68 -0
  294. package/src/tagging/index.ts +18 -5
  295. package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +143 -0
  296. package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +34 -0
  297. package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +49 -0
  298. package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +99 -0
  299. package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +36 -0
  300. package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +84 -0
  301. package/dest/contract_function_simulator/execution_data_provider.d.ts +0 -274
  302. package/dest/contract_function_simulator/execution_data_provider.d.ts.map +0 -1
  303. package/dest/contract_function_simulator/execution_data_provider.js +0 -14
  304. package/dest/contract_function_simulator/proxied_node.d.ts +0 -9
  305. package/dest/contract_function_simulator/proxied_node.d.ts.map +0 -1
  306. package/dest/contract_function_simulator/proxied_node.js +0 -27
  307. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +0 -122
  308. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +0 -1
  309. package/dest/contract_function_simulator/pxe_oracle_interface.js +0 -701
  310. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +0 -28
  311. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +0 -1
  312. package/dest/private_kernel/private_kernel_oracle_impl.d.ts +0 -45
  313. package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +0 -1
  314. package/dest/private_kernel/private_kernel_oracle_impl.js +0 -86
  315. package/dest/storage/address_data_provider/address_data_provider.d.ts +0 -11
  316. package/dest/storage/address_data_provider/address_data_provider.d.ts.map +0 -1
  317. package/dest/storage/address_data_provider/index.d.ts +0 -2
  318. package/dest/storage/address_data_provider/index.d.ts.map +0 -1
  319. package/dest/storage/address_data_provider/index.js +0 -1
  320. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +0 -25
  321. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +0 -1
  322. package/dest/storage/capsule_data_provider/capsule_data_provider.js +0 -118
  323. package/dest/storage/capsule_data_provider/index.d.ts +0 -2
  324. package/dest/storage/capsule_data_provider/index.d.ts.map +0 -1
  325. package/dest/storage/capsule_data_provider/index.js +0 -1
  326. package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +0 -1
  327. package/dest/storage/contract_data_provider/index.d.ts +0 -2
  328. package/dest/storage/contract_data_provider/index.d.ts.map +0 -1
  329. package/dest/storage/contract_data_provider/index.js +0 -1
  330. package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +0 -1
  331. package/dest/storage/note_data_provider/index.d.ts +0 -3
  332. package/dest/storage/note_data_provider/index.d.ts.map +0 -1
  333. package/dest/storage/note_data_provider/index.js +0 -2
  334. package/dest/storage/note_data_provider/note_dao.d.ts +0 -100
  335. package/dest/storage/note_data_provider/note_dao.d.ts.map +0 -1
  336. package/dest/storage/note_data_provider/note_dao.js +0 -102
  337. package/dest/storage/note_data_provider/note_data_provider.d.ts +0 -83
  338. package/dest/storage/note_data_provider/note_data_provider.d.ts.map +0 -1
  339. package/dest/storage/note_data_provider/note_data_provider.js +0 -308
  340. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +0 -43
  341. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +0 -1
  342. package/dest/storage/private_event_data_provider/private_event_data_provider.js +0 -104
  343. package/dest/storage/sync_data_provider/index.d.ts +0 -2
  344. package/dest/storage/sync_data_provider/index.d.ts.map +0 -1
  345. package/dest/storage/sync_data_provider/index.js +0 -1
  346. package/dest/storage/sync_data_provider/sync_data_provider.d.ts +0 -10
  347. package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +0 -1
  348. package/dest/storage/tagging_data_provider/index.d.ts +0 -2
  349. package/dest/storage/tagging_data_provider/index.d.ts.map +0 -1
  350. package/dest/storage/tagging_data_provider/index.js +0 -1
  351. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +0 -40
  352. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +0 -1
  353. package/dest/storage/tagging_data_provider/tagging_data_provider.js +0 -89
  354. package/dest/synchronizer/index.d.ts +0 -2
  355. package/dest/synchronizer/index.d.ts.map +0 -1
  356. package/dest/synchronizer/index.js +0 -1
  357. package/dest/synchronizer/synchronizer.d.ts +0 -35
  358. package/dest/synchronizer/synchronizer.d.ts.map +0 -1
  359. package/dest/synchronizer/synchronizer.js +0 -101
  360. package/dest/tagging/siloed_tag.d.ts +0 -14
  361. package/dest/tagging/siloed_tag.d.ts.map +0 -1
  362. package/dest/tagging/siloed_tag.js +0 -20
  363. package/dest/tagging/tag.d.ts +0 -12
  364. package/dest/tagging/tag.d.ts.map +0 -1
  365. package/dest/tagging/tag.js +0 -17
  366. package/dest/tagging/utils.d.ts +0 -18
  367. package/dest/tagging/utils.d.ts.map +0 -1
  368. package/dest/tagging/utils.js +0 -24
  369. package/src/contract_function_simulator/execution_data_provider.ts +0 -343
  370. package/src/contract_function_simulator/proxied_node.ts +0 -33
  371. package/src/contract_function_simulator/pxe_oracle_interface.ts +0 -1019
  372. package/src/private_kernel/private_kernel_oracle_impl.ts +0 -132
  373. package/src/storage/address_data_provider/index.ts +0 -1
  374. package/src/storage/capsule_data_provider/capsule_data_provider.ts +0 -147
  375. package/src/storage/capsule_data_provider/index.ts +0 -1
  376. package/src/storage/contract_data_provider/index.ts +0 -1
  377. package/src/storage/note_data_provider/index.ts +0 -2
  378. package/src/storage/note_data_provider/note_dao.ts +0 -154
  379. package/src/storage/note_data_provider/note_data_provider.ts +0 -393
  380. package/src/storage/private_event_data_provider/private_event_data_provider.ts +0 -148
  381. package/src/storage/sync_data_provider/index.ts +0 -1
  382. package/src/storage/tagging_data_provider/index.ts +0 -1
  383. package/src/storage/tagging_data_provider/tagging_data_provider.ts +0 -120
  384. package/src/synchronizer/index.ts +0 -1
  385. package/src/synchronizer/synchronizer.ts +0 -120
  386. package/src/tagging/siloed_tag.ts +0 -22
  387. package/src/tagging/tag.ts +0 -16
  388. package/src/tagging/utils.ts +0 -31
@@ -1,13 +1,12 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { type ACVMWitness, type CircuitSimulator } from '@aztec/simulator/client';
3
- import { type FunctionArtifact, type FunctionArtifactWithContractName, type FunctionSelector } from '@aztec/stdlib/abi';
3
+ import { type FunctionArtifact, type FunctionArtifactWithContractName, type FunctionCall, type FunctionSelector } from '@aztec/stdlib/abi';
4
4
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
5
5
  import type { ContractInstance } from '@aztec/stdlib/contract';
6
6
  import type { AztecNode } from '@aztec/stdlib/interfaces/client';
7
7
  import { PrivateCircuitPublicInputs } from '@aztec/stdlib/kernel';
8
8
  import { BlockHeader, PrivateCallExecutionResult } from '@aztec/stdlib/tx';
9
- import type { UInt64 } from '@aztec/stdlib/types';
10
- import type { ExecutionDataProvider } from '../execution_data_provider.js';
9
+ import { ContractStore } from '../../storage/contract_store/index.js';
11
10
  import type { PrivateExecutionOracle } from './private_execution_oracle.js';
12
11
  /**
13
12
  * Execute a private function and return the execution result.
@@ -30,19 +29,14 @@ export declare function extractPrivateCircuitPublicInputs(artifact: FunctionArti
30
29
  * from the instance is used.
31
30
  * @param contractAddress - The address of the contract to read the class id for.
32
31
  * @param instance - The instance of the contract.
33
- * @param executionDataProvider - The execution data provider.
34
- * @param blockNumber - The block number at which to load the DelayedPublicMutable storing the class id.
35
- * @param timestamp - The timestamp at which to obtain the class id from the DelayedPublicMutable.
32
+ * @param aztecNode - The Aztec node to query for storage.
33
+ * @param header - The header of the block at which to load the DelayedPublicMutable storing the class id.
36
34
  * @returns The current class id.
37
35
  */
38
- export declare function readCurrentClassId(contractAddress: AztecAddress, instance: ContractInstance, executionDataProvider: ExecutionDataProvider | AztecNode, blockNumber: number, timestamp: UInt64): Promise<Fr>;
36
+ export declare function readCurrentClassId(contractAddress: AztecAddress, instance: ContractInstance, aztecNode: AztecNode, header: BlockHeader): Promise<Fr>;
39
37
  /**
40
- * Verify that the current class id of a contract obtained from AztecNode is the same as the one in the execution data
41
- * provider (i.e. PXE).
42
- * @param contractAddress - The address of the contract to verify class id for.
43
- * @param executionDataProvider - The execution data provider.
44
- * @param header - The header of the block at which to verify the current class id. If not provided, the anchor block
45
- * header of the execution data provider is used.
38
+ * Ensures the contract's private state is synchronized and that the PXE holds the current class artifact for
39
+ * the contract.
46
40
  */
47
- export declare function verifyCurrentClassId(contractAddress: AztecAddress, executionDataProvider: ExecutionDataProvider, header?: BlockHeader): Promise<void>;
48
- //# sourceMappingURL=private_execution.d.ts.map
41
+ export declare function ensureContractSynced(contractAddress: AztecAddress, functionToInvokeAfterSync: FunctionSelector | null, utilityExecutor: (call: FunctionCall) => Promise<any>, aztecNode: AztecNode, contractStore: ContractStore, header: BlockHeader): Promise<void>;
42
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9leGVjdXRpb24uZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb250cmFjdF9mdW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2xDLEdBQUcseUNBQThDLEdBQ2hELE9BQU8sQ0FBQywwQkFBMEIsQ0FBQyxDQTJFckM7QUFFRDs7Ozs7R0FLRztBQUNILHdCQUFnQixpQ0FBaUMsQ0FDL0MsUUFBUSxFQUFFLGdCQUFnQixFQUMxQixjQUFjLEVBQUUsV0FBVyxHQUMxQiwwQkFBMEIsQ0FhNUI7QUFFRDs7Ozs7Ozs7R0FRRztBQUNILHdCQUFzQixrQkFBa0IsQ0FDdEMsZUFBZSxFQUFFLFlBQVksRUFDN0IsUUFBUSxFQUFFLGdCQUFnQixFQUMxQixTQUFTLEVBQUUsU0FBUyxFQUNwQixNQUFNLEVBQUUsV0FBVyxlQWNwQjtBQTBCRDs7O0dBR0c7QUFDSCx3QkFBc0Isb0JBQW9CLENBQ3hDLGVBQWUsRUFBRSxZQUFZLEVBQzdCLHlCQUF5QixFQUFFLGdCQUFnQixHQUFHLElBQUksRUFDbEQsZUFBZSxFQUFFLENBQUMsSUFBSSxFQUFFLFlBQVksS0FBSyxPQUFPLENBQUMsR0FBRyxDQUFDLEVBQ3JELFNBQVMsRUFBRSxTQUFTLEVBQ3BCLGFBQWEsRUFBRSxhQUFhLEVBQzVCLE1BQU0sRUFBRSxXQUFXLEdBQ2xCLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FLZiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"private_execution.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/private_execution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAI9C,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EAKtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gCAAgC,EACrC,KAAK,gBAAgB,EAEtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,gBAAgB,EAC3B,sBAAsB,EAAE,sBAAsB,EAC9C,QAAQ,EAAE,gCAAgC,EAC1C,eAAe,EAAE,YAAY,EAC7B,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,yCAA8C,GAChD,OAAO,CAAC,0BAA0B,CAAC,CA6ErC;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,gBAAgB,EAC1B,cAAc,EAAE,WAAW,GAC1B,0BAA0B,CAa5B;AAED;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,eAAe,EAAE,YAAY,EAC7B,QAAQ,EAAE,gBAAgB,EAC1B,qBAAqB,EAAE,qBAAqB,GAAG,SAAS,EACxD,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,eAWlB;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,eAAe,EAAE,YAAY,EAC7B,qBAAqB,EAAE,qBAAqB,EAC5C,MAAM,CAAC,EAAE,WAAW,iBAiBrB"}
1
+ {"version":3,"file":"private_execution.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/private_execution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAIpD,OAAO,E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AAE,YAAY,KAAK,OAAO,CAAC,GAAG,CAAC,EACrD,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC,CAKf"}
@@ -1,10 +1,11 @@
1
1
  import { PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH, PRIVATE_CONTEXT_INPUTS_LENGTH } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { createLogger } from '@aztec/foundation/log';
4
4
  import { Timer } from '@aztec/foundation/timer';
5
5
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
6
6
  import { ExecutionError, extractCallStack, resolveAssertionMessageFromError, witnessMapToFields } from '@aztec/simulator/client';
7
7
  import { countArgumentsSize } from '@aztec/stdlib/abi';
8
+ import { L2BlockHash } from '@aztec/stdlib/block';
8
9
  import { DelayedPublicMutableValues, DelayedPublicMutableValuesWithHash } from '@aztec/stdlib/delayed-public-mutable';
9
10
  import { PrivateCircuitPublicInputs } from '@aztec/stdlib/kernel';
10
11
  import { PrivateCallExecutionResult } from '@aztec/stdlib/tx';
@@ -48,7 +49,6 @@ import { Oracle } from './oracle.js';
48
49
  });
49
50
  const contractClassLogs = privateExecutionOracle.getContractClassLogs();
50
51
  const rawReturnValues = await privateExecutionOracle.privateLoadFromExecutionCache(publicInputs.returnsHash);
51
- const noteHashLeafIndexMap = privateExecutionOracle.getNoteHashLeafIndexMap();
52
52
  const newNotes = privateExecutionOracle.getNewNotes();
53
53
  const noteHashNullifierCounterMap = privateExecutionOracle.getNoteHashNullifierCounterMap();
54
54
  const offchainEffects = privateExecutionOracle.getOffchainEffects();
@@ -62,7 +62,7 @@ import { Oracle } from './oracle.js';
62
62
  timerSubtractionList = timerSubtractionList.flatMap((nested)=>nested.nestedExecutionResults ?? []);
63
63
  }
64
64
  log.debug(`Returning from call to ${contractAddress.toString()}:${functionSelector}`);
65
- return new PrivateCallExecutionResult(artifact.bytecode, Buffer.from(artifact.verificationKey, 'base64'), partialWitness, publicInputs, noteHashLeafIndexMap, newNotes, noteHashNullifierCounterMap, rawReturnValues, offchainEffects, preTags, nestedExecutionResults, contractClassLogs, {
65
+ return new PrivateCallExecutionResult(artifact.bytecode, Buffer.from(artifact.verificationKey, 'base64'), partialWitness, publicInputs, newNotes, noteHashNullifierCounterMap, rawReturnValues, offchainEffects, preTags, nestedExecutionResults, contractClassLogs, {
66
66
  timings: {
67
67
  witgen: witgenTime,
68
68
  oracles: acirExecutionResult.oracles
@@ -93,13 +93,15 @@ import { Oracle } from './oracle.js';
93
93
  * from the instance is used.
94
94
  * @param contractAddress - The address of the contract to read the class id for.
95
95
  * @param instance - The instance of the contract.
96
- * @param executionDataProvider - The execution data provider.
97
- * @param blockNumber - The block number at which to load the DelayedPublicMutable storing the class id.
98
- * @param timestamp - The timestamp at which to obtain the class id from the DelayedPublicMutable.
96
+ * @param aztecNode - The Aztec node to query for storage.
97
+ * @param header - The header of the block at which to load the DelayedPublicMutable storing the class id.
99
98
  * @returns The current class id.
100
- */ export async function readCurrentClassId(contractAddress, instance, executionDataProvider, blockNumber, timestamp) {
99
+ */ export async function readCurrentClassId(contractAddress, instance, aztecNode, header) {
100
+ const blockHashFr = await header.hash();
101
+ const blockHash = L2BlockHash.fromField(blockHashFr);
102
+ const timestamp = header.globalVariables.timestamp;
101
103
  const { delayedPublicMutableSlot } = await DelayedPublicMutableValuesWithHash.getContractUpdateSlots(contractAddress);
102
- const delayedPublicMutableValues = await DelayedPublicMutableValues.readFromTree(delayedPublicMutableSlot, (slot)=>executionDataProvider.getPublicStorageAt(blockNumber, ProtocolContractAddress.ContractInstanceRegistry, slot));
104
+ const delayedPublicMutableValues = await DelayedPublicMutableValues.readFromTree(delayedPublicMutableSlot, (slot)=>aztecNode.getPublicStorageAt(blockHash, ProtocolContractAddress.ContractInstanceRegistry, slot));
103
105
  let currentClassId = delayedPublicMutableValues.svc.getCurrentAt(timestamp)[0];
104
106
  if (currentClassId.isZero()) {
105
107
  currentClassId = instance.originalContractClassId;
@@ -107,17 +109,25 @@ import { Oracle } from './oracle.js';
107
109
  return currentClassId;
108
110
  }
109
111
  /**
110
- * Verify that the current class id of a contract obtained from AztecNode is the same as the one in the execution data
111
- * provider (i.e. PXE).
112
- * @param contractAddress - The address of the contract to verify class id for.
113
- * @param executionDataProvider - The execution data provider.
114
- * @param header - The header of the block at which to verify the current class id. If not provided, the anchor block
115
- * header of the execution data provider is used.
116
- */ export async function verifyCurrentClassId(contractAddress, executionDataProvider, header) {
117
- header = header ?? await executionDataProvider.getAnchorBlockHeader();
118
- const instance = await executionDataProvider.getContractInstance(contractAddress);
119
- const currentClassId = await readCurrentClassId(contractAddress, instance, executionDataProvider, header.globalVariables.blockNumber, header.globalVariables.timestamp);
112
+ * Verify that the current class id of a contract obtained from AztecNode is the same as the one in contract data
113
+ * provider (i.e. PXE's own storage).
114
+ * @param header - The header of the block at which to verify the current class id.
115
+ */ async function verifyCurrentClassId(contractAddress, aztecNode, contractStore, header) {
116
+ const instance = await contractStore.getContractInstance(contractAddress);
117
+ if (!instance) {
118
+ throw new Error(`No contract instance found for address ${contractAddress.toString()}`);
119
+ }
120
+ const currentClassId = await readCurrentClassId(contractAddress, instance, aztecNode, header);
120
121
  if (!instance.currentContractClassId.equals(currentClassId)) {
121
122
  throw new Error(`Contract ${contractAddress} is outdated, current class id is ${currentClassId}, local class id is ${instance.currentContractClassId}`);
122
123
  }
123
124
  }
125
+ /**
126
+ * Ensures the contract's private state is synchronized and that the PXE holds the current class artifact for
127
+ * the contract.
128
+ */ export async function ensureContractSynced(contractAddress, functionToInvokeAfterSync, utilityExecutor, aztecNode, contractStore, header) {
129
+ await Promise.all([
130
+ contractStore.syncPrivateState(contractAddress, functionToInvokeAfterSync, utilityExecutor),
131
+ verifyCurrentClassId(contractAddress, aztecNode, contractStore, header)
132
+ ]);
133
+ }
@@ -1,14 +1,24 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
+ import type { KeyStore } from '@aztec/key-store';
2
3
  import { type CircuitSimulator } from '@aztec/simulator/client';
3
- import { type FunctionAbi, FunctionSelector, type NoteSelector } from '@aztec/stdlib/abi';
4
+ import { type FunctionAbi, type FunctionCall, FunctionSelector, type NoteSelector } from '@aztec/stdlib/abi';
4
5
  import type { AuthWitness } from '@aztec/stdlib/auth-witness';
5
6
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
7
+ import type { AztecNode } from '@aztec/stdlib/interfaces/client';
6
8
  import { PrivateContextInputs } from '@aztec/stdlib/kernel';
7
- import type { ContractClassLog, PreTag } from '@aztec/stdlib/logs';
9
+ import { type ContractClassLog, type PreTag } from '@aztec/stdlib/logs';
10
+ import { Tag } from '@aztec/stdlib/logs';
8
11
  import { type NoteStatus } from '@aztec/stdlib/note';
9
12
  import { type BlockHeader, CallContext, Capsule, CountedContractClassLog, NoteAndSlot, PrivateCallExecutionResult, type TxContext } from '@aztec/stdlib/tx';
10
- import { Tag } from '../../tagging/tag.js';
11
- import type { ExecutionDataProvider } from '../execution_data_provider.js';
13
+ import type { AddressStore } from '../../storage/address_store/address_store.js';
14
+ import type { AnchorBlockStore } from '../../storage/anchor_block_store/anchor_block_store.js';
15
+ import type { CapsuleStore } from '../../storage/capsule_store/capsule_store.js';
16
+ import type { ContractStore } from '../../storage/contract_store/contract_store.js';
17
+ import type { NoteStore } from '../../storage/note_store/note_store.js';
18
+ import type { PrivateEventStore } from '../../storage/private_event_store/private_event_store.js';
19
+ import type { RecipientTaggingStore } from '../../storage/tagging_store/recipient_tagging_store.js';
20
+ import type { SenderAddressBookStore } from '../../storage/tagging_store/sender_address_book_store.js';
21
+ import type { SenderTaggingStore } from '../../storage/tagging_store/sender_tagging_store.js';
12
22
  import type { ExecutionNoteCache } from '../execution_note_cache.js';
13
23
  import { ExecutionTaggingIndexCache } from '../execution_tagging_index_cache.js';
14
24
  import type { HashedValuesCache } from '../hashed_values_cache.js';
@@ -24,9 +34,12 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle imple
24
34
  private readonly callContext;
25
35
  /** Header of a block whose state is used during private execution (not the block the transaction is included in). */
26
36
  protected readonly anchorBlockHeader: BlockHeader;
37
+ /** Needed to trigger contract synchronization before nested calls */
38
+ private readonly utilityExecutor;
27
39
  private readonly executionCache;
28
40
  private readonly noteCache;
29
41
  private readonly taggingIndexCache;
42
+ private readonly senderTaggingStore;
30
43
  private totalPublicCalldataCount;
31
44
  protected sideEffectCounter: number;
32
45
  private senderForTags?;
@@ -41,16 +54,6 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle imple
41
54
  * Users can also use this to get a clearer idea of what's happened during a simulation.
42
55
  */
43
56
  private newNotes;
44
- /**
45
- * Notes from previous transactions that are returned to the oracle call `getNotes` during this execution.
46
- * The mapping maps from the unique siloed note hash to the index for notes created in private executions.
47
- * It maps from siloed note hash to the index for notes created by public functions.
48
- *
49
- * They are not part of the ExecutionNoteCache and being forwarded to nested contexts via `extend()`
50
- * because these notes are meant to be maintained on a per-call basis
51
- * They should act as references for the read requests output by an app circuit via public inputs.
52
- */
53
- private noteHashLeafIndexMap;
54
57
  private noteHashNullifierCounterMap;
55
58
  private contractClassLogs;
56
59
  private offchainEffects;
@@ -58,8 +61,10 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle imple
58
61
  constructor(argsHash: Fr, txContext: TxContext, callContext: CallContext,
59
62
  /** Header of a block whose state is used during private execution (not the block the transaction is included in). */
60
63
  anchorBlockHeader: BlockHeader,
64
+ /** Needed to trigger contract synchronization before nested calls */
65
+ utilityExecutor: (call: FunctionCall) => Promise<void>,
61
66
  /** List of transient auth witnesses to be used during this simulation */
62
- authWitnesses: AuthWitness[], capsules: Capsule[], executionCache: HashedValuesCache, noteCache: ExecutionNoteCache, taggingIndexCache: ExecutionTaggingIndexCache, executionDataProvider: ExecutionDataProvider, totalPublicCalldataCount?: number, sideEffectCounter?: number, log?: import("@aztec/foundation/log").Logger, scopes?: AztecAddress[], senderForTags?: AztecAddress | undefined, simulator?: CircuitSimulator | undefined);
67
+ authWitnesses: AuthWitness[], capsules: Capsule[], executionCache: HashedValuesCache, noteCache: ExecutionNoteCache, taggingIndexCache: ExecutionTaggingIndexCache, contractStore: ContractStore, noteStore: NoteStore, keyStore: KeyStore, addressStore: AddressStore, aztecNode: AztecNode, anchorBlockStore: AnchorBlockStore, senderTaggingStore: SenderTaggingStore, recipientTaggingStore: RecipientTaggingStore, senderAddressBookStore: SenderAddressBookStore, capsuleStore: CapsuleStore, privateEventStore: PrivateEventStore, jobId: string, totalPublicCalldataCount?: number, sideEffectCounter?: number, log?: import("@aztec/foundation/log").Logger, scopes?: AztecAddress[], senderForTags?: AztecAddress | undefined, simulator?: CircuitSimulator | undefined);
63
68
  getPrivateContextInputs(): PrivateContextInputs;
64
69
  /**
65
70
  * Writes the function inputs to the initial witness.
@@ -67,11 +72,6 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle imple
67
72
  * @returns The initial witness.
68
73
  */
69
74
  getInitialWitness(abi: FunctionAbi): Map<number, string>;
70
- /**
71
- * The KernelProver will use this to fully populate witnesses and provide hints to the kernel circuit
72
- * regarding which note hash each settled read request corresponds to.
73
- */
74
- getNoteHashLeafIndexMap(): Map<bigint, bigint>;
75
75
  /**
76
76
  * Get the data for the newly created notes.
77
77
  */
@@ -88,7 +88,7 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle imple
88
88
  data: Fr[];
89
89
  }[];
90
90
  /**
91
- * Returns the pre tags that were used in this execution (and that need to be stored in the db).
91
+ * Returns the pre-tags that were used in this execution (and that need to be stored in the db).
92
92
  */
93
93
  getUsedPreTags(): PreTag[];
94
94
  /**
@@ -146,6 +146,7 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle imple
146
146
  * Real notes coming from DB will have a leafIndex which
147
147
  * represents their index in the note hash tree.
148
148
  *
149
+ * @param owner - The owner of the notes. If undefined, returns notes for all owners.
149
150
  * @param storageSlot - The storage slot.
150
151
  * @param numSelects - The number of valid selects in selectBy and selectValues.
151
152
  * @param selectBy - An array of indices of the fields to selects.
@@ -158,18 +159,19 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle imple
158
159
  * @param status - The status of notes to fetch.
159
160
  * @returns Array of note data.
160
161
  */
161
- utilityGetNotes(storageSlot: Fr, numSelects: number, selectByIndexes: number[], selectByOffsets: number[], selectByLengths: number[], selectValues: Fr[], selectComparators: number[], sortByIndexes: number[], sortByOffsets: number[], sortByLengths: number[], sortOrder: number[], limit: number, offset: number, status: NoteStatus): Promise<NoteData[]>;
162
+ utilityGetNotes(owner: AztecAddress | undefined, storageSlot: Fr, numSelects: number, selectByIndexes: number[], selectByOffsets: number[], selectByLengths: number[], selectValues: Fr[], selectComparators: number[], sortByIndexes: number[], sortByOffsets: number[], sortByLengths: number[], sortOrder: number[], limit: number, offset: number, status: NoteStatus): Promise<NoteData[]>;
162
163
  /**
163
164
  * Keep track of the new note created during execution.
164
165
  * It can be used in subsequent calls (or transactions when chaining txs is possible).
165
- * @param contractAddress - The contract address.
166
+ * @param owner - The owner of the note.
166
167
  * @param storageSlot - The storage slot.
168
+ * @param randomness - The randomness injected into the note.
167
169
  * @param noteTypeId - The type ID of the note.
168
170
  * @param noteItems - The items to be included in a Note.
169
171
  * @param noteHash - A hash of the new note.
170
172
  * @returns
171
173
  */
172
- privateNotifyCreatedNote(storageSlot: Fr, noteTypeId: NoteSelector, noteItems: Fr[], noteHash: Fr, counter: number): void;
174
+ privateNotifyCreatedNote(owner: AztecAddress, storageSlot: Fr, randomness: Fr, noteTypeId: NoteSelector, noteItems: Fr[], noteHash: Fr, counter: number): void;
173
175
  /**
174
176
  * Adding a siloed nullifier into the current set of all pending nullifiers created
175
177
  * within the current transaction/execution.
@@ -184,6 +186,14 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle imple
184
186
  * @param noteHash - A hash of the new note.
185
187
  */
186
188
  privateNotifyCreatedNullifier(innerNullifier: Fr): Promise<void>;
189
+ /**
190
+ * Check if a nullifier has been emitted in the same transaction, i.e. if privateNotifyCreatedNullifier has been
191
+ * called for this inner nullifier from the contract with the specified address.
192
+ * @param innerNullifier - The inner nullifier to check.
193
+ * @param contractAddress - Address of the contract that emitted the nullifier.
194
+ * @returns A boolean indicating whether the nullifier is pending or not.
195
+ */
196
+ privateIsNullifierPending(innerNullifier: Fr, contractAddress: AztecAddress): Promise<boolean>;
187
197
  /**
188
198
  * Emit a contract class log.
189
199
  * This fn exists because we only carry a poseidon hash through the kernels, and need to
@@ -222,15 +232,9 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle imple
222
232
  */
223
233
  privateNotifySetPublicTeardownFunctionCall(_targetContractAddress: AztecAddress, calldataHash: Fr, _sideEffectCounter: number, _isStaticCall: boolean): Promise<void>;
224
234
  privateNotifySetMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter: number): Promise<void>;
225
- /**
226
- * Derives the call context for a nested execution.
227
- * @param targetContractAddress - The address of the contract being called.
228
- * @param targetArtifact - The artifact of the function being called.
229
- * @param isStaticCall - Whether the call is a static call.
230
- * @returns The derived call context.
231
- */
235
+ privateIsSideEffectCounterRevertible(sideEffectCounter: number): Promise<boolean>;
232
236
  private deriveCallContext;
233
237
  getDebugFunctionName(): Promise<string>;
234
238
  utilityEmitOffchainEffect(data: Fr[]): Promise<void>;
235
239
  }
236
- //# sourceMappingURL=private_execution_oracle.d.ts.map
240
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9leGVjdXRpb25fb3JhY2xlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL29yYWNsZS9wcml2YXRlX2V4ZWN1dGlvbl9vcmFjbGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT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LFlBQVksRUFBRSxFQUFFLEVBQ2hCLGtCQUFrQixFQUFFLE1BQU0sRUFDMUIsYUFBYSxFQUFFLE9BQU8saUJBSXZCO0lBRUQ7Ozs7OztPQU1HO0lBQ0ksMENBQTBDLENBQy9DLHNCQUFzQixFQUFFLFlBQVksRUFDcEMsWUFBWSxFQUFFLEVBQUUsRUFDaEIsa0JBQWtCLEVBQUUsTUFBTSxFQUMxQixhQUFhLEVBQUUsT0FBTyxpQkFJdkI7SUFFTSw4Q0FBOEMsQ0FBQyw4QkFBOEIsRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUUzRztJQUVNLG9DQUFvQyxDQUFDLGlCQUFpQixFQUFFLE1BQU0sR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLENBRXZGO1lBU2EsaUJBQWlCO0lBYXhCLG9CQUFvQixvQkFFMUI7SUFFTSx5QkFBeUIsQ0FBQyxJQUFJLEVBQUUsRUFBRSxFQUFFLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUcxRDtDQUNGIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"private_execution_oracle.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/private_execution_oracle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EACL,KAAK,WAAW,EAEhB,gBAAgB,EAChB,KAAK,YAAY,EAElB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAA+B,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAChG,O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EAAE,EACZ,iBAAiB,EAAE,MAAM,EACzB,YAAY,EAAE,OAAO;;;;IAsFvB;;;;;;OAMG;IACI,uCAAuC,CAC5C,sBAAsB,EAAE,YAAY,EACpC,YAAY,EAAE,EAAE,EAChB,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,OAAO;IAMxB;;;;;;OAMG;IACI,0CAA0C,CAC/C,sBAAsB,EAAE,YAAY,EACpC,YAAY,EAAE,EAAE,EAChB,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,OAAO;IAMjB,8CAA8C,CAAC,8BAA8B,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5G;;;;;;OAMG;YACW,iBAAiB;IAaxB,oBAAoB;IAIpB,yBAAyB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAI5D"}
1
+ {"version":3,"file":"private_execution_oracle.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/private_execution_oracle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAGpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,YAAY,EACjB,gBAAgB,EAChB,KAAK,YAAY,EAElB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,KAAK,gBAAgB,EAA+B,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE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BAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,OAAO,iBAIvB;IAED;;;;;;OAMG;IACI,0CAA0C,CAC/C,sBAAsB,EAAE,YAAY,EACpC,YAAY,EAAE,EAAE,EAChB,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,OAAO,iBAIvB;IAEM,8CAA8C,CAAC,8BAA8B,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3G;IAEM,oCAAoC,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEvF;YASa,iBAAiB;IAaxB,oBAAoB,oBAE1B;IAEM,yBAAyB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1D;CACF"}
@@ -1,16 +1,20 @@
1
1
  import { MAX_FR_CALLDATA_TO_ALL_ENQUEUED_CALLS, PRIVATE_CONTEXT_INPUTS_LENGTH } from '@aztec/constants';
2
- import { Fr } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import { createLogger } from '@aztec/foundation/log';
4
4
  import { Timer } from '@aztec/foundation/timer';
5
5
  import { toACVMWitness } from '@aztec/simulator/client';
6
6
  import { FunctionSelector, countArgumentsSize } from '@aztec/stdlib/abi';
7
- import { computeUniqueNoteHash, siloNoteHash, siloNullifier } from '@aztec/stdlib/hash';
7
+ import { L2BlockHash } from '@aztec/stdlib/block';
8
+ import { siloNullifier } from '@aztec/stdlib/hash';
8
9
  import { PrivateContextInputs } from '@aztec/stdlib/kernel';
10
+ import { DirectionalAppTaggingSecret } from '@aztec/stdlib/logs';
11
+ import { Tag } from '@aztec/stdlib/logs';
9
12
  import { Note } from '@aztec/stdlib/note';
10
13
  import { CallContext, CountedContractClassLog, NoteAndSlot } from '@aztec/stdlib/tx';
11
- import { Tag } from '../../tagging/tag.js';
14
+ import { NoteService } from '../../notes/note_service.js';
15
+ import { syncSenderTaggingIndexes } from '../../tagging/index.js';
12
16
  import { pickNotes } from '../pick_notes.js';
13
- import { executePrivateFunction, verifyCurrentClassId } from './private_execution.js';
17
+ import { ensureContractSynced, executePrivateFunction } from './private_execution.js';
14
18
  import { UtilityExecutionOracle } from './utility_execution_oracle.js';
15
19
  /**
16
20
  * The execution oracle for the private part of a transaction.
@@ -19,9 +23,11 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
19
23
  txContext;
20
24
  callContext;
21
25
  anchorBlockHeader;
26
+ utilityExecutor;
22
27
  executionCache;
23
28
  noteCache;
24
29
  taggingIndexCache;
30
+ senderTaggingStore;
25
31
  totalPublicCalldataCount;
26
32
  sideEffectCounter;
27
33
  senderForTags;
@@ -35,21 +41,12 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
35
41
  * This information is only for references (currently used for tests), and is not used for any sort of constrains.
36
42
  * Users can also use this to get a clearer idea of what's happened during a simulation.
37
43
  */ newNotes;
38
- /**
39
- * Notes from previous transactions that are returned to the oracle call `getNotes` during this execution.
40
- * The mapping maps from the unique siloed note hash to the index for notes created in private executions.
41
- * It maps from siloed note hash to the index for notes created by public functions.
42
- *
43
- * They are not part of the ExecutionNoteCache and being forwarded to nested contexts via `extend()`
44
- * because these notes are meant to be maintained on a per-call basis
45
- * They should act as references for the read requests output by an app circuit via public inputs.
46
- */ noteHashLeafIndexMap;
47
44
  noteHashNullifierCounterMap;
48
45
  contractClassLogs;
49
46
  offchainEffects;
50
47
  nestedExecutionResults;
51
- constructor(argsHash, txContext, callContext, /** Header of a block whose state is used during private execution (not the block the transaction is included in). */ anchorBlockHeader, /** List of transient auth witnesses to be used during this simulation */ authWitnesses, capsules, executionCache, noteCache, taggingIndexCache, executionDataProvider, totalPublicCalldataCount = 0, sideEffectCounter = 0, log = createLogger('simulator:client_execution_context'), scopes, senderForTags, simulator){
52
- super(callContext.contractAddress, authWitnesses, capsules, executionDataProvider, log, scopes), this.argsHash = argsHash, this.txContext = txContext, this.callContext = callContext, this.anchorBlockHeader = anchorBlockHeader, this.executionCache = executionCache, this.noteCache = noteCache, this.taggingIndexCache = taggingIndexCache, this.totalPublicCalldataCount = totalPublicCalldataCount, this.sideEffectCounter = sideEffectCounter, this.senderForTags = senderForTags, this.simulator = simulator, this.isPrivate = true, this.newNotes = [], this.noteHashLeafIndexMap = new Map(), this.noteHashNullifierCounterMap = new Map(), this.contractClassLogs = [], this.offchainEffects = [], this.nestedExecutionResults = [];
48
+ constructor(argsHash, txContext, callContext, /** Header of a block whose state is used during private execution (not the block the transaction is included in). */ anchorBlockHeader, /** Needed to trigger contract synchronization before nested calls */ utilityExecutor, /** List of transient auth witnesses to be used during this simulation */ authWitnesses, capsules, executionCache, noteCache, taggingIndexCache, contractStore, noteStore, keyStore, addressStore, aztecNode, anchorBlockStore, senderTaggingStore, recipientTaggingStore, senderAddressBookStore, capsuleStore, privateEventStore, jobId, totalPublicCalldataCount = 0, sideEffectCounter = 0, log = createLogger('simulator:client_execution_context'), scopes, senderForTags, simulator){
49
+ super(callContext.contractAddress, authWitnesses, capsules, anchorBlockHeader, contractStore, noteStore, keyStore, addressStore, aztecNode, anchorBlockStore, recipientTaggingStore, senderAddressBookStore, capsuleStore, privateEventStore, jobId, log, scopes), this.argsHash = argsHash, this.txContext = txContext, this.callContext = callContext, this.anchorBlockHeader = anchorBlockHeader, this.utilityExecutor = utilityExecutor, this.executionCache = executionCache, this.noteCache = noteCache, this.taggingIndexCache = taggingIndexCache, this.senderTaggingStore = senderTaggingStore, this.totalPublicCalldataCount = totalPublicCalldataCount, this.sideEffectCounter = sideEffectCounter, this.senderForTags = senderForTags, this.simulator = simulator, this.isPrivate = true, this.newNotes = [], this.noteHashNullifierCounterMap = new Map(), this.contractClassLogs = [], this.offchainEffects = [], this.nestedExecutionResults = [];
53
50
  }
54
51
  getPrivateContextInputs() {
55
52
  return new PrivateContextInputs(this.callContext, this.anchorBlockHeader, this.txContext, this.sideEffectCounter);
@@ -77,12 +74,6 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
77
74
  return toACVMWitness(0, fields);
78
75
  }
79
76
  /**
80
- * The KernelProver will use this to fully populate witnesses and provide hints to the kernel circuit
81
- * regarding which note hash each settled read request corresponds to.
82
- */ getNoteHashLeafIndexMap() {
83
- return this.noteHashLeafIndexMap;
84
- }
85
- /**
86
77
  * Get the data for the newly created notes.
87
78
  */ getNewNotes() {
88
79
  return this.newNotes;
@@ -101,7 +92,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
101
92
  return this.offchainEffects;
102
93
  }
103
94
  /**
104
- * Returns the pre tags that were used in this execution (and that need to be stored in the db).
95
+ * Returns the pre-tags that were used in this execution (and that need to be stored in the db).
105
96
  */ getUsedPreTags() {
106
97
  return this.taggingIndexCache.getUsedPreTags();
107
98
  }
@@ -142,7 +133,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
142
133
  * @param recipient - The address receiving the log
143
134
  * @returns An app tag to be used in a log.
144
135
  */ async privateGetNextAppTagAsSender(sender, recipient) {
145
- const secret = await this.executionDataProvider.calculateDirectionalAppTaggingSecret(this.contractAddress, sender, recipient);
136
+ const secret = await this.#calculateDirectionalAppTaggingSecret(this.contractAddress, sender, recipient);
146
137
  const index = await this.#getIndexToUseForSecret(secret);
147
138
  this.log.debug(`Incrementing tagging index for sender: ${sender}, recipient: ${recipient}, contract: ${this.contractAddress} to ${index}`);
148
139
  this.taggingIndexCache.setLastUsedIndex(secret, index);
@@ -151,6 +142,11 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
151
142
  index
152
143
  });
153
144
  }
145
+ async #calculateDirectionalAppTaggingSecret(contractAddress, sender, recipient) {
146
+ const senderCompleteAddress = await this.getCompleteAddress(sender);
147
+ const senderIvsk = await this.keyStore.getMasterIncomingViewingSecretKey(sender);
148
+ return DirectionalAppTaggingSecret.compute(senderCompleteAddress, senderIvsk, recipient, contractAddress, recipient);
149
+ }
154
150
  async #getIndexToUseForSecret(secret) {
155
151
  // If we have the tagging index in the cache, we use it. If not we obtain it from the execution data provider.
156
152
  const lastUsedIndexInTx = this.taggingIndexCache.getLastUsedIndex(secret);
@@ -160,8 +156,9 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
160
156
  // This is a tagging secret we've not yet used in this tx, so first sync our store to make sure its indices
161
157
  // are up to date. We do this here because this store is not synced as part of the global sync because
162
158
  // that'd be wasteful as most tagging secrets are not used in each tx.
163
- await this.executionDataProvider.syncTaggedLogsAsSender(secret, this.contractAddress);
164
- const lastUsedIndex = await this.executionDataProvider.getLastUsedIndexAsSender(secret);
159
+ const anchorBlockHash = L2BlockHash.fromField(await this.anchorBlockHeader.hash());
160
+ await syncSenderTaggingIndexes(secret, this.contractAddress, this.aztecNode, this.senderTaggingStore, anchorBlockHash, this.jobId);
161
+ const lastUsedIndex = await this.senderTaggingStore.getLastUsedIndex(secret, this.jobId);
165
162
  // If lastUsedIndex is undefined, we've never used this secret, so start from 0
166
163
  // Otherwise, the next index to use is one past the last used index
167
164
  return lastUsedIndex === undefined ? 0 : lastUsedIndex + 1;
@@ -203,6 +200,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
203
200
  * Real notes coming from DB will have a leafIndex which
204
201
  * represents their index in the note hash tree.
205
202
  *
203
+ * @param owner - The owner of the notes. If undefined, returns notes for all owners.
206
204
  * @param storageSlot - The storage slot.
207
205
  * @param numSelects - The number of valid selects in selectBy and selectValues.
208
206
  * @param selectBy - An array of indices of the fields to selects.
@@ -214,11 +212,12 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
214
212
  * @param offset - The starting index for pagination.
215
213
  * @param status - The status of notes to fetch.
216
214
  * @returns Array of note data.
217
- */ async utilityGetNotes(storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
215
+ */ async utilityGetNotes(owner, storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
218
216
  // Nullified pending notes are already removed from the list.
219
- const pendingNotes = this.noteCache.getNotes(this.callContext.contractAddress, storageSlot);
217
+ const pendingNotes = this.noteCache.getNotes(this.callContext.contractAddress, owner, storageSlot);
220
218
  const pendingNullifiers = this.noteCache.getNullifiers(this.callContext.contractAddress);
221
- const dbNotes = await this.executionDataProvider.getNotes(this.callContext.contractAddress, storageSlot, status, this.scopes);
219
+ const noteService = new NoteService(this.noteStore, this.aztecNode, this.anchorBlockStore, this.jobId);
220
+ const dbNotes = await noteService.getNotes(this.callContext.contractAddress, owner, storageSlot, status, this.scopes);
222
221
  const dbNotesFiltered = dbNotes.filter((n)=>!pendingNullifiers.has(n.siloedNullifier.value));
223
222
  const notes = pickNotes([
224
223
  ...dbNotesFiltered,
@@ -245,47 +244,44 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
245
244
  offset
246
245
  });
247
246
  this.log.debug(`Returning ${notes.length} notes for ${this.callContext.contractAddress} at ${storageSlot}: ${notes.map((n)=>`${n.noteNonce.toString()}:[${n.note.items.map((i)=>i.toString()).join(',')}]`).join(', ')}`);
248
- const noteHashesAndIndexes = await Promise.all(notes.map(async (n)=>{
249
- if (n.index !== undefined) {
250
- const siloedNoteHash = await siloNoteHash(n.contractAddress, n.noteHash);
251
- const uniqueNoteHash = await computeUniqueNoteHash(n.noteNonce, siloedNoteHash);
252
- return {
253
- hash: uniqueNoteHash,
254
- index: n.index
255
- };
256
- }
257
- }));
258
- noteHashesAndIndexes.filter((n)=>n !== undefined).forEach((n)=>{
259
- this.noteHashLeafIndexMap.set(n.hash.toBigInt(), n.index);
260
- });
261
247
  return notes;
262
248
  }
263
249
  /**
264
250
  * Keep track of the new note created during execution.
265
251
  * It can be used in subsequent calls (or transactions when chaining txs is possible).
266
- * @param contractAddress - The contract address.
252
+ * @param owner - The owner of the note.
267
253
  * @param storageSlot - The storage slot.
254
+ * @param randomness - The randomness injected into the note.
268
255
  * @param noteTypeId - The type ID of the note.
269
256
  * @param noteItems - The items to be included in a Note.
270
257
  * @param noteHash - A hash of the new note.
271
258
  * @returns
272
- */ privateNotifyCreatedNote(storageSlot, noteTypeId, noteItems, noteHash, counter) {
259
+ */ privateNotifyCreatedNote(owner, storageSlot, randomness, noteTypeId, noteItems, noteHash, counter) {
273
260
  this.log.debug(`Notified of new note with inner hash ${noteHash}`, {
274
261
  contractAddress: this.callContext.contractAddress,
275
262
  storageSlot,
263
+ randomness,
276
264
  noteTypeId,
277
265
  counter
278
266
  });
279
267
  const note = new Note(noteItems);
280
268
  this.noteCache.addNewNote({
281
269
  contractAddress: this.callContext.contractAddress,
270
+ owner,
282
271
  storageSlot,
272
+ randomness,
283
273
  noteNonce: Fr.ZERO,
284
274
  note,
285
275
  siloedNullifier: undefined,
286
- noteHash
276
+ noteHash,
277
+ isPending: true
287
278
  }, counter);
288
- this.newNotes.push(new NoteAndSlot(note, storageSlot, noteTypeId));
279
+ this.newNotes.push(NoteAndSlot.from({
280
+ note,
281
+ storageSlot,
282
+ randomness,
283
+ noteTypeId
284
+ }));
289
285
  }
290
286
  /**
291
287
  * Adding a siloed nullifier into the current set of all pending nullifiers created
@@ -310,6 +306,17 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
310
306
  return this.noteCache.nullifierCreated(this.callContext.contractAddress, innerNullifier);
311
307
  }
312
308
  /**
309
+ * Check if a nullifier has been emitted in the same transaction, i.e. if privateNotifyCreatedNullifier has been
310
+ * called for this inner nullifier from the contract with the specified address.
311
+ * @param innerNullifier - The inner nullifier to check.
312
+ * @param contractAddress - Address of the contract that emitted the nullifier.
313
+ * @returns A boolean indicating whether the nullifier is pending or not.
314
+ */ async privateIsNullifierPending(innerNullifier, contractAddress) {
315
+ const siloedNullifier = await siloNullifier(contractAddress, innerNullifier);
316
+ const isNullifierPending = this.noteCache.getNullifiers(contractAddress).has(siloedNullifier.toBigInt());
317
+ return Promise.resolve(isNullifierPending);
318
+ }
319
+ /**
313
320
  * Emit a contract class log.
314
321
  * This fn exists because we only carry a poseidon hash through the kernels, and need to
315
322
  * keep the preimage in ts for later.
@@ -342,11 +349,11 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
342
349
  const simulatorSetupTimer = new Timer();
343
350
  this.log.debug(`Calling private function ${targetContractAddress}:${functionSelector} from ${this.callContext.contractAddress}`);
344
351
  isStaticCall = isStaticCall || this.callContext.isStaticCall;
345
- await verifyCurrentClassId(targetContractAddress, this.executionDataProvider, this.anchorBlockHeader);
346
- const targetArtifact = await this.executionDataProvider.getFunctionArtifact(targetContractAddress, functionSelector);
352
+ await ensureContractSynced(targetContractAddress, functionSelector, this.utilityExecutor, this.aztecNode, this.contractStore, this.anchorBlockHeader);
353
+ const targetArtifact = await this.contractStore.getFunctionArtifactWithDebugMetadata(targetContractAddress, functionSelector);
347
354
  const derivedTxContext = this.txContext.clone();
348
355
  const derivedCallContext = await this.deriveCallContext(targetContractAddress, targetArtifact, isStaticCall);
349
- const privateExecutionOracle = new PrivateExecutionOracle(argsHash, derivedTxContext, derivedCallContext, this.anchorBlockHeader, this.authWitnesses, this.capsules, this.executionCache, this.noteCache, this.taggingIndexCache, this.executionDataProvider, this.totalPublicCalldataCount, sideEffectCounter, this.log, this.scopes, this.senderForTags, this.simulator);
356
+ const privateExecutionOracle = new PrivateExecutionOracle(argsHash, derivedTxContext, derivedCallContext, this.anchorBlockHeader, this.utilityExecutor, this.authWitnesses, this.capsules, this.executionCache, this.noteCache, this.taggingIndexCache, this.contractStore, this.noteStore, this.keyStore, this.addressStore, this.aztecNode, this.anchorBlockStore, this.senderTaggingStore, this.recipientTaggingStore, this.senderAddressBookStore, this.capsuleStore, this.privateEventStore, this.jobId, this.totalPublicCalldataCount, sideEffectCounter, this.log, this.scopes, this.senderForTags, this.simulator);
350
357
  const setupTime = simulatorSetupTimer.ms();
351
358
  const childExecutionResult = await executePrivateFunction(this.simulator, privateExecutionOracle, targetArtifact, targetContractAddress, functionSelector);
352
359
  if (isStaticCall) {
@@ -396,6 +403,9 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
396
403
  privateNotifySetMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter) {
397
404
  return this.noteCache.setMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter);
398
405
  }
406
+ privateIsSideEffectCounterRevertible(sideEffectCounter) {
407
+ return Promise.resolve(this.noteCache.isSideEffectCounterRevertible(sideEffectCounter));
408
+ }
399
409
  /**
400
410
  * Derives the call context for a nested execution.
401
411
  * @param targetContractAddress - The address of the contract being called.
@@ -406,7 +416,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
406
416
  return new CallContext(this.contractAddress, targetContractAddress, await FunctionSelector.fromNameAndParameters(targetArtifact.name, targetArtifact.parameters), isStaticCall);
407
417
  }
408
418
  getDebugFunctionName() {
409
- return this.executionDataProvider.getDebugFunctionName(this.contractAddress, this.callContext.functionSelector);
419
+ return this.contractStore.getDebugFunctionName(this.contractAddress, this.callContext.functionSelector);
410
420
  }
411
421
  utilityEmitOffchainEffect(data) {
412
422
  this.offchainEffects.push({