@@ -354,6 +354,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
354354 this . recipientTaggingStore ,
355355 this . senderAddressBookStore ,
356356 this . addressStore ,
357+ this . jobId ,
357358 ) ;
358359
359360 await logService . syncTaggedLogs ( this . contractAddress , pendingTaggedLogArrayBaseSlot , this . scopes ) ;
@@ -385,11 +386,11 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
385386 // We read all note and event validation requests and process them all concurrently. This makes the process much
386387 // faster as we don't need to wait for the network round-trip.
387388 const noteValidationRequests = (
388- await this . capsuleStore . readCapsuleArray ( contractAddress , noteValidationRequestsArrayBaseSlot )
389+ await this . capsuleStore . readCapsuleArray ( contractAddress , noteValidationRequestsArrayBaseSlot , this . jobId )
389390 ) . map ( NoteValidationRequest . fromFields ) ;
390391
391392 const eventValidationRequests = (
392- await this . capsuleStore . readCapsuleArray ( contractAddress , eventValidationRequestsArrayBaseSlot )
393+ await this . capsuleStore . readCapsuleArray ( contractAddress , eventValidationRequestsArrayBaseSlot , this . jobId )
393394 ) . map ( EventValidationRequest . fromFields ) ;
394395
395396 const noteService = new NoteService ( this . noteStore , this . aztecNode , this . anchorBlockStore ) ;
@@ -424,8 +425,8 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
424425 await Promise . all ( [ ...noteDeliveries , ...eventDeliveries ] ) ;
425426
426427 // Requests are cleared once we're done.
427- await this . capsuleStore . setCapsuleArray ( contractAddress , noteValidationRequestsArrayBaseSlot , [ ] ) ;
428- await this . capsuleStore . setCapsuleArray ( contractAddress , eventValidationRequestsArrayBaseSlot , [ ] ) ;
428+ await this . capsuleStore . setCapsuleArray ( contractAddress , noteValidationRequestsArrayBaseSlot , [ ] , this . jobId ) ;
429+ await this . capsuleStore . setCapsuleArray ( contractAddress , eventValidationRequestsArrayBaseSlot , [ ] , this . jobId ) ;
429430 }
430431
431432 public async utilityBulkRetrieveLogs (
@@ -441,7 +442,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
441442 // We read all log retrieval requests and process them all concurrently. This makes the process much faster as we
442443 // don't need to wait for the network round-trip.
443444 const logRetrievalRequests = (
444- await this . capsuleStore . readCapsuleArray ( contractAddress , logRetrievalRequestsArrayBaseSlot )
445+ await this . capsuleStore . readCapsuleArray ( contractAddress , logRetrievalRequestsArrayBaseSlot , this . jobId )
445446 ) . map ( LogRetrievalRequest . fromFields ) ;
446447
447448 const logService = new LogService (
@@ -452,18 +453,20 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
452453 this . recipientTaggingStore ,
453454 this . senderAddressBookStore ,
454455 this . addressStore ,
456+ this . jobId ,
455457 ) ;
456458
457459 const maybeLogRetrievalResponses = await logService . bulkRetrieveLogs ( logRetrievalRequests ) ;
458460
459461 // Requests are cleared once we're done.
460- await this . capsuleStore . setCapsuleArray ( contractAddress , logRetrievalRequestsArrayBaseSlot , [ ] ) ;
462+ await this . capsuleStore . setCapsuleArray ( contractAddress , logRetrievalRequestsArrayBaseSlot , [ ] , this . jobId ) ;
461463
462464 // The responses are stored as Option<LogRetrievalResponse> in a second CapsuleArray.
463465 await this . capsuleStore . setCapsuleArray (
464466 contractAddress ,
465467 logRetrievalResponsesArrayBaseSlot ,
466468 maybeLogRetrievalResponses . map ( LogRetrievalResponse . toSerializedOption ) ,
469+ this . jobId ,
467470 ) ;
468471 }
469472
@@ -472,7 +475,8 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
472475 // TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
473476 throw new Error ( `Contract ${ contractAddress } is not allowed to access ${ this . contractAddress } 's PXE DB` ) ;
474477 }
475- return this . capsuleStore . storeCapsule ( this . contractAddress , slot , capsule ) ;
478+ this . capsuleStore . storeCapsule ( this . contractAddress , slot , capsule , this . jobId ) ;
479+ return Promise . resolve ( ) ;
476480 }
477481
478482 public async utilityLoadCapsule ( contractAddress : AztecAddress , slot : Fr ) : Promise < Fr [ ] | null > {
@@ -483,7 +487,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
483487 return (
484488 // TODO(#12425): On the following line, the pertinent capsule gets overshadowed by the transient one. Tackle this.
485489 this . capsules . find ( c => c . contractAddress . equals ( contractAddress ) && c . storageSlot . equals ( slot ) ) ?. data ??
486- ( await this . capsuleStore . loadCapsule ( this . contractAddress , slot ) )
490+ ( await this . capsuleStore . loadCapsule ( this . contractAddress , slot , this . jobId ) )
487491 ) ;
488492 }
489493
@@ -492,7 +496,8 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
492496 // TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
493497 throw new Error ( `Contract ${ contractAddress } is not allowed to access ${ this . contractAddress } 's PXE DB` ) ;
494498 }
495- return this . capsuleStore . deleteCapsule ( this . contractAddress , slot ) ;
499+ this . capsuleStore . deleteCapsule ( this . contractAddress , slot , this . jobId ) ;
500+ return Promise . resolve ( ) ;
496501 }
497502
498503 public utilityCopyCapsule (
@@ -505,7 +510,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
505510 // TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
506511 throw new Error ( `Contract ${ contractAddress } is not allowed to access ${ this . contractAddress } 's PXE DB` ) ;
507512 }
508- return this . capsuleStore . copyCapsule ( this . contractAddress , srcSlot , dstSlot , numEntries ) ;
513+ return this . capsuleStore . copyCapsule ( this . contractAddress , srcSlot , dstSlot , numEntries , this . jobId ) ;
509514 }
510515
511516 // TODO(#11849): consider replacing this oracle with a pure Noir implementation of aes decryption.
0 commit comments