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

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 (180) hide show
  1. package/dest/block_synchronizer/block_synchronizer.d.ts +6 -2
  2. package/dest/block_synchronizer/block_synchronizer.d.ts.map +1 -1
  3. package/dest/block_synchronizer/block_synchronizer.js +21 -13
  4. package/dest/config/package_info.js +1 -1
  5. package/dest/contract_function_simulator/benchmarked_node.d.ts +9 -0
  6. package/dest/contract_function_simulator/benchmarked_node.d.ts.map +1 -0
  7. package/dest/contract_function_simulator/benchmarked_node.js +77 -0
  8. package/dest/contract_function_simulator/contract_function_simulator.d.ts +8 -9
  9. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  10. package/dest/contract_function_simulator/contract_function_simulator.js +33 -16
  11. package/dest/contract_function_simulator/execution_note_cache.d.ts +18 -9
  12. package/dest/contract_function_simulator/execution_note_cache.d.ts.map +1 -1
  13. package/dest/contract_function_simulator/execution_note_cache.js +45 -28
  14. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +3 -2
  15. package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
  16. package/dest/contract_function_simulator/noir-structs/event_validation_request.js +5 -2
  17. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts +4 -10
  18. package/dest/contract_function_simulator/noir-structs/utility_context.d.ts.map +1 -1
  19. package/dest/contract_function_simulator/noir-structs/utility_context.js +7 -18
  20. package/dest/contract_function_simulator/oracle/interfaces.d.ts +9 -8
  21. package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
  22. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts +3 -1
  23. package/dest/contract_function_simulator/oracle/message_load_oracle_inputs.d.ts.map +1 -1
  24. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +4 -4
  25. package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -1
  26. package/dest/contract_function_simulator/oracle/note_packing_utils.js +5 -5
  27. package/dest/contract_function_simulator/oracle/oracle.d.ts +6 -6
  28. package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
  29. package/dest/contract_function_simulator/oracle/oracle.js +20 -19
  30. package/dest/contract_function_simulator/oracle/private_execution.d.ts +5 -9
  31. package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
  32. package/dest/contract_function_simulator/oracle/private_execution.js +11 -10
  33. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +8 -18
  34. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  35. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +10 -35
  36. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +14 -12
  37. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  38. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +54 -52
  39. package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
  40. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
  41. package/dest/entrypoints/client/bundle/utils.js +10 -1
  42. package/dest/entrypoints/client/lazy/utils.d.ts +1 -1
  43. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
  44. package/dest/entrypoints/client/lazy/utils.js +10 -1
  45. package/dest/entrypoints/pxe_creation_options.d.ts +3 -2
  46. package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
  47. package/dest/entrypoints/server/index.d.ts +2 -1
  48. package/dest/entrypoints/server/index.d.ts.map +1 -1
  49. package/dest/entrypoints/server/index.js +1 -0
  50. package/dest/entrypoints/server/utils.d.ts +1 -1
  51. package/dest/entrypoints/server/utils.d.ts.map +1 -1
  52. package/dest/entrypoints/server/utils.js +11 -7
  53. package/dest/events/event_service.d.ts +4 -3
  54. package/dest/events/event_service.d.ts.map +1 -1
  55. package/dest/events/event_service.js +17 -19
  56. package/dest/events/private_event_filter_validator.d.ts +5 -5
  57. package/dest/events/private_event_filter_validator.d.ts.map +1 -1
  58. package/dest/events/private_event_filter_validator.js +5 -6
  59. package/dest/job_coordinator/job_coordinator.d.ts +74 -0
  60. package/dest/job_coordinator/job_coordinator.d.ts.map +1 -0
  61. package/dest/job_coordinator/job_coordinator.js +93 -0
  62. package/dest/logs/log_service.d.ts +3 -2
  63. package/dest/logs/log_service.d.ts.map +1 -1
  64. package/dest/logs/log_service.js +5 -3
  65. package/dest/notes/note_service.d.ts +3 -3
  66. package/dest/notes/note_service.d.ts.map +1 -1
  67. package/dest/notes/note_service.js +23 -28
  68. package/dest/oracle_version.d.ts +2 -2
  69. package/dest/oracle_version.js +2 -2
  70. package/dest/private_kernel/hints/index.d.ts +2 -2
  71. package/dest/private_kernel/hints/index.d.ts.map +1 -1
  72. package/dest/private_kernel/hints/index.js +1 -1
  73. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +28 -0
  74. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -0
  75. package/dest/private_kernel/hints/{build_private_kernel_reset_private_inputs.js → private_kernel_reset_private_inputs_builder.js} +13 -7
  76. package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
  77. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  78. package/dest/private_kernel/private_kernel_execution_prover.js +4 -5
  79. package/dest/private_kernel/private_kernel_oracle.d.ts +24 -28
  80. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
  81. package/dest/private_kernel/private_kernel_oracle.js +90 -2
  82. package/dest/pxe.d.ts +8 -36
  83. package/dest/pxe.d.ts.map +1 -1
  84. package/dest/pxe.js +65 -87
  85. package/dest/storage/capsule_store/capsule_store.d.ts +24 -9
  86. package/dest/storage/capsule_store/capsule_store.d.ts.map +1 -1
  87. package/dest/storage/capsule_store/capsule_store.js +132 -23
  88. package/dest/storage/contract_store/contract_store.d.ts +2 -1
  89. package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
  90. package/dest/storage/contract_store/contract_store.js +12 -0
  91. package/dest/storage/note_store/note_store.d.ts +6 -5
  92. package/dest/storage/note_store/note_store.d.ts.map +1 -1
  93. package/dest/storage/note_store/note_store.js +89 -94
  94. package/dest/storage/private_event_store/private_event_store.d.ts +33 -6
  95. package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
  96. package/dest/storage/private_event_store/private_event_store.js +139 -32
  97. package/dest/storage/tagging_store/recipient_tagging_store.d.ts +15 -8
  98. package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -1
  99. package/dest/storage/tagging_store/recipient_tagging_store.js +69 -12
  100. package/dest/storage/tagging_store/sender_tagging_store.d.ts +19 -9
  101. package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
  102. package/dest/storage/tagging_store/sender_tagging_store.js +110 -28
  103. package/dest/tagging/constants.d.ts +2 -0
  104. package/dest/tagging/constants.d.ts.map +1 -0
  105. package/dest/tagging/constants.js +10 -0
  106. package/dest/tagging/index.d.ts +2 -2
  107. package/dest/tagging/index.d.ts.map +1 -1
  108. package/dest/tagging/index.js +1 -10
  109. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +2 -2
  110. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -1
  111. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +7 -7
  112. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +2 -2
  113. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
  114. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +8 -8
  115. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts +1 -1
  116. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.d.ts.map +1 -1
  117. package/dest/tagging/sender_sync/utils/get_status_change_of_pending.js +2 -2
  118. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +4 -2
  119. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -1
  120. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +4 -2
  121. package/dest/tree_membership/tree_membership_service.d.ts +9 -11
  122. package/dest/tree_membership/tree_membership_service.d.ts.map +1 -1
  123. package/dest/tree_membership/tree_membership_service.js +25 -34
  124. package/package.json +18 -18
  125. package/src/block_synchronizer/block_synchronizer.ts +30 -12
  126. package/src/config/package_info.ts +1 -1
  127. package/src/contract_function_simulator/benchmarked_node.ts +103 -0
  128. package/src/contract_function_simulator/contract_function_simulator.ts +42 -16
  129. package/src/contract_function_simulator/execution_note_cache.ts +44 -25
  130. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +4 -0
  131. package/src/contract_function_simulator/noir-structs/utility_context.ts +6 -25
  132. package/src/contract_function_simulator/oracle/interfaces.ts +8 -7
  133. package/src/contract_function_simulator/oracle/note_packing_utils.ts +6 -6
  134. package/src/contract_function_simulator/oracle/oracle.ts +24 -22
  135. package/src/contract_function_simulator/oracle/private_execution.ts +10 -19
  136. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +13 -38
  137. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +56 -50
  138. package/src/entrypoints/client/bundle/utils.ts +7 -1
  139. package/src/entrypoints/client/lazy/utils.ts +7 -2
  140. package/src/entrypoints/pxe_creation_options.ts +2 -1
  141. package/src/entrypoints/server/index.ts +1 -0
  142. package/src/entrypoints/server/utils.ts +11 -15
  143. package/src/events/event_service.ts +17 -21
  144. package/src/events/private_event_filter_validator.ts +3 -5
  145. package/src/job_coordinator/job_coordinator.ts +149 -0
  146. package/src/logs/log_service.ts +3 -1
  147. package/src/notes/note_service.ts +23 -29
  148. package/src/oracle_version.ts +2 -2
  149. package/src/private_kernel/hints/index.ts +1 -1
  150. package/src/private_kernel/hints/{build_private_kernel_reset_private_inputs.ts → private_kernel_reset_private_inputs_builder.ts} +33 -22
  151. package/src/private_kernel/private_kernel_execution_prover.ts +3 -5
  152. package/src/private_kernel/private_kernel_oracle.ts +116 -36
  153. package/src/pxe.ts +98 -116
  154. package/src/storage/capsule_store/capsule_store.ts +159 -23
  155. package/src/storage/contract_store/contract_store.ts +20 -0
  156. package/src/storage/note_store/note_store.ts +98 -95
  157. package/src/storage/private_event_store/private_event_store.ts +199 -37
  158. package/src/storage/tagging_store/recipient_tagging_store.ts +89 -13
  159. package/src/storage/tagging_store/sender_tagging_store.ts +129 -28
  160. package/src/tagging/constants.ts +10 -0
  161. package/src/tagging/index.ts +1 -11
  162. package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +10 -6
  163. package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +8 -7
  164. package/src/tagging/sender_sync/utils/get_status_change_of_pending.ts +6 -2
  165. package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +4 -1
  166. package/src/tree_membership/tree_membership_service.ts +27 -42
  167. package/dest/contract_function_simulator/proxied_node.d.ts +0 -9
  168. package/dest/contract_function_simulator/proxied_node.d.ts.map +0 -1
  169. package/dest/contract_function_simulator/proxied_node.js +0 -27
  170. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +0 -28
  171. package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +0 -1
  172. package/dest/private_kernel/private_kernel_oracle_impl.d.ts +0 -46
  173. package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +0 -1
  174. package/dest/private_kernel/private_kernel_oracle_impl.js +0 -86
  175. package/dest/public_storage/public_storage_service.d.ts +0 -24
  176. package/dest/public_storage/public_storage_service.d.ts.map +0 -1
  177. package/dest/public_storage/public_storage_service.js +0 -26
  178. package/src/contract_function_simulator/proxied_node.ts +0 -33
  179. package/src/private_kernel/private_kernel_oracle_impl.ts +0 -133
  180. package/src/public_storage/public_storage_service.ts +0 -33
package/dest/pxe.js CHANGED
@@ -1,4 +1,3 @@
1
- import { Fr } from '@aztec/foundation/curves/bn254';
2
1
  import { createLogger } from '@aztec/foundation/log';
3
2
  import { SerialQueue } from '@aztec/foundation/queue';
4
3
  import { Timer } from '@aztec/foundation/timer';
@@ -6,20 +5,22 @@ import { KeyStore } from '@aztec/key-store';
6
5
  import { L2TipsKVStore } from '@aztec/kv-store/stores';
7
6
  import { protocolContractNames } from '@aztec/protocol-contracts';
8
7
  import { FunctionType, decodeFunctionSignature } from '@aztec/stdlib/abi';
8
+ import { L2BlockHash } from '@aztec/stdlib/block';
9
9
  import { computeContractAddressFromInstance, getContractClassFromArtifact } from '@aztec/stdlib/contract';
10
10
  import { SimulationError } from '@aztec/stdlib/errors';
11
- import { computeProtocolNullifier, siloNullifier } from '@aztec/stdlib/hash';
12
11
  import { PrivateSimulationResult, TxProfileResult, TxProvingResult, TxSimulationResult } from '@aztec/stdlib/tx';
13
12
  import { inspect } from 'util';
14
13
  import { BlockSynchronizer } from './block_synchronizer/index.js';
14
+ import { BenchmarkedNodeFactory } from './contract_function_simulator/benchmarked_node.js';
15
15
  import { ContractFunctionSimulator, generateSimulatedProvingResult } from './contract_function_simulator/contract_function_simulator.js';
16
16
  import { readCurrentClassId } from './contract_function_simulator/oracle/private_execution.js';
17
17
  import { ProxiedContractStoreFactory } from './contract_function_simulator/proxied_contract_data_source.js';
18
18
  import { PXEDebugUtils } from './debug/pxe_debug_utils.js';
19
19
  import { enrichPublicSimulationError, enrichSimulationError } from './error_enriching.js';
20
20
  import { PrivateEventFilterValidator } from './events/private_event_filter_validator.js';
21
+ import { JobCoordinator } from './job_coordinator/job_coordinator.js';
21
22
  import { PrivateKernelExecutionProver } from './private_kernel/private_kernel_execution_prover.js';
22
- import { PrivateKernelOracleImpl } from './private_kernel/private_kernel_oracle_impl.js';
23
+ import { PrivateKernelOracle } from './private_kernel/private_kernel_oracle.js';
23
24
  import { AddressStore } from './storage/address_store/address_store.js';
24
25
  import { AnchorBlockStore } from './storage/anchor_block_store/anchor_block_store.js';
25
26
  import { CapsuleStore } from './storage/capsule_store/capsule_store.js';
@@ -51,8 +52,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
51
52
  protocolContractsProvider;
52
53
  log;
53
54
  jobQueue;
55
+ jobCoordinator;
54
56
  debug;
55
- constructor(node, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, debug){
57
+ constructor(node, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
56
58
  this.node = node;
57
59
  this.blockStateSynchronizer = blockStateSynchronizer;
58
60
  this.keyStore = keyStore;
@@ -71,6 +73,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
71
73
  this.protocolContractsProvider = protocolContractsProvider;
72
74
  this.log = log;
73
75
  this.jobQueue = jobQueue;
76
+ this.jobCoordinator = jobCoordinator;
74
77
  this.debug = debug;
75
78
  }
76
79
  /**
@@ -93,10 +96,17 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
93
96
  const capsuleStore = new CapsuleStore(store);
94
97
  const keyStore = new KeyStore(store);
95
98
  const tipsStore = new L2TipsKVStore(store, 'pxe');
96
- const synchronizer = new BlockSynchronizer(node, anchorBlockStore, noteStore, tipsStore, config, loggerOrSuffix);
99
+ const synchronizer = new BlockSynchronizer(node, store, anchorBlockStore, noteStore, privateEventStore, tipsStore, config, loggerOrSuffix);
100
+ const jobCoordinator = new JobCoordinator(store);
101
+ jobCoordinator.registerStores([
102
+ capsuleStore,
103
+ senderTaggingStore,
104
+ recipientTaggingStore,
105
+ privateEventStore
106
+ ]);
97
107
  const debugUtils = new PXEDebugUtils(contractStore, noteStore);
98
108
  const jobQueue = new SerialQueue();
99
- const pxe = new PXE(node, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, debugUtils);
109
+ const pxe = new PXE(node, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debugUtils);
100
110
  debugUtils.setPXE(pxe);
101
111
  pxe.jobQueue.start();
102
112
  await pxe.#registerProtocolContracts();
@@ -107,7 +117,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
107
117
  // Internal methods
108
118
  #getSimulatorForTx(overrides) {
109
119
  const proxyContractStore = ProxiedContractStoreFactory.create(this.contractStore, overrides?.contracts);
110
- return new ContractFunctionSimulator(proxyContractStore, this.noteStore, this.keyStore, this.addressStore, this.node, this.anchorBlockStore, this.senderTaggingStore, this.recipientTaggingStore, this.senderAddressBookStore, this.capsuleStore, this.privateEventStore, this.simulator);
120
+ return new ContractFunctionSimulator(proxyContractStore, this.noteStore, this.keyStore, this.addressStore, BenchmarkedNodeFactory.create(this.node), this.anchorBlockStore, this.senderTaggingStore, this.recipientTaggingStore, this.senderAddressBookStore, this.capsuleStore, this.privateEventStore, this.simulator);
111
121
  }
112
122
  #contextualizeError(err, ...context) {
113
123
  let contextStr = '';
@@ -132,7 +142,20 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
132
142
  if (this.jobQueue.length() != 0) {
133
143
  this.log.warn(`PXE is already processing ${this.jobQueue.length()} jobs, concurrent execution is not supported. Will run once those are complete.`);
134
144
  }
135
- return this.jobQueue.put(fn);
145
+ return this.jobQueue.put(async ()=>{
146
+ const jobId = this.jobCoordinator.beginJob();
147
+ this.log.verbose(`Beginning job ${jobId}`);
148
+ try {
149
+ const result = await fn(jobId);
150
+ this.log.verbose(`Committing job ${jobId}`);
151
+ await this.jobCoordinator.commitJob(jobId);
152
+ return result;
153
+ } catch (err) {
154
+ this.log.verbose(`Aborting job ${jobId}`);
155
+ await this.jobCoordinator.abortJob(jobId);
156
+ throw err;
157
+ }
158
+ });
136
159
  }
137
160
  async #registerProtocolContracts() {
138
161
  const registered = {};
@@ -144,25 +167,15 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
144
167
  }
145
168
  this.log.verbose(`Registered protocol contracts in pxe`, registered);
146
169
  }
147
- async #isContractClassPubliclyRegistered(id) {
148
- return !!await this.node.getContractClass(id);
149
- }
150
- async #isContractPublished(address) {
151
- return !!await this.node.getContract(address);
152
- }
153
- async #isContractInitialized(address) {
154
- const initNullifier = await siloNullifier(address, address.toField());
155
- return !!await this.node.getNullifierMembershipWitness('latest', initNullifier);
156
- }
157
170
  // Executes the entrypoint private function, as well as all nested private
158
171
  // functions that might arise.
159
- async #executePrivate(contractFunctionSimulator, txRequest, scopes) {
172
+ async #executePrivate(contractFunctionSimulator, txRequest, scopes, jobId) {
160
173
  const { origin: contractAddress, functionSelector } = txRequest;
161
174
  try {
162
175
  const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
163
176
  const result = await contractFunctionSimulator.run(txRequest, contractAddress, functionSelector, undefined, anchorBlockHeader, // The sender for tags is set by contracts, typically by an account
164
177
  // contract entrypoint
165
- undefined, scopes);
178
+ undefined, scopes, jobId);
166
179
  this.log.debug(`Private simulation completed for ${contractAddress.toString()}:${functionSelector}`);
167
180
  return result;
168
181
  } catch (err) {
@@ -179,11 +192,12 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
179
192
  * @param authWitnesses - Authentication witnesses required for the function call.
180
193
  * @param scopes - Optional array of account addresses whose notes can be accessed in this call. Defaults to all
181
194
  * accounts if not specified.
195
+ * @param jobId - The job ID for staged writes.
182
196
  * @returns The simulation result containing the outputs of the utility function.
183
- */ async #simulateUtility(contractFunctionSimulator, call, authWitnesses, scopes) {
197
+ */ async #simulateUtility(contractFunctionSimulator, call, authWitnesses, scopes, jobId) {
184
198
  try {
185
199
  const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
186
- return contractFunctionSimulator.runUtility(call, authWitnesses ?? [], anchorBlockHeader, scopes);
200
+ return contractFunctionSimulator.runUtility(call, authWitnesses ?? [], anchorBlockHeader, scopes, jobId);
187
201
  } catch (err) {
188
202
  if (err instanceof SimulationError) {
189
203
  await enrichSimulationError(err, this.contractStore, this.log);
@@ -227,8 +241,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
227
241
  * @param config - The configuration for the kernel execution prover.
228
242
  * @returns An object that contains the output of the kernel execution, including the ChonkProof if proving is enabled.
229
243
  */ async #prove(txExecutionRequest, proofCreator, privateExecutionResult, config) {
230
- const simulationAnchorBlock = privateExecutionResult.getSimulationAnchorBlockNumber();
231
- const kernelOracle = new PrivateKernelOracleImpl(this.contractStore, this.keyStore, this.node, simulationAnchorBlock);
244
+ const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
245
+ const anchorBlockHash = L2BlockHash.fromField(await anchorBlockHeader.hash());
246
+ const kernelOracle = new PrivateKernelOracle(this.contractStore, this.keyStore, this.node, anchorBlockHash);
232
247
  const kernelTraceProver = new PrivateKernelExecutionProver(kernelOracle, proofCreator, !this.proverEnabled);
233
248
  this.log.debug(`Executing kernel trace prover (${JSON.stringify(config)})...`);
234
249
  return await kernelTraceProver.proveWithKernels(txExecutionRequest.toTxRequest(), privateExecutionResult, config);
@@ -238,51 +253,11 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
238
253
  return this.contractStore.getContractInstance(address);
239
254
  }
240
255
  /**
241
- * Returns the contract class metadata given a contract class id.
242
- * The metadata consists of its contract class, whether it has been publicly registered, and its artifact.
243
- * @remark - it queries the node to check whether the contract class with the given id has been publicly registered.
244
- * @param id - Identifier of the class.
245
- * @param includeArtifact - Identifier of the class.
246
- * @returns - It returns the contract class metadata, with the artifact field being optional, and will only be returned if true is passed in
247
- * for `includeArtifact`
248
- * TODO(@spalladino): The PXE actually holds artifacts and not classes, what should we return? Also,
249
- * should the pxe query the node for contract public info, and merge it with its own definitions?
250
- * TODO(@spalladino): This method is strictly needed to decide whether to publicly register a class or not
251
- * during a public deployment. We probably want a nicer and more general API for this, but it'll have to
252
- * do for the time being.
253
- */ async getContractClassMetadata(id, includeArtifact = false) {
254
- const artifact = await this.contractStore.getContractArtifact(id);
255
- if (!artifact) {
256
- this.log.warn(`No artifact found for contract class ${id.toString()} when looking for its metadata`);
257
- }
258
- return {
259
- contractClass: artifact && await getContractClassFromArtifact(artifact),
260
- isContractClassPubliclyRegistered: await this.#isContractClassPubliclyRegistered(id),
261
- artifact: includeArtifact ? artifact : undefined
262
- };
263
- }
264
- /**
265
- * Returns the contract metadata given an address.
266
- * The metadata consists of its contract instance, which includes the contract class identifier,
267
- * initialization hash, deployment salt, and public keys hash; whether the contract instance has been initialized;
268
- * and whether the contract instance with the given address has been publicly deployed.
269
- * @remark - it queries the node to check whether the contract instance has been initialized / publicly deployed through a node.
270
- * This query is not dependent on the PXE.
271
- * @param address - The address that the contract instance resides at.
272
- * @returns - It returns the contract metadata
273
- * TODO(@spalladino): Should we return the public keys in plain as well here?
274
- */ async getContractMetadata(address) {
275
- let instance;
276
- try {
277
- instance = await this.contractStore.getContractInstance(address);
278
- } catch {
279
- this.log.warn(`No instance found for contract ${address.toString()} when looking for its metadata`);
280
- }
281
- return {
282
- contractInstance: instance,
283
- isContractInitialized: await this.#isContractInitialized(address),
284
- isContractPublished: await this.#isContractPublished(address)
285
- };
256
+ * Returns the contract artifact for a given contract class id, if it's registered in the PXE.
257
+ * @param id - Identifier of the contract class.
258
+ * @returns The contract artifact if found, undefined otherwise.
259
+ */ async getContractArtifact(id) {
260
+ return await this.contractStore.getContractArtifact(id);
286
261
  }
287
262
  /**
288
263
  * Registers a user account in PXE given its master encryption private key.
@@ -419,7 +394,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
419
394
  const contractClass = await getContractClassFromArtifact(artifact);
420
395
  await this.blockStateSynchronizer.sync();
421
396
  const header = await this.anchorBlockStore.getBlockHeader();
422
- const currentClassId = await readCurrentClassId(contractAddress, currentInstance, this.node, header.globalVariables.blockNumber, header.globalVariables.timestamp);
397
+ const currentClassId = await readCurrentClassId(contractAddress, currentInstance, this.node, header);
423
398
  if (!contractClass.id.equals(currentClassId)) {
424
399
  throw new Error('Could not update contract to a class different from the current one.');
425
400
  }
@@ -449,14 +424,14 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
449
424
  let privateExecutionResult;
450
425
  // We disable proving concurrently mostly out of caution, since it accesses some of our stores. Proving is so
451
426
  // computationally demanding that it'd be rare for someone to try to do it concurrently regardless.
452
- return this.#putInJobQueue(async ()=>{
427
+ return this.#putInJobQueue(async (jobId)=>{
453
428
  const totalTimer = new Timer();
454
429
  try {
455
430
  const syncTimer = new Timer();
456
431
  await this.blockStateSynchronizer.sync();
457
432
  const syncTime = syncTimer.ms();
458
433
  const contractFunctionSimulator = this.#getSimulatorForTx();
459
- privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest);
434
+ privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, undefined, jobId);
460
435
  const { publicInputs, chonkProof, executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
461
436
  simulate: false,
462
437
  skipFeeEnforcement: false,
@@ -491,7 +466,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
491
466
  if (preTagsUsedInTheTx.length > 0) {
492
467
  // TODO(benesjan): The following is an expensive operation. Figure out a way to avoid it.
493
468
  const txHash = (await txProvingResult.toTx()).txHash;
494
- await this.senderTaggingStore.storePendingIndexes(preTagsUsedInTheTx, txHash);
469
+ await this.senderTaggingStore.storePendingIndexes(preTagsUsedInTheTx, txHash, jobId);
495
470
  this.log.debug(`Stored used pre-tags as sender for the tx`, {
496
471
  preTagsUsedInTheTx
497
472
  });
@@ -514,7 +489,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
514
489
  * @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
515
490
  */ profileTx(txRequest, profileMode, skipProofGeneration = true) {
516
491
  // We disable concurrent profiles for consistency with simulateTx.
517
- return this.#putInJobQueue(async ()=>{
492
+ return this.#putInJobQueue(async (jobId)=>{
518
493
  const totalTimer = new Timer();
519
494
  try {
520
495
  const txInfo = {
@@ -530,7 +505,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
530
505
  await this.blockStateSynchronizer.sync();
531
506
  const syncTime = syncTimer.ms();
532
507
  const contractFunctionSimulator = this.#getSimulatorForTx();
533
- const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest);
508
+ const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, undefined, jobId);
534
509
  const { executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
535
510
  simulate: skipProofGeneration,
536
511
  skipFeeEnforcement: false,
@@ -590,7 +565,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
590
565
  // We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
591
566
  // to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
592
567
  // delete the same read value, or reading values that another simulation is currently modifying).
593
- return this.#putInJobQueue(async ()=>{
568
+ return this.#putInJobQueue(async (jobId)=>{
594
569
  try {
595
570
  const totalTimer = new Timer();
596
571
  const txInfo = {
@@ -611,14 +586,11 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
611
586
  // or not.
612
587
  const skipKernels = overrides?.contracts !== undefined && Object.keys(overrides.contracts ?? {}).length > 0;
613
588
  // Execution of private functions only; no proving, and no kernel logic.
614
- const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes);
589
+ const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes, jobId);
615
590
  let publicInputs;
616
591
  let executionSteps = [];
617
592
  if (skipKernels) {
618
- // According to the protocol rules, the nonce generator for the note hashes
619
- // can either be the first nullifier in the tx or the protocol nullifier if there are none.
620
- const nonceGenerator = privateExecutionResult.firstNullifier.equals(Fr.ZERO) ? await computeProtocolNullifier(await txRequest.toTxRequest().hash()) : privateExecutionResult.firstNullifier;
621
- ({ publicInputs, executionSteps } = await generateSimulatedProvingResult(privateExecutionResult, nonceGenerator, this.contractStore));
593
+ ({ publicInputs, executionSteps } = await generateSimulatedProvingResult(privateExecutionResult, this.contractStore));
622
594
  } else {
623
595
  // Kernel logic, plus proving of all private functions and kernels.
624
596
  ({ publicInputs, executionSteps } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
@@ -694,7 +666,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
694
666
  // We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
695
667
  // to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
696
668
  // delete the same read value, or reading values that another simulation is currently modifying).
697
- return this.#putInJobQueue(async ()=>{
669
+ return this.#putInJobQueue(async (jobId)=>{
698
670
  try {
699
671
  const totalTimer = new Timer();
700
672
  const syncTimer = new Timer();
@@ -702,7 +674,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
702
674
  const syncTime = syncTimer.ms();
703
675
  const functionTimer = new Timer();
704
676
  const contractFunctionSimulator = this.#getSimulatorForTx();
705
- const executionResult = await this.#simulateUtility(contractFunctionSimulator, call, authwits ?? [], scopes);
677
+ await this.contractStore.syncPrivateState(call.to, call.selector, (privateSyncCall)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], undefined, jobId));
678
+ const executionResult = await this.#simulateUtility(contractFunctionSimulator, call, authwits ?? [], scopes, jobId);
706
679
  const functionTime = functionTimer.ms();
707
680
  const totalTime = totalTimer.ms();
708
681
  const perFunction = [
@@ -745,10 +718,15 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
745
718
  * Defaults to the latest known block to PXE + 1.
746
719
  * @returns - The packed events with block and tx metadata.
747
720
  */ async getPrivateEvents(eventSelector, filter) {
748
- // We need to manually trigger private state sync to have a guarantee that all the events are available.
749
- const call = await this.contractStore.getFunctionCall('sync_private_state', [], filter.contractAddress);
750
- await this.simulateUtility(call);
751
- const sanitizedFilter = await new PrivateEventFilterValidator(this.anchorBlockStore).validate(filter);
721
+ let anchorBlockNumber;
722
+ await this.#putInJobQueue(async (jobId)=>{
723
+ await this.blockStateSynchronizer.sync();
724
+ anchorBlockNumber = (await this.anchorBlockStore.getBlockHeader()).getBlockNumber();
725
+ const contractFunctionSimulator = this.#getSimulatorForTx();
726
+ await this.contractStore.syncPrivateState(filter.contractAddress, null, async (privateSyncCall)=>await this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], undefined, jobId));
727
+ });
728
+ // anchorBlockNumber is set during the job and fixed to whatever it is after a block sync
729
+ const sanitizedFilter = new PrivateEventFilterValidator(anchorBlockNumber).validate(filter);
752
730
  this.log.debug(`Getting private events for ${sanitizedFilter.contractAddress.toString()} from ${sanitizedFilter.fromBlock} to ${sanitizedFilter.toBlock}`);
753
731
  return this.privateEventStore.getPrivateEvents(eventSelector, sanitizedFilter);
754
732
  }
@@ -2,34 +2,49 @@ 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
4
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
5
- export declare class CapsuleStore {
5
+ import type { StagedStore } from '../../job_coordinator/job_coordinator.js';
6
+ export declare class CapsuleStore implements StagedStore {
6
7
  #private;
8
+ readonly storeName = "capsule";
7
9
  logger: Logger;
8
10
  constructor(store: AztecAsyncKVStore);
11
+ /**
12
+ * Commits staged data to main storage.
13
+ * Called by JobCoordinator when a job completes successfully.
14
+ * Note: JobCoordinator wraps all commits in a single transaction, so we don't
15
+ * need our own transactionAsync here (and using one would deadlock on IndexedDB).
16
+ * @param jobId - The jobId identifying which staged data to commit
17
+ */
18
+ commit(jobId: string): Promise<void>;
19
+ /**
20
+ * Discards staged data without committing.
21
+ */
22
+ discardStaged(jobId: string): Promise<void>;
9
23
  /**
10
24
  * Stores arbitrary information in a per-contract non-volatile database, which can later be retrieved with `loadCapsule`.
11
25
  * * If data was already stored at this slot, it is overwritten.
12
26
  * @param contractAddress - The contract address to scope the data under.
13
27
  * @param slot - The slot in the database in which to store the value. Slots need not be contiguous.
14
28
  * @param capsule - An array of field elements representing the capsule.
29
+ * @param jobId - The context in which this store will be visible until PXE decides to persist it to underlying KV store
15
30
  * @remarks A capsule is a "blob" of data that is passed to the contract through an oracle. It works similarly
16
31
  * to public contract storage in that it's indexed by the contract address and storage slot but instead of the global
17
32
  * network state it's backed by local PXE db.
18
33
  */
19
- storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void>;
34
+ storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[], jobId: string): void;
20
35
  /**
21
36
  * Returns data previously stored via `storeCapsule` in the per-contract non-volatile database.
22
37
  * @param contractAddress - The contract address under which the data is scoped.
23
38
  * @param slot - The slot in the database to read.
24
39
  * @returns The stored data or `null` if no data is stored under the slot.
25
40
  */
26
- loadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
41
+ loadCapsule(contractAddress: AztecAddress, slot: Fr, jobId: string): Promise<Fr[] | null>;
27
42
  /**
28
43
  * Deletes data in the per-contract non-volatile database. Does nothing if no data was present.
29
44
  * @param contractAddress - The contract address under which the data is scoped.
30
45
  * @param slot - The slot in the database to delete.
31
46
  */
32
- deleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void>;
47
+ deleteCapsule(contractAddress: AztecAddress, slot: Fr, jobId: string): void;
33
48
  /**
34
49
  * Copies a number of contiguous entries in the per-contract non-volatile database. This allows for efficient data
35
50
  * structures by avoiding repeated calls to `loadCapsule` and `storeCapsule`.
@@ -41,7 +56,7 @@ export declare class CapsuleStore {
41
56
  * @param dstSlot - The first slot to copy to.
42
57
  * @param numEntries - The number of entries to copy.
43
58
  */
44
- copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
59
+ copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number, jobId: string): Promise<void>;
45
60
  /**
46
61
  * Appends multiple capsules to a capsule array stored at the base slot.
47
62
  * The array length is stored at the base slot, and elements are stored in consecutive slots after it.
@@ -50,8 +65,8 @@ export declare class CapsuleStore {
50
65
  * @param baseSlot - The slot where the array length is stored
51
66
  * @param content - Array of capsule data to append
52
67
  */
53
- appendToCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][]): Promise<void>;
54
- readCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr): Promise<Fr[][]>;
55
- setCapsuleArray(contractAddress: AztecAddress, baseSlot: Fr, content: Fr[][]): Promise<void>;
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>;
56
71
  }
57
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2Fwc3VsZV9zdG9yZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3N0b3JhZ2UvY2Fwc3VsZV9zdG9yZS9jYXBzdWxlX3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEVBQUUsS0FBSyxNQUFNLEVBQWdCLE1BQU0sd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