@aztec/pxe 4.0.0-nightly.20260108 → 4.0.0-nightly.20260111
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.
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +4 -3
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +7 -6
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +3 -2
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +5 -2
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +2 -2
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +3 -3
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +3 -2
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +4 -2
- package/dest/events/event_service.d.ts +2 -2
- package/dest/events/event_service.d.ts.map +1 -1
- package/dest/events/event_service.js +2 -2
- package/dest/job_coordinator/job_coordinator.d.ts +74 -0
- package/dest/job_coordinator/job_coordinator.d.ts.map +1 -0
- package/dest/job_coordinator/job_coordinator.js +93 -0
- package/dest/pxe.d.ts +2 -1
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +38 -19
- package/dest/storage/private_event_store/private_event_store.d.ts +2 -2
- package/dest/storage/private_event_store/private_event_store.d.ts.map +1 -1
- package/dest/storage/private_event_store/private_event_store.js +2 -1
- package/dest/storage/tagging_store/sender_tagging_store.js +1 -1
- package/dest/tagging/constants.d.ts +2 -0
- package/dest/tagging/constants.d.ts.map +1 -0
- package/dest/tagging/constants.js +10 -0
- package/dest/tagging/index.d.ts +2 -2
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +1 -10
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +1 -1
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +1 -1
- package/package.json +16 -16
- package/src/contract_function_simulator/contract_function_simulator.ts +10 -5
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +4 -0
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +3 -0
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +2 -0
- package/src/events/event_service.ts +2 -0
- package/src/job_coordinator/job_coordinator.ts +149 -0
- package/src/pxe.ts +55 -18
- package/src/storage/private_event_store/private_event_store.ts +3 -0
- package/src/storage/tagging_store/sender_tagging_store.ts +1 -1
- package/src/tagging/constants.ts +10 -0
- package/src/tagging/index.ts +1 -11
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +1 -1
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +1 -1
package/dest/pxe.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare class PXE {
|
|
|
40
40
|
private protocolContractsProvider;
|
|
41
41
|
private log;
|
|
42
42
|
private jobQueue;
|
|
43
|
+
private jobCoordinator;
|
|
43
44
|
debug: PXEDebugUtils;
|
|
44
45
|
private constructor();
|
|
45
46
|
/**
|
|
@@ -229,4 +230,4 @@ export declare class PXE {
|
|
|
229
230
|
*/
|
|
230
231
|
stop(): Promise<void>;
|
|
231
232
|
}
|
|
232
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
233
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHhlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvcHhlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDakUsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO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E,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmC9F;IAED;;;OAGG;IACI,YAAY,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAE7C;IAED;;;;;;;;OAQG;IACI,OAAO,CAAC,SAAS,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC,CAuEtE;IAED;;;;;;;;OAQG;IACI,SAAS,CACd,SAAS,EAAE,kBAAkB,EAC7B,WAAW,EAAE,MAAM,GAAG,iBAAiB,GAAG,OAAO,EACjD,mBAAmB,GAAE,OAAc,GAClC,OAAO,CAAC,eAAe,CAAC,CAuE1B;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACI,UAAU,CACf,SAAS,EAAE,kBAAkB,EAC7B,cAAc,EAAE,OAAO,EACvB,gBAAgB,GAAE,OAAe,EACjC,kBAAkB,GAAE,OAAe,EACnC,SAAS,CAAC,EAAE,mBAAmB,EAC/B,MAAM,CAAC,EAAE,YAAY,EAAE,GACtB,OAAO,CAAC,kBAAkB,CAAC,CA8H7B;IAED;;;;;;;;OAQG;IACI,eAAe,CACpB,IAAI,EAAE,YAAY,EAClB,QAAQ,CAAC,EAAE,WAAW,EAAE,EACxB,MAAM,CAAC,EAAE,YAAY,EAAE,GACtB,OAAO,CAAC,uBAAuB,CAAC,CAiDlC;IAED;;;;;;;;;;;;OAYG;IACI,gBAAgB,CAAC,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAoB/G;IAED;;OAEG;IACI,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3B;CACF"}
|
package/dest/pxe.js
CHANGED
|
@@ -15,9 +15,11 @@ import { BlockSynchronizer } from './block_synchronizer/index.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
|
+
import { ProxiedNodeFactory } from './contract_function_simulator/proxied_node.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';
|
|
22
|
+
import { JobCoordinator } from './job_coordinator/job_coordinator.js';
|
|
21
23
|
import { PrivateKernelExecutionProver } from './private_kernel/private_kernel_execution_prover.js';
|
|
22
24
|
import { PrivateKernelOracleImpl } from './private_kernel/private_kernel_oracle_impl.js';
|
|
23
25
|
import { AddressStore } from './storage/address_store/address_store.js';
|
|
@@ -51,8 +53,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
51
53
|
protocolContractsProvider;
|
|
52
54
|
log;
|
|
53
55
|
jobQueue;
|
|
56
|
+
jobCoordinator;
|
|
54
57
|
debug;
|
|
55
|
-
constructor(node, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, debug){
|
|
58
|
+
constructor(node, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
|
|
56
59
|
this.node = node;
|
|
57
60
|
this.blockStateSynchronizer = blockStateSynchronizer;
|
|
58
61
|
this.keyStore = keyStore;
|
|
@@ -71,6 +74,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
71
74
|
this.protocolContractsProvider = protocolContractsProvider;
|
|
72
75
|
this.log = log;
|
|
73
76
|
this.jobQueue = jobQueue;
|
|
77
|
+
this.jobCoordinator = jobCoordinator;
|
|
74
78
|
this.debug = debug;
|
|
75
79
|
}
|
|
76
80
|
/**
|
|
@@ -94,9 +98,10 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
94
98
|
const keyStore = new KeyStore(store);
|
|
95
99
|
const tipsStore = new L2TipsKVStore(store, 'pxe');
|
|
96
100
|
const synchronizer = new BlockSynchronizer(node, anchorBlockStore, noteStore, privateEventStore, tipsStore, config, loggerOrSuffix);
|
|
101
|
+
const jobCoordinator = new JobCoordinator(store);
|
|
97
102
|
const debugUtils = new PXEDebugUtils(contractStore, noteStore);
|
|
98
103
|
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);
|
|
104
|
+
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
105
|
debugUtils.setPXE(pxe);
|
|
101
106
|
pxe.jobQueue.start();
|
|
102
107
|
await pxe.#registerProtocolContracts();
|
|
@@ -107,7 +112,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
107
112
|
// Internal methods
|
|
108
113
|
#getSimulatorForTx(overrides) {
|
|
109
114
|
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);
|
|
115
|
+
return new ContractFunctionSimulator(proxyContractStore, this.noteStore, this.keyStore, this.addressStore, ProxiedNodeFactory.create(this.node), this.anchorBlockStore, this.senderTaggingStore, this.recipientTaggingStore, this.senderAddressBookStore, this.capsuleStore, this.privateEventStore, this.simulator);
|
|
111
116
|
}
|
|
112
117
|
#contextualizeError(err, ...context) {
|
|
113
118
|
let contextStr = '';
|
|
@@ -132,7 +137,20 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
132
137
|
if (this.jobQueue.length() != 0) {
|
|
133
138
|
this.log.warn(`PXE is already processing ${this.jobQueue.length()} jobs, concurrent execution is not supported. Will run once those are complete.`);
|
|
134
139
|
}
|
|
135
|
-
return this.jobQueue.put(
|
|
140
|
+
return this.jobQueue.put(async ()=>{
|
|
141
|
+
const jobId = this.jobCoordinator.beginJob();
|
|
142
|
+
this.log.verbose(`Beginning job ${jobId}`);
|
|
143
|
+
try {
|
|
144
|
+
const result = await fn(jobId);
|
|
145
|
+
this.log.verbose(`Committing job ${jobId}`);
|
|
146
|
+
await this.jobCoordinator.commitJob(jobId);
|
|
147
|
+
return result;
|
|
148
|
+
} catch (err) {
|
|
149
|
+
this.log.verbose(`Aborting job ${jobId}`);
|
|
150
|
+
await this.jobCoordinator.abortJob(jobId);
|
|
151
|
+
throw err;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
136
154
|
}
|
|
137
155
|
async #registerProtocolContracts() {
|
|
138
156
|
const registered = {};
|
|
@@ -156,13 +174,13 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
156
174
|
}
|
|
157
175
|
// Executes the entrypoint private function, as well as all nested private
|
|
158
176
|
// functions that might arise.
|
|
159
|
-
async #executePrivate(contractFunctionSimulator, txRequest, scopes) {
|
|
177
|
+
async #executePrivate(contractFunctionSimulator, txRequest, scopes, jobId) {
|
|
160
178
|
const { origin: contractAddress, functionSelector } = txRequest;
|
|
161
179
|
try {
|
|
162
180
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
163
181
|
const result = await contractFunctionSimulator.run(txRequest, contractAddress, functionSelector, undefined, anchorBlockHeader, // The sender for tags is set by contracts, typically by an account
|
|
164
182
|
// contract entrypoint
|
|
165
|
-
undefined, scopes);
|
|
183
|
+
undefined, scopes, jobId);
|
|
166
184
|
this.log.debug(`Private simulation completed for ${contractAddress.toString()}:${functionSelector}`);
|
|
167
185
|
return result;
|
|
168
186
|
} catch (err) {
|
|
@@ -179,11 +197,12 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
179
197
|
* @param authWitnesses - Authentication witnesses required for the function call.
|
|
180
198
|
* @param scopes - Optional array of account addresses whose notes can be accessed in this call. Defaults to all
|
|
181
199
|
* accounts if not specified.
|
|
200
|
+
* @param jobId - The job ID for staged writes.
|
|
182
201
|
* @returns The simulation result containing the outputs of the utility function.
|
|
183
|
-
*/ async #simulateUtility(contractFunctionSimulator, call, authWitnesses, scopes) {
|
|
202
|
+
*/ async #simulateUtility(contractFunctionSimulator, call, authWitnesses, scopes, jobId) {
|
|
184
203
|
try {
|
|
185
204
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
186
|
-
return contractFunctionSimulator.runUtility(call, authWitnesses ?? [], anchorBlockHeader, scopes);
|
|
205
|
+
return contractFunctionSimulator.runUtility(call, authWitnesses ?? [], anchorBlockHeader, scopes, jobId);
|
|
187
206
|
} catch (err) {
|
|
188
207
|
if (err instanceof SimulationError) {
|
|
189
208
|
await enrichSimulationError(err, this.contractStore, this.log);
|
|
@@ -449,14 +468,14 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
449
468
|
let privateExecutionResult;
|
|
450
469
|
// We disable proving concurrently mostly out of caution, since it accesses some of our stores. Proving is so
|
|
451
470
|
// computationally demanding that it'd be rare for someone to try to do it concurrently regardless.
|
|
452
|
-
return this.#putInJobQueue(async ()=>{
|
|
471
|
+
return this.#putInJobQueue(async (jobId)=>{
|
|
453
472
|
const totalTimer = new Timer();
|
|
454
473
|
try {
|
|
455
474
|
const syncTimer = new Timer();
|
|
456
475
|
await this.blockStateSynchronizer.sync();
|
|
457
476
|
const syncTime = syncTimer.ms();
|
|
458
477
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
459
|
-
privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest);
|
|
478
|
+
privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, undefined, jobId);
|
|
460
479
|
const { publicInputs, chonkProof, executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
|
|
461
480
|
simulate: false,
|
|
462
481
|
skipFeeEnforcement: false,
|
|
@@ -514,7 +533,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
514
533
|
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
515
534
|
*/ profileTx(txRequest, profileMode, skipProofGeneration = true) {
|
|
516
535
|
// We disable concurrent profiles for consistency with simulateTx.
|
|
517
|
-
return this.#putInJobQueue(async ()=>{
|
|
536
|
+
return this.#putInJobQueue(async (jobId)=>{
|
|
518
537
|
const totalTimer = new Timer();
|
|
519
538
|
try {
|
|
520
539
|
const txInfo = {
|
|
@@ -530,7 +549,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
530
549
|
await this.blockStateSynchronizer.sync();
|
|
531
550
|
const syncTime = syncTimer.ms();
|
|
532
551
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
533
|
-
const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest);
|
|
552
|
+
const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, undefined, jobId);
|
|
534
553
|
const { executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
|
|
535
554
|
simulate: skipProofGeneration,
|
|
536
555
|
skipFeeEnforcement: false,
|
|
@@ -590,7 +609,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
590
609
|
// We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
|
|
591
610
|
// to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
|
|
592
611
|
// delete the same read value, or reading values that another simulation is currently modifying).
|
|
593
|
-
return this.#putInJobQueue(async ()=>{
|
|
612
|
+
return this.#putInJobQueue(async (jobId)=>{
|
|
594
613
|
try {
|
|
595
614
|
const totalTimer = new Timer();
|
|
596
615
|
const txInfo = {
|
|
@@ -611,7 +630,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
611
630
|
// or not.
|
|
612
631
|
const skipKernels = overrides?.contracts !== undefined && Object.keys(overrides.contracts ?? {}).length > 0;
|
|
613
632
|
// Execution of private functions only; no proving, and no kernel logic.
|
|
614
|
-
const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes);
|
|
633
|
+
const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes, jobId);
|
|
615
634
|
let publicInputs;
|
|
616
635
|
let executionSteps = [];
|
|
617
636
|
if (skipKernels) {
|
|
@@ -694,7 +713,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
694
713
|
// We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
|
|
695
714
|
// to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
|
|
696
715
|
// delete the same read value, or reading values that another simulation is currently modifying).
|
|
697
|
-
return this.#putInJobQueue(async ()=>{
|
|
716
|
+
return this.#putInJobQueue(async (jobId)=>{
|
|
698
717
|
try {
|
|
699
718
|
const totalTimer = new Timer();
|
|
700
719
|
const syncTimer = new Timer();
|
|
@@ -702,8 +721,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
702
721
|
const syncTime = syncTimer.ms();
|
|
703
722
|
const functionTimer = new Timer();
|
|
704
723
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
705
|
-
await this.contractStore.syncPrivateState(call.to, call.selector, (privateSyncCall)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall));
|
|
706
|
-
const executionResult = await this.#simulateUtility(contractFunctionSimulator, call, authwits ?? [], scopes);
|
|
724
|
+
await this.contractStore.syncPrivateState(call.to, call.selector, (privateSyncCall)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], undefined, jobId));
|
|
725
|
+
const executionResult = await this.#simulateUtility(contractFunctionSimulator, call, authwits ?? [], scopes, jobId);
|
|
707
726
|
const functionTime = functionTimer.ms();
|
|
708
727
|
const totalTime = totalTimer.ms();
|
|
709
728
|
const perFunction = [
|
|
@@ -746,10 +765,10 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
746
765
|
* Defaults to the latest known block to PXE + 1.
|
|
747
766
|
* @returns - The packed events with block and tx metadata.
|
|
748
767
|
*/ getPrivateEvents(eventSelector, filter) {
|
|
749
|
-
return this.#putInJobQueue(async ()=>{
|
|
768
|
+
return this.#putInJobQueue(async (jobId)=>{
|
|
750
769
|
await this.blockStateSynchronizer.sync();
|
|
751
770
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
752
|
-
await this.contractStore.syncPrivateState(filter.contractAddress, null, async (privateSyncCall)=>await this.#simulateUtility(contractFunctionSimulator, privateSyncCall));
|
|
771
|
+
await this.contractStore.syncPrivateState(filter.contractAddress, null, async (privateSyncCall)=>await this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], undefined, jobId));
|
|
753
772
|
const sanitizedFilter = await new PrivateEventFilterValidator(this.anchorBlockStore).validate(filter);
|
|
754
773
|
this.log.debug(`Getting private events for ${sanitizedFilter.contractAddress.toString()} from ${sanitizedFilter.fromBlock} to ${sanitizedFilter.toBlock}`);
|
|
755
774
|
return this.privateEventStore.getPrivateEvents(eventSelector, sanitizedFilter);
|
|
@@ -33,7 +33,7 @@ export declare class PrivateEventStore {
|
|
|
33
33
|
* txHash - The transaction hash of the event log.
|
|
34
34
|
* blockNumber - The block number in which the event was emitted.
|
|
35
35
|
*/
|
|
36
|
-
storePrivateEventLog(eventSelector: EventSelector, msgContent: Fr[], eventCommitmentIndex: number, metadata: PrivateEventMetadata): Promise<void>;
|
|
36
|
+
storePrivateEventLog(eventSelector: EventSelector, randomness: Fr, msgContent: Fr[], eventCommitmentIndex: number, metadata: PrivateEventMetadata): Promise<void>;
|
|
37
37
|
/**
|
|
38
38
|
* Returns the private events given search parameters.
|
|
39
39
|
* @param eventSelector - The event selector to filter by.
|
|
@@ -53,4 +53,4 @@ export declare class PrivateEventStore {
|
|
|
53
53
|
rollbackEventsAfterBlock(blockNumber: number, synchedBlockNumber: number): Promise<void>;
|
|
54
54
|
}
|
|
55
55
|
export {};
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpdmF0ZV9ldmVudF9zdG9yZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3N0b3JhZ2UvcHJpdmF0ZV9ldmVudF9zdG9yZS9wcml2YXRlX2V2ZW50X3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUdwRCxPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBaUIsTUFBTSxpQkFBaUIsQ0FBQztBQUN4RSxPQUFPLEtBQUssRUFBRSxhQUFhLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUN2RCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUVoRSxPQUFPLEVBQUUsS0FBSyxJQUFJLEVBQUUsTUFBTSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFckQsT0FBTyxLQUFLLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxj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
1
|
-
{"version":3,"file":"private_event_store.d.ts","sourceRoot":"","sources":["../../../src/storage/private_event_store/private_event_store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAGpD,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,MAAM,uBAAuB,GAAG;IACpC,eAAe,EAAE,YAAY,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"private_event_store.d.ts","sourceRoot":"","sources":["../../../src/storage/private_event_store/private_event_store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAGpD,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,MAAM,uBAAuB,GAAG;IACpC,eAAe,EAAE,YAAY,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAaF,KAAK,oBAAoB,GAAG,IAAI,GAAG;IACjC,eAAe,EAAE,YAAY,CAAC;IAC9B,KAAK,EAAE,YAAY,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,qBAAa,iBAAiB;;IAW5B,MAAM,yCAAuC;IAE7C,YAAY,KAAK,EAAE,iBAAiB,EAMnC;IAMD;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,EAAE,EACd,UAAU,EAAE,EAAE,EAAE,EAChB,oBAAoB,EAAE,MAAM,EAC5B,QAAQ,EAAE,oBAAoB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAkCf;IAED;;;;;;;;;;OAUG;IACU,gBAAgB,CAC3B,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAwC/B;IAED;;;OAGG;IACU,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqCpG;CACF"}
|
|
@@ -33,7 +33,7 @@ import { TxHash } from '@aztec/stdlib/tx';
|
|
|
33
33
|
* scope - The address to which the event is scoped.
|
|
34
34
|
* txHash - The transaction hash of the event log.
|
|
35
35
|
* blockNumber - The block number in which the event was emitted.
|
|
36
|
-
*/ storePrivateEventLog(eventSelector, msgContent, eventCommitmentIndex, metadata) {
|
|
36
|
+
*/ storePrivateEventLog(eventSelector, randomness, msgContent, eventCommitmentIndex, metadata) {
|
|
37
37
|
const { contractAddress, scope, txHash, l2BlockNumber, l2BlockHash } = metadata;
|
|
38
38
|
return this.#store.transactionAsync(async ()=>{
|
|
39
39
|
const key = this.#keyFor(contractAddress, scope, eventSelector);
|
|
@@ -53,6 +53,7 @@ import { TxHash } from '@aztec/stdlib/tx';
|
|
|
53
53
|
l2BlockNumber
|
|
54
54
|
});
|
|
55
55
|
await this.#eventLogs.set(eventCommitmentIndex, {
|
|
56
|
+
randomness,
|
|
56
57
|
msgContent: serializeToBuffer(msgContent),
|
|
57
58
|
l2BlockNumber,
|
|
58
59
|
l2BlockHash: l2BlockHash.toBuffer(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toArray } from '@aztec/foundation/iterable';
|
|
2
2
|
import { TxHash } from '@aztec/stdlib/tx';
|
|
3
|
-
import { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from '../../tagging/
|
|
3
|
+
import { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from '../../tagging/constants.js';
|
|
4
4
|
/**
|
|
5
5
|
* Data provider of tagging data used when syncing the sender tagging indexes. The recipient counterpart of this class
|
|
6
6
|
* is called RecipientTaggingStore. We have the providers separate for the sender and recipient because
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN = 20;
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdGFnZ2luZy9jb25zdGFudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBU0EsZUFBTyxNQUFNLHNDQUFzQyxLQUFLLENBQUMifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/tagging/constants.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,sCAAsC,KAAK,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This window has to be as large as the largest expected number of logs emitted in a tx for a given directional app
|
|
2
|
+
// tagging secret. If we get more tag indexes consumed than this window, an error is thrown in `PXE::proveTx` function.
|
|
3
|
+
// This is set to a larger value than MAX_PRIVATE_LOGS_PER_TX (currently 64) because there could be more than
|
|
4
|
+
// MAX_PRIVATE_LOGS_PER_TX indexes consumed in case the logs are squashed. This happens when the log contains a note
|
|
5
|
+
// and the note is nullified in the same tx.
|
|
6
|
+
//
|
|
7
|
+
// Having a large window significantly slowed down `e2e_l1_with_wall_time` test as there we perform sync for more than
|
|
8
|
+
// 1000 secrets. For this reason we set it to a relatively low value of 20. 20 should be sufficient for all the use
|
|
9
|
+
// cases.
|
|
10
|
+
export const UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN = 20;
|
package/dest/tagging/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export { loadPrivateLogsForSenderRecipientPair } from './recipient_sync/load_private_logs_for_sender_recipient_pair.js';
|
|
12
12
|
export { syncSenderTaggingIndexes } from './sender_sync/sync_sender_tagging_indexes.js';
|
|
13
|
-
export
|
|
13
|
+
export { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from './constants.js';
|
|
14
14
|
export { DirectionalAppTaggingSecret, Tag, SiloedTag } from '@aztec/stdlib/logs';
|
|
15
15
|
export { type PreTag } from '@aztec/stdlib/logs';
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90YWdnaW5nL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7R0FTRztBQUVILE9BQU8sRUFBRSxxQ0FBcUMsRUFBRSxNQUFNLGlFQUFpRSxDQUFDO0FBQ3hILE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLDhDQUE4QyxDQUFDO0FBQ3hGLE9BQU8sRUFBRSxzQ0FBc0MsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBR3hFLE9BQU8sRUFBRSwyQkFBMkIsRUFBRSxHQUFHLEVBQUUsU0FBUyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDakYsT0FBTyxFQUFFLEtBQUssTUFBTSxFQUFFLE1BQU0sb0JBQW9CLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tagging/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,qCAAqC,EAAE,MAAM,iEAAiE,CAAC;AACxH,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tagging/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,qCAAqC,EAAE,MAAM,iEAAiE,CAAC;AACxH,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,sCAAsC,EAAE,MAAM,gBAAgB,CAAC;AAGxE,OAAO,EAAE,2BAA2B,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dest/tagging/index.js
CHANGED
|
@@ -9,15 +9,6 @@
|
|
|
9
9
|
* @module tagging
|
|
10
10
|
*/ export { loadPrivateLogsForSenderRecipientPair } from './recipient_sync/load_private_logs_for_sender_recipient_pair.js';
|
|
11
11
|
export { syncSenderTaggingIndexes } from './sender_sync/sync_sender_tagging_indexes.js';
|
|
12
|
-
|
|
13
|
-
// tagging secret. If we get more tag indexes consumed than this window, an error is thrown in `PXE::proveTx` function.
|
|
14
|
-
// This is set to a larger value than MAX_PRIVATE_LOGS_PER_TX (currently 64) because there could be more than
|
|
15
|
-
// MAX_PRIVATE_LOGS_PER_TX indexes consumed in case the logs are squashed. This happens when the log contains a note
|
|
16
|
-
// and the note is nullified in the same tx.
|
|
17
|
-
//
|
|
18
|
-
// Having a large window significantly slowed down `e2e_l1_with_wall_time` test as there we perform sync for more than
|
|
19
|
-
// 1000 secrets. For this reason we set it to a relatively low value of 20. 20 should be sufficient for all the use
|
|
20
|
-
// cases.
|
|
21
|
-
export const UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN = 20;
|
|
12
|
+
export { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from './constants.js';
|
|
22
13
|
// Re-export tagging-related types from stdlib
|
|
23
14
|
export { DirectionalAppTaggingSecret, Tag, SiloedTag } from '@aztec/stdlib/logs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from '../
|
|
1
|
+
import { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from '../constants.js';
|
|
2
2
|
import { findHighestIndexes } from './utils/find_highest_indexes.js';
|
|
3
3
|
import { loadLogsForRange } from './utils/load_logs_for_range.js';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from '../
|
|
1
|
+
import { UNFINALIZED_TAGGING_INDEXES_WINDOW_LEN } from '../constants.js';
|
|
2
2
|
import { getStatusChangeOfPending } from './utils/get_status_change_of_pending.js';
|
|
3
3
|
import { loadAndStoreNewTaggingIndexes } from './utils/load_and_store_new_tagging_indexes.js';
|
|
4
4
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/pxe",
|
|
3
|
-
"version": "4.0.0-nightly.
|
|
3
|
+
"version": "4.0.0-nightly.20260111",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./server": "./dest/entrypoints/server/index.js",
|
|
@@ -61,19 +61,19 @@
|
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@aztec/bb-prover": "4.0.0-nightly.
|
|
65
|
-
"@aztec/bb.js": "4.0.0-nightly.
|
|
66
|
-
"@aztec/builder": "4.0.0-nightly.
|
|
67
|
-
"@aztec/constants": "4.0.0-nightly.
|
|
68
|
-
"@aztec/ethereum": "4.0.0-nightly.
|
|
69
|
-
"@aztec/foundation": "4.0.0-nightly.
|
|
70
|
-
"@aztec/key-store": "4.0.0-nightly.
|
|
71
|
-
"@aztec/kv-store": "4.0.0-nightly.
|
|
72
|
-
"@aztec/noir-protocol-circuits-types": "4.0.0-nightly.
|
|
73
|
-
"@aztec/noir-types": "4.0.0-nightly.
|
|
74
|
-
"@aztec/protocol-contracts": "4.0.0-nightly.
|
|
75
|
-
"@aztec/simulator": "4.0.0-nightly.
|
|
76
|
-
"@aztec/stdlib": "4.0.0-nightly.
|
|
64
|
+
"@aztec/bb-prover": "4.0.0-nightly.20260111",
|
|
65
|
+
"@aztec/bb.js": "4.0.0-nightly.20260111",
|
|
66
|
+
"@aztec/builder": "4.0.0-nightly.20260111",
|
|
67
|
+
"@aztec/constants": "4.0.0-nightly.20260111",
|
|
68
|
+
"@aztec/ethereum": "4.0.0-nightly.20260111",
|
|
69
|
+
"@aztec/foundation": "4.0.0-nightly.20260111",
|
|
70
|
+
"@aztec/key-store": "4.0.0-nightly.20260111",
|
|
71
|
+
"@aztec/kv-store": "4.0.0-nightly.20260111",
|
|
72
|
+
"@aztec/noir-protocol-circuits-types": "4.0.0-nightly.20260111",
|
|
73
|
+
"@aztec/noir-types": "4.0.0-nightly.20260111",
|
|
74
|
+
"@aztec/protocol-contracts": "4.0.0-nightly.20260111",
|
|
75
|
+
"@aztec/simulator": "4.0.0-nightly.20260111",
|
|
76
|
+
"@aztec/stdlib": "4.0.0-nightly.20260111",
|
|
77
77
|
"koa": "^2.16.1",
|
|
78
78
|
"koa-router": "^13.1.1",
|
|
79
79
|
"lodash.omit": "^4.5.0",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"viem": "npm:@aztec/viem@2.38.2"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@aztec/merkle-tree": "4.0.0-nightly.
|
|
86
|
-
"@aztec/noir-test-contracts.js": "4.0.0-nightly.
|
|
85
|
+
"@aztec/merkle-tree": "4.0.0-nightly.20260111",
|
|
86
|
+
"@aztec/noir-test-contracts.js": "4.0.0-nightly.20260111",
|
|
87
87
|
"@jest/globals": "^30.0.0",
|
|
88
88
|
"@types/jest": "^30.0.0",
|
|
89
89
|
"@types/lodash.omit": "^4.5.7",
|
|
@@ -123,6 +123,7 @@ export class ContractFunctionSimulator {
|
|
|
123
123
|
* @param senderForTags - The address that is used as a tagging sender when emitting private logs. Returned from
|
|
124
124
|
* the `privateGetSenderForTags` oracle.
|
|
125
125
|
* @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
126
|
+
* @param jobId - The job ID for staged writes.
|
|
126
127
|
* @returns The result of the execution.
|
|
127
128
|
*/
|
|
128
129
|
public async run(
|
|
@@ -131,13 +132,14 @@ export class ContractFunctionSimulator {
|
|
|
131
132
|
selector: FunctionSelector,
|
|
132
133
|
msgSender = AztecAddress.fromField(Fr.MAX_FIELD_VALUE),
|
|
133
134
|
anchorBlockHeader: BlockHeader,
|
|
134
|
-
senderForTags
|
|
135
|
-
scopes
|
|
135
|
+
senderForTags: AztecAddress | undefined,
|
|
136
|
+
scopes: AztecAddress[] | undefined,
|
|
137
|
+
jobId: string,
|
|
136
138
|
): Promise<PrivateExecutionResult> {
|
|
137
139
|
const simulatorSetupTimer = new Timer();
|
|
138
140
|
|
|
139
141
|
await this.contractStore.syncPrivateState(contractAddress, selector, privateSyncCall =>
|
|
140
|
-
this.runUtility(privateSyncCall, [], anchorBlockHeader, scopes),
|
|
142
|
+
this.runUtility(privateSyncCall, [], anchorBlockHeader, scopes, jobId),
|
|
141
143
|
);
|
|
142
144
|
|
|
143
145
|
await verifyCurrentClassId(contractAddress, this.aztecNode, this.contractStore, anchorBlockHeader);
|
|
@@ -174,7 +176,7 @@ export class ContractFunctionSimulator {
|
|
|
174
176
|
callContext,
|
|
175
177
|
anchorBlockHeader,
|
|
176
178
|
async call => {
|
|
177
|
-
await this.runUtility(call, [], anchorBlockHeader, scopes);
|
|
179
|
+
await this.runUtility(call, [], anchorBlockHeader, scopes, jobId);
|
|
178
180
|
},
|
|
179
181
|
request.authWitnesses,
|
|
180
182
|
request.capsules,
|
|
@@ -192,6 +194,7 @@ export class ContractFunctionSimulator {
|
|
|
192
194
|
this.senderAddressBookStore,
|
|
193
195
|
this.capsuleStore,
|
|
194
196
|
this.privateEventStore,
|
|
197
|
+
jobId,
|
|
195
198
|
0, // totalPublicArgsCount
|
|
196
199
|
startSideEffectCounter,
|
|
197
200
|
undefined, // log
|
|
@@ -261,7 +264,8 @@ export class ContractFunctionSimulator {
|
|
|
261
264
|
call: FunctionCall,
|
|
262
265
|
authwits: AuthWitness[],
|
|
263
266
|
anchorBlockHeader: BlockHeader,
|
|
264
|
-
scopes
|
|
267
|
+
scopes: AztecAddress[] | undefined,
|
|
268
|
+
jobId: string,
|
|
265
269
|
): Promise<Fr[]> {
|
|
266
270
|
await verifyCurrentClassId(call.to, this.aztecNode, this.contractStore, anchorBlockHeader);
|
|
267
271
|
|
|
@@ -286,6 +290,7 @@ export class ContractFunctionSimulator {
|
|
|
286
290
|
this.senderAddressBookStore,
|
|
287
291
|
this.capsuleStore,
|
|
288
292
|
this.privateEventStore,
|
|
293
|
+
jobId,
|
|
289
294
|
undefined,
|
|
290
295
|
scopes,
|
|
291
296
|
);
|
|
@@ -15,6 +15,7 @@ export class EventValidationRequest {
|
|
|
15
15
|
constructor(
|
|
16
16
|
public contractAddress: AztecAddress,
|
|
17
17
|
public eventTypeId: EventSelector,
|
|
18
|
+
public randomness: Fr,
|
|
18
19
|
public serializedEvent: Fr[],
|
|
19
20
|
public eventCommitment: Fr,
|
|
20
21
|
public txHash: TxHash,
|
|
@@ -27,6 +28,8 @@ export class EventValidationRequest {
|
|
|
27
28
|
const contractAddress = AztecAddress.fromField(reader.readField());
|
|
28
29
|
const eventTypeId = EventSelector.fromField(reader.readField());
|
|
29
30
|
|
|
31
|
+
const randomness = reader.readField();
|
|
32
|
+
|
|
30
33
|
const eventStorage = reader.readFieldArray(MAX_EVENT_SERIALIZED_LEN);
|
|
31
34
|
const eventLen = reader.readField().toNumber();
|
|
32
35
|
const serializedEvent = eventStorage.slice(0, eventLen);
|
|
@@ -38,6 +41,7 @@ export class EventValidationRequest {
|
|
|
38
41
|
return new EventValidationRequest(
|
|
39
42
|
contractAddress,
|
|
40
43
|
eventTypeId,
|
|
44
|
+
randomness,
|
|
41
45
|
serializedEvent,
|
|
42
46
|
eventCommitment,
|
|
43
47
|
txHash,
|
|
@@ -104,6 +104,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
|
|
|
104
104
|
senderAddressBookStore: SenderAddressBookStore,
|
|
105
105
|
capsuleStore: CapsuleStore,
|
|
106
106
|
privateEventStore: PrivateEventStore,
|
|
107
|
+
jobId: string,
|
|
107
108
|
private totalPublicCalldataCount: number = 0,
|
|
108
109
|
protected sideEffectCounter: number = 0,
|
|
109
110
|
log = createLogger('simulator:client_execution_context'),
|
|
@@ -126,6 +127,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
|
|
|
126
127
|
senderAddressBookStore,
|
|
127
128
|
capsuleStore,
|
|
128
129
|
privateEventStore,
|
|
130
|
+
jobId,
|
|
129
131
|
log,
|
|
130
132
|
scopes,
|
|
131
133
|
);
|
|
@@ -586,6 +588,7 @@ export class PrivateExecutionOracle extends UtilityExecutionOracle implements IP
|
|
|
586
588
|
this.senderAddressBookStore,
|
|
587
589
|
this.capsuleStore,
|
|
588
590
|
this.privateEventStore,
|
|
591
|
+
this.jobId,
|
|
589
592
|
this.totalPublicCalldataCount,
|
|
590
593
|
sideEffectCounter,
|
|
591
594
|
this.log,
|
|
@@ -64,6 +64,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
|
|
|
64
64
|
protected readonly senderAddressBookStore: SenderAddressBookStore,
|
|
65
65
|
protected readonly capsuleStore: CapsuleStore,
|
|
66
66
|
protected readonly privateEventStore: PrivateEventStore,
|
|
67
|
+
protected readonly jobId: string,
|
|
67
68
|
protected log = createLogger('simulator:client_view_context'),
|
|
68
69
|
protected readonly scopes?: AztecAddress[],
|
|
69
70
|
) {}
|
|
@@ -412,6 +413,7 @@ export class UtilityExecutionOracle implements IMiscOracle, IUtilityExecutionOra
|
|
|
412
413
|
eventService.deliverEvent(
|
|
413
414
|
request.contractAddress,
|
|
414
415
|
request.eventTypeId,
|
|
416
|
+
request.randomness,
|
|
415
417
|
request.serializedEvent,
|
|
416
418
|
request.eventCommitment,
|
|
417
419
|
request.txHash,
|
|
@@ -19,6 +19,7 @@ export class EventService {
|
|
|
19
19
|
public async deliverEvent(
|
|
20
20
|
contractAddress: AztecAddress,
|
|
21
21
|
selector: EventSelector,
|
|
22
|
+
randomness: Fr,
|
|
22
23
|
content: Fr[],
|
|
23
24
|
eventCommitment: Fr,
|
|
24
25
|
txHash: TxHash,
|
|
@@ -63,6 +64,7 @@ export class EventService {
|
|
|
63
64
|
|
|
64
65
|
return this.privateEventStore.storePrivateEventLog(
|
|
65
66
|
selector,
|
|
67
|
+
randomness,
|
|
66
68
|
content,
|
|
67
69
|
Number(nullifierIndex.data), // Index of the event commitment in the nullifier tree
|
|
68
70
|
{
|