@aztec/pxe 0.0.1-commit.d1f2d6c → 0.0.1-commit.d20b825a7

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 (261) hide show
  1. package/dest/bin/check_oracle_version.js +5 -5
  2. package/dest/block_synchronizer/block_synchronizer.d.ts +10 -4
  3. package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
  4. package/dest/block_synchronizer/block_synchronizer.js +30 -6
  5. package/dest/config/index.d.ts +2 -2
  6. package/dest/config/index.d.ts.map +1 -1
  7. package/dest/config/index.js +8 -15
  8. package/dest/config/package_info.js +1 -1
  9. package/dest/contract_function_simulator/contract_function_simulator.d.ts +63 -31
  10. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  11. package/dest/contract_function_simulator/contract_function_simulator.js +206 -77
  12. package/dest/contract_function_simulator/ephemeral_array_service.d.ts +28 -0
  13. package/dest/contract_function_simulator/ephemeral_array_service.d.ts.map +1 -0
  14. package/dest/contract_function_simulator/ephemeral_array_service.js +78 -0
  15. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +7 -7
  16. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -1
  17. package/dest/contract_function_simulator/execution_tagging_index_cache.js +19 -11
  18. package/dest/contract_function_simulator/index.d.ts +2 -1
  19. package/dest/contract_function_simulator/index.d.ts.map +1 -1
  20. package/dest/contract_function_simulator/index.js +1 -0
  21. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +5 -7
  22. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
  23. package/dest/contract_function_simulator/noir-structs/event_validation_request.js +9 -11
  24. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +1 -1
  25. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +1 -1
  26. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +2 -2
  27. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -1
  28. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +2 -4
  29. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +5 -8
  30. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
  31. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +7 -12
  32. package/dest/contract_function_simulator/oracle/interfaces.d.ts +62 -46
  33. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
  34. package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts +9 -0
  35. package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts.map +1 -0
  36. package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.js +47 -0
  37. package/dest/contract_function_simulator/oracle/oracle.d.ts +75 -44
  38. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
  39. package/dest/contract_function_simulator/oracle/oracle.js +310 -113
  40. package/dest/contract_function_simulator/oracle/private_execution.d.ts +3 -22
  41. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
  42. package/dest/contract_function_simulator/oracle/private_execution.js +5 -49
  43. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +60 -84
  44. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  45. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +125 -98
  46. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +128 -70
  47. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  48. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +330 -143
  49. package/dest/contract_function_simulator/pick_notes.d.ts +1 -1
  50. package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
  51. package/dest/contract_function_simulator/pick_notes.js +20 -3
  52. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +1 -1
  53. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
  54. package/dest/contract_function_simulator/proxied_contract_data_source.js +3 -0
  55. package/dest/contract_logging.d.ts +27 -0
  56. package/dest/contract_logging.d.ts.map +1 -0
  57. package/dest/contract_logging.js +38 -0
  58. package/dest/contract_sync/contract_sync_service.d.ts +44 -0
  59. package/dest/contract_sync/contract_sync_service.d.ts.map +1 -0
  60. package/dest/contract_sync/contract_sync_service.js +116 -0
  61. package/dest/contract_sync/helpers.d.ts +28 -0
  62. package/dest/contract_sync/helpers.d.ts.map +1 -0
  63. package/dest/contract_sync/helpers.js +60 -0
  64. package/dest/debug/pxe_debug_utils.d.ts +24 -10
  65. package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
  66. package/dest/debug/pxe_debug_utils.js +28 -18
  67. package/dest/entrypoints/client/bundle/index.d.ts +3 -1
  68. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  69. package/dest/entrypoints/client/bundle/index.js +2 -0
  70. package/dest/entrypoints/client/bundle/utils.d.ts +2 -2
  71. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
  72. package/dest/entrypoints/client/bundle/utils.js +23 -9
  73. package/dest/entrypoints/client/lazy/index.d.ts +3 -1
  74. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  75. package/dest/entrypoints/client/lazy/index.js +2 -0
  76. package/dest/entrypoints/client/lazy/utils.d.ts +3 -3
  77. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
  78. package/dest/entrypoints/client/lazy/utils.js +24 -10
  79. package/dest/entrypoints/pxe_creation_options.d.ts +5 -2
  80. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
  81. package/dest/entrypoints/pxe_creation_options.js +3 -1
  82. package/dest/entrypoints/server/index.d.ts +4 -2
  83. package/dest/entrypoints/server/index.d.ts.map +1 -1
  84. package/dest/entrypoints/server/index.js +3 -1
  85. package/dest/entrypoints/server/utils.d.ts +2 -2
  86. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  87. package/dest/entrypoints/server/utils.js +30 -11
  88. package/dest/events/event_service.d.ts +6 -6
  89. package/dest/events/event_service.d.ts.map +1 -1
  90. package/dest/events/event_service.js +31 -11
  91. package/dest/events/private_event_filter_validator.d.ts +3 -2
  92. package/dest/events/private_event_filter_validator.d.ts.map +1 -1
  93. package/dest/events/private_event_filter_validator.js +15 -0
  94. package/dest/job_coordinator/job_coordinator.d.ts +3 -2
  95. package/dest/job_coordinator/job_coordinator.d.ts.map +1 -1
  96. package/dest/job_coordinator/job_coordinator.js +3 -2
  97. package/dest/logs/log_service.d.ts +10 -9
  98. package/dest/logs/log_service.d.ts.map +1 -1
  99. package/dest/logs/log_service.js +41 -62
  100. package/dest/messages/message_context_service.d.ts +17 -0
  101. package/dest/messages/message_context_service.d.ts.map +1 -0
  102. package/dest/messages/message_context_service.js +36 -0
  103. package/dest/notes/note_service.d.ts +7 -8
  104. package/dest/notes/note_service.d.ts.map +1 -1
  105. package/dest/notes/note_service.js +23 -15
  106. package/dest/notes_filter.d.ts +24 -0
  107. package/dest/notes_filter.d.ts.map +1 -0
  108. package/dest/notes_filter.js +4 -0
  109. package/dest/oracle_version.d.ts +4 -3
  110. package/dest/oracle_version.d.ts.map +1 -1
  111. package/dest/oracle_version.js +20 -10
  112. package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts +4 -0
  113. package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts.map +1 -0
  114. package/dest/private_kernel/hints/{compute_tx_include_by_timestamp.js → compute_tx_expiration_timestamp.js} +12 -12
  115. package/dest/private_kernel/hints/index.d.ts +1 -1
  116. package/dest/private_kernel/hints/index.js +1 -1
  117. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +4 -3
  118. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -1
  119. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.js +129 -68
  120. package/dest/private_kernel/hints/test_utils.d.ts +122 -0
  121. package/dest/private_kernel/hints/test_utils.d.ts.map +1 -0
  122. package/dest/private_kernel/hints/test_utils.js +203 -0
  123. package/dest/private_kernel/private_kernel_execution_prover.d.ts +3 -2
  124. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  125. package/dest/private_kernel/private_kernel_execution_prover.js +20 -15
  126. package/dest/private_kernel/private_kernel_oracle.d.ts +10 -6
  127. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
  128. package/dest/private_kernel/private_kernel_oracle.js +19 -18
  129. package/dest/pxe.d.ts +85 -24
  130. package/dest/pxe.d.ts.map +1 -1
  131. package/dest/pxe.js +169 -87
  132. package/dest/storage/address_store/address_store.d.ts +1 -1
  133. package/dest/storage/address_store/address_store.d.ts.map +1 -1
  134. package/dest/storage/address_store/address_store.js +12 -11
  135. package/dest/storage/anchor_block_store/anchor_block_store.d.ts +9 -1
  136. package/dest/storage/anchor_block_store/anchor_block_store.d.ts.map +1 -1
  137. package/dest/storage/anchor_block_store/anchor_block_store.js +9 -2
  138. package/dest/storage/capsule_store/capsule_service.d.ts +21 -0
  139. package/dest/storage/capsule_store/capsule_service.d.ts.map +1 -0
  140. package/dest/storage/capsule_store/capsule_service.js +50 -0
  141. package/dest/storage/capsule_store/capsule_store.d.ts +9 -9
  142. package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -1
  143. package/dest/storage/capsule_store/capsule_store.js +42 -36
  144. package/dest/storage/capsule_store/index.d.ts +2 -1
  145. package/dest/storage/capsule_store/index.d.ts.map +1 -1
  146. package/dest/storage/capsule_store/index.js +1 -0
  147. package/dest/storage/contract_store/contract_store.d.ts +42 -16
  148. package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
  149. package/dest/storage/contract_store/contract_store.js +160 -85
  150. package/dest/storage/metadata.d.ts +1 -1
  151. package/dest/storage/metadata.js +1 -1
  152. package/dest/storage/note_store/note_store.d.ts +14 -4
  153. package/dest/storage/note_store/note_store.d.ts.map +1 -1
  154. package/dest/storage/note_store/note_store.js +149 -109
  155. package/dest/storage/private_event_store/private_event_store.d.ts +1 -1
  156. package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
  157. package/dest/storage/private_event_store/private_event_store.js +87 -61
  158. package/dest/storage/private_event_store/stored_private_event.d.ts +4 -4
  159. package/dest/storage/private_event_store/stored_private_event.d.ts.map +1 -1
  160. package/dest/storage/private_event_store/stored_private_event.js +2 -2
  161. package/dest/storage/tagging_store/recipient_tagging_store.d.ts +6 -6
  162. package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -1
  163. package/dest/storage/tagging_store/recipient_tagging_store.js +31 -19
  164. package/dest/storage/tagging_store/sender_address_book_store.d.ts +1 -1
  165. package/dest/storage/tagging_store/sender_address_book_store.d.ts.map +1 -1
  166. package/dest/storage/tagging_store/sender_address_book_store.js +20 -14
  167. package/dest/storage/tagging_store/sender_tagging_store.d.ts +29 -28
  168. package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
  169. package/dest/storage/tagging_store/sender_tagging_store.js +233 -137
  170. package/dest/tagging/get_all_logs_by_tags.d.ts +4 -4
  171. package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -1
  172. package/dest/tagging/get_all_logs_by_tags.js +17 -3
  173. package/dest/tagging/index.d.ts +3 -3
  174. package/dest/tagging/index.d.ts.map +1 -1
  175. package/dest/tagging/index.js +1 -1
  176. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +5 -6
  177. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -1
  178. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +8 -22
  179. package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +2 -2
  180. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +7 -8
  181. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -1
  182. package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +12 -11
  183. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +5 -9
  184. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
  185. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +13 -7
  186. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +4 -3
  187. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -1
  188. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +20 -10
  189. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +6 -8
  190. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -1
  191. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +36 -24
  192. package/package.json +25 -16
  193. package/src/bin/check_oracle_version.ts +5 -4
  194. package/src/block_synchronizer/block_synchronizer.ts +45 -21
  195. package/src/config/index.ts +3 -9
  196. package/src/config/package_info.ts +1 -1
  197. package/src/contract_function_simulator/contract_function_simulator.ts +366 -136
  198. package/src/contract_function_simulator/ephemeral_array_service.ts +110 -0
  199. package/src/contract_function_simulator/execution_tagging_index_cache.ts +19 -14
  200. package/src/contract_function_simulator/index.ts +1 -0
  201. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +10 -10
  202. package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +1 -1
  203. package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +2 -5
  204. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +5 -11
  205. package/src/contract_function_simulator/oracle/interfaces.ts +90 -62
  206. package/src/contract_function_simulator/oracle/legacy_oracle_mappings.ts +104 -0
  207. package/src/contract_function_simulator/oracle/oracle.ts +391 -150
  208. package/src/contract_function_simulator/oracle/private_execution.ts +5 -83
  209. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +160 -193
  210. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +552 -179
  211. package/src/contract_function_simulator/pick_notes.ts +22 -3
  212. package/src/contract_function_simulator/proxied_contract_data_source.ts +8 -1
  213. package/src/contract_logging.ts +52 -0
  214. package/src/contract_sync/contract_sync_service.ts +176 -0
  215. package/src/contract_sync/helpers.ts +98 -0
  216. package/src/debug/pxe_debug_utils.ts +63 -19
  217. package/src/entrypoints/client/bundle/index.ts +2 -0
  218. package/src/entrypoints/client/bundle/utils.ts +18 -18
  219. package/src/entrypoints/client/lazy/index.ts +2 -0
  220. package/src/entrypoints/client/lazy/utils.ts +19 -18
  221. package/src/entrypoints/pxe_creation_options.ts +9 -1
  222. package/src/entrypoints/server/index.ts +3 -1
  223. package/src/entrypoints/server/utils.ts +24 -29
  224. package/src/events/event_service.ts +35 -12
  225. package/src/events/private_event_filter_validator.ts +21 -1
  226. package/src/job_coordinator/job_coordinator.ts +4 -3
  227. package/src/logs/log_service.ts +77 -106
  228. package/src/messages/message_context_service.ts +44 -0
  229. package/src/notes/note_service.ts +25 -17
  230. package/src/notes_filter.ts +24 -0
  231. package/src/oracle_version.ts +20 -10
  232. package/src/private_kernel/hints/{compute_tx_include_by_timestamp.ts → compute_tx_expiration_timestamp.ts} +13 -13
  233. package/src/private_kernel/hints/index.ts +1 -1
  234. package/src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts +164 -117
  235. package/src/private_kernel/hints/test_utils.ts +325 -0
  236. package/src/private_kernel/private_kernel_execution_prover.ts +24 -19
  237. package/src/private_kernel/private_kernel_oracle.ts +21 -21
  238. package/src/pxe.ts +318 -144
  239. package/src/storage/address_store/address_store.ts +15 -15
  240. package/src/storage/anchor_block_store/anchor_block_store.ts +9 -1
  241. package/src/storage/capsule_store/capsule_service.ts +90 -0
  242. package/src/storage/capsule_store/capsule_store.ts +52 -34
  243. package/src/storage/capsule_store/index.ts +1 -0
  244. package/src/storage/contract_store/contract_store.ts +193 -101
  245. package/src/storage/metadata.ts +1 -1
  246. package/src/storage/note_store/note_store.ts +168 -134
  247. package/src/storage/private_event_store/private_event_store.ts +106 -81
  248. package/src/storage/private_event_store/stored_private_event.ts +3 -3
  249. package/src/storage/tagging_store/recipient_tagging_store.ts +38 -24
  250. package/src/storage/tagging_store/sender_address_book_store.ts +20 -14
  251. package/src/storage/tagging_store/sender_tagging_store.ts +287 -156
  252. package/src/tagging/get_all_logs_by_tags.ts +31 -7
  253. package/src/tagging/index.ts +2 -2
  254. package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +14 -27
  255. package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +2 -2
  256. package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +12 -17
  257. package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +25 -12
  258. package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +26 -11
  259. package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +30 -29
  260. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +0 -4
  261. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +0 -1
@@ -1,9 +1,53 @@
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
1
2
  import { toArray } from '@aztec/foundation/iterable';
2
- import { isProtocolContract } from '@aztec/protocol-contracts';
3
- import { FunctionSelector, FunctionType, contractArtifactFromBuffer, contractArtifactToBuffer, encodeArguments, getFunctionDebugMetadata } from '@aztec/stdlib/abi';
3
+ import { BufferReader, numToUInt8, serializeToBuffer } from '@aztec/foundation/serialize';
4
+ import { FunctionCall, FunctionSelector, FunctionType, contractArtifactFromBuffer, contractArtifactToBuffer, encodeArguments, getFunctionDebugMetadata } from '@aztec/stdlib/abi';
4
5
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
5
6
  import { SerializableContractInstance, getContractClassFromArtifact } from '@aztec/stdlib/contract';
6
7
  import { PrivateFunctionsTree } from './private_functions_tree.js';
8
+ const VERSION = 1;
9
+ /**
10
+ * All contract class data except the large packedBytecode.
11
+ * The expensive data from the ContractClass is precomputed and stored in this format to avoid redundant hashing.
12
+ * Since we have to store the artifacts anyway, the final ContractClass is reconstructed by combining this data
13
+ * with the packedBytecode obtained from the former. That way we can have quick class lookups without wasted storage.
14
+ */ export class SerializableContractClassData {
15
+ version = VERSION;
16
+ id;
17
+ artifactHash;
18
+ privateFunctionsRoot;
19
+ publicBytecodeCommitment;
20
+ privateFunctions;
21
+ constructor(data){
22
+ this.id = data.id;
23
+ this.artifactHash = data.artifactHash;
24
+ this.privateFunctionsRoot = data.privateFunctionsRoot;
25
+ this.publicBytecodeCommitment = data.publicBytecodeCommitment;
26
+ this.privateFunctions = data.privateFunctions;
27
+ }
28
+ toBuffer() {
29
+ return serializeToBuffer(numToUInt8(this.version), this.id, this.artifactHash, this.privateFunctionsRoot, this.publicBytecodeCommitment, this.privateFunctions.length, ...this.privateFunctions.map((fn)=>serializeToBuffer(fn.selector, fn.vkHash)));
30
+ }
31
+ static fromBuffer(bufferOrReader) {
32
+ const reader = BufferReader.asReader(bufferOrReader);
33
+ const version = reader.readUInt8();
34
+ if (version !== VERSION) {
35
+ throw new Error(`Unexpected contract class data version ${version}`);
36
+ }
37
+ return new SerializableContractClassData({
38
+ id: reader.readObject(Fr),
39
+ artifactHash: reader.readObject(Fr),
40
+ privateFunctionsRoot: reader.readObject(Fr),
41
+ publicBytecodeCommitment: reader.readObject(Fr),
42
+ privateFunctions: reader.readVector({
43
+ fromBuffer: (r)=>({
44
+ selector: r.readObject(FunctionSelector),
45
+ vkHash: r.readObject(Fr)
46
+ })
47
+ })
48
+ });
49
+ }
50
+ }
7
51
  /**
8
52
  * ContractStore serves as a data manager and retriever for Aztec.nr contracts.
9
53
  * It provides methods to obtain contract addresses, function ABI, bytecode, and membership witnesses
@@ -13,47 +57,66 @@ import { PrivateFunctionsTree } from './private_functions_tree.js';
13
57
  */ export class ContractStore {
14
58
  /** Map from contract class id to private function tree. */ // TODO: Update it to be LRU cache so that it doesn't keep all the data all the time.
15
59
  #privateFunctionTrees = new Map();
16
- /** Map from contract address to contract class id */ #contractClassIdMap = new Map();
60
+ /**
61
+ * In-memory cache of deserialized ContractArtifact objects, keyed by class id string.
62
+ * Avoids repeated LMDB reads + JSON.parse + Zod validation on every oracle call.
63
+ * Artifacts are large but immutable after registration — safe to cache for the lifetime of the store.
64
+ */ // TODO: Update it to be LRU cache so that it doesn't keep all the data all the time.
65
+ #contractArtifactCache = new Map();
66
+ /** Map from contract address to contract class id (avoids KV round-trip on hot path). */ #contractClassIdMap = new Map();
67
+ #store;
17
68
  #contractArtifacts;
69
+ #contractClassData;
18
70
  #contractInstances;
19
71
  constructor(store){
72
+ this.#store = store;
20
73
  this.#contractArtifacts = store.openMap('contract_artifacts');
74
+ this.#contractClassData = store.openMap('contract_classes');
21
75
  this.#contractInstances = store.openMap('contracts_instances');
22
76
  }
23
77
  // Setters
24
- async addContractArtifact(id, contract) {
78
+ /**
79
+ * Registers a new contract artifact and its corresponding class data.
80
+ * IMPORTANT: This method does not verify that the provided artifact matches the class data or that the class id matches the artifact.
81
+ * It is the caller's responsibility to ensure the consistency and correctness of the provided data.
82
+ * This is done to avoid redundant, expensive contract class computations
83
+ */ async addContractArtifact(contract, contractClassWithIdAndPreimage) {
84
+ const contractClass = contractClassWithIdAndPreimage ?? await getContractClassFromArtifact(contract);
85
+ const key = contractClass.id.toString();
86
+ if (this.#contractArtifactCache.has(key)) {
87
+ return contractClass.id;
88
+ }
25
89
  const privateFunctions = contract.functions.filter((functionArtifact)=>functionArtifact.functionType === FunctionType.PRIVATE);
26
- const privateSelectors = await Promise.all(privateFunctions.map(async (privateFunctionArtifact)=>(await FunctionSelector.fromNameAndParameters(privateFunctionArtifact.name, privateFunctionArtifact.parameters)).toString()));
90
+ const privateSelectors = await Promise.all(privateFunctions.map(async (fn)=>(await FunctionSelector.fromNameAndParameters(fn.name, fn.parameters)).toString()));
27
91
  if (privateSelectors.length !== new Set(privateSelectors).size) {
28
92
  throw new Error('Repeated function selectors of private functions');
29
93
  }
30
- await this.#contractArtifacts.set(id.toString(), contractArtifactToBuffer(contract));
94
+ this.#contractArtifactCache.set(key, contract);
95
+ await this.#store.transactionAsync(async ()=>{
96
+ await this.#contractArtifacts.set(key, contractArtifactToBuffer(contract));
97
+ await this.#contractClassData.set(key, new SerializableContractClassData(contractClass).toBuffer());
98
+ });
99
+ return contractClass.id;
31
100
  }
32
101
  async addContractInstance(contract) {
102
+ await this.#store.transactionAsync(async ()=>{
103
+ await this.#contractInstances.set(contract.address.toString(), new SerializableContractInstance(contract).toBuffer());
104
+ });
33
105
  this.#contractClassIdMap.set(contract.address.toString(), contract.currentContractClassId);
34
- await this.#contractInstances.set(contract.address.toString(), new SerializableContractInstance(contract).toBuffer());
35
106
  }
36
107
  // Private getters
37
108
  async #getContractClassId(contractAddress) {
38
- if (!this.#contractClassIdMap.has(contractAddress.toString())) {
109
+ const key = contractAddress.toString();
110
+ if (!this.#contractClassIdMap.has(key)) {
39
111
  const instance = await this.getContractInstance(contractAddress);
40
112
  if (!instance) {
41
113
  return;
42
114
  }
43
- this.#contractClassIdMap.set(contractAddress.toString(), instance.currentContractClassId);
115
+ this.#contractClassIdMap.set(key, instance.currentContractClassId);
44
116
  }
45
- return this.#contractClassIdMap.get(contractAddress.toString());
117
+ return this.#contractClassIdMap.get(key);
46
118
  }
47
- /**
48
- * Retrieve or create a ContractTree instance based on the provided class id.
49
- * If an existing tree with the same class id is found in the cache, it will be returned.
50
- * Otherwise, a new ContractTree instance will be created using the contract data from the database
51
- * and added to the cache before returning.
52
- *
53
- * @param classId - The class id of the contract for which the ContractTree is required.
54
- * @returns A ContractTree instance associated with the specified contract address.
55
- * @throws An Error if the contract is not found in the ContractDatabase.
56
- */ async #getPrivateFunctionTreeForClassId(classId) {
119
+ async #getPrivateFunctionTreeForClassId(classId) {
57
120
  if (!this.#privateFunctionTrees.has(classId.toString())) {
58
121
  const artifact = await this.getContractArtifact(classId);
59
122
  if (!artifact) {
@@ -64,27 +127,54 @@ import { PrivateFunctionsTree } from './private_functions_tree.js';
64
127
  }
65
128
  return this.#privateFunctionTrees.get(classId.toString());
66
129
  }
67
- async #getContractArtifactByAddress(contractAddress) {
68
- const contractClassId = await this.#getContractClassId(contractAddress);
69
- return contractClassId && this.getContractArtifact(contractClassId);
130
+ async #getArtifactByAddress(contractAddress) {
131
+ const classId = await this.#getContractClassId(contractAddress);
132
+ return classId && this.getContractArtifact(classId);
70
133
  }
71
134
  // Public getters
72
- async getContractsAddresses() {
73
- const keys = await toArray(this.#contractInstances.keysAsync());
74
- return keys.map(AztecAddress.fromString);
135
+ getContractsAddresses() {
136
+ return this.#store.transactionAsync(async ()=>{
137
+ const keys = await toArray(this.#contractInstances.keysAsync());
138
+ return keys.map(AztecAddress.fromString);
139
+ });
75
140
  }
76
- /** Returns a contract instance for a given address. Throws if not found. */ async getContractInstance(contractAddress) {
77
- const contract = await this.#contractInstances.getAsync(contractAddress.toString());
78
- return contract && SerializableContractInstance.fromBuffer(contract).withAddress(contractAddress);
141
+ /** Returns a contract instance for a given address. */ getContractInstance(contractAddress) {
142
+ return this.#store.transactionAsync(async ()=>{
143
+ const contract = await this.#contractInstances.getAsync(contractAddress.toString());
144
+ return contract && SerializableContractInstance.fromBuffer(contract).withAddress(contractAddress);
145
+ });
79
146
  }
80
- async getContractArtifact(contractClassId) {
81
- const contract = await this.#contractArtifacts.getAsync(contractClassId.toString());
82
- // TODO(@spalladino): AztecAsyncMap lies and returns Uint8Arrays instead of Buffers, hence the extra Buffer.from.
83
- return contract && contractArtifactFromBuffer(Buffer.from(contract));
147
+ /** Returns the raw contract artifact for a given class id. */ async getContractArtifact(contractClassId) {
148
+ const key = contractClassId.toString();
149
+ const cached = this.#contractArtifactCache.get(key);
150
+ if (cached) {
151
+ return cached;
152
+ }
153
+ const artifact = await this.#store.transactionAsync(async ()=>{
154
+ const buf = await this.#contractArtifacts.getAsync(key);
155
+ return buf && contractArtifactFromBuffer(buf);
156
+ });
157
+ if (artifact) {
158
+ this.#contractArtifactCache.set(key, artifact);
159
+ }
160
+ return artifact;
84
161
  }
85
- /** Returns a contract class for a given class id. Throws if not found. */ async getContractClass(contractClassId) {
162
+ /** Returns a contract class for a given class id. */ async getContractClassWithPreimage(contractClassId) {
163
+ const key = contractClassId.toString();
164
+ const buf = await this.#store.transactionAsync(()=>this.#contractClassData.getAsync(key));
165
+ if (!buf) {
166
+ return undefined;
167
+ }
168
+ const classData = SerializableContractClassData.fromBuffer(buf);
86
169
  const artifact = await this.getContractArtifact(contractClassId);
87
- return artifact && getContractClassFromArtifact(artifact);
170
+ if (!artifact) {
171
+ return undefined;
172
+ }
173
+ const packedBytecode = artifact.functions.find((f)=>f.name === 'public_dispatch')?.bytecode ?? Buffer.alloc(0);
174
+ return {
175
+ ...classData,
176
+ packedBytecode
177
+ };
88
178
  }
89
179
  async getContract(address) {
90
180
  const instance = await this.getContractInstance(address);
@@ -102,17 +192,18 @@ import { PrivateFunctionsTree } from './private_functions_tree.js';
102
192
  }
103
193
  /**
104
194
  * Retrieves the artifact of a specified function within a given contract.
105
- * The function is identified by its selector, which is a unique code generated from the function's signature.
106
- * Throws an error if the contract address or function selector are invalid or not found.
107
195
  *
108
196
  * @param contractAddress - The AztecAddress representing the contract containing the function.
109
197
  * @param selector - The function selector.
110
198
  * @returns The corresponding function's artifact as an object.
111
199
  */ async getFunctionArtifact(contractAddress, selector) {
112
- const artifact = await this.#getContractArtifactByAddress(contractAddress);
113
- const fnArtifact = artifact && await this.#findFunctionArtifactBySelector(artifact, selector);
114
- return fnArtifact && {
115
- ...fnArtifact,
200
+ const artifact = await this.#getArtifactByAddress(contractAddress);
201
+ if (!artifact) {
202
+ return undefined;
203
+ }
204
+ const fn = await this.#findFunctionArtifactBySelector(artifact, selector);
205
+ return fn && {
206
+ ...fn,
116
207
  contractName: artifact.name
117
208
  };
118
209
  }
@@ -128,40 +219,38 @@ import { PrivateFunctionsTree } from './private_functions_tree.js';
128
219
  };
129
220
  }
130
221
  async getPublicFunctionArtifact(contractAddress) {
131
- const artifact = await this.#getContractArtifactByAddress(contractAddress);
132
- const fnArtifact = artifact && artifact.functions.find((fn)=>fn.functionType === FunctionType.PUBLIC);
133
- return fnArtifact && {
134
- ...fnArtifact,
222
+ const artifact = await this.#getArtifactByAddress(contractAddress);
223
+ const fn = artifact && artifact.functions.find((f)=>f.functionType === FunctionType.PUBLIC);
224
+ return fn && {
225
+ ...fn,
135
226
  contractName: artifact.name
136
227
  };
137
228
  }
138
229
  async getFunctionAbi(contractAddress, selector) {
139
- const artifact = await this.#getContractArtifactByAddress(contractAddress);
230
+ const artifact = await this.#getArtifactByAddress(contractAddress);
140
231
  return artifact && await this.#findFunctionAbiBySelector(artifact, selector);
141
232
  }
142
233
  /**
143
234
  * Retrieves the debug metadata of a specified function within a given contract.
144
- * The function is identified by its selector, which is a unique code generated from the function's signature.
145
- * Returns undefined if the debug metadata for the given function is not found.
146
- * Throws if the contract has not been added to the database.
147
235
  *
148
236
  * @param contractAddress - The AztecAddress representing the contract containing the function.
149
237
  * @param selector - The function selector.
150
- * @returns The corresponding function's artifact as an object.
238
+ * @returns The corresponding function's debug metadata, or undefined.
151
239
  */ async getFunctionDebugMetadata(contractAddress, selector) {
152
- const artifact = await this.#getContractArtifactByAddress(contractAddress);
153
- const fnArtifact = artifact && await this.#findFunctionArtifactBySelector(artifact, selector);
154
- return fnArtifact && getFunctionDebugMetadata(artifact, fnArtifact);
240
+ const artifact = await this.#getArtifactByAddress(contractAddress);
241
+ if (!artifact) {
242
+ return undefined;
243
+ }
244
+ const fn = await this.#findFunctionArtifactBySelector(artifact, selector);
245
+ return fn && getFunctionDebugMetadata(artifact, fn);
155
246
  }
156
247
  async getPublicFunctionDebugMetadata(contractAddress) {
157
- const artifact = await this.#getContractArtifactByAddress(contractAddress);
158
- const fnArtifact = artifact && artifact.functions.find((fn)=>fn.functionType === FunctionType.PUBLIC);
159
- return fnArtifact && getFunctionDebugMetadata(artifact, fnArtifact);
248
+ const artifact = await this.#getArtifactByAddress(contractAddress);
249
+ const fn = artifact && artifact.functions.find((f)=>f.functionType === FunctionType.PUBLIC);
250
+ return fn && getFunctionDebugMetadata(artifact, fn);
160
251
  }
161
252
  /**
162
253
  * Retrieve the function membership witness for the given contract class and function selector.
163
- * The function membership witness represents a proof that the function belongs to the specified contract.
164
- * Throws an error if the contract address or function selector is unknown.
165
254
  *
166
255
  * @param contractClassId - The id of the class.
167
256
  * @param selector - The function selector.
@@ -171,18 +260,16 @@ import { PrivateFunctionsTree } from './private_functions_tree.js';
171
260
  return tree?.getFunctionMembershipWitness(selector);
172
261
  }
173
262
  async getDebugContractName(contractAddress) {
174
- const artifact = await this.#getContractArtifactByAddress(contractAddress);
263
+ const artifact = await this.#getArtifactByAddress(contractAddress);
175
264
  return artifact?.name;
176
265
  }
177
266
  async getDebugFunctionName(contractAddress, selector) {
178
- const artifact = await this.#getContractArtifactByAddress(contractAddress);
179
- const fnArtifact = artifact && await this.#findFunctionAbiBySelector(artifact, selector);
180
- return `${artifact?.name ?? contractAddress}:${fnArtifact?.name ?? selector}`;
267
+ const artifact = await this.#getArtifactByAddress(contractAddress);
268
+ const fn = artifact && await this.#findFunctionAbiBySelector(artifact, selector);
269
+ return `${artifact?.name ?? contractAddress}:${fn?.name ?? selector}`;
181
270
  }
182
271
  async #findFunctionArtifactBySelector(artifact, selector) {
183
- const functions = artifact.functions;
184
- for(let i = 0; i < functions.length; i++){
185
- const fn = functions[i];
272
+ for (const fn of artifact.functions){
186
273
  const fnSelector = await FunctionSelector.fromNameAndParameters(fn.name, fn.parameters);
187
274
  if (fnSelector.equals(selector)) {
188
275
  return fn;
@@ -190,12 +277,10 @@ import { PrivateFunctionsTree } from './private_functions_tree.js';
190
277
  }
191
278
  }
192
279
  async #findFunctionAbiBySelector(artifact, selector) {
193
- const functions = [
280
+ for (const fn of [
194
281
  ...artifact.functions,
195
282
  ...artifact.nonDispatchPublicFunctions ?? []
196
- ];
197
- for(let i = 0; i < functions.length; i++){
198
- const fn = functions[i];
283
+ ]){
199
284
  const fnSelector = await FunctionSelector.fromNameAndParameters(fn.name, fn.parameters);
200
285
  if (fnSelector.equals(selector)) {
201
286
  return fn;
@@ -211,26 +296,16 @@ import { PrivateFunctionsTree } from './private_functions_tree.js';
211
296
  if (!functionDao) {
212
297
  throw new Error(`Unknown function ${functionName} in contract ${contract.name}.`);
213
298
  }
214
- return {
299
+ const selector = await FunctionSelector.fromNameAndParameters(functionDao.name, functionDao.parameters);
300
+ return FunctionCall.from({
215
301
  name: functionDao.name,
216
- args: encodeArguments(functionDao, args),
217
- selector: await FunctionSelector.fromNameAndParameters(functionDao.name, functionDao.parameters),
218
- type: functionDao.functionType,
219
302
  to,
303
+ selector,
304
+ type: functionDao.functionType,
220
305
  hideMsgSender: false,
221
306
  isStatic: functionDao.isStatic,
307
+ args: encodeArguments(functionDao, args),
222
308
  returnTypes: functionDao.returnTypes
223
- };
224
- }
225
- // Synchronize target contract data
226
- async syncPrivateState(contractAddress, functionToInvokeAfterSync, utilityExecutor) {
227
- // Protocol contracts don't have private state to sync
228
- if (!isProtocolContract(contractAddress)) {
229
- const syncPrivateStateFunctionCall = await this.getFunctionCall('sync_private_state', [], contractAddress);
230
- if (functionToInvokeAfterSync && functionToInvokeAfterSync.equals(syncPrivateStateFunctionCall.selector)) {
231
- throw new Error('Forbidden `sync_private_state` invocation. `sync_private_state` can only be invoked by PXE, manual execution can lead to inconsistencies.');
232
- }
233
- return utilityExecutor(syncPrivateStateFunctionCall);
234
- }
309
+ });
235
310
  }
236
311
  }
@@ -1,2 +1,2 @@
1
- export declare const PXE_DATA_SCHEMA_VERSION = 2;
1
+ export declare const PXE_DATA_SCHEMA_VERSION = 5;
2
2
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0YWRhdGEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdG9yYWdlL21ldGFkYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQU8sTUFBTSx1QkFBdUIsSUFBSSxDQUFDIn0=
@@ -1 +1 @@
1
- export const PXE_DATA_SCHEMA_VERSION = 2;
1
+ export const PXE_DATA_SCHEMA_VERSION = 5;
@@ -2,8 +2,9 @@ import type { Fr } from '@aztec/foundation/schemas';
2
2
  import type { AztecAsyncKVStore } from '@aztec/kv-store';
3
3
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import type { DataInBlock } from '@aztec/stdlib/block';
5
- import { NoteDao, type NotesFilter } from '@aztec/stdlib/note';
5
+ import { NoteDao } from '@aztec/stdlib/note';
6
6
  import type { StagedStore } from '../../job_coordinator/job_coordinator.js';
7
+ import type { NotesFilter } from '../../notes_filter.js';
7
8
  /**
8
9
  * NoteStore manages the storage and retrieval of notes.
9
10
  *
@@ -35,7 +36,6 @@ export declare class NoteStore implements StagedStore {
35
36
  * @params jobId - the job context to read from.
36
37
  * @returns Filtered and deduplicated notes (a note might be present in multiple scopes - we ensure it is only
37
38
  * returned once if this is the case)
38
- * @throws If filtering by an empty scopes array. Scopes have to be set to undefined or to a non-empty array.
39
39
  */
40
40
  getNotes(filter: NotesFilter, jobId: string): Promise<NoteDao[]>;
41
41
  /**
@@ -45,7 +45,7 @@ export declare class NoteStore implements StagedStore {
45
45
  * The operation is atomic - if any nullifier is not found, the entire operation fails and no notes are modified.
46
46
  *
47
47
  * applyNullifiers is idempotent: the same nullifier can be applied multiple times without error.
48
- * This relaxes constraints on usage of NoteService#storeNote, which can then be run concurrently in a Promise.all
48
+ * This relaxes constraints on usage of NoteService#validateAndStoreNote, which can then be run concurrently in a Promise.all
49
49
  * context without risking unnecessarily defensive checks failing.
50
50
  *
51
51
  * @param nullifiers - Array of nullifiers with their block numbers to process
@@ -67,7 +67,17 @@ export declare class NoteStore implements StagedStore {
67
67
  * @param synchedBlockNumber - The block number up to which PXE managed to sync before the reorg happened.
68
68
  */
69
69
  rollback(blockNumber: number, synchedBlockNumber: number): Promise<void>;
70
+ /**
71
+ * Commits in memory job data to persistent storage.
72
+ *
73
+ * Called by JobCoordinator when a job completes successfully.
74
+ *
75
+ * Note: JobCoordinator wraps all commits in a single transaction, so we don't need our own transactionAsync here
76
+ * (and using one would throw on IndexedDB as it does not support nested txs).
77
+ *
78
+ * @param jobId - The jobId identifying which staged data to commit
79
+ */
70
80
  commit(jobId: string): Promise<void>;
71
81
  discardStaged(jobId: string): Promise<void>;
72
82
  }
73
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90ZV9zdG9yZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3N0b3JhZ2Uvbm90ZV9zdG9yZS9ub3RlX3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLEVBQUUsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQ3BELE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFxQyxNQUFNLGlCQUFpQixDQUFDO0FBQzVGLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBQ2hFLE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3ZELE9BQU8sRUFBRSxPQUFPLEVBQWMsS0FBSyxXQUFXLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUUzRSxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSwwQ0FBMEMsQ0FBQztBQUc1RTs7Ozs7SUFLSTtBQUNKLHFCQUFhLFNBQVUsWUFBVyxXQUFXOztJQUMzQyxRQUFRLENBQUMsU0FBUyxFQUFFLE1BQU0sQ0FBVTtJQStCcEMsWUFBWSxLQUFLLEVBQUUsaUJBQWlCLEVBUW5DO0lBRUQ7Ozs7Ozs7OztPQVNHO0lBQ0ksUUFBUSxDQUFDLEtBQUssRUFBRSxPQUFPLEVBQUUsRUFBRSxLQUFLLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLElBQUksRU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