@aztec/pxe 1.2.1 → 2.0.0-nightly.20250813
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/config/package_info.js +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +5 -2
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +48 -29
- package/dest/contract_function_simulator/index.d.ts +1 -0
- package/dest/contract_function_simulator/index.d.ts.map +1 -1
- package/dest/contract_function_simulator/index.js +1 -0
- package/dest/contract_function_simulator/noir-structs/event_validation_request.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_request.js +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/log_retrieval_response.js +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +1 -1
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts +22 -0
- package/dest/contract_function_simulator/oracle/note_packing_utils.d.ts.map +1 -0
- package/dest/contract_function_simulator/oracle/note_packing_utils.js +49 -0
- package/dest/contract_function_simulator/oracle/oracle.d.ts +44 -43
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +127 -106
- package/dest/contract_function_simulator/oracle/private_execution.d.ts +7 -2
- package/dest/contract_function_simulator/oracle/private_execution.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution.js +16 -11
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +41 -17
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +51 -23
- package/dest/contract_function_simulator/oracle/typed_oracle.d.ts +48 -47
- package/dest/contract_function_simulator/oracle/typed_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/typed_oracle.js +89 -87
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +31 -30
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +33 -30
- package/dest/contract_function_simulator/pxe_oracle_interface.d.ts.map +1 -1
- package/dest/contract_function_simulator/pxe_oracle_interface.js +6 -7
- package/dest/entrypoints/server/utils.d.ts +4 -2
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +4 -2
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts +4 -4
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.d.ts.map +1 -1
- package/dest/private_kernel/hints/build_private_kernel_reset_private_inputs.js +58 -59
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +4 -0
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +1 -0
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.js +41 -0
- package/dest/private_kernel/hints/index.d.ts +1 -0
- package/dest/private_kernel/hints/index.d.ts.map +1 -1
- package/dest/private_kernel/hints/index.js +1 -0
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +13 -4
- package/dest/private_kernel/private_kernel_oracle.d.ts +1 -1
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle_impl.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle_impl.js +6 -6
- package/dest/pxe_service/error_enriching.d.ts.map +1 -1
- package/dest/pxe_service/error_enriching.js +1 -0
- package/dest/pxe_service/pxe_service.d.ts +3 -2
- package/dest/pxe_service/pxe_service.d.ts.map +1 -1
- package/dest/pxe_service/pxe_service.js +28 -19
- package/dest/storage/capsule_data_provider/capsule_data_provider.js +1 -1
- package/dest/storage/note_data_provider/note_data_provider.d.ts.map +1 -1
- package/dest/storage/note_data_provider/note_data_provider.js +16 -4
- package/package.json +16 -16
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +67 -37
- package/src/contract_function_simulator/index.ts +1 -0
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/log_retrieval_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/log_retrieval_response.ts +1 -1
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +1 -1
- package/src/contract_function_simulator/oracle/note_packing_utils.ts +52 -0
- package/src/contract_function_simulator/oracle/oracle.ts +149 -111
- package/src/contract_function_simulator/oracle/private_execution.ts +17 -12
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +60 -24
- package/src/contract_function_simulator/oracle/typed_oracle.ts +108 -92
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +34 -30
- package/src/contract_function_simulator/pxe_oracle_interface.ts +6 -8
- package/src/entrypoints/server/utils.ts +17 -6
- package/src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts +106 -104
- package/src/private_kernel/hints/compute_tx_include_by_timestamp.ts +58 -0
- package/src/private_kernel/hints/index.ts +1 -0
- package/src/private_kernel/private_kernel_execution_prover.ts +21 -4
- package/src/private_kernel/private_kernel_oracle.ts +1 -1
- package/src/private_kernel/private_kernel_oracle_impl.ts +12 -9
- package/src/pxe_service/error_enriching.ts +1 -0
- package/src/pxe_service/pxe_service.ts +30 -32
- package/src/storage/capsule_data_provider/capsule_data_provider.ts +1 -1
- package/src/storage/note_data_provider/note_data_provider.ts +27 -16
|
@@ -16,19 +16,22 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
16
16
|
constructor(contractAddress, /** List of transient auth witnesses to be used during this simulation */ authWitnesses, capsules, executionDataProvider, log = createLogger('simulator:client_view_context'), scopes){
|
|
17
17
|
super(), this.contractAddress = contractAddress, this.authWitnesses = authWitnesses, this.capsules = capsules, this.executionDataProvider = executionDataProvider, this.log = log, this.scopes = scopes;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
utilityGetRandomField() {
|
|
20
|
+
return Fr.random();
|
|
21
|
+
}
|
|
22
|
+
utilityGetBlockNumber() {
|
|
20
23
|
return this.executionDataProvider.getBlockNumber();
|
|
21
24
|
}
|
|
22
|
-
|
|
25
|
+
utilityGetTimestamp() {
|
|
23
26
|
return this.executionDataProvider.getTimestamp();
|
|
24
27
|
}
|
|
25
|
-
|
|
28
|
+
utilityGetContractAddress() {
|
|
26
29
|
return Promise.resolve(this.contractAddress);
|
|
27
30
|
}
|
|
28
|
-
|
|
31
|
+
utilityGetChainId() {
|
|
29
32
|
return Promise.resolve(this.executionDataProvider.getChainId().then((id)=>new Fr(id)));
|
|
30
33
|
}
|
|
31
|
-
|
|
34
|
+
utilityGetVersion() {
|
|
32
35
|
return Promise.resolve(this.executionDataProvider.getVersion().then((v)=>new Fr(v)));
|
|
33
36
|
}
|
|
34
37
|
/**
|
|
@@ -36,7 +39,7 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
36
39
|
* @param pkMHash - The master public key hash.
|
|
37
40
|
* @returns A Promise that resolves to nullifier keys.
|
|
38
41
|
* @throws If the keys are not registered in the key store.
|
|
39
|
-
*/
|
|
42
|
+
*/ utilityGetKeyValidationRequest(pkMHash) {
|
|
40
43
|
return this.executionDataProvider.getKeyValidationRequest(pkMHash, this.contractAddress);
|
|
41
44
|
}
|
|
42
45
|
/**
|
|
@@ -45,7 +48,7 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
45
48
|
* @param treeId - Id of the tree to get the sibling path from.
|
|
46
49
|
* @param leafValue - The leaf value
|
|
47
50
|
* @returns The index and sibling path concatenated [index, sibling_path]
|
|
48
|
-
*/
|
|
51
|
+
*/ utilityGetMembershipWitness(blockNumber, treeId, leafValue) {
|
|
49
52
|
return this.executionDataProvider.getMembershipWitness(blockNumber, treeId, leafValue);
|
|
50
53
|
}
|
|
51
54
|
/**
|
|
@@ -53,7 +56,7 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
53
56
|
* @param blockNumber - The block number at which to get the index.
|
|
54
57
|
* @param nullifier - Nullifier we try to find witness for.
|
|
55
58
|
* @returns The nullifier membership witness (if found).
|
|
56
|
-
*/ async
|
|
59
|
+
*/ async utilityGetNullifierMembershipWitness(blockNumber, nullifier) {
|
|
57
60
|
return await this.executionDataProvider.getNullifierMembershipWitness(blockNumber, nullifier);
|
|
58
61
|
}
|
|
59
62
|
/**
|
|
@@ -64,7 +67,7 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
64
67
|
* @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
|
|
65
68
|
* list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
|
|
66
69
|
* we are trying to prove non-inclusion for.
|
|
67
|
-
*/ async
|
|
70
|
+
*/ async utilityGetLowNullifierMembershipWitness(blockNumber, nullifier) {
|
|
68
71
|
return await this.executionDataProvider.getLowNullifierMembershipWitness(blockNumber, nullifier);
|
|
69
72
|
}
|
|
70
73
|
/**
|
|
@@ -72,14 +75,14 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
72
75
|
* @param blockNumber - The block number at which to get the index.
|
|
73
76
|
* @param leafSlot - The slot of the public data tree to get the witness for.
|
|
74
77
|
* @returns - The witness
|
|
75
|
-
*/ async
|
|
78
|
+
*/ async utilityGetPublicDataWitness(blockNumber, leafSlot) {
|
|
76
79
|
return await this.executionDataProvider.getPublicDataWitness(blockNumber, leafSlot);
|
|
77
80
|
}
|
|
78
81
|
/**
|
|
79
82
|
* Fetches a block header of a given block.
|
|
80
83
|
* @param blockNumber - The number of a block of which to get the block header.
|
|
81
84
|
* @returns Block extracted from a block with block number `blockNumber`.
|
|
82
|
-
*/ async
|
|
85
|
+
*/ async utilityGetBlockHeader(blockNumber) {
|
|
83
86
|
const block = await this.executionDataProvider.getBlock(blockNumber);
|
|
84
87
|
if (!block) {
|
|
85
88
|
return undefined;
|
|
@@ -91,14 +94,14 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
91
94
|
* @param account - The account address.
|
|
92
95
|
* @returns A complete address associated with the input address.
|
|
93
96
|
* @throws An error if the account is not registered in the database.
|
|
94
|
-
*/
|
|
97
|
+
*/ utilityGetCompleteAddress(account) {
|
|
95
98
|
return this.executionDataProvider.getCompleteAddress(account);
|
|
96
99
|
}
|
|
97
100
|
/**
|
|
98
101
|
* Returns a contract instance associated with an address or throws if not found.
|
|
99
102
|
* @param address - Address.
|
|
100
103
|
* @returns A contract instance.
|
|
101
|
-
*/
|
|
104
|
+
*/ utilityGetContractInstance(address) {
|
|
102
105
|
return this.executionDataProvider.getContractInstance(address);
|
|
103
106
|
}
|
|
104
107
|
/**
|
|
@@ -106,7 +109,7 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
106
109
|
* for this transaction first, and falls back to the local database if not found.
|
|
107
110
|
* @param messageHash - Hash of the message to authenticate.
|
|
108
111
|
* @returns Authentication witness for the requested message hash.
|
|
109
|
-
*/
|
|
112
|
+
*/ utilityGetAuthWitness(messageHash) {
|
|
110
113
|
return Promise.resolve(this.authWitnesses.find((w)=>w.requestHash.equals(messageHash))?.witness);
|
|
111
114
|
}
|
|
112
115
|
/**
|
|
@@ -129,7 +132,7 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
129
132
|
* @param offset - The starting index for pagination.
|
|
130
133
|
* @param status - The status of notes to fetch.
|
|
131
134
|
* @returns Array of note data.
|
|
132
|
-
*/ async
|
|
135
|
+
*/ async utilityGetNotes(storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
|
|
133
136
|
const dbNotes = await this.executionDataProvider.getNotes(this.contractAddress, storageSlot, status, this.scopes);
|
|
134
137
|
return pickNotes(dbNotes, {
|
|
135
138
|
selects: selectByIndexes.slice(0, numSelects).map((index, i)=>({
|
|
@@ -157,7 +160,7 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
157
160
|
* Check if a nullifier exists in the nullifier tree.
|
|
158
161
|
* @param innerNullifier - The inner nullifier.
|
|
159
162
|
* @returns A boolean indicating whether the nullifier exists in the tree or not.
|
|
160
|
-
*/ async
|
|
163
|
+
*/ async utilityCheckNullifierExists(innerNullifier) {
|
|
161
164
|
const nullifier = await siloNullifier(this.contractAddress, innerNullifier);
|
|
162
165
|
const index = await this.executionDataProvider.getNullifierIndex(nullifier);
|
|
163
166
|
return index !== undefined;
|
|
@@ -169,7 +172,7 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
169
172
|
* @param secret - Secret used to compute a nullifier.
|
|
170
173
|
* @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
|
|
171
174
|
* @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
|
|
172
|
-
*/ async
|
|
175
|
+
*/ async utilityGetL1ToL2MembershipWitness(contractAddress, messageHash, secret) {
|
|
173
176
|
return await this.executionDataProvider.getL1ToL2MembershipWitness(contractAddress, messageHash, secret);
|
|
174
177
|
}
|
|
175
178
|
/**
|
|
@@ -178,7 +181,7 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
178
181
|
* @param startStorageSlot - The starting storage slot.
|
|
179
182
|
* @param blockNumber - The block number to read storage at.
|
|
180
183
|
* @param numberOfElements - Number of elements to read from the starting storage slot.
|
|
181
|
-
*/ async
|
|
184
|
+
*/ async utilityStorageRead(contractAddress, startStorageSlot, blockNumber, numberOfElements) {
|
|
182
185
|
const values = [];
|
|
183
186
|
for(let i = 0n; i < numberOfElements; i++){
|
|
184
187
|
const storageSlot = new Fr(startStorageSlot.value + i);
|
|
@@ -188,7 +191,7 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
188
191
|
}
|
|
189
192
|
return values;
|
|
190
193
|
}
|
|
191
|
-
|
|
194
|
+
utilityDebugLog(message, fields) {
|
|
192
195
|
this.log.verbose(`${applyStringFormatting(message, fields)}`, {
|
|
193
196
|
module: `${this.log.module}:debug_log`
|
|
194
197
|
});
|
|
@@ -200,35 +203,35 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
200
203
|
* @param sender - The address sending the note
|
|
201
204
|
* @param recipient - The address receiving the note
|
|
202
205
|
* @returns A tagging secret that can be used to tag notes.
|
|
203
|
-
*/ async
|
|
206
|
+
*/ async utilityGetIndexedTaggingSecretAsSender(sender, recipient) {
|
|
204
207
|
return await this.executionDataProvider.getIndexedTaggingSecretAsSender(this.contractAddress, sender, recipient);
|
|
205
208
|
}
|
|
206
|
-
async
|
|
209
|
+
async utilityFetchTaggedLogs(pendingTaggedLogArrayBaseSlot) {
|
|
207
210
|
await this.executionDataProvider.syncTaggedLogs(this.contractAddress, pendingTaggedLogArrayBaseSlot, this.scopes);
|
|
208
211
|
await this.executionDataProvider.removeNullifiedNotes(this.contractAddress);
|
|
209
212
|
}
|
|
210
|
-
async
|
|
213
|
+
async utilityValidateEnqueuedNotesAndEvents(contractAddress, noteValidationRequestsArrayBaseSlot, eventValidationRequestsArrayBaseSlot) {
|
|
211
214
|
// TODO(#10727): allow other contracts to deliver notes
|
|
212
215
|
if (!this.contractAddress.equals(contractAddress)) {
|
|
213
216
|
throw new Error(`Got a note validation request from ${contractAddress}, expected ${this.contractAddress}`);
|
|
214
217
|
}
|
|
215
218
|
await this.executionDataProvider.validateEnqueuedNotesAndEvents(contractAddress, noteValidationRequestsArrayBaseSlot, eventValidationRequestsArrayBaseSlot);
|
|
216
219
|
}
|
|
217
|
-
async
|
|
220
|
+
async utilityBulkRetrieveLogs(contractAddress, logRetrievalRequestsArrayBaseSlot, logRetrievalResponsesArrayBaseSlot) {
|
|
218
221
|
// TODO(#10727): allow other contracts to process partial notes
|
|
219
222
|
if (!this.contractAddress.equals(contractAddress)) {
|
|
220
223
|
throw new Error(`Got a note validation request from ${contractAddress}, expected ${this.contractAddress}`);
|
|
221
224
|
}
|
|
222
225
|
await this.executionDataProvider.bulkRetrieveLogs(contractAddress, logRetrievalRequestsArrayBaseSlot, logRetrievalResponsesArrayBaseSlot);
|
|
223
226
|
}
|
|
224
|
-
|
|
227
|
+
utilityStoreCapsule(contractAddress, slot, capsule) {
|
|
225
228
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
226
229
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
227
230
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
228
231
|
}
|
|
229
232
|
return this.executionDataProvider.storeCapsule(this.contractAddress, slot, capsule);
|
|
230
233
|
}
|
|
231
|
-
async
|
|
234
|
+
async utilityLoadCapsule(contractAddress, slot) {
|
|
232
235
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
233
236
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
234
237
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
@@ -236,14 +239,14 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
236
239
|
return(// TODO(#12425): On the following line, the pertinent capsule gets overshadowed by the transient one. Tackle this.
|
|
237
240
|
this.capsules.find((c)=>c.contractAddress.equals(contractAddress) && c.storageSlot.equals(slot))?.data ?? await this.executionDataProvider.loadCapsule(this.contractAddress, slot));
|
|
238
241
|
}
|
|
239
|
-
|
|
242
|
+
utilityDeleteCapsule(contractAddress, slot) {
|
|
240
243
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
241
244
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
242
245
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
243
246
|
}
|
|
244
247
|
return this.executionDataProvider.deleteCapsule(this.contractAddress, slot);
|
|
245
248
|
}
|
|
246
|
-
|
|
249
|
+
utilityCopyCapsule(contractAddress, srcSlot, dstSlot, numEntries) {
|
|
247
250
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
248
251
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
249
252
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
@@ -251,14 +254,14 @@ import { TypedOracle } from './typed_oracle.js';
|
|
|
251
254
|
return this.executionDataProvider.copyCapsule(this.contractAddress, srcSlot, dstSlot, numEntries);
|
|
252
255
|
}
|
|
253
256
|
// TODO(#11849): consider replacing this oracle with a pure Noir implementation of aes decryption.
|
|
254
|
-
|
|
257
|
+
utilityAes128Decrypt(ciphertext, iv, symKey) {
|
|
255
258
|
const aes128 = new Aes128();
|
|
256
259
|
return aes128.decryptBufferCBC(ciphertext, iv, symKey);
|
|
257
260
|
}
|
|
258
|
-
|
|
261
|
+
utilityGetSharedSecret(address, ephPk) {
|
|
259
262
|
return this.executionDataProvider.getSharedSecret(address, ephPk);
|
|
260
263
|
}
|
|
261
|
-
|
|
264
|
+
utilityEmitOffchainEffect(_data) {
|
|
262
265
|
return Promise.reject(new Error('Cannot emit offchain effects from a utility function'));
|
|
263
266
|
}
|
|
264
267
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pxe_oracle_interface.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/pxe_oracle_interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,aAAa,EACb,KAAK,gCAAgC,EACrC,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,K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C;IAIvG;;;;;OAKG;IACI,UAAU,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAI5C;;;;;;;OAOG;IACU,+BAA+B,CAC1C,eAAe,EAAE,YAAY,EAC7B,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,oBAAoB,CAAC;IAShC;;;;;OAKG;IACU,sCAAsC,CACjD,eAAe,EAAE,YAAY,EAC7B,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,IAAI,CAAC;IAuDhB;;;;;;OAMG;IACU,sBAAsB,CACjC,eAAe,EAAE,YAAY,EAC7B,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,IAAI,CAAC;IAyDhB;;;;;;;;OAQG;IACU,cAAc,CACzB,eAAe,EAAE,YAAY,EAC7B,6BAA6B,EAAE,EAAE,EACjC,MAAM,CAAC,EAAE,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"pxe_oracle_interface.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/pxe_oracle_interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,aAAa,EACb,KAAK,gCAAgC,EACrC,gBAAgB,EAEjB,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,EAAE,KAAK,SAAS,EAAe,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,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B,GAAG,IAAI,CAAC;IAiChE,oBAAoB,CAAC,eAAe,EAAE,YAAY;IAwD/D,YAAY,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAInF,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC;IAI1E,aAAa,CAAC,eAAe,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrE,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjG,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IA2B1E,QAAQ,IAAI,cAAc;CAM3B"}
|
|
@@ -48,7 +48,7 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
|
|
|
48
48
|
const completeAddress = await this.addressDataProvider.getCompleteAddress(account);
|
|
49
49
|
if (!completeAddress) {
|
|
50
50
|
throw new Error(`No public key registered for address ${account}.
|
|
51
|
-
Register it by calling pxe.
|
|
51
|
+
Register it by calling pxe.addAccount(...).\nSee docs for context: https://docs.aztec.network/developers/reference/debugging/aztecnr-errors#simulation-error-no-public-key-registered-for-address-0x0-register-it-by-calling-pxeregisterrecipient-or-pxeregisteraccount`);
|
|
52
52
|
}
|
|
53
53
|
return completeAddress;
|
|
54
54
|
}
|
|
@@ -373,6 +373,11 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
|
|
|
373
373
|
const newLargestIndexMapForIteration = {};
|
|
374
374
|
// Fetch the private logs for the tags and iterate over them
|
|
375
375
|
const logsByTags = await this.#getPrivateLogsByTags(tagsForTheWholeWindow);
|
|
376
|
+
this.log.debug(`Found ${logsByTags.filter((logs)=>logs.length > 0).length} logs as recipient ${recipient}`, {
|
|
377
|
+
recipient,
|
|
378
|
+
contractName,
|
|
379
|
+
contractAddress
|
|
380
|
+
});
|
|
376
381
|
for(let logIndex = 0; logIndex < logsByTags.length; logIndex++){
|
|
377
382
|
const logsByTag = logsByTags[logIndex];
|
|
378
383
|
if (logsByTag.length > 0) {
|
|
@@ -384,12 +389,6 @@ import { WINDOW_HALF_SIZE, getIndexedTaggingSecretsForTheWindow, getInitialIndex
|
|
|
384
389
|
// a new largest index have been found.
|
|
385
390
|
const secretCorrespondingToLog = secretsForTheWholeWindow[logIndex];
|
|
386
391
|
const initialIndex = initialIndexesMap[secretCorrespondingToLog.appTaggingSecret.toString()];
|
|
387
|
-
this.log.debug(`Found ${logsByTags.length} logs as recipient ${recipient}`, {
|
|
388
|
-
recipient,
|
|
389
|
-
secret: secretCorrespondingToLog.appTaggingSecret,
|
|
390
|
-
contractName,
|
|
391
|
-
contractAddress
|
|
392
|
-
});
|
|
393
392
|
if (secretCorrespondingToLog.index >= initialIndex && (newLargestIndexMapForIteration[secretCorrespondingToLog.appTaggingSecret.toString()] === undefined || secretCorrespondingToLog.index >= newLargestIndexMapForIteration[secretCorrespondingToLog.appTaggingSecret.toString()])) {
|
|
394
393
|
// We have found a new largest index so we store it for later processing (storing it in the db + fetching
|
|
395
394
|
// the difference of the window sets of current and the next iteration)
|
|
@@ -3,6 +3,7 @@ import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
|
3
3
|
import type { PXEServiceConfig } from '../../config/index.js';
|
|
4
4
|
import { PXEService } from '../../pxe_service/pxe_service.js';
|
|
5
5
|
import type { PXECreationOptions } from '../pxe_creation_options.js';
|
|
6
|
+
type PXEConfigWithoutDefaults = Omit<PXEServiceConfig, 'l1Contracts' | 'l1ChainId' | 'l2BlockBatchSize' | 'rollupVersion'>;
|
|
6
7
|
/**
|
|
7
8
|
* Create and start an PXEService instance with the given AztecNode and config.
|
|
8
9
|
*
|
|
@@ -11,7 +12,7 @@ import type { PXECreationOptions } from '../pxe_creation_options.js';
|
|
|
11
12
|
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
12
13
|
* @returns A Promise that resolves to the started PXEService instance.
|
|
13
14
|
*/
|
|
14
|
-
export declare function createPXEService(aztecNode: AztecNode, config:
|
|
15
|
+
export declare function createPXEService(aztecNode: AztecNode, config: PXEConfigWithoutDefaults, options?: PXECreationOptions): Promise<PXEService>;
|
|
15
16
|
/**
|
|
16
17
|
* Create and start an PXEService instance with the given AztecNode, Simulator and config.
|
|
17
18
|
*
|
|
@@ -21,5 +22,6 @@ export declare function createPXEService(aztecNode: AztecNode, config: PXEServic
|
|
|
21
22
|
* @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
|
|
22
23
|
* @returns A Promise that resolves to the started PXEService instance.
|
|
23
24
|
*/
|
|
24
|
-
export declare function createPXEServiceWithSimulator(aztecNode: AztecNode, simulator: CircuitSimulator, config:
|
|
25
|
+
export declare function createPXEServiceWithSimulator(aztecNode: AztecNode, simulator: CircuitSimulator, config: PXEConfigWithoutDefaults, options?: PXECreationOptions): Promise<PXEService>;
|
|
26
|
+
export {};
|
|
25
27
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,gBAAgB,EAItB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,gBAAgB,EAItB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,KAAK,wBAAwB,GAAG,IAAI,CAClC,gBAAgB,EAChB,aAAa,GAAG,WAAW,GAAG,kBAAkB,GAAG,eAAe,CACnE,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,wBAAwB,EAChC,OAAO,GAAE,kBAAoC,uBAQ9C;AAED;;;;;;;;GAQG;AACH,wBAAsB,6BAA6B,CACjD,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,wBAAwB,EAChC,OAAO,GAAE,kBAAoC,uBA8C9C"}
|
|
@@ -35,10 +35,12 @@ import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
|
35
35
|
}) {
|
|
36
36
|
const logSuffix = typeof options.useLogSuffix === 'boolean' ? options.useLogSuffix ? randomBytes(3).toString('hex') : undefined : options.useLogSuffix;
|
|
37
37
|
const loggers = options.loggers ?? {};
|
|
38
|
-
const l1Contracts = await aztecNode.
|
|
38
|
+
const { l1ChainId, l1ContractAddresses: l1Contracts, rollupVersion } = await aztecNode.getNodeInfo();
|
|
39
39
|
const configWithContracts = {
|
|
40
40
|
...config,
|
|
41
41
|
l1Contracts,
|
|
42
|
+
l1ChainId,
|
|
43
|
+
rollupVersion,
|
|
42
44
|
l2BlockBatchSize: 50
|
|
43
45
|
};
|
|
44
46
|
if (!options.store) {
|
|
@@ -52,7 +54,7 @@ import { PXE_DATA_SCHEMA_VERSION } from '../../storage/index.js';
|
|
|
52
54
|
const prover = options.prover ?? await createProver(config, simulator, proverLogger);
|
|
53
55
|
const protocolContractsProvider = new BundledProtocolContractsProvider();
|
|
54
56
|
const pxeLogger = loggers.pxe ? loggers.pxe : createLogger('pxe:service' + (logSuffix ? `:${logSuffix}` : ''));
|
|
55
|
-
const pxe = await PXEService.create(aztecNode, options.store, prover, simulator, protocolContractsProvider,
|
|
57
|
+
const pxe = await PXEService.create(aztecNode, options.store, prover, simulator, protocolContractsProvider, configWithContracts, pxeLogger);
|
|
56
58
|
return pxe;
|
|
57
59
|
}
|
|
58
60
|
function createProver(config, simulator, logger) {
|
|
@@ -8,15 +8,15 @@ export declare class PrivateKernelResetPrivateInputsBuilder {
|
|
|
8
8
|
private validationRequestsSplitCounter;
|
|
9
9
|
private previousKernel;
|
|
10
10
|
private nextIteration?;
|
|
11
|
-
private
|
|
12
|
-
private
|
|
11
|
+
private noteHashResetActions;
|
|
12
|
+
private nullifierResetActions;
|
|
13
13
|
private numTransientData?;
|
|
14
|
-
private
|
|
14
|
+
private transientDataSquashingHints;
|
|
15
15
|
private requestedDimensions;
|
|
16
16
|
constructor(previousKernelOutput: PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>, executionStack: PrivateCallExecutionResult[], noteHashNullifierCounterMap: Map<number, number>, validationRequestsSplitCounter: number);
|
|
17
17
|
needsReset(): boolean;
|
|
18
18
|
build(oracle: PrivateKernelOracle, noteHashLeafIndexMap: Map<bigint, bigint>): Promise<PrivateKernelResetCircuitPrivateInputs>;
|
|
19
|
-
private
|
|
19
|
+
private reduceReadRequestActions;
|
|
20
20
|
private needsResetNoteHashReadRequests;
|
|
21
21
|
private needsResetNullifierReadRequests;
|
|
22
22
|
private needsResetNullifierKeys;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_private_kernel_reset_private_inputs.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts"],"names":[],"mappings":"AAeA,OAAO,
|
|
1
|
+
{"version":3,"file":"build_private_kernel_reset_private_inputs.d.ts","sourceRoot":"","sources":["../../../src/private_kernel/hints/build_private_kernel_reset_private_inputs.ts"],"names":[],"mappings":"AAeA,OAAO,EAKL,KAAK,gCAAgC,EAErC,sCAAsC,EAGtC,KAAK,2BAA2B,EAgBjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,0BAA0B,EAAiB,MAAM,kBAAkB,CAAC;AAGlF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AA8CvE,qBAAa,sCAAsC;IAY/C,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,2BAA2B;IACnC,OAAO,CAAC,8BAA8B;IAdxC,OAAO,CAAC,cAAc,CAAmC;IAEzD,OAAO,CAAC,aAAa,CAAC,CAA6B;IAEnD,OAAO,CAAC,oBAAoB,CAAqE;IACjG,OAAO,CAAC,qBAAqB,CAAqE;IAClG,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAClC,OAAO,CAAC,2BAA2B,CAAkE;IACrG,OAAO,CAAC,mBAAmB,CAA+B;gBAGhD,oBAAoB,EAAE,2BAA2B,CAAC,gCAAgC,CAAC,EACnF,cAAc,EAAE,0BAA0B,EAAE,EAC5C,2BAA2B,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAChD,8BAA8B,EAAE,MAAM;IAahD,UAAU,IAAI,OAAO;IAwBf,KAAK,CAAC,MAAM,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAuElF,OAAO,CAAC,wBAAwB;IA2BhC,OAAO,CAAC,8BAA8B;IAuDtC,OAAO,CAAC,+BAA+B;IAuDvC,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,uBAAuB;IAsE/B,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,mBAAmB;IAkB3B,OAAO,CAAC,oBAAoB;CAqB7B"}
|