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

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 (350) hide show
  1. package/dest/bin/check_oracle_version.d.ts +1 -1
  2. package/dest/bin/check_oracle_version.js +105 -15
  3. package/dest/block_synchronizer/block_synchronizer.d.ts +37 -0
  4. package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -0
  5. package/dest/{synchronizer/synchronizer.js → block_synchronizer/block_synchronizer.js} +20 -22
  6. package/dest/block_synchronizer/index.d.ts +2 -0
  7. package/dest/block_synchronizer/index.d.ts.map +1 -0
  8. package/dest/block_synchronizer/index.js +1 -0
  9. package/dest/config/index.d.ts +4 -12
  10. package/dest/config/index.d.ts.map +1 -1
  11. package/dest/config/index.js +7 -13
  12. package/dest/config/package_info.d.ts +1 -1
  13. package/dest/contract_function_simulator/contract_function_simulator.d.ts +43 -14
  14. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  15. package/dest/contract_function_simulator/contract_function_simulator.js +55 -29
  16. package/dest/contract_function_simulator/execution_note_cache.d.ts +9 -7
  17. package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
  18. package/dest/contract_function_simulator/execution_note_cache.js +21 -13
  19. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +2 -2
  20. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -1
  21. package/dest/contract_function_simulator/execution_tagging_index_cache.js +1 -1
  22. package/dest/contract_function_simulator/hashed_values_cache.d.ts +2 -2
  23. package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -1
  24. package/dest/contract_function_simulator/index.d.ts +1 -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 +5 -4
  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_request.js +7 -6
  30. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +3 -3
  31. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -1
  32. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +1 -1
  33. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +6 -4
  34. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
  35. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +12 -3
  36. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +2 -2
  37. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -1
  38. package/dest/contract_function_simulator/noir-structs/utility_context.js +1 -1
  39. package/dest/contract_function_simulator/oracle/index.d.ts +1 -1
  40. package/dest/contract_function_simulator/oracle/interfaces.d.ts +19 -13
  41. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
  42. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +2 -4
  43. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
  44. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +1 -1
  45. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +10 -4
  46. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
  47. package/dest/contract_function_simulator/oracle/note_packing_utils.js +10 -5
  48. package/dest/contract_function_simulator/oracle/oracle.d.ts +5 -4
  49. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
  50. package/dest/contract_function_simulator/oracle/oracle.js +34 -17
  51. package/dest/contract_function_simulator/oracle/private_execution.d.ts +9 -10
  52. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
  53. package/dest/contract_function_simulator/oracle/private_execution.js +12 -12
  54. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +24 -18
  55. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  56. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +41 -18
  57. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +58 -17
  58. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  59. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +147 -40
  60. package/dest/contract_function_simulator/pick_notes.d.ts +2 -2
  61. package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
  62. package/dest/contract_function_simulator/pick_notes.js +1 -1
  63. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +4 -4
  64. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
  65. package/dest/contract_function_simulator/proxied_contract_data_source.js +23 -5
  66. package/dest/contract_function_simulator/proxied_node.d.ts +1 -1
  67. package/dest/contract_function_simulator/proxied_node.d.ts.map +1 -1
  68. package/dest/debug/pxe_debug_utils.d.ts +31 -0
  69. package/dest/debug/pxe_debug_utils.d.ts.map +1 -0
  70. package/dest/debug/pxe_debug_utils.js +37 -0
  71. package/dest/entrypoints/client/bundle/index.d.ts +1 -2
  72. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  73. package/dest/entrypoints/client/bundle/index.js +0 -1
  74. package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
  75. package/dest/entrypoints/client/bundle/utils.js +4 -4
  76. package/dest/entrypoints/client/lazy/index.d.ts +1 -2
  77. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  78. package/dest/entrypoints/client/lazy/index.js +0 -1
  79. package/dest/entrypoints/client/lazy/utils.d.ts +1 -1
  80. package/dest/entrypoints/client/lazy/utils.js +4 -4
  81. package/dest/entrypoints/pxe_creation_options.d.ts +3 -1
  82. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
  83. package/dest/entrypoints/server/index.d.ts +2 -2
  84. package/dest/entrypoints/server/index.d.ts.map +1 -1
  85. package/dest/entrypoints/server/index.js +1 -1
  86. package/dest/entrypoints/server/utils.d.ts +1 -1
  87. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  88. package/dest/entrypoints/server/utils.js +5 -16
  89. package/dest/error_enriching.d.ts +4 -4
  90. package/dest/error_enriching.d.ts.map +1 -1
  91. package/dest/error_enriching.js +6 -6
  92. package/dest/events/event_service.d.ts +15 -0
  93. package/dest/events/event_service.d.ts.map +1 -0
  94. package/dest/events/event_service.js +47 -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 +9 -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/logs/log_service.d.ts +26 -0
  102. package/dest/logs/log_service.d.ts.map +1 -0
  103. package/dest/logs/log_service.js +120 -0
  104. package/dest/notes/index.d.ts +2 -0
  105. package/dest/notes/index.d.ts.map +1 -0
  106. package/dest/notes/index.js +1 -0
  107. package/dest/notes/note_service.d.ts +48 -0
  108. package/dest/notes/note_service.d.ts.map +1 -0
  109. package/dest/notes/note_service.js +152 -0
  110. package/dest/oracle_version.d.ts +3 -3
  111. package/dest/oracle_version.js +2 -2
  112. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +3 -3
  113. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -1
  114. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.js +7 -7
  115. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +1 -1
  116. package/dest/private_kernel/hints/index.d.ts +1 -1
  117. package/dest/private_kernel/index.d.ts +1 -1
  118. package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
  119. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  120. package/dest/private_kernel/private_kernel_execution_prover.js +11 -10
  121. package/dest/private_kernel/private_kernel_oracle.d.ts +3 -2
  122. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
  123. package/dest/private_kernel/private_kernel_oracle_impl.d.ts +8 -7
  124. package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +1 -1
  125. package/dest/private_kernel/private_kernel_oracle_impl.js +7 -7
  126. package/dest/public_storage/public_storage_service.d.ts +24 -0
  127. package/dest/public_storage/public_storage_service.d.ts.map +1 -0
  128. package/dest/public_storage/public_storage_service.js +26 -0
  129. package/dest/pxe.d.ts +47 -48
  130. package/dest/pxe.d.ts.map +1 -1
  131. package/dest/pxe.js +142 -171
  132. package/dest/storage/address_store/address_store.d.ts +11 -0
  133. package/dest/storage/address_store/address_store.d.ts.map +1 -0
  134. package/dest/storage/{address_data_provider/address_data_provider.js → address_store/address_store.js} +1 -1
  135. package/dest/storage/address_store/index.d.ts +2 -0
  136. package/dest/storage/address_store/index.d.ts.map +1 -0
  137. package/dest/storage/address_store/index.js +1 -0
  138. package/dest/storage/anchor_block_store/anchor_block_store.d.ts +9 -0
  139. package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -0
  140. package/dest/storage/{sync_data_provider/sync_data_provider.js → anchor_block_store/anchor_block_store.js} +2 -9
  141. package/dest/storage/anchor_block_store/index.d.ts +2 -0
  142. package/dest/storage/anchor_block_store/index.d.ts.map +1 -0
  143. package/dest/storage/anchor_block_store/index.js +1 -0
  144. package/dest/storage/capsule_store/capsule_store.d.ts +57 -0
  145. package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -0
  146. package/dest/storage/{capsule_data_provider/capsule_data_provider.js → capsule_store/capsule_store.js} +34 -6
  147. package/dest/storage/capsule_store/index.d.ts +2 -0
  148. package/dest/storage/capsule_store/index.d.ts.map +1 -0
  149. package/dest/storage/capsule_store/index.js +1 -0
  150. package/dest/storage/{contract_data_provider/contract_data_provider.d.ts → contract_store/contract_store.d.ts} +7 -15
  151. package/dest/storage/contract_store/contract_store.d.ts.map +1 -0
  152. package/dest/storage/{contract_data_provider/contract_data_provider.js → contract_store/contract_store.js} +34 -15
  153. package/dest/storage/contract_store/index.d.ts +2 -0
  154. package/dest/storage/contract_store/index.d.ts.map +1 -0
  155. package/dest/storage/contract_store/index.js +1 -0
  156. package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.d.ts +1 -1
  157. package/dest/storage/contract_store/private_functions_tree.d.ts.map +1 -0
  158. package/dest/storage/{contract_data_provider → contract_store}/private_functions_tree.js +1 -1
  159. package/dest/storage/index.d.ts +8 -8
  160. package/dest/storage/index.d.ts.map +1 -1
  161. package/dest/storage/index.js +7 -7
  162. package/dest/storage/metadata.d.ts +1 -1
  163. package/dest/storage/note_store/index.d.ts +3 -0
  164. package/dest/storage/note_store/index.d.ts.map +1 -0
  165. package/dest/storage/note_store/index.js +2 -0
  166. package/dest/storage/{note_data_provider/note_data_provider.d.ts → note_store/note_store.d.ts} +14 -13
  167. package/dest/storage/note_store/note_store.d.ts.map +1 -0
  168. package/dest/storage/{note_data_provider/note_data_provider.js → note_store/note_store.js} +33 -19
  169. package/dest/storage/private_event_store/private_event_store.d.ts +51 -0
  170. package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -0
  171. package/dest/storage/{private_event_data_provider/private_event_data_provider.js → private_event_store/private_event_store.js} +39 -28
  172. package/dest/storage/tagging_store/index.d.ts +4 -0
  173. package/dest/storage/tagging_store/index.d.ts.map +1 -0
  174. package/dest/storage/tagging_store/index.js +3 -0
  175. package/dest/storage/tagging_store/recipient_tagging_store.d.ts +21 -0
  176. package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -0
  177. package/dest/storage/tagging_store/recipient_tagging_store.js +42 -0
  178. package/dest/storage/tagging_store/sender_address_book_store.d.ts +14 -0
  179. package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +1 -0
  180. package/dest/storage/tagging_store/sender_address_book_store.js +30 -0
  181. package/dest/storage/tagging_store/sender_tagging_store.d.ts +67 -0
  182. package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -0
  183. package/dest/storage/tagging_store/sender_tagging_store.js +196 -0
  184. package/dest/tagging/index.d.ts +15 -6
  185. package/dest/tagging/index.d.ts.map +1 -1
  186. package/dest/tagging/index.js +23 -5
  187. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +14 -0
  188. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -0
  189. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +99 -0
  190. package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts +12 -0
  191. package/dest/tagging/recipient_sync/utils/find_highest_indexes.d.ts.map +1 -0
  192. package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +20 -0
  193. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +14 -0
  194. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -0
  195. package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +29 -0
  196. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +20 -0
  197. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -0
  198. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +74 -0
  199. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +11 -0
  200. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -0
  201. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +32 -0
  202. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +18 -0
  203. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -0
  204. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +55 -0
  205. package/dest/tree_membership/tree_membership_service.d.ts +52 -0
  206. package/dest/tree_membership/tree_membership_service.d.ts.map +1 -0
  207. package/dest/tree_membership/tree_membership_service.js +84 -0
  208. package/package.json +20 -19
  209. package/src/bin/check_oracle_version.ts +130 -20
  210. package/src/{synchronizer/synchronizer.ts → block_synchronizer/block_synchronizer.ts} +19 -22
  211. package/src/block_synchronizer/index.ts +1 -0
  212. package/src/config/index.ts +10 -25
  213. package/src/contract_function_simulator/contract_function_simulator.ts +95 -28
  214. package/src/contract_function_simulator/execution_note_cache.ts +22 -11
  215. package/src/contract_function_simulator/execution_tagging_index_cache.ts +1 -1
  216. package/src/contract_function_simulator/hashed_values_cache.ts +1 -1
  217. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -1
  218. package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +6 -5
  219. package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +2 -2
  220. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +14 -2
  221. package/src/contract_function_simulator/noir-structs/utility_context.ts +1 -1
  222. package/src/contract_function_simulator/oracle/interfaces.ts +26 -11
  223. package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +1 -1
  224. package/src/contract_function_simulator/oracle/note_packing_utils.ts +21 -5
  225. package/src/contract_function_simulator/oracle/oracle.ts +43 -13
  226. package/src/contract_function_simulator/oracle/private_execution.ts +17 -15
  227. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +100 -23
  228. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +223 -47
  229. package/src/contract_function_simulator/pick_notes.ts +1 -1
  230. package/src/contract_function_simulator/proxied_contract_data_source.ts +24 -7
  231. package/src/debug/pxe_debug_utils.ts +48 -0
  232. package/src/entrypoints/client/bundle/index.ts +0 -1
  233. package/src/entrypoints/client/bundle/utils.ts +4 -4
  234. package/src/entrypoints/client/lazy/index.ts +0 -1
  235. package/src/entrypoints/client/lazy/utils.ts +4 -4
  236. package/src/entrypoints/pxe_creation_options.ts +2 -0
  237. package/src/entrypoints/server/index.ts +1 -1
  238. package/src/entrypoints/server/utils.ts +5 -19
  239. package/src/error_enriching.ts +7 -15
  240. package/src/events/event_service.ts +77 -0
  241. package/src/events/index.ts +1 -0
  242. package/src/events/private_event_filter_validator.ts +48 -0
  243. package/src/logs/log_service.ts +202 -0
  244. package/src/notes/index.ts +1 -0
  245. package/src/notes/note_service.ts +200 -0
  246. package/src/oracle_version.ts +2 -2
  247. package/src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts +5 -9
  248. package/src/private_kernel/private_kernel_execution_prover.ts +12 -16
  249. package/src/private_kernel/private_kernel_oracle.ts +2 -1
  250. package/src/private_kernel/private_kernel_oracle_impl.ts +10 -9
  251. package/src/public_storage/public_storage_service.ts +33 -0
  252. package/src/pxe.ts +167 -223
  253. package/src/storage/{address_data_provider/address_data_provider.ts → address_store/address_store.ts} +1 -1
  254. package/src/storage/address_store/index.ts +1 -0
  255. package/src/storage/{sync_data_provider/sync_data_provider.ts → anchor_block_store/anchor_block_store.ts} +2 -11
  256. package/src/storage/anchor_block_store/index.ts +1 -0
  257. package/src/storage/{capsule_data_provider/capsule_data_provider.ts → capsule_store/capsule_store.ts} +34 -2
  258. package/src/storage/capsule_store/index.ts +1 -0
  259. package/src/storage/{contract_data_provider/contract_data_provider.ts → contract_store/contract_store.ts} +45 -20
  260. package/src/storage/contract_store/index.ts +1 -0
  261. package/src/storage/{contract_data_provider → contract_store}/private_functions_tree.ts +1 -1
  262. package/src/storage/index.ts +7 -7
  263. package/src/storage/note_store/index.ts +2 -0
  264. package/src/storage/{note_data_provider/note_data_provider.ts → note_store/note_store.ts} +41 -22
  265. package/src/storage/{private_event_data_provider/private_event_data_provider.ts → private_event_store/private_event_store.ts} +61 -47
  266. package/src/storage/tagging_store/index.ts +3 -0
  267. package/src/storage/tagging_store/recipient_tagging_store.ts +53 -0
  268. package/src/storage/tagging_store/sender_address_book_store.ts +42 -0
  269. package/src/storage/tagging_store/sender_tagging_store.ts +244 -0
  270. package/src/tagging/index.ts +27 -5
  271. package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +129 -0
  272. package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +34 -0
  273. package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +43 -0
  274. package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +96 -0
  275. package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +44 -0
  276. package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +72 -0
  277. package/src/tree_membership/tree_membership_service.ts +112 -0
  278. package/dest/contract_function_simulator/execution_data_provider.d.ts +0 -274
  279. package/dest/contract_function_simulator/execution_data_provider.d.ts.map +0 -1
  280. package/dest/contract_function_simulator/execution_data_provider.js +0 -14
  281. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +0 -122
  282. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +0 -1
  283. package/dest/contract_function_simulator/pxe_oracle_interface.js +0 -701
  284. package/dest/storage/address_data_provider/address_data_provider.d.ts +0 -11
  285. package/dest/storage/address_data_provider/address_data_provider.d.ts.map +0 -1
  286. package/dest/storage/address_data_provider/index.d.ts +0 -2
  287. package/dest/storage/address_data_provider/index.d.ts.map +0 -1
  288. package/dest/storage/address_data_provider/index.js +0 -1
  289. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +0 -25
  290. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +0 -1
  291. package/dest/storage/capsule_data_provider/index.d.ts +0 -2
  292. package/dest/storage/capsule_data_provider/index.d.ts.map +0 -1
  293. package/dest/storage/capsule_data_provider/index.js +0 -1
  294. package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +0 -1
  295. package/dest/storage/contract_data_provider/index.d.ts +0 -2
  296. package/dest/storage/contract_data_provider/index.d.ts.map +0 -1
  297. package/dest/storage/contract_data_provider/index.js +0 -1
  298. package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +0 -1
  299. package/dest/storage/note_data_provider/index.d.ts +0 -3
  300. package/dest/storage/note_data_provider/index.d.ts.map +0 -1
  301. package/dest/storage/note_data_provider/index.js +0 -2
  302. package/dest/storage/note_data_provider/note_dao.d.ts +0 -100
  303. package/dest/storage/note_data_provider/note_dao.d.ts.map +0 -1
  304. package/dest/storage/note_data_provider/note_dao.js +0 -102
  305. package/dest/storage/note_data_provider/note_data_provider.d.ts.map +0 -1
  306. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +0 -43
  307. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +0 -1
  308. package/dest/storage/sync_data_provider/index.d.ts +0 -2
  309. package/dest/storage/sync_data_provider/index.d.ts.map +0 -1
  310. package/dest/storage/sync_data_provider/index.js +0 -1
  311. package/dest/storage/sync_data_provider/sync_data_provider.d.ts +0 -10
  312. package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +0 -1
  313. package/dest/storage/tagging_data_provider/index.d.ts +0 -2
  314. package/dest/storage/tagging_data_provider/index.d.ts.map +0 -1
  315. package/dest/storage/tagging_data_provider/index.js +0 -1
  316. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +0 -40
  317. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +0 -1
  318. package/dest/storage/tagging_data_provider/tagging_data_provider.js +0 -89
  319. package/dest/synchronizer/index.d.ts +0 -2
  320. package/dest/synchronizer/index.d.ts.map +0 -1
  321. package/dest/synchronizer/index.js +0 -1
  322. package/dest/synchronizer/synchronizer.d.ts +0 -35
  323. package/dest/synchronizer/synchronizer.d.ts.map +0 -1
  324. package/dest/tagging/constants.d.ts +0 -2
  325. package/dest/tagging/constants.d.ts.map +0 -1
  326. package/dest/tagging/constants.js +0 -2
  327. package/dest/tagging/siloed_tag.d.ts +0 -14
  328. package/dest/tagging/siloed_tag.d.ts.map +0 -1
  329. package/dest/tagging/siloed_tag.js +0 -20
  330. package/dest/tagging/tag.d.ts +0 -12
  331. package/dest/tagging/tag.d.ts.map +0 -1
  332. package/dest/tagging/tag.js +0 -17
  333. package/dest/tagging/utils.d.ts +0 -18
  334. package/dest/tagging/utils.d.ts.map +0 -1
  335. package/dest/tagging/utils.js +0 -24
  336. package/src/contract_function_simulator/execution_data_provider.ts +0 -343
  337. package/src/contract_function_simulator/pxe_oracle_interface.ts +0 -1019
  338. package/src/storage/address_data_provider/index.ts +0 -1
  339. package/src/storage/capsule_data_provider/index.ts +0 -1
  340. package/src/storage/contract_data_provider/index.ts +0 -1
  341. package/src/storage/note_data_provider/index.ts +0 -2
  342. package/src/storage/note_data_provider/note_dao.ts +0 -154
  343. package/src/storage/sync_data_provider/index.ts +0 -1
  344. package/src/storage/tagging_data_provider/index.ts +0 -1
  345. package/src/storage/tagging_data_provider/tagging_data_provider.ts +0 -120
  346. package/src/synchronizer/index.ts +0 -1
  347. package/src/tagging/constants.ts +0 -2
  348. package/src/tagging/siloed_tag.ts +0 -22
  349. package/src/tagging/tag.ts +0 -16
  350. package/src/tagging/utils.ts +0 -31
@@ -1,16 +1,16 @@
1
1
  import { AVM_EMITNOTEHASH_BASE_L2_GAS, AVM_EMITNULLIFIER_BASE_L2_GAS, AVM_SENDL2TOL1MSG_BASE_L2_GAS, DA_BYTES_PER_FIELD, DA_GAS_PER_BYTE, FIXED_AVM_STARTUP_L2_GAS, FIXED_DA_GAS, FIXED_L2_GAS, L2_GAS_PER_CONTRACT_CLASS_LOG, L2_GAS_PER_PRIVATE_LOG, MAX_CONTRACT_CLASS_LOGS_PER_TX, MAX_ENQUEUED_CALLS_PER_TX, MAX_L2_TO_L1_MSGS_PER_TX, MAX_NOTE_HASHES_PER_TX, MAX_NULLIFIERS_PER_TX, MAX_PRIVATE_LOGS_PER_TX } from '@aztec/constants';
2
2
  import { arrayNonEmptyLength, padArrayEnd } from '@aztec/foundation/collection';
3
- import { poseidon2Hash } from '@aztec/foundation/crypto';
4
- import { Fr } from '@aztec/foundation/fields';
3
+ import { poseidon2Hash } from '@aztec/foundation/crypto/poseidon';
4
+ import { Fr } from '@aztec/foundation/curves/bn254';
5
5
  import { createLogger } from '@aztec/foundation/log';
6
6
  import { Timer } from '@aztec/foundation/timer';
7
7
  import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
8
8
  import { protocolContractsHash } from '@aztec/protocol-contracts';
9
9
  import { ExecutionError, createSimulationError, extractCallStack, resolveAssertionMessageFromError, toACVMWitness, witnessMapToFields } from '@aztec/simulator/client';
10
- import { FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
10
+ import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
11
11
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
12
12
  import { Gas } from '@aztec/stdlib/gas';
13
- import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifier } from '@aztec/stdlib/hash';
13
+ import { computeNoteHashNonce, computeProtocolNullifier, computeUniqueNoteHash, siloNoteHash, siloNullifier } from '@aztec/stdlib/hash';
14
14
  import { PartialPrivateTailPublicInputsForPublic, PartialPrivateTailPublicInputsForRollup, PrivateKernelTailCircuitPublicInputs, PrivateToPublicAccumulatedData, PrivateToRollupAccumulatedData, PublicCallRequest, ScopedLogHash } from '@aztec/stdlib/kernel';
15
15
  import { PrivateLog } from '@aztec/stdlib/logs';
16
16
  import { ScopedL2ToL1Message } from '@aztec/stdlib/messaging';
@@ -26,11 +26,31 @@ import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
26
26
  /**
27
27
  * The contract function simulator.
28
28
  */ export class ContractFunctionSimulator {
29
- executionDataProvider;
29
+ contractStore;
30
+ noteStore;
31
+ keyStore;
32
+ addressStore;
33
+ aztecNode;
34
+ anchorBlockStore;
35
+ senderTaggingStore;
36
+ recipientTaggingStore;
37
+ senderAddressBookStore;
38
+ capsuleStore;
39
+ privateEventStore;
30
40
  simulator;
31
41
  log;
32
- constructor(executionDataProvider, simulator){
33
- this.executionDataProvider = executionDataProvider;
42
+ constructor(contractStore, noteStore, keyStore, addressStore, aztecNode, anchorBlockStore, senderTaggingStore, recipientTaggingStore, senderAddressBookStore, capsuleStore, privateEventStore, simulator){
43
+ this.contractStore = contractStore;
44
+ this.noteStore = noteStore;
45
+ this.keyStore = keyStore;
46
+ this.addressStore = addressStore;
47
+ this.aztecNode = aztecNode;
48
+ this.anchorBlockStore = anchorBlockStore;
49
+ this.senderTaggingStore = senderTaggingStore;
50
+ this.recipientTaggingStore = recipientTaggingStore;
51
+ this.senderAddressBookStore = senderAddressBookStore;
52
+ this.capsuleStore = capsuleStore;
53
+ this.privateEventStore = privateEventStore;
34
54
  this.simulator = simulator;
35
55
  this.log = createLogger('simulator');
36
56
  }
@@ -41,15 +61,15 @@ import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
41
61
  * @param contractAddress - The address of the contract (should match request.origin)
42
62
  * @param msgSender - The address calling the function. This can be replaced to simulate a call from another contract
43
63
  * or a specific account.
64
+ * @param anchorBlockHeader - The block header to use as base state for this run.
44
65
  * @param senderForTags - The address that is used as a tagging sender when emitting private logs. Returned from
45
66
  * the `privateGetSenderForTags` oracle.
46
67
  * @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
47
68
  * @returns The result of the execution.
48
- */ async run(request, contractAddress, selector, msgSender = AztecAddress.fromField(Fr.MAX_FIELD_VALUE), senderForTags, scopes) {
69
+ */ async run(request, contractAddress, selector, msgSender = AztecAddress.fromField(Fr.MAX_FIELD_VALUE), anchorBlockHeader, senderForTags, scopes) {
49
70
  const simulatorSetupTimer = new Timer();
50
- const anchorBlockHeader = await this.executionDataProvider.getAnchorBlockHeader();
51
- await verifyCurrentClassId(contractAddress, this.executionDataProvider);
52
- const entryPointArtifact = await this.executionDataProvider.getFunctionArtifact(contractAddress, selector);
71
+ await verifyCurrentClassId(contractAddress, this.aztecNode, this.contractStore, anchorBlockHeader);
72
+ const entryPointArtifact = await this.contractStore.getFunctionArtifactWithDebugMetadata(contractAddress, selector);
53
73
  if (entryPointArtifact.functionType !== FunctionType.PRIVATE) {
54
74
  throw new Error(`Cannot run ${entryPointArtifact.functionType} function as private`);
55
75
  }
@@ -57,12 +77,12 @@ import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
57
77
  this.log.warn(`Request origin does not match contract address in simulation. Request origin: ${request.origin}, contract address: ${contractAddress}`);
58
78
  }
59
79
  // reserve the first side effect for the tx hash (inserted by the private kernel)
60
- const startSideEffectCounter = 1;
80
+ const startSideEffectCounter = 2;
61
81
  const callContext = new CallContext(msgSender, contractAddress, await FunctionSelector.fromNameAndParameters(entryPointArtifact.name, entryPointArtifact.parameters), entryPointArtifact.isStatic);
62
- const txRequestHash = await request.toTxRequest().hash();
63
- const noteCache = new ExecutionNoteCache(txRequestHash);
82
+ const protocolNullifier = await computeProtocolNullifier(await request.toTxRequest().hash());
83
+ const noteCache = new ExecutionNoteCache(protocolNullifier);
64
84
  const taggingIndexCache = new ExecutionTaggingIndexCache();
65
- const privateExecutionOracle = new PrivateExecutionOracle(request.firstCallArgsHash, request.txContext, callContext, anchorBlockHeader, request.authWitnesses, request.capsules, HashedValuesCache.create(request.argsOfCalls), noteCache, taggingIndexCache, this.executionDataProvider, 0, startSideEffectCounter, undefined, scopes, senderForTags, this.simulator);
85
+ const privateExecutionOracle = new PrivateExecutionOracle(request.firstCallArgsHash, request.txContext, callContext, anchorBlockHeader, request.authWitnesses, request.capsules, HashedValuesCache.create(request.argsOfCalls), noteCache, taggingIndexCache, this.contractStore, this.noteStore, this.keyStore, this.addressStore, this.aztecNode, this.anchorBlockStore, this.senderTaggingStore, this.recipientTaggingStore, this.senderAddressBookStore, this.capsuleStore, this.privateEventStore, 0, startSideEffectCounter, undefined, scopes, senderForTags, this.simulator);
66
86
  const setupTime = simulatorSetupTimer.ms();
67
87
  try {
68
88
  // Note: any nested private function calls are made recursively within this
@@ -71,8 +91,8 @@ import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
71
91
  // within executionResult.nestedExecutionResults).
72
92
  const executionResult = await executePrivateFunction(this.simulator, privateExecutionOracle, entryPointArtifact, contractAddress, request.functionSelector);
73
93
  const simulatorTeardownTimer = new Timer();
74
- const { usedTxRequestHashForNonces } = noteCache.finish();
75
- const firstNullifierHint = usedTxRequestHashForNonces ? Fr.ZERO : noteCache.getAllNullifiers()[0];
94
+ const { usedProtocolNullifierForNonces } = noteCache.finish();
95
+ const firstNullifierHint = usedProtocolNullifierForNonces ? Fr.ZERO : noteCache.getAllNullifiers()[0];
76
96
  const publicCallRequests = collectNested([
77
97
  executionResult
78
98
  ], (r)=>r.publicInputs.publicCallRequests.getActiveItems().map((r)=>r.inner).concat(r.publicInputs.publicTeardownCallRequest.isEmpty() ? [] : [
@@ -100,16 +120,17 @@ import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
100
120
  * Runs a utility function.
101
121
  * @param call - The function call to execute.
102
122
  * @param authwits - Authentication witnesses required for the function call.
123
+ * @param anchorBlockHeader - The block header to use as base state for this run.
103
124
  * @param scopes - Optional array of account addresses whose notes can be accessed in this call. Defaults to all
104
125
  * accounts if not specified.
105
- * @returns A decoded ABI value containing the function's return data.
106
- */ async runUtility(call, authwits, scopes) {
107
- await verifyCurrentClassId(call.to, this.executionDataProvider);
108
- const entryPointArtifact = await this.executionDataProvider.getFunctionArtifact(call.to, call.selector);
126
+ * @returns A return value of the utility function in a form as returned by the simulator (Noir fields)
127
+ */ async runUtility(call, authwits, anchorBlockHeader, scopes) {
128
+ await verifyCurrentClassId(call.to, this.aztecNode, this.contractStore, anchorBlockHeader);
129
+ const entryPointArtifact = await this.contractStore.getFunctionArtifactWithDebugMetadata(call.to, call.selector);
109
130
  if (entryPointArtifact.functionType !== FunctionType.UTILITY) {
110
131
  throw new Error(`Cannot run ${entryPointArtifact.functionType} function as utility`);
111
132
  }
112
- const oracle = new UtilityExecutionOracle(call.to, authwits, [], this.executionDataProvider, undefined, scopes);
133
+ const oracle = new UtilityExecutionOracle(call.to, authwits, [], anchorBlockHeader, this.contractStore, this.noteStore, this.keyStore, this.addressStore, this.aztecNode, this.anchorBlockStore, this.recipientTaggingStore, this.senderAddressBookStore, this.capsuleStore, this.privateEventStore, undefined, scopes);
113
134
  try {
114
135
  this.log.verbose(`Executing utility function ${entryPointArtifact.name}`, {
115
136
  contract: call.to,
@@ -125,16 +146,21 @@ import { UtilityExecutionOracle } from './oracle/utility_execution_oracle.js';
125
146
  cause: err
126
147
  });
127
148
  });
128
- const returnWitness = witnessMapToFields(acirExecutionResult.returnWitness);
129
149
  this.log.verbose(`Utility simulation for ${call.to}.${call.selector} completed`);
130
- return decodeFromAbi(entryPointArtifact.returnTypes, returnWitness);
150
+ return witnessMapToFields(acirExecutionResult.returnWitness);
131
151
  } catch (err) {
132
152
  throw createSimulationError(err instanceof Error ? err : new Error('Unknown error during private execution'));
133
153
  }
134
154
  }
135
155
  // docs:end:execute_utility_function
136
- getStats() {
137
- return this.executionDataProvider.getStats();
156
+ /**
157
+ * Returns the execution statistics collected during the simulator run.
158
+ * @returns The execution statistics.
159
+ */ getStats() {
160
+ const nodeRPCCalls = typeof this.aztecNode.getStats === 'function' ? this.aztecNode.getStats() : {};
161
+ return {
162
+ nodeRPCCalls
163
+ };
138
164
  }
139
165
  }
140
166
  class OrderedSideEffect {
@@ -154,9 +180,9 @@ class OrderedSideEffect {
154
180
  * @param privateExecutionResult - The result of the private execution.
155
181
  * @param nonceGenerator - A nonce generator for note hashes. According to the protocol rules,
156
182
  * it can either be the first nullifier in the tx or the hash of the initial tx request if there are none.
157
- * @param contractDataProvider - A provider for contract data in order to get function names and debug info.
183
+ * @param contractStore - A provider for contract data in order to get function names and debug info.
158
184
  * @returns The simulated proving result.
159
- */ export async function generateSimulatedProvingResult(privateExecutionResult, nonceGenerator, contractDataProvider) {
185
+ */ export async function generateSimulatedProvingResult(privateExecutionResult, nonceGenerator, contractStore) {
160
186
  const siloedNoteHashes = [];
161
187
  const nullifiers = [];
162
188
  const taggedPrivateLogs = [];
@@ -192,7 +218,7 @@ class OrderedSideEffect {
192
218
  }
193
219
  publicTeardownCallRequest = execution.publicInputs.publicTeardownCallRequest.isEmpty() ? publicTeardownCallRequest : execution.publicInputs.publicTeardownCallRequest;
194
220
  executionSteps.push({
195
- functionName: await contractDataProvider.getDebugFunctionName(execution.publicInputs.callContext.contractAddress, execution.publicInputs.callContext.functionSelector),
221
+ functionName: await contractStore.getDebugFunctionName(execution.publicInputs.callContext.contractAddress, execution.publicInputs.callContext.functionSelector),
196
222
  timings: execution.profileResult?.timings ?? {
197
223
  witgen: 0,
198
224
  oracles: {}
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
3
3
  import type { NoteData } from './oracle/interfaces.js';
4
4
  interface PendingNote {
@@ -11,7 +11,7 @@ interface PendingNote {
11
11
  */
12
12
  export declare class ExecutionNoteCache {
13
13
  #private;
14
- private readonly txRequestHash;
14
+ private readonly protocolNullifier;
15
15
  /**
16
16
  * New notes created in this transaction.
17
17
  * They are pushed to this array in the same order as they are emitted.
@@ -37,15 +37,16 @@ export declare class ExecutionNoteCache {
37
37
  * We don't need to use the tx request hash for nonces if another non revertible nullifier is emitted.
38
38
  * In that case we disable injecting the tx request hash as a nullifier.
39
39
  */
40
- private usedTxRequestHashForNonces;
41
- constructor(txRequestHash: Fr);
40
+ private usedProtocolNullifierForNonces;
41
+ constructor(protocolNullifier: Fr);
42
42
  /**
43
43
  * Enters the revertible phase of the transaction.
44
44
  * @param minRevertibleSideEffectCounter - The counter at which the transaction enters the revertible phase.
45
45
  */
46
46
  setMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter: number): Promise<void>;
47
+ isSideEffectCounterRevertible(sideEffectCounter: number): boolean;
47
48
  finish(): {
48
- usedTxRequestHashForNonces: boolean;
49
+ usedProtocolNullifierForNonces: boolean;
49
50
  };
50
51
  /**
51
52
  * Add a new note to cache.
@@ -70,9 +71,10 @@ export declare class ExecutionNoteCache {
70
71
  * Return notes created up to current point in execution.
71
72
  * If a nullifier for a note in this list is emitted, the note will be deleted.
72
73
  * @param contractAddress - Contract address of the notes.
74
+ * @param owner - Owner of the notes. If undefined, returns all notes regardless of owner.
73
75
  * @param storageSlot - Storage slot of the notes.
74
76
  **/
75
- getNotes(contractAddress: AztecAddress, storageSlot: Fr): NoteData[];
77
+ getNotes(contractAddress: AztecAddress, owner: AztecAddress | undefined, storageSlot: Fr): NoteData[];
76
78
  /**
77
79
  * Check if a note exists in the newNotes array.
78
80
  * @param contractAddress - Contract address of the note.
@@ -90,4 +92,4 @@ export declare class ExecutionNoteCache {
90
92
  recordNullifier(contractAddress: AztecAddress, siloedNullifier: bigint): void;
91
93
  }
92
94
  export {};
93
- //# sourceMappingURL=execution_note_cache.d.ts.map
95
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhlY3V0aW9uX25vdGVfY2FjaGUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdF9mdW5jdGlvbl9zaW11bGF0b3IvZXhlY3V0aW9uX25vdGVfY2FjaGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBR2hFLE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBRXZELFVBQVUsV0FBVztJQUNuQixJQUFJLEVBQUUsUUFBUSxDQUFDO0lBQ2YsT0FBTyxFQUFFLE1BQU0sQ0FBQztJQUNoQixzQkFBc0IsRUFBRSxFQUFFLENBQUM7Q0FDNUI7QUFFRDs7R0FFRztBQUNILHFCQUFhLGtCQUFrQjs7SUFpQ2pCLE9BQU8sQ0FBQyxRQUFRLENBQUMsaUJBQWlCO0lBaEM5Qzs7O09BR0c7SUFDSCxPQUFPLENBQUMsS0FBSyxDQUFxQjtJQUNsQzs7T0FFRztJQUNILE9BQU8sQ0FBQyxPQUFPLENBQXlDO0lBRXhEOzs7O09BSUc7SUFDSCxPQUFPLENBQUMsWUFBWSxDQUF1QztJQUUzRDs7T0FFRztJQUNILE9BQU8sQ0FBQyxhQUFhLENBQTBCO0lBRS9DLE9BQU8sQ0FBQyw4QkFBOEIsQ0FBSztJQUUzQyxPQUFPLENBQUMsaUJBQWlCLENBQVM7SUFFbEM7OztPQUdHO0lBQ0gsT0FBTyxDQUFDLDhCQUE4QixDQUFRO0lBRTlDLFlBQTZCLGlCQUFpQixFQUFFLEVBQUUsRUFBSTtJQUV0RDs7O09BR0c7SUFDVSxpQ0FBaUMsQ0FBQyw4QkFBOEIsRUFBRSxNQUFNLGlCQXFDcEY7SUFFTSw2QkFBNkIsQ0FBQyxpQkFBaUIsRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUt2RTtJQUVNLE1BQU07O01BVVo7SUFFRDs7O09BR0c7SUFDSSxVQUFVLENBQUMsSUFBSSxFQUFFLFFBQVEsRUFBRSxPQUFPLEVBQUUsTUFBTSxRQVNoRDtJQUVEOzs7Ozs7T0FNRztJQUNVLFdBQVcsQ0FBQyxlQUFlLEVBQUUsWUFBWSxFQUFFLGNBQWMsRUFBRSxFQUFFLEVBQUUsUUFBUSxFQUFFLEVBQUUsK0JBeUJ2RjtJQUVEOzs7O09BSUc7SUFDVSxnQkFBZ0IsQ0FBQyxlQUFlLEVBQUUsWUFBWSxFQUFFLGNBQWMsRUFBRSxFQUFFLGlCQUc5RTtJQUVEOzs7Ozs7UUFNSTtJQUNHLFFBQVEsQ0FBQyxlQUFlLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxZQUFZLEdBQUcsU0FBUyxFQUFFLFdBQVcsRUFBRSxFQUFFLGNBTTlGO0lBRUQ7Ozs7O1FBS0k7SUFDRyxlQUFlLENBQUMsZUFBZSxFQUFFLFlBQVksRUFBRSxRQUFRLEVBQUUsRUFBRSxXQUdqRTtJQUVEOzs7T0FHRztJQUNJLGFBQWEsQ0FBQyxlQUFlLEVBQUUsWUFBWSxHQUFHLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FFL0Q7SUFVRCxXQUFXLElBQUksV0FBVyxFQUFFLENBRTNCO0lBRUQsZ0JBQWdCLElBQUksRUFBRSxFQUFFLENBRXZCO0lBRUQsZUFBZSxDQUFDLGVBQWUsRUFBRSxZQUFZLEVBQUUsZUFBZSxFQUFFLE1BQU0sUUFVckU7Q0FDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"execution_note_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_note_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,UAAU,WAAW;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,EAAE,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,kBAAkB;;IAiCjB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAhC1C;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAqB;IAClC;;OAEG;IACH,OAAO,CAAC,OAAO,CAAyC;IAExD;;;;OAIG;IACH,OAAO,CAAC,YAAY,CAAuC;IAE3D;;OAEG;IACH,OAAO,CAAC,aAAa,CAA0B;IAE/C,OAAO,CAAC,8BAA8B,CAAK;IAE3C,OAAO,CAAC,iBAAiB,CAAS;IAElC;;;OAGG;IACH,OAAO,CAAC,0BAA0B,CAAQ;gBAEb,aAAa,EAAE,EAAE;IAE9C;;;OAGG;IACU,iCAAiC,CAAC,8BAA8B,EAAE,MAAM;IAwC9E,MAAM;;;IAWb;;;OAGG;IACI,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM;IAWjD;;;;;;OAMG;IACU,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE;IA2BxF;;;;OAIG;IACU,gBAAgB,CAAC,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE;IAK/E;;;;;QAKI;IACG,QAAQ,CAAC,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE;IAK9D;;;;;QAKI;IACG,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE;IAKlE;;;OAGG;IACI,aAAa,CAAC,eAAe,EAAE,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC;IAYhE,WAAW,IAAI,WAAW,EAAE;IAI5B,gBAAgB,IAAI,EAAE,EAAE;IAIxB,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM;CAWvE"}
1
+ {"version":3,"file":"execution_note_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_note_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,UAAU,WAAW;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,EAAE,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,kBAAkB;;IAiCjB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAhC9C;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAqB;IAClC;;OAEG;IACH,OAAO,CAAC,OAAO,CAAyC;IAExD;;;;OAIG;IACH,OAAO,CAAC,YAAY,CAAuC;IAE3D;;OAEG;IACH,OAAO,CAAC,aAAa,CAA0B;IAE/C,OAAO,CAAC,8BAA8B,CAAK;IAE3C,OAAO,CAAC,iBAAiB,CAAS;IAElC;;;OAGG;IACH,OAAO,CAAC,8BAA8B,CAAQ;IAE9C,YAA6B,iBAAiB,EAAE,EAAE,EAAI;IAEtD;;;OAGG;IACU,iCAAiC,CAAC,8BAA8B,EAAE,MAAM,iBAqCpF;IAEM,6BAA6B,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAKvE;IAEM,MAAM;;MAUZ;IAED;;;OAGG;IACI,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,QAShD;IAED;;;;;;OAMG;IACU,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,+BAyBvF;IAED;;;;OAIG;IACU,gBAAgB,CAAC,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE,iBAG9E;IAED;;;;;;QAMI;IACG,QAAQ,CAAC,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,SAAS,EAAE,WAAW,EAAE,EAAE,cAM9F;IAED;;;;;QAKI;IACG,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,WAGjE;IAED;;;OAGG;IACI,aAAa,CAAC,eAAe,EAAE,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC,CAE/D;IAUD,WAAW,IAAI,WAAW,EAAE,CAE3B;IAED,gBAAgB,IAAI,EAAE,EAAE,CAEvB;IAED,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,QAUrE;CACF"}
@@ -1,9 +1,9 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifier } from '@aztec/stdlib/hash';
3
3
  /**
4
4
  * Data that's accessible by all the function calls in an execution.
5
5
  */ export class ExecutionNoteCache {
6
- txRequestHash;
6
+ protocolNullifier;
7
7
  /**
8
8
  * New notes created in this transaction.
9
9
  * They are pushed to this array in the same order as they are emitted.
@@ -24,16 +24,16 @@ import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifie
24
24
  /**
25
25
  * We don't need to use the tx request hash for nonces if another non revertible nullifier is emitted.
26
26
  * In that case we disable injecting the tx request hash as a nullifier.
27
- */ usedTxRequestHashForNonces;
28
- constructor(txRequestHash){
29
- this.txRequestHash = txRequestHash;
27
+ */ usedProtocolNullifierForNonces;
28
+ constructor(protocolNullifier){
29
+ this.protocolNullifier = protocolNullifier;
30
30
  this.notes = [];
31
31
  this.noteMap = new Map();
32
32
  this.nullifierMap = new Map();
33
33
  this.allNullifiers = new Set();
34
34
  this.minRevertibleSideEffectCounter = 0;
35
35
  this.inRevertiblePhase = false;
36
- this.usedTxRequestHashForNonces = true;
36
+ this.usedProtocolNullifierForNonces = true;
37
37
  }
38
38
  /**
39
39
  * Enters the revertible phase of the transaction.
@@ -44,11 +44,11 @@ import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifie
44
44
  }
45
45
  this.inRevertiblePhase = true;
46
46
  this.minRevertibleSideEffectCounter = minRevertibleSideEffectCounter;
47
- let nonceGenerator = this.txRequestHash;
47
+ let nonceGenerator = this.protocolNullifier;
48
48
  const nullifiers = this.getAllNullifiers();
49
49
  if (nullifiers.length > 0) {
50
50
  nonceGenerator = new Fr(nullifiers[0]);
51
- this.usedTxRequestHashForNonces = false;
51
+ this.usedProtocolNullifierForNonces = false;
52
52
  }
53
53
  // The existing pending notes are all non-revertible.
54
54
  // They cannot be squashed by nullifiers emitted after minRevertibleSideEffectCounter is set.
@@ -71,14 +71,21 @@ import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifie
71
71
  this.noteMap = new Map();
72
72
  updatedNotes.forEach((n)=>this.#addNote(n));
73
73
  }
74
+ isSideEffectCounterRevertible(sideEffectCounter) {
75
+ if (!this.inRevertiblePhase) {
76
+ return false;
77
+ }
78
+ return sideEffectCounter >= this.minRevertibleSideEffectCounter;
79
+ }
74
80
  finish() {
75
- // If we never entered the revertible phase, we need to use the tx request hash as a nonce for the notes if no nullifiers have been emitted.
81
+ // If we never entered the revertible phase, we need to use the protocol nullifier to compute the nonces for the
82
+ // notes if no nullifiers have been emitted.
76
83
  if (!this.inRevertiblePhase) {
77
- this.usedTxRequestHashForNonces = this.getAllNullifiers().length === 0;
84
+ this.usedProtocolNullifierForNonces = this.getAllNullifiers().length === 0;
78
85
  }
79
86
  // If we entered the revertible phase, the nonce generator was decided based on wether or not a nullifier was emitted before entering.
80
87
  return {
81
- usedTxRequestHashForNonces: this.usedTxRequestHashForNonces
88
+ usedProtocolNullifierForNonces: this.usedProtocolNullifierForNonces
82
89
  };
83
90
  }
84
91
  /**
@@ -137,10 +144,11 @@ import { computeNoteHashNonce, computeUniqueNoteHash, siloNoteHash, siloNullifie
137
144
  * Return notes created up to current point in execution.
138
145
  * If a nullifier for a note in this list is emitted, the note will be deleted.
139
146
  * @param contractAddress - Contract address of the notes.
147
+ * @param owner - Owner of the notes. If undefined, returns all notes regardless of owner.
140
148
  * @param storageSlot - Storage slot of the notes.
141
- **/ getNotes(contractAddress, storageSlot) {
149
+ **/ getNotes(contractAddress, owner, storageSlot) {
142
150
  const notes = this.noteMap.get(contractAddress.toBigInt()) ?? [];
143
- return notes.filter((n)=>n.note.storageSlot.equals(storageSlot)).map((n)=>n.note);
151
+ return notes.filter((n)=>owner === undefined || n.note.owner.equals(owner)).filter((n)=>n.note.storageSlot.equals(storageSlot)).map((n)=>n.note);
144
152
  }
145
153
  /**
146
154
  * Check if a note exists in the newNotes array.
@@ -9,8 +9,8 @@ export declare class ExecutionTaggingIndexCache {
9
9
  getLastUsedIndex(secret: DirectionalAppTaggingSecret): number | undefined;
10
10
  setLastUsedIndex(secret: DirectionalAppTaggingSecret, index: number): void;
11
11
  /**
12
- * Returns the pre tags that were used in this execution (and that need to be stored in the db).
12
+ * Returns the pre-tags that were used in this execution (and that need to be stored in the db).
13
13
  */
14
14
  getUsedPreTags(): PreTag[];
15
15
  }
16
- //# sourceMappingURL=execution_tagging_index_cache.d.ts.map
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhlY3V0aW9uX3RhZ2dpbmdfaW5kZXhfY2FjaGUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdF9mdW5jdGlvbl9zaW11bGF0b3IvZXhlY3V0aW9uX3RhZ2dpbmdfaW5kZXhfY2FjaGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLDJCQUEyQixFQUFFLEtBQUssTUFBTSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFFOUU7Ozs7R0FJRztBQUNILHFCQUFhLDBCQUEwQjtJQUNyQyxPQUFPLENBQUMsZUFBZSxDQUFrQztJQUVsRCxnQkFBZ0IsQ0FBQyxNQUFNLEVBQUUsMkJBQTJCLEdBQUcsTUFBTSxHQUFHLFNBQVMsQ0FFL0U7SUFFTSxnQkFBZ0IsQ0FBQyxNQUFNLEVBQUUsMkJBQTJCLEVBQUUsS0FBSyxFQUFFLE1BQU0sUUFNekU7SUFFRDs7T0FFRztJQUNJLGNBQWMsSUFBSSxNQUFNLEVBQUUsQ0FLaEM7Q0FDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"execution_tagging_index_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_tagging_index_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE9E;;;;GAIG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,eAAe,CAAkC;IAElD,gBAAgB,CAAC,MAAM,EAAE,2BAA2B,GAAG,MAAM,GAAG,SAAS;IAIzE,gBAAgB,CAAC,MAAM,EAAE,2BAA2B,EAAE,KAAK,EAAE,MAAM;IAQ1E;;OAEG;IACI,cAAc,IAAI,MAAM,EAAE;CAMlC"}
1
+ {"version":3,"file":"execution_tagging_index_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/execution_tagging_index_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE9E;;;;GAIG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,eAAe,CAAkC;IAElD,gBAAgB,CAAC,MAAM,EAAE,2BAA2B,GAAG,MAAM,GAAG,SAAS,CAE/E;IAEM,gBAAgB,CAAC,MAAM,EAAE,2BAA2B,EAAE,KAAK,EAAE,MAAM,QAMzE;IAED;;OAEG;IACI,cAAc,IAAI,MAAM,EAAE,CAKhC;CACF"}
@@ -16,7 +16,7 @@ import { DirectionalAppTaggingSecret } from '@aztec/stdlib/logs';
16
16
  this.taggingIndexMap.set(secret.toString(), index);
17
17
  }
18
18
  /**
19
- * Returns the pre tags that were used in this execution (and that need to be stored in the db).
19
+ * Returns the pre-tags that were used in this execution (and that need to be stored in the db).
20
20
  */ getUsedPreTags() {
21
21
  return Array.from(this.taggingIndexMap.entries()).map(([secret, index])=>({
22
22
  secret: DirectionalAppTaggingSecret.fromString(secret),
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { HashedValues } from '@aztec/stdlib/tx';
3
3
  /**
4
4
  * A cache for hashed values (arguments, returns) during transaction execution.
@@ -25,4 +25,4 @@ export declare class HashedValuesCache {
25
25
  */
26
26
  store(values: Fr[], hash: Fr): void;
27
27
  }
28
- //# sourceMappingURL=hashed_values_cache.d.ts.map
28
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFzaGVkX3ZhbHVlc19jYWNoZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9oYXNoZWRfdmFsdWVzX2NhY2hlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFaEQ7O0dBRUc7QUFDSCxxQkFBYSxpQkFBaUI7SUFDNUIsT0FBTyxDQUFDLEtBQUssQ0FBb0I7SUFFakMsWUFBWSxnQkFBZ0IsR0FBRSxZQUFZLEVBQU8sRUFLaEQ7SUFFRDs7OztPQUlHO0lBQ0gsT0FBYyxNQUFNLENBQUMsZ0JBQWdCLEdBQUUsWUFBWSxFQUFPLHFCQUV6RDtJQUVEOzs7O09BSUc7SUFDSSxXQUFXLENBQUMsSUFBSSxFQUFFLEVBQUUsR0FBRyxFQUFFLEVBQUUsR0FBRyxTQUFTLENBTTdDO0lBRUQ7Ozs7T0FJRztJQUNJLEtBQUssQ0FBQyxNQUFNLEVBQUUsRUFBRSxFQUFFLEVBQUUsSUFBSSxFQUFFLEVBQUUsUUFFbEM7Q0FDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"hashed_values_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/hashed_values_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,KAAK,CAAoB;gBAErB,gBAAgB,GAAE,YAAY,EAAO;IAOjD;;;;OAIG;WACW,MAAM,CAAC,gBAAgB,GAAE,YAAY,EAAO;IAI1D;;;;OAIG;IACI,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,SAAS;IAQ9C;;;;OAIG;IACI,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;CAGpC"}
1
+ {"version":3,"file":"hashed_values_cache.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/hashed_values_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,KAAK,CAAoB;IAEjC,YAAY,gBAAgB,GAAE,YAAY,EAAO,EAKhD;IAED;;;;OAIG;IACH,OAAc,MAAM,CAAC,gBAAgB,GAAE,YAAY,EAAO,qBAEzD;IAED;;;;OAIG;IACI,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,SAAS,CAM7C;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,QAElC;CACF"}
@@ -11,4 +11,4 @@ export { executePrivateFunction, extractPrivateCircuitPublicInputs } from './ora
11
11
  export { generateSimulatedProvingResult } from './contract_function_simulator.js';
12
12
  export { packAsRetrievedNote } from './oracle/note_packing_utils.js';
13
13
  export { UtilityContext } from './noir-structs/utility_context.js';
14
- //# sourceMappingURL=index.d.ts.map
14
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cmFjdF9mdW5jdGlvbl9zaW11bGF0b3IvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDL0QsT0FBTyxFQUFFLDBCQUEwQixFQUFFLE1BQU0sb0NBQW9DLENBQUM7QUFDaEYsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDN0QsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzVDLFlBQVksRUFBRSxRQUFRLEVBQUUsV0FBVyxFQUFFLHVCQUF1QixFQUFFLHVCQUF1QixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDdEgsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sd0NBQXdDLENBQUM7QUFDakYsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sc0NBQXNDLENBQUM7QUFDOUUsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sc0NBQXNDLENBQUM7QUFDOUUsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQzVDLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxpQ0FBaUMsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQzFHLE9BQU8sRUFBRSw4QkFBOEIsRUFBRSxNQUFNLGtDQUFrQyxDQUFDO0FBQ2xGLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3JFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQyJ9
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { FieldReader } from '@aztec/foundation/serialize';
3
3
  import { EventSelector } from '@aztec/stdlib/abi';
4
4
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
@@ -17,4 +17,4 @@ export declare class EventValidationRequest {
17
17
  constructor(contractAddress: AztecAddress, eventTypeId: EventSelector, serializedEvent: Fr[], eventCommitment: Fr, txHash: TxHash, recipient: AztecAddress);
18
18
  static fromFields(fields: Fr[] | FieldReader): EventValidationRequest;
19
19
  }
20
- //# sourceMappingURL=event_validation_request.d.ts.map
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRfdmFsaWRhdGlvbl9yZXF1ZXN0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL25vaXItc3RydWN0cy9ldmVudF92YWxpZGF0aW9uX3JlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDbEQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQzNELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUsxQzs7O0dBR0c7QUFDSCxxQkFBYSxzQkFBc0I7SUFFeEIsZUFBZSxFQUFFLFlBQVk7SUFDN0IsV0FBVyxFQUFFLGFBQWE7SUFDMUIsZUFBZSxFQUFFLEVBQUUsRUFBRTtJQUNyQixlQUFlLEVBQUUsRUFBRTtJQUNuQixNQUFNLEVBQUUsTUFBTTtJQUNkLFNBQVMsRUFBRSxZQUFZO0lBTmhDLFlBQ1MsZUFBZSxFQUFFLFlBQVksRUFDN0IsV0FBVyxFQUFFLGFBQWEsRUFDMUIsZUFBZSxFQUFFLEVBQUUsRUFBRSxFQUNyQixlQUFlLEVBQUUsRUFBRSxFQUNuQixNQUFNLEVBQUUsTUFBTSxFQUNkLFNBQVMsRUFBRSxZQUFZLEVBQzVCO0lBRUosTUFBTSxDQUFDLFVBQVUsQ0FBQyxNQUFNLEVBQUUsRUFBRSxFQUFFLEdBQUcsV0FBVyxHQUFHLHNCQUFzQixDQXNCcEU7Q0FDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"event_validation_request.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/event_validation_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAK1C;;;GAGG;AACH,qBAAa,sBAAsB;IAExB,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,EAAE,EAAE;IACrB,eAAe,EAAE,EAAE;IACnB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,YAAY;gBALvB,eAAe,EAAE,YAAY,EAC7B,WAAW,EAAE,aAAa,EAC1B,eAAe,EAAE,EAAE,EAAE,EACrB,eAAe,EAAE,EAAE,EACnB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,YAAY;IAGhC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,sBAAsB;CAuBtE"}
1
+ {"version":3,"file":"event_validation_request.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/event_validation_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAK1C;;;GAGG;AACH,qBAAa,sBAAsB;IAExB,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,EAAE,EAAE;IACrB,eAAe,EAAE,EAAE;IACnB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,YAAY;IANhC,YACS,eAAe,EAAE,YAAY,EAC7B,WAAW,EAAE,aAAa,EAC1B,eAAe,EAAE,EAAE,EAAE,EACrB,eAAe,EAAE,EAAE,EACnB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,YAAY,EAC5B;IAEJ,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,sBAAsB,CAsBpE;CACF"}
@@ -1,15 +1,16 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { FieldReader } from '@aztec/foundation/serialize';
3
3
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
+ import { Tag } from '@aztec/stdlib/logs';
4
5
  /**
5
6
  * Intermediate struct used to perform batch log retrieval by PXE. The `utilityBulkRetrieveLogs` oracle expects values of this
6
7
  * type to be stored in a `CapsuleArray`.
7
8
  */
8
9
  export declare class LogRetrievalRequest {
9
10
  contractAddress: AztecAddress;
10
- unsiloedTag: Fr;
11
- constructor(contractAddress: AztecAddress, unsiloedTag: Fr);
11
+ tag: Tag;
12
+ constructor(contractAddress: AztecAddress, tag: Tag);
12
13
  toFields(): Fr[];
13
14
  static fromFields(fields: Fr[] | FieldReader): LogRetrievalRequest;
14
15
  }
15
- //# sourceMappingURL=log_retrieval_request.d.ts.map
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nX3JldHJpZXZhbF9yZXF1ZXN0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL25vaXItc3RydWN0cy9sb2dfcmV0cmlldmFsX3JlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDM0QsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRXpDOzs7R0FHRztBQUNILHFCQUFhLG1CQUFtQjtJQUVyQixlQUFlLEVBQUUsWUFBWTtJQUM3QixHQUFHLEVBQUUsR0FBRztJQUZqQixZQUNTLGVBQWUsRUFBRSxZQUFZLEVBQzdCLEdBQUcsRUFBRSxHQUFHLEVBQ2I7SUFFSixRQUFRLElBQUksRUFBRSxFQUFFLENBRWY7SUFFRCxNQUFNLENBQUMsVUFBVSxDQUFDLE1BQU0sRUFBRSxFQUFFLEVBQUUsR0FBRyxXQUFXLEdBQUcsbUJBQW1CLENBT2pFO0NBQ0YifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"log_retrieval_request.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/log_retrieval_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D;;;GAGG;AACH,qBAAa,mBAAmB;IAErB,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,EAAE;gBADf,eAAe,EAAE,YAAY,EAC7B,WAAW,EAAE,EAAE;IAGxB,QAAQ,IAAI,EAAE,EAAE;IAIhB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,mBAAmB;CAQnE"}
1
+ {"version":3,"file":"log_retrieval_request.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/log_retrieval_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAEzC;;;GAGG;AACH,qBAAa,mBAAmB;IAErB,eAAe,EAAE,YAAY;IAC7B,GAAG,EAAE,GAAG;IAFjB,YACS,eAAe,EAAE,YAAY,EAC7B,GAAG,EAAE,GAAG,EACb;IAEJ,QAAQ,IAAI,EAAE,EAAE,CAEf;IAED,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,mBAAmB,CAOjE;CACF"}
@@ -1,25 +1,26 @@
1
1
  import { FieldReader } from '@aztec/foundation/serialize';
2
2
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
3
+ import { Tag } from '@aztec/stdlib/logs';
3
4
  /**
4
5
  * Intermediate struct used to perform batch log retrieval by PXE. The `utilityBulkRetrieveLogs` oracle expects values of this
5
6
  * type to be stored in a `CapsuleArray`.
6
7
  */ export class LogRetrievalRequest {
7
8
  contractAddress;
8
- unsiloedTag;
9
- constructor(contractAddress, unsiloedTag){
9
+ tag;
10
+ constructor(contractAddress, tag){
10
11
  this.contractAddress = contractAddress;
11
- this.unsiloedTag = unsiloedTag;
12
+ this.tag = tag;
12
13
  }
13
14
  toFields() {
14
15
  return [
15
16
  this.contractAddress.toField(),
16
- this.unsiloedTag
17
+ this.tag.value
17
18
  ];
18
19
  }
19
20
  static fromFields(fields) {
20
21
  const reader = FieldReader.asReader(fields);
21
22
  const contractAddress = AztecAddress.fromField(reader.readField());
22
- const unsiloedTag = reader.readField();
23
- return new LogRetrievalRequest(contractAddress, unsiloedTag);
23
+ const tag = new Tag(reader.readField());
24
+ return new LogRetrievalRequest(contractAddress, tag);
24
25
  }
25
26
  }
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import type { TxHash } from '@aztec/stdlib/tx';
3
3
  /**
4
4
  * Intermediate struct used to perform batch log retrieval by PXE. The `utilityBulkRetrieveLogs` oracle stores values of this
@@ -12,6 +12,6 @@ export declare class LogRetrievalResponse {
12
12
  constructor(logPayload: Fr[], txHash: TxHash, uniqueNoteHashesInTx: Fr[], firstNullifierInTx: Fr);
13
13
  toFields(): Fr[];
14
14
  static toEmptyFields(): Fr[];
15
- static toSerializedOption(response?: LogRetrievalResponse): Fr[];
15
+ static toSerializedOption(response: LogRetrievalResponse | null): Fr[];
16
16
  }
17
- //# sourceMappingURL=log_retrieval_response.d.ts.map
17
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nX3JldHJpZXZhbF9yZXNwb25zZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9ub2lyLXN0cnVjdHMvbG9nX3JldHJpZXZhbF9yZXNwb25zZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEQsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFPL0M7OztHQUdHO0FBQ0gscUJBQWEsb0JBQW9CO0lBRXRCLFVBQVUsRUFBRSxFQUFFLEVBQUU7SUFDaEIsTUFBTSxFQUFFLE1BQU07SUFDZCxvQkFBb0IsRUFBRSxFQUFFLEVBQUU7SUFDMUIsa0JBQWtCLEVBQUUsRUFBRTtJQUovQixZQUNTLFVBQVUsRUFBRSxFQUFFLEVBQUUsRUFDaEIsTUFBTSxFQUFFLE1BQU0sRUFDZCxvQkFBb0IsRUFBRSxFQUFFLEVBQUUsRUFDMUIsa0JBQWtCLEVBQUUsRUFBRSxFQUMzQjtJQUVKLFFBQVEsSUFBSSxFQUFFLEVBQUUsQ0FTZjtJQUVELE1BQU0sQ0FBQyxhQUFhLElBQUksRUFBRSxFQUFFLENBUzNCO0lBRUQsTUFBTSxDQUFDLGtCQUFrQixDQUFDLFFBQVEsRUFBRSxvQkFBb0IsR0FBRyxJQUFJLEdBQUcsRUFBRSxFQUFFLENBTXJFO0NBQ0YifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"log_retrieval_response.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/log_retrieval_response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAO/C;;;GAGG;AACH,qBAAa,oBAAoB;IAEtB,UAAU,EAAE,EAAE,EAAE;IAChB,MAAM,EAAE,MAAM;IACd,oBAAoB,EAAE,EAAE,EAAE;IAC1B,kBAAkB,EAAE,EAAE;gBAHtB,UAAU,EAAE,EAAE,EAAE,EAChB,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,EAAE,EAAE,EAC1B,kBAAkB,EAAE,EAAE;IAG/B,QAAQ,IAAI,EAAE,EAAE;IAWhB,MAAM,CAAC,aAAa,IAAI,EAAE,EAAE;IAW5B,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,oBAAoB,GAAG,EAAE,EAAE;CAOjE"}
1
+ {"version":3,"file":"log_retrieval_response.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/log_retrieval_response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAO/C;;;GAGG;AACH,qBAAa,oBAAoB;IAEtB,UAAU,EAAE,EAAE,EAAE;IAChB,MAAM,EAAE,MAAM;IACd,oBAAoB,EAAE,EAAE,EAAE;IAC1B,kBAAkB,EAAE,EAAE;IAJ/B,YACS,UAAU,EAAE,EAAE,EAAE,EAChB,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,EAAE,EAAE,EAC1B,kBAAkB,EAAE,EAAE,EAC3B;IAEJ,QAAQ,IAAI,EAAE,EAAE,CASf;IAED,MAAM,CAAC,aAAa,IAAI,EAAE,EAAE,CAS3B;IAED,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,GAAG,EAAE,EAAE,CAMrE;CACF"}
@@ -1,6 +1,6 @@
1
1
  import { MAX_NOTE_HASHES_PER_TX, PRIVATE_LOG_CIPHERTEXT_LEN } from '@aztec/constants';
2
2
  import { range } from '@aztec/foundation/array';
3
- import { Fr } from '@aztec/foundation/fields';
3
+ import { Fr } from '@aztec/foundation/curves/bn254';
4
4
  import { MAX_NOTE_PACKED_LEN } from './note_validation_request.js';
5
5
  const MAX_PUBLIC_LOG_LEN_FOR_NOTE_COMPLETION = MAX_NOTE_PACKED_LEN;
6
6
  const MAX_LOG_CONTENT_LEN = Math.max(MAX_PUBLIC_LOG_LEN_FOR_NOTE_COMPLETION, PRIVATE_LOG_CIPHERTEXT_LEN);
@@ -1,22 +1,24 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { FieldReader } from '@aztec/foundation/serialize';
3
3
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import { TxHash } from '@aztec/stdlib/tx';
5
- export declare const MAX_NOTE_PACKED_LEN = 12;
5
+ export declare const MAX_NOTE_PACKED_LEN = 10;
6
6
  /**
7
7
  * Intermediate struct used to perform batch note validation by PXE. The `utilityValidateEnqueuedNotesAndEvents` oracle
8
8
  * expects for values of this type to be stored in a `CapsuleArray`.
9
9
  */
10
10
  export declare class NoteValidationRequest {
11
11
  contractAddress: AztecAddress;
12
+ owner: AztecAddress;
12
13
  storageSlot: Fr;
14
+ randomness: Fr;
13
15
  noteNonce: Fr;
14
16
  content: Fr[];
15
17
  noteHash: Fr;
16
18
  nullifier: Fr;
17
19
  txHash: TxHash;
18
20
  recipient: AztecAddress;
19
- constructor(contractAddress: AztecAddress, storageSlot: Fr, noteNonce: Fr, content: Fr[], noteHash: Fr, nullifier: Fr, txHash: TxHash, recipient: AztecAddress);
21
+ constructor(contractAddress: AztecAddress, owner: AztecAddress, storageSlot: Fr, randomness: Fr, noteNonce: Fr, content: Fr[], noteHash: Fr, nullifier: Fr, txHash: TxHash, recipient: AztecAddress);
20
22
  static fromFields(fields: Fr[] | FieldReader): NoteValidationRequest;
21
23
  }
22
- //# sourceMappingURL=note_validation_request.d.ts.map
24
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZV92YWxpZGF0aW9uX3JlcXVlc3QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb250cmFjdF9mdW5jdGlvbl9zaW11bGF0b3Ivbm9pci1zdHJ1Y3RzL25vdGVfdmFsaWRhdGlvbl9yZXF1ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDMUQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQzNELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUcxQyxlQUFPLE1BQU0sbUJBQW1CLEtBQUssQ0FBQztBQUV0Qzs7O0dBR0c7QUFDSCxxQkFBYSxxQkFBcUI7SUFFdkIsZUFBZSxFQUFFLFlBQVk7SUFDN0IsS0FBSyxFQUFFLFlBQVk7SUFDbkIsV0FBVyxFQUFFLEVBQUU7SUFDZixVQUFVLEVBQUUsRUFBRTtJQUNkLFNBQVMsRUFBRSxFQUFFO0lBQ2IsT0FBTyxFQUFFLEVBQUUsRUFBRTtJQUNiLFFBQVEsRUFBRSxFQUFFO0lBQ1osU0FBUyxFQUFFLEVBQUU7SUFDYixNQUFNLEVBQUUsTUFBTTtJQUNkLFNBQVMsRUFBRSxZQUFZO0lBVmhDLFlBQ1MsZUFBZSxFQUFFLFlBQVksRUFDN0IsS0FBSyxFQUFFLFlBQVksRUFDbkIsV0FBVyxFQUFFLEVBQUUsRUFDZixVQUFVLEVBQUUsRUFBRSxFQUNkLFNBQVMsRUFBRSxFQUFFLEVBQ2IsT0FBTyxFQUFFLEVBQUUsRUFBRSxFQUNiLFFBQVEsRUFBRSxFQUFFLEVBQ1osU0FBUyxFQUFFLEVBQUUsRUFDYixNQUFNLEVBQUUsTUFBTSxFQUNkLFNBQVMsRUFBRSxZQUFZLEVBQzVCO0lBRUosTUFBTSxDQUFDLFVBQVUsQ0FBQyxNQUFNLEVBQUUsRUFBRSxFQUFFLEdBQUcsV0FBVyxHQUFHLHFCQUFxQixDQW9DbkU7Q0FDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"note_validation_request.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/note_validation_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC;;;GAGG;AACH,qBAAa,qBAAqB;IAEvB,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,EAAE;IACf,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,SAAS,EAAE,EAAE;IACb,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,YAAY;gBAPvB,eAAe,EAAE,YAAY,EAC7B,WAAW,EAAE,EAAE,EACf,SAAS,EAAE,EAAE,EACb,OAAO,EAAE,EAAE,EAAE,EACb,QAAQ,EAAE,EAAE,EACZ,SAAS,EAAE,EAAE,EACb,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,YAAY;IAGhC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,qBAAqB;CA2BrE"}
1
+ {"version":3,"file":"note_validation_request.d.ts","sourceRoot":"","sources":["../../../src/contract_function_simulator/noir-structs/note_validation_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC;;;GAGG;AACH,qBAAa,qBAAqB;IAEvB,eAAe,EAAE,YAAY;IAC7B,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,SAAS,EAAE,EAAE;IACb,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,YAAY;IAVhC,YACS,eAAe,EAAE,YAAY,EAC7B,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,EAAE,EACf,UAAU,EAAE,EAAE,EACd,SAAS,EAAE,EAAE,EACb,OAAO,EAAE,EAAE,EAAE,EACb,QAAQ,EAAE,EAAE,EACZ,SAAS,EAAE,EAAE,EACb,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,YAAY,EAC5B;IAEJ,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW,GAAG,qBAAqB,CAoCnE;CACF"}
@@ -2,22 +2,26 @@ import { FieldReader } from '@aztec/foundation/serialize';
2
2
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
3
3
  import { TxHash } from '@aztec/stdlib/tx';
4
4
  // TODO(#14617): should we compute this from constants? This value is aztec-nr specific.
5
- export const MAX_NOTE_PACKED_LEN = 12;
5
+ export const MAX_NOTE_PACKED_LEN = 10;
6
6
  /**
7
7
  * Intermediate struct used to perform batch note validation by PXE. The `utilityValidateEnqueuedNotesAndEvents` oracle
8
8
  * expects for values of this type to be stored in a `CapsuleArray`.
9
9
  */ export class NoteValidationRequest {
10
10
  contractAddress;
11
+ owner;
11
12
  storageSlot;
13
+ randomness;
12
14
  noteNonce;
13
15
  content;
14
16
  noteHash;
15
17
  nullifier;
16
18
  txHash;
17
19
  recipient;
18
- constructor(contractAddress, storageSlot, noteNonce, content, noteHash, nullifier, txHash, recipient){
20
+ constructor(contractAddress, owner, storageSlot, randomness, noteNonce, content, noteHash, nullifier, txHash, recipient){
19
21
  this.contractAddress = contractAddress;
22
+ this.owner = owner;
20
23
  this.storageSlot = storageSlot;
24
+ this.randomness = randomness;
21
25
  this.noteNonce = noteNonce;
22
26
  this.content = content;
23
27
  this.noteHash = noteHash;
@@ -28,7 +32,9 @@ export const MAX_NOTE_PACKED_LEN = 12;
28
32
  static fromFields(fields) {
29
33
  const reader = FieldReader.asReader(fields);
30
34
  const contractAddress = AztecAddress.fromField(reader.readField());
35
+ const owner = AztecAddress.fromField(reader.readField());
31
36
  const storageSlot = reader.readField();
37
+ const randomness = reader.readField();
32
38
  const noteNonce = reader.readField();
33
39
  const contentStorage = reader.readFieldArray(MAX_NOTE_PACKED_LEN);
34
40
  const contentLen = reader.readField().toNumber();
@@ -37,6 +43,9 @@ export const MAX_NOTE_PACKED_LEN = 12;
37
43
  const nullifier = reader.readField();
38
44
  const txHash = TxHash.fromField(reader.readField());
39
45
  const recipient = AztecAddress.fromField(reader.readField());
40
- return new NoteValidationRequest(contractAddress, storageSlot, noteNonce, content, noteHash, nullifier, txHash, recipient);
46
+ if (reader.remainingFields() !== 0) {
47
+ throw new Error(`Error converting array of fields to NoteValidationRequest. Hint: check that MAX_NOTE_PACKED_LEN is consistent with private_notes::MAX_NOTE_PACKED_LEN in Aztec-nr.`);
48
+ }
49
+ return new NoteValidationRequest(contractAddress, owner, storageSlot, randomness, noteNonce, content, noteHash, nullifier, txHash, recipient);
41
50
  }
42
51
  }
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import type { FieldsOf } from '@aztec/foundation/types';
3
3
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import type { UInt64 } from '@aztec/stdlib/types';
@@ -19,4 +19,4 @@ export declare class UtilityContext {
19
19
  */
20
20
  toNoirRepresentation(): (string | string[])[];
21
21
  }
22
- //# sourceMappingURL=utility_context.d.ts.map
22
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbGl0eV9jb250ZXh0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29udHJhY3RfZnVuY3Rpb25fc2ltdWxhdG9yL25vaXItc3RydWN0cy91dGlsaXR5X2NvbnRleHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQ3hELE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBRWxEOztHQUVHO0FBQ0gscUJBQWEsY0FBYzthQUVQLFdBQVcsRUFBRSxNQUFNO2FBQ25CLFNBQVMsRUFBRSxNQUFNO2FBQ2pCLGVBQWUsRUFBRSxZQUFZO2FBQzdCLE9BQU8sRUFBRSxFQUFFO2FBQ1gsT0FBTyxFQUFFLEVBQUU7SUFMN0IsT0FBTyxlQU1IO0lBRUosTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsUUFBUSxDQUFDLGNBQWMsQ0FBQyxrQkFRM0M7SUFFRDs7O09BR0c7SUFDSSxvQkFBb0IsSUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLEVBQUUsQ0FBQyxFQUFFLENBU25EO0NBQ0YifQ==