@aztec/pxe 0.0.1-commit.fcb71a6 → 0.0.1-commit.ff7989d6c

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 (266) hide show
  1. package/dest/access_scopes.d.ts +9 -0
  2. package/dest/access_scopes.d.ts.map +1 -0
  3. package/dest/access_scopes.js +6 -0
  4. package/dest/bin/check_oracle_version.js +1 -1
  5. package/dest/block_synchronizer/block_synchronizer.d.ts +13 -5
  6. package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
  7. package/dest/block_synchronizer/block_synchronizer.js +74 -20
  8. package/dest/config/index.d.ts +3 -1
  9. package/dest/config/index.d.ts.map +1 -1
  10. package/dest/config/index.js +17 -0
  11. package/dest/config/package_info.js +1 -1
  12. package/dest/contract_function_simulator/benchmarked_node.d.ts +9 -0
  13. package/dest/contract_function_simulator/benchmarked_node.d.ts.map +1 -0
  14. package/dest/contract_function_simulator/benchmarked_node.js +77 -0
  15. package/dest/contract_function_simulator/contract_function_simulator.d.ts +57 -34
  16. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  17. package/dest/contract_function_simulator/contract_function_simulator.js +197 -82
  18. package/dest/contract_function_simulator/execution_note_cache.d.ts +18 -9
  19. package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
  20. package/dest/contract_function_simulator/execution_note_cache.js +45 -28
  21. package/dest/contract_function_simulator/index.d.ts +2 -2
  22. package/dest/contract_function_simulator/index.d.ts.map +1 -1
  23. package/dest/contract_function_simulator/index.js +1 -1
  24. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +4 -3
  25. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
  26. package/dest/contract_function_simulator/noir-structs/event_validation_request.js +7 -4
  27. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +3 -3
  28. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
  29. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +2 -2
  30. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +4 -10
  31. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -1
  32. package/dest/contract_function_simulator/noir-structs/utility_context.js +7 -18
  33. package/dest/contract_function_simulator/oracle/interfaces.d.ts +17 -13
  34. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
  35. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +3 -1
  36. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
  37. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +6 -6
  38. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
  39. package/dest/contract_function_simulator/oracle/note_packing_utils.js +8 -8
  40. package/dest/contract_function_simulator/oracle/oracle.d.ts +12 -10
  41. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
  42. package/dest/contract_function_simulator/oracle/oracle.js +67 -44
  43. package/dest/contract_function_simulator/oracle/private_execution.d.ts +2 -26
  44. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
  45. package/dest/contract_function_simulator/oracle/private_execution.js +1 -37
  46. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +44 -50
  47. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  48. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +83 -54
  49. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +67 -33
  50. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  51. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +131 -110
  52. package/dest/contract_logging.d.ts +22 -0
  53. package/dest/contract_logging.d.ts.map +1 -0
  54. package/dest/contract_logging.js +23 -0
  55. package/dest/contract_sync/contract_sync_service.d.ts +43 -0
  56. package/dest/contract_sync/contract_sync_service.d.ts.map +1 -0
  57. package/dest/contract_sync/contract_sync_service.js +97 -0
  58. package/dest/contract_sync/helpers.d.ts +29 -0
  59. package/dest/contract_sync/helpers.d.ts.map +1 -0
  60. package/dest/contract_sync/helpers.js +55 -0
  61. package/dest/debug/pxe_debug_utils.d.ts +24 -10
  62. package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
  63. package/dest/debug/pxe_debug_utils.js +28 -17
  64. package/dest/entrypoints/client/bundle/index.d.ts +4 -1
  65. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  66. package/dest/entrypoints/client/bundle/index.js +3 -0
  67. package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
  68. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
  69. package/dest/entrypoints/client/bundle/utils.js +31 -8
  70. package/dest/entrypoints/client/lazy/index.d.ts +4 -1
  71. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  72. package/dest/entrypoints/client/lazy/index.js +3 -0
  73. package/dest/entrypoints/client/lazy/utils.d.ts +2 -2
  74. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
  75. package/dest/entrypoints/client/lazy/utils.js +32 -9
  76. package/dest/entrypoints/pxe_creation_options.d.ts +5 -3
  77. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
  78. package/dest/entrypoints/server/index.d.ts +5 -1
  79. package/dest/entrypoints/server/index.d.ts.map +1 -1
  80. package/dest/entrypoints/server/index.js +4 -0
  81. package/dest/entrypoints/server/utils.d.ts +1 -1
  82. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  83. package/dest/entrypoints/server/utils.js +39 -16
  84. package/dest/events/event_service.d.ts +6 -6
  85. package/dest/events/event_service.d.ts.map +1 -1
  86. package/dest/events/event_service.js +19 -22
  87. package/dest/events/private_event_filter_validator.d.ts +5 -5
  88. package/dest/events/private_event_filter_validator.d.ts.map +1 -1
  89. package/dest/events/private_event_filter_validator.js +5 -6
  90. package/dest/job_coordinator/job_coordinator.d.ts +75 -0
  91. package/dest/job_coordinator/job_coordinator.d.ts.map +1 -0
  92. package/dest/job_coordinator/job_coordinator.js +94 -0
  93. package/dest/logs/log_service.d.ts +8 -5
  94. package/dest/logs/log_service.d.ts.map +1 -1
  95. package/dest/logs/log_service.js +28 -30
  96. package/dest/notes/note_service.d.ts +10 -9
  97. package/dest/notes/note_service.d.ts.map +1 -1
  98. package/dest/notes/note_service.js +34 -38
  99. package/dest/notes_filter.d.ts +25 -0
  100. package/dest/notes_filter.d.ts.map +1 -0
  101. package/dest/notes_filter.js +4 -0
  102. package/dest/oracle_version.d.ts +3 -3
  103. package/dest/oracle_version.d.ts.map +1 -1
  104. package/dest/oracle_version.js +4 -3
  105. package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts +4 -0
  106. package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts.map +1 -0
  107. package/dest/private_kernel/hints/{compute_tx_include_by_timestamp.js → compute_tx_expiration_timestamp.js} +12 -12
  108. package/dest/private_kernel/hints/index.d.ts +3 -3
  109. package/dest/private_kernel/hints/index.d.ts.map +1 -1
  110. package/dest/private_kernel/hints/index.js +2 -2
  111. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +28 -0
  112. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -0
  113. package/dest/private_kernel/hints/{build_private_kernel_reset_private_inputs.js → private_kernel_reset_private_inputs_builder.js} +16 -10
  114. package/dest/private_kernel/private_kernel_execution_prover.d.ts +3 -2
  115. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  116. package/dest/private_kernel/private_kernel_execution_prover.js +12 -13
  117. package/dest/private_kernel/private_kernel_oracle.d.ts +24 -24
  118. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
  119. package/dest/private_kernel/private_kernel_oracle.js +94 -2
  120. package/dest/pxe.d.ts +76 -58
  121. package/dest/pxe.d.ts.map +1 -1
  122. package/dest/pxe.js +149 -138
  123. package/dest/storage/address_store/address_store.d.ts +1 -1
  124. package/dest/storage/address_store/address_store.d.ts.map +1 -1
  125. package/dest/storage/address_store/address_store.js +12 -11
  126. package/dest/storage/anchor_block_store/anchor_block_store.d.ts +9 -1
  127. package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -1
  128. package/dest/storage/anchor_block_store/anchor_block_store.js +8 -1
  129. package/dest/storage/capsule_store/capsule_store.d.ts +24 -9
  130. package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -1
  131. package/dest/storage/capsule_store/capsule_store.js +130 -23
  132. package/dest/storage/contract_store/contract_store.d.ts +42 -16
  133. package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
  134. package/dest/storage/contract_store/contract_store.js +157 -84
  135. package/dest/storage/metadata.d.ts +1 -1
  136. package/dest/storage/metadata.js +1 -1
  137. package/dest/storage/note_store/note_store.d.ts +50 -51
  138. package/dest/storage/note_store/note_store.d.ts.map +1 -1
  139. package/dest/storage/note_store/note_store.js +284 -263
  140. package/dest/storage/note_store/stored_note.d.ts +16 -0
  141. package/dest/storage/note_store/stored_note.d.ts.map +1 -0
  142. package/dest/storage/note_store/stored_note.js +43 -0
  143. package/dest/storage/private_event_store/private_event_store.d.ts +47 -7
  144. package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
  145. package/dest/storage/private_event_store/private_event_store.js +231 -73
  146. package/dest/storage/private_event_store/stored_private_event.d.ts +23 -0
  147. package/dest/storage/private_event_store/stored_private_event.d.ts.map +1 -0
  148. package/dest/storage/private_event_store/stored_private_event.js +56 -0
  149. package/dest/storage/tagging_store/recipient_tagging_store.d.ts +15 -8
  150. package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -1
  151. package/dest/storage/tagging_store/recipient_tagging_store.js +88 -19
  152. package/dest/storage/tagging_store/sender_address_book_store.d.ts +1 -1
  153. package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +1 -1
  154. package/dest/storage/tagging_store/sender_address_book_store.js +20 -14
  155. package/dest/storage/tagging_store/sender_tagging_store.d.ts +19 -9
  156. package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
  157. package/dest/storage/tagging_store/sender_tagging_store.js +253 -101
  158. package/dest/tagging/constants.d.ts +2 -0
  159. package/dest/tagging/constants.d.ts.map +1 -0
  160. package/dest/tagging/constants.js +10 -0
  161. package/dest/tagging/get_all_logs_by_tags.d.ts +24 -0
  162. package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -0
  163. package/dest/tagging/get_all_logs_by_tags.js +60 -0
  164. package/dest/tagging/index.d.ts +3 -2
  165. package/dest/tagging/index.d.ts.map +1 -1
  166. package/dest/tagging/index.js +2 -10
  167. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +3 -2
  168. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -1
  169. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +12 -12
  170. package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +2 -2
  171. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +3 -2
  172. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -1
  173. package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +5 -2
  174. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +3 -2
  175. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
  176. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +8 -8
  177. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +1 -1
  178. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -1
  179. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +5 -8
  180. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +5 -2
  181. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -1
  182. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +10 -5
  183. package/package.json +27 -18
  184. package/src/access_scopes.ts +9 -0
  185. package/src/bin/check_oracle_version.ts +1 -0
  186. package/src/block_synchronizer/block_synchronizer.ts +93 -32
  187. package/src/config/index.ts +14 -0
  188. package/src/config/package_info.ts +1 -1
  189. package/src/contract_function_simulator/benchmarked_node.ts +103 -0
  190. package/src/contract_function_simulator/contract_function_simulator.ts +350 -143
  191. package/src/contract_function_simulator/execution_note_cache.ts +44 -25
  192. package/src/contract_function_simulator/index.ts +1 -1
  193. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +6 -2
  194. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +2 -2
  195. package/src/contract_function_simulator/noir-structs/utility_context.ts +6 -25
  196. package/src/contract_function_simulator/oracle/interfaces.ts +22 -12
  197. package/src/contract_function_simulator/oracle/note_packing_utils.ts +10 -10
  198. package/src/contract_function_simulator/oracle/oracle.ts +79 -47
  199. package/src/contract_function_simulator/oracle/private_execution.ts +1 -69
  200. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +119 -137
  201. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +198 -115
  202. package/src/contract_logging.ts +39 -0
  203. package/src/contract_sync/contract_sync_service.ts +152 -0
  204. package/src/contract_sync/helpers.ts +98 -0
  205. package/src/debug/pxe_debug_utils.ts +63 -18
  206. package/src/entrypoints/client/bundle/index.ts +3 -0
  207. package/src/entrypoints/client/bundle/utils.ts +23 -16
  208. package/src/entrypoints/client/lazy/index.ts +3 -0
  209. package/src/entrypoints/client/lazy/utils.ts +24 -17
  210. package/src/entrypoints/pxe_creation_options.ts +4 -2
  211. package/src/entrypoints/server/index.ts +4 -0
  212. package/src/entrypoints/server/utils.ts +33 -41
  213. package/src/events/event_service.ts +19 -25
  214. package/src/events/private_event_filter_validator.ts +3 -5
  215. package/src/job_coordinator/job_coordinator.ts +150 -0
  216. package/src/logs/log_service.ts +40 -34
  217. package/src/notes/note_service.ts +41 -45
  218. package/src/notes_filter.ts +26 -0
  219. package/src/oracle_version.ts +4 -3
  220. package/src/private_kernel/hints/{compute_tx_include_by_timestamp.ts → compute_tx_expiration_timestamp.ts} +13 -13
  221. package/src/private_kernel/hints/index.ts +2 -2
  222. package/src/private_kernel/hints/{build_private_kernel_reset_private_inputs.ts → private_kernel_reset_private_inputs_builder.ts} +39 -28
  223. package/src/private_kernel/private_kernel_execution_prover.ts +15 -14
  224. package/src/private_kernel/private_kernel_oracle.ts +116 -36
  225. package/src/pxe.ts +280 -209
  226. package/src/storage/address_store/address_store.ts +15 -15
  227. package/src/storage/anchor_block_store/anchor_block_store.ts +8 -0
  228. package/src/storage/capsule_store/capsule_store.ts +159 -23
  229. package/src/storage/contract_store/contract_store.ts +186 -96
  230. package/src/storage/metadata.ts +1 -1
  231. package/src/storage/note_store/note_store.ts +326 -320
  232. package/src/storage/note_store/stored_note.ts +48 -0
  233. package/src/storage/private_event_store/private_event_store.ts +301 -79
  234. package/src/storage/private_event_store/stored_private_event.ts +73 -0
  235. package/src/storage/tagging_store/recipient_tagging_store.ts +106 -20
  236. package/src/storage/tagging_store/sender_address_book_store.ts +20 -14
  237. package/src/storage/tagging_store/sender_tagging_store.ts +294 -109
  238. package/src/tagging/constants.ts +10 -0
  239. package/src/tagging/get_all_logs_by_tags.ts +92 -0
  240. package/src/tagging/index.ts +2 -11
  241. package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +25 -11
  242. package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +2 -2
  243. package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +7 -1
  244. package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +10 -7
  245. package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +5 -13
  246. package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +16 -4
  247. package/dest/contract_function_simulator/proxied_node.d.ts +0 -9
  248. package/dest/contract_function_simulator/proxied_node.d.ts.map +0 -1
  249. package/dest/contract_function_simulator/proxied_node.js +0 -27
  250. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +0 -28
  251. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +0 -1
  252. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +0 -4
  253. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +0 -1
  254. package/dest/private_kernel/private_kernel_oracle_impl.d.ts +0 -46
  255. package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +0 -1
  256. package/dest/private_kernel/private_kernel_oracle_impl.js +0 -86
  257. package/dest/public_storage/public_storage_service.d.ts +0 -24
  258. package/dest/public_storage/public_storage_service.d.ts.map +0 -1
  259. package/dest/public_storage/public_storage_service.js +0 -26
  260. package/dest/tree_membership/tree_membership_service.d.ts +0 -52
  261. package/dest/tree_membership/tree_membership_service.d.ts.map +0 -1
  262. package/dest/tree_membership/tree_membership_service.js +0 -84
  263. package/src/contract_function_simulator/proxied_node.ts +0 -33
  264. package/src/private_kernel/private_kernel_oracle_impl.ts +0 -133
  265. package/src/public_storage/public_storage_service.ts +0 -33
  266. package/src/tree_membership/tree_membership_service.ts +0 -112
@@ -5,11 +5,13 @@ import { MerkleTreeId } from '@aztec/stdlib/trees';
5
5
  export class NoteService {
6
6
  noteStore;
7
7
  aztecNode;
8
- anchorBlockStore;
9
- constructor(noteStore, aztecNode, anchorBlockStore){
8
+ anchorBlockHeader;
9
+ jobId;
10
+ constructor(noteStore, aztecNode, anchorBlockHeader, jobId){
10
11
  this.noteStore = noteStore;
11
12
  this.aztecNode = aztecNode;
12
- this.anchorBlockStore = anchorBlockStore;
13
+ this.anchorBlockHeader = anchorBlockHeader;
14
+ this.jobId = jobId;
13
15
  }
14
16
  /**
15
17
  * Retrieves a set of notes stored in the database for a given contract address and storage slot.
@@ -26,8 +28,8 @@ export class NoteService {
26
28
  storageSlot,
27
29
  status,
28
30
  scopes
29
- });
30
- return noteDaos.map(({ contractAddress, owner, storageSlot, randomness, noteNonce, note, noteHash, siloedNullifier, index })=>({
31
+ }, this.jobId);
32
+ return noteDaos.map(({ contractAddress, owner, storageSlot, randomness, noteNonce, note, noteHash, siloedNullifier })=>({
31
33
  contractAddress,
32
34
  owner,
33
35
  storageSlot,
@@ -35,9 +37,8 @@ export class NoteService {
35
37
  noteNonce,
36
38
  note,
37
39
  noteHash,
38
- siloedNullifier,
39
- // PXE can use this index to get full MembershipWitness
40
- index
40
+ isPending: false,
41
+ siloedNullifier
41
42
  }));
42
43
  }
43
44
  /**
@@ -51,11 +52,12 @@ export class NoteService {
51
52
  * This allows recent nullifications to be processed even if the node is not an archive node.
52
53
  *
53
54
  * @param contractAddress - The contract whose notes should be checked and nullified.
54
- */ async syncNoteNullifiers(contractAddress) {
55
- const syncedBlockNumber = (await this.anchorBlockStore.getBlockHeader()).getBlockNumber();
55
+ */ async syncNoteNullifiers(contractAddress, scopes) {
56
+ const anchorBlockHash = await this.anchorBlockHeader.hash();
56
57
  const contractNotes = await this.noteStore.getNotes({
57
- contractAddress
58
- });
58
+ contractAddress,
59
+ scopes
60
+ }, this.jobId);
59
61
  if (contractNotes.length === 0) {
60
62
  return;
61
63
  }
@@ -72,7 +74,7 @@ export class NoteService {
72
74
  }, [
73
75
  []
74
76
  ]);
75
- const nullifierIndexes = (await Promise.all(nullifierBatches.map((batch)=>this.aztecNode.findLeavesIndexes(syncedBlockNumber, MerkleTreeId.NULLIFIER_TREE, batch)))).flat();
77
+ const nullifierIndexes = (await Promise.all(nullifierBatches.map((batch)=>this.aztecNode.findLeavesIndexes(anchorBlockHash, MerkleTreeId.NULLIFIER_TREE, batch)))).flat();
76
78
  const foundNullifiers = nullifiersToCheck.map((nullifier, i)=>{
77
79
  if (nullifierIndexes[i] !== undefined) {
78
80
  return {
@@ -83,9 +85,9 @@ export class NoteService {
83
85
  };
84
86
  }
85
87
  }).filter((nullifier)=>nullifier !== undefined);
86
- await this.noteStore.applyNullifiers(foundNullifiers);
88
+ await this.noteStore.applyNullifiers(foundNullifiers, this.jobId);
87
89
  }
88
- async deliverNote(contractAddress, owner, storageSlot, randomness, noteNonce, content, noteHash, nullifier, txHash, recipient) {
90
+ async validateAndStoreNote(contractAddress, owner, storageSlot, randomness, noteNonce, content, noteHash, nullifier, txHash, recipient) {
89
91
  // We are going to store the new note in the NoteStore, which will let us later return it via `getNotes`.
90
92
  // There's two things we need to check before we do this however:
91
93
  // - we must make sure the note does actually exist in the note hash tree
@@ -104,49 +106,43 @@ export class NoteService {
104
106
  // number which *should* be recent enough to be available, even for non-archive nodes.
105
107
  // Also note that the note should never be ahead of the synced block here since `fetchTaggedLogs` only processes
106
108
  // logs up to the synced block making this only an additional safety check.
107
- const syncedBlockNumber = (await this.anchorBlockStore.getBlockHeader()).getBlockNumber();
109
+ const anchorBlockNumber = this.anchorBlockHeader.getBlockNumber();
110
+ const anchorBlockHash = await this.anchorBlockHeader.hash();
108
111
  // By computing siloed and unique note hashes ourselves we prevent contracts from interfering with the note storage
109
112
  // of other contracts, which would constitute a security breach.
110
113
  const uniqueNoteHash = await computeUniqueNoteHash(noteNonce, await siloNoteHash(contractAddress, noteHash));
111
114
  const siloedNullifier = await siloNullifier(contractAddress, nullifier);
112
- const txEffect = await this.aztecNode.getTxEffect(txHash);
115
+ const [txEffect, [nullifierIndex]] = await Promise.all([
116
+ this.aztecNode.getTxEffect(txHash),
117
+ this.aztecNode.findLeavesIndexes(anchorBlockHash, MerkleTreeId.NULLIFIER_TREE, [
118
+ siloedNullifier
119
+ ])
120
+ ]);
113
121
  if (!txEffect) {
114
122
  throw new Error(`Could not find tx effect for tx hash ${txHash}`);
115
123
  }
116
- if (txEffect.l2BlockNumber > syncedBlockNumber) {
117
- throw new Error(`Could not find tx effect for tx hash ${txHash} as of block number ${syncedBlockNumber}`);
124
+ if (txEffect.l2BlockNumber > anchorBlockNumber) {
125
+ throw new Error(`Could not find tx effect for tx hash ${txHash} as of block number ${anchorBlockNumber}`);
118
126
  }
119
- const noteInTx = txEffect.data.noteHashes.some((nh)=>nh.equals(uniqueNoteHash));
120
- if (!noteInTx) {
127
+ // Find the index of the note hash in the noteHashes array to determine note ordering within the tx
128
+ const noteIndexInTx = txEffect.data.noteHashes.findIndex((nh)=>nh.equals(uniqueNoteHash));
129
+ if (noteIndexInTx === -1) {
121
130
  throw new Error(`Note hash ${noteHash} (uniqued as ${uniqueNoteHash}) is not present in tx ${txHash}`);
122
131
  }
123
- // We store notes by their index in the global note hash tree, which has the convenient side effect of validating
124
- // note existence in said tree. We concurrently also check if the note's nullifier exists, performing all node
125
- // queries in a single round-trip.
126
- const [[uniqueNoteHashTreeIndexInBlock], [nullifierIndex]] = await Promise.all([
127
- this.aztecNode.findLeavesIndexes(syncedBlockNumber, MerkleTreeId.NOTE_HASH_TREE, [
128
- uniqueNoteHash
129
- ]),
130
- this.aztecNode.findLeavesIndexes(syncedBlockNumber, MerkleTreeId.NULLIFIER_TREE, [
131
- siloedNullifier
132
- ])
133
- ]);
134
- if (uniqueNoteHashTreeIndexInBlock === undefined) {
135
- throw new Error(`Note hash ${noteHash} (uniqued as ${uniqueNoteHash}) is not present on the tree at block ${syncedBlockNumber} (from tx ${txHash})`);
136
- }
137
- const noteDao = new NoteDao(new Note(content), contractAddress, owner, storageSlot, randomness, noteNonce, noteHash, siloedNullifier, txHash, uniqueNoteHashTreeIndexInBlock.l2BlockNumber, uniqueNoteHashTreeIndexInBlock.l2BlockHash.toString(), uniqueNoteHashTreeIndexInBlock.data);
132
+ const noteDao = new NoteDao(new Note(content), contractAddress, owner, storageSlot, randomness, noteNonce, noteHash, siloedNullifier, txHash, txEffect.l2BlockNumber, txEffect.l2BlockHash.toString(), txEffect.txIndexInBlock, noteIndexInTx);
138
133
  // The note was found by `recipient`, so we use that as the scope when storing the note.
139
134
  await this.noteStore.addNotes([
140
135
  noteDao
141
- ], recipient);
136
+ ], recipient, this.jobId);
142
137
  if (nullifierIndex !== undefined) {
138
+ // We found nullifier index which implies that the note has already been nullified.
143
139
  const { data: _, ...blockHashAndNum } = nullifierIndex;
144
140
  await this.noteStore.applyNullifiers([
145
141
  {
146
142
  data: siloedNullifier,
147
143
  ...blockHashAndNum
148
144
  }
149
- ]);
145
+ ], this.jobId);
150
146
  }
151
147
  }
152
148
  }
@@ -0,0 +1,25 @@
1
+ import type { Fr } from '@aztec/foundation/curves/bn254';
2
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
3
+ import type { NoteStatus } from '@aztec/stdlib/note';
4
+ import type { AccessScopes } from './access_scopes.js';
5
+ /**
6
+ * A filter used to fetch notes.
7
+ * @remarks This filter is applied as an intersection of all its params.
8
+ */
9
+ export type NotesFilter = {
10
+ /**
11
+ * The contract address the note belongs to.
12
+ * @remarks Providing a contract address is required as we need that information to trigger private state sync.
13
+ */
14
+ contractAddress: AztecAddress;
15
+ /** The owner of the note. */
16
+ owner?: AztecAddress;
17
+ /** The specific storage location of the note on the contract. */
18
+ storageSlot?: Fr;
19
+ /** The status of the note. Defaults to 'ACTIVE'. */
20
+ status?: NoteStatus;
21
+ /** The siloed nullifier for the note. */
22
+ siloedNullifier?: Fr;
23
+ scopes: AccessScopes;
24
+ };
25
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZXNfZmlsdGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvbm90ZXNfZmlsdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3pELE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLFVBQVUsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRXJELE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRXZEOzs7R0FHRztBQUNILE1BQU0sTUFBTSxXQUFXLEdBQUc7SUFDeEI7OztPQUdHO0lBQ0gsZUFBZSxFQUFFLFlBQVksQ0FBQztJQUM5Qiw2QkFBNkI7SUFDN0IsS0FBSyxDQUFDLEVBQUUsWUFBWSxDQUFDO0lBQ3JCLGlFQUFpRTtJQUNqRSxXQUFXLENBQUMsRUFBRSxFQUFFLENBQUM7SUFDakIsb0RBQW9EO0lBQ3BELE1BQU0sQ0FBQyxFQUFFLFVBQVUsQ0FBQztJQUNwQix5Q0FBeUM7SUFDekMsZUFBZSxDQUFDLEVBQUUsRUFBRSxDQUFDO0lBQ3JCLE1BQU0sRUFBRSxZQUFZLENBQUM7Q0FDdEIsQ0FBQyJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notes_filter.d.ts","sourceRoot":"","sources":["../src/notes_filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,eAAe,EAAE,YAAY,CAAC;IAC9B,6BAA6B;IAC7B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,iEAAiE;IACjE,WAAW,CAAC,EAAE,EAAE,CAAC;IACjB,oDAAoD;IACpD,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,yCAAyC;IACzC,eAAe,CAAC,EAAE,EAAE,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * A filter used to fetch notes.
3
+ * @remarks This filter is applied as an intersection of all its params.
4
+ */ export { };
@@ -1,3 +1,3 @@
1
- export declare const ORACLE_VERSION = 5;
2
- export declare const ORACLE_INTERFACE_HASH = "d603c17a97034d978ca453d2bce3aacae139539dee28bbc46e8f8c7177a348ec";
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JhY2xlX3ZlcnNpb24uZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9vcmFjbGVfdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxlQUFPLE1BQU0sY0FBYyxJQUFJLENBQUM7QUFJaEMsZUFBTyxNQUFNLHFCQUFxQixxRUFBcUUsQ0FBQyJ9
1
+ export declare const ORACLE_VERSION = 12;
2
+ export declare const ORACLE_INTERFACE_HASH = "666a8a7fc697f72b29dbf0ae7464db269cf5afa019acac8861f814543147dbb4";
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JhY2xlX3ZlcnNpb24uZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9vcmFjbGVfdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxlQUFPLE1BQU0sY0FBYyxLQUFLLENBQUM7QUFLakMsZUFBTyxNQUFNLHFCQUFxQixxRUFBcUUsQ0FBQyJ9
@@ -1 +1 @@
1
- {"version":3,"file":"oracle_version.d.ts","sourceRoot":"","sources":["../src/oracle_version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,IAAI,CAAC;AAIhC,eAAO,MAAM,qBAAqB,qEAAqE,CAAC"}
1
+ {"version":3,"file":"oracle_version.d.ts","sourceRoot":"","sources":["../src/oracle_version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,KAAK,CAAC;AAKjC,eAAO,MAAM,qBAAqB,qEAAqE,CAAC"}
@@ -4,7 +4,8 @@
4
4
  ///
5
5
  /// @dev Whenever a contract function or Noir test is run, the `utilityAssertCompatibleOracleVersion` oracle is called
6
6
  /// and if the oracle version is incompatible an error is thrown.
7
- export const ORACLE_VERSION = 5;
7
+ export const ORACLE_VERSION = 12;
8
8
  /// This hash is computed as by hashing the Oracle interface and it is used to detect when the Oracle interface changes,
9
- /// which in turn implies that you need to update the ORACLE_VERSION constant.
10
- export const ORACLE_INTERFACE_HASH = 'd603c17a97034d978ca453d2bce3aacae139539dee28bbc46e8f8c7177a348ec';
9
+ /// which in turn implies that you need to update the ORACLE_VERSION constant in this file and in
10
+ /// `noir-projects/aztec-nr/aztec/src/oracle/version.nr`.
11
+ export const ORACLE_INTERFACE_HASH = '666a8a7fc697f72b29dbf0ae7464db269cf5afa019acac8861f814543147dbb4';
@@ -0,0 +1,4 @@
1
+ import type { PrivateKernelCircuitPublicInputs } from '@aztec/stdlib/kernel';
2
+ import type { UInt64 } from '@aztec/stdlib/types';
3
+ export declare function computeTxExpirationTimestamp(previousKernel: PrivateKernelCircuitPublicInputs, txLifetime?: number): UInt64;
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcHV0ZV90eF9leHBpcmF0aW9uX3RpbWVzdGFtcC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3ByaXZhdGVfa2VybmVsL2hpbnRzL2NvbXB1dGVfdHhfZXhwaXJhdGlvbl90aW1lc3RhbXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsZ0NBQWdDLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUM3RSxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQXFCbEQsd0JBQWdCLDRCQUE0QixDQUMxQyxjQUFjLEVBQUUsZ0NBQWdDLEVBQ2hELFVBQVUsU0FBa0IsR0FDM0IsTUFBTSxDQStCUiJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compute_tx_expiration_timestamp.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/compute_tx_expiration_timestamp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAqBlD,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,gCAAgC,EAChD,UAAU,SAAkB,GAC3B,MAAM,CA+BR"}
@@ -1,41 +1,41 @@
1
- import { MAX_INCLUDE_BY_TIMESTAMP_DURATION } from '@aztec/constants';
1
+ import { MAX_TX_LIFETIME } from '@aztec/constants';
2
2
  const ROUNDED_DURATIONS = [
3
3
  3600,
4
4
  1800,
5
5
  1
6
6
  ];
7
- function roundTimestamp(blockTimestamp, includeByTimestamp) {
7
+ function roundTimestamp(blockTimestamp, expirationTimestamp) {
8
8
  return ROUNDED_DURATIONS.reduce((timestamp, duration)=>{
9
9
  if (timestamp <= blockTimestamp) {
10
10
  // The timestamp must be greater than the block timestamp.
11
11
  // If it is too small, round it down again using a smaller duration.
12
- const totalDuration = includeByTimestamp - blockTimestamp;
12
+ const totalDuration = expirationTimestamp - blockTimestamp;
13
13
  const roundedDuration = totalDuration - totalDuration % BigInt(duration);
14
14
  return blockTimestamp + roundedDuration;
15
15
  }
16
16
  return timestamp;
17
17
  }, 0n);
18
18
  }
19
- export function computeTxIncludeByTimestamp(previousKernel, maxDuration = MAX_INCLUDE_BY_TIMESTAMP_DURATION) {
20
- if (maxDuration > MAX_INCLUDE_BY_TIMESTAMP_DURATION) {
21
- throw new Error(`Custom max duration cannot be greater than the max allowed. Max allowed: ${MAX_INCLUDE_BY_TIMESTAMP_DURATION}. Custom value: ${maxDuration}.`);
19
+ export function computeTxExpirationTimestamp(previousKernel, txLifetime = MAX_TX_LIFETIME) {
20
+ if (txLifetime > MAX_TX_LIFETIME) {
21
+ throw new Error(`Custom tx lifetime cannot be greater than the max allowed. Max allowed: ${MAX_TX_LIFETIME}. Custom value: ${txLifetime}.`);
22
22
  }
23
23
  const anchorBlockTimestamp = previousKernel.constants.anchorBlockHeader.globalVariables.timestamp;
24
- const maxTimestamp = anchorBlockTimestamp + BigInt(maxDuration);
25
- const includeByTimestamp = previousKernel.includeByTimestamp;
26
- // If the includeByTimestamp set during the tx execution is greater than or equal to the max allowed duration,
24
+ const maxTimestamp = anchorBlockTimestamp + BigInt(txLifetime);
25
+ const expirationTimestamp = previousKernel.expirationTimestamp;
26
+ // If the expirationTimestamp set during the tx execution is greater than or equal to the max allowed duration,
27
27
  // use the maximum allowed timestamp.
28
28
  // Note: It shouldn't be larger than the max allowed duration, but we check for it anyway.
29
- if (includeByTimestamp >= maxTimestamp) {
29
+ if (expirationTimestamp >= maxTimestamp) {
30
30
  return maxTimestamp;
31
31
  }
32
32
  // Round it down to the nearest hour/min/second to reduce precision and avoid revealing the exact value.
33
33
  // This makes it harder for others to infer what function calls may have been used to produce a specific timestamp.
34
- const roundedTimestamp = roundTimestamp(anchorBlockTimestamp, includeByTimestamp);
34
+ const roundedTimestamp = roundTimestamp(anchorBlockTimestamp, expirationTimestamp);
35
35
  // The tx can't be published if the timestamp is the same or less than the anchor block's timestamp.
36
36
  // Future blocks will have a greater timestamp, so the tx would never be included.
37
37
  if (roundedTimestamp <= anchorBlockTimestamp) {
38
- throw new Error(`Include-by timestamp must be greater than the anchor block timestamp. Anchor block timestamp: ${anchorBlockTimestamp}. Include-by timestamp: ${includeByTimestamp}.`);
38
+ throw new Error(`Include-by timestamp must be greater than the anchor block timestamp. Anchor block timestamp: ${anchorBlockTimestamp}. Include-by timestamp: ${expirationTimestamp}.`);
39
39
  }
40
40
  return roundedTimestamp;
41
41
  }
@@ -1,3 +1,3 @@
1
- export * from './build_private_kernel_reset_private_inputs.js';
2
- export * from './compute_tx_include_by_timestamp.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wcml2YXRlX2tlcm5lbC9oaW50cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGdEQUFnRCxDQUFDO0FBQy9ELGNBQWMsc0NBQXNDLENBQUMifQ==
1
+ export * from './private_kernel_reset_private_inputs_builder.js';
2
+ export * from './compute_tx_expiration_timestamp.js';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wcml2YXRlX2tlcm5lbC9oaW50cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGtEQUFrRCxDQUFDO0FBQ2pFLGNBQWMsc0NBQXNDLENBQUMifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/index.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC;AACjE,cAAc,sCAAsC,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './build_private_kernel_reset_private_inputs.js';
2
- export * from './compute_tx_include_by_timestamp.js';
1
+ export * from './private_kernel_reset_private_inputs_builder.js';
2
+ export * from './compute_tx_expiration_timestamp.js';
@@ -0,0 +1,28 @@
1
+ import { type PrivateKernelCircuitPublicInputs, PrivateKernelResetCircuitPrivateInputs, type PrivateKernelSimulateOutput } from '@aztec/stdlib/kernel';
2
+ import { type PrivateCallExecutionResult } from '@aztec/stdlib/tx';
3
+ import type { PrivateKernelOracle } from '../private_kernel_oracle.js';
4
+ export declare class PrivateKernelResetPrivateInputsBuilder {
5
+ private previousKernelOutput;
6
+ private executionStack;
7
+ private noteHashNullifierCounterMap;
8
+ private splitCounter;
9
+ private previousKernel;
10
+ private nextIteration?;
11
+ private noteHashResetActions;
12
+ private nullifierResetActions;
13
+ private numTransientData?;
14
+ private transientDataSquashingHints;
15
+ private requestedDimensions;
16
+ constructor(previousKernelOutput: PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>, executionStack: PrivateCallExecutionResult[], noteHashNullifierCounterMap: Map<number, number>, splitCounter: number);
17
+ needsReset(): boolean;
18
+ build(oracle: PrivateKernelOracle): Promise<PrivateKernelResetCircuitPrivateInputs>;
19
+ private reduceReadRequestActions;
20
+ private needsResetNoteHashReadRequests;
21
+ private needsResetNullifierReadRequests;
22
+ private needsResetNullifierKeys;
23
+ private needsResetTransientData;
24
+ private needsSiloNoteHashes;
25
+ private needsSiloNullifiers;
26
+ private needsSiloPrivateLogs;
27
+ }
28
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfcmVzZXRfcHJpdmF0ZV9pbnB1dHNfYnVpbGRlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3ByaXZhdGVfa2VybmVsL2hpbnRzL3ByaXZhdGVfa2VybmVsX3Jlc2V0X3ByaXZhdGVfaW5wdXRzX2J1aWxkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZUEsT0FBTyxFQUtMLEtBQUssZ0NBQWdDLEVBRXJDLHNDQUFzQyxFQUd0QyxLQUFLLDJCQUEyQixFQWVqQyxNQUFNLHNCQUFzQixDQUFDO0FBQzlCLE9BQU8sRUFBRSxLQUFLLDBCQUEwQixFQUFpQixNQUFNLGtCQUFrQixDQUFDO0FBR2xGLE9BQU8sS0FBSyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUE0Q3ZFLHFCQUFhLHNDQUFzQztJQVkvQyxPQUFPLENBQUMsb0JBQW9CO0lBQzVCLE9BQU8sQ0FBQyxjQUFjO0lBQ3RCLE9BQU8sQ0FBQywyQkFBMkI7SUFDbkMsT0FBTyxDQUFDLFlBQVk7SUFkdEIsT0FBTyxDQUFDLGNBQWMsQ0FBbUM7SUFFekQsT0FBTyxDQUFDLGFBQWEsQ0FBQyxDQUE2QjtJQUVuRCxPQUFPLENBQUMsb0JBQW9CLENBQXFFO0lBQ2pHLE9BQU8sQ0FBQyxxQkFBcUIsQ0FBcUU7SUFDbEcsT0FBTyxDQUFDLGdCQUFnQixDQUFDLENBQVM7SUFDbEMsT0FBTyxDQUFDLDJCQUEyQixDQUFrRTtJQUNyRyxPQUFPLENBQUMsbUJBQW1CLENBQStCO0lBRTFELFlBQ1Usb0JBQW9CLEVBQUUsMkJBQTJCLENBQUMsZ0NBQWdDLENBQUMsRUFDbkYsY0FBYyxFQUFFLDBCQUEwQixFQUFFLEVBQzVDLDJCQUEyQixFQUFFLEdBQUcsQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLEVBQ2hELFlBQVksRUFBRSxNQUFNLEVBVzdCO0lBRUQsVUFBVSxJQUFJLE9BQU8sQ0FzQnBCO0lBRUssS0FBSyxDQUFDLE1BQU0sRUFBRSxtQkFBbUIsbURBK0V0QztJQUVELE9BQU8sQ0FBQyx3QkFBd0I7SUEyQmhDLE9BQU8sQ0FBQyw4QkFBOEI7SUF1RHRDLE9BQU8sQ0FBQywrQkFBK0I7SUF1RHZDLE9BQU8sQ0FBQyx1QkFBdUI7SUFhL0IsT0FBTyxDQUFDLHVCQUF1QjtJQXNFL0IsT0FBTyxDQUFDLG1CQUFtQjtJQWMzQixPQUFPLENBQUMsbUJBQW1CO0lBa0IzQixPQUFPLENBQUMsb0JBQW9CO0NBcUI3QiJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private_kernel_reset_private_inputs_builder.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts"],"names":[],"mappings":"AAeA,OAAO,EAKL,KAAK,gCAAgC,EAErC,sCAAsC,EAGtC,KAAK,2BAA2B,EAejC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,0BAA0B,EAAiB,MAAM,kBAAkB,CAAC;AAGlF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AA4CvE,qBAAa,sCAAsC;IAY/C,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,2BAA2B;IACnC,OAAO,CAAC,YAAY;IAdtB,OAAO,CAAC,cAAc,CAAmC;IAEzD,OAAO,CAAC,aAAa,CAAC,CAA6B;IAEnD,OAAO,CAAC,oBAAoB,CAAqE;IACjG,OAAO,CAAC,qBAAqB,CAAqE;IAClG,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAClC,OAAO,CAAC,2BAA2B,CAAkE;IACrG,OAAO,CAAC,mBAAmB,CAA+B;IAE1D,YACU,oBAAoB,EAAE,2BAA2B,CAAC,gCAAgC,CAAC,EACnF,cAAc,EAAE,0BAA0B,EAAE,EAC5C,2BAA2B,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAChD,YAAY,EAAE,MAAM,EAW7B;IAED,UAAU,IAAI,OAAO,CAsBpB;IAEK,KAAK,CAAC,MAAM,EAAE,mBAAmB,mDA+EtC;IAED,OAAO,CAAC,wBAAwB;IA2BhC,OAAO,CAAC,8BAA8B;IAuDtC,OAAO,CAAC,+BAA+B;IAuDvC,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,uBAAuB;IAsE/B,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,mBAAmB;IAkB3B,OAAO,CAAC,oBAAoB;CAqB7B"}
@@ -25,7 +25,7 @@ function getNullifierMembershipWitnessResolver(oracle) {
25
25
  };
26
26
  };
27
27
  }
28
- async function getMasterSecretKeysAndAppKeyGenerators(keyValidationRequests, numRequestsToVerify, oracle) {
28
+ async function getMasterSecretKeysAndKeyTypeDomainSeparators(keyValidationRequests, numRequestsToVerify, oracle) {
29
29
  const numRequestsToProcess = Math.min(keyValidationRequests.claimedLength, numRequestsToVerify);
30
30
  const keysHints = await Promise.all(keyValidationRequests.array.slice(0, numRequestsToProcess).map(async ({ request })=>{
31
31
  const secretKeys = await oracle.getMasterSecretKey(request.request.pkM);
@@ -82,7 +82,7 @@ export class PrivateKernelResetPrivateInputsBuilder {
82
82
  return result.some((r)=>r);
83
83
  }
84
84
  }
85
- async build(oracle, noteHashLeafIndexMap) {
85
+ async build(oracle) {
86
86
  if (privateKernelResetDimensionNames.every((name)=>!this.requestedDimensions[name])) {
87
87
  throw new Error('Reset is not required.');
88
88
  }
@@ -92,16 +92,22 @@ export class PrivateKernelResetPrivateInputsBuilder {
92
92
  // The dimensions found must be big enough to reset all values, i.e. empty remainder.
93
93
  const allowRemainder = isInner;
94
94
  const dimensions = findPrivateKernelResetDimensions(this.requestedDimensions, privateKernelResetDimensionsConfig, isInner, allowRemainder);
95
- const previousVkMembershipWitness = await oracle.getVkMembershipWitness(this.previousKernelOutput.verificationKey.keyAsFields);
96
- const vkData = new VkData(this.previousKernelOutput.verificationKey, Number(previousVkMembershipWitness.leafIndex), previousVkMembershipWitness.siblingPath);
97
- const previousKernelData = new PrivateKernelData(this.previousKernelOutput.publicInputs, vkData);
98
95
  this.reduceReadRequestActions(this.noteHashResetActions, dimensions.NOTE_HASH_PENDING_READ, dimensions.NOTE_HASH_SETTLED_READ);
99
96
  this.reduceReadRequestActions(this.nullifierResetActions, dimensions.NULLIFIER_PENDING_READ, dimensions.NULLIFIER_SETTLED_READ);
97
+ // Execute all the expensive node querying operations in parallel.
98
+ const [previousVkMembershipWitness, noteHashReadRequestHints, nullifierReadRequestHints, keyValidationHints] = await Promise.all([
99
+ oracle.getVkMembershipWitness(this.previousKernelOutput.verificationKey.keyAsFields),
100
+ buildNoteHashReadRequestHintsFromResetActions(oracle, this.previousKernel.validationRequests.noteHashReadRequests, this.previousKernel.end.noteHashes, this.noteHashResetActions),
101
+ buildNullifierReadRequestHintsFromResetActions({
102
+ getNullifierMembershipWitness: getNullifierMembershipWitnessResolver(oracle)
103
+ }, this.previousKernel.validationRequests.nullifierReadRequests, this.nullifierResetActions),
104
+ getMasterSecretKeysAndKeyTypeDomainSeparators(this.previousKernel.validationRequests.scopedKeyValidationRequestsAndSeparators, dimensions.KEY_VALIDATION, oracle)
105
+ ]);
106
+ const vkData = new VkData(this.previousKernelOutput.verificationKey, Number(previousVkMembershipWitness.leafIndex), previousVkMembershipWitness.siblingPath);
107
+ const previousKernelData = new PrivateKernelData(this.previousKernelOutput.publicInputs, vkData);
100
108
  // TODO: Enable padding when we have a better idea what are the final amounts we should pad to.
101
109
  const paddedSideEffects = PaddedSideEffects.empty();
102
- return new PrivateKernelResetCircuitPrivateInputs(previousKernelData, paddedSideEffects, new PrivateKernelResetHints(await buildNoteHashReadRequestHintsFromResetActions(oracle, this.previousKernel.validationRequests.noteHashReadRequests, this.previousKernel.end.noteHashes, this.noteHashResetActions, noteHashLeafIndexMap), await buildNullifierReadRequestHintsFromResetActions({
103
- getNullifierMembershipWitness: getNullifierMembershipWitnessResolver(oracle)
104
- }, this.previousKernel.validationRequests.nullifierReadRequests, this.nullifierResetActions), await getMasterSecretKeysAndAppKeyGenerators(this.previousKernel.validationRequests.scopedKeyValidationRequestsAndGenerators, dimensions.KEY_VALIDATION, oracle), this.transientDataSquashingHints), dimensions);
110
+ return new PrivateKernelResetCircuitPrivateInputs(previousKernelData, paddedSideEffects, new PrivateKernelResetHints(noteHashReadRequestHints, nullifierReadRequestHints, keyValidationHints, this.transientDataSquashingHints), dimensions);
105
111
  }
106
112
  reduceReadRequestActions(resetActions, maxPending, maxSettled) {
107
113
  let numPending = 0;
@@ -185,8 +191,8 @@ export class PrivateKernelResetPrivateInputsBuilder {
185
191
  return true;
186
192
  }
187
193
  needsResetNullifierKeys() {
188
- const numCurr = this.previousKernel.validationRequests.scopedKeyValidationRequestsAndGenerators.claimedLength;
189
- const numNext = this.nextIteration ? this.nextIteration.keyValidationRequestsAndGenerators.claimedLength : 0;
194
+ const numCurr = this.previousKernel.validationRequests.scopedKeyValidationRequestsAndSeparators.claimedLength;
195
+ const numNext = this.nextIteration ? this.nextIteration.keyValidationRequestsAndSeparators.claimedLength : 0;
190
196
  const maxAmountToKeep = !this.nextIteration ? 0 : MAX_KEY_VALIDATION_REQUESTS_PER_TX;
191
197
  if (numCurr + numNext <= maxAmountToKeep) {
192
198
  return false;
@@ -1,3 +1,4 @@
1
+ import { type LoggerBindings } from '@aztec/foundation/log';
1
2
  import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
2
3
  import { type PrivateKernelExecutionProofOutput, type PrivateKernelTailCircuitPublicInputs } from '@aztec/stdlib/kernel';
3
4
  import { type PrivateExecutionResult, TxRequest } from '@aztec/stdlib/tx';
@@ -18,7 +19,7 @@ export declare class PrivateKernelExecutionProver {
18
19
  private proofCreator;
19
20
  private fakeProofs;
20
21
  private log;
21
- constructor(oracle: PrivateKernelOracle, proofCreator: PrivateKernelProver, fakeProofs?: boolean);
22
+ constructor(oracle: PrivateKernelOracle, proofCreator: PrivateKernelProver, fakeProofs?: boolean, bindings?: LoggerBindings);
22
23
  /**
23
24
  * Generate a proof for a given transaction request and execution result.
24
25
  * The function iterates through the nested executions in the execution result, creates private call data,
@@ -41,4 +42,4 @@ export declare class PrivateKernelExecutionProver {
41
42
  private getVkData;
42
43
  private createPrivateCallData;
43
44
  }
44
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfZXhlY3V0aW9uX3Byb3Zlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3ByaXZhdGVfa2VybmVsL3ByaXZhdGVfa2VybmVsX2V4ZWN1dGlvbl9wcm92ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUU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AAuD;IAElE,YACU,MAAM,EAAE,mBAAmB,EAC3B,YAAY,EAAE,mBAAmB,EACjC,UAAU,UAAQ,EACxB;IAEJ;;;;;;;;;;OAUG;IACG,gBAAgB,CACpB,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,sBAAsB,EACvC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,WAAW,EAAE,GAAE,kCAI9C,GACA,OAAO,CAAC,iCAAiC,CAAC,oCAAoC,CAAC,CAAC,CAqRlF;IAED;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;YAoBjB,SAAS;YAST,qBAAqB;CA+BpC"}
1
+ {"version":3,"file":"private_kernel_execution_prover.d.ts","sourceRoot":"","sources":["../../src/private_kernel/private_kernel_execution_prover.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,cAAc,EAAgB,MAAM,uBAAuB,CAAC;AAMvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAQL,KAAK,iCAAiC,EAKtC,KAAK,oCAAoC,EAE1C,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAEL,KAAK,sBAAsB,EAC3B,SAAS,EAGV,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAStE,MAAM,WAAW,kCAAkC;IACjD,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,OAAO,GAAG,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;CAC5D;AAED;;;;;GAKG;AACH,qBAAa,4BAA4B;IAIrC,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,UAAU;IALpB,OAAO,CAAC,GAAG,CAAS;IAEpB,YACU,MAAM,EAAE,mBAAmB,EAC3B,YAAY,EAAE,mBAAmB,EACjC,UAAU,UAAQ,EAC1B,QAAQ,CAAC,EAAE,cAAc,EAG1B;IAED;;;;;;;;;;OAUG;IACG,gBAAgB,CACpB,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,sBAAsB,EACvC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,WAAW,EAAE,GAAE,kCAI9C,GACA,OAAO,CAAC,iCAAiC,CAAC,oCAAoC,CAAC,CAAC,CAoRlF;IAED;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;YAoBjB,SAAS;YAST,qBAAqB;CA+BpC"}
@@ -8,9 +8,9 @@ import { ProtocolContractsList } from '@aztec/protocol-contracts';
8
8
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
9
9
  import { HidingKernelToPublicPrivateInputs, HidingKernelToRollupPrivateInputs, PaddedSideEffectAmounts, PrivateCallData, PrivateKernelCircuitPublicInputs, PrivateKernelData, PrivateKernelInitCircuitPrivateInputs, PrivateKernelInnerCircuitPrivateInputs, PrivateKernelTailCircuitPrivateInputs, PrivateVerificationKeyHints } from '@aztec/stdlib/kernel';
10
10
  import { ChonkProof } from '@aztec/stdlib/proofs';
11
- import { collectNoteHashLeafIndexMap, collectNoteHashNullifierCounterMap, getFinalMinRevertibleSideEffectCounter } from '@aztec/stdlib/tx';
11
+ import { collectNoteHashNullifierCounterMap, getFinalMinRevertibleSideEffectCounter } from '@aztec/stdlib/tx';
12
12
  import { VerificationKeyAsFields, VerificationKeyData, VkData } from '@aztec/stdlib/vks';
13
- import { PrivateKernelResetPrivateInputsBuilder } from './hints/build_private_kernel_reset_private_inputs.js';
13
+ import { PrivateKernelResetPrivateInputsBuilder } from './hints/private_kernel_reset_private_inputs_builder.js';
14
14
  const NULL_SIMULATE_OUTPUT = {
15
15
  publicInputs: PrivateKernelCircuitPublicInputs.empty(),
16
16
  verificationKey: VerificationKeyData.empty(),
@@ -27,11 +27,11 @@ const NULL_SIMULATE_OUTPUT = {
27
27
  proofCreator;
28
28
  fakeProofs;
29
29
  log;
30
- constructor(oracle, proofCreator, fakeProofs = false){
30
+ constructor(oracle, proofCreator, fakeProofs = false, bindings){
31
31
  this.oracle = oracle;
32
32
  this.proofCreator = proofCreator;
33
33
  this.fakeProofs = fakeProofs;
34
- this.log = createLogger('pxe:private-kernel-execution-prover');
34
+ this.log = createLogger('pxe:private-kernel-execution-prover', bindings);
35
35
  }
36
36
  /**
37
37
  * Generate a proof for a given transaction request and execution result.
@@ -60,7 +60,6 @@ const NULL_SIMULATE_OUTPUT = {
60
60
  let firstIteration = true;
61
61
  let output = NULL_SIMULATE_OUTPUT;
62
62
  const executionSteps = [];
63
- const noteHashLeafIndexMap = collectNoteHashLeafIndexMap(executionResult);
64
63
  const noteHashNullifierCounterMap = collectNoteHashNullifierCounterMap(executionResult);
65
64
  const minRevertibleSideEffectCounter = getFinalMinRevertibleSideEffectCounter(executionResult);
66
65
  const splitCounter = isPrivateOnlyTx ? 0 : minRevertibleSideEffectCounter;
@@ -69,7 +68,7 @@ const NULL_SIMULATE_OUTPUT = {
69
68
  let resetBuilder = new PrivateKernelResetPrivateInputsBuilder(output, executionStack, noteHashNullifierCounterMap, splitCounter);
70
69
  while(resetBuilder.needsReset()){
71
70
  const witgenTimer = new Timer();
72
- const privateInputs = await resetBuilder.build(this.oracle, noteHashLeafIndexMap);
71
+ const privateInputs = await resetBuilder.build(this.oracle);
73
72
  output = generateWitnesses ? await this.proofCreator.generateResetOutput(privateInputs) : await this.proofCreator.simulateReset(privateInputs);
74
73
  executionSteps.push({
75
74
  functionName: 'private_kernel_reset',
@@ -137,7 +136,7 @@ const NULL_SIMULATE_OUTPUT = {
137
136
  let resetBuilder = new PrivateKernelResetPrivateInputsBuilder(output, [], noteHashNullifierCounterMap, splitCounter);
138
137
  while(resetBuilder.needsReset()){
139
138
  const witgenTimer = new Timer();
140
- const privateInputs = await resetBuilder.build(this.oracle, noteHashLeafIndexMap);
139
+ const privateInputs = await resetBuilder.build(this.oracle);
141
140
  output = generateWitnesses ? await this.proofCreator.generateResetOutput(privateInputs) : await this.proofCreator.simulateReset(privateInputs);
142
141
  executionSteps.push({
143
142
  functionName: 'private_kernel_reset',
@@ -162,14 +161,14 @@ const NULL_SIMULATE_OUTPUT = {
162
161
  this.log.debug(`Calling private kernel tail with hwm ${previousKernelData.publicInputs.minRevertibleSideEffectCounter}`);
163
162
  // TODO: Enable padding once we better understand the final amounts to pad to.
164
163
  const paddedSideEffectAmounts = PaddedSideEffectAmounts.empty();
165
- // Use the aggregated includeByTimestamp set throughout the tx execution.
166
- // TODO: Call `computeTxIncludeByTimestamp` to round the value down and reduce precision, improving privacy.
167
- const includeByTimestampUpperBound = previousKernelData.publicInputs.includeByTimestamp;
164
+ // Use the aggregated expirationTimestamp set throughout the tx execution.
165
+ // TODO: Call `computeTxExpirationTimestamp` to round the value down and reduce precision, improving privacy.
166
+ const expirationTimestampUpperBound = previousKernelData.publicInputs.expirationTimestamp;
168
167
  const anchorBlockTimestamp = previousKernelData.publicInputs.constants.anchorBlockHeader.globalVariables.timestamp;
169
- if (includeByTimestampUpperBound <= anchorBlockTimestamp) {
170
- throw new Error(`Include-by timestamp must be greater than the anchor block timestamp. Anchor block timestamp: ${anchorBlockTimestamp}. Include-by timestamp: ${includeByTimestampUpperBound}.`);
168
+ if (expirationTimestampUpperBound <= anchorBlockTimestamp) {
169
+ throw new Error(`Include-by timestamp must be greater than the anchor block timestamp. Anchor block timestamp: ${anchorBlockTimestamp}. Include-by timestamp: ${expirationTimestampUpperBound}.`);
171
170
  }
172
- const privateInputs = new PrivateKernelTailCircuitPrivateInputs(previousKernelData, paddedSideEffectAmounts, includeByTimestampUpperBound);
171
+ const privateInputs = new PrivateKernelTailCircuitPrivateInputs(previousKernelData, paddedSideEffectAmounts, expirationTimestampUpperBound);
173
172
  const witgenTimer = new Timer();
174
173
  const tailOutput = generateWitnesses ? await this.proofCreator.generateTailOutput(privateInputs) : await this.proofCreator.simulateTail(privateInputs);
175
174
  executionSteps.push({
@@ -2,62 +2,62 @@ import { FUNCTION_TREE_HEIGHT, NOTE_HASH_TREE_HEIGHT, VK_TREE_HEIGHT } from '@az
2
2
  import type { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import type { GrumpkinScalar, Point } from '@aztec/foundation/curves/grumpkin';
4
4
  import { MembershipWitness } from '@aztec/foundation/trees';
5
+ import type { KeyStore } from '@aztec/key-store';
5
6
  import type { FunctionSelector } from '@aztec/stdlib/abi';
6
7
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
8
+ import { BlockHash } from '@aztec/stdlib/block';
9
+ import { type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
10
+ import type { AztecNode } from '@aztec/stdlib/interfaces/client';
7
11
  import { UpdatedClassIdHints } from '@aztec/stdlib/kernel';
8
- import type { PublicKeys } from '@aztec/stdlib/keys';
9
12
  import type { NullifierMembershipWitness } from '@aztec/stdlib/trees';
10
13
  import type { VerificationKeyAsFields } from '@aztec/stdlib/vks';
14
+ import type { ContractStore } from '../storage/contract_store/contract_store.js';
11
15
  /**
12
16
  * Provides functionality needed by the private kernel for interacting with our state trees.
13
- * This is either PrivateKernelOracleImpl, or a mocked test implementation.
14
17
  */
15
- export interface PrivateKernelOracle {
18
+ export declare class PrivateKernelOracle {
19
+ private contractStore;
20
+ private keyStore;
21
+ private node;
22
+ private blockHash;
23
+ constructor(contractStore: ContractStore, keyStore: KeyStore, node: AztecNode, blockHash: BlockHash);
16
24
  /** Retrieves the preimage of a contract address from the registered contract instances db. */
17
- getContractAddressPreimage(address: AztecAddress): Promise<{
25
+ getContractAddressPreimage(address: AztecAddress): Promise<ContractInstanceWithAddress & {
18
26
  saltedInitializationHash: Fr;
19
- publicKeys: PublicKeys;
20
- currentContractClassId: Fr;
21
- originalContractClassId: Fr;
22
27
  }>;
23
28
  /** Retrieves the preimage of a contract class id from the contract classes db. */
24
29
  getContractClassIdPreimage(contractClassId: Fr): Promise<{
25
30
  artifactHash: Fr;
26
- publicBytecodeCommitment: Fr;
27
31
  privateFunctionsRoot: Fr;
32
+ publicBytecodeCommitment: Fr;
28
33
  }>;
29
- /**
30
- * Returns a membership witness with the sibling path and leaf index in our private functions tree.
31
- */
34
+ /** Returns a membership witness with the sibling path and leaf index in our private functions tree. */
32
35
  getFunctionMembershipWitness(contractClassId: Fr, selector: FunctionSelector): Promise<MembershipWitness<typeof FUNCTION_TREE_HEIGHT>>;
33
36
  /**
34
37
  * Returns a membership witness with the sibling path and leaf index in our protocol VK indexed merkle tree.
35
38
  * Used to validate the previous kernel's verification key.
36
39
  */
37
40
  getVkMembershipWitness(vk: VerificationKeyAsFields): Promise<MembershipWitness<typeof VK_TREE_HEIGHT>>;
38
- /**
39
- * Returns a membership witness with the sibling path and leaf index in our private function indexed merkle tree.
40
- */ getNoteHashMembershipWitness(leafIndex: bigint): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT>>;
41
- /**
42
- * Returns a membership witness with the sibling path and leaf index in our nullifier indexed merkle tree.
43
- */
41
+ /** Returns a membership witness with the sibling path and leaf index in our note hash tree. */
42
+ getNoteHashMembershipWitness(noteHash: Fr): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT> | undefined>;
43
+ /** Returns a membership witness with the sibling path and leaf index in our nullifier indexed merkle tree. */
44
44
  getNullifierMembershipWitness(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
45
- /**
46
- * Returns the root of our note hash merkle tree.
47
- */
45
+ /** Returns the root of our note hash merkle tree. */
48
46
  getNoteHashTreeRoot(): Promise<Fr>;
49
47
  /**
50
48
  * Retrieves the sk_m corresponding to the pk_m.
51
49
  * @throws If the provided public key is not associated with any of the registered accounts.
52
- * @param pkM - The master public key to get secret key for.
50
+ * @param masterPublicKey - The master public key to get secret key for.
53
51
  * @returns A Promise that resolves to sk_m.
54
52
  * @dev Used when feeding the sk_m to the kernel circuit for keys verification.
55
53
  */
56
54
  getMasterSecretKey(masterPublicKey: Point): Promise<GrumpkinScalar>;
57
55
  /** Use debug data to get the function name corresponding to a selector. */
58
56
  getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string | undefined>;
59
- /** Returns a membership witness and leaf index to our public data indexed merkle tree,
60
- * along with an associated DelayedPublicMutable containing the class ID to update. */
57
+ /**
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
+ */
61
61
  getUpdatedClassIdHints(contractAddress: AztecAddress): Promise<UpdatedClassIdHints>;
62
62
  }
63
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9rZXJuZWxfb3JhY2xlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcHJpdmF0ZV9rZXJuZWwvcHJpdmF0ZV9rZXJuZWxfb3JhY2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxxQkFBcUIsRUFBRSxjQUFjLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUMvRixPQUFPLEtBQUssRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUN6RCxPQUFPLEtBQUssRUFBRSxjQUFjLEVBQUUsS0FBSyxFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDL0UsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDNUQsT0FBTyxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUMxRCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUNoRSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUMzRCxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNyRCxPQUFPLEtBQUssRUFBRSwwQkFBMEIsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0F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