@aztec/pxe 0.82.3 → 0.83.0

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 (37) hide show
  1. package/dest/config/package_info.js +1 -1
  2. package/dest/pxe_oracle_interface/pxe_oracle_interface.d.ts +15 -20
  3. package/dest/pxe_oracle_interface/pxe_oracle_interface.d.ts.map +1 -1
  4. package/dest/pxe_oracle_interface/pxe_oracle_interface.js +56 -103
  5. package/dest/pxe_service/pxe_service.d.ts +3 -2
  6. package/dest/pxe_service/pxe_service.d.ts.map +1 -1
  7. package/dest/pxe_service/pxe_service.js +26 -56
  8. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +9 -0
  9. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +1 -1
  10. package/dest/storage/capsule_data_provider/capsule_data_provider.js +24 -0
  11. package/dest/storage/index.d.ts +1 -0
  12. package/dest/storage/index.d.ts.map +1 -1
  13. package/dest/storage/index.js +1 -0
  14. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts +37 -0
  15. package/dest/storage/private_event_data_provider/private_event_data_provider.d.ts.map +1 -0
  16. package/dest/storage/private_event_data_provider/private_event_data_provider.js +106 -0
  17. package/dest/storage/sync_data_provider/sync_data_provider.d.ts +1 -1
  18. package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +1 -1
  19. package/dest/storage/sync_data_provider/sync_data_provider.js +1 -1
  20. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +4 -4
  21. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +1 -1
  22. package/dest/storage/tagging_data_provider/tagging_data_provider.js +29 -12
  23. package/dest/synchronizer/synchronizer.d.ts +4 -6
  24. package/dest/synchronizer/synchronizer.d.ts.map +1 -1
  25. package/dest/synchronizer/synchronizer.js +11 -15
  26. package/dest/test/pxe_test_suite.js +1 -1
  27. package/package.json +15 -15
  28. package/src/config/package_info.ts +1 -1
  29. package/src/pxe_oracle_interface/pxe_oracle_interface.ts +113 -143
  30. package/src/pxe_service/pxe_service.ts +35 -76
  31. package/src/storage/capsule_data_provider/capsule_data_provider.ts +26 -0
  32. package/src/storage/index.ts +1 -0
  33. package/src/storage/private_event_data_provider/private_event_data_provider.ts +137 -0
  34. package/src/storage/sync_data_provider/sync_data_provider.ts +2 -2
  35. package/src/storage/tagging_data_provider/tagging_data_provider.ts +44 -13
  36. package/src/synchronizer/synchronizer.ts +11 -14
  37. package/src/test/pxe_test_suite.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  export function getPackageInfo() {
2
2
  return {
3
- version: '0.82.2',
3
+ version: '0.83.0',
4
4
  name: '@aztec/pxe'
5
5
  };
6
6
  }
@@ -1,14 +1,14 @@
1
- import { type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
1
+ import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
2
2
  import { Fr, Point } from '@aztec/foundation/fields';
3
3
  import type { KeyStore } from '@aztec/key-store';
4
- import { AcirSimulator, type ExecutionDataProvider, MessageLoadOracleInputs, type SimulationProvider } from '@aztec/simulator/client';
5
- import { type FunctionArtifactWithContractName, FunctionSelector } from '@aztec/stdlib/abi';
4
+ import { type ExecutionDataProvider, MessageLoadOracleInputs } from '@aztec/simulator/client';
5
+ import { EventSelector, type FunctionArtifactWithContractName, FunctionSelector } from '@aztec/stdlib/abi';
6
6
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
7
7
  import type { L2Block } from '@aztec/stdlib/block';
8
8
  import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
9
9
  import type { AztecNode } from '@aztec/stdlib/interfaces/client';
10
10
  import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
11
- import { IndexedTaggingSecret, LogWithTxData, TxScopedL2Log } from '@aztec/stdlib/logs';
11
+ import { IndexedTaggingSecret, LogWithTxData } from '@aztec/stdlib/logs';
12
12
  import { Note, type NoteStatus } from '@aztec/stdlib/note';
13
13
  import { MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
14
14
  import type { BlockHeader } from '@aztec/stdlib/tx';
@@ -17,6 +17,7 @@ import type { AddressDataProvider } from '../storage/address_data_provider/addre
17
17
  import type { CapsuleDataProvider } from '../storage/capsule_data_provider/capsule_data_provider.js';
18
18
  import type { ContractDataProvider } from '../storage/contract_data_provider/contract_data_provider.js';
19
19
  import type { NoteDataProvider } from '../storage/note_data_provider/note_data_provider.js';
20
+ import type { PrivateEventDataProvider } from '../storage/private_event_data_provider/private_event_data_provider.js';
20
21
  import type { SyncDataProvider } from '../storage/sync_data_provider/sync_data_provider.js';
21
22
  import type { TaggingDataProvider } from '../storage/tagging_data_provider/tagging_data_provider.js';
22
23
  /**
@@ -26,15 +27,15 @@ export declare class PXEOracleInterface implements ExecutionDataProvider {
26
27
  #private;
27
28
  private aztecNode;
28
29
  private keyStore;
29
- private simulationProvider;
30
30
  private contractDataProvider;
31
31
  private noteDataProvider;
32
32
  private capsuleDataProvider;
33
33
  private syncDataProvider;
34
34
  private taggingDataProvider;
35
35
  private addressDataProvider;
36
+ private privateEventDataProvider;
36
37
  private log;
37
- constructor(aztecNode: AztecNode, keyStore: KeyStore, simulationProvider: SimulationProvider, contractDataProvider: ContractDataProvider, noteDataProvider: NoteDataProvider, capsuleDataProvider: CapsuleDataProvider, syncDataProvider: SyncDataProvider, taggingDataProvider: TaggingDataProvider, addressDataProvider: AddressDataProvider, log?: import("@aztec/foundation/log").Logger);
38
+ constructor(aztecNode: AztecNode, keyStore: KeyStore, contractDataProvider: ContractDataProvider, noteDataProvider: NoteDataProvider, capsuleDataProvider: CapsuleDataProvider, syncDataProvider: SyncDataProvider, taggingDataProvider: TaggingDataProvider, addressDataProvider: AddressDataProvider, privateEventDataProvider: PrivateEventDataProvider, log?: import("@aztec/foundation/log").Logger);
38
39
  getKeyValidationRequest(pkMHash: Fr, contractAddress: AztecAddress): Promise<KeyValidationRequest>;
39
40
  getCompleteAddress(account: AztecAddress): Promise<CompleteAddress>;
40
41
  getContractInstance(address: AztecAddress): Promise<ContractInstance>;
@@ -123,29 +124,23 @@ export declare class PXEOracleInterface implements ExecutionDataProvider {
123
124
  */
124
125
  syncTaggedLogsAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<void>;
125
126
  /**
126
- * Synchronizes the logs tagged with scoped addresses and all the senders in the address book.
127
- * Returns the unsynched logs and updates the indexes of the secrets used to tag them until there are no more logs
128
- * to sync.
129
- * @param contractAddress - The address of the contract that the logs are tagged for
130
- * @param recipient - The address of the recipient
131
- * @returns A list of encrypted logs tagged with the recipient's address
132
- */
133
- syncTaggedLogs(contractAddress: AztecAddress, maxBlockNumber: number, scopes?: AztecAddress[]): Promise<Map<string, TxScopedL2Log[]>>;
134
- /**
135
- * Processes the tagged logs returned by syncTaggedLogs by decrypting them and storing them in the database.
127
+ * Synchronizes the logs tagged with scoped addresses and all the senders in the address book. Stores the found logs
128
+ * in CapsuleArray ready for a later retrieval in Aztec.nr.
136
129
  * @param contractAddress - The address of the contract that the logs are tagged for.
137
- * @param logs - The logs to process.
138
- * @param recipient - The recipient of the logs.
130
+ * @param pendingTaggedLogArrayBaseSlot - The base slot of the pending tagged logs capsule array in which
131
+ * found logs will be stored.
132
+ * @param scopes - The scoped addresses to sync logs for. If not provided, all accounts in the address book will be
133
+ * synced.
139
134
  */
140
- processTaggedLogs(contractAddress: AztecAddress, logs: TxScopedL2Log[], recipient: AztecAddress, simulator?: AcirSimulator): Promise<void>;
135
+ syncTaggedLogs(contractAddress: AztecAddress, pendingTaggedLogArrayBaseSlot: Fr, scopes?: AztecAddress[]): Promise<void>;
141
136
  deliverNote(contractAddress: AztecAddress, storageSlot: Fr, nonce: Fr, content: Fr[], noteHash: Fr, nullifier: Fr, txHash: Fr, recipient: AztecAddress): Promise<void>;
142
137
  getLogByTag(tag: Fr): Promise<LogWithTxData | null>;
143
138
  removeNullifiedNotes(contractAddress: AztecAddress): Promise<void>;
144
- callProcessLog(contractAddress: AztecAddress, logCiphertext: Fr[], txHash: TxHash, noteHashes: Fr[], firstNullifier: Fr, recipient: AztecAddress, simulator?: AcirSimulator): Promise<void>;
145
139
  storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void>;
146
140
  loadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
147
141
  deleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void>;
148
142
  copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
149
143
  getSharedSecret(address: AztecAddress, ephPk: Point): Promise<Point>;
144
+ storePrivateEventLog(contractAddress: AztecAddress, recipient: AztecAddress, eventSelector: EventSelector, logContent: Fr[], txHash: TxHash, logIndexInTx: number): Promise<void>;
150
145
  }
151
146
  //# sourceMappingURL=pxe_oracle_interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pxe_oracle_interface.d.ts","sourceRoot":"","sources":["../../src/pxe_oracle_interface/pxe_oracle_interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAsD,MAAM,kBAAkB,CAAC;AAGrH,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,aAAa,EACb,KAAK,qBAAqB,EAC1B,uBAAuB,EACvB,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,gCAAgC,EAErC,gBAAgB,EAIjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAW,OAAO,EAAiB,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEhF,OAAO,KAAK,EAAE,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ASHES_PER_TX, PRIVATE_LOG_SIZE_IN_FIELDS } from '@aztec/constants';
2
1
  import { timesParallel } from '@aztec/foundation/collection';
3
- import { poseidon2Hash } from '@aztec/foundation/crypto';
4
2
  import { Fr } from '@aztec/foundation/fields';
5
3
  import { createLogger } from '@aztec/foundation/log';
6
- import { AcirSimulator, MessageLoadOracleInputs } from '@aztec/simulator/client';
7
- import { FunctionSelector, FunctionType, encodeArguments, getFunctionArtifact } from '@aztec/stdlib/abi';
4
+ import { MessageLoadOracleInputs } from '@aztec/simulator/client';
5
+ import { getFunctionArtifact } from '@aztec/stdlib/abi';
8
6
  import { computeUniqueNoteHash, siloNoteHash, siloNullifier } from '@aztec/stdlib/hash';
9
- import { computeAddressSecret, computeTaggingSecretPoint } from '@aztec/stdlib/keys';
10
- import { IndexedTaggingSecret, LogWithTxData, deriveEcdhSharedSecret } from '@aztec/stdlib/logs';
7
+ import { computeAddressSecret, computeAppTaggingSecret } from '@aztec/stdlib/keys';
8
+ import { IndexedTaggingSecret, LogWithTxData, PendingTaggedLog, deriveEcdhSharedSecret } from '@aztec/stdlib/logs';
11
9
  import { getNonNullifiedL1ToL2MessageWitness } from '@aztec/stdlib/messaging';
12
10
  import { Note } from '@aztec/stdlib/note';
13
11
  import { MerkleTreeId } from '@aztec/stdlib/trees';
@@ -19,24 +17,24 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
19
17
  */ export class PXEOracleInterface {
20
18
  aztecNode;
21
19
  keyStore;
22
- simulationProvider;
23
20
  contractDataProvider;
24
21
  noteDataProvider;
25
22
  capsuleDataProvider;
26
23
  syncDataProvider;
27
24
  taggingDataProvider;
28
25
  addressDataProvider;
26
+ privateEventDataProvider;
29
27
  log;
30
- constructor(aztecNode, keyStore, simulationProvider, contractDataProvider, noteDataProvider, capsuleDataProvider, syncDataProvider, taggingDataProvider, addressDataProvider, log = createLogger('pxe:pxe_oracle_interface')){
28
+ constructor(aztecNode, keyStore, contractDataProvider, noteDataProvider, capsuleDataProvider, syncDataProvider, taggingDataProvider, addressDataProvider, privateEventDataProvider, log = createLogger('pxe:pxe_oracle_interface')){
31
29
  this.aztecNode = aztecNode;
32
30
  this.keyStore = keyStore;
33
- this.simulationProvider = simulationProvider;
34
31
  this.contractDataProvider = contractDataProvider;
35
32
  this.noteDataProvider = noteDataProvider;
36
33
  this.capsuleDataProvider = capsuleDataProvider;
37
34
  this.syncDataProvider = syncDataProvider;
38
35
  this.taggingDataProvider = taggingDataProvider;
39
36
  this.addressDataProvider = addressDataProvider;
37
+ this.privateEventDataProvider = privateEventDataProvider;
40
38
  this.log = log;
41
39
  }
42
40
  getKeyValidationRequest(pkMHash, contractAddress) {
@@ -215,7 +213,7 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
215
213
  const appTaggingSecret = await this.#calculateAppTaggingSecret(contractAddress, sender, recipient);
216
214
  const [index] = await this.taggingDataProvider.getTaggingSecretsIndexesAsSender([
217
215
  appTaggingSecret
218
- ]);
216
+ ], sender);
219
217
  return new IndexedTaggingSecret(appTaggingSecret, index);
220
218
  }
221
219
  /**
@@ -235,22 +233,15 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
235
233
  });
236
234
  const [index] = await this.taggingDataProvider.getTaggingSecretsIndexesAsSender([
237
235
  secret
238
- ]);
236
+ ], sender);
239
237
  await this.taggingDataProvider.setTaggingSecretsIndexesAsSender([
240
238
  new IndexedTaggingSecret(secret, index + 1)
241
- ]);
239
+ ], sender);
242
240
  }
243
241
  async #calculateAppTaggingSecret(contractAddress, sender, recipient) {
244
242
  const senderCompleteAddress = await this.getCompleteAddress(sender);
245
243
  const senderIvsk = await this.keyStore.getMasterIncomingViewingSecretKey(sender);
246
- const secretPoint = await computeTaggingSecretPoint(senderCompleteAddress, senderIvsk, recipient);
247
- // Silo the secret so it can't be used to track other app's notes
248
- const appSecret = poseidon2Hash([
249
- secretPoint.x,
250
- secretPoint.y,
251
- contractAddress
252
- ]);
253
- return appSecret;
244
+ return computeAppTaggingSecret(senderCompleteAddress, senderIvsk, recipient, contractAddress);
254
245
  }
255
246
  /**
256
247
  * Returns the indexed tagging secrets for a given recipient and all the senders in the address book
@@ -269,15 +260,8 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
269
260
  ...await this.taggingDataProvider.getSenderAddresses(),
270
261
  ...await this.keyStore.getAccounts()
271
262
  ].filter((address, index, self)=>index === self.findIndex((otherAddress)=>otherAddress.equals(address)));
272
- const appTaggingSecrets = await Promise.all(senders.map(async (contact)=>{
273
- const sharedSecret = await computeTaggingSecretPoint(recipientCompleteAddress, recipientIvsk, contact);
274
- return poseidon2Hash([
275
- sharedSecret.x,
276
- sharedSecret.y,
277
- contractAddress
278
- ]);
279
- }));
280
- const indexes = await this.taggingDataProvider.getTaggingSecretsIndexesAsRecipient(appTaggingSecrets);
263
+ const appTaggingSecrets = await Promise.all(senders.map((contact)=>computeAppTaggingSecret(recipientCompleteAddress, recipientIvsk, contact, contractAddress)));
264
+ const indexes = await this.taggingDataProvider.getTaggingSecretsIndexesAsRecipient(appTaggingSecrets, recipient);
281
265
  return appTaggingSecrets.map((secret, i)=>new IndexedTaggingSecret(secret, indexes[i]));
282
266
  }
283
267
  /**
@@ -290,7 +274,7 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
290
274
  const appTaggingSecret = await this.#calculateAppTaggingSecret(contractAddress, sender, recipient);
291
275
  const [oldIndex] = await this.taggingDataProvider.getTaggingSecretsIndexesAsSender([
292
276
  appTaggingSecret
293
- ]);
277
+ ], sender);
294
278
  // This algorithm works such that:
295
279
  // 1. If we find minimum consecutive empty logs in a window of logs we set the index to the index of the last log
296
280
  // we found and quit.
@@ -324,7 +308,7 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
324
308
  if (currentIndex !== oldIndex) {
325
309
  await this.taggingDataProvider.setTaggingSecretsIndexesAsSender([
326
310
  new IndexedTaggingSecret(appTaggingSecret, currentIndex)
327
- ]);
311
+ ], sender);
328
312
  this.log.debug(`Syncing logs for sender ${sender} at contract ${contractName}(${contractAddress})`, {
329
313
  sender,
330
314
  secret: appTaggingSecret,
@@ -337,29 +321,26 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
337
321
  }
338
322
  }
339
323
  /**
340
- * Synchronizes the logs tagged with scoped addresses and all the senders in the address book.
341
- * Returns the unsynched logs and updates the indexes of the secrets used to tag them until there are no more logs
342
- * to sync.
343
- * @param contractAddress - The address of the contract that the logs are tagged for
344
- * @param recipient - The address of the recipient
345
- * @returns A list of encrypted logs tagged with the recipient's address
346
- */ async syncTaggedLogs(contractAddress, maxBlockNumber, scopes) {
324
+ * Synchronizes the logs tagged with scoped addresses and all the senders in the address book. Stores the found logs
325
+ * in CapsuleArray ready for a later retrieval in Aztec.nr.
326
+ * @param contractAddress - The address of the contract that the logs are tagged for.
327
+ * @param pendingTaggedLogArrayBaseSlot - The base slot of the pending tagged logs capsule array in which
328
+ * found logs will be stored.
329
+ * @param scopes - The scoped addresses to sync logs for. If not provided, all accounts in the address book will be
330
+ * synced.
331
+ */ async syncTaggedLogs(contractAddress, pendingTaggedLogArrayBaseSlot, scopes) {
347
332
  this.log.verbose('Searching for tagged logs', {
348
333
  contract: contractAddress
349
334
  });
335
+ const maxBlockNumber = await this.syncDataProvider.getBlockNumber();
350
336
  // Ideally this algorithm would be implemented in noir, exposing its building blocks as oracles.
351
337
  // However it is impossible at the moment due to the language not supporting nested slices.
352
338
  // This nesting is necessary because for a given set of tags we don't
353
339
  // know how many logs we will get back. Furthermore, these logs are of undetermined
354
340
  // length, since we don't really know the note they correspond to until we decrypt them.
355
341
  const recipients = scopes ? scopes : await this.keyStore.getAccounts();
356
- // A map of logs going from recipient address to logs. Note that the logs might have been processed before
357
- // due to us having a sliding window that "looks back" for logs as well. (We look back as there is no guarantee
358
- // that a logs will be received ordered by a given tag index and that the tags won't be reused).
359
- const logsMap = new Map();
360
342
  const contractName = await this.contractDataProvider.getDebugContractName(contractAddress);
361
343
  for (const recipient of recipients){
362
- const logsForRecipient = [];
363
344
  // Get all the secrets for the recipient and sender pairs (#9365)
364
345
  const secrets = await this.#getIndexedTaggingSecretsForSenders(contractAddress, recipient);
365
346
  // We fetch logs for a window of indexes in a range:
@@ -389,15 +370,18 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
389
370
  const newLargestIndexMapForIteration = {};
390
371
  // Fetch the logs for the tags and iterate over them
391
372
  const logsByTags = await this.aztecNode.getLogsByTags(tagsForTheWholeWindow);
392
- logsByTags.forEach((logsByTag, logIndex)=>{
373
+ for(let logIndex = 0; logIndex < logsByTags.length; logIndex++){
374
+ const logsByTag = logsByTags[logIndex];
393
375
  if (logsByTag.length > 0) {
394
376
  // Discard public logs
395
377
  const filteredLogsByTag = logsByTag.filter((l)=>!l.isFromPublic);
396
378
  if (filteredLogsByTag.length < logsByTag.length) {
397
379
  this.log.warn(`Discarded ${logsByTag.filter((l)=>l.isFromPublic).length} public logs with matching tags`);
398
380
  }
399
- // The logs for the given tag exist so we store them for later processing
400
- logsForRecipient.push(...filteredLogsByTag);
381
+ // We filter out the logs that are newer than the historical block number of the tx currently being constructed
382
+ const filteredLogsByBlockNumber = filteredLogsByTag.filter((l)=>l.blockNumber <= maxBlockNumber);
383
+ // We store the logs in capsules (to later be obtained in Noir)
384
+ await this.#storePendingTaggedLogs(contractAddress, pendingTaggedLogArrayBaseSlot, recipient, filteredLogsByBlockNumber);
401
385
  // We retrieve the indexed tagging secret corresponding to the log as I need that to evaluate whether
402
386
  // a new largest index have been found.
403
387
  const secretCorrespondingToLog = secretsForTheWholeWindow[logIndex];
@@ -415,7 +399,7 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
415
399
  this.log.debug(`Incrementing index to ${secretCorrespondingToLog.index + 1} at contract ${contractName}(${contractAddress})`);
416
400
  }
417
401
  }
418
- });
402
+ }
419
403
  // Now based on the new largest indexes we found, we will construct a new secrets and windows set to fetch logs
420
404
  // for. Note that it's very unlikely that a new log from the current window would appear between the iterations
421
405
  // so we fetch the logs only for the difference of the window sets.
@@ -438,34 +422,22 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
438
422
  // Now we set the new secrets and windows and proceed to the next iteration.
439
423
  secretsAndWindows = newSecretsAndWindows;
440
424
  }
441
- // We filter the logs by block number and store them in the map.
442
- logsMap.set(recipient.toString(), logsForRecipient.filter((log)=>log.blockNumber <= maxBlockNumber));
443
425
  // At this point we have processed all the logs for the recipient so we store the new largest indexes in the db.
444
- await this.taggingDataProvider.setTaggingSecretsIndexesAsRecipient(Object.entries(newLargestIndexMapToStore).map(([appTaggingSecret, index])=>new IndexedTaggingSecret(Fr.fromHexString(appTaggingSecret), index)));
426
+ await this.taggingDataProvider.setTaggingSecretsIndexesAsRecipient(Object.entries(newLargestIndexMapToStore).map(([appTaggingSecret, index])=>new IndexedTaggingSecret(Fr.fromHexString(appTaggingSecret), index)), recipient);
445
427
  }
446
- return logsMap;
447
428
  }
448
- /**
449
- * Processes the tagged logs returned by syncTaggedLogs by decrypting them and storing them in the database.
450
- * @param contractAddress - The address of the contract that the logs are tagged for.
451
- * @param logs - The logs to process.
452
- * @param recipient - The recipient of the logs.
453
- */ async processTaggedLogs(contractAddress, logs, recipient, simulator) {
454
- for (const scopedLog of logs){
455
- if (scopedLog.isFromPublic) {
456
- throw new Error('Attempted to decrypt public log');
457
- }
458
- // Log processing requires the note hashes in the tx in which the note was created. We are now assuming that the
459
- // note was included in the same block in which the log was delivered - note that partial notes will not work this
460
- // way.
429
+ async #storePendingTaggedLogs(contractAddress, capsuleArrayBaseSlot, recipient, logs) {
430
+ // Build all pending tagged logs upfront with their tx effects
431
+ const pendingTaggedLogs = await Promise.all(logs.map(async (scopedLog)=>{
432
+ // TODO(#9789): get these effects along with the log
461
433
  const txEffect = await this.aztecNode.getTxEffect(scopedLog.txHash);
462
434
  if (!txEffect) {
463
435
  throw new Error(`Could not find tx effect for tx hash ${scopedLog.txHash}`);
464
436
  }
465
- // This will trigger calls to the deliverNote oracle
466
- await this.callProcessLog(contractAddress, scopedLog.log.toFields(), scopedLog.txHash, txEffect.data.noteHashes, txEffect.data.nullifiers[0], recipient, simulator);
467
- }
468
- return;
437
+ const pendingTaggedLog = new PendingTaggedLog(scopedLog.log.toFields(), scopedLog.txHash.hash, txEffect.data.noteHashes, txEffect.data.nullifiers[0], recipient, scopedLog.logIndexInTx);
438
+ return pendingTaggedLog.toFields();
439
+ }));
440
+ return this.capsuleDataProvider.appendToCapsuleArray(contractAddress, capsuleArrayBaseSlot, pendingTaggedLogs);
469
441
  }
470
442
  async deliverNote(contractAddress, storageSlot, nonce, content, noteHash, nullifier, txHash, recipient) {
471
443
  // We are going to store the new note in the NoteDataProvider, which will let us later return it via `getNotes`.
@@ -485,9 +457,6 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
485
457
  // Note that while this technically results in historical queries, we perform it at the latest locally synced block
486
458
  // number which *should* be recent enough to be available, even for non-archive nodes.
487
459
  const syncedBlockNumber = await this.syncDataProvider.getBlockNumber();
488
- if (syncedBlockNumber === undefined) {
489
- throw new Error(`Attempted to deliver a note with an unsynchronized PXE - this should never happen`);
490
- }
491
460
  // By computing siloed and unique note hashes ourselves we prevent contracts from interfering with the note storage
492
461
  // of other contracts, which would constitute a security breach.
493
462
  const uniqueNoteHash = await computeUniqueNoteHash(nonce, await siloNoteHash(contractAddress, noteHash));
@@ -505,9 +474,10 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
505
474
  noteDao
506
475
  ], recipient);
507
476
  this.log.verbose('Added note', {
508
- contract: noteDao.contractAddress,
509
- slot: noteDao.storageSlot,
510
- noteHash: noteDao.noteHash,
477
+ index: noteDao.index,
478
+ contract: noteDao.contractAddress.toString(),
479
+ slot: noteDao.storageSlot.toString(),
480
+ noteHash: noteDao.noteHash.toString(),
511
481
  nullifier: noteDao.siloedNullifier.toString()
512
482
  });
513
483
  const [nullifierIndex] = await this.aztecNode.findLeavesIndexes(syncedBlockNumber, MerkleTreeId.NULLIFIER_TREE, [
@@ -590,29 +560,6 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
590
560
  });
591
561
  }
592
562
  }
593
- async callProcessLog(contractAddress, logCiphertext, txHash, noteHashes, firstNullifier, recipient, simulator) {
594
- const artifact = await this.contractDataProvider.getFunctionArtifactByName(contractAddress, 'process_log');
595
- if (!artifact) {
596
- throw new Error(`Mandatory implementation of "process_log" missing in noir contract ${contractAddress.toString()}.`);
597
- }
598
- const selector = await FunctionSelector.fromNameAndParameters(artifact);
599
- const execRequest = {
600
- name: artifact.name,
601
- to: contractAddress,
602
- selector,
603
- type: FunctionType.UNCONSTRAINED,
604
- isStatic: artifact.isStatic,
605
- args: encodeArguments(artifact, [
606
- toBoundedVec(logCiphertext, PRIVATE_LOG_SIZE_IN_FIELDS),
607
- txHash.toString(),
608
- toBoundedVec(noteHashes, MAX_NOTE_HASHES_PER_TX),
609
- firstNullifier,
610
- recipient
611
- ]),
612
- returnTypes: artifact.returnTypes
613
- };
614
- await (simulator ?? new AcirSimulator(this, this.simulationProvider)).runUnconstrained(execRequest, contractAddress, selector, []);
615
- }
616
563
  storeCapsule(contractAddress, slot, capsule) {
617
564
  return this.capsuleDataProvider.storeCapsule(contractAddress, slot, capsule);
618
565
  }
@@ -632,10 +579,16 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
632
579
  const addressSecret = await computeAddressSecret(await recipientCompleteAddress.getPreaddress(), ivskM);
633
580
  return deriveEcdhSharedSecret(addressSecret, ephPk);
634
581
  }
635
- }
636
- function toBoundedVec(array, maxLength) {
637
- return {
638
- storage: array.concat(Array(maxLength - array.length).fill(new Fr(0))),
639
- len: array.length
640
- };
582
+ async storePrivateEventLog(contractAddress, recipient, eventSelector, logContent, txHash, logIndexInTx) {
583
+ const txReceipt = await this.aztecNode.getTxReceipt(txHash);
584
+ const blockNumber = txReceipt.blockNumber;
585
+ if (blockNumber === undefined) {
586
+ throw new Error(`Block number is undefined for tx ${txHash} in storePrivateEventLog`);
587
+ }
588
+ const historicalBlockNumber = await this.syncDataProvider.getBlockNumber();
589
+ if (blockNumber > historicalBlockNumber) {
590
+ throw new Error(`Attempting to store private event log from a block newer than the historical block of the simulation. Log block number: ${blockNumber}, historical block number: ${historicalBlockNumber}`);
591
+ }
592
+ return this.privateEventDataProvider.storePrivateEventLog(contractAddress, recipient, eventSelector, logContent, txHash, logIndexInTx, blockNumber);
593
+ }
641
594
  }
@@ -1,5 +1,5 @@
1
1
  import { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
2
- import { Fr, type Point } from '@aztec/foundation/fields';
2
+ import { Fr } from '@aztec/foundation/fields';
3
3
  import { type Logger } from '@aztec/foundation/log';
4
4
  import type { SiblingPath } from '@aztec/foundation/trees';
5
5
  import type { AztecAsyncKVStore } from '@aztec/kv-store';
@@ -30,6 +30,7 @@ export declare class PXEService implements PXE {
30
30
  private syncDataProvider;
31
31
  private taggingDataProvider;
32
32
  private addressDataProvider;
33
+ private privateEventDataProvider;
33
34
  private simulator;
34
35
  private packageVersion;
35
36
  private proverEnabled;
@@ -91,7 +92,7 @@ export declare class PXEService implements PXE {
91
92
  simulateUnconstrained(functionName: string, args: any[], to: AztecAddress, authwits?: AuthWitness[], _from?: AztecAddress, scopes?: AztecAddress[]): Promise<AbiDecoded>;
92
93
  getNodeInfo(): Promise<NodeInfo>;
93
94
  getPXEInfo(): Promise<PXEInfo>;
94
- getPrivateEvents<T>(eventMetadataDef: EventMetadataDefinition, from: number, limit: number, vpks: Point[]): Promise<T[]>;
95
+ getPrivateEvents<T>(contractAddress: AztecAddress, eventMetadataDef: EventMetadataDefinition, from: number, numBlocks: number, recipients: AztecAddress[]): Promise<T[]>;
95
96
  getPublicEvents<T>(eventMetadataDef: EventMetadataDefinition, from: number, limit: number): Promise<T[]>;
96
97
  resetNoteSyncData(): Promise<void>;
97
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pxe_service.d.ts","sourceRoot":"","sources":["../../src/pxe_service/pxe_service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,KAAK,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAEL,KAAK,yBAAyB,EAE/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAiB,KAAK,kBAAkB,EAAsB,MAAM,yBAAyB,CAAC;AACrG,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EAOtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,QAAQ,EACb,KAAK,cAAc,EAGpB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,4BAA4B,EAC5B,qBAAqB,EACrB,GAAG,EACH,OAAO,EACP,mBAAm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