@aztec/pxe 0.0.1-commit.d3ec352c → 0.0.1-commit.e3c1de76

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 (383) hide show
  1. package/dest/bin/check_oracle_version.js +105 -15
  2. package/dest/block_synchronizer/block_synchronizer.d.ts +43 -0
  3. package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -0
  4. package/dest/block_synchronizer/block_synchronizer.js +147 -0
  5. package/dest/block_synchronizer/index.d.ts +2 -0
  6. package/dest/block_synchronizer/index.d.ts.map +1 -0
  7. package/dest/block_synchronizer/index.js +1 -0
  8. package/dest/config/index.d.ts +6 -4
  9. package/dest/config/index.d.ts.map +1 -1
  10. package/dest/config/index.js +17 -0
  11. package/dest/config/package_info.js +1 -1
  12. package/dest/contract_function_simulator/benchmarked_node.d.ts +9 -0
  13. package/dest/contract_function_simulator/benchmarked_node.d.ts.map +1 -0
  14. package/dest/contract_function_simulator/benchmarked_node.js +77 -0
  15. package/dest/contract_function_simulator/contract_function_simulator.d.ts +40 -14
  16. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  17. package/dest/contract_function_simulator/contract_function_simulator.js +72 -33
  18. package/dest/contract_function_simulator/execution_note_cache.d.ts +21 -12
  19. package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
  20. package/dest/contract_function_simulator/execution_note_cache.js +48 -31
  21. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +1 -1
  22. package/dest/contract_function_simulator/execution_tagging_index_cache.js +1 -1
  23. package/dest/contract_function_simulator/hashed_values_cache.d.ts +2 -2
  24. package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -1
  25. package/dest/contract_function_simulator/index.d.ts +2 -2
  26. package/dest/contract_function_simulator/index.d.ts.map +1 -1
  27. package/dest/contract_function_simulator/index.js +1 -1
  28. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +5 -4
  29. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
  30. package/dest/contract_function_simulator/noir-structs/event_validation_request.js +6 -3
  31. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +5 -4
  32. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -1
  33. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +7 -6
  34. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +2 -2
  35. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -1
  36. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +1 -1
  37. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +3 -3
  38. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
  39. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +1 -1
  40. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +4 -10
  41. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -1
  42. package/dest/contract_function_simulator/noir-structs/utility_context.js +7 -18
  43. package/dest/contract_function_simulator/oracle/interfaces.d.ts +20 -16
  44. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
  45. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +4 -2
  46. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
  47. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +1 -1
  48. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +11 -7
  49. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
  50. package/dest/contract_function_simulator/oracle/note_packing_utils.js +14 -10
  51. package/dest/contract_function_simulator/oracle/oracle.d.ts +10 -8
  52. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
  53. package/dest/contract_function_simulator/oracle/oracle.js +58 -36
  54. package/dest/contract_function_simulator/oracle/private_execution.d.ts +2 -28
  55. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
  56. package/dest/contract_function_simulator/oracle/private_execution.js +2 -38
  57. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +32 -25
  58. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  59. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +41 -45
  60. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +73 -25
  61. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  62. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +168 -64
  63. package/dest/contract_function_simulator/pick_notes.d.ts +2 -2
  64. package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
  65. package/dest/contract_function_simulator/pick_notes.js +1 -1
  66. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +4 -4
  67. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
  68. package/dest/contract_function_simulator/proxied_contract_data_source.js +23 -5
  69. package/dest/contract_sync/index.d.ts +23 -0
  70. package/dest/contract_sync/index.d.ts.map +1 -0
  71. package/dest/contract_sync/index.js +54 -0
  72. package/dest/debug/pxe_debug_utils.d.ts +41 -0
  73. package/dest/debug/pxe_debug_utils.d.ts.map +1 -0
  74. package/dest/debug/pxe_debug_utils.js +47 -0
  75. package/dest/entrypoints/client/bundle/index.d.ts +1 -2
  76. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  77. package/dest/entrypoints/client/bundle/index.js +0 -1
  78. package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
  79. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
  80. package/dest/entrypoints/client/bundle/utils.js +23 -8
  81. package/dest/entrypoints/client/lazy/index.d.ts +1 -2
  82. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  83. package/dest/entrypoints/client/lazy/index.js +0 -1
  84. package/dest/entrypoints/client/lazy/utils.d.ts +2 -2
  85. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
  86. package/dest/entrypoints/client/lazy/utils.js +24 -9
  87. package/dest/entrypoints/pxe_creation_options.d.ts +7 -3
  88. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
  89. package/dest/entrypoints/server/index.d.ts +4 -2
  90. package/dest/entrypoints/server/index.d.ts.map +1 -1
  91. package/dest/entrypoints/server/index.js +3 -1
  92. package/dest/entrypoints/server/utils.d.ts +1 -1
  93. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  94. package/dest/entrypoints/server/utils.js +30 -15
  95. package/dest/error_enriching.d.ts +4 -4
  96. package/dest/error_enriching.d.ts.map +1 -1
  97. package/dest/error_enriching.js +6 -6
  98. package/dest/events/event_service.d.ts +15 -0
  99. package/dest/events/event_service.d.ts.map +1 -0
  100. package/dest/events/event_service.js +44 -0
  101. package/dest/events/index.d.ts +2 -0
  102. package/dest/events/index.d.ts.map +1 -0
  103. package/dest/events/index.js +1 -0
  104. package/dest/events/private_event_filter_validator.d.ts +9 -0
  105. package/dest/events/private_event_filter_validator.d.ts.map +1 -0
  106. package/dest/events/private_event_filter_validator.js +38 -0
  107. package/dest/job_coordinator/job_coordinator.d.ts +75 -0
  108. package/dest/job_coordinator/job_coordinator.d.ts.map +1 -0
  109. package/dest/job_coordinator/job_coordinator.js +94 -0
  110. package/dest/logs/log_service.d.ts +28 -0
  111. package/dest/logs/log_service.d.ts.map +1 -0
  112. package/dest/logs/log_service.js +125 -0
  113. package/dest/notes/index.d.ts +2 -0
  114. package/dest/notes/index.d.ts.map +1 -0
  115. package/dest/notes/index.js +1 -0
  116. package/dest/notes/note_service.d.ts +48 -0
  117. package/dest/notes/note_service.d.ts.map +1 -0
  118. package/dest/notes/note_service.js +147 -0
  119. package/dest/oracle_version.d.ts +3 -3
  120. package/dest/oracle_version.d.ts.map +1 -1
  121. package/dest/oracle_version.js +4 -3
  122. package/dest/private_kernel/hints/index.d.ts +2 -2
  123. package/dest/private_kernel/hints/index.d.ts.map +1 -1
  124. package/dest/private_kernel/hints/index.js +1 -1
  125. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +28 -0
  126. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -0
  127. package/dest/private_kernel/hints/{build_private_kernel_reset_private_inputs.js → private_kernel_reset_private_inputs_builder.js} +13 -7
  128. package/dest/private_kernel/private_kernel_execution_prover.d.ts +3 -2
  129. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  130. package/dest/private_kernel/private_kernel_execution_prover.js +10 -11
  131. package/dest/private_kernel/private_kernel_oracle.d.ts +26 -29
  132. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
  133. package/dest/private_kernel/private_kernel_oracle.js +90 -2
  134. package/dest/pxe.d.ts +45 -81
  135. package/dest/pxe.d.ts.map +1 -1
  136. package/dest/pxe.js +188 -217
  137. package/dest/storage/address_store/address_store.d.ts +11 -0
  138. package/dest/storage/address_store/address_store.d.ts.map +1 -0
  139. package/dest/storage/{address_data_provider/address_data_provider.js → address_store/address_store.js} +13 -12
  140. package/dest/storage/address_store/index.d.ts +2 -0
  141. package/dest/storage/address_store/index.d.ts.map +1 -0
  142. package/dest/storage/address_store/index.js +1 -0
  143. package/dest/storage/anchor_block_store/anchor_block_store.d.ts +17 -0
  144. package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -0
  145. package/dest/storage/{sync_data_provider/sync_data_provider.js → anchor_block_store/anchor_block_store.js} +10 -10
  146. package/dest/storage/{sync_data_provider → anchor_block_store}/index.d.ts +2 -2
  147. package/dest/storage/anchor_block_store/index.d.ts.map +1 -0
  148. package/dest/storage/anchor_block_store/index.js +1 -0
  149. package/dest/storage/capsule_store/capsule_store.d.ts +72 -0
  150. package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -0
  151. package/dest/storage/capsule_store/capsule_store.js +253 -0
  152. package/dest/storage/capsule_store/index.d.ts +2 -0
  153. package/dest/storage/capsule_store/index.d.ts.map +1 -0
  154. package/dest/storage/capsule_store/index.js +1 -0
  155. package/dest/storage/{contract_data_provider/contract_data_provider.d.ts → contract_store/contract_store.d.ts} +7 -5
  156. package/dest/storage/contract_store/contract_store.d.ts.map +1 -0
  157. package/dest/storage/{contract_data_provider/contract_data_provider.js → contract_store/contract_store.js} +56 -16
  158. package/dest/storage/contract_store/index.d.ts +2 -0
  159. package/dest/storage/contract_store/index.d.ts.map +1 -0
  160. package/dest/storage/contract_store/index.js +1 -0
  161. package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.d.ts +1 -1
  162. package/dest/storage/contract_store/private_functions_tree.d.ts.map +1 -0
  163. package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.js +1 -1
  164. package/dest/storage/index.d.ts +8 -8
  165. package/dest/storage/index.d.ts.map +1 -1
  166. package/dest/storage/index.js +7 -7
  167. package/dest/storage/metadata.d.ts +1 -1
  168. package/dest/storage/metadata.js +1 -1
  169. package/dest/storage/note_store/index.d.ts +3 -0
  170. package/dest/storage/note_store/index.d.ts.map +1 -0
  171. package/dest/storage/note_store/index.js +2 -0
  172. package/dest/storage/note_store/note_store.d.ts +83 -0
  173. package/dest/storage/note_store/note_store.d.ts.map +1 -0
  174. package/dest/storage/note_store/note_store.js +341 -0
  175. package/dest/storage/note_store/stored_note.d.ts +16 -0
  176. package/dest/storage/note_store/stored_note.d.ts.map +1 -0
  177. package/dest/storage/note_store/stored_note.js +43 -0
  178. package/dest/storage/private_event_store/private_event_store.d.ts +91 -0
  179. package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -0
  180. package/dest/storage/private_event_store/private_event_store.js +273 -0
  181. package/dest/storage/private_event_store/stored_private_event.d.ts +23 -0
  182. package/dest/storage/private_event_store/stored_private_event.d.ts.map +1 -0
  183. package/dest/storage/private_event_store/stored_private_event.js +56 -0
  184. package/dest/storage/tagging_store/index.d.ts +4 -0
  185. package/dest/storage/tagging_store/index.d.ts.map +1 -0
  186. package/dest/storage/tagging_store/index.js +3 -0
  187. package/dest/storage/tagging_store/recipient_tagging_store.d.ts +28 -0
  188. package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -0
  189. package/dest/storage/tagging_store/recipient_tagging_store.js +111 -0
  190. package/dest/storage/tagging_store/sender_address_book_store.d.ts +14 -0
  191. package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +1 -0
  192. package/dest/storage/tagging_store/sender_address_book_store.js +36 -0
  193. package/dest/storage/tagging_store/sender_tagging_store.d.ts +77 -0
  194. package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -0
  195. package/dest/storage/tagging_store/sender_tagging_store.js +348 -0
  196. package/dest/tagging/constants.d.ts +2 -2
  197. package/dest/tagging/constants.d.ts.map +1 -1
  198. package/dest/tagging/constants.js +10 -2
  199. package/dest/tagging/get_all_logs_by_tags.d.ts +24 -0
  200. package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -0
  201. package/dest/tagging/get_all_logs_by_tags.js +46 -0
  202. package/dest/tagging/index.d.ts +16 -6
  203. package/dest/tagging/index.d.ts.map +1 -1
  204. package/dest/tagging/index.js +15 -5
  205. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +15 -0
  206. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -0
  207. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +99 -0
  208. package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts +12 -0
  209. package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts.map +1 -0
  210. package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +20 -0
  211. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +15 -0
  212. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -0
  213. package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +32 -0
  214. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +21 -0
  215. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -0
  216. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +74 -0
  217. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +11 -0
  218. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -0
  219. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +29 -0
  220. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +21 -0
  221. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -0
  222. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +60 -0
  223. package/package.json +18 -18
  224. package/src/bin/check_oracle_version.ts +131 -20
  225. package/src/block_synchronizer/block_synchronizer.ts +172 -0
  226. package/src/block_synchronizer/index.ts +1 -0
  227. package/src/config/index.ts +17 -3
  228. package/src/config/package_info.ts +1 -1
  229. package/src/contract_function_simulator/benchmarked_node.ts +103 -0
  230. package/src/contract_function_simulator/contract_function_simulator.ts +114 -34
  231. package/src/contract_function_simulator/execution_note_cache.ts +51 -29
  232. package/src/contract_function_simulator/execution_tagging_index_cache.ts +1 -1
  233. package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
  234. package/src/contract_function_simulator/index.ts +1 -1
  235. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +6 -2
  236. package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +6 -5
  237. package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +1 -1
  238. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +2 -2
  239. package/src/contract_function_simulator/noir-structs/utility_context.ts +6 -25
  240. package/src/contract_function_simulator/oracle/interfaces.ts +25 -15
  241. package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
  242. package/src/contract_function_simulator/oracle/note_packing_utils.ts +27 -13
  243. package/src/contract_function_simulator/oracle/oracle.ts +74 -45
  244. package/src/contract_function_simulator/oracle/private_execution.ts +2 -69
  245. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +120 -59
  246. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +259 -81
  247. package/src/contract_function_simulator/pick_notes.ts +1 -1
  248. package/src/contract_function_simulator/proxied_contract_data_source.ts +24 -7
  249. package/src/contract_sync/index.ts +98 -0
  250. package/src/debug/pxe_debug_utils.ts +63 -0
  251. package/src/entrypoints/client/bundle/index.ts +0 -1
  252. package/src/entrypoints/client/bundle/utils.ts +15 -16
  253. package/src/entrypoints/client/lazy/index.ts +0 -1
  254. package/src/entrypoints/client/lazy/utils.ts +16 -17
  255. package/src/entrypoints/pxe_creation_options.ts +6 -2
  256. package/src/entrypoints/server/index.ts +3 -1
  257. package/src/entrypoints/server/utils.ts +26 -34
  258. package/src/error_enriching.ts +7 -15
  259. package/src/events/event_service.ts +71 -0
  260. package/src/events/index.ts +1 -0
  261. package/src/events/private_event_filter_validator.ts +46 -0
  262. package/src/job_coordinator/job_coordinator.ts +150 -0
  263. package/src/logs/log_service.ts +220 -0
  264. package/src/notes/index.ts +1 -0
  265. package/src/notes/note_service.ts +195 -0
  266. package/src/oracle_version.ts +4 -3
  267. package/src/private_kernel/hints/index.ts +1 -1
  268. package/src/private_kernel/hints/{build_private_kernel_reset_private_inputs.ts → private_kernel_reset_private_inputs_builder.ts} +34 -23
  269. package/src/private_kernel/private_kernel_execution_prover.ts +13 -12
  270. package/src/private_kernel/private_kernel_oracle.ts +118 -37
  271. package/src/pxe.ts +267 -282
  272. package/src/storage/{address_data_provider/address_data_provider.ts → address_store/address_store.ts} +16 -16
  273. package/src/storage/address_store/index.ts +1 -0
  274. package/src/storage/{sync_data_provider/sync_data_provider.ts → anchor_block_store/anchor_block_store.ts} +10 -12
  275. package/src/storage/anchor_block_store/index.ts +1 -0
  276. package/src/storage/capsule_store/capsule_store.ts +315 -0
  277. package/src/storage/capsule_store/index.ts +1 -0
  278. package/src/storage/{contract_data_provider/contract_data_provider.ts → contract_store/contract_store.ts} +67 -14
  279. package/src/storage/contract_store/index.ts +1 -0
  280. package/src/storage/{contract_data_provider → contract_store}/private_functions_tree.ts +1 -1
  281. package/src/storage/index.ts +7 -7
  282. package/src/storage/metadata.ts +1 -1
  283. package/src/storage/note_store/index.ts +2 -0
  284. package/src/storage/note_store/note_store.ts +411 -0
  285. package/src/storage/note_store/stored_note.ts +48 -0
  286. package/src/storage/private_event_store/private_event_store.ts +384 -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 +139 -0
  290. package/src/storage/tagging_store/sender_address_book_store.ts +48 -0
  291. package/src/storage/tagging_store/sender_tagging_store.ts +429 -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 -267
  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 -123
  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 -696
  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_data_provider.d.ts +0 -83
  335. package/dest/storage/note_data_provider/note_data_provider.d.ts.map +0 -1
  336. package/dest/storage/note_data_provider/note_data_provider.js +0 -314
  337. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +0 -37
  338. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +0 -1
  339. package/dest/storage/private_event_data_provider/private_event_data_provider.js +0 -105
  340. package/dest/storage/sync_data_provider/index.d.ts.map +0 -1
  341. package/dest/storage/sync_data_provider/index.js +0 -1
  342. package/dest/storage/sync_data_provider/sync_data_provider.d.ts +0 -11
  343. package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +0 -1
  344. package/dest/storage/tagging_data_provider/index.d.ts +0 -2
  345. package/dest/storage/tagging_data_provider/index.d.ts.map +0 -1
  346. package/dest/storage/tagging_data_provider/index.js +0 -1
  347. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +0 -40
  348. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +0 -1
  349. package/dest/storage/tagging_data_provider/tagging_data_provider.js +0 -89
  350. package/dest/synchronizer/index.d.ts +0 -2
  351. package/dest/synchronizer/index.d.ts.map +0 -1
  352. package/dest/synchronizer/index.js +0 -1
  353. package/dest/synchronizer/synchronizer.d.ts +0 -36
  354. package/dest/synchronizer/synchronizer.d.ts.map +0 -1
  355. package/dest/synchronizer/synchronizer.js +0 -102
  356. package/dest/tagging/siloed_tag.d.ts +0 -14
  357. package/dest/tagging/siloed_tag.d.ts.map +0 -1
  358. package/dest/tagging/siloed_tag.js +0 -20
  359. package/dest/tagging/tag.d.ts +0 -12
  360. package/dest/tagging/tag.d.ts.map +0 -1
  361. package/dest/tagging/tag.js +0 -17
  362. package/dest/tagging/utils.d.ts +0 -18
  363. package/dest/tagging/utils.d.ts.map +0 -1
  364. package/dest/tagging/utils.js +0 -24
  365. package/src/contract_function_simulator/execution_data_provider.ts +0 -342
  366. package/src/contract_function_simulator/proxied_node.ts +0 -33
  367. package/src/contract_function_simulator/pxe_oracle_interface.ts +0 -1023
  368. package/src/private_kernel/private_kernel_oracle_impl.ts +0 -132
  369. package/src/storage/address_data_provider/index.ts +0 -1
  370. package/src/storage/capsule_data_provider/capsule_data_provider.ts +0 -147
  371. package/src/storage/capsule_data_provider/index.ts +0 -1
  372. package/src/storage/contract_data_provider/index.ts +0 -1
  373. package/src/storage/note_data_provider/index.ts +0 -2
  374. package/src/storage/note_data_provider/note_data_provider.ts +0 -403
  375. package/src/storage/private_event_data_provider/private_event_data_provider.ts +0 -143
  376. package/src/storage/sync_data_provider/index.ts +0 -1
  377. package/src/storage/tagging_data_provider/index.ts +0 -1
  378. package/src/storage/tagging_data_provider/tagging_data_provider.ts +0 -120
  379. package/src/synchronizer/index.ts +0 -1
  380. package/src/synchronizer/synchronizer.ts +0 -121
  381. package/src/tagging/siloed_tag.ts +0 -22
  382. package/src/tagging/tag.ts +0 -16
  383. package/src/tagging/utils.ts +0 -31
@@ -0,0 +1,11 @@
1
+ import type { AztecAsyncKVStore } from '@aztec/kv-store';
2
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
3
+ import { CompleteAddress } from '@aztec/stdlib/contract';
4
+ export declare class AddressStore {
5
+ #private;
6
+ constructor(store: AztecAsyncKVStore);
7
+ addCompleteAddress(completeAddress: CompleteAddress): Promise<boolean>;
8
+ getCompleteAddress(account: AztecAddress): Promise<CompleteAddress | undefined>;
9
+ getCompleteAddresses(): Promise<CompleteAddress[]>;
10
+ }
11
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkcmVzc19zdG9yZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3N0b3JhZ2UvYWRkcmVzc19zdG9yZS9hZGRyZXNzX3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFtQixpQkFBaUIsRUFBaUIsTUFBTSxpQkFBaUIsQ0FBQztBQUN6RixPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUNoRSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFekQscUJBQWEsWUFBWTs7SUFLdkIsWUFBWSxLQUFLLEVBQUUsaUJBQWlCLEVBS25DO0lBRUQsa0JBQWtCLENBQUMsZUFBZSxFQUFFLGVBQWUsR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLENBMEJyRTtJQUVELGtCQUFrQixDQUFDLE9BQU8sRUFBRSxZQUFZLEdBQUcsT0FBTyxDQUFDLGVBQWUsR0FBRyxTQUFTLENBQUMsQ0FVOUU7SUFFRCxvQkFBb0IsSUFBSSxPQUFPLENBQUMsZUFBZSxFQUFFLENBQUMsQ0FNakQ7Q0FDRiJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address_store.d.ts","sourceRoot":"","sources":["../../../src/storage/address_store/address_store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACzF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,qBAAa,YAAY;;IAKvB,YAAY,KAAK,EAAE,iBAAiB,EAKnC;IAED,kBAAkB,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CA0BrE;IAED,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAU9E;IAED,oBAAoB,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAMjD;CACF"}
@@ -1,6 +1,6 @@
1
1
  import { toArray } from '@aztec/foundation/iterable';
2
2
  import { CompleteAddress } from '@aztec/stdlib/contract';
3
- export class AddressDataProvider {
3
+ export class AddressStore {
4
4
  #store;
5
5
  #completeAddresses;
6
6
  #completeAddressIndex;
@@ -30,18 +30,19 @@ export class AddressDataProvider {
30
30
  }
31
31
  });
32
32
  }
33
- async #getCompleteAddress(address) {
34
- const index = await this.#completeAddressIndex.getAsync(address.toString());
35
- if (index === undefined) {
36
- return undefined;
37
- }
38
- const value = await this.#completeAddresses.atAsync(index);
39
- return value ? await CompleteAddress.fromBuffer(value) : undefined;
40
- }
41
33
  getCompleteAddress(account) {
42
- return this.#getCompleteAddress(account);
34
+ return this.#store.transactionAsync(async ()=>{
35
+ const index = await this.#completeAddressIndex.getAsync(account.toString());
36
+ if (index === undefined) {
37
+ return undefined;
38
+ }
39
+ const value = await this.#completeAddresses.atAsync(index);
40
+ return value ? await CompleteAddress.fromBuffer(value) : undefined;
41
+ });
43
42
  }
44
- async getCompleteAddresses() {
45
- return await Promise.all((await toArray(this.#completeAddresses.valuesAsync())).map((v)=>CompleteAddress.fromBuffer(v)));
43
+ getCompleteAddresses() {
44
+ return this.#store.transactionAsync(async ()=>{
45
+ return await Promise.all((await toArray(this.#completeAddresses.valuesAsync())).map((v)=>CompleteAddress.fromBuffer(v)));
46
+ });
46
47
  }
47
48
  }
@@ -0,0 +1,2 @@
1
+ export { AddressStore } from './address_store.js';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdG9yYWdlL2FkZHJlc3Nfc3RvcmUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG9CQUFvQixDQUFDIn0=
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/address_store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ export { AddressStore } from './address_store.js';
@@ -0,0 +1,17 @@
1
+ import type { AztecAsyncKVStore } from '@aztec/kv-store';
2
+ import { BlockHeader } from '@aztec/stdlib/tx';
3
+ export declare class AnchorBlockStore {
4
+ #private;
5
+ constructor(store: AztecAsyncKVStore);
6
+ /**
7
+ * Sets the currently synchronized block
8
+ *
9
+ * Important: this method is only called from BlockSynchronizer, and since we need it to run atomically with other
10
+ * stores in the case of a reorg, it MUST NOT be wrapped in a `transactionAsync` call. Doing so would result in a
11
+ * deadlock when the backend is IndexedDB, because `transactionAsync` is not designed to support reentrancy.
12
+ *
13
+ */
14
+ setHeader(header: BlockHeader): Promise<void>;
15
+ getBlockHeader(): Promise<BlockHeader>;
16
+ }
17
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5jaG9yX2Jsb2NrX3N0b3JlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3RvcmFnZS9hbmNob3JfYmxvY2tfc3RvcmUvYW5jaG9yX2Jsb2NrX3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUF1QixNQUFNLGlCQUFpQixDQUFDO0FBQzlFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUUvQyxxQkFBYSxnQkFBZ0I7O0lBSTNCLFlBQVksS0FBSyxFQUFFLGlCQUFpQixFQUduQztJQUVEOzs7Ozs7O09BT0c7SUFDRyxTQUFTLENBQUMsTUFBTSxFQUFFLFdBQVcsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLENBRWxEO0lBRUssY0FBYyxJQUFJLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FPM0M7Q0FDRiJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anchor_block_store.d.ts","sourceRoot":"","sources":["../../../src/storage/anchor_block_store/anchor_block_store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,gBAAgB;;IAI3B,YAAY,KAAK,EAAE,iBAAiB,EAGnC;IAED;;;;;;;OAOG;IACG,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAElD;IAEK,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAO3C;CACF"}
@@ -1,25 +1,25 @@
1
1
  import { BlockHeader } from '@aztec/stdlib/tx';
2
- export class SyncDataProvider {
2
+ export class AnchorBlockStore {
3
3
  #store;
4
4
  #synchronizedHeader;
5
5
  constructor(store){
6
6
  this.#store = store;
7
7
  this.#synchronizedHeader = this.#store.openSingleton('header');
8
8
  }
9
- async setHeader(header) {
9
+ /**
10
+ * Sets the currently synchronized block
11
+ *
12
+ * Important: this method is only called from BlockSynchronizer, and since we need it to run atomically with other
13
+ * stores in the case of a reorg, it MUST NOT be wrapped in a `transactionAsync` call. Doing so would result in a
14
+ * deadlock when the backend is IndexedDB, because `transactionAsync` is not designed to support reentrancy.
15
+ *
16
+ */ async setHeader(header) {
10
17
  await this.#synchronizedHeader.set(header.toBuffer());
11
18
  }
12
- async getBlockNumber() {
13
- const headerBuffer = await this.#synchronizedHeader.getAsync();
14
- if (!headerBuffer) {
15
- throw new Error(`Trying to get block number with a not-yet-synchronized PXE - this should never happen`);
16
- }
17
- return BlockHeader.fromBuffer(headerBuffer).globalVariables.blockNumber;
18
- }
19
19
  async getBlockHeader() {
20
20
  const headerBuffer = await this.#synchronizedHeader.getAsync();
21
21
  if (!headerBuffer) {
22
- throw new Error(`Header not set`);
22
+ throw new Error(`Trying to get block header with a not-yet-synchronized PXE - this should never happen`);
23
23
  }
24
24
  return BlockHeader.fromBuffer(headerBuffer);
25
25
  }
@@ -1,2 +1,2 @@
1
- export { SyncDataProvider } from './sync_data_provider.js';
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdG9yYWdlL3N5bmNfZGF0YV9wcm92aWRlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQyJ9
1
+ export { AnchorBlockStore } from './anchor_block_store.js';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdG9yYWdlL2FuY2hvcl9ibG9ja19zdG9yZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQyJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/anchor_block_store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1 @@
1
+ export { AnchorBlockStore } from './anchor_block_store.js';
@@ -0,0 +1,72 @@
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
+ import { type Logger } from '@aztec/foundation/log';
3
+ import type { AztecAsyncKVStore } from '@aztec/kv-store';
4
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
5
+ import type { StagedStore } from '../../job_coordinator/job_coordinator.js';
6
+ export declare class CapsuleStore implements StagedStore {
7
+ #private;
8
+ readonly storeName = "capsule";
9
+ logger: Logger;
10
+ constructor(store: AztecAsyncKVStore);
11
+ /**
12
+ * Commits staged data to main storage.
13
+ * Called by JobCoordinator when a job completes successfully.
14
+ * Note: JobCoordinator wraps all commits in a single transaction, so we don't
15
+ * need our own transactionAsync here (and using one would deadlock on IndexedDB).
16
+ * @param jobId - The jobId identifying which staged data to commit
17
+ */
18
+ commit(jobId: string): Promise<void>;
19
+ /**
20
+ * Discards staged data without committing.
21
+ */
22
+ discardStaged(jobId: string): Promise<void>;
23
+ /**
24
+ * Stores arbitrary information in a per-contract non-volatile database, which can later be retrieved with `loadCapsule`.
25
+ * * If data was already stored at this slot, it is overwritten.
26
+ * @param contractAddress - The contract address to scope the data under.
27
+ * @param slot - The slot in the database in which to store the value. Slots need not be contiguous.
28
+ * @param capsule - An array of field elements representing the capsule.
29
+ * @param jobId - The context in which this store will be visible until PXE decides to persist it to underlying KV store
30
+ * @remarks A capsule is a "blob" of data that is passed to the contract through an oracle. It works similarly
31
+ * to public contract storage in that it's indexed by the contract address and storage slot but instead of the global
32
+ * network state it's backed by local PXE db.
33
+ */
34
+ storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[], jobId: string): void;
35
+ /**
36
+ * Returns data previously stored via `storeCapsule` in the per-contract non-volatile database.
37
+ * @param contractAddress - The contract address under which the data is scoped.
38
+ * @param slot - The slot in the database to read.
39
+ * @returns The stored data or `null` if no data is stored under the slot.
40
+ */
41
+ loadCapsule(contractAddress: AztecAddress, slot: Fr, jobId: string): Promise<Fr[] | null>;
42
+ /**
43
+ * Deletes data in the per-contract non-volatile database. Does nothing if no data was present.
44
+ * @param contractAddress - The contract address under which the data is scoped.
45
+ * @param slot - The slot in the database to delete.
46
+ */
47
+ deleteCapsule(contractAddress: AztecAddress, slot: Fr, jobId: string): void;
48
+ /**
49
+ * Copies a number of contiguous entries in the per-contract non-volatile database. This allows for efficient data
50
+ * structures by avoiding repeated calls to `loadCapsule` and `storeCapsule`.
51
+ * Supports overlapping source and destination regions (which will result in the overlapped source values being
52
+ * overwritten). All copied slots must exist in the database (i.e. have been stored and not deleted)
53
+ *
54
+ * @param contractAddress - The contract address under which the data is scoped.
55
+ * @param srcSlot - The first slot to copy from.
56
+ * @param dstSlot - The first slot to copy to.
57
+ * @param numEntries - The number of entries to copy.
58
+ */
59
+ copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number, jobId: string): Promise<void>;
60
+ /**
61
+ * Appends multiple capsules to a capsule array stored at the base slot.
62
+ * The array length is stored at the base slot, and elements are stored in consecutive slots after it.
63
+ * All operations are performed in a single transaction.
64
+ * @param contractAddress - The contract address that owns the capsule array
65
+ * @param baseSlot - The slot where the array length is stored
66
+ * @param content - Array of capsule data to append
67
+ */
68
+ appendToCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][], jobId: string): Promise<void>;
69
+ readCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, jobId: string): Promise<Fr[][]>;
70
+ setCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][], jobId: string): Promise<void>;
71
+ }
72
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2Fwc3VsZV9zdG9yZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3N0b3JhZ2UvY2Fwc3VsZV9zdG9yZS9jYXBzdWxlX3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEVBQUUsS0FBSyxNQUFNLEVBQWdCLE1BQU0sdUJBQXVCLENBQUM7QUFDbEUsT0FBTyxLQUFLLEVBQUUsaUJBQWlCLEVBQWlCLE1BQU0saUJBQWlCLENBQUM7QUFDeEUsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFFaEUsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sMENBQTBDLENBQUM7QUFFNUUscUJBQWEsWUFBYSxZQUFXLFdBQVc7O0lBQzlDLFFBQVEsQ0FBQyxTQUFTLGFBQWE7SUFZL0IsTUFBTSxFQUFFLE1BQU0sQ0FBQztJQUVmLFlBQVksS0FBSyxFQUFFLGlCQUFpQixFQVFuQztJQStERDs7Ozs7O09BTUc7SUFDRyxNQUFNLENBQUMsS0FBSyxFQUFFLE1BQU0sR0FBR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,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAW9F;IAED;;;;OAIG;IACH,aAAa,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,QAGnE;IAED;;;;;;;;;;OAUG;IACH,WAAW,CACT,eAAe,EAAE,YAAY,EAC7B,OAAO,EAAE,EAAE,EACX,OAAO,EAAE,EAAE,EACX,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CA2Bf;IAED;;;;;;;OAOG;IACH,oBAAoB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB/G;IAED,gBAAgB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CA2B5F;IAED,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,iBA2B1F;CACF"}
@@ -0,0 +1,253 @@
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
+ import { createLogger } from '@aztec/foundation/log';
3
+ export class CapsuleStore {
4
+ storeName = 'capsule';
5
+ #store;
6
+ // Arbitrary data stored by contracts. Key is computed as `${contractAddress}:${key}`
7
+ #capsules;
8
+ // jobId => `${contractAddress}:${key}` => capsule data
9
+ // when `#stagedCapsules.get('some-job-id').get('${some-contract-address:some-key') === null`,
10
+ // it signals that the capsule was deleted during the job, so it needs to be deleted on commit
11
+ #stagedCapsules;
12
+ logger;
13
+ constructor(store){
14
+ this.#store = store;
15
+ this.#capsules = this.#store.openMap('capsules');
16
+ this.#stagedCapsules = new Map();
17
+ this.logger = createLogger('pxe:capsule-data-provider');
18
+ }
19
+ /**
20
+ * Given a job denoted by `jobId`, it returns the
21
+ * capsules that said job has interacted with.
22
+ *
23
+ * Capsules that haven't been committed to persistence KV storage
24
+ * are kept in-memory in `#stagedCapsules`, this method provides a convenient
25
+ * way to access that in-memory collection of data.
26
+ *
27
+ * @param jobId
28
+ * @returns
29
+ */ #getJobStagedCapsules(jobId) {
30
+ let jobStagedCapsules = this.#stagedCapsules.get(jobId);
31
+ if (!jobStagedCapsules) {
32
+ jobStagedCapsules = new Map();
33
+ this.#stagedCapsules.set(jobId, jobStagedCapsules);
34
+ }
35
+ return jobStagedCapsules;
36
+ }
37
+ /**
38
+ * Reads a capsule's slot from the staged version of the data associated to the given jobId.
39
+ *
40
+ * If it is not there, it reads it from the KV store.
41
+ */ async #getFromStage(jobId, dbSlotKey) {
42
+ const jobStagedCapsules = this.#getJobStagedCapsules(jobId);
43
+ const staged = jobStagedCapsules.get(dbSlotKey);
44
+ // Always issue DB read to keep IndexedDB transaction alive, even if the value is in the job staged data. This
45
+ // keeps IndexedDB transactions alive (they auto-commit when a new micro-task starts and there are no pending read
46
+ // requests). The staged value still takes precedence if it exists (including null for deletions).
47
+ const dbValue = await this.#loadCapsuleFromDb(dbSlotKey);
48
+ return staged !== undefined ? staged : dbValue;
49
+ }
50
+ /**
51
+ * Writes a capsule to the stage of a job.
52
+ */ #setOnStage(jobId, dbSlotKey, capsuleData) {
53
+ this.#getJobStagedCapsules(jobId).set(dbSlotKey, capsuleData);
54
+ }
55
+ /**
56
+ * Deletes a capsule on the stage of a job. Note the capsule will still
57
+ * exist in storage until the job is committed.
58
+ */ #deleteOnStage(jobId, dbSlotKey) {
59
+ this.#getJobStagedCapsules(jobId).set(dbSlotKey, null);
60
+ }
61
+ async #loadCapsuleFromDb(dbSlotKey) {
62
+ const dataBuffer = await this.#capsules.getAsync(dbSlotKey);
63
+ if (!dataBuffer) {
64
+ return null;
65
+ }
66
+ return dataBuffer;
67
+ }
68
+ /**
69
+ * Commits staged data to main storage.
70
+ * Called by JobCoordinator when a job completes successfully.
71
+ * Note: JobCoordinator wraps all commits in a single transaction, so we don't
72
+ * need our own transactionAsync here (and using one would deadlock on IndexedDB).
73
+ * @param jobId - The jobId identifying which staged data to commit
74
+ */ async commit(jobId) {
75
+ const jobStagedCapsules = this.#getJobStagedCapsules(jobId);
76
+ for (const [key, value] of jobStagedCapsules){
77
+ // In the write stage, we represent deleted capsules with null
78
+ // (as opposed to undefined, which denotes there was never a capsule there to begin with).
79
+ // So we delete from actual KV store here.
80
+ if (value === null) {
81
+ await this.#capsules.delete(key);
82
+ } else {
83
+ await this.#capsules.set(key, value);
84
+ }
85
+ }
86
+ this.#stagedCapsules.delete(jobId);
87
+ }
88
+ /**
89
+ * Discards staged data without committing.
90
+ */ discardStaged(jobId) {
91
+ this.#stagedCapsules.delete(jobId);
92
+ return Promise.resolve();
93
+ }
94
+ /**
95
+ * Stores arbitrary information in a per-contract non-volatile database, which can later be retrieved with `loadCapsule`.
96
+ * * If data was already stored at this slot, it is overwritten.
97
+ * @param contractAddress - The contract address to scope the data under.
98
+ * @param slot - The slot in the database in which to store the value. Slots need not be contiguous.
99
+ * @param capsule - An array of field elements representing the capsule.
100
+ * @param jobId - The context in which this store will be visible until PXE decides to persist it to underlying KV store
101
+ * @remarks A capsule is a "blob" of data that is passed to the contract through an oracle. It works similarly
102
+ * to public contract storage in that it's indexed by the contract address and storage slot but instead of the global
103
+ * network state it's backed by local PXE db.
104
+ */ storeCapsule(contractAddress, slot, capsule, jobId) {
105
+ const dbSlotKey = dbSlotToKey(contractAddress, slot);
106
+ // A store overrides any pre-existing data on the slot
107
+ this.#setOnStage(jobId, dbSlotKey, Buffer.concat(capsule.map((value)=>value.toBuffer())));
108
+ }
109
+ /**
110
+ * Returns data previously stored via `storeCapsule` in the per-contract non-volatile database.
111
+ * @param contractAddress - The contract address under which the data is scoped.
112
+ * @param slot - The slot in the database to read.
113
+ * @returns The stored data or `null` if no data is stored under the slot.
114
+ */ async loadCapsule(contractAddress, slot, jobId) {
115
+ const dataBuffer = await this.#getFromStage(jobId, dbSlotToKey(contractAddress, slot));
116
+ if (!dataBuffer) {
117
+ this.logger.trace(`Data not found for contract ${contractAddress.toString()} and slot ${slot.toString()}`);
118
+ return null;
119
+ }
120
+ const capsule = [];
121
+ for(let i = 0; i < dataBuffer.length; i += Fr.SIZE_IN_BYTES){
122
+ capsule.push(Fr.fromBuffer(dataBuffer.subarray(i, i + Fr.SIZE_IN_BYTES)));
123
+ }
124
+ return capsule;
125
+ }
126
+ /**
127
+ * Deletes data in the per-contract non-volatile database. Does nothing if no data was present.
128
+ * @param contractAddress - The contract address under which the data is scoped.
129
+ * @param slot - The slot in the database to delete.
130
+ */ deleteCapsule(contractAddress, slot, jobId) {
131
+ // When we commit this, we will interpret null as a deletion, so we'll propagate the delete to the KV store
132
+ this.#deleteOnStage(jobId, dbSlotToKey(contractAddress, slot));
133
+ }
134
+ /**
135
+ * Copies a number of contiguous entries in the per-contract non-volatile database. This allows for efficient data
136
+ * structures by avoiding repeated calls to `loadCapsule` and `storeCapsule`.
137
+ * Supports overlapping source and destination regions (which will result in the overlapped source values being
138
+ * overwritten). All copied slots must exist in the database (i.e. have been stored and not deleted)
139
+ *
140
+ * @param contractAddress - The contract address under which the data is scoped.
141
+ * @param srcSlot - The first slot to copy from.
142
+ * @param dstSlot - The first slot to copy to.
143
+ * @param numEntries - The number of entries to copy.
144
+ */ copyCapsule(contractAddress, srcSlot, dstSlot, numEntries, jobId) {
145
+ // This transactional context gives us "copy atomicity":
146
+ // there shouldn't be concurrent writes to what's being copied here.
147
+ // Equally important: this in practice is expected to perform thousands of DB operations
148
+ // and not using a transaction here would heavily impact performance.
149
+ return this.#store.transactionAsync(async ()=>{
150
+ // In order to support overlapping source and destination regions, we need to check the relative positions of source
151
+ // and destination. If destination is ahead of source, then by the time we overwrite source elements using forward
152
+ // indexes we'll have already read those. On the contrary, if source is ahead of destination we need to use backward
153
+ // indexes to avoid reading elements that've been overwritten.
154
+ const indexes = Array.from(Array(numEntries).keys());
155
+ if (srcSlot.lt(dstSlot)) {
156
+ indexes.reverse();
157
+ }
158
+ for (const i of indexes){
159
+ const currentSrcSlot = dbSlotToKey(contractAddress, srcSlot.add(new Fr(i)));
160
+ const currentDstSlot = dbSlotToKey(contractAddress, dstSlot.add(new Fr(i)));
161
+ const toCopy = await this.#getFromStage(jobId, currentSrcSlot);
162
+ if (!toCopy) {
163
+ throw new Error(`Attempted to copy empty slot ${currentSrcSlot} for contract ${contractAddress.toString()}`);
164
+ }
165
+ this.#setOnStage(jobId, currentDstSlot, toCopy);
166
+ }
167
+ });
168
+ }
169
+ /**
170
+ * Appends multiple capsules to a capsule array stored at the base slot.
171
+ * The array length is stored at the base slot, and elements are stored in consecutive slots after it.
172
+ * All operations are performed in a single transaction.
173
+ * @param contractAddress - The contract address that owns the capsule array
174
+ * @param baseSlot - The slot where the array length is stored
175
+ * @param content - Array of capsule data to append
176
+ */ appendToCapsuleArray(contractAddress, baseSlot, content, jobId) {
177
+ // We wrap this in a transaction to serialize concurrent calls from Promise.all.
178
+ // Without this, concurrent appends to the same array could race: both read length=0,
179
+ // both write at the same slots, one overwrites the other.
180
+ // Equally important: this in practice is expected to perform thousands of DB operations
181
+ // and not using a transaction here would heavily impact performance.
182
+ return this.#store.transactionAsync(async ()=>{
183
+ // Load current length, defaulting to 0 if not found
184
+ const lengthData = await this.loadCapsule(contractAddress, baseSlot, jobId);
185
+ const currentLength = lengthData ? lengthData[0].toNumber() : 0;
186
+ // Store each capsule at consecutive slots after baseSlot + 1 + currentLength
187
+ for(let i = 0; i < content.length; i++){
188
+ const nextSlot = arraySlot(baseSlot, currentLength + i);
189
+ this.storeCapsule(contractAddress, nextSlot, content[i], jobId);
190
+ }
191
+ // Update length to include all new capsules
192
+ const newLength = currentLength + content.length;
193
+ this.storeCapsule(contractAddress, baseSlot, [
194
+ new Fr(newLength)
195
+ ], jobId);
196
+ });
197
+ }
198
+ readCapsuleArray(contractAddress, baseSlot, jobId) {
199
+ // I'm leaving this transactional context here though because I'm assuming this
200
+ // gives us "read array atomicity": there shouldn't be concurrent writes to what's being copied
201
+ // here.
202
+ // This is one point we should revisit in the future if we want to relax the concurrency
203
+ // of jobs: different calls running concurrently on the same contract may cause trouble.
204
+ return this.#store.transactionAsync(async ()=>{
205
+ // Load length, defaulting to 0 if not found
206
+ const maybeLength = await this.loadCapsule(contractAddress, baseSlot, jobId);
207
+ const length = maybeLength ? maybeLength[0].toBigInt() : 0n;
208
+ const values = [];
209
+ // Read each capsule at consecutive slots after baseSlot
210
+ for(let i = 0; i < length; i++){
211
+ const currentValue = await this.loadCapsule(contractAddress, arraySlot(baseSlot, i), jobId);
212
+ if (currentValue == undefined) {
213
+ throw new Error(`Expected non-empty value at capsule array in base slot ${baseSlot} at index ${i} for contract ${contractAddress}`);
214
+ }
215
+ values.push(currentValue);
216
+ }
217
+ return values;
218
+ });
219
+ }
220
+ setCapsuleArray(contractAddress, baseSlot, content, jobId) {
221
+ // This transactional context in theory isn't so critical now because we aren't
222
+ // writing to DB so if there's exceptions midway and it blows up, no visible impact
223
+ // to persistent storage will happen.
224
+ // I'm leaving this transactional context here though because I'm assuming this
225
+ // gives us "write array atomicity": there shouldn't be concurrent writes to what's being copied
226
+ // here.
227
+ // This is one point we should revisit in the future if we want to relax the concurrency
228
+ // of jobs: different calls running concurrently on the same contract may cause trouble.
229
+ return this.#store.transactionAsync(async ()=>{
230
+ // Load current length, defaulting to 0 if not found
231
+ const maybeLength = await this.loadCapsule(contractAddress, baseSlot, jobId);
232
+ const originalLength = maybeLength ? maybeLength[0].toNumber() : 0;
233
+ // Set the new length
234
+ this.storeCapsule(contractAddress, baseSlot, [
235
+ new Fr(content.length)
236
+ ], jobId);
237
+ // Store the new content, possibly overwriting existing values
238
+ for(let i = 0; i < content.length; i++){
239
+ this.storeCapsule(contractAddress, arraySlot(baseSlot, i), content[i], jobId);
240
+ }
241
+ // Clear any stragglers
242
+ for(let i = content.length; i < originalLength; i++){
243
+ this.deleteCapsule(contractAddress, arraySlot(baseSlot, i), jobId);
244
+ }
245
+ });
246
+ }
247
+ }
248
+ function dbSlotToKey(contractAddress, slot) {
249
+ return `${contractAddress.toString()}:${slot.toString()}`;
250
+ }
251
+ function arraySlot(baseSlot, index) {
252
+ return baseSlot.add(new Fr(1)).add(new Fr(index));
253
+ }
@@ -0,0 +1,2 @@
1
+ export { CapsuleStore } from './capsule_store.js';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdG9yYWdlL2NhcHN1bGVfc3RvcmUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG9CQUFvQixDQUFDIn0=
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/capsule_store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ export { CapsuleStore } from './capsule_store.js';
@@ -1,18 +1,18 @@
1
1
  import type { FUNCTION_TREE_HEIGHT } from '@aztec/constants';
2
- import type { Fr } from '@aztec/foundation/fields';
2
+ import type { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import type { MembershipWitness } from '@aztec/foundation/trees';
4
4
  import type { AztecAsyncKVStore } from '@aztec/kv-store';
5
- import { type ContractArtifact, type FunctionAbi, type FunctionArtifactWithContractName, type FunctionDebugMetadata, FunctionSelector } from '@aztec/stdlib/abi';
5
+ import { type ContractArtifact, type FunctionAbi, type FunctionArtifactWithContractName, FunctionCall, type FunctionDebugMetadata, FunctionSelector } from '@aztec/stdlib/abi';
6
6
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
7
7
  import { type ContractClass, type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
8
8
  /**
9
- * ContractDataProvider serves as a data manager and retriever for Aztec.nr contracts.
9
+ * ContractStore serves as a data manager and retriever for Aztec.nr contracts.
10
10
  * It provides methods to obtain contract addresses, function ABI, bytecode, and membership witnesses
11
11
  * from a given contract address and function selector. The class maintains a cache of ContractTree instances
12
12
  * to efficiently serve the requested data. It interacts with the ContractDatabase and AztecNode to fetch
13
13
  * the required information and facilitate cryptographic proof generation.
14
14
  */
15
- export declare class ContractDataProvider {
15
+ export declare class ContractStore {
16
16
  #private;
17
17
  constructor(store: AztecAsyncKVStore);
18
18
  addContractArtifact(id: Fr, contract: ContractArtifact): Promise<void>;
@@ -34,6 +34,7 @@ export declare class ContractDataProvider {
34
34
  * @returns The corresponding function's artifact as an object.
35
35
  */
36
36
  getFunctionArtifact(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionArtifactWithContractName | undefined>;
37
+ getFunctionArtifactWithDebugMetadata(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionArtifactWithContractName>;
37
38
  getPublicFunctionArtifact(contractAddress: AztecAddress): Promise<FunctionArtifactWithContractName | undefined>;
38
39
  getFunctionAbi(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionAbi | undefined>;
39
40
  /**
@@ -60,5 +61,6 @@ export declare class ContractDataProvider {
60
61
  getFunctionMembershipWitness(contractClassId: Fr, selector: FunctionSelector): Promise<MembershipWitness<typeof FUNCTION_TREE_HEIGHT> | undefined>;
61
62
  getDebugContractName(contractAddress: AztecAddress): Promise<string | undefined>;
62
63
  getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
64
+ getFunctionCall(functionName: string, args: any[], to: AztecAddress): Promise<FunctionCall>;
63
65
  }
64
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RfZGF0YV9wcm92aWRlci5k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