@aztec/pxe 0.0.1-fake-ceab37513c → 0.0.6-commit.a2d1860fe9

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 (442) hide show
  1. package/README.md +5 -5
  2. package/dest/access_scopes.d.ts +9 -0
  3. package/dest/access_scopes.d.ts.map +1 -0
  4. package/dest/access_scopes.js +6 -0
  5. package/dest/bin/check_oracle_version.d.ts +1 -1
  6. package/dest/bin/check_oracle_version.js +110 -10
  7. package/dest/block_synchronizer/block_synchronizer.d.ts +45 -0
  8. package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -0
  9. package/dest/block_synchronizer/block_synchronizer.js +153 -0
  10. package/dest/block_synchronizer/index.d.ts +2 -0
  11. package/dest/block_synchronizer/index.d.ts.map +1 -0
  12. package/dest/block_synchronizer/index.js +1 -0
  13. package/dest/config/index.d.ts +11 -17
  14. package/dest/config/index.d.ts.map +1 -1
  15. package/dest/config/index.js +27 -16
  16. package/dest/config/package_info.d.ts +1 -1
  17. package/dest/config/package_info.js +1 -1
  18. package/dest/contract_function_simulator/benchmarked_node.d.ts +9 -0
  19. package/dest/contract_function_simulator/benchmarked_node.d.ts.map +1 -0
  20. package/dest/contract_function_simulator/benchmarked_node.js +77 -0
  21. package/dest/contract_function_simulator/contract_function_simulator.d.ts +79 -27
  22. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  23. package/dest/contract_function_simulator/contract_function_simulator.js +287 -87
  24. package/dest/contract_function_simulator/execution_note_cache.d.ts +26 -15
  25. package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
  26. package/dest/contract_function_simulator/execution_note_cache.js +65 -37
  27. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +16 -0
  28. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -0
  29. package/dest/contract_function_simulator/execution_tagging_index_cache.js +26 -0
  30. package/dest/contract_function_simulator/hashed_values_cache.d.ts +2 -2
  31. package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -1
  32. package/dest/contract_function_simulator/index.d.ts +5 -3
  33. package/dest/contract_function_simulator/index.d.ts.map +1 -1
  34. package/dest/contract_function_simulator/index.js +3 -2
  35. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +5 -4
  36. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
  37. package/dest/contract_function_simulator/noir-structs/event_validation_request.js +7 -4
  38. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +5 -4
  39. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -1
  40. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +7 -6
  41. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +3 -3
  42. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -1
  43. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +8 -4
  44. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +7 -4
  45. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
  46. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +13 -4
  47. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +16 -0
  48. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -0
  49. package/dest/contract_function_simulator/noir-structs/utility_context.js +22 -0
  50. package/dest/contract_function_simulator/oracle/index.d.ts +2 -2
  51. package/dest/contract_function_simulator/oracle/index.d.ts.map +1 -1
  52. package/dest/contract_function_simulator/oracle/index.js +1 -1
  53. package/dest/contract_function_simulator/oracle/interfaces.d.ts +107 -0
  54. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -0
  55. package/dest/contract_function_simulator/oracle/interfaces.js +4 -0
  56. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +2 -2
  57. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
  58. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +1 -1
  59. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +14 -8
  60. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
  61. package/dest/contract_function_simulator/oracle/note_packing_utils.js +16 -11
  62. package/dest/contract_function_simulator/oracle/oracle.d.ts +26 -22
  63. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
  64. package/dest/contract_function_simulator/oracle/oracle.js +156 -113
  65. package/dest/contract_function_simulator/oracle/private_execution.d.ts +2 -27
  66. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
  67. package/dest/contract_function_simulator/oracle/private_execution.js +3 -48
  68. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +72 -52
  69. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  70. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +173 -68
  71. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +116 -53
  72. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  73. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +217 -94
  74. package/dest/contract_function_simulator/pick_notes.d.ts +2 -2
  75. package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
  76. package/dest/contract_function_simulator/pick_notes.js +1 -1
  77. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +4 -4
  78. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
  79. package/dest/contract_function_simulator/proxied_contract_data_source.js +23 -5
  80. package/dest/contract_logging.d.ts +22 -0
  81. package/dest/contract_logging.d.ts.map +1 -0
  82. package/dest/contract_logging.js +23 -0
  83. package/dest/contract_sync/contract_sync_service.d.ts +43 -0
  84. package/dest/contract_sync/contract_sync_service.d.ts.map +1 -0
  85. package/dest/contract_sync/contract_sync_service.js +97 -0
  86. package/dest/contract_sync/helpers.d.ts +29 -0
  87. package/dest/contract_sync/helpers.d.ts.map +1 -0
  88. package/dest/contract_sync/helpers.js +55 -0
  89. package/dest/debug/pxe_debug_utils.d.ts +45 -0
  90. package/dest/debug/pxe_debug_utils.d.ts.map +1 -0
  91. package/dest/debug/pxe_debug_utils.js +48 -0
  92. package/dest/entrypoints/client/bundle/index.d.ts +7 -3
  93. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  94. package/dest/entrypoints/client/bundle/index.js +5 -2
  95. package/dest/entrypoints/client/bundle/utils.d.ts +9 -9
  96. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
  97. package/dest/entrypoints/client/bundle/utils.js +40 -17
  98. package/dest/entrypoints/client/lazy/index.d.ts +7 -3
  99. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  100. package/dest/entrypoints/client/lazy/index.js +5 -2
  101. package/dest/entrypoints/client/lazy/utils.d.ts +9 -9
  102. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
  103. package/dest/entrypoints/client/lazy/utils.js +40 -17
  104. package/dest/entrypoints/pxe_creation_options.d.ts +7 -3
  105. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
  106. package/dest/entrypoints/server/index.d.ts +9 -3
  107. package/dest/entrypoints/server/index.d.ts.map +1 -1
  108. package/dest/entrypoints/server/index.js +7 -2
  109. package/dest/entrypoints/server/utils.d.ts +5 -24
  110. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  111. package/dest/entrypoints/server/utils.js +42 -51
  112. package/dest/error_enriching.d.ts +11 -0
  113. package/dest/error_enriching.d.ts.map +1 -0
  114. package/dest/{pxe_service/error_enriching.js → error_enriching.js} +9 -6
  115. package/dest/events/event_service.d.ts +15 -0
  116. package/dest/events/event_service.d.ts.map +1 -0
  117. package/dest/events/event_service.js +44 -0
  118. package/dest/events/index.d.ts +2 -0
  119. package/dest/events/index.d.ts.map +1 -0
  120. package/dest/events/index.js +1 -0
  121. package/dest/events/private_event_filter_validator.d.ts +9 -0
  122. package/dest/events/private_event_filter_validator.d.ts.map +1 -0
  123. package/dest/events/private_event_filter_validator.js +38 -0
  124. package/dest/job_coordinator/job_coordinator.d.ts +75 -0
  125. package/dest/job_coordinator/job_coordinator.d.ts.map +1 -0
  126. package/dest/job_coordinator/job_coordinator.js +94 -0
  127. package/dest/logs/log_service.d.ts +29 -0
  128. package/dest/logs/log_service.d.ts.map +1 -0
  129. package/dest/logs/log_service.js +118 -0
  130. package/dest/notes/index.d.ts +2 -0
  131. package/dest/notes/index.d.ts.map +1 -0
  132. package/dest/notes/index.js +1 -0
  133. package/dest/notes/note_service.d.ts +49 -0
  134. package/dest/notes/note_service.d.ts.map +1 -0
  135. package/dest/notes/note_service.js +148 -0
  136. package/dest/notes_filter.d.ts +25 -0
  137. package/dest/notes_filter.d.ts.map +1 -0
  138. package/dest/notes_filter.js +4 -0
  139. package/dest/oracle_version.d.ts +3 -3
  140. package/dest/oracle_version.d.ts.map +1 -1
  141. package/dest/oracle_version.js +4 -3
  142. package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts +4 -0
  143. package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts.map +1 -0
  144. package/dest/private_kernel/hints/compute_tx_expiration_timestamp.js +41 -0
  145. package/dest/private_kernel/hints/index.d.ts +3 -3
  146. package/dest/private_kernel/hints/index.d.ts.map +1 -1
  147. package/dest/private_kernel/hints/index.js +2 -2
  148. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +28 -0
  149. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -0
  150. package/dest/private_kernel/hints/{build_private_kernel_reset_private_inputs.js → private_kernel_reset_private_inputs_builder.js} +22 -16
  151. package/dest/private_kernel/index.d.ts +1 -1
  152. package/dest/private_kernel/private_kernel_execution_prover.d.ts +11 -3
  153. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  154. package/dest/private_kernel/private_kernel_execution_prover.js +48 -43
  155. package/dest/private_kernel/private_kernel_oracle.d.ts +26 -25
  156. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
  157. package/dest/private_kernel/private_kernel_oracle.js +94 -2
  158. package/dest/pxe.d.ts +250 -0
  159. package/dest/pxe.d.ts.map +1 -0
  160. package/dest/pxe.js +774 -0
  161. package/dest/storage/address_store/address_store.d.ts +11 -0
  162. package/dest/storage/address_store/address_store.d.ts.map +1 -0
  163. package/dest/storage/{address_data_provider/address_data_provider.js → address_store/address_store.js} +13 -15
  164. package/dest/storage/address_store/index.d.ts +2 -0
  165. package/dest/storage/address_store/index.d.ts.map +1 -0
  166. package/dest/storage/address_store/index.js +1 -0
  167. package/dest/storage/anchor_block_store/anchor_block_store.d.ts +17 -0
  168. package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -0
  169. package/dest/storage/{sync_data_provider/sync_data_provider.js → anchor_block_store/anchor_block_store.js} +10 -13
  170. package/dest/storage/anchor_block_store/index.d.ts +2 -0
  171. package/dest/storage/anchor_block_store/index.d.ts.map +1 -0
  172. package/dest/storage/anchor_block_store/index.js +1 -0
  173. package/dest/storage/capsule_store/capsule_store.d.ts +72 -0
  174. package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -0
  175. package/dest/storage/capsule_store/capsule_store.js +253 -0
  176. package/dest/storage/capsule_store/index.d.ts +2 -0
  177. package/dest/storage/capsule_store/index.d.ts.map +1 -0
  178. package/dest/storage/capsule_store/index.js +1 -0
  179. package/dest/storage/contract_store/contract_store.d.ts +93 -0
  180. package/dest/storage/contract_store/contract_store.d.ts.map +1 -0
  181. package/dest/storage/contract_store/contract_store.js +309 -0
  182. package/dest/storage/contract_store/index.d.ts +2 -0
  183. package/dest/storage/contract_store/index.d.ts.map +1 -0
  184. package/dest/storage/contract_store/index.js +1 -0
  185. package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.d.ts +1 -1
  186. package/dest/storage/contract_store/private_functions_tree.d.ts.map +1 -0
  187. package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.js +1 -1
  188. package/dest/storage/index.d.ts +8 -9
  189. package/dest/storage/index.d.ts.map +1 -1
  190. package/dest/storage/index.js +7 -8
  191. package/dest/storage/metadata.d.ts +2 -2
  192. package/dest/storage/metadata.js +1 -1
  193. package/dest/storage/note_store/index.d.ts +3 -0
  194. package/dest/storage/note_store/index.d.ts.map +1 -0
  195. package/dest/storage/note_store/index.js +2 -0
  196. package/dest/storage/note_store/note_store.d.ts +83 -0
  197. package/dest/storage/note_store/note_store.d.ts.map +1 -0
  198. package/dest/storage/note_store/note_store.js +343 -0
  199. package/dest/storage/note_store/stored_note.d.ts +16 -0
  200. package/dest/storage/note_store/stored_note.d.ts.map +1 -0
  201. package/dest/storage/note_store/stored_note.js +43 -0
  202. package/dest/storage/private_event_store/private_event_store.d.ts +91 -0
  203. package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -0
  204. package/dest/storage/private_event_store/private_event_store.js +273 -0
  205. package/dest/storage/private_event_store/stored_private_event.d.ts +23 -0
  206. package/dest/storage/private_event_store/stored_private_event.d.ts.map +1 -0
  207. package/dest/storage/private_event_store/stored_private_event.js +56 -0
  208. package/dest/storage/tagging_store/index.d.ts +4 -0
  209. package/dest/storage/tagging_store/index.d.ts.map +1 -0
  210. package/dest/storage/tagging_store/index.js +3 -0
  211. package/dest/storage/tagging_store/recipient_tagging_store.d.ts +28 -0
  212. package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -0
  213. package/dest/storage/tagging_store/recipient_tagging_store.js +111 -0
  214. package/dest/storage/tagging_store/sender_address_book_store.d.ts +14 -0
  215. package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +1 -0
  216. package/dest/storage/tagging_store/sender_address_book_store.js +36 -0
  217. package/dest/storage/tagging_store/sender_tagging_store.d.ts +77 -0
  218. package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -0
  219. package/dest/storage/tagging_store/sender_tagging_store.js +348 -0
  220. package/dest/tagging/constants.d.ts +2 -0
  221. package/dest/tagging/constants.d.ts.map +1 -0
  222. package/dest/tagging/constants.js +10 -0
  223. package/dest/tagging/get_all_logs_by_tags.d.ts +24 -0
  224. package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -0
  225. package/dest/tagging/get_all_logs_by_tags.js +60 -0
  226. package/dest/tagging/index.d.ts +17 -0
  227. package/dest/tagging/index.d.ts.map +1 -0
  228. package/dest/tagging/index.js +15 -0
  229. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +15 -0
  230. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -0
  231. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +99 -0
  232. package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts +12 -0
  233. package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts.map +1 -0
  234. package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +20 -0
  235. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +15 -0
  236. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -0
  237. package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +32 -0
  238. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +21 -0
  239. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -0
  240. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +74 -0
  241. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +11 -0
  242. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -0
  243. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +29 -0
  244. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +21 -0
  245. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -0
  246. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +60 -0
  247. package/package.json +30 -23
  248. package/src/access_scopes.ts +9 -0
  249. package/src/bin/check_oracle_version.ts +135 -10
  250. package/src/block_synchronizer/block_synchronizer.ts +178 -0
  251. package/src/block_synchronizer/index.ts +1 -0
  252. package/src/config/index.ts +32 -32
  253. package/src/config/package_info.ts +1 -1
  254. package/src/contract_function_simulator/benchmarked_node.ts +103 -0
  255. package/src/contract_function_simulator/contract_function_simulator.ts +505 -140
  256. package/src/contract_function_simulator/execution_note_cache.ts +67 -32
  257. package/src/contract_function_simulator/execution_tagging_index_cache.ts +32 -0
  258. package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
  259. package/src/contract_function_simulator/index.ts +4 -2
  260. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +7 -3
  261. package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +6 -5
  262. package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +10 -5
  263. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +15 -3
  264. package/src/contract_function_simulator/noir-structs/utility_context.ts +23 -0
  265. package/src/contract_function_simulator/oracle/index.ts +1 -1
  266. package/src/contract_function_simulator/oracle/interfaces.ts +185 -0
  267. package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
  268. package/src/contract_function_simulator/oracle/note_packing_utils.ts +30 -14
  269. package/src/contract_function_simulator/oracle/oracle.ts +197 -110
  270. package/src/contract_function_simulator/oracle/private_execution.ts +4 -78
  271. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +248 -122
  272. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +372 -138
  273. package/src/contract_function_simulator/pick_notes.ts +1 -1
  274. package/src/contract_function_simulator/proxied_contract_data_source.ts +24 -7
  275. package/src/contract_logging.ts +39 -0
  276. package/src/contract_sync/contract_sync_service.ts +152 -0
  277. package/src/contract_sync/helpers.ts +98 -0
  278. package/src/debug/pxe_debug_utils.ts +93 -0
  279. package/src/entrypoints/client/bundle/index.ts +6 -2
  280. package/src/entrypoints/client/bundle/utils.ts +31 -32
  281. package/src/entrypoints/client/lazy/index.ts +6 -2
  282. package/src/entrypoints/client/lazy/utils.ts +31 -32
  283. package/src/entrypoints/pxe_creation_options.ts +6 -2
  284. package/src/entrypoints/server/index.ts +8 -2
  285. package/src/entrypoints/server/utils.ts +39 -91
  286. package/src/{pxe_service/error_enriching.ts → error_enriching.ts} +11 -15
  287. package/src/events/event_service.ts +71 -0
  288. package/src/events/index.ts +1 -0
  289. package/src/events/private_event_filter_validator.ts +46 -0
  290. package/src/job_coordinator/job_coordinator.ts +150 -0
  291. package/src/logs/log_service.ts +208 -0
  292. package/src/notes/index.ts +1 -0
  293. package/src/notes/note_service.ts +196 -0
  294. package/src/notes_filter.ts +26 -0
  295. package/src/oracle_version.ts +4 -3
  296. package/src/private_kernel/hints/{compute_tx_include_by_timestamp.ts → compute_tx_expiration_timestamp.ts} +16 -16
  297. package/src/private_kernel/hints/index.ts +2 -2
  298. package/src/private_kernel/hints/{build_private_kernel_reset_private_inputs.ts → private_kernel_reset_private_inputs_builder.ts} +44 -37
  299. package/src/private_kernel/private_kernel_execution_prover.ts +64 -55
  300. package/src/private_kernel/private_kernel_oracle.ts +118 -37
  301. package/src/pxe.ts +1137 -0
  302. package/src/storage/{address_data_provider/address_data_provider.ts → address_store/address_store.ts} +15 -21
  303. package/src/storage/address_store/index.ts +1 -0
  304. package/src/storage/{sync_data_provider/sync_data_provider.ts → anchor_block_store/anchor_block_store.ts} +10 -17
  305. package/src/storage/anchor_block_store/index.ts +1 -0
  306. package/src/storage/capsule_store/capsule_store.ts +315 -0
  307. package/src/storage/capsule_store/index.ts +1 -0
  308. package/src/storage/contract_store/contract_store.ts +429 -0
  309. package/src/storage/contract_store/index.ts +1 -0
  310. package/src/storage/{contract_data_provider → contract_store}/private_functions_tree.ts +1 -1
  311. package/src/storage/index.ts +7 -8
  312. package/src/storage/metadata.ts +1 -1
  313. package/src/storage/note_store/index.ts +2 -0
  314. package/src/storage/note_store/note_store.ts +418 -0
  315. package/src/storage/note_store/stored_note.ts +48 -0
  316. package/src/storage/private_event_store/private_event_store.ts +384 -0
  317. package/src/storage/private_event_store/stored_private_event.ts +73 -0
  318. package/src/storage/tagging_store/index.ts +3 -0
  319. package/src/storage/tagging_store/recipient_tagging_store.ts +139 -0
  320. package/src/storage/tagging_store/sender_address_book_store.ts +48 -0
  321. package/src/storage/tagging_store/sender_tagging_store.ts +429 -0
  322. package/src/tagging/constants.ts +10 -0
  323. package/src/tagging/get_all_logs_by_tags.ts +92 -0
  324. package/src/tagging/index.ts +19 -0
  325. package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +143 -0
  326. package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +34 -0
  327. package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +49 -0
  328. package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +99 -0
  329. package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +36 -0
  330. package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +84 -0
  331. package/dest/bin/index.d.ts +0 -3
  332. package/dest/bin/index.d.ts.map +0 -1
  333. package/dest/bin/index.js +0 -48
  334. package/dest/contract_function_simulator/execution_data_provider.d.ts +0 -285
  335. package/dest/contract_function_simulator/execution_data_provider.d.ts.map +0 -1
  336. package/dest/contract_function_simulator/execution_data_provider.js +0 -14
  337. package/dest/contract_function_simulator/oracle/typed_oracle.d.ts +0 -87
  338. package/dest/contract_function_simulator/oracle/typed_oracle.d.ts.map +0 -1
  339. package/dest/contract_function_simulator/oracle/typed_oracle.js +0 -146
  340. package/dest/contract_function_simulator/proxied_node.d.ts +0 -9
  341. package/dest/contract_function_simulator/proxied_node.d.ts.map +0 -1
  342. package/dest/contract_function_simulator/proxied_node.js +0 -27
  343. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +0 -158
  344. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +0 -1
  345. package/dest/contract_function_simulator/pxe_oracle_interface.js +0 -701
  346. package/dest/contract_function_simulator/tagging_utils.d.ts +0 -17
  347. package/dest/contract_function_simulator/tagging_utils.d.ts.map +0 -1
  348. package/dest/contract_function_simulator/tagging_utils.js +0 -23
  349. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +0 -28
  350. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +0 -1
  351. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +0 -4
  352. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +0 -1
  353. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.js +0 -41
  354. package/dest/private_kernel/private_kernel_oracle_impl.d.ts +0 -45
  355. package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +0 -1
  356. package/dest/private_kernel/private_kernel_oracle_impl.js +0 -86
  357. package/dest/pxe_service/error_enriching.d.ts +0 -11
  358. package/dest/pxe_service/error_enriching.d.ts.map +0 -1
  359. package/dest/pxe_service/index.d.ts +0 -3
  360. package/dest/pxe_service/index.d.ts.map +0 -1
  361. package/dest/pxe_service/index.js +0 -2
  362. package/dest/pxe_service/pxe_service.d.ts +0 -101
  363. package/dest/pxe_service/pxe_service.d.ts.map +0 -1
  364. package/dest/pxe_service/pxe_service.js +0 -791
  365. package/dest/storage/address_data_provider/address_data_provider.d.ts +0 -13
  366. package/dest/storage/address_data_provider/address_data_provider.d.ts.map +0 -1
  367. package/dest/storage/address_data_provider/index.d.ts +0 -2
  368. package/dest/storage/address_data_provider/index.d.ts.map +0 -1
  369. package/dest/storage/address_data_provider/index.js +0 -1
  370. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +0 -27
  371. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +0 -1
  372. package/dest/storage/capsule_data_provider/capsule_data_provider.js +0 -122
  373. package/dest/storage/capsule_data_provider/index.d.ts +0 -2
  374. package/dest/storage/capsule_data_provider/index.d.ts.map +0 -1
  375. package/dest/storage/capsule_data_provider/index.js +0 -1
  376. package/dest/storage/contract_data_provider/contract_data_provider.d.ts +0 -75
  377. package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +0 -1
  378. package/dest/storage/contract_data_provider/contract_data_provider.js +0 -208
  379. package/dest/storage/contract_data_provider/index.d.ts +0 -2
  380. package/dest/storage/contract_data_provider/index.d.ts.map +0 -1
  381. package/dest/storage/contract_data_provider/index.js +0 -1
  382. package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +0 -1
  383. package/dest/storage/data_provider.d.ts +0 -4
  384. package/dest/storage/data_provider.d.ts.map +0 -1
  385. package/dest/storage/data_provider.js +0 -1
  386. package/dest/storage/note_data_provider/index.d.ts +0 -3
  387. package/dest/storage/note_data_provider/index.d.ts.map +0 -1
  388. package/dest/storage/note_data_provider/index.js +0 -2
  389. package/dest/storage/note_data_provider/note_dao.d.ts +0 -100
  390. package/dest/storage/note_data_provider/note_dao.d.ts.map +0 -1
  391. package/dest/storage/note_data_provider/note_dao.js +0 -102
  392. package/dest/storage/note_data_provider/note_data_provider.d.ts +0 -20
  393. package/dest/storage/note_data_provider/note_data_provider.d.ts.map +0 -1
  394. package/dest/storage/note_data_provider/note_data_provider.js +0 -260
  395. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +0 -37
  396. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +0 -1
  397. package/dest/storage/private_event_data_provider/private_event_data_provider.js +0 -96
  398. package/dest/storage/sync_data_provider/index.d.ts +0 -2
  399. package/dest/storage/sync_data_provider/index.d.ts.map +0 -1
  400. package/dest/storage/sync_data_provider/index.js +0 -1
  401. package/dest/storage/sync_data_provider/sync_data_provider.d.ts +0 -12
  402. package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +0 -1
  403. package/dest/storage/tagging_data_provider/index.d.ts +0 -2
  404. package/dest/storage/tagging_data_provider/index.d.ts.map +0 -1
  405. package/dest/storage/tagging_data_provider/index.js +0 -1
  406. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +0 -18
  407. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +0 -1
  408. package/dest/storage/tagging_data_provider/tagging_data_provider.js +0 -82
  409. package/dest/synchronizer/index.d.ts +0 -2
  410. package/dest/synchronizer/index.d.ts.map +0 -1
  411. package/dest/synchronizer/index.js +0 -1
  412. package/dest/synchronizer/synchronizer.d.ts +0 -35
  413. package/dest/synchronizer/synchronizer.d.ts.map +0 -1
  414. package/dest/synchronizer/synchronizer.js +0 -102
  415. package/dest/test/pxe_test_suite.d.ts +0 -3
  416. package/dest/test/pxe_test_suite.d.ts.map +0 -1
  417. package/dest/test/pxe_test_suite.js +0 -97
  418. package/src/bin/index.ts +0 -62
  419. package/src/contract_function_simulator/execution_data_provider.ts +0 -361
  420. package/src/contract_function_simulator/oracle/typed_oracle.ts +0 -289
  421. package/src/contract_function_simulator/proxied_node.ts +0 -33
  422. package/src/contract_function_simulator/pxe_oracle_interface.ts +0 -1020
  423. package/src/contract_function_simulator/tagging_utils.ts +0 -32
  424. package/src/private_kernel/private_kernel_oracle_impl.ts +0 -132
  425. package/src/pxe_service/index.ts +0 -2
  426. package/src/pxe_service/pxe_service.ts +0 -1139
  427. package/src/storage/address_data_provider/index.ts +0 -1
  428. package/src/storage/capsule_data_provider/capsule_data_provider.ts +0 -157
  429. package/src/storage/capsule_data_provider/index.ts +0 -1
  430. package/src/storage/contract_data_provider/contract_data_provider.ts +0 -300
  431. package/src/storage/contract_data_provider/index.ts +0 -1
  432. package/src/storage/data_provider.ts +0 -3
  433. package/src/storage/note_data_provider/index.ts +0 -2
  434. package/src/storage/note_data_provider/note_dao.ts +0 -154
  435. package/src/storage/note_data_provider/note_data_provider.ts +0 -350
  436. package/src/storage/private_event_data_provider/private_event_data_provider.ts +0 -134
  437. package/src/storage/sync_data_provider/index.ts +0 -1
  438. package/src/storage/tagging_data_provider/index.ts +0 -1
  439. package/src/storage/tagging_data_provider/tagging_data_provider.ts +0 -123
  440. package/src/synchronizer/index.ts +0 -1
  441. package/src/synchronizer/synchronizer.ts +0 -121
  442. package/src/test/pxe_test_suite.ts +0 -113
@@ -1,31 +1,43 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { type CircuitSimulator } from '@aztec/simulator/client';
3
- import { type FunctionAbi, FunctionSelector, type NoteSelector } from '@aztec/stdlib/abi';
4
- import type { AuthWitness } from '@aztec/stdlib/auth-witness';
3
+ import { type FunctionAbi, type FunctionCall, FunctionSelector, type NoteSelector } from '@aztec/stdlib/abi';
5
4
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
6
- import type { ContractClassLog } from '@aztec/stdlib/logs';
5
+ import { PrivateContextInputs } from '@aztec/stdlib/kernel';
6
+ import { type ContractClassLog, type PreTag } from '@aztec/stdlib/logs';
7
+ import { Tag } from '@aztec/stdlib/logs';
7
8
  import { type NoteStatus } from '@aztec/stdlib/note';
8
- import { type BlockHeader, CallContext, Capsule, CountedContractClassLog, NoteAndSlot, PrivateCallExecutionResult, type TxContext } from '@aztec/stdlib/tx';
9
- import type { ExecutionDataProvider } from '../execution_data_provider.js';
9
+ import { CallContext, CountedContractClassLog, NoteAndSlot, PrivateCallExecutionResult, type TxContext } from '@aztec/stdlib/tx';
10
+ import type { AccessScopes } from '../../access_scopes.js';
11
+ import type { ContractSyncService } from '../../contract_sync/contract_sync_service.js';
12
+ import type { SenderTaggingStore } from '../../storage/tagging_store/sender_tagging_store.js';
10
13
  import type { ExecutionNoteCache } from '../execution_note_cache.js';
14
+ import { ExecutionTaggingIndexCache } from '../execution_tagging_index_cache.js';
11
15
  import type { HashedValuesCache } from '../hashed_values_cache.js';
12
- import type { NoteData } from './typed_oracle.js';
13
- import { UtilityExecutionOracle } from './utility_execution_oracle.js';
16
+ import type { IPrivateExecutionOracle, NoteData } from './interfaces.js';
17
+ import { UtilityExecutionOracle, type UtilityExecutionOracleArgs } from './utility_execution_oracle.js';
18
+ /** Args for PrivateExecutionOracle constructor. */
19
+ export type PrivateExecutionOracleArgs = Omit<UtilityExecutionOracleArgs, 'contractAddress'> & {
20
+ argsHash: Fr;
21
+ txContext: TxContext;
22
+ callContext: CallContext;
23
+ /** Needed to trigger contract synchronization before nested calls */
24
+ utilityExecutor: (call: FunctionCall, scopes: AccessScopes) => Promise<void>;
25
+ executionCache: HashedValuesCache;
26
+ noteCache: ExecutionNoteCache;
27
+ taggingIndexCache: ExecutionTaggingIndexCache;
28
+ senderTaggingStore: SenderTaggingStore;
29
+ contractSyncService: ContractSyncService;
30
+ totalPublicCalldataCount?: number;
31
+ sideEffectCounter?: number;
32
+ senderForTags?: AztecAddress;
33
+ simulator?: CircuitSimulator;
34
+ };
14
35
  /**
15
36
  * The execution oracle for the private part of a transaction.
16
37
  */
17
- export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
38
+ export declare class PrivateExecutionOracle extends UtilityExecutionOracle implements IPrivateExecutionOracle {
18
39
  #private;
19
- private readonly argsHash;
20
- private readonly txContext;
21
- private readonly callContext;
22
- /** Header of a block whose state is used during private execution (not the block the transaction is included in). */
23
- protected readonly historicalHeader: BlockHeader;
24
- private readonly executionCache;
25
- private readonly noteCache;
26
- private simulator;
27
- private totalPublicCalldataCount;
28
- protected sideEffectCounter: number;
40
+ isPrivate: true;
29
41
  /**
30
42
  * New notes created during this execution.
31
43
  * It's possible that a note in this list has been nullified (in the same or other executions) and doesn't exist in
@@ -35,37 +47,31 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
35
47
  * Users can also use this to get a clearer idea of what's happened during a simulation.
36
48
  */
37
49
  private 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
- */
47
- private noteHashLeafIndexMap;
48
50
  private noteHashNullifierCounterMap;
49
51
  private contractClassLogs;
50
52
  private offchainEffects;
51
53
  private nestedExecutionResults;
54
+ private readonly argsHash;
55
+ private readonly txContext;
56
+ private readonly callContext;
57
+ private readonly utilityExecutor;
58
+ private readonly executionCache;
59
+ private readonly noteCache;
60
+ private readonly taggingIndexCache;
61
+ private readonly senderTaggingStore;
62
+ private readonly contractSyncService;
63
+ private totalPublicCalldataCount;
64
+ protected sideEffectCounter: number;
52
65
  private senderForTags?;
53
- constructor(argsHash: Fr, txContext: TxContext, callContext: CallContext,
54
- /** Header of a block whose state is used during private execution (not the block the transaction is included in). */
55
- historicalHeader: BlockHeader,
56
- /** List of transient auth witnesses to be used during this simulation */
57
- authWitnesses: AuthWitness[], capsules: Capsule[], executionCache: HashedValuesCache, noteCache: ExecutionNoteCache, executionDataProvider: ExecutionDataProvider, simulator: CircuitSimulator, totalPublicCalldataCount: number, sideEffectCounter?: number, log?: import("@aztec/foundation/log").Logger, scopes?: AztecAddress[], senderForTags?: AztecAddress);
66
+ private readonly simulator?;
67
+ constructor(args: PrivateExecutionOracleArgs);
68
+ getPrivateContextInputs(): PrivateContextInputs;
58
69
  /**
59
70
  * Writes the function inputs to the initial witness.
60
71
  * @param abi - The function ABI.
61
72
  * @returns The initial witness.
62
73
  */
63
74
  getInitialWitness(abi: FunctionAbi): Map<number, string>;
64
- /**
65
- * The KernelProver will use this to fully populate witnesses and provide hints to the kernel circuit
66
- * regarding which note hash each settled read request corresponds to.
67
- */
68
- getNoteHashLeafIndexMap(): Map<bigint, bigint>;
69
75
  /**
70
76
  * Get the data for the newly created notes.
71
77
  */
@@ -81,6 +87,10 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
81
87
  getOffchainEffects(): {
82
88
  data: Fr[];
83
89
  }[];
90
+ /**
91
+ * Returns the pre-tags that were used in this execution (and that need to be stored in the db).
92
+ */
93
+ getUsedPreTags(): PreTag[];
84
94
  /**
85
95
  * Return the nested execution results during this execution.
86
96
  */
@@ -108,6 +118,13 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
108
118
  * value (unless it is replaced by another call to this setter).
109
119
  */
110
120
  privateSetSenderForTags(senderForTags: AztecAddress): Promise<void>;
121
+ /**
122
+ * Returns the next app tag for a given sender and recipient pair.
123
+ * @param sender - The address sending the log
124
+ * @param recipient - The address receiving the log
125
+ * @returns An app tag to be used in a log.
126
+ */
127
+ privateGetNextAppTagAsSender(sender: AztecAddress, recipient: AztecAddress): Promise<Tag>;
111
128
  /**
112
129
  * Store values in the execution cache.
113
130
  * @param values - Values to store.
@@ -120,6 +137,7 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
120
137
  * @returns The values.
121
138
  */
122
139
  privateLoadFromExecutionCache(hash: Fr): Promise<Fr[]>;
140
+ utilityCheckNullifierExists(innerNullifier: Fr): Promise<boolean>;
123
141
  /**
124
142
  * Gets some notes for a storage slot.
125
143
  *
@@ -128,6 +146,7 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
128
146
  * Real notes coming from DB will have a leafIndex which
129
147
  * represents their index in the note hash tree.
130
148
  *
149
+ * @param owner - The owner of the notes. If undefined, returns notes for all owners.
131
150
  * @param storageSlot - The storage slot.
132
151
  * @param numSelects - The number of valid selects in selectBy and selectValues.
133
152
  * @param selectBy - An array of indices of the fields to selects.
@@ -140,18 +159,19 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
140
159
  * @param status - The status of notes to fetch.
141
160
  * @returns Array of note data.
142
161
  */
143
- 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[]>;
144
163
  /**
145
164
  * Keep track of the new note created during execution.
146
165
  * It can be used in subsequent calls (or transactions when chaining txs is possible).
147
- * @param contractAddress - The contract address.
166
+ * @param owner - The owner of the note.
148
167
  * @param storageSlot - The storage slot.
168
+ * @param randomness - The randomness injected into the note.
149
169
  * @param noteTypeId - The type ID of the note.
150
170
  * @param noteItems - The items to be included in a Note.
151
171
  * @param noteHash - A hash of the new note.
152
172
  * @returns
153
173
  */
154
- 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;
155
175
  /**
156
176
  * Adding a siloed nullifier into the current set of all pending nullifiers created
157
177
  * within the current transaction/execution.
@@ -166,6 +186,14 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
166
186
  * @param noteHash - A hash of the new note.
167
187
  */
168
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>;
169
197
  /**
170
198
  * Emit a contract class log.
171
199
  * This fn exists because we only carry a poseidon hash through the kernels, and need to
@@ -204,17 +232,9 @@ export declare class PrivateExecutionOracle extends UtilityExecutionOracle {
204
232
  */
205
233
  privateNotifySetPublicTeardownFunctionCall(_targetContractAddress: AztecAddress, calldataHash: Fr, _sideEffectCounter: number, _isStaticCall: boolean): Promise<void>;
206
234
  privateNotifySetMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter: number): Promise<void>;
207
- /**
208
- * Derives the call context for a nested execution.
209
- * @param targetContractAddress - The address of the contract being called.
210
- * @param targetArtifact - The artifact of the function being called.
211
- * @param isStaticCall - Whether the call is a static call.
212
- * @returns The derived call context.
213
- */
235
+ privateIsSideEffectCounterRevertible(sideEffectCounter: number): Promise<boolean>;
214
236
  private deriveCallContext;
215
237
  getDebugFunctionName(): Promise<string>;
216
- privateIncrementAppTaggingSecretIndexAsSender(sender: AztecAddress, recipient: AztecAddress): Promise<void>;
217
- utilityFetchTaggedLogs(pendingTaggedLogArrayBaseSlot: Fr): Promise<void>;
218
238
  utilityEmitOffchainEffect(data: Fr[]): Promise<void>;
219
239
  }
220
- //# sourceMappingURL=private_execution_oracle.d.ts.map
240
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9leGVjdXRpb25fb3JhY2xlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL29yYWNsZS9wcml2YXRlX2V4ZWN1dGlvbl9vcmFjbGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBR3BELE9BQU8sRUFBRSxLQUFLLGdCQUFnQixFQUFpQixNQUFNLHlCQUF5QixDQUFDO0FBQy9FLE9BQU8sRUFDTCxLQUFLLFdBQVcsRUFFaEIsS0FBSyxZQUFZLEVBQ2pCLGdCQUFnQixFQUNoQixLQUFLLFlBQVksRUFFbEIsTUFBTSxtQkFBbUIsQ0FBQztBQUMzQixPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFFM0QsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDNUQsT0F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hCLGtCQUFrQixFQUFFLE1BQU0sRUFDMUIsYUFBYSxFQUFFLE9BQU8saUJBSXZCO0lBRUQ7Ozs7OztPQU1HO0lBQ0ksMENBQTBDLENBQy9DLHNCQUFzQixFQUFFLFlBQVksRUFDcEMsWUFBWSxFQUFFLEVBQUUsRUFDaEIsa0JBQWtCLEVBQUUsTUFBTSxFQUMxQixhQUFhLEVBQUUsT0FBTyxpQkFJdkI7SUFFTSw4Q0FBOEMsQ0FBQyw4QkFBOEIsRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUUzRztJQUVNLG9DQUFvQyxDQUFDLGlCQUFpQixFQUFFLE1BQU0sR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLENBRXZGO1lBU2EsaUJBQWlCO0lBYXhCLG9CQUFvQixvQkFFMUI7SUFFTSx5QkFBeUIsQ0FBQyxJQUFJLEVBQUUsRUFBRSxFQUFFLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUcxRDtDQUNGIn0=
@@ -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;AAG3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EACX,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G,OAAO,CAAC,IAAI,CAAC;CAIrE"}
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,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,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,KAAK,gBAAgB,EAA+B,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,WAAW,EACX,0BAA0B,EAC1B,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAExF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AAE9F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,KAAK,0BAA0B,EAAE,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;;;OA2FtB;IAcD;;;;;;OAMG;IACI,uCAAuC,CAC5C,sBAAsB,EAAE,YAAY,EACpC,YAAY,EAAE,EAAE,EAChB,kBAAkB,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,28 +1,24 @@
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 } from '@aztec/stdlib/hash';
7
+ import { siloNullifier } from '@aztec/stdlib/hash';
8
8
  import { PrivateContextInputs } from '@aztec/stdlib/kernel';
9
+ import { DirectionalAppTaggingSecret } from '@aztec/stdlib/logs';
10
+ import { Tag } from '@aztec/stdlib/logs';
9
11
  import { Note } from '@aztec/stdlib/note';
10
12
  import { CallContext, CountedContractClassLog, NoteAndSlot } from '@aztec/stdlib/tx';
13
+ import { NoteService } from '../../notes/note_service.js';
14
+ import { syncSenderTaggingIndexes } from '../../tagging/index.js';
11
15
  import { pickNotes } from '../pick_notes.js';
12
- import { executePrivateFunction, verifyCurrentClassId } from './private_execution.js';
16
+ import { executePrivateFunction } from './private_execution.js';
13
17
  import { UtilityExecutionOracle } from './utility_execution_oracle.js';
14
18
  /**
15
19
  * The execution oracle for the private part of a transaction.
16
20
  */ export class PrivateExecutionOracle extends UtilityExecutionOracle {
17
- argsHash;
18
- txContext;
19
- callContext;
20
- historicalHeader;
21
- executionCache;
22
- noteCache;
23
- simulator;
24
- totalPublicCalldataCount;
25
- sideEffectCounter;
21
+ isPrivate = true;
26
22
  /**
27
23
  * New notes created during this execution.
28
24
  * It's possible that a note in this list has been nullified (in the same or other executions) and doesn't exist in
@@ -30,24 +26,46 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
30
26
  * their commitments are still in the public inputs of this execution.
31
27
  * This information is only for references (currently used for tests), and is not used for any sort of constrains.
32
28
  * Users can also use this to get a clearer idea of what's happened during a simulation.
33
- */ newNotes;
34
- /**
35
- * Notes from previous transactions that are returned to the oracle call `getNotes` during this execution.
36
- * The mapping maps from the unique siloed note hash to the index for notes created in private executions.
37
- * It maps from siloed note hash to the index for notes created by public functions.
38
- *
39
- * They are not part of the ExecutionNoteCache and being forwarded to nested contexts via `extend()`
40
- * because these notes are meant to be maintained on a per-call basis
41
- * They should act as references for the read requests output by an app circuit via public inputs.
42
- */ noteHashLeafIndexMap;
43
- noteHashNullifierCounterMap;
44
- contractClassLogs;
45
- offchainEffects;
46
- nestedExecutionResults;
29
+ */ newNotes = [];
30
+ noteHashNullifierCounterMap = new Map();
31
+ contractClassLogs = [];
32
+ offchainEffects = [];
33
+ nestedExecutionResults = [];
34
+ argsHash;
35
+ txContext;
36
+ callContext;
37
+ utilityExecutor;
38
+ executionCache;
39
+ noteCache;
40
+ taggingIndexCache;
41
+ senderTaggingStore;
42
+ contractSyncService;
43
+ totalPublicCalldataCount;
44
+ sideEffectCounter;
47
45
  senderForTags;
48
- constructor(argsHash, txContext, callContext, /** Header of a block whose state is used during private execution (not the block the transaction is included in). */ historicalHeader, /** List of transient auth witnesses to be used during this simulation */ authWitnesses, capsules, executionCache, noteCache, executionDataProvider, simulator, totalPublicCalldataCount, sideEffectCounter = 0, log = createLogger('simulator:client_execution_context'), scopes, senderForTags){
49
- super(callContext.contractAddress, authWitnesses, capsules, executionDataProvider, log, scopes), this.argsHash = argsHash, this.txContext = txContext, this.callContext = callContext, this.historicalHeader = historicalHeader, this.executionCache = executionCache, this.noteCache = noteCache, this.simulator = simulator, this.totalPublicCalldataCount = totalPublicCalldataCount, this.sideEffectCounter = sideEffectCounter, this.newNotes = [], this.noteHashLeafIndexMap = new Map(), this.noteHashNullifierCounterMap = new Map(), this.contractClassLogs = [], this.offchainEffects = [], this.nestedExecutionResults = [];
50
- this.senderForTags = senderForTags;
46
+ simulator;
47
+ constructor(args){
48
+ super({
49
+ ...args,
50
+ contractAddress: args.callContext.contractAddress,
51
+ log: args.log ?? createLogger('simulator:client_execution_context')
52
+ });
53
+ this.argsHash = args.argsHash;
54
+ this.txContext = args.txContext;
55
+ this.callContext = args.callContext;
56
+ this.utilityExecutor = args.utilityExecutor;
57
+ this.executionCache = args.executionCache;
58
+ this.noteCache = args.noteCache;
59
+ this.taggingIndexCache = args.taggingIndexCache;
60
+ this.senderTaggingStore = args.senderTaggingStore;
61
+ this.contractSyncService = args.contractSyncService;
62
+ this.totalPublicCalldataCount = args.totalPublicCalldataCount ?? 0;
63
+ this.sideEffectCounter = args.sideEffectCounter ?? 0;
64
+ this.senderForTags = args.senderForTags;
65
+ this.simulator = args.simulator;
66
+ }
67
+ getPrivateContextInputs() {
68
+ return new PrivateContextInputs(this.callContext, this.anchorBlockHeader, this.txContext, this.sideEffectCounter);
51
69
  }
52
70
  // We still need this function until we can get user-defined ordering of structs for fn arguments
53
71
  // TODO When that is sorted out on noir side, we can use instead the utilities in serialize.ts
@@ -61,8 +79,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
61
79
  if (args?.length !== argumentsSize) {
62
80
  throw new Error(`Invalid arguments size: expected ${argumentsSize}, got ${args?.length}`);
63
81
  }
64
- const privateContextInputs = new PrivateContextInputs(this.callContext, this.historicalHeader, this.txContext, this.sideEffectCounter);
65
- const privateContextInputsAsFields = privateContextInputs.toFields();
82
+ const privateContextInputsAsFields = this.getPrivateContextInputs().toFields();
66
83
  if (privateContextInputsAsFields.length !== PRIVATE_CONTEXT_INPUTS_LENGTH) {
67
84
  throw new Error('Invalid private context inputs size');
68
85
  }
@@ -73,12 +90,6 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
73
90
  return toACVMWitness(0, fields);
74
91
  }
75
92
  /**
76
- * The KernelProver will use this to fully populate witnesses and provide hints to the kernel circuit
77
- * regarding which note hash each settled read request corresponds to.
78
- */ getNoteHashLeafIndexMap() {
79
- return this.noteHashLeafIndexMap;
80
- }
81
- /**
82
93
  * Get the data for the newly created notes.
83
94
  */ getNewNotes() {
84
95
  return this.newNotes;
@@ -97,6 +108,11 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
97
108
  return this.offchainEffects;
98
109
  }
99
110
  /**
111
+ * Returns the pre-tags that were used in this execution (and that need to be stored in the db).
112
+ */ getUsedPreTags() {
113
+ return this.taggingIndexCache.getUsedPreTags();
114
+ }
115
+ /**
100
116
  * Return the nested execution results during this execution.
101
117
  */ getNestedExecutionResults() {
102
118
  return this.nestedExecutionResults;
@@ -128,6 +144,42 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
128
144
  return Promise.resolve();
129
145
  }
130
146
  /**
147
+ * Returns the next app tag for a given sender and recipient pair.
148
+ * @param sender - The address sending the log
149
+ * @param recipient - The address receiving the log
150
+ * @returns An app tag to be used in a log.
151
+ */ async privateGetNextAppTagAsSender(sender, recipient) {
152
+ const secret = await this.#calculateDirectionalAppTaggingSecret(this.contractAddress, sender, recipient);
153
+ const index = await this.#getIndexToUseForSecret(secret);
154
+ this.log.debug(`Incrementing tagging index for sender: ${sender}, recipient: ${recipient}, contract: ${this.contractAddress} to ${index}`);
155
+ this.taggingIndexCache.setLastUsedIndex(secret, index);
156
+ return Tag.compute({
157
+ secret,
158
+ index
159
+ });
160
+ }
161
+ async #calculateDirectionalAppTaggingSecret(contractAddress, sender, recipient) {
162
+ const senderCompleteAddress = await this.getCompleteAddressOrFail(sender);
163
+ const senderIvsk = await this.keyStore.getMasterIncomingViewingSecretKey(sender);
164
+ return DirectionalAppTaggingSecret.compute(senderCompleteAddress, senderIvsk, recipient, contractAddress, recipient);
165
+ }
166
+ async #getIndexToUseForSecret(secret) {
167
+ // If we have the tagging index in the cache, we use it. If not we obtain it from the execution data provider.
168
+ const lastUsedIndexInTx = this.taggingIndexCache.getLastUsedIndex(secret);
169
+ if (lastUsedIndexInTx !== undefined) {
170
+ return lastUsedIndexInTx + 1;
171
+ } else {
172
+ // This is a tagging secret we've not yet used in this tx, so first sync our store to make sure its indices
173
+ // are up to date. We do this here because this store is not synced as part of the global sync because
174
+ // that'd be wasteful as most tagging secrets are not used in each tx.
175
+ await syncSenderTaggingIndexes(secret, this.contractAddress, this.aztecNode, this.senderTaggingStore, await this.anchorBlockHeader.hash(), this.jobId);
176
+ const lastUsedIndex = await this.senderTaggingStore.getLastUsedIndex(secret, this.jobId);
177
+ // If lastUsedIndex is undefined, we've never used this secret, so start from 0
178
+ // Otherwise, the next index to use is one past the last used index
179
+ return lastUsedIndex === undefined ? 0 : lastUsedIndex + 1;
180
+ }
181
+ }
182
+ /**
131
183
  * Store values in the execution cache.
132
184
  * @param values - Values to store.
133
185
  * @returns The hash of the values.
@@ -145,6 +197,16 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
145
197
  }
146
198
  return Promise.resolve(preimage);
147
199
  }
200
+ async utilityCheckNullifierExists(innerNullifier) {
201
+ // This oracle must be overridden because while utility execution can only meaningfully check if a nullifier exists
202
+ // in the synched block, during private execution there's also the possibility of it being pending, i.e. created
203
+ // in the current transaction.
204
+ this.log.debug(`Checking existence of inner nullifier ${innerNullifier}`, {
205
+ contractAddress: this.contractAddress
206
+ });
207
+ const nullifier = (await siloNullifier(this.contractAddress, innerNullifier)).toBigInt();
208
+ return this.noteCache.getNullifiers(this.contractAddress).has(nullifier) || await super.utilityCheckNullifierExists(innerNullifier);
209
+ }
148
210
  /**
149
211
  * Gets some notes for a storage slot.
150
212
  *
@@ -153,6 +215,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
153
215
  * Real notes coming from DB will have a leafIndex which
154
216
  * represents their index in the note hash tree.
155
217
  *
218
+ * @param owner - The owner of the notes. If undefined, returns notes for all owners.
156
219
  * @param storageSlot - The storage slot.
157
220
  * @param numSelects - The number of valid selects in selectBy and selectValues.
158
221
  * @param selectBy - An array of indices of the fields to selects.
@@ -164,11 +227,12 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
164
227
  * @param offset - The starting index for pagination.
165
228
  * @param status - The status of notes to fetch.
166
229
  * @returns Array of note data.
167
- */ async utilityGetNotes(storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
230
+ */ async utilityGetNotes(owner, storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
168
231
  // Nullified pending notes are already removed from the list.
169
- const pendingNotes = this.noteCache.getNotes(this.callContext.contractAddress, storageSlot);
232
+ const pendingNotes = this.noteCache.getNotes(this.callContext.contractAddress, owner, storageSlot);
170
233
  const pendingNullifiers = this.noteCache.getNullifiers(this.callContext.contractAddress);
171
- const dbNotes = await this.executionDataProvider.getNotes(this.callContext.contractAddress, storageSlot, status, this.scopes);
234
+ const noteService = new NoteService(this.noteStore, this.aztecNode, this.anchorBlockHeader, this.jobId);
235
+ const dbNotes = await noteService.getNotes(this.callContext.contractAddress, owner, storageSlot, status, this.scopes);
172
236
  const dbNotesFiltered = dbNotes.filter((n)=>!pendingNullifiers.has(n.siloedNullifier.value));
173
237
  const notes = pickNotes([
174
238
  ...dbNotesFiltered,
@@ -195,47 +259,44 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
195
259
  offset
196
260
  });
197
261
  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(', ')}`);
198
- const noteHashesAndIndexes = await Promise.all(notes.map(async (n)=>{
199
- if (n.index !== undefined) {
200
- const siloedNoteHash = await siloNoteHash(n.contractAddress, n.noteHash);
201
- const uniqueNoteHash = await computeUniqueNoteHash(n.noteNonce, siloedNoteHash);
202
- return {
203
- hash: uniqueNoteHash,
204
- index: n.index
205
- };
206
- }
207
- }));
208
- noteHashesAndIndexes.filter((n)=>n !== undefined).forEach((n)=>{
209
- this.noteHashLeafIndexMap.set(n.hash.toBigInt(), n.index);
210
- });
211
262
  return notes;
212
263
  }
213
264
  /**
214
265
  * Keep track of the new note created during execution.
215
266
  * It can be used in subsequent calls (or transactions when chaining txs is possible).
216
- * @param contractAddress - The contract address.
267
+ * @param owner - The owner of the note.
217
268
  * @param storageSlot - The storage slot.
269
+ * @param randomness - The randomness injected into the note.
218
270
  * @param noteTypeId - The type ID of the note.
219
271
  * @param noteItems - The items to be included in a Note.
220
272
  * @param noteHash - A hash of the new note.
221
273
  * @returns
222
- */ privateNotifyCreatedNote(storageSlot, noteTypeId, noteItems, noteHash, counter) {
274
+ */ privateNotifyCreatedNote(owner, storageSlot, randomness, noteTypeId, noteItems, noteHash, counter) {
223
275
  this.log.debug(`Notified of new note with inner hash ${noteHash}`, {
224
276
  contractAddress: this.callContext.contractAddress,
225
277
  storageSlot,
278
+ randomness,
226
279
  noteTypeId,
227
280
  counter
228
281
  });
229
282
  const note = new Note(noteItems);
230
283
  this.noteCache.addNewNote({
231
284
  contractAddress: this.callContext.contractAddress,
285
+ owner,
232
286
  storageSlot,
287
+ randomness,
233
288
  noteNonce: Fr.ZERO,
234
289
  note,
235
290
  siloedNullifier: undefined,
236
- noteHash
291
+ noteHash,
292
+ isPending: true
237
293
  }, counter);
238
- this.newNotes.push(new NoteAndSlot(note, storageSlot, noteTypeId));
294
+ this.newNotes.push(NoteAndSlot.from({
295
+ note,
296
+ storageSlot,
297
+ randomness,
298
+ noteTypeId
299
+ }));
239
300
  }
240
301
  /**
241
302
  * Adding a siloed nullifier into the current set of all pending nullifiers created
@@ -254,9 +315,23 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
254
315
  * @param innerNullifier - The pending nullifier to add in the list (not yet siloed by contract address).
255
316
  * @param noteHash - A hash of the new note.
256
317
  */ privateNotifyCreatedNullifier(innerNullifier) {
318
+ this.log.debug(`Notified of new inner nullifier ${innerNullifier}`, {
319
+ contractAddress: this.contractAddress
320
+ });
257
321
  return this.noteCache.nullifierCreated(this.callContext.contractAddress, innerNullifier);
258
322
  }
259
323
  /**
324
+ * Check if a nullifier has been emitted in the same transaction, i.e. if privateNotifyCreatedNullifier has been
325
+ * called for this inner nullifier from the contract with the specified address.
326
+ * @param innerNullifier - The inner nullifier to check.
327
+ * @param contractAddress - Address of the contract that emitted the nullifier.
328
+ * @returns A boolean indicating whether the nullifier is pending or not.
329
+ */ async privateIsNullifierPending(innerNullifier, contractAddress) {
330
+ const siloedNullifier = await siloNullifier(contractAddress, innerNullifier);
331
+ const isNullifierPending = this.noteCache.getNullifiers(contractAddress).has(siloedNullifier.toBigInt());
332
+ return Promise.resolve(isNullifierPending);
333
+ }
334
+ /**
260
335
  * Emit a contract class log.
261
336
  * This fn exists because we only carry a poseidon hash through the kernels, and need to
262
337
  * keep the preimage in ts for later.
@@ -281,14 +356,48 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
281
356
  * @param isStaticCall - Whether the call is a static call.
282
357
  * @returns The execution result.
283
358
  */ async privateCallPrivateFunction(targetContractAddress, functionSelector, argsHash, sideEffectCounter, isStaticCall) {
359
+ if (!this.simulator) {
360
+ // In practice it is only when creating inline private contexts in a Noir test using TXE that we create an
361
+ // instance of this class without a simulator.
362
+ throw new Error('No simulator provided, cannot perform a nested private call');
363
+ }
284
364
  const simulatorSetupTimer = new Timer();
285
365
  this.log.debug(`Calling private function ${targetContractAddress}:${functionSelector} from ${this.callContext.contractAddress}`);
286
366
  isStaticCall = isStaticCall || this.callContext.isStaticCall;
287
- await verifyCurrentClassId(targetContractAddress, this.executionDataProvider, this.historicalHeader);
288
- const targetArtifact = await this.executionDataProvider.getFunctionArtifact(targetContractAddress, functionSelector);
367
+ await this.contractSyncService.ensureContractSynced(targetContractAddress, functionSelector, this.utilityExecutor, this.anchorBlockHeader, this.jobId, this.scopes);
368
+ const targetArtifact = await this.contractStore.getFunctionArtifactWithDebugMetadata(targetContractAddress, functionSelector);
289
369
  const derivedTxContext = this.txContext.clone();
290
370
  const derivedCallContext = await this.deriveCallContext(targetContractAddress, targetArtifact, isStaticCall);
291
- const privateExecutionOracle = new PrivateExecutionOracle(argsHash, derivedTxContext, derivedCallContext, this.historicalHeader, this.authWitnesses, this.capsules, this.executionCache, this.noteCache, this.executionDataProvider, this.simulator, this.totalPublicCalldataCount, sideEffectCounter, this.log, this.scopes, this.senderForTags);
371
+ const privateExecutionOracle = new PrivateExecutionOracle({
372
+ argsHash,
373
+ txContext: derivedTxContext,
374
+ callContext: derivedCallContext,
375
+ anchorBlockHeader: this.anchorBlockHeader,
376
+ utilityExecutor: this.utilityExecutor,
377
+ authWitnesses: this.authWitnesses,
378
+ capsules: this.capsules,
379
+ executionCache: this.executionCache,
380
+ noteCache: this.noteCache,
381
+ taggingIndexCache: this.taggingIndexCache,
382
+ contractStore: this.contractStore,
383
+ noteStore: this.noteStore,
384
+ keyStore: this.keyStore,
385
+ addressStore: this.addressStore,
386
+ aztecNode: this.aztecNode,
387
+ senderTaggingStore: this.senderTaggingStore,
388
+ recipientTaggingStore: this.recipientTaggingStore,
389
+ senderAddressBookStore: this.senderAddressBookStore,
390
+ capsuleStore: this.capsuleStore,
391
+ privateEventStore: this.privateEventStore,
392
+ contractSyncService: this.contractSyncService,
393
+ jobId: this.jobId,
394
+ totalPublicCalldataCount: this.totalPublicCalldataCount,
395
+ sideEffectCounter,
396
+ log: this.log,
397
+ scopes: this.scopes,
398
+ senderForTags: this.senderForTags,
399
+ simulator: this.simulator
400
+ });
292
401
  const setupTime = simulatorSetupTimer.ms();
293
402
  const childExecutionResult = await executePrivateFunction(this.simulator, privateExecutionOracle, targetArtifact, targetContractAddress, functionSelector);
294
403
  if (isStaticCall) {
@@ -338,6 +447,9 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
338
447
  privateNotifySetMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter) {
339
448
  return this.noteCache.setMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter);
340
449
  }
450
+ privateIsSideEffectCounterRevertible(sideEffectCounter) {
451
+ return Promise.resolve(this.noteCache.isSideEffectCounterRevertible(sideEffectCounter));
452
+ }
341
453
  /**
342
454
  * Derives the call context for a nested execution.
343
455
  * @param targetContractAddress - The address of the contract being called.
@@ -348,14 +460,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
348
460
  return new CallContext(this.contractAddress, targetContractAddress, await FunctionSelector.fromNameAndParameters(targetArtifact.name, targetArtifact.parameters), isStaticCall);
349
461
  }
350
462
  getDebugFunctionName() {
351
- return this.executionDataProvider.getDebugFunctionName(this.contractAddress, this.callContext.functionSelector);
352
- }
353
- async privateIncrementAppTaggingSecretIndexAsSender(sender, recipient) {
354
- await this.executionDataProvider.incrementAppTaggingSecretIndexAsSender(this.contractAddress, sender, recipient);
355
- }
356
- async utilityFetchTaggedLogs(pendingTaggedLogArrayBaseSlot) {
357
- await this.executionDataProvider.syncTaggedLogs(this.contractAddress, pendingTaggedLogArrayBaseSlot, this.scopes);
358
- await this.executionDataProvider.removeNullifiedNotes(this.contractAddress);
463
+ return this.contractStore.getDebugFunctionName(this.contractAddress, this.callContext.functionSelector);
359
464
  }
360
465
  utilityEmitOffchainEffect(data) {
361
466
  this.offchainEffects.push({