@aztec/pxe 3.0.0-canary.a9708bd → 3.0.0-devnet.2-patch.1

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 (264) hide show
  1. package/README.md +5 -5
  2. package/dest/bin/check_oracle_version.d.ts +1 -1
  3. package/dest/bin/check_oracle_version.js +110 -10
  4. package/dest/config/index.d.ts +9 -17
  5. package/dest/config/index.d.ts.map +1 -1
  6. package/dest/config/index.js +10 -16
  7. package/dest/config/package_info.d.ts +1 -1
  8. package/dest/config/package_info.js +1 -1
  9. package/dest/contract_function_simulator/contract_function_simulator.d.ts +6 -6
  10. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  11. package/dest/contract_function_simulator/contract_function_simulator.js +97 -42
  12. package/dest/contract_function_simulator/execution_data_provider.d.ts +40 -57
  13. package/dest/contract_function_simulator/execution_data_provider.d.ts.map +1 -1
  14. package/dest/contract_function_simulator/execution_note_cache.d.ts +11 -9
  15. package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
  16. package/dest/contract_function_simulator/execution_note_cache.js +28 -17
  17. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +16 -0
  18. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -0
  19. package/dest/contract_function_simulator/execution_tagging_index_cache.js +26 -0
  20. package/dest/contract_function_simulator/hashed_values_cache.d.ts +2 -2
  21. package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -1
  22. package/dest/contract_function_simulator/index.d.ts +4 -2
  23. package/dest/contract_function_simulator/index.d.ts.map +1 -1
  24. package/dest/contract_function_simulator/index.js +2 -1
  25. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +2 -2
  26. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
  27. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +2 -2
  28. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -1
  29. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +3 -3
  30. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -1
  31. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +8 -4
  32. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +6 -3
  33. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
  34. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +12 -3
  35. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +22 -0
  36. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -0
  37. package/dest/contract_function_simulator/noir-structs/utility_context.js +33 -0
  38. package/dest/contract_function_simulator/oracle/index.d.ts +2 -2
  39. package/dest/contract_function_simulator/oracle/index.d.ts.map +1 -1
  40. package/dest/contract_function_simulator/oracle/index.js +1 -1
  41. package/dest/contract_function_simulator/oracle/interfaces.d.ts +104 -0
  42. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -0
  43. package/dest/contract_function_simulator/oracle/interfaces.js +4 -0
  44. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +2 -4
  45. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
  46. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +1 -1
  47. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +10 -4
  48. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
  49. package/dest/contract_function_simulator/oracle/note_packing_utils.js +10 -5
  50. package/dest/contract_function_simulator/oracle/oracle.d.ts +17 -15
  51. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
  52. package/dest/contract_function_simulator/oracle/oracle.js +101 -81
  53. package/dest/contract_function_simulator/oracle/private_execution.d.ts +6 -5
  54. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
  55. package/dest/contract_function_simulator/oracle/private_execution.js +7 -16
  56. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +34 -22
  57. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  58. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +89 -25
  59. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +23 -33
  60. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  61. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +38 -42
  62. package/dest/contract_function_simulator/pick_notes.d.ts +2 -2
  63. package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
  64. package/dest/contract_function_simulator/pick_notes.js +1 -1
  65. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +1 -1
  66. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
  67. package/dest/contract_function_simulator/proxied_node.d.ts +1 -1
  68. package/dest/contract_function_simulator/proxied_node.d.ts.map +1 -1
  69. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +34 -68
  70. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +1 -1
  71. package/dest/contract_function_simulator/pxe_oracle_interface.js +220 -208
  72. package/dest/entrypoints/client/bundle/index.d.ts +4 -2
  73. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  74. package/dest/entrypoints/client/bundle/index.js +2 -1
  75. package/dest/entrypoints/client/bundle/utils.d.ts +9 -9
  76. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
  77. package/dest/entrypoints/client/bundle/utils.js +21 -12
  78. package/dest/entrypoints/client/lazy/index.d.ts +4 -2
  79. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  80. package/dest/entrypoints/client/lazy/index.js +2 -1
  81. package/dest/entrypoints/client/lazy/utils.d.ts +8 -8
  82. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
  83. package/dest/entrypoints/client/lazy/utils.js +20 -11
  84. package/dest/entrypoints/pxe_creation_options.d.ts +5 -2
  85. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
  86. package/dest/entrypoints/server/index.d.ts +4 -2
  87. package/dest/entrypoints/server/index.d.ts.map +1 -1
  88. package/dest/entrypoints/server/index.js +2 -1
  89. package/dest/entrypoints/server/utils.d.ts +5 -24
  90. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  91. package/dest/entrypoints/server/utils.js +17 -45
  92. package/dest/error_enriching.d.ts +11 -0
  93. package/dest/error_enriching.d.ts.map +1 -0
  94. package/dest/{pxe_service/error_enriching.js → error_enriching.js} +3 -0
  95. package/dest/events/index.d.ts +2 -0
  96. package/dest/events/index.d.ts.map +1 -0
  97. package/dest/events/index.js +1 -0
  98. package/dest/events/private_event_filter_validator.d.ts +8 -0
  99. package/dest/events/private_event_filter_validator.d.ts.map +1 -0
  100. package/dest/events/private_event_filter_validator.js +39 -0
  101. package/dest/oracle_version.d.ts +3 -3
  102. package/dest/oracle_version.js +2 -2
  103. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +3 -3
  104. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -1
  105. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.js +7 -7
  106. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +1 -1
  107. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.js +6 -6
  108. package/dest/private_kernel/hints/index.d.ts +1 -1
  109. package/dest/private_kernel/index.d.ts +1 -1
  110. package/dest/private_kernel/private_kernel_execution_prover.d.ts +9 -2
  111. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  112. package/dest/private_kernel/private_kernel_execution_prover.js +38 -32
  113. package/dest/private_kernel/private_kernel_oracle.d.ts +3 -2
  114. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
  115. package/dest/private_kernel/private_kernel_oracle_impl.d.ts +8 -7
  116. package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +1 -1
  117. package/dest/pxe.d.ts +240 -0
  118. package/dest/pxe.d.ts.map +1 -0
  119. package/dest/{pxe_service/pxe_service.js → pxe.js} +227 -241
  120. package/dest/storage/address_data_provider/address_data_provider.d.ts +2 -4
  121. package/dest/storage/address_data_provider/address_data_provider.d.ts.map +1 -1
  122. package/dest/storage/address_data_provider/address_data_provider.js +0 -3
  123. package/dest/storage/address_data_provider/index.d.ts +1 -1
  124. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +3 -5
  125. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +1 -1
  126. package/dest/storage/capsule_data_provider/capsule_data_provider.js +1 -5
  127. package/dest/storage/capsule_data_provider/index.d.ts +1 -1
  128. package/dest/storage/contract_data_provider/contract_data_provider.d.ts +6 -17
  129. package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +1 -1
  130. package/dest/storage/contract_data_provider/contract_data_provider.js +0 -15
  131. package/dest/storage/contract_data_provider/index.d.ts +1 -1
  132. package/dest/storage/contract_data_provider/private_functions_tree.d.ts +1 -1
  133. package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +1 -1
  134. package/dest/storage/contract_data_provider/private_functions_tree.js +1 -1
  135. package/dest/storage/index.d.ts +1 -2
  136. package/dest/storage/index.d.ts.map +1 -1
  137. package/dest/storage/index.js +0 -1
  138. package/dest/storage/metadata.d.ts +1 -1
  139. package/dest/storage/note_data_provider/index.d.ts +2 -2
  140. package/dest/storage/note_data_provider/index.d.ts.map +1 -1
  141. package/dest/storage/note_data_provider/index.js +1 -1
  142. package/dest/storage/note_data_provider/note_data_provider.d.ts +75 -11
  143. package/dest/storage/note_data_provider/note_data_provider.d.ts.map +1 -1
  144. package/dest/storage/note_data_provider/note_data_provider.js +143 -81
  145. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +31 -17
  146. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +1 -1
  147. package/dest/storage/private_event_data_provider/private_event_data_provider.js +47 -28
  148. package/dest/storage/sync_data_provider/index.d.ts +1 -1
  149. package/dest/storage/sync_data_provider/sync_data_provider.d.ts +4 -5
  150. package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +1 -1
  151. package/dest/storage/sync_data_provider/sync_data_provider.js +0 -3
  152. package/dest/storage/tagging_data_provider/index.d.ts +1 -1
  153. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +29 -7
  154. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +1 -1
  155. package/dest/storage/tagging_data_provider/tagging_data_provider.js +46 -39
  156. package/dest/synchronizer/index.d.ts +1 -1
  157. package/dest/synchronizer/synchronizer.d.ts +3 -2
  158. package/dest/synchronizer/synchronizer.d.ts.map +1 -1
  159. package/dest/synchronizer/synchronizer.js +4 -4
  160. package/dest/tagging/constants.d.ts +2 -0
  161. package/dest/tagging/constants.d.ts.map +1 -0
  162. package/dest/tagging/constants.js +2 -0
  163. package/dest/tagging/index.d.ts +7 -0
  164. package/dest/tagging/index.d.ts.map +1 -0
  165. package/dest/tagging/index.js +5 -0
  166. package/dest/tagging/siloed_tag.d.ts +14 -0
  167. package/dest/tagging/siloed_tag.d.ts.map +1 -0
  168. package/dest/tagging/siloed_tag.js +20 -0
  169. package/dest/tagging/tag.d.ts +12 -0
  170. package/dest/tagging/tag.d.ts.map +1 -0
  171. package/dest/tagging/tag.js +17 -0
  172. package/dest/tagging/utils.d.ts +18 -0
  173. package/dest/tagging/utils.d.ts.map +1 -0
  174. package/dest/tagging/utils.js +24 -0
  175. package/package.json +22 -24
  176. package/src/bin/check_oracle_version.ts +134 -10
  177. package/src/config/index.ts +18 -32
  178. package/src/config/package_info.ts +1 -1
  179. package/src/contract_function_simulator/contract_function_simulator.ts +151 -62
  180. package/src/contract_function_simulator/execution_data_provider.ts +47 -65
  181. package/src/contract_function_simulator/execution_note_cache.ts +33 -17
  182. package/src/contract_function_simulator/execution_tagging_index_cache.ts +32 -0
  183. package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
  184. package/src/contract_function_simulator/index.ts +3 -1
  185. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -1
  186. package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +1 -1
  187. package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +10 -5
  188. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +14 -2
  189. package/src/contract_function_simulator/noir-structs/utility_context.ts +42 -0
  190. package/src/contract_function_simulator/oracle/index.ts +1 -1
  191. package/src/contract_function_simulator/oracle/interfaces.ts +176 -0
  192. package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
  193. package/src/contract_function_simulator/oracle/note_packing_utils.ts +21 -5
  194. package/src/contract_function_simulator/oracle/oracle.ts +135 -80
  195. package/src/contract_function_simulator/oracle/private_execution.ts +10 -17
  196. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +123 -49
  197. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +68 -80
  198. package/src/contract_function_simulator/pick_notes.ts +1 -1
  199. package/src/contract_function_simulator/pxe_oracle_interface.ts +291 -271
  200. package/src/entrypoints/client/bundle/index.ts +3 -1
  201. package/src/entrypoints/client/bundle/utils.ts +21 -23
  202. package/src/entrypoints/client/lazy/index.ts +3 -1
  203. package/src/entrypoints/client/lazy/utils.ts +20 -23
  204. package/src/entrypoints/pxe_creation_options.ts +4 -1
  205. package/src/entrypoints/server/index.ts +3 -1
  206. package/src/entrypoints/server/utils.ts +20 -68
  207. package/src/{pxe_service/error_enriching.ts → error_enriching.ts} +5 -1
  208. package/src/events/index.ts +1 -0
  209. package/src/events/private_event_filter_validator.ts +47 -0
  210. package/src/oracle_version.ts +2 -2
  211. package/src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts +5 -9
  212. package/src/private_kernel/hints/compute_tx_include_by_timestamp.ts +6 -6
  213. package/src/private_kernel/private_kernel_execution_prover.ts +51 -43
  214. package/src/private_kernel/private_kernel_oracle.ts +2 -1
  215. package/src/private_kernel/private_kernel_oracle_impl.ts +4 -3
  216. package/src/{pxe_service/pxe_service.ts → pxe.ts} +256 -308
  217. package/src/storage/address_data_provider/address_data_provider.ts +1 -7
  218. package/src/storage/capsule_data_provider/capsule_data_provider.ts +2 -12
  219. package/src/storage/contract_data_provider/contract_data_provider.ts +4 -27
  220. package/src/storage/contract_data_provider/private_functions_tree.ts +1 -1
  221. package/src/storage/index.ts +0 -1
  222. package/src/storage/note_data_provider/index.ts +1 -1
  223. package/src/storage/note_data_provider/note_data_provider.ts +171 -109
  224. package/src/storage/private_event_data_provider/private_event_data_provider.ts +69 -41
  225. package/src/storage/sync_data_provider/sync_data_provider.ts +3 -8
  226. package/src/storage/tagging_data_provider/tagging_data_provider.ts +52 -55
  227. package/src/synchronizer/synchronizer.ts +4 -4
  228. package/src/tagging/constants.ts +2 -0
  229. package/src/tagging/index.ts +6 -0
  230. package/src/tagging/siloed_tag.ts +22 -0
  231. package/src/tagging/tag.ts +16 -0
  232. package/src/tagging/utils.ts +31 -0
  233. package/dest/bin/index.d.ts +0 -3
  234. package/dest/bin/index.d.ts.map +0 -1
  235. package/dest/bin/index.js +0 -48
  236. package/dest/contract_function_simulator/oracle/typed_oracle.d.ts +0 -87
  237. package/dest/contract_function_simulator/oracle/typed_oracle.d.ts.map +0 -1
  238. package/dest/contract_function_simulator/oracle/typed_oracle.js +0 -146
  239. package/dest/contract_function_simulator/tagging_utils.d.ts +0 -17
  240. package/dest/contract_function_simulator/tagging_utils.d.ts.map +0 -1
  241. package/dest/contract_function_simulator/tagging_utils.js +0 -23
  242. package/dest/pxe_service/error_enriching.d.ts +0 -11
  243. package/dest/pxe_service/error_enriching.d.ts.map +0 -1
  244. package/dest/pxe_service/index.d.ts +0 -3
  245. package/dest/pxe_service/index.d.ts.map +0 -1
  246. package/dest/pxe_service/index.js +0 -2
  247. package/dest/pxe_service/pxe_service.d.ts +0 -100
  248. package/dest/pxe_service/pxe_service.d.ts.map +0 -1
  249. package/dest/storage/data_provider.d.ts +0 -4
  250. package/dest/storage/data_provider.d.ts.map +0 -1
  251. package/dest/storage/data_provider.js +0 -1
  252. package/dest/storage/note_data_provider/note_dao.d.ts +0 -100
  253. package/dest/storage/note_data_provider/note_dao.d.ts.map +0 -1
  254. package/dest/storage/note_data_provider/note_dao.js +0 -102
  255. package/dest/test/pxe_test_suite.d.ts +0 -3
  256. package/dest/test/pxe_test_suite.d.ts.map +0 -1
  257. package/dest/test/pxe_test_suite.js +0 -97
  258. package/src/bin/index.ts +0 -62
  259. package/src/contract_function_simulator/oracle/typed_oracle.ts +0 -289
  260. package/src/contract_function_simulator/tagging_utils.ts +0 -32
  261. package/src/pxe_service/index.ts +0 -2
  262. package/src/storage/data_provider.ts +0 -3
  263. package/src/storage/note_data_provider/note_dao.ts +0 -154
  264. package/src/test/pxe_test_suite.ts +0 -113
@@ -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,OAAO,EACP,uBAAuB,EACvB,WAAW,EACX,0BAA0B,EAC1B,KAAK,SAAS,EACf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,E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EACf,UAAU,EAAE,YAAY,EACxB,SAAS,EAAE,EAAE,EAAE,EACf,QAAQ,EAAE,EAAE,EACZ,OAAO,EAAE,MAAM;IAwBjB;;;;;OAKG;IACmB,0BAA0B,CAAC,cAAc,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM;IAWlG;;;;;OAKG;IACa,6BAA6B,CAAC,cAAc,EAAE,EAAE;IAIhE;;;;;;OAMG;IACa,oCAAoC,CAAC,GAAG,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM;IAoB3F;;;;;;;;OAQG;IACY,0BAA0B,CACvC,qBAAqB,EAAE,YAAY,EACnC,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,EAAE,EACZ,iBAAiB,EAAE,MAAM,EACzB,YAAY,EAAE,OAAO;;;;IA+EvB;;;;;;OAMG;IACa,uCAAuC,CACrD,sBAAsB,EAAE,YAAY,EACpC,YAAY,EAAE,EAAE,EAChB,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,OAAO;IAMxB;;;;;;OAMG;IACa,0CAA0C,CACxD,sBAAsB,EAAE,YAAY,EACpC,YAAY,EAAE,EAAE,EAChB,kBAAkB,EAAE,MAAM,EAC1B,aAAa,EAAE,OAAO;IAMR,8CAA8C,CAC5D,8BAA8B,EAAE,MAAM,GACrC,OAAO,CAAC,IAAI,CAAC;IAIhB;;;;;;OAMG;YACW,iBAAiB;IAaxB,oBAAoB;IAIL,6CAA6C,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY;IAI3F,sBAAsB,CAAC,6BAA6B,EAAE,EAAE;IAM9D,yBAAyB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,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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ATA_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 { computeUniqueNoteHash, siloNoteHash, siloNullifier } from '@aztec/stdlib/hash';
8
8
  import { PrivateContextInputs } from '@aztec/stdlib/kernel';
9
9
  import { Note } from '@aztec/stdlib/note';
10
10
  import { CallContext, CountedContractClassLog, NoteAndSlot } from '@aztec/stdlib/tx';
11
+ import { Tag } from '../../tagging/tag.js';
11
12
  import { pickNotes } from '../pick_notes.js';
12
13
  import { executePrivateFunction, verifyCurrentClassId } from './private_execution.js';
13
14
  import { UtilityExecutionOracle } from './utility_execution_oracle.js';
@@ -17,12 +18,15 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
17
18
  argsHash;
18
19
  txContext;
19
20
  callContext;
20
- historicalHeader;
21
+ anchorBlockHeader;
21
22
  executionCache;
22
23
  noteCache;
23
- simulator;
24
+ taggingIndexCache;
24
25
  totalPublicCalldataCount;
25
26
  sideEffectCounter;
27
+ senderForTags;
28
+ simulator;
29
+ isPrivate;
26
30
  /**
27
31
  * New notes created during this execution.
28
32
  * It's possible that a note in this list has been nullified (in the same or other executions) and doesn't exist in
@@ -44,10 +48,11 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
44
48
  contractClassLogs;
45
49
  offchainEffects;
46
50
  nestedExecutionResults;
47
- 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;
51
+ constructor(argsHash, txContext, callContext, /** Header of a block whose state is used during private execution (not the block the transaction is included in). */ anchorBlockHeader, /** List of transient auth witnesses to be used during this simulation */ authWitnesses, capsules, executionCache, noteCache, taggingIndexCache, executionDataProvider, totalPublicCalldataCount = 0, sideEffectCounter = 0, log = createLogger('simulator:client_execution_context'), scopes, senderForTags, simulator){
52
+ super(callContext.contractAddress, authWitnesses, capsules, executionDataProvider, log, scopes), this.argsHash = argsHash, this.txContext = txContext, this.callContext = callContext, this.anchorBlockHeader = anchorBlockHeader, this.executionCache = executionCache, this.noteCache = noteCache, this.taggingIndexCache = taggingIndexCache, this.totalPublicCalldataCount = totalPublicCalldataCount, this.sideEffectCounter = sideEffectCounter, this.senderForTags = senderForTags, this.simulator = simulator, this.isPrivate = true, this.newNotes = [], this.noteHashLeafIndexMap = new Map(), this.noteHashNullifierCounterMap = new Map(), this.contractClassLogs = [], this.offchainEffects = [], this.nestedExecutionResults = [];
53
+ }
54
+ getPrivateContextInputs() {
55
+ return new PrivateContextInputs(this.callContext, this.anchorBlockHeader, this.txContext, this.sideEffectCounter);
51
56
  }
52
57
  // We still need this function until we can get user-defined ordering of structs for fn arguments
53
58
  // TODO When that is sorted out on noir side, we can use instead the utilities in serialize.ts
@@ -61,8 +66,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
61
66
  if (args?.length !== argumentsSize) {
62
67
  throw new Error(`Invalid arguments size: expected ${argumentsSize}, got ${args?.length}`);
63
68
  }
64
- const privateContextInputs = new PrivateContextInputs(this.callContext, this.historicalHeader, this.txContext, this.sideEffectCounter);
65
- const privateContextInputsAsFields = privateContextInputs.toFields();
69
+ const privateContextInputsAsFields = this.getPrivateContextInputs().toFields();
66
70
  if (privateContextInputsAsFields.length !== PRIVATE_CONTEXT_INPUTS_LENGTH) {
67
71
  throw new Error('Invalid private context inputs size');
68
72
  }
@@ -97,6 +101,11 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
97
101
  return this.offchainEffects;
98
102
  }
99
103
  /**
104
+ * Returns the pre tags that were used in this execution (and that need to be stored in the db).
105
+ */ getUsedPreTags() {
106
+ return this.taggingIndexCache.getUsedPreTags();
107
+ }
108
+ /**
100
109
  * Return the nested execution results during this execution.
101
110
  */ getNestedExecutionResults() {
102
111
  return this.nestedExecutionResults;
@@ -128,6 +137,37 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
128
137
  return Promise.resolve();
129
138
  }
130
139
  /**
140
+ * Returns the next app tag for a given sender and recipient pair.
141
+ * @param sender - The address sending the log
142
+ * @param recipient - The address receiving the log
143
+ * @returns An app tag to be used in a log.
144
+ */ async privateGetNextAppTagAsSender(sender, recipient) {
145
+ const secret = await this.executionDataProvider.calculateDirectionalAppTaggingSecret(this.contractAddress, sender, recipient);
146
+ const index = await this.#getIndexToUseForSecret(secret);
147
+ this.log.debug(`Incrementing tagging index for sender: ${sender}, recipient: ${recipient}, contract: ${this.contractAddress} to ${index}`);
148
+ this.taggingIndexCache.setLastUsedIndex(secret, index);
149
+ return Tag.compute({
150
+ secret,
151
+ index
152
+ });
153
+ }
154
+ async #getIndexToUseForSecret(secret) {
155
+ // If we have the tagging index in the cache, we use it. If not we obtain it from the execution data provider.
156
+ const lastUsedIndexInTx = this.taggingIndexCache.getLastUsedIndex(secret);
157
+ if (lastUsedIndexInTx !== undefined) {
158
+ return lastUsedIndexInTx + 1;
159
+ } else {
160
+ // This is a tagging secret we've not yet used in this tx, so first sync our store to make sure its indices
161
+ // are up to date. We do this here because this store is not synced as part of the global sync because
162
+ // that'd be wasteful as most tagging secrets are not used in each tx.
163
+ await this.executionDataProvider.syncTaggedLogsAsSender(secret, this.contractAddress);
164
+ const lastUsedIndex = await this.executionDataProvider.getLastUsedIndexAsSender(secret);
165
+ // If lastUsedIndex is undefined, we've never used this secret, so start from 0
166
+ // Otherwise, the next index to use is one past the last used index
167
+ return lastUsedIndex === undefined ? 0 : lastUsedIndex + 1;
168
+ }
169
+ }
170
+ /**
131
171
  * Store values in the execution cache.
132
172
  * @param values - Values to store.
133
173
  * @returns The hash of the values.
@@ -145,6 +185,16 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
145
185
  }
146
186
  return Promise.resolve(preimage);
147
187
  }
188
+ async utilityCheckNullifierExists(innerNullifier) {
189
+ // This oracle must be overridden because while utility execution can only meaningfully check if a nullifier exists
190
+ // in the synched block, during private execution there's also the possibility of it being pending, i.e. created
191
+ // in the current transaction.
192
+ this.log.debug(`Checking existence of inner nullifier ${innerNullifier}`, {
193
+ contractAddress: this.contractAddress
194
+ });
195
+ const nullifier = (await siloNullifier(this.contractAddress, innerNullifier)).toBigInt();
196
+ return this.noteCache.getNullifiers(this.contractAddress).has(nullifier) || await super.utilityCheckNullifierExists(innerNullifier);
197
+ }
148
198
  /**
149
199
  * Gets some notes for a storage slot.
150
200
  *
@@ -153,6 +203,7 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
153
203
  * Real notes coming from DB will have a leafIndex which
154
204
  * represents their index in the note hash tree.
155
205
  *
206
+ * @param owner - The owner of the notes. If undefined, returns notes for all owners.
156
207
  * @param storageSlot - The storage slot.
157
208
  * @param numSelects - The number of valid selects in selectBy and selectValues.
158
209
  * @param selectBy - An array of indices of the fields to selects.
@@ -164,11 +215,11 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
164
215
  * @param offset - The starting index for pagination.
165
216
  * @param status - The status of notes to fetch.
166
217
  * @returns Array of note data.
167
- */ async utilityGetNotes(storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
218
+ */ async utilityGetNotes(owner, storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
168
219
  // Nullified pending notes are already removed from the list.
169
- const pendingNotes = this.noteCache.getNotes(this.callContext.contractAddress, storageSlot);
220
+ const pendingNotes = this.noteCache.getNotes(this.callContext.contractAddress, owner, storageSlot);
170
221
  const pendingNullifiers = this.noteCache.getNullifiers(this.callContext.contractAddress);
171
- const dbNotes = await this.executionDataProvider.getNotes(this.callContext.contractAddress, storageSlot, status, this.scopes);
222
+ const dbNotes = await this.executionDataProvider.getNotes(this.callContext.contractAddress, owner, storageSlot, status, this.scopes);
172
223
  const dbNotesFiltered = dbNotes.filter((n)=>!pendingNullifiers.has(n.siloedNullifier.value));
173
224
  const notes = pickNotes([
174
225
  ...dbNotesFiltered,
@@ -213,29 +264,38 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
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
291
  noteHash
237
292
  }, counter);
238
- this.newNotes.push(new NoteAndSlot(note, storageSlot, noteTypeId));
293
+ this.newNotes.push(NoteAndSlot.from({
294
+ note,
295
+ storageSlot,
296
+ randomness,
297
+ noteTypeId
298
+ }));
239
299
  }
240
300
  /**
241
301
  * Adding a siloed nullifier into the current set of all pending nullifiers created
@@ -254,6 +314,9 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
254
314
  * @param innerNullifier - The pending nullifier to add in the list (not yet siloed by contract address).
255
315
  * @param noteHash - A hash of the new note.
256
316
  */ privateNotifyCreatedNullifier(innerNullifier) {
317
+ this.log.debug(`Notified of new inner nullifier ${innerNullifier}`, {
318
+ contractAddress: this.contractAddress
319
+ });
257
320
  return this.noteCache.nullifierCreated(this.callContext.contractAddress, innerNullifier);
258
321
  }
259
322
  /**
@@ -281,14 +344,19 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
281
344
  * @param isStaticCall - Whether the call is a static call.
282
345
  * @returns The execution result.
283
346
  */ async privateCallPrivateFunction(targetContractAddress, functionSelector, argsHash, sideEffectCounter, isStaticCall) {
347
+ if (!this.simulator) {
348
+ // In practice it is only when creating inline private contexts in a Noir test using TXE that we create an
349
+ // instance of this class without a simulator.
350
+ throw new Error('No simulator provided, cannot perform a nested private call');
351
+ }
284
352
  const simulatorSetupTimer = new Timer();
285
353
  this.log.debug(`Calling private function ${targetContractAddress}:${functionSelector} from ${this.callContext.contractAddress}`);
286
354
  isStaticCall = isStaticCall || this.callContext.isStaticCall;
287
- await verifyCurrentClassId(targetContractAddress, this.executionDataProvider, this.historicalHeader);
355
+ await verifyCurrentClassId(targetContractAddress, this.executionDataProvider, this.anchorBlockHeader);
288
356
  const targetArtifact = await this.executionDataProvider.getFunctionArtifact(targetContractAddress, functionSelector);
289
357
  const derivedTxContext = this.txContext.clone();
290
358
  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);
359
+ const privateExecutionOracle = new PrivateExecutionOracle(argsHash, derivedTxContext, derivedCallContext, this.anchorBlockHeader, this.authWitnesses, this.capsules, this.executionCache, this.noteCache, this.taggingIndexCache, this.executionDataProvider, this.totalPublicCalldataCount, sideEffectCounter, this.log, this.scopes, this.senderForTags, this.simulator);
292
360
  const setupTime = simulatorSetupTimer.ms();
293
361
  const childExecutionResult = await executePrivateFunction(this.simulator, privateExecutionOracle, targetArtifact, targetContractAddress, functionSelector);
294
362
  if (isStaticCall) {
@@ -338,6 +406,9 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
338
406
  privateNotifySetMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter) {
339
407
  return this.noteCache.setMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter);
340
408
  }
409
+ privateIsSideEffectCounterRevertible(sideEffectCounter) {
410
+ return Promise.resolve(this.noteCache.isSideEffectCounterRevertible(sideEffectCounter));
411
+ }
341
412
  /**
342
413
  * Derives the call context for a nested execution.
343
414
  * @param targetContractAddress - The address of the contract being called.
@@ -350,13 +421,6 @@ import { UtilityExecutionOracle } from './utility_execution_oracle.js';
350
421
  getDebugFunctionName() {
351
422
  return this.executionDataProvider.getDebugFunctionName(this.contractAddress, this.callContext.functionSelector);
352
423
  }
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);
359
- }
360
424
  utilityEmitOffchainEffect(data) {
361
425
  this.offchainEffects.push({
362
426
  data
@@ -1,19 +1,20 @@
1
- import { Fr, Point } from '@aztec/foundation/fields';
1
+ import type { BlockNumber } from '@aztec/foundation/branded-types';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
+ import { Point } from '@aztec/foundation/curves/grumpkin';
2
4
  import type { AuthWitness } from '@aztec/stdlib/auth-witness';
3
5
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
6
  import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
5
7
  import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
6
- import { IndexedTaggingSecret } from '@aztec/stdlib/logs';
7
8
  import type { NoteStatus } from '@aztec/stdlib/note';
8
9
  import { type MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
9
10
  import type { BlockHeader, Capsule } from '@aztec/stdlib/tx';
10
- import type { UInt64 } from '@aztec/stdlib/types';
11
11
  import type { ExecutionDataProvider } from '../execution_data_provider.js';
12
- import { type NoteData, TypedOracle } from './typed_oracle.js';
12
+ import { UtilityContext } from '../noir-structs/utility_context.js';
13
+ import type { IMiscOracle, IUtilityExecutionOracle, NoteData } from './interfaces.js';
13
14
  /**
14
15
  * The oracle for an execution of utility contract functions.
15
16
  */
16
- export declare class UtilityExecutionOracle extends TypedOracle {
17
+ export declare class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOracle {
17
18
  protected readonly contractAddress: AztecAddress;
18
19
  /** List of transient auth witnesses to be used during this simulation */
19
20
  protected readonly authWitnesses: AuthWitness[];
@@ -21,17 +22,15 @@ export declare class UtilityExecutionOracle extends TypedOracle {
21
22
  protected readonly executionDataProvider: ExecutionDataProvider;
22
23
  protected log: import("@aztec/foundation/log").Logger;
23
24
  protected readonly scopes?: AztecAddress[] | undefined;
25
+ isMisc: true;
26
+ isUtility: true;
27
+ private aztecNrDebugLog;
24
28
  constructor(contractAddress: AztecAddress,
25
29
  /** List of transient auth witnesses to be used during this simulation */
26
- authWitnesses: AuthWitness[], capsules: Capsule[], // TODO(#12425): Rename to transientCapsules
27
- executionDataProvider: ExecutionDataProvider, log?: import("@aztec/foundation/log").Logger, scopes?: AztecAddress[] | undefined);
30
+ authWitnesses: AuthWitness[], capsules: Capsule[], executionDataProvider: ExecutionDataProvider, log?: import("@aztec/foundation/log").Logger, scopes?: AztecAddress[] | undefined);
28
31
  utilityAssertCompatibleOracleVersion(version: number): void;
29
32
  utilityGetRandomField(): Fr;
30
- utilityGetBlockNumber(): Promise<number>;
31
- utilityGetTimestamp(): Promise<UInt64>;
32
- utilityGetContractAddress(): Promise<AztecAddress>;
33
- utilityGetChainId(): Promise<Fr>;
34
- utilityGetVersion(): Promise<Fr>;
33
+ utilityGetUtilityContext(): Promise<UtilityContext>;
35
34
  /**
36
35
  * Retrieve keys associated with a specific master public key and app address.
37
36
  * @param pkMHash - The master public key hash.
@@ -46,14 +45,14 @@ export declare class UtilityExecutionOracle extends TypedOracle {
46
45
  * @param leafValue - The leaf value
47
46
  * @returns The index and sibling path concatenated [index, sibling_path]
48
47
  */
49
- utilityGetMembershipWitness(blockNumber: number, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]>;
48
+ utilityGetMembershipWitness(blockNumber: BlockNumber, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]>;
50
49
  /**
51
50
  * Returns a nullifier membership witness for a given nullifier at a given block.
52
51
  * @param blockNumber - The block number at which to get the index.
53
52
  * @param nullifier - Nullifier we try to find witness for.
54
53
  * @returns The nullifier membership witness (if found).
55
54
  */
56
- utilityGetNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
55
+ utilityGetNullifierMembershipWitness(blockNumber: BlockNumber, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
57
56
  /**
58
57
  * Returns a low nullifier membership witness for a given nullifier at a given block.
59
58
  * @param blockNumber - The block number at which to get the index.
@@ -63,27 +62,27 @@ export declare class UtilityExecutionOracle extends TypedOracle {
63
62
  * list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
64
63
  * we are trying to prove non-inclusion for.
65
64
  */
66
- utilityGetLowNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
65
+ utilityGetLowNullifierMembershipWitness(blockNumber: BlockNumber, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
67
66
  /**
68
67
  * Returns a public data tree witness for a given leaf slot at a given block.
69
68
  * @param blockNumber - The block number at which to get the index.
70
69
  * @param leafSlot - The slot of the public data tree to get the witness for.
71
70
  * @returns - The witness
72
71
  */
73
- utilityGetPublicDataWitness(blockNumber: number, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
72
+ utilityGetPublicDataWitness(blockNumber: BlockNumber, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
74
73
  /**
75
74
  * Fetches a block header of a given block.
76
75
  * @param blockNumber - The number of a block of which to get the block header.
77
76
  * @returns Block extracted from a block with block number `blockNumber`.
78
77
  */
79
- utilityGetBlockHeader(blockNumber: number): Promise<BlockHeader | undefined>;
78
+ utilityGetBlockHeader(blockNumber: BlockNumber): Promise<BlockHeader | undefined>;
80
79
  /**
81
80
  * Retrieve the complete address associated to a given address.
82
81
  * @param account - The account address.
83
82
  * @returns A complete address associated with the input address.
84
83
  * @throws An error if the account is not registered in the database.
85
84
  */
86
- utilityGetCompleteAddress(account: AztecAddress): Promise<CompleteAddress>;
85
+ utilityGetPublicKeysAndPartialAddress(account: AztecAddress): Promise<CompleteAddress>;
87
86
  /**
88
87
  * Returns a contract instance associated with an address or throws if not found.
89
88
  * @param address - Address.
@@ -106,6 +105,7 @@ export declare class UtilityExecutionOracle extends TypedOracle {
106
105
  * Real notes coming from DB will have a leafIndex which
107
106
  * represents their index in the note hash tree.
108
107
  *
108
+ * @param owner - The owner of the notes. If undefined, returns notes for all owners.
109
109
  * @param storageSlot - The storage slot.
110
110
  * @param numSelects - The number of valid selects in selectBy and selectValues.
111
111
  * @param selectBy - An array of indices of the fields to selects.
@@ -118,7 +118,7 @@ export declare class UtilityExecutionOracle extends TypedOracle {
118
118
  * @param status - The status of notes to fetch.
119
119
  * @returns Array of note data.
120
120
  */
121
- 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[]>;
121
+ 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[]>;
122
122
  /**
123
123
  * Check if a nullifier exists in the nullifier tree.
124
124
  * @param innerNullifier - The inner nullifier.
@@ -133,7 +133,7 @@ export declare class UtilityExecutionOracle extends TypedOracle {
133
133
  * @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
134
134
  * @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
135
135
  */
136
- utilityGetL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<import("./message_load_oracle_inputs.js").MessageLoadOracleInputs<39>>;
136
+ utilityGetL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<import("./message_load_oracle_inputs.js").MessageLoadOracleInputs<36>>;
137
137
  /**
138
138
  * Read the public storage data.
139
139
  * @param contractAddress - The address to read storage from.
@@ -141,17 +141,8 @@ export declare class UtilityExecutionOracle extends TypedOracle {
141
141
  * @param blockNumber - The block number to read storage at.
142
142
  * @param numberOfElements - Number of elements to read from the starting storage slot.
143
143
  */
144
- utilityStorageRead(contractAddress: AztecAddress, startStorageSlot: Fr, blockNumber: number, numberOfElements: number): Promise<Fr[]>;
145
- utilityDebugLog(message: string, fields: Fr[]): void;
146
- /**
147
- * Returns the tagging secret for a given sender and recipient pair, siloed to the current contract address.
148
- * Includes the next index to be used used for tagging with this secret.
149
- * For this to work, the ivsk_m of the sender must be known.
150
- * @param sender - The address sending the note
151
- * @param recipient - The address receiving the note
152
- * @returns A tagging secret that can be used to tag notes.
153
- */
154
- utilityGetIndexedTaggingSecretAsSender(sender: AztecAddress, recipient: AztecAddress): Promise<IndexedTaggingSecret>;
144
+ utilityStorageRead(contractAddress: AztecAddress, startStorageSlot: Fr, blockNumber: BlockNumber, numberOfElements: number): Promise<Fr[]>;
145
+ utilityDebugLog(level: number, message: string, fields: Fr[]): void;
155
146
  utilityFetchTaggedLogs(pendingTaggedLogArrayBaseSlot: Fr): Promise<void>;
156
147
  utilityValidateEnqueuedNotesAndEvents(contractAddress: AztecAddress, noteValidationRequestsArrayBaseSlot: Fr, eventValidationRequestsArrayBaseSlot: Fr): Promise<void>;
157
148
  utilityBulkRetrieveLogs(contractAddress: AztecAddress, logRetrievalRequestsArrayBaseSlot: Fr, logRetrievalResponsesArrayBaseSlot: Fr): Promise<void>;
@@ -161,6 +152,5 @@ export declare class UtilityExecutionOracle extends TypedOracle {
161
152
  utilityCopyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
162
153
  utilityAes128Decrypt(ciphertext: Buffer, iv: Buffer, symKey: Buffer): Promise<Buffer>;
163
154
  utilityGetSharedSecret(address: AztecAddress, ephPk: Point): Promise<Point>;
164
- utilityEmitOffchainEffect(_data: Fr[]): Promise<void>;
165
155
  }
166
- //# sourceMappingURL=utility_execution_oracle.d.ts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BTSxFQUFFLEVBQUUsRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLE1BQU0sR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLENBRzNGO0lBRU0sc0JBQXNCLENBQUMsT0FBTyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQUUsS0FBSyxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUMsQ0FFakY7Q0FDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"utility_execution_oracle.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/oracle/utility_execution_oracle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEhF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC5G,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,KAAK,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE/D;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;IAEnD,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,YA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sBAAsB,CAAC,6BAA6B,EAAE,EAAE,iBAIpE;IAEY,qCAAqC,CAChD,eAAe,EAAE,YAAY,EAC7B,mCAAmC,EAAE,EAAE,EACvC,oCAAoC,EAAE,EAAE,iBAYzC;IAEY,uBAAuB,CAClC,eAAe,EAAE,YAAY,EAC7B,iCAAiC,EAAE,EAAE,EACrC,kCAAkC,EAAE,EAAE,iBAYvC;IAEM,mBAAmB,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAMhG;IAEY,kBAAkB,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAU7F;IAEM,oBAAoB,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAMlF;IAEM,kBAAkB,CACvB,eAAe,EAAE,YAAY,EAC7B,OAAO,EAAE,EAAE,EACX,OAAO,EAAE,EAAE,EACX,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAMf;IAGM,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAG3F;IAEM,sBAAsB,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAEjF;CACF"}
@@ -1,20 +1,31 @@
1
- import { Aes128 } from '@aztec/foundation/crypto';
2
- import { Fr } from '@aztec/foundation/fields';
3
- import { applyStringFormatting, createLogger } from '@aztec/foundation/log';
1
+ import { Aes128 } from '@aztec/foundation/crypto/aes128';
2
+ import { Fr } from '@aztec/foundation/curves/bn254';
3
+ import { LogLevels, applyStringFormatting, createLogger } from '@aztec/foundation/log';
4
4
  import { siloNullifier } from '@aztec/stdlib/hash';
5
+ import { UtilityContext } from '../noir-structs/utility_context.js';
5
6
  import { pickNotes } from '../pick_notes.js';
6
- import { TypedOracle } from './typed_oracle.js';
7
7
  /**
8
8
  * The oracle for an execution of utility contract functions.
9
- */ export class UtilityExecutionOracle extends TypedOracle {
9
+ */ export class UtilityExecutionOracle {
10
10
  contractAddress;
11
11
  authWitnesses;
12
12
  capsules;
13
13
  executionDataProvider;
14
14
  log;
15
15
  scopes;
16
+ isMisc;
17
+ isUtility;
18
+ aztecNrDebugLog;
16
19
  constructor(contractAddress, /** List of transient auth witnesses to be used during this simulation */ authWitnesses, capsules, executionDataProvider, log = createLogger('simulator:client_view_context'), scopes){
17
- super(), this.contractAddress = contractAddress, this.authWitnesses = authWitnesses, this.capsules = capsules, this.executionDataProvider = executionDataProvider, this.log = log, this.scopes = scopes;
20
+ this.contractAddress = contractAddress;
21
+ this.authWitnesses = authWitnesses;
22
+ this.capsules = capsules;
23
+ this.executionDataProvider = executionDataProvider;
24
+ this.log = log;
25
+ this.scopes = scopes;
26
+ this.isMisc = true;
27
+ this.isUtility = true;
28
+ this.aztecNrDebugLog = createLogger('aztec-nr:debug_log');
18
29
  }
19
30
  utilityAssertCompatibleOracleVersion(version) {
20
31
  this.executionDataProvider.assertCompatibleOracleVersion(version);
@@ -22,20 +33,15 @@ import { TypedOracle } from './typed_oracle.js';
22
33
  utilityGetRandomField() {
23
34
  return Fr.random();
24
35
  }
25
- utilityGetBlockNumber() {
26
- return this.executionDataProvider.getBlockNumber();
27
- }
28
- utilityGetTimestamp() {
29
- return this.executionDataProvider.getTimestamp();
30
- }
31
- utilityGetContractAddress() {
32
- return Promise.resolve(this.contractAddress);
33
- }
34
- utilityGetChainId() {
35
- return Promise.resolve(this.executionDataProvider.getChainId().then((id)=>new Fr(id)));
36
- }
37
- utilityGetVersion() {
38
- return Promise.resolve(this.executionDataProvider.getVersion().then((v)=>new Fr(v)));
36
+ async utilityGetUtilityContext() {
37
+ const blockHeader = await this.executionDataProvider.getAnchorBlockHeader();
38
+ return UtilityContext.from({
39
+ blockNumber: blockHeader.globalVariables.blockNumber,
40
+ timestamp: blockHeader.globalVariables.timestamp,
41
+ contractAddress: this.contractAddress,
42
+ version: blockHeader.globalVariables.version,
43
+ chainId: blockHeader.globalVariables.chainId
44
+ });
39
45
  }
40
46
  /**
41
47
  * Retrieve keys associated with a specific master public key and app address.
@@ -90,14 +96,14 @@ import { TypedOracle } from './typed_oracle.js';
90
96
  if (!block) {
91
97
  return undefined;
92
98
  }
93
- return block.header;
99
+ return block.getBlockHeader();
94
100
  }
95
101
  /**
96
102
  * Retrieve the complete address associated to a given address.
97
103
  * @param account - The account address.
98
104
  * @returns A complete address associated with the input address.
99
105
  * @throws An error if the account is not registered in the database.
100
- */ utilityGetCompleteAddress(account) {
106
+ */ utilityGetPublicKeysAndPartialAddress(account) {
101
107
  return this.executionDataProvider.getCompleteAddress(account);
102
108
  }
103
109
  /**
@@ -124,6 +130,7 @@ import { TypedOracle } from './typed_oracle.js';
124
130
  * Real notes coming from DB will have a leafIndex which
125
131
  * represents their index in the note hash tree.
126
132
  *
133
+ * @param owner - The owner of the notes. If undefined, returns notes for all owners.
127
134
  * @param storageSlot - The storage slot.
128
135
  * @param numSelects - The number of valid selects in selectBy and selectValues.
129
136
  * @param selectBy - An array of indices of the fields to selects.
@@ -135,8 +142,8 @@ import { TypedOracle } from './typed_oracle.js';
135
142
  * @param offset - The starting index for pagination.
136
143
  * @param status - The status of notes to fetch.
137
144
  * @returns Array of note data.
138
- */ async utilityGetNotes(storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
139
- const dbNotes = await this.executionDataProvider.getNotes(this.contractAddress, storageSlot, status, this.scopes);
145
+ */ async utilityGetNotes(owner, storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
146
+ const dbNotes = await this.executionDataProvider.getNotes(this.contractAddress, owner, storageSlot, status, this.scopes);
140
147
  return pickNotes(dbNotes, {
141
148
  selects: selectByIndexes.slice(0, numSelects).map((index, i)=>({
142
149
  selector: {
@@ -194,24 +201,16 @@ import { TypedOracle } from './typed_oracle.js';
194
201
  }
195
202
  return values;
196
203
  }
197
- utilityDebugLog(message, fields) {
198
- this.log.verbose(`${applyStringFormatting(message, fields)}`, {
199
- module: `${this.log.module}:debug_log`
200
- });
201
- }
202
- /**
203
- * Returns the tagging secret for a given sender and recipient pair, siloed to the current contract address.
204
- * Includes the next index to be used used for tagging with this secret.
205
- * For this to work, the ivsk_m of the sender must be known.
206
- * @param sender - The address sending the note
207
- * @param recipient - The address receiving the note
208
- * @returns A tagging secret that can be used to tag notes.
209
- */ async utilityGetIndexedTaggingSecretAsSender(sender, recipient) {
210
- return await this.executionDataProvider.getIndexedTaggingSecretAsSender(this.contractAddress, sender, recipient);
204
+ utilityDebugLog(level, message, fields) {
205
+ if (!LogLevels[level]) {
206
+ throw new Error(`Invalid debug log level: ${level}`);
207
+ }
208
+ const levelName = LogLevels[level];
209
+ this.aztecNrDebugLog[levelName](`${applyStringFormatting(message, fields)}`);
211
210
  }
212
211
  async utilityFetchTaggedLogs(pendingTaggedLogArrayBaseSlot) {
213
212
  await this.executionDataProvider.syncTaggedLogs(this.contractAddress, pendingTaggedLogArrayBaseSlot, this.scopes);
214
- await this.executionDataProvider.removeNullifiedNotes(this.contractAddress);
213
+ await this.executionDataProvider.syncNoteNullifiers(this.contractAddress);
215
214
  }
216
215
  async utilityValidateEnqueuedNotesAndEvents(contractAddress, noteValidationRequestsArrayBaseSlot, eventValidationRequestsArrayBaseSlot) {
217
216
  // TODO(#10727): allow other contracts to deliver notes
@@ -264,7 +263,4 @@ import { TypedOracle } from './typed_oracle.js';
264
263
  utilityGetSharedSecret(address, ephPk) {
265
264
  return this.executionDataProvider.getSharedSecret(address, ephPk);
266
265
  }
267
- utilityEmitOffchainEffect(_data) {
268
- return Promise.reject(new Error('Cannot emit offchain effects from a utility function'));
269
- }
270
266
  }
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { Comparator, type Note } from '@aztec/stdlib/note';
3
3
  export interface PropertySelector {
4
4
  index: number;
@@ -82,4 +82,4 @@ interface ContainsNote {
82
82
  */
83
83
  export declare function pickNotes<T extends ContainsNote>(noteDatas: T[], { selects, sorts, limit, offset }: GetOptions): T[];
84
84
  export {};
85
- //# sourceMappingURL=pick_notes.d.ts.map
85
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGlja19ub3Rlcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9waWNrX25vdGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEVBQUUsVUFBVSxFQUFFLEtBQUssSUFBSSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFFM0QsTUFBTSxXQUFXLGdCQUFnQjtJQUMvQixLQUFLLEVBQUUsTUFBTSxDQUFDO0lBQ2QsTUFBTSxFQUFFLE1BQU0sQ0FBQztJQUNmLE1BQU0sRUFBRSxNQUFNLENBQUM7Q0FDaEI7QUFFRDs7R0FFRztBQUNILE1BQU0sV0FBVyxNQUFNO0lBQ3JCOztPQUVHO0lBQ0gsUUFBUSxFQUFFLGdCQUFnQixDQUFDO0lBQzNCOztPQUVHO0lBQ0gsS0FBSyxFQUFFLEVBQUUsQ0FBQztJQUNWOztPQUVHO0lBQ0gsVUFBVSxFQUFFLFVBQVUsQ0FBQztDQUN4QjtBQUVEOztHQUVHO0FBQ0gsb0JBQVks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