@aztec/pxe 0.0.1-commit.0c875d939 → 0.0.1-commit.0ec55a70b

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 (249) hide show
  1. package/dest/bin/check_oracle_version.js +4 -4
  2. package/dest/block_synchronizer/block_stream_source.d.ts +10 -0
  3. package/dest/block_synchronizer/block_stream_source.d.ts.map +1 -0
  4. package/dest/block_synchronizer/block_stream_source.js +37 -0
  5. package/dest/block_synchronizer/block_synchronizer.d.ts +6 -2
  6. package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
  7. package/dest/block_synchronizer/block_synchronizer.js +30 -10
  8. package/dest/config/index.d.ts +2 -2
  9. package/dest/config/index.d.ts.map +1 -1
  10. package/dest/config/index.js +8 -15
  11. package/dest/config/package_info.js +1 -1
  12. package/dest/contract_function_simulator/contract_function_simulator.d.ts +13 -5
  13. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  14. package/dest/contract_function_simulator/contract_function_simulator.js +46 -20
  15. package/dest/contract_function_simulator/ephemeral_array_service.d.ts +28 -0
  16. package/dest/contract_function_simulator/ephemeral_array_service.d.ts.map +1 -0
  17. package/dest/contract_function_simulator/ephemeral_array_service.js +78 -0
  18. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +7 -7
  19. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -1
  20. package/dest/contract_function_simulator/execution_tagging_index_cache.js +19 -11
  21. package/dest/contract_function_simulator/index.d.ts +2 -1
  22. package/dest/contract_function_simulator/index.d.ts.map +1 -1
  23. package/dest/contract_function_simulator/index.js +1 -0
  24. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +4 -6
  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 +8 -10
  27. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +1 -1
  28. package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +1 -1
  29. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +2 -2
  30. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts.map +1 -1
  31. package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +2 -4
  32. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +4 -7
  33. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
  34. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +6 -11
  35. package/dest/contract_function_simulator/oracle/interfaces.d.ts +63 -45
  36. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
  37. package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts +9 -0
  38. package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts.map +1 -0
  39. package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.js +47 -0
  40. package/dest/contract_function_simulator/oracle/oracle.d.ts +76 -44
  41. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
  42. package/dest/contract_function_simulator/oracle/oracle.js +288 -96
  43. package/dest/contract_function_simulator/oracle/private_execution.js +5 -3
  44. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +32 -59
  45. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  46. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +69 -96
  47. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +100 -60
  48. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  49. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +327 -115
  50. package/dest/contract_function_simulator/pick_notes.d.ts +1 -1
  51. package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
  52. package/dest/contract_function_simulator/pick_notes.js +20 -3
  53. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +1 -1
  54. package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
  55. package/dest/contract_function_simulator/proxied_contract_data_source.js +3 -0
  56. package/dest/contract_logging.d.ts +27 -0
  57. package/dest/contract_logging.d.ts.map +1 -0
  58. package/dest/contract_logging.js +38 -0
  59. package/dest/contract_sync/contract_sync_service.d.ts +6 -5
  60. package/dest/contract_sync/contract_sync_service.d.ts.map +1 -1
  61. package/dest/contract_sync/contract_sync_service.js +62 -43
  62. package/dest/contract_sync/helpers.d.ts +2 -3
  63. package/dest/contract_sync/helpers.d.ts.map +1 -1
  64. package/dest/contract_sync/helpers.js +7 -2
  65. package/dest/debug/pxe_debug_utils.d.ts +3 -3
  66. package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
  67. package/dest/debug/pxe_debug_utils.js +4 -4
  68. package/dest/entrypoints/client/bundle/index.d.ts +2 -2
  69. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  70. package/dest/entrypoints/client/bundle/index.js +1 -1
  71. package/dest/entrypoints/client/bundle/utils.d.ts +2 -2
  72. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
  73. package/dest/entrypoints/client/bundle/utils.js +2 -2
  74. package/dest/entrypoints/client/lazy/index.d.ts +2 -2
  75. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  76. package/dest/entrypoints/client/lazy/index.js +1 -1
  77. package/dest/entrypoints/client/lazy/utils.d.ts +2 -2
  78. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
  79. package/dest/entrypoints/client/lazy/utils.js +2 -2
  80. package/dest/entrypoints/pxe_creation_options.d.ts +3 -1
  81. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
  82. package/dest/entrypoints/pxe_creation_options.js +3 -1
  83. package/dest/entrypoints/server/index.d.ts +2 -3
  84. package/dest/entrypoints/server/index.d.ts.map +1 -1
  85. package/dest/entrypoints/server/index.js +1 -2
  86. package/dest/entrypoints/server/utils.d.ts +2 -2
  87. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  88. package/dest/entrypoints/server/utils.js +2 -2
  89. package/dest/events/event_service.d.ts +3 -2
  90. package/dest/events/event_service.d.ts.map +1 -1
  91. package/dest/events/event_service.js +26 -5
  92. package/dest/events/private_event_filter_validator.d.ts +3 -2
  93. package/dest/events/private_event_filter_validator.d.ts.map +1 -1
  94. package/dest/events/private_event_filter_validator.js +15 -0
  95. package/dest/logs/log_service.d.ts +7 -8
  96. package/dest/logs/log_service.d.ts.map +1 -1
  97. package/dest/logs/log_service.js +29 -39
  98. package/dest/messages/message_context_service.d.ts +17 -0
  99. package/dest/messages/message_context_service.d.ts.map +1 -0
  100. package/dest/messages/message_context_service.js +36 -0
  101. package/dest/notes/note_service.d.ts +4 -5
  102. package/dest/notes/note_service.d.ts.map +1 -1
  103. package/dest/notes/note_service.js +14 -5
  104. package/dest/notes_filter.d.ts +2 -3
  105. package/dest/notes_filter.d.ts.map +1 -1
  106. package/dest/oracle_version.d.ts +4 -3
  107. package/dest/oracle_version.d.ts.map +1 -1
  108. package/dest/oracle_version.js +20 -10
  109. package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts +4 -0
  110. package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts.map +1 -0
  111. package/dest/private_kernel/hints/{compute_tx_include_by_timestamp.js → compute_tx_expiration_timestamp.js} +12 -12
  112. package/dest/private_kernel/hints/index.d.ts +1 -1
  113. package/dest/private_kernel/hints/index.js +1 -1
  114. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +4 -3
  115. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -1
  116. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.js +129 -68
  117. package/dest/private_kernel/hints/test_utils.d.ts +122 -0
  118. package/dest/private_kernel/hints/test_utils.d.ts.map +1 -0
  119. package/dest/private_kernel/hints/test_utils.js +203 -0
  120. package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
  121. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  122. package/dest/private_kernel/private_kernel_execution_prover.js +18 -13
  123. package/dest/private_kernel/private_kernel_oracle.d.ts +10 -6
  124. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
  125. package/dest/private_kernel/private_kernel_oracle.js +19 -18
  126. package/dest/pxe.d.ts +30 -15
  127. package/dest/pxe.d.ts.map +1 -1
  128. package/dest/pxe.js +116 -63
  129. package/dest/storage/anchor_block_store/anchor_block_store.js +1 -1
  130. package/dest/storage/capsule_store/capsule_service.d.ts +21 -0
  131. package/dest/storage/capsule_store/capsule_service.d.ts.map +1 -0
  132. package/dest/storage/capsule_store/capsule_service.js +50 -0
  133. package/dest/storage/capsule_store/capsule_store.d.ts +9 -9
  134. package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -1
  135. package/dest/storage/capsule_store/capsule_store.js +36 -28
  136. package/dest/storage/capsule_store/index.d.ts +2 -1
  137. package/dest/storage/capsule_store/index.d.ts.map +1 -1
  138. package/dest/storage/capsule_store/index.js +1 -0
  139. package/dest/storage/contract_store/contract_store.d.ts +42 -15
  140. package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
  141. package/dest/storage/contract_store/contract_store.js +143 -65
  142. package/dest/storage/metadata.d.ts +1 -1
  143. package/dest/storage/metadata.js +1 -1
  144. package/dest/storage/note_store/note_store.d.ts +1 -1
  145. package/dest/storage/note_store/note_store.d.ts.map +1 -1
  146. package/dest/storage/note_store/note_store.js +2 -2
  147. package/dest/storage/private_event_store/private_event_store.d.ts +1 -1
  148. package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
  149. package/dest/storage/private_event_store/private_event_store.js +3 -0
  150. package/dest/storage/private_event_store/stored_private_event.js +1 -1
  151. package/dest/storage/tagging_store/recipient_tagging_store.d.ts +6 -6
  152. package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -1
  153. package/dest/storage/tagging_store/sender_tagging_store.d.ts +29 -28
  154. package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
  155. package/dest/storage/tagging_store/sender_tagging_store.js +141 -115
  156. package/dest/tagging/get_all_logs_by_tags.d.ts +1 -1
  157. package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -1
  158. package/dest/tagging/get_all_logs_by_tags.js +17 -3
  159. package/dest/tagging/index.d.ts +3 -3
  160. package/dest/tagging/index.d.ts.map +1 -1
  161. package/dest/tagging/index.js +1 -1
  162. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +4 -5
  163. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -1
  164. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +8 -22
  165. package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +2 -2
  166. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +6 -7
  167. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -1
  168. package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +12 -11
  169. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +4 -8
  170. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
  171. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +13 -7
  172. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +4 -3
  173. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -1
  174. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +20 -10
  175. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +5 -7
  176. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -1
  177. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +36 -24
  178. package/package.json +16 -16
  179. package/src/bin/check_oracle_version.ts +4 -4
  180. package/src/block_synchronizer/block_stream_source.ts +52 -0
  181. package/src/block_synchronizer/block_synchronizer.ts +33 -11
  182. package/src/config/index.ts +3 -9
  183. package/src/config/package_info.ts +1 -1
  184. package/src/contract_function_simulator/contract_function_simulator.ts +67 -33
  185. package/src/contract_function_simulator/ephemeral_array_service.ts +110 -0
  186. package/src/contract_function_simulator/execution_tagging_index_cache.ts +19 -14
  187. package/src/contract_function_simulator/index.ts +1 -0
  188. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +9 -9
  189. package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +1 -1
  190. package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +2 -5
  191. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +4 -10
  192. package/src/contract_function_simulator/oracle/interfaces.ts +91 -53
  193. package/src/contract_function_simulator/oracle/legacy_oracle_mappings.ts +104 -0
  194. package/src/contract_function_simulator/oracle/oracle.ts +377 -139
  195. package/src/contract_function_simulator/oracle/private_execution.ts +4 -4
  196. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +89 -120
  197. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +536 -153
  198. package/src/contract_function_simulator/pick_notes.ts +22 -3
  199. package/src/contract_function_simulator/proxied_contract_data_source.ts +8 -1
  200. package/src/contract_logging.ts +52 -0
  201. package/src/contract_sync/contract_sync_service.ts +99 -75
  202. package/src/contract_sync/helpers.ts +4 -4
  203. package/src/debug/pxe_debug_utils.ts +7 -7
  204. package/src/entrypoints/client/bundle/index.ts +1 -1
  205. package/src/entrypoints/client/bundle/utils.ts +2 -3
  206. package/src/entrypoints/client/lazy/index.ts +1 -1
  207. package/src/entrypoints/client/lazy/utils.ts +2 -3
  208. package/src/entrypoints/pxe_creation_options.ts +7 -0
  209. package/src/entrypoints/server/index.ts +1 -2
  210. package/src/entrypoints/server/utils.ts +2 -3
  211. package/src/events/event_service.ts +30 -5
  212. package/src/events/private_event_filter_validator.ts +21 -1
  213. package/src/logs/log_service.ts +59 -75
  214. package/src/messages/message_context_service.ts +44 -0
  215. package/src/notes/note_service.ts +18 -8
  216. package/src/notes_filter.ts +1 -3
  217. package/src/oracle_version.ts +20 -10
  218. package/src/private_kernel/hints/{compute_tx_include_by_timestamp.ts → compute_tx_expiration_timestamp.ts} +13 -13
  219. package/src/private_kernel/hints/index.ts +1 -1
  220. package/src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts +164 -117
  221. package/src/private_kernel/hints/test_utils.ts +325 -0
  222. package/src/private_kernel/private_kernel_execution_prover.ts +18 -16
  223. package/src/private_kernel/private_kernel_oracle.ts +21 -21
  224. package/src/pxe.ts +184 -81
  225. package/src/storage/anchor_block_store/anchor_block_store.ts +1 -1
  226. package/src/storage/capsule_store/capsule_service.ts +90 -0
  227. package/src/storage/capsule_store/capsule_store.ts +44 -26
  228. package/src/storage/capsule_store/index.ts +1 -0
  229. package/src/storage/contract_store/contract_store.ts +177 -76
  230. package/src/storage/metadata.ts +1 -1
  231. package/src/storage/note_store/note_store.ts +2 -5
  232. package/src/storage/private_event_store/private_event_store.ts +4 -0
  233. package/src/storage/private_event_store/stored_private_event.ts +1 -1
  234. package/src/storage/tagging_store/recipient_tagging_store.ts +9 -5
  235. package/src/storage/tagging_store/sender_tagging_store.ts +185 -138
  236. package/src/tagging/get_all_logs_by_tags.ts +28 -4
  237. package/src/tagging/index.ts +2 -2
  238. package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +12 -25
  239. package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +2 -2
  240. package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +10 -15
  241. package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +23 -10
  242. package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +26 -11
  243. package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +27 -26
  244. package/dest/access_scopes.d.ts +0 -9
  245. package/dest/access_scopes.d.ts.map +0 -1
  246. package/dest/access_scopes.js +0 -6
  247. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +0 -4
  248. package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +0 -1
  249. package/src/access_scopes.ts +0 -9
package/dest/pxe.js CHANGED
@@ -13,12 +13,14 @@ import { BlockSynchronizer } from './block_synchronizer/index.js';
13
13
  import { BenchmarkedNodeFactory } from './contract_function_simulator/benchmarked_node.js';
14
14
  import { ContractFunctionSimulator, generateSimulatedProvingResult } from './contract_function_simulator/contract_function_simulator.js';
15
15
  import { ProxiedContractStoreFactory } from './contract_function_simulator/proxied_contract_data_source.js';
16
+ import { displayDebugLogs } from './contract_logging.js';
16
17
  import { ContractSyncService } from './contract_sync/contract_sync_service.js';
17
18
  import { readCurrentClassId } from './contract_sync/helpers.js';
18
19
  import { PXEDebugUtils } from './debug/pxe_debug_utils.js';
19
20
  import { enrichPublicSimulationError, enrichSimulationError } from './error_enriching.js';
20
21
  import { PrivateEventFilterValidator } from './events/private_event_filter_validator.js';
21
22
  import { JobCoordinator } from './job_coordinator/job_coordinator.js';
23
+ import { MessageContextService } from './messages/message_context_service.js';
22
24
  import { PrivateKernelExecutionProver } from './private_kernel/private_kernel_execution_prover.js';
23
25
  import { PrivateKernelOracle } from './private_kernel/private_kernel_oracle.js';
24
26
  import { AddressStore } from './storage/address_store/address_store.js';
@@ -35,6 +37,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
35
37
  * manage private state of users.
36
38
  */ export class PXE {
37
39
  node;
40
+ db;
38
41
  blockStateSynchronizer;
39
42
  keyStore;
40
43
  contractStore;
@@ -47,6 +50,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
47
50
  addressStore;
48
51
  privateEventStore;
49
52
  contractSyncService;
53
+ messageContextService;
54
+ l2TipsStore;
50
55
  simulator;
51
56
  proverEnabled;
52
57
  proofCreator;
@@ -55,8 +60,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
55
60
  jobQueue;
56
61
  jobCoordinator;
57
62
  debug;
58
- constructor(node, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
63
+ constructor(node, db, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, messageContextService, l2TipsStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
59
64
  this.node = node;
65
+ this.db = db;
60
66
  this.blockStateSynchronizer = blockStateSynchronizer;
61
67
  this.keyStore = keyStore;
62
68
  this.contractStore = contractStore;
@@ -69,6 +75,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
69
75
  this.addressStore = addressStore;
70
76
  this.privateEventStore = privateEventStore;
71
77
  this.contractSyncService = contractSyncService;
78
+ this.messageContextService = messageContextService;
79
+ this.l2TipsStore = l2TipsStore;
72
80
  this.simulator = simulator;
73
81
  this.proverEnabled = proverEnabled;
74
82
  this.proofCreator = proofCreator;
@@ -102,6 +110,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
102
110
  const keyStore = new KeyStore(store);
103
111
  const tipsStore = new L2TipsKVStore(store, 'pxe');
104
112
  const contractSyncService = new ContractSyncService(node, contractStore, noteStore, createLogger('pxe:contract_sync', bindings));
113
+ const messageContextService = new MessageContextService(node);
105
114
  const synchronizer = new BlockSynchronizer(node, store, anchorBlockStore, noteStore, privateEventStore, tipsStore, contractSyncService, config, bindings);
106
115
  const jobCoordinator = new JobCoordinator(store, bindings);
107
116
  jobCoordinator.registerStores([
@@ -114,8 +123,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
114
123
  ]);
115
124
  const debugUtils = new PXEDebugUtils(contractSyncService, noteStore, synchronizer, anchorBlockStore);
116
125
  const jobQueue = new SerialQueue();
117
- const pxe = new PXE(node, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debugUtils);
118
- debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#simulateUtility.bind(pxe));
126
+ const pxe = new PXE(node, store, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, messageContextService, tipsStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debugUtils);
127
+ debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#executeUtility.bind(pxe));
119
128
  pxe.jobQueue.start();
120
129
  await pxe.#registerProtocolContracts();
121
130
  log.info(`Started PXE connected to chain ${info.l1ChainId} version ${info.rollupVersion}`);
@@ -130,13 +139,15 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
130
139
  keyStore: this.keyStore,
131
140
  addressStore: this.addressStore,
132
141
  aztecNode: BenchmarkedNodeFactory.create(this.node),
142
+ l2TipsStore: this.l2TipsStore,
133
143
  senderTaggingStore: this.senderTaggingStore,
134
144
  recipientTaggingStore: this.recipientTaggingStore,
135
145
  senderAddressBookStore: this.senderAddressBookStore,
136
146
  capsuleStore: this.capsuleStore,
137
147
  privateEventStore: this.privateEventStore,
138
148
  simulator: this.simulator,
139
- contractSyncService: this.contractSyncService
149
+ contractSyncService: this.contractSyncService,
150
+ messageContextService: this.messageContextService
140
151
  });
141
152
  }
142
153
  #contextualizeError(err, ...context) {
@@ -180,8 +191,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
180
191
  async #registerProtocolContracts() {
181
192
  const registered = {};
182
193
  for (const name of protocolContractNames){
183
- const { address, contractClass, instance, artifact } = await this.protocolContractsProvider.getProtocolContractArtifact(name);
184
- await this.contractStore.addContractArtifact(contractClass.id, artifact);
194
+ const { address, instance, artifact } = await this.protocolContractsProvider.getProtocolContractArtifact(name);
195
+ await this.contractStore.addContractArtifact(artifact);
185
196
  await this.contractStore.addContractInstance(instance);
186
197
  registered[name] = address.toString();
187
198
  }
@@ -189,17 +200,17 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
189
200
  }
190
201
  // Executes the entrypoint private function, as well as all nested private
191
202
  // functions that might arise.
192
- async #executePrivate(contractFunctionSimulator, txRequest, scopes, jobId) {
203
+ async #executePrivate({ contractFunctionSimulator, txRequest, anchorBlockHeader, scopes, jobId, senderForTags }) {
193
204
  const { origin: contractAddress, functionSelector } = txRequest;
194
205
  try {
195
- const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
196
- await this.contractSyncService.ensureContractSynced(contractAddress, functionSelector, (privateSyncCall, execScopes)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
206
+ await this.contractSyncService.ensureContractSynced(contractAddress, functionSelector, (privateSyncCall, execScopes)=>this.#executeUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
197
207
  const result = await contractFunctionSimulator.run(txRequest, {
198
208
  contractAddress,
199
209
  selector: functionSelector,
200
210
  anchorBlockHeader,
201
211
  scopes,
202
- jobId
212
+ jobId,
213
+ senderForTags
203
214
  });
204
215
  this.log.debug(`Private simulation completed for ${contractAddress.toString()}:${functionSelector}`);
205
216
  return result;
@@ -211,18 +222,22 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
211
222
  }
212
223
  }
213
224
  /**
214
- * Simulate a utility function call on the given contract.
225
+ * Execute a utility function call on the given contract.
215
226
  * @param contractFunctionSimulator - The simulator to use for the function call.
216
227
  * @param call - The function call to execute.
217
228
  * @param authWitnesses - Authentication witnesses required for the function call.
218
229
  * @param scopes - Optional array of account addresses whose notes can be accessed in this call. Defaults to all
219
230
  * accounts if not specified.
220
231
  * @param jobId - The job ID for staged writes.
221
- * @returns The simulation result containing the outputs of the utility function.
222
- */ async #simulateUtility(contractFunctionSimulator, call, authWitnesses, scopes, jobId) {
232
+ * @returns The execution result containing the outputs of the utility function.
233
+ */ async #executeUtility(contractFunctionSimulator, call, authWitnesses, scopes, jobId) {
223
234
  try {
224
235
  const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
225
- return contractFunctionSimulator.runUtility(call, authWitnesses ?? [], anchorBlockHeader, scopes, jobId);
236
+ const { result, offchainEffects } = await contractFunctionSimulator.runUtility(call, authWitnesses ?? [], anchorBlockHeader, scopes, jobId);
237
+ return {
238
+ result,
239
+ offchainEffects
240
+ };
226
241
  } catch (err) {
227
242
  if (err instanceof SimulationError) {
228
243
  await enrichSimulationError(err, this.contractStore, this.log);
@@ -265,10 +280,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
265
280
  * @param privateExecutionResult - The result of the private execution
266
281
  * @param config - The configuration for the kernel execution prover.
267
282
  * @returns An object that contains the output of the kernel execution, including the ChonkProof if proving is enabled.
268
- */ async #prove(txExecutionRequest, proofCreator, privateExecutionResult, config) {
269
- const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
270
- const anchorBlockHash = await anchorBlockHeader.hash();
271
- const kernelOracle = new PrivateKernelOracle(this.contractStore, this.keyStore, this.node, anchorBlockHash);
283
+ */ async #prove(txExecutionRequest, proofCreator, privateExecutionResult, anchorBlockHeader, config) {
284
+ const kernelOracle = new PrivateKernelOracle(this.contractStore, this.keyStore, this.node, anchorBlockHeader);
272
285
  const kernelTraceProver = new PrivateKernelExecutionProver(kernelOracle, proofCreator, !this.proverEnabled, this.log.getBindings());
273
286
  this.log.debug(`Executing kernel trace prover (${JSON.stringify(config)})...`);
274
287
  return await kernelTraceProver.proveWithKernels(txExecutionRequest.toTxRequest(), privateExecutionResult, config);
@@ -278,7 +291,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
278
291
  * Returns the block header up to which the PXE has synced.
279
292
  * @returns The synced block header
280
293
  */ getSyncedBlockHeader() {
281
- return this.anchorBlockStore.getBlockHeader();
294
+ return this.#putInJobQueue(()=>{
295
+ return this.anchorBlockStore.getBlockHeader();
296
+ });
282
297
  }
283
298
  /**
284
299
  * Returns the contract instance for a given address, if it's registered in the PXE.
@@ -326,6 +341,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
326
341
  * @returns The address of the sender.
327
342
  * TODO: It's strange that we return the address here and I (benesjan) think we should drop the return value.
328
343
  */ async registerSender(sender) {
344
+ if (!await sender.isValid()) {
345
+ throw new Error(`Address ${sender} is not valid: it does not correspond to a point on the Grumpkin curve. Cannot register it as a sender.`);
346
+ }
329
347
  const accounts = await this.keyStore.getAccounts();
330
348
  if (accounts.includes(sender)) {
331
349
  this.log.info(`Sender:\n "${sender.toString()}"\n already registered.`);
@@ -334,6 +352,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
334
352
  const wasAdded = await this.senderAddressBookStore.addSender(sender);
335
353
  if (wasAdded) {
336
354
  this.log.info(`Added sender:\n ${sender.toString()}`);
355
+ // Wipe the entire sync cache: the new sender's tagged logs could contain notes/events for any contract, so
356
+ // all contracts must re-sync to discover them. Queued to avoid wiping while a job is in flight.
357
+ await this.#putInJobQueue(()=>Promise.resolve(this.contractSyncService.wipe()));
337
358
  } else {
338
359
  this.log.info(`Sender:\n "${sender.toString()}"\n already registered.`);
339
360
  }
@@ -371,8 +392,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
371
392
  *
372
393
  * @param artifact - The build artifact for the contract class.
373
394
  */ async registerContractClass(artifact) {
374
- const { id: contractClassId } = await getContractClassFromArtifact(artifact);
375
- await this.contractStore.addContractArtifact(contractClassId, artifact);
395
+ const contractClassId = await this.contractStore.addContractArtifact(artifact);
376
396
  this.log.info(`Added contract class ${artifact.name} with id ${contractClassId}`);
377
397
  }
378
398
  /**
@@ -388,15 +408,14 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
388
408
  if (artifact) {
389
409
  // If the user provides an artifact, validate it against the expected class id and register it
390
410
  const contractClass = await getContractClassFromArtifact(artifact);
391
- const contractClassId = contractClass.id;
392
- if (!contractClassId.equals(instance.currentContractClassId)) {
393
- throw new Error(`Artifact does not match expected class id (computed ${contractClassId} but instance refers to ${instance.currentContractClassId})`);
411
+ if (!contractClass.id.equals(instance.currentContractClassId)) {
412
+ throw new Error(`Artifact does not match expected class id (computed ${contractClass.id} but instance refers to ${instance.currentContractClassId})`);
394
413
  }
395
414
  const computedAddress = await computeContractAddressFromInstance(instance);
396
415
  if (!computedAddress.equals(instance.address)) {
397
416
  throw new Error('Added a contract in which the address does not match the contract instance.');
398
417
  }
399
- await this.contractStore.addContractArtifact(contractClass.id, artifact);
418
+ await this.contractStore.addContractArtifact(artifact, contractClass);
400
419
  const publicFunctionSignatures = artifact.functions.filter((fn)=>fn.functionType === FunctionType.PUBLIC).map((fn)=>decodeFunctionSignature(fn.name, fn.parameters));
401
420
  await this.node.registerContractFunctionSignatures(publicFunctionSignatures);
402
421
  } else {
@@ -432,11 +451,13 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
432
451
  if (!contractClass.id.equals(currentClassId)) {
433
452
  throw new Error('Could not update contract to a class different from the current one.');
434
453
  }
435
- await this.contractStore.addContractArtifact(contractClass.id, artifact);
436
454
  const publicFunctionSignatures = artifact.functions.filter((fn)=>fn.functionType === FunctionType.PUBLIC).map((fn)=>decodeFunctionSignature(fn.name, fn.parameters));
437
455
  await this.node.registerContractFunctionSignatures(publicFunctionSignatures);
438
456
  currentInstance.currentContractClassId = contractClass.id;
439
- await this.contractStore.addContractInstance(currentInstance);
457
+ await Promise.all([
458
+ this.contractStore.addContractArtifact(artifact, contractClass),
459
+ this.contractStore.addContractInstance(currentInstance)
460
+ ]);
440
461
  this.log.info(`Updated contract ${artifact.name} at ${contractAddress.toString()} to class ${contractClass.id}`);
441
462
  });
442
463
  }
@@ -455,7 +476,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
455
476
  * @returns A result containing the proof and public inputs of the tail circuit.
456
477
  * @throws If contract code not found, or public simulation reverts.
457
478
  * Also throws if simulatePublic is true and public simulation reverts.
458
- */ proveTx(txRequest, scopes) {
479
+ */ proveTx(txRequest, { scopes, senderForTags }) {
459
480
  let privateExecutionResult;
460
481
  // We disable proving concurrently mostly out of caution, since it accesses some of our stores. Proving is so
461
482
  // computationally demanding that it'd be rare for someone to try to do it concurrently regardless.
@@ -464,10 +485,18 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
464
485
  try {
465
486
  const syncTimer = new Timer();
466
487
  await this.blockStateSynchronizer.sync();
488
+ const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
467
489
  const syncTime = syncTimer.ms();
468
490
  const contractFunctionSimulator = this.#getSimulatorForTx();
469
- privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes, jobId);
470
- const { publicInputs, chonkProof, executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
491
+ privateExecutionResult = await this.#executePrivate({
492
+ contractFunctionSimulator,
493
+ txRequest,
494
+ anchorBlockHeader,
495
+ scopes,
496
+ jobId,
497
+ senderForTags
498
+ });
499
+ const { publicInputs, chonkProof, executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, anchorBlockHeader, {
471
500
  simulate: false,
472
501
  skipFeeEnforcement: false,
473
502
  profileMode: 'none'
@@ -497,16 +526,16 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
497
526
  // transaction before this one is included in a block from this PXE, and that transaction contains a log with
498
527
  // a tag derived from the same secret, we would reuse the tag and the transactions would be linked. Hence
499
528
  // storing the tags here prevents linkage of txs sent from the same PXE.
500
- const preTagsUsedInTheTx = privateExecutionResult.entrypoint.preTags;
501
- if (preTagsUsedInTheTx.length > 0) {
529
+ const taggingIndexRangesUsedInTheTx = privateExecutionResult.entrypoint.taggingIndexRanges;
530
+ if (taggingIndexRangesUsedInTheTx.length > 0) {
502
531
  // TODO(benesjan): The following is an expensive operation. Figure out a way to avoid it.
503
532
  const txHash = (await txProvingResult.toTx()).txHash;
504
- await this.senderTaggingStore.storePendingIndexes(preTagsUsedInTheTx, txHash, jobId);
505
- this.log.debug(`Stored used pre-tags as sender for the tx`, {
506
- preTagsUsedInTheTx
533
+ await this.senderTaggingStore.storePendingIndexes(taggingIndexRangesUsedInTheTx, txHash, jobId);
534
+ this.log.debug(`Stored used tagging index ranges as sender for the tx`, {
535
+ taggingIndexRangesUsedInTheTx
507
536
  });
508
537
  } else {
509
- this.log.debug(`No pre-tags used in the tx`);
538
+ this.log.debug(`No tagging index ranges used in the tx`);
510
539
  }
511
540
  return txProvingResult;
512
541
  } catch (err) {
@@ -519,7 +548,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
519
548
  * @param txRequest - An authenticated tx request ready for simulation.
520
549
  * @returns A trace of the program execution with gate counts.
521
550
  * @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
522
- */ profileTx(txRequest, { profileMode, skipProofGeneration = true, scopes }) {
551
+ */ profileTx(txRequest, { profileMode, skipProofGeneration = true, scopes, senderForTags }) {
523
552
  // We disable concurrent profiles for consistency with simulateTx.
524
553
  return this.#putInJobQueue(async (jobId)=>{
525
554
  const totalTimer = new Timer();
@@ -535,10 +564,18 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
535
564
  this.log.info(`Profiling transaction execution request to ${txRequest.functionSelector} at ${txRequest.origin}`, txInfo);
536
565
  const syncTimer = new Timer();
537
566
  await this.blockStateSynchronizer.sync();
567
+ const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
538
568
  const syncTime = syncTimer.ms();
539
569
  const contractFunctionSimulator = this.#getSimulatorForTx();
540
- const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes, jobId);
541
- const { executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
570
+ const privateExecutionResult = await this.#executePrivate({
571
+ contractFunctionSimulator,
572
+ txRequest,
573
+ anchorBlockHeader,
574
+ scopes,
575
+ jobId,
576
+ senderForTags
577
+ });
578
+ const { executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, anchorBlockHeader, {
542
579
  simulate: skipProofGeneration,
543
580
  skipFeeEnforcement: false,
544
581
  profileMode
@@ -588,7 +625,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
588
625
  * Also throws if simulatePublic is true and public simulation reverts.
589
626
  *
590
627
  * TODO(#7456) Prevent msgSender being defined here for the first call
591
- */ simulateTx(txRequest, { simulatePublic, skipTxValidation = false, skipFeeEnforcement = false, overrides, scopes }) {
628
+ */ simulateTx(txRequest, { simulatePublic, skipTxValidation = false, skipFeeEnforcement = false, skipKernels = true, overrides, scopes, senderForTags }) {
592
629
  // We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
593
630
  // to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
594
631
  // delete the same read value, or reading values that another simulation is currently modifying).
@@ -606,27 +643,35 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
606
643
  this.log.info(`Simulating transaction execution request to ${txRequest.functionSelector} at ${txRequest.origin}`, txInfo);
607
644
  const syncTimer = new Timer();
608
645
  await this.blockStateSynchronizer.sync();
646
+ const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
609
647
  const syncTime = syncTimer.ms();
610
- const contractFunctionSimulator = this.#getSimulatorForTx(overrides);
611
- // Temporary: in case there are overrides, we have to skip the kernels or validations
612
- // will fail. Consider handing control to the user/wallet on whether they want to run them
613
- // or not.
614
648
  const overriddenContracts = overrides?.contracts ? new Set(Object.keys(overrides.contracts)) : undefined;
615
649
  const hasOverriddenContracts = overriddenContracts !== undefined && overriddenContracts.size > 0;
616
- const skipKernels = hasOverriddenContracts;
617
- // Set overridden contracts on the sync service so it knows to skip syncing them
650
+ if (hasOverriddenContracts && !skipKernels) {
651
+ throw new Error('Simulating with overridden contracts is not compatible with kernel execution. Please set skipKernels to true when simulating with overridden contracts.');
652
+ }
653
+ const contractFunctionSimulator = this.#getSimulatorForTx(overrides);
618
654
  if (hasOverriddenContracts) {
619
- this.contractSyncService.setOverriddenContracts(jobId, overriddenContracts);
655
+ // Overridden contracts don't have a sync function, so calling sync on them would fail.
656
+ // We exclude them so the sync service skips them entirely.
657
+ this.contractSyncService.setExcludedFromSync(jobId, overriddenContracts);
620
658
  }
621
659
  // Execution of private functions only; no proving, and no kernel logic.
622
- const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes, jobId);
660
+ const privateExecutionResult = await this.#executePrivate({
661
+ contractFunctionSimulator,
662
+ txRequest,
663
+ anchorBlockHeader,
664
+ scopes,
665
+ jobId,
666
+ senderForTags
667
+ });
623
668
  let publicInputs;
624
669
  let executionSteps = [];
625
670
  if (skipKernels) {
626
671
  ({ publicInputs, executionSteps } = await generateSimulatedProvingResult(privateExecutionResult, (addr, sel)=>this.contractStore.getDebugFunctionName(addr, sel), this.node));
627
672
  } else {
628
673
  // Kernel logic, plus proving of all private functions and kernels.
629
- ({ publicInputs, executionSteps } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
674
+ ({ publicInputs, executionSteps } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, anchorBlockHeader, {
630
675
  simulate: true,
631
676
  skipFeeEnforcement,
632
677
  profileMode: 'none'
@@ -640,6 +685,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
640
685
  const publicSimulationTimer = new Timer();
641
686
  publicOutput = await this.#simulatePublicCalls(simulatedTx, skipFeeEnforcement);
642
687
  publicSimulationTime = publicSimulationTimer.ms();
688
+ if (publicOutput?.debugLogs?.length) {
689
+ await displayDebugLogs(publicOutput.debugLogs, (addr)=>this.contractStore.getDebugContractName(addr));
690
+ }
643
691
  }
644
692
  let validationTime;
645
693
  if (!skipTxValidation) {
@@ -650,7 +698,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
650
698
  });
651
699
  validationTime = validationTimer.ms();
652
700
  if (validationResult.result === 'invalid') {
653
- throw new Error('The simulated transaction is unable to be added to state and is invalid.');
701
+ const reason = validationResult.reason.length > 0 ? ` Reason: ${validationResult.reason.join(', ')}` : '';
702
+ throw new Error(`The simulated transaction is unable to be added to state and is invalid.${reason}`);
654
703
  }
655
704
  }
656
705
  const txHash = simulatedTx.getTxHash();
@@ -683,19 +732,19 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
683
732
  nodeRPCCalls: simulatorStats.nodeRPCCalls
684
733
  });
685
734
  } catch (err) {
686
- throw this.#contextualizeError(err, inspect(txRequest), `simulatePublic=${simulatePublic}`, `skipTxValidation=${skipTxValidation}`, `scopes=${scopes === 'ALL_SCOPES' ? scopes : scopes.map((s)=>s.toString()).join(', ')}`);
735
+ throw this.#contextualizeError(err, inspect(txRequest), `simulatePublic=${simulatePublic}`, `skipTxValidation=${skipTxValidation}`, `scopes=${scopes.map((s)=>s.toString()).join(', ')}`);
687
736
  }
688
737
  });
689
738
  }
690
739
  /**
691
- * Simulates the execution of a contract utility function.
740
+ * Executes a contract utility function.
692
741
  * @param call - The function call containing the function details, arguments, and target contract address.
693
- */ simulateUtility(call, { authwits, scopes } = {
694
- scopes: 'ALL_SCOPES'
742
+ */ executeUtility(call, { authwits, scopes } = {
743
+ scopes: []
695
744
  }) {
696
- // We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
745
+ // We disable concurrent executions since those might execute oracles which read and write to the PXE stores (e.g.
697
746
  // to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
698
- // delete the same read value, or reading values that another simulation is currently modifying).
747
+ // delete the same read value, or reading values that another execution is currently modifying).
699
748
  return this.#putInJobQueue(async (jobId)=>{
700
749
  try {
701
750
  const totalTimer = new Timer();
@@ -705,8 +754,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
705
754
  const functionTimer = new Timer();
706
755
  const contractFunctionSimulator = this.#getSimulatorForTx();
707
756
  const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
708
- await this.contractSyncService.ensureContractSynced(call.to, call.selector, (privateSyncCall, execScopes)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
709
- const executionResult = await this.#simulateUtility(contractFunctionSimulator, call, authwits ?? [], scopes, jobId);
757
+ await this.contractSyncService.ensureContractSynced(call.to, call.selector, (privateSyncCall, execScopes)=>this.#executeUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
758
+ const { result: executionResult, offchainEffects } = await this.#executeUtility(contractFunctionSimulator, call, authwits ?? [], scopes, jobId);
710
759
  const functionTime = functionTimer.ms();
711
760
  const totalTime = totalTimer.ms();
712
761
  const perFunction = [
@@ -724,6 +773,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
724
773
  const simulationStats = contractFunctionSimulator.getStats();
725
774
  return {
726
775
  result: executionResult,
776
+ offchainEffects,
777
+ anchorBlockTimestamp: anchorBlockHeader.globalVariables.timestamp,
727
778
  stats: {
728
779
  timings,
729
780
  nodeRPCCalls: simulationStats.nodeRPCCalls
@@ -732,7 +783,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
732
783
  } catch (err) {
733
784
  const { to, name, args } = call;
734
785
  const stringifiedArgs = args.map((arg)=>arg.toString()).join(', ');
735
- throw this.#contextualizeError(err, `simulateUtility ${to}:${name}(${stringifiedArgs})`, `scopes=${scopes === 'ALL_SCOPES' ? scopes : scopes.map((s)=>s.toString()).join(', ')}`);
786
+ throw this.#contextualizeError(err, `executeUtility ${to}:${name}(${stringifiedArgs})`, `scopes=${scopes.map((s)=>s.toString()).join(', ')}`);
736
787
  }
737
788
  });
738
789
  }
@@ -755,7 +806,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
755
806
  const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
756
807
  anchorBlockNumber = anchorBlockHeader.getBlockNumber();
757
808
  const contractFunctionSimulator = this.#getSimulatorForTx();
758
- await this.contractSyncService.ensureContractSynced(filter.contractAddress, null, async (privateSyncCall, execScopes)=>await this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, filter.scopes);
809
+ await this.contractSyncService.ensureContractSynced(filter.contractAddress, null, async (privateSyncCall, execScopes)=>await this.#executeUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, filter.scopes);
759
810
  });
760
811
  // anchorBlockNumber is set during the job and fixed to whatever it is after a block sync
761
812
  const sanitizedFilter = new PrivateEventFilterValidator(anchorBlockNumber).validate(filter);
@@ -763,8 +814,10 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
763
814
  return this.privateEventStore.getPrivateEvents(eventSelector, sanitizedFilter);
764
815
  }
765
816
  /**
766
- * Stops the PXE's job queue.
767
- */ stop() {
768
- return this.jobQueue.end();
817
+ * Stops the PXE's job queue and closes the backing store.
818
+ */ async stop() {
819
+ await this.jobQueue.end();
820
+ await this.blockStateSynchronizer.stop();
821
+ await this.db.close();
769
822
  }
770
823
  }
@@ -17,7 +17,7 @@ export class AnchorBlockStore {
17
17
  await this.#synchronizedHeader.set(header.toBuffer());
18
18
  }
19
19
  async getBlockHeader() {
20
- const headerBuffer = await this.#synchronizedHeader.getAsync();
20
+ const headerBuffer = await this.#store.transactionAsync(()=>this.#synchronizedHeader.getAsync());
21
21
  if (!headerBuffer) {
22
22
  throw new Error(`Trying to get block header with a not-yet-synchronized PXE - this should never happen`);
23
23
  }
@@ -0,0 +1,21 @@
1
+ import type { Fr } from '@aztec/foundation/curves/bn254';
2
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
3
+ import type { Capsule } from '@aztec/stdlib/tx';
4
+ import type { CapsuleStore } from './capsule_store.js';
5
+ /**
6
+ * Wraps a CapsuleStore with scope-based access control. Each operation asserts that the requested scope is in the
7
+ * allowed scopes list before delegating to the underlying store.
8
+ */
9
+ export declare class CapsuleService {
10
+ private readonly capsuleStore;
11
+ private readonly allowedScopes;
12
+ constructor(capsuleStore: CapsuleStore, allowedScopes: AztecAddress[]);
13
+ setCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[], jobId: string, scope: AztecAddress): void;
14
+ getCapsule(contractAddress: AztecAddress, slot: Fr, jobId: string, scope: AztecAddress, transientCapsules?: Capsule[]): Promise<Fr[] | null>;
15
+ deleteCapsule(contractAddress: AztecAddress, slot: Fr, jobId: string, scope: AztecAddress): void;
16
+ copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number, jobId: string, scope: AztecAddress): Promise<void>;
17
+ appendToCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][], jobId: string, scope: AztecAddress): Promise<void>;
18
+ readCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, jobId: string, scope: AztecAddress): Promise<Fr[][]>;
19
+ setCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][], jobId: string, scope: AztecAddress): Promise<void>;
20
+ }
21
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2Fwc3VsZV9zZXJ2aWNlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc3RvcmFnZS9jYXBzdWxlX3N0b3JlL2NhcHN1bGVfc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUN6RCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDM0QsT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AE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,QAGpG;IAEK,UAAU,CACd,eAAe,EAAE,YAAY,EAC7B,IAAI,EAAE,EAAE,EACR,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,YAAY,EACnB,iBAAiB,CAAC,EAAE,OAAO,EAAE,GAC5B,OAAO,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAYtB;IAED,aAAa,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,QAGxF;IAED,WAAW,CACT,eAAe,EAAE,YAAY,EAC7B,OAAO,EAAE,EAAE,EACX,OAAO,EAAE,EAAE,EACX,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,IAAI,CAAC,CAGf;IAED,oBAAoB,CAClB,eAAe,EAAE,YAAY,EAC7B,QAAQ,EAAE,EAAE,EACZ,OAAO,EAAE,EAAE,EAAE,EAAE,EACf,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,IAAI,CAAC,CAGf;IAED,gBAAgB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAGjH;IAED,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,iBAG/G;CACF"}
@@ -0,0 +1,50 @@
1
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
2
+ /**
3
+ * Wraps a CapsuleStore with scope-based access control. Each operation asserts that the requested scope is in the
4
+ * allowed scopes list before delegating to the underlying store.
5
+ */ export class CapsuleService {
6
+ capsuleStore;
7
+ allowedScopes;
8
+ constructor(capsuleStore, allowedScopes){
9
+ this.capsuleStore = capsuleStore;
10
+ this.allowedScopes = allowedScopes;
11
+ }
12
+ setCapsule(contractAddress, slot, capsule, jobId, scope) {
13
+ assertAllowedScope(scope, this.allowedScopes);
14
+ this.capsuleStore.setCapsule(contractAddress, slot, capsule, jobId, scope);
15
+ }
16
+ async getCapsule(contractAddress, slot, jobId, scope, transientCapsules) {
17
+ assertAllowedScope(scope, this.allowedScopes);
18
+ // TODO(#12425): On the following line, the pertinent capsule gets overshadowed by the transient one. Tackle this.
19
+ const maybeTransientCapsule = transientCapsules?.find((c)=>c.contractAddress.equals(contractAddress) && c.storageSlot.equals(slot) && (c.scope ?? AztecAddress.ZERO).equals(scope))?.data;
20
+ return maybeTransientCapsule ?? await this.capsuleStore.getCapsule(contractAddress, slot, jobId, scope);
21
+ }
22
+ deleteCapsule(contractAddress, slot, jobId, scope) {
23
+ assertAllowedScope(scope, this.allowedScopes);
24
+ this.capsuleStore.deleteCapsule(contractAddress, slot, jobId, scope);
25
+ }
26
+ copyCapsule(contractAddress, srcSlot, dstSlot, numEntries, jobId, scope) {
27
+ assertAllowedScope(scope, this.allowedScopes);
28
+ return this.capsuleStore.copyCapsule(contractAddress, srcSlot, dstSlot, numEntries, jobId, scope);
29
+ }
30
+ appendToCapsuleArray(contractAddress, baseSlot, content, jobId, scope) {
31
+ assertAllowedScope(scope, this.allowedScopes);
32
+ return this.capsuleStore.appendToCapsuleArray(contractAddress, baseSlot, content, jobId, scope);
33
+ }
34
+ readCapsuleArray(contractAddress, baseSlot, jobId, scope) {
35
+ assertAllowedScope(scope, this.allowedScopes);
36
+ return this.capsuleStore.readCapsuleArray(contractAddress, baseSlot, jobId, scope);
37
+ }
38
+ setCapsuleArray(contractAddress, baseSlot, content, jobId, scope) {
39
+ assertAllowedScope(scope, this.allowedScopes);
40
+ return this.capsuleStore.setCapsuleArray(contractAddress, baseSlot, content, jobId, scope);
41
+ }
42
+ }
43
+ function assertAllowedScope(scope, allowedScopes) {
44
+ if (scope.equals(AztecAddress.ZERO)) {
45
+ return;
46
+ }
47
+ if (!allowedScopes.some((allowed)=>allowed.equals(scope))) {
48
+ throw new Error(`Scope ${scope.toString()} is not in the allowed scopes list: [${allowedScopes.map((s)=>s.toString()).join(', ')}]. See https://docs.aztec.network/errors/10`);
49
+ }
50
+ }
@@ -1,7 +1,7 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { type Logger } from '@aztec/foundation/log';
3
3
  import type { AztecAsyncKVStore } from '@aztec/kv-store';
4
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
5
5
  import type { StagedStore } from '../../job_coordinator/job_coordinator.js';
6
6
  export declare class CapsuleStore implements StagedStore {
7
7
  #private;
@@ -31,20 +31,20 @@ export declare class CapsuleStore implements StagedStore {
31
31
  * to public contract storage in that it's indexed by the contract address and storage slot but instead of the global
32
32
  * network state it's backed by local PXE db.
33
33
  */
34
- storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[], jobId: string): void;
34
+ setCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[], jobId: string, scope: AztecAddress): void;
35
35
  /**
36
36
  * Returns data previously stored via `storeCapsule` in the per-contract non-volatile database.
37
37
  * @param contractAddress - The contract address under which the data is scoped.
38
38
  * @param slot - The slot in the database to read.
39
39
  * @returns The stored data or `null` if no data is stored under the slot.
40
40
  */
41
- loadCapsule(contractAddress: AztecAddress, slot: Fr, jobId: string): Promise<Fr[] | null>;
41
+ getCapsule(contractAddress: AztecAddress, slot: Fr, jobId: string, scope: AztecAddress): Promise<Fr[] | null>;
42
42
  /**
43
43
  * Deletes data in the per-contract non-volatile database. Does nothing if no data was present.
44
44
  * @param contractAddress - The contract address under which the data is scoped.
45
45
  * @param slot - The slot in the database to delete.
46
46
  */
47
- deleteCapsule(contractAddress: AztecAddress, slot: Fr, jobId: string): void;
47
+ deleteCapsule(contractAddress: AztecAddress, slot: Fr, jobId: string, scope: AztecAddress): void;
48
48
  /**
49
49
  * Copies a number of contiguous entries in the per-contract non-volatile database. This allows for efficient data
50
50
  * structures by avoiding repeated calls to `loadCapsule` and `storeCapsule`.
@@ -56,7 +56,7 @@ export declare class CapsuleStore implements StagedStore {
56
56
  * @param dstSlot - The first slot to copy to.
57
57
  * @param numEntries - The number of entries to copy.
58
58
  */
59
- copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number, jobId: string): Promise<void>;
59
+ copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number, jobId: string, scope: AztecAddress): Promise<void>;
60
60
  /**
61
61
  * Appends multiple capsules to a capsule array stored at the base slot.
62
62
  * The array length is stored at the base slot, and elements are stored in consecutive slots after it.
@@ -65,8 +65,8 @@ export declare class CapsuleStore implements StagedStore {
65
65
  * @param baseSlot - The slot where the array length is stored
66
66
  * @param content - Array of capsule data to append
67
67
  */
68
- appendToCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][], jobId: string): Promise<void>;
69
- readCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, jobId: string): Promise<Fr[][]>;
70
- setCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][], jobId: string): Promise<void>;
68
+ appendToCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][], jobId: string, scope: AztecAddress): Promise<void>;
69
+ readCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, jobId: string, scope: AztecAddress): Promise<Fr[][]>;
70
+ setCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][], jobId: string, scope: AztecAddress): Promise<void>;
71
71
  }
72
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2Fwc3VsZV9zdG9yZS5kLnRzI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