@aztec/pxe 0.0.0-test.1 → 0.0.1-commit.5476d83

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 (328) hide show
  1. package/README.md +5 -5
  2. package/dest/bin/check_oracle_version.d.ts +2 -0
  3. package/dest/bin/check_oracle_version.d.ts.map +1 -0
  4. package/dest/bin/check_oracle_version.js +39 -0
  5. package/dest/config/index.d.ts +11 -24
  6. package/dest/config/index.d.ts.map +1 -1
  7. package/dest/config/index.js +18 -33
  8. package/dest/config/package_info.d.ts +1 -1
  9. package/dest/config/package_info.js +1 -1
  10. package/dest/contract_function_simulator/contract_function_simulator.d.ts +56 -0
  11. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -0
  12. package/dest/contract_function_simulator/contract_function_simulator.js +300 -0
  13. package/dest/contract_function_simulator/execution_data_provider.d.ts +265 -0
  14. package/dest/contract_function_simulator/execution_data_provider.d.ts.map +1 -0
  15. package/dest/contract_function_simulator/execution_data_provider.js +14 -0
  16. package/dest/contract_function_simulator/execution_note_cache.d.ts +94 -0
  17. package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -0
  18. package/dest/contract_function_simulator/execution_note_cache.js +190 -0
  19. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +16 -0
  20. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -0
  21. package/dest/contract_function_simulator/execution_tagging_index_cache.js +26 -0
  22. package/dest/contract_function_simulator/hashed_values_cache.d.ts +28 -0
  23. package/dest/contract_function_simulator/hashed_values_cache.d.ts.map +1 -0
  24. package/dest/contract_function_simulator/hashed_values_cache.js +36 -0
  25. package/dest/contract_function_simulator/index.d.ts +14 -0
  26. package/dest/contract_function_simulator/index.d.ts.map +1 -0
  27. package/dest/contract_function_simulator/index.js +12 -0
  28. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +20 -0
  29. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -0
  30. package/dest/contract_function_simulator/noir-structs/event_validation_request.js +37 -0
  31. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +15 -0
  32. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts.map +1 -0
  33. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +25 -0
  34. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +17 -0
  35. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -0
  36. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +65 -0
  37. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +23 -0
  38. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -0
  39. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +48 -0
  40. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +22 -0
  41. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -0
  42. package/dest/contract_function_simulator/noir-structs/utility_context.js +33 -0
  43. package/dest/contract_function_simulator/oracle/index.d.ts +14 -0
  44. package/dest/contract_function_simulator/oracle/index.d.ts.map +1 -0
  45. package/dest/contract_function_simulator/oracle/index.js +2 -0
  46. package/dest/contract_function_simulator/oracle/interfaces.d.ts +100 -0
  47. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -0
  48. package/dest/contract_function_simulator/oracle/interfaces.js +4 -0
  49. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +17 -0
  50. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -0
  51. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.js +24 -0
  52. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +24 -0
  53. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -0
  54. package/dest/contract_function_simulator/oracle/note_packing_utils.js +50 -0
  55. package/dest/contract_function_simulator/oracle/oracle.d.ts +58 -0
  56. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -0
  57. package/dest/contract_function_simulator/oracle/oracle.js +333 -0
  58. package/dest/contract_function_simulator/oracle/private_execution.d.ts +48 -0
  59. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -0
  60. package/dest/contract_function_simulator/oracle/private_execution.js +123 -0
  61. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +231 -0
  62. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -0
  63. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +428 -0
  64. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +153 -0
  65. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -0
  66. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +265 -0
  67. package/dest/contract_function_simulator/pick_notes.d.ts +85 -0
  68. package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -0
  69. package/dest/contract_function_simulator/pick_notes.js +51 -0
  70. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +6 -0
  71. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -0
  72. package/dest/contract_function_simulator/proxied_contract_data_source.js +62 -0
  73. package/dest/contract_function_simulator/proxied_node.d.ts +9 -0
  74. package/dest/contract_function_simulator/proxied_node.d.ts.map +1 -0
  75. package/dest/contract_function_simulator/proxied_node.js +27 -0
  76. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts +122 -0
  77. package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +1 -0
  78. package/dest/contract_function_simulator/pxe_oracle_interface.js +694 -0
  79. package/dest/entrypoints/client/bundle/index.d.ts +5 -3
  80. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  81. package/dest/entrypoints/client/bundle/index.js +3 -2
  82. package/dest/entrypoints/client/bundle/utils.d.ts +10 -10
  83. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
  84. package/dest/entrypoints/client/bundle/utils.js +18 -12
  85. package/dest/entrypoints/client/lazy/index.d.ts +5 -3
  86. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  87. package/dest/entrypoints/client/lazy/index.js +3 -2
  88. package/dest/entrypoints/client/lazy/utils.d.ts +9 -9
  89. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
  90. package/dest/entrypoints/client/lazy/utils.js +17 -11
  91. package/dest/entrypoints/pxe_creation_options.d.ts +14 -0
  92. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -0
  93. package/dest/entrypoints/server/index.d.ts +6 -4
  94. package/dest/entrypoints/server/index.d.ts.map +1 -1
  95. package/dest/entrypoints/server/index.js +4 -3
  96. package/dest/entrypoints/server/utils.d.ts +8 -16
  97. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  98. package/dest/entrypoints/server/utils.js +30 -35
  99. package/dest/error_enriching.d.ts +11 -0
  100. package/dest/error_enriching.d.ts.map +1 -0
  101. package/dest/{pxe_service/error_enriching.js → error_enriching.js} +26 -18
  102. package/dest/oracle_version.d.ts +3 -0
  103. package/dest/oracle_version.d.ts.map +1 -0
  104. package/dest/oracle_version.js +10 -0
  105. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +28 -0
  106. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -0
  107. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.js +271 -0
  108. package/dest/private_kernel/hints/compute_side_effect_uniqueness_hints.d.ts +3 -0
  109. package/dest/private_kernel/hints/compute_side_effect_uniqueness_hints.d.ts.map +1 -0
  110. package/dest/private_kernel/hints/compute_side_effect_uniqueness_hints.js +48 -0
  111. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +4 -0
  112. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +1 -0
  113. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.js +41 -0
  114. package/dest/private_kernel/hints/index.d.ts +3 -0
  115. package/dest/private_kernel/hints/index.d.ts.map +1 -0
  116. package/dest/{kernel_prover → private_kernel}/hints/index.js +1 -0
  117. package/dest/private_kernel/index.d.ts +3 -0
  118. package/dest/private_kernel/index.d.ts.map +1 -0
  119. package/dest/private_kernel/index.js +2 -0
  120. package/dest/private_kernel/private_kernel_execution_prover.d.ts +44 -0
  121. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -0
  122. package/dest/private_kernel/private_kernel_execution_prover.js +289 -0
  123. package/dest/private_kernel/private_kernel_oracle.d.ts +62 -0
  124. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -0
  125. package/dest/private_kernel/private_kernel_oracle.js +4 -0
  126. package/dest/private_kernel/private_kernel_oracle_impl.d.ts +45 -0
  127. package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +1 -0
  128. package/dest/{kernel_oracle/index.js → private_kernel/private_kernel_oracle_impl.js} +19 -9
  129. package/dest/pxe.d.ts +240 -0
  130. package/dest/pxe.d.ts.map +1 -0
  131. package/dest/pxe.js +771 -0
  132. package/dest/storage/address_data_provider/address_data_provider.d.ts +2 -4
  133. package/dest/storage/address_data_provider/address_data_provider.d.ts.map +1 -1
  134. package/dest/storage/address_data_provider/address_data_provider.js +0 -3
  135. package/dest/storage/address_data_provider/index.d.ts +1 -1
  136. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +15 -6
  137. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +1 -1
  138. package/dest/storage/capsule_data_provider/capsule_data_provider.js +85 -24
  139. package/dest/storage/capsule_data_provider/index.d.ts +1 -1
  140. package/dest/storage/contract_data_provider/contract_data_provider.d.ts +13 -58
  141. package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +1 -1
  142. package/dest/storage/contract_data_provider/contract_data_provider.js +89 -79
  143. package/dest/storage/contract_data_provider/index.d.ts +1 -2
  144. package/dest/storage/contract_data_provider/index.d.ts.map +1 -1
  145. package/dest/storage/contract_data_provider/index.js +0 -1
  146. package/dest/storage/contract_data_provider/private_functions_tree.d.ts +3 -42
  147. package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +1 -1
  148. package/dest/storage/contract_data_provider/private_functions_tree.js +9 -61
  149. package/dest/storage/index.d.ts +3 -4
  150. package/dest/storage/index.d.ts.map +1 -1
  151. package/dest/storage/index.js +2 -3
  152. package/dest/storage/metadata.d.ts +2 -0
  153. package/dest/storage/metadata.d.ts.map +1 -0
  154. package/dest/storage/metadata.js +1 -0
  155. package/dest/storage/note_data_provider/index.d.ts +2 -2
  156. package/dest/storage/note_data_provider/index.d.ts.map +1 -1
  157. package/dest/storage/note_data_provider/index.js +1 -1
  158. package/dest/storage/note_data_provider/note_data_provider.d.ts +73 -10
  159. package/dest/storage/note_data_provider/note_data_provider.d.ts.map +1 -1
  160. package/dest/storage/note_data_provider/note_data_provider.js +145 -83
  161. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +37 -0
  162. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +1 -0
  163. package/dest/storage/private_event_data_provider/private_event_data_provider.js +105 -0
  164. package/dest/storage/sync_data_provider/index.d.ts +1 -1
  165. package/dest/storage/sync_data_provider/sync_data_provider.d.ts +3 -5
  166. package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +1 -1
  167. package/dest/storage/sync_data_provider/sync_data_provider.js +2 -5
  168. package/dest/storage/tagging_data_provider/index.d.ts +1 -1
  169. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +29 -7
  170. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +1 -1
  171. package/dest/storage/tagging_data_provider/tagging_data_provider.js +48 -24
  172. package/dest/synchronizer/index.d.ts +1 -1
  173. package/dest/synchronizer/synchronizer.d.ts +8 -10
  174. package/dest/synchronizer/synchronizer.d.ts.map +1 -1
  175. package/dest/synchronizer/synchronizer.js +17 -19
  176. package/dest/tagging/constants.d.ts +2 -0
  177. package/dest/tagging/constants.d.ts.map +1 -0
  178. package/dest/tagging/constants.js +2 -0
  179. package/dest/tagging/index.d.ts +7 -0
  180. package/dest/tagging/index.d.ts.map +1 -0
  181. package/dest/tagging/index.js +5 -0
  182. package/dest/tagging/siloed_tag.d.ts +14 -0
  183. package/dest/tagging/siloed_tag.d.ts.map +1 -0
  184. package/dest/tagging/siloed_tag.js +20 -0
  185. package/dest/tagging/tag.d.ts +12 -0
  186. package/dest/tagging/tag.d.ts.map +1 -0
  187. package/dest/tagging/tag.js +17 -0
  188. package/dest/tagging/utils.d.ts +18 -0
  189. package/dest/tagging/utils.d.ts.map +1 -0
  190. package/dest/tagging/utils.js +24 -0
  191. package/package.json +37 -34
  192. package/src/bin/check_oracle_version.ts +50 -0
  193. package/src/config/index.ts +27 -55
  194. package/src/config/package_info.ts +1 -1
  195. package/src/contract_function_simulator/contract_function_simulator.ts +553 -0
  196. package/src/contract_function_simulator/execution_data_provider.ts +333 -0
  197. package/src/contract_function_simulator/execution_note_cache.ts +229 -0
  198. package/src/contract_function_simulator/execution_tagging_index_cache.ts +32 -0
  199. package/src/contract_function_simulator/hashed_values_cache.ts +47 -0
  200. package/src/contract_function_simulator/index.ts +13 -0
  201. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +47 -0
  202. package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +27 -0
  203. package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +69 -0
  204. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +61 -0
  205. package/src/contract_function_simulator/noir-structs/utility_context.ts +42 -0
  206. package/src/contract_function_simulator/oracle/index.ts +16 -0
  207. package/src/contract_function_simulator/oracle/interfaces.ts +170 -0
  208. package/src/contract_function_simulator/oracle/message_load_oracle_inputs.ts +23 -0
  209. package/src/contract_function_simulator/oracle/note_packing_utils.ts +54 -0
  210. package/src/contract_function_simulator/oracle/oracle.ts +583 -0
  211. package/src/contract_function_simulator/oracle/private_execution.ts +207 -0
  212. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +633 -0
  213. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +358 -0
  214. package/src/contract_function_simulator/pick_notes.ts +141 -0
  215. package/src/contract_function_simulator/proxied_contract_data_source.ts +66 -0
  216. package/src/contract_function_simulator/proxied_node.ts +33 -0
  217. package/src/contract_function_simulator/pxe_oracle_interface.ts +1008 -0
  218. package/src/entrypoints/client/bundle/index.ts +4 -2
  219. package/src/entrypoints/client/bundle/utils.ts +36 -36
  220. package/src/entrypoints/client/lazy/index.ts +4 -2
  221. package/src/entrypoints/client/lazy/utils.ts +36 -31
  222. package/src/entrypoints/{client/pxe_creation_options.ts → pxe_creation_options.ts} +4 -1
  223. package/src/entrypoints/server/index.ts +5 -3
  224. package/src/entrypoints/server/utils.ts +58 -50
  225. package/src/{pxe_service/error_enriching.ts → error_enriching.ts} +36 -27
  226. package/src/oracle_version.ts +11 -0
  227. package/src/{kernel_prover → private_kernel}/hints/build_private_kernel_reset_private_inputs.ts +158 -146
  228. package/src/private_kernel/hints/compute_side_effect_uniqueness_hints.ts +173 -0
  229. package/src/private_kernel/hints/compute_tx_include_by_timestamp.ts +58 -0
  230. package/src/{kernel_prover → private_kernel}/hints/index.ts +1 -0
  231. package/src/private_kernel/index.ts +2 -0
  232. package/src/private_kernel/private_kernel_execution_prover.ts +436 -0
  233. package/src/{kernel_prover/proving_data_oracle.ts → private_kernel/private_kernel_oracle.ts} +17 -29
  234. package/src/{kernel_oracle/index.ts → private_kernel/private_kernel_oracle_impl.ts} +30 -15
  235. package/src/pxe.ts +1085 -0
  236. package/src/storage/address_data_provider/address_data_provider.ts +1 -7
  237. package/src/storage/capsule_data_provider/capsule_data_provider.ts +97 -30
  238. package/src/storage/contract_data_provider/contract_data_provider.ts +109 -93
  239. package/src/storage/contract_data_provider/index.ts +0 -1
  240. package/src/storage/contract_data_provider/private_functions_tree.ts +11 -75
  241. package/src/storage/index.ts +2 -4
  242. package/src/storage/metadata.ts +1 -0
  243. package/src/storage/note_data_provider/index.ts +1 -1
  244. package/src/storage/note_data_provider/note_data_provider.ts +176 -122
  245. package/src/storage/private_event_data_provider/private_event_data_provider.ts +143 -0
  246. package/src/storage/sync_data_provider/sync_data_provider.ts +4 -10
  247. package/src/storage/tagging_data_provider/tagging_data_provider.ts +58 -30
  248. package/src/synchronizer/synchronizer.ts +21 -22
  249. package/src/tagging/constants.ts +2 -0
  250. package/src/tagging/index.ts +6 -0
  251. package/src/tagging/siloed_tag.ts +22 -0
  252. package/src/tagging/tag.ts +16 -0
  253. package/src/tagging/utils.ts +31 -0
  254. package/dest/bin/index.d.ts +0 -3
  255. package/dest/bin/index.d.ts.map +0 -1
  256. package/dest/bin/index.js +0 -28
  257. package/dest/entrypoints/client/pxe_creation_options.d.ts +0 -11
  258. package/dest/entrypoints/client/pxe_creation_options.d.ts.map +0 -1
  259. package/dest/kernel_oracle/index.d.ts +0 -45
  260. package/dest/kernel_oracle/index.d.ts.map +0 -1
  261. package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.d.ts +0 -28
  262. package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.d.ts.map +0 -1
  263. package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.js +0 -270
  264. package/dest/kernel_prover/hints/index.d.ts +0 -2
  265. package/dest/kernel_prover/hints/index.d.ts.map +0 -1
  266. package/dest/kernel_prover/index.d.ts +0 -3
  267. package/dest/kernel_prover/index.d.ts.map +0 -1
  268. package/dest/kernel_prover/index.js +0 -2
  269. package/dest/kernel_prover/kernel_prover.d.ts +0 -38
  270. package/dest/kernel_prover/kernel_prover.d.ts.map +0 -1
  271. package/dest/kernel_prover/kernel_prover.js +0 -217
  272. package/dest/kernel_prover/proving_data_oracle.d.ts +0 -73
  273. package/dest/kernel_prover/proving_data_oracle.d.ts.map +0 -1
  274. package/dest/kernel_prover/proving_data_oracle.js +0 -4
  275. package/dest/note_decryption_utils/add_public_values_to_payload.d.ts +0 -11
  276. package/dest/note_decryption_utils/add_public_values_to_payload.d.ts.map +0 -1
  277. package/dest/note_decryption_utils/add_public_values_to_payload.js +0 -47
  278. package/dest/pxe_http/index.d.ts +0 -2
  279. package/dest/pxe_http/index.d.ts.map +0 -1
  280. package/dest/pxe_http/index.js +0 -1
  281. package/dest/pxe_http/pxe_http_server.d.ts +0 -16
  282. package/dest/pxe_http/pxe_http_server.d.ts.map +0 -1
  283. package/dest/pxe_http/pxe_http_server.js +0 -27
  284. package/dest/pxe_oracle_interface/index.d.ts +0 -159
  285. package/dest/pxe_oracle_interface/index.d.ts.map +0 -1
  286. package/dest/pxe_oracle_interface/index.js +0 -692
  287. package/dest/pxe_oracle_interface/tagging_utils.d.ts +0 -17
  288. package/dest/pxe_oracle_interface/tagging_utils.d.ts.map +0 -1
  289. package/dest/pxe_oracle_interface/tagging_utils.js +0 -23
  290. package/dest/pxe_service/error_enriching.d.ts +0 -11
  291. package/dest/pxe_service/error_enriching.d.ts.map +0 -1
  292. package/dest/pxe_service/index.d.ts +0 -3
  293. package/dest/pxe_service/index.d.ts.map +0 -1
  294. package/dest/pxe_service/index.js +0 -2
  295. package/dest/pxe_service/pxe_service.d.ts +0 -111
  296. package/dest/pxe_service/pxe_service.d.ts.map +0 -1
  297. package/dest/pxe_service/pxe_service.js +0 -664
  298. package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.d.ts +0 -11
  299. package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.d.ts.map +0 -1
  300. package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.js +0 -20
  301. package/dest/storage/auth_witness_data_provider/index.d.ts +0 -2
  302. package/dest/storage/auth_witness_data_provider/index.d.ts.map +0 -1
  303. package/dest/storage/auth_witness_data_provider/index.js +0 -1
  304. package/dest/storage/data_provider.d.ts +0 -4
  305. package/dest/storage/data_provider.d.ts.map +0 -1
  306. package/dest/storage/data_provider.js +0 -1
  307. package/dest/storage/note_data_provider/note_dao.d.ts +0 -106
  308. package/dest/storage/note_data_provider/note_dao.d.ts.map +0 -1
  309. package/dest/storage/note_data_provider/note_dao.js +0 -106
  310. package/dest/test/pxe_test_suite.d.ts +0 -3
  311. package/dest/test/pxe_test_suite.d.ts.map +0 -1
  312. package/dest/test/pxe_test_suite.js +0 -97
  313. package/src/bin/index.ts +0 -38
  314. package/src/kernel_prover/index.ts +0 -2
  315. package/src/kernel_prover/kernel_prover.ts +0 -351
  316. package/src/note_decryption_utils/add_public_values_to_payload.ts +0 -64
  317. package/src/pxe_http/index.ts +0 -1
  318. package/src/pxe_http/pxe_http_server.ts +0 -29
  319. package/src/pxe_oracle_interface/index.ts +0 -925
  320. package/src/pxe_oracle_interface/tagging_utils.ts +0 -32
  321. package/src/pxe_service/index.ts +0 -2
  322. package/src/pxe_service/pxe_service.ts +0 -949
  323. package/src/storage/auth_witness_data_provider/auth_witness_data_provider.ts +0 -34
  324. package/src/storage/auth_witness_data_provider/index.ts +0 -1
  325. package/src/storage/data_provider.ts +0 -3
  326. package/src/storage/note_data_provider/note_dao.ts +0 -162
  327. package/src/test/pxe_test_suite.ts +0 -111
  328. /package/dest/entrypoints/{client/pxe_creation_options.js → pxe_creation_options.js} +0 -0
@@ -0,0 +1,289 @@
1
+ import { vkAsFieldsMegaHonk } from '@aztec/foundation/crypto';
2
+ import { Fr } from '@aztec/foundation/fields';
3
+ import { createLogger } from '@aztec/foundation/log';
4
+ import { pushTestData } from '@aztec/foundation/testing';
5
+ import { Timer } from '@aztec/foundation/timer';
6
+ import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
7
+ import { ProtocolContractsList } from '@aztec/protocol-contracts';
8
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
9
+ import { HidingKernelToPublicPrivateInputs, HidingKernelToRollupPrivateInputs, PaddedSideEffectAmounts, PrivateCallData, PrivateKernelCircuitPublicInputs, PrivateKernelData, PrivateKernelInitCircuitPrivateInputs, PrivateKernelInnerCircuitPrivateInputs, PrivateKernelTailCircuitPrivateInputs, PrivateVerificationKeyHints } from '@aztec/stdlib/kernel';
10
+ import { ChonkProof } from '@aztec/stdlib/proofs';
11
+ import { collectNoteHashLeafIndexMap, collectNoteHashNullifierCounterMap, getFinalMinRevertibleSideEffectCounter } from '@aztec/stdlib/tx';
12
+ import { VerificationKeyAsFields, VerificationKeyData, VkData } from '@aztec/stdlib/vks';
13
+ import { PrivateKernelResetPrivateInputsBuilder } from './hints/build_private_kernel_reset_private_inputs.js';
14
+ import { computeSideEffectUniquenessHints } from './hints/compute_side_effect_uniqueness_hints.js';
15
+ const NULL_SIMULATE_OUTPUT = {
16
+ publicInputs: PrivateKernelCircuitPublicInputs.empty(),
17
+ verificationKey: VerificationKeyData.empty(),
18
+ outputWitness: new Map(),
19
+ bytecode: Buffer.from([])
20
+ };
21
+ /**
22
+ * The PrivateKernelExecutionProver class is responsible for taking a transaction request and sequencing the
23
+ * the execution of the private functions within, sequenced with private kernel "glue" to check protocol rules.
24
+ * The result can be a chonk proof of the private transaction portion, or just a simulation that can e.g.
25
+ * inform state tree updates.
26
+ */ export class PrivateKernelExecutionProver {
27
+ oracle;
28
+ proofCreator;
29
+ fakeProofs;
30
+ log;
31
+ constructor(oracle, proofCreator, fakeProofs = false){
32
+ this.oracle = oracle;
33
+ this.proofCreator = proofCreator;
34
+ this.fakeProofs = fakeProofs;
35
+ this.log = createLogger('pxe:private-kernel-execution-prover');
36
+ }
37
+ /**
38
+ * Generate a proof for a given transaction request and execution result.
39
+ * The function iterates through the nested executions in the execution result, creates private call data,
40
+ * and generates a proof using the provided ProofCreator instance. It also maintains an index of new notes
41
+ * created during the execution and returns them as a part of the KernelProverOutput.
42
+ *
43
+ * @param txRequest - The authenticated transaction request object.
44
+ * @param executionResult - The execution result object containing nested executions and preimages.
45
+ * @param profile - Set true to profile the gate count for each circuit
46
+ * @returns A Promise that resolves to a KernelProverOutput object containing proof, public inputs, and output notes.
47
+ */ async proveWithKernels(txRequest, executionResult, { simulate, skipFeeEnforcement, profileMode } = {
48
+ simulate: false,
49
+ skipFeeEnforcement: false,
50
+ profileMode: 'none'
51
+ }) {
52
+ const skipProofGeneration = this.fakeProofs || simulate;
53
+ const generateWitnesses = !skipProofGeneration || profileMode !== 'none';
54
+ const timer = new Timer();
55
+ const isPrivateOnlyTx = executionResult.publicFunctionCalldata.length === 0;
56
+ // Initialize an executionStack, beginning with the PrivateCallExecutionResult
57
+ // of the entrypoint function of the tx.
58
+ const executionStack = [
59
+ executionResult.entrypoint
60
+ ];
61
+ let firstIteration = true;
62
+ let output = NULL_SIMULATE_OUTPUT;
63
+ const executionSteps = [];
64
+ const noteHashLeafIndexMap = collectNoteHashLeafIndexMap(executionResult);
65
+ const noteHashNullifierCounterMap = collectNoteHashNullifierCounterMap(executionResult);
66
+ const minRevertibleSideEffectCounter = getFinalMinRevertibleSideEffectCounter(executionResult);
67
+ const splitCounter = isPrivateOnlyTx ? 0 : minRevertibleSideEffectCounter;
68
+ while(executionStack.length){
69
+ if (!firstIteration) {
70
+ let resetBuilder = new PrivateKernelResetPrivateInputsBuilder(output, executionStack, noteHashNullifierCounterMap, splitCounter);
71
+ while(resetBuilder.needsReset()){
72
+ const witgenTimer = new Timer();
73
+ const privateInputs = await resetBuilder.build(this.oracle, noteHashLeafIndexMap);
74
+ output = generateWitnesses ? await this.proofCreator.generateResetOutput(privateInputs) : await this.proofCreator.simulateReset(privateInputs);
75
+ executionSteps.push({
76
+ functionName: 'private_kernel_reset',
77
+ bytecode: output.bytecode,
78
+ witness: output.outputWitness,
79
+ vk: output.verificationKey.keyAsBytes,
80
+ timings: {
81
+ witgen: witgenTimer.ms()
82
+ }
83
+ });
84
+ resetBuilder = new PrivateKernelResetPrivateInputsBuilder(output, executionStack, noteHashNullifierCounterMap, splitCounter);
85
+ }
86
+ }
87
+ const currentExecution = executionStack.pop();
88
+ executionStack.push(...[
89
+ ...currentExecution.nestedExecutionResults
90
+ ].reverse());
91
+ const functionName = await this.oracle.getDebugFunctionName(currentExecution.publicInputs.callContext.contractAddress, currentExecution.publicInputs.callContext.functionSelector);
92
+ executionSteps.push({
93
+ functionName: functionName,
94
+ bytecode: currentExecution.acir,
95
+ witness: currentExecution.partialWitness,
96
+ vk: currentExecution.vk,
97
+ timings: {
98
+ witgen: currentExecution.profileResult?.timings.witgen ?? 0,
99
+ oracles: currentExecution.profileResult?.timings.oracles
100
+ }
101
+ });
102
+ const privateCallData = await this.createPrivateCallData(currentExecution);
103
+ if (firstIteration) {
104
+ const witgenTimer = new Timer();
105
+ const proofInput = new PrivateKernelInitCircuitPrivateInputs(txRequest, getVKTreeRoot(), ProtocolContractsList, privateCallData, isPrivateOnlyTx, executionResult.firstNullifier, minRevertibleSideEffectCounter);
106
+ this.log.debug(`Calling private kernel init with isPrivateOnly ${isPrivateOnlyTx} and firstNullifierHint ${proofInput.firstNullifierHint}`);
107
+ pushTestData('private-kernel-inputs-init', proofInput);
108
+ output = generateWitnesses ? await this.proofCreator.generateInitOutput(proofInput) : await this.proofCreator.simulateInit(proofInput);
109
+ executionSteps.push({
110
+ functionName: 'private_kernel_init',
111
+ bytecode: output.bytecode,
112
+ witness: output.outputWitness,
113
+ vk: output.verificationKey.keyAsBytes,
114
+ timings: {
115
+ witgen: witgenTimer.ms()
116
+ }
117
+ });
118
+ } else {
119
+ const witgenTimer = new Timer();
120
+ const vkData = await this.getVkData(output.verificationKey);
121
+ const previousKernelData = new PrivateKernelData(output.publicInputs, vkData);
122
+ const proofInput = new PrivateKernelInnerCircuitPrivateInputs(previousKernelData, privateCallData);
123
+ pushTestData('private-kernel-inputs-inner', proofInput);
124
+ output = generateWitnesses ? await this.proofCreator.generateInnerOutput(proofInput) : await this.proofCreator.simulateInner(proofInput);
125
+ executionSteps.push({
126
+ functionName: 'private_kernel_inner',
127
+ bytecode: output.bytecode,
128
+ witness: output.outputWitness,
129
+ vk: output.verificationKey.keyAsBytes,
130
+ timings: {
131
+ witgen: witgenTimer.ms()
132
+ }
133
+ });
134
+ }
135
+ firstIteration = false;
136
+ }
137
+ // Reset.
138
+ let resetBuilder = new PrivateKernelResetPrivateInputsBuilder(output, [], noteHashNullifierCounterMap, splitCounter);
139
+ while(resetBuilder.needsReset()){
140
+ const witgenTimer = new Timer();
141
+ const privateInputs = await resetBuilder.build(this.oracle, noteHashLeafIndexMap);
142
+ output = generateWitnesses ? await this.proofCreator.generateResetOutput(privateInputs) : await this.proofCreator.simulateReset(privateInputs);
143
+ executionSteps.push({
144
+ functionName: 'private_kernel_reset',
145
+ bytecode: output.bytecode,
146
+ witness: output.outputWitness,
147
+ vk: output.verificationKey.keyAsBytes,
148
+ timings: {
149
+ witgen: witgenTimer.ms()
150
+ }
151
+ });
152
+ resetBuilder = new PrivateKernelResetPrivateInputsBuilder(output, [], noteHashNullifierCounterMap, splitCounter);
153
+ }
154
+ if (output.publicInputs.feePayer.isZero() && skipFeeEnforcement) {
155
+ if (!skipProofGeneration) {
156
+ throw new Error('Fee payment must be enforced when creating real proof.');
157
+ }
158
+ output.publicInputs.feePayer = new AztecAddress(Fr.MAX_FIELD_VALUE);
159
+ }
160
+ // Private tail.
161
+ const vkData = await this.getVkData(output.verificationKey);
162
+ const previousKernelData = new PrivateKernelData(output.publicInputs, vkData);
163
+ this.log.debug(`Calling private kernel tail with hwm ${previousKernelData.publicInputs.minRevertibleSideEffectCounter}`);
164
+ // TODO: Enable padding once we better understand the final amounts to pad to.
165
+ const paddedSideEffectAmounts = PaddedSideEffectAmounts.empty();
166
+ // Use the aggregated includeByTimestamp set throughout the tx execution.
167
+ // TODO: Call `computeTxIncludeByTimestamp` to round the value down and reduce precision, improving privacy.
168
+ const includeByTimestampUpperBound = previousKernelData.publicInputs.includeByTimestamp;
169
+ const anchorBlockTimestamp = previousKernelData.publicInputs.constants.anchorBlockHeader.globalVariables.timestamp;
170
+ if (includeByTimestampUpperBound <= anchorBlockTimestamp) {
171
+ throw new Error(`Include-by timestamp must be greater than the anchor block timestamp. Anchor block timestamp: ${anchorBlockTimestamp}. Include-by timestamp: ${includeByTimestampUpperBound}.`);
172
+ }
173
+ const privateInputs = new PrivateKernelTailCircuitPrivateInputs(previousKernelData, paddedSideEffectAmounts, includeByTimestampUpperBound);
174
+ const witgenTimer = new Timer();
175
+ const tailOutput = generateWitnesses ? await this.proofCreator.generateTailOutput(privateInputs) : await this.proofCreator.simulateTail(privateInputs);
176
+ executionSteps.push({
177
+ functionName: 'private_kernel_tail',
178
+ bytecode: tailOutput.bytecode,
179
+ witness: tailOutput.outputWitness,
180
+ vk: tailOutput.verificationKey.keyAsBytes,
181
+ timings: {
182
+ witgen: witgenTimer.ms()
183
+ }
184
+ });
185
+ // Hiding circuit is only executed if we are generating witnesses.
186
+ // For simulation, we can end with the tail, since the hiding circuit will simply return the same tail output.
187
+ if (generateWitnesses) {
188
+ const previousKernelVkData = await this.getVkData(tailOutput.verificationKey);
189
+ const witgenTimer = new Timer();
190
+ let hidingOutput;
191
+ if (tailOutput.publicInputs.forPublic) {
192
+ const privateInputs = new HidingKernelToPublicPrivateInputs(tailOutput.publicInputs.toPrivateToPublicKernelCircuitPublicInputs(), previousKernelVkData);
193
+ hidingOutput = await this.proofCreator.generateHidingToPublicOutput(privateInputs);
194
+ } else {
195
+ const privateInputs = new HidingKernelToRollupPrivateInputs(tailOutput.publicInputs.toPrivateToRollupKernelCircuitPublicInputs(), previousKernelVkData);
196
+ hidingOutput = await this.proofCreator.generateHidingToRollupOutput(privateInputs);
197
+ }
198
+ executionSteps.push({
199
+ functionName: 'hiding_kernel',
200
+ bytecode: hidingOutput.bytecode,
201
+ witness: hidingOutput.outputWitness,
202
+ vk: hidingOutput.verificationKey.keyAsBytes,
203
+ timings: {
204
+ witgen: witgenTimer.ms()
205
+ }
206
+ });
207
+ }
208
+ if (profileMode == 'gates' || profileMode == 'full') {
209
+ for (const entry of executionSteps){
210
+ const gateCountTimer = new Timer();
211
+ const gateCount = await this.proofCreator.computeGateCountForCircuit(entry.bytecode, entry.functionName);
212
+ entry.gateCount = gateCount;
213
+ entry.timings.gateCount = gateCountTimer.ms();
214
+ }
215
+ }
216
+ if (profileMode === 'gates') {
217
+ for (const entry of executionSteps){
218
+ // These buffers are often a few megabytes in size - prevent accidentally serializing them if not requested.
219
+ entry.bytecode = Buffer.from([]);
220
+ entry.witness = new Map();
221
+ }
222
+ }
223
+ if (generateWitnesses) {
224
+ this.log.info(`Private kernel witness generation took ${timer.ms()}ms`);
225
+ }
226
+ let chonkProof;
227
+ // TODO(#7368) how do we 'bincode' encode these inputs?
228
+ let provingTime;
229
+ if (!skipProofGeneration) {
230
+ const provingTimer = new Timer();
231
+ const proofWithPublicInputs = await this.proofCreator.createChonkProof(executionSteps);
232
+ provingTime = provingTimer.ms();
233
+ this.ensurePublicInputsMatch(proofWithPublicInputs, tailOutput.publicInputs);
234
+ chonkProof = proofWithPublicInputs.removePublicInputs();
235
+ } else {
236
+ chonkProof = ChonkProof.random();
237
+ }
238
+ return {
239
+ publicInputs: tailOutput.publicInputs,
240
+ executionSteps,
241
+ chonkProof,
242
+ timings: provingTime ? {
243
+ proving: provingTime
244
+ } : undefined
245
+ };
246
+ }
247
+ /**
248
+ * Checks that the public inputs of the chonk proof match the public inputs of the tail circuit.
249
+ * This can only mismatch if there is a circuit / noir / bb bug.
250
+ * @param chonkProof - The chonk proof with public inputs.
251
+ * @param tailPublicInputs - The public inputs resulting from witness generation of the tail circuit.
252
+ */ ensurePublicInputsMatch(chonkProof, tailPublicInputs) {
253
+ const serializedChonkProofPublicInputs = chonkProof.getPublicInputs();
254
+ const serializedTailPublicInputs = tailPublicInputs.publicInputs().toFields();
255
+ if (serializedChonkProofPublicInputs.length !== serializedTailPublicInputs.length) {
256
+ throw new Error(`Public inputs length mismatch: ${serializedChonkProofPublicInputs.length} !== ${serializedTailPublicInputs.length}`);
257
+ }
258
+ if (!serializedChonkProofPublicInputs.every((input, index)=>input.equals(serializedTailPublicInputs[index]))) {
259
+ throw new Error(`Public inputs mismatch between kernel and chonk proof`);
260
+ }
261
+ }
262
+ async getVkData(verificationKey) {
263
+ const previousVkMembershipWitness = await this.oracle.getVkMembershipWitness(verificationKey.keyAsFields);
264
+ return new VkData(verificationKey, Number(previousVkMembershipWitness.leafIndex), previousVkMembershipWitness.siblingPath);
265
+ }
266
+ async createPrivateCallData({ publicInputs, vk: vkAsBuffer }) {
267
+ const { contractAddress, functionSelector } = publicInputs.callContext;
268
+ const vkAsFields = await vkAsFieldsMegaHonk(vkAsBuffer);
269
+ const vk = await VerificationKeyAsFields.fromKey(vkAsFields);
270
+ const { currentContractClassId, publicKeys, saltedInitializationHash } = await this.oracle.getContractAddressPreimage(contractAddress);
271
+ const functionLeafMembershipWitness = await this.oracle.getFunctionMembershipWitness(currentContractClassId, functionSelector);
272
+ const { artifactHash: contractClassArtifactHash, publicBytecodeCommitment: contractClassPublicBytecodeCommitment } = await this.oracle.getContractClassIdPreimage(currentContractClassId);
273
+ const updatedClassIdHints = await this.oracle.getUpdatedClassIdHints(contractAddress);
274
+ const sideEffectUniquenessHints = computeSideEffectUniquenessHints(publicInputs);
275
+ return PrivateCallData.from({
276
+ publicInputs,
277
+ vk,
278
+ verificationKeyHints: PrivateVerificationKeyHints.from({
279
+ publicKeys,
280
+ contractClassArtifactHash,
281
+ contractClassPublicBytecodeCommitment,
282
+ saltedInitializationHash,
283
+ functionLeafMembershipWitness,
284
+ updatedClassIdHints
285
+ }),
286
+ sideEffectUniquenessHints
287
+ });
288
+ }
289
+ }
@@ -0,0 +1,62 @@
1
+ import { FUNCTION_TREE_HEIGHT, NOTE_HASH_TREE_HEIGHT, VK_TREE_HEIGHT } from '@aztec/constants';
2
+ import type { Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields';
3
+ import { MembershipWitness } from '@aztec/foundation/trees';
4
+ import type { FunctionSelector } from '@aztec/stdlib/abi';
5
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
6
+ import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
7
+ import type { PublicKeys } from '@aztec/stdlib/keys';
8
+ import type { NullifierMembershipWitness } from '@aztec/stdlib/trees';
9
+ import type { VerificationKeyAsFields } from '@aztec/stdlib/vks';
10
+ /**
11
+ * Provides functionality needed by the private kernel for interacting with our state trees.
12
+ * This is either PrivateKernelOracleImpl, or a mocked test implementation.
13
+ */
14
+ export interface PrivateKernelOracle {
15
+ /** Retrieves the preimage of a contract address from the registered contract instances db. */
16
+ getContractAddressPreimage(address: AztecAddress): Promise<{
17
+ saltedInitializationHash: Fr;
18
+ publicKeys: PublicKeys;
19
+ currentContractClassId: Fr;
20
+ originalContractClassId: Fr;
21
+ }>;
22
+ /** Retrieves the preimage of a contract class id from the contract classes db. */
23
+ getContractClassIdPreimage(contractClassId: Fr): Promise<{
24
+ artifactHash: Fr;
25
+ publicBytecodeCommitment: Fr;
26
+ privateFunctionsRoot: Fr;
27
+ }>;
28
+ /**
29
+ * Returns a membership witness with the sibling path and leaf index in our private functions tree.
30
+ */
31
+ getFunctionMembershipWitness(contractClassId: Fr, selector: FunctionSelector): Promise<MembershipWitness<typeof FUNCTION_TREE_HEIGHT>>;
32
+ /**
33
+ * Returns a membership witness with the sibling path and leaf index in our protocol VK indexed merkle tree.
34
+ * Used to validate the previous kernel's verification key.
35
+ */
36
+ getVkMembershipWitness(vk: VerificationKeyAsFields): Promise<MembershipWitness<typeof VK_TREE_HEIGHT>>;
37
+ /**
38
+ * Returns a membership witness with the sibling path and leaf index in our private function indexed merkle tree.
39
+ */ getNoteHashMembershipWitness(leafIndex: bigint): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT>>;
40
+ /**
41
+ * Returns a membership witness with the sibling path and leaf index in our nullifier indexed merkle tree.
42
+ */
43
+ getNullifierMembershipWitness(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
44
+ /**
45
+ * Returns the root of our note hash merkle tree.
46
+ */
47
+ getNoteHashTreeRoot(): Promise<Fr>;
48
+ /**
49
+ * Retrieves the sk_m corresponding to the pk_m.
50
+ * @throws If the provided public key is not associated with any of the registered accounts.
51
+ * @param pkM - The master public key to get secret key for.
52
+ * @returns A Promise that resolves to sk_m.
53
+ * @dev Used when feeding the sk_m to the kernel circuit for keys verification.
54
+ */
55
+ getMasterSecretKey(masterPublicKey: Point): Promise<GrumpkinScalar>;
56
+ /** Use debug data to get the function name corresponding to a selector. */
57
+ getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string | undefined>;
58
+ /** Returns a membership witness and leaf index to our public data indexed merkle tree,
59
+ * along with an associated DelayedPublicMutable containing the class ID to update. */
60
+ getUpdatedClassIdHints(contractAddress: AztecAddress): Promise<UpdatedClassIdHints>;
61
+ }
62
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfb3JhY2xlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcHJpdmF0ZV9rZXJuZWwvcHJpdmF0ZV9rZXJuZWxfb3JhY2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxxQkFBcUIsRUFBRSxjQUFjLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUMvRixPQUFPLEtBQUssRUFBRSxFQUFFLEVBQUUsY0FBYyxFQUFFLEtBQUssRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzFFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzVELE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDMUQsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDaEUsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDM0QsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDckQsT0FBTyxLQUFLLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUN0RSxPQUFPLEtBQUssRUFBRSx1Qk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tF,sBAAsB,CAAC,eAAe,EAAE,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACrF"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Provides functionality needed by the private kernel for interacting with our state trees.
3
+ * This is either PrivateKernelOracleImpl, or a mocked test implementation.
4
+ */ export { };
@@ -0,0 +1,45 @@
1
+ import { NOTE_HASH_TREE_HEIGHT } from '@aztec/constants';
2
+ import type { Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields';
3
+ import { MembershipWitness } from '@aztec/foundation/trees';
4
+ import type { KeyStore } from '@aztec/key-store';
5
+ import type { FunctionSelector } from '@aztec/stdlib/abi';
6
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
7
+ import type { L2BlockNumber } from '@aztec/stdlib/block';
8
+ import type { AztecNode } from '@aztec/stdlib/interfaces/client';
9
+ import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
10
+ import type { NullifierMembershipWitness } from '@aztec/stdlib/trees';
11
+ import type { VerificationKeyAsFields } from '@aztec/stdlib/vks';
12
+ import type { ContractDataProvider } from '../storage/index.js';
13
+ import type { PrivateKernelOracle } from './private_kernel_oracle.js';
14
+ /**
15
+ * A data oracle that provides information needed for simulating a transaction.
16
+ */
17
+ export declare class PrivateKernelOracleImpl implements PrivateKernelOracle {
18
+ private contractDataProvider;
19
+ private keyStore;
20
+ private node;
21
+ private blockNumber;
22
+ private log;
23
+ constructor(contractDataProvider: ContractDataProvider, keyStore: KeyStore, node: AztecNode, blockNumber?: L2BlockNumber, log?: import("@aztec/foundation/log").Logger);
24
+ getContractAddressPreimage(address: AztecAddress): Promise<{
25
+ version: 1;
26
+ salt: Fr;
27
+ deployer: AztecAddress;
28
+ currentContractClassId: Fr;
29
+ originalContractClassId: Fr;
30
+ initializationHash: Fr;
31
+ publicKeys: import("../../../stdlib/dest/keys/public_keys.js").PublicKeys;
32
+ address: AztecAddress;
33
+ saltedInitializationHash: Fr;
34
+ }>;
35
+ getContractClassIdPreimage(contractClassId: Fr): Promise<import("@aztec/stdlib/contract").ContractClassIdPreimage>;
36
+ getFunctionMembershipWitness(contractClassId: Fr, selector: FunctionSelector): Promise<MembershipWitness<7>>;
37
+ getVkMembershipWitness(vk: VerificationKeyAsFields): Promise<MembershipWitness<7>>;
38
+ getNoteHashMembershipWitness(leafIndex: bigint): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT>>;
39
+ getNullifierMembershipWitness(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
40
+ getNoteHashTreeRoot(): Promise<Fr>;
41
+ getMasterSecretKey(masterPublicKey: Point): Promise<GrumpkinScalar>;
42
+ getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
43
+ getUpdatedClassIdHints(contractAddress: AztecAddress): Promise<UpdatedClassIdHints>;
44
+ }
45
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfb3JhY2xlX2ltcGwuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wcml2YXRlX2tlcm5lbC9wcml2YXRlX2tlcm5lbF9vcmFjbGVfaW1wbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUscUJBQXFCLEVBQTJDLE1BQU0sa0JBQWtCLENBQUM7QUFDbEcsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLGNBQWMsRUFBRSxLQUFLLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUcxRSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUM1RCxPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUdqRCxPQUFPLEtBQUssRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQzFELE9BQU8sS0FBSyx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,OAAO,CAAC,cAAc,CAAC,CAEzE;IAEM,oBAAoB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAEtG;IAEY,sBAAsB,CAAC,eAAe,EAAE,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA8B/F;CACF"}
@@ -4,14 +4,14 @@ import { MembershipWitness } from '@aztec/foundation/trees';
4
4
  import { getVKIndex, getVKSiblingPath } from '@aztec/noir-protocol-circuits-types/vk-tree';
5
5
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
6
6
  import { computeContractClassIdPreimage, computeSaltedInitializationHash } from '@aztec/stdlib/contract';
7
+ import { DelayedPublicMutableValues, DelayedPublicMutableValuesWithHash } from '@aztec/stdlib/delayed-public-mutable';
7
8
  import { computePublicDataTreeLeafSlot } from '@aztec/stdlib/hash';
8
9
  import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
9
- import { SharedMutableValues, SharedMutableValuesWithHash } from '@aztec/stdlib/shared-mutable';
10
10
  // TODO: Block number should not be "latest".
11
11
  // It should be fixed at the time the proof is being simulated. I.e., it should be the same as the value defined in the constant data.
12
12
  /**
13
13
  * A data oracle that provides information needed for simulating a transaction.
14
- */ export class KernelOracle {
14
+ */ export class PrivateKernelOracleImpl {
15
15
  contractDataProvider;
16
16
  keyStore;
17
17
  node;
@@ -26,6 +26,9 @@ import { SharedMutableValues, SharedMutableValuesWithHash } from '@aztec/stdlib/
26
26
  }
27
27
  async getContractAddressPreimage(address) {
28
28
  const instance = await this.contractDataProvider.getContractInstance(address);
29
+ if (!instance) {
30
+ throw new Error(`Contract instance not found when getting address preimage. Contract address: ${address}.`);
31
+ }
29
32
  return {
30
33
  saltedInitializationHash: await computeSaltedInitializationHash(instance),
31
34
  ...instance
@@ -33,10 +36,17 @@ import { SharedMutableValues, SharedMutableValuesWithHash } from '@aztec/stdlib/
33
36
  }
34
37
  async getContractClassIdPreimage(contractClassId) {
35
38
  const contractClass = await this.contractDataProvider.getContractClass(contractClassId);
39
+ if (!contractClass) {
40
+ throw new Error(`Contract class not found when getting class id preimage. Class id: ${contractClassId}.`);
41
+ }
36
42
  return computeContractClassIdPreimage(contractClass);
37
43
  }
38
44
  async getFunctionMembershipWitness(contractClassId, selector) {
39
- return await this.contractDataProvider.getFunctionMembershipWitness(contractClassId, selector);
45
+ const membershipWitness = await this.contractDataProvider.getFunctionMembershipWitness(contractClassId, selector);
46
+ if (!membershipWitness) {
47
+ throw new Error(`Membership witness not found for contract class id ${contractClassId} and selector ${selector}.`);
48
+ }
49
+ return membershipWitness;
40
50
  }
41
51
  getVkMembershipWitness(vk) {
42
52
  const leafIndex = getVKIndex(vk);
@@ -63,14 +73,14 @@ import { SharedMutableValues, SharedMutableValuesWithHash } from '@aztec/stdlib/
63
73
  return this.contractDataProvider.getDebugFunctionName(contractAddress, selector);
64
74
  }
65
75
  async getUpdatedClassIdHints(contractAddress) {
66
- const { sharedMutableSlot, sharedMutableHashSlot } = await SharedMutableValuesWithHash.getContractUpdateSlots(contractAddress);
67
- const hashLeafSlot = await computePublicDataTreeLeafSlot(ProtocolContractAddress.ContractInstanceDeployer, sharedMutableHashSlot);
68
- const updatedClassIdWitness = await this.node.getPublicDataTreeWitness(this.blockNumber, hashLeafSlot);
76
+ const { delayedPublicMutableSlot, delayedPublicMutableHashSlot } = await DelayedPublicMutableValuesWithHash.getContractUpdateSlots(contractAddress);
77
+ const hashLeafSlot = await computePublicDataTreeLeafSlot(ProtocolContractAddress.ContractInstanceRegistry, delayedPublicMutableHashSlot);
78
+ const updatedClassIdWitness = await this.node.getPublicDataWitness(this.blockNumber, hashLeafSlot);
69
79
  if (!updatedClassIdWitness) {
70
80
  throw new Error(`No public data tree witness found for ${hashLeafSlot}`);
71
81
  }
72
- const readStorage = (storageSlot)=>this.node.getPublicStorageAt(this.blockNumber, ProtocolContractAddress.ContractInstanceDeployer, storageSlot);
73
- const sharedMutableValues = await SharedMutableValues.readFromTree(sharedMutableSlot, readStorage);
74
- return new UpdatedClassIdHints(new MembershipWitness(PUBLIC_DATA_TREE_HEIGHT, updatedClassIdWitness.index, updatedClassIdWitness.siblingPath.toTuple()), updatedClassIdWitness.leafPreimage, sharedMutableValues);
82
+ const readStorage = (storageSlot)=>this.node.getPublicStorageAt(this.blockNumber, ProtocolContractAddress.ContractInstanceRegistry, storageSlot);
83
+ const delayedPublicMutableValues = await DelayedPublicMutableValues.readFromTree(delayedPublicMutableSlot, readStorage);
84
+ return new UpdatedClassIdHints(new MembershipWitness(PUBLIC_DATA_TREE_HEIGHT, updatedClassIdWitness.index, updatedClassIdWitness.siblingPath.toTuple()), updatedClassIdWitness.leafPreimage, delayedPublicMutableValues);
75
85
  }
76
86
  }