@aztec/pxe 0.0.1-commit.f504929 → 0.0.1-commit.f81dbcf
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.js +3 -3
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +49 -45
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.d.ts +44 -44
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +89 -132
- package/dest/contract_function_simulator/oracle/private_execution.js +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +20 -20
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +38 -30
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +38 -32
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +48 -35
- package/dest/oracle_version.d.ts +2 -2
- package/dest/oracle_version.js +3 -3
- package/dest/pxe.d.ts +2 -3
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +6 -10
- package/package.json +16 -16
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +3 -3
- package/src/contract_function_simulator/oracle/interfaces.ts +47 -44
- package/src/contract_function_simulator/oracle/oracle.ts +107 -135
- package/src/contract_function_simulator/oracle/private_execution.ts +1 -1
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +39 -30
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +56 -37
- package/src/oracle_version.ts +3 -3
- package/src/pxe.ts +4 -8
|
@@ -38,7 +38,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
38
38
|
capsuleStore;
|
|
39
39
|
privateEventStore;
|
|
40
40
|
jobId;
|
|
41
|
-
|
|
41
|
+
log;
|
|
42
42
|
scopes;
|
|
43
43
|
constructor(args){
|
|
44
44
|
this.contractAddress = args.contractAddress;
|
|
@@ -55,18 +55,18 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
55
55
|
this.capsuleStore = args.capsuleStore;
|
|
56
56
|
this.privateEventStore = args.privateEventStore;
|
|
57
57
|
this.jobId = args.jobId;
|
|
58
|
-
this.
|
|
58
|
+
this.log = args.log ?? createLogger('simulator:client_view_context');
|
|
59
59
|
this.scopes = args.scopes;
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
utilityAssertCompatibleOracleVersion(version) {
|
|
62
62
|
if (version !== ORACLE_VERSION) {
|
|
63
63
|
throw new Error(`Incompatible oracle version. Expected version ${ORACLE_VERSION}, got ${version}.`);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
utilityGetRandomField() {
|
|
67
67
|
return Fr.random();
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
utilityGetUtilityContext() {
|
|
70
70
|
return new UtilityContext(this.anchorBlockHeader, this.contractAddress);
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -75,7 +75,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
75
75
|
* @returns A Promise that resolves to nullifier keys.
|
|
76
76
|
* @throws If the keys are not registered in the key store.
|
|
77
77
|
* @throws If scopes are defined and the account is not in the scopes.
|
|
78
|
-
*/ async
|
|
78
|
+
*/ async utilityGetKeyValidationRequest(pkMHash) {
|
|
79
79
|
// If scopes are defined, check that the key belongs to an account in the scopes.
|
|
80
80
|
if (this.scopes !== 'ALL_SCOPES' && this.scopes.length > 0) {
|
|
81
81
|
let hasAccess = false;
|
|
@@ -96,7 +96,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
96
96
|
* witness.
|
|
97
97
|
* @param noteHash - The note hash to find in the note hash tree.
|
|
98
98
|
* @returns The membership witness containing the leaf index and sibling path
|
|
99
|
-
*/
|
|
99
|
+
*/ utilityGetNoteHashMembershipWitness(anchorBlockHash, noteHash) {
|
|
100
100
|
return this.aztecNode.getNoteHashMembershipWitness(anchorBlockHash, noteHash);
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
@@ -109,7 +109,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
109
109
|
* witness.
|
|
110
110
|
* @param blockHash - The block hash to find in the archive tree.
|
|
111
111
|
* @returns The membership witness containing the leaf index and sibling path
|
|
112
|
-
*/
|
|
112
|
+
*/ utilityGetBlockHashMembershipWitness(anchorBlockHash, blockHash) {
|
|
113
113
|
return this.aztecNode.getBlockHashMembershipWitness(anchorBlockHash, blockHash);
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
@@ -117,7 +117,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
117
117
|
* @param blockHash - The block hash at which to get the index.
|
|
118
118
|
* @param nullifier - Nullifier we try to find witness for.
|
|
119
119
|
* @returns The nullifier membership witness (if found).
|
|
120
|
-
*/
|
|
120
|
+
*/ utilityGetNullifierMembershipWitness(blockHash, nullifier) {
|
|
121
121
|
return this.aztecNode.getNullifierMembershipWitness(blockHash, nullifier);
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
@@ -128,7 +128,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
128
128
|
* @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
|
|
129
129
|
* list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
|
|
130
130
|
* we are trying to prove non-inclusion for.
|
|
131
|
-
*/
|
|
131
|
+
*/ utilityGetLowNullifierMembershipWitness(blockHash, nullifier) {
|
|
132
132
|
return this.aztecNode.getLowNullifierMembershipWitness(blockHash, nullifier);
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
@@ -136,14 +136,14 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
136
136
|
* @param blockHash - The block hash at which to get the index.
|
|
137
137
|
* @param leafSlot - The slot of the public data tree to get the witness for.
|
|
138
138
|
* @returns - The witness
|
|
139
|
-
*/
|
|
139
|
+
*/ utilityGetPublicDataWitness(blockHash, leafSlot) {
|
|
140
140
|
return this.aztecNode.getPublicDataWitness(blockHash, leafSlot);
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
143
|
* Fetches a block header of a given block.
|
|
144
144
|
* @param blockNumber - The number of a block of which to get the block header.
|
|
145
145
|
* @returns Block extracted from a block with block number `blockNumber`.
|
|
146
|
-
*/ async
|
|
146
|
+
*/ async utilityGetBlockHeader(blockNumber) {
|
|
147
147
|
const anchorBlockNumber = this.anchorBlockHeader.getBlockNumber();
|
|
148
148
|
if (blockNumber > anchorBlockNumber) {
|
|
149
149
|
throw new Error(`Block number ${blockNumber} is higher than current block ${anchorBlockNumber}`);
|
|
@@ -152,11 +152,18 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
152
152
|
return block?.header;
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
|
-
* Retrieve the
|
|
155
|
+
* Retrieve the public keys and partial address associated to a given address.
|
|
156
156
|
* @param account - The account address.
|
|
157
|
-
* @returns
|
|
158
|
-
*/
|
|
159
|
-
|
|
157
|
+
* @returns The public keys and partial address, or `undefined` if the account is not registered.
|
|
158
|
+
*/ async utilityTryGetPublicKeysAndPartialAddress(account) {
|
|
159
|
+
const completeAddress = await this.addressStore.getCompleteAddress(account);
|
|
160
|
+
if (!completeAddress) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
publicKeys: completeAddress.publicKeys,
|
|
165
|
+
partialAddress: completeAddress.partialAddress
|
|
166
|
+
};
|
|
160
167
|
}
|
|
161
168
|
async getCompleteAddressOrFail(account) {
|
|
162
169
|
const completeAddress = await this.addressStore.getCompleteAddress(account);
|
|
@@ -170,7 +177,10 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
170
177
|
* Returns a contract instance associated with an address or throws if not found.
|
|
171
178
|
* @param address - Address.
|
|
172
179
|
* @returns A contract instance.
|
|
173
|
-
*/
|
|
180
|
+
*/ utilityGetContractInstance(address) {
|
|
181
|
+
return this.getContractInstance(address);
|
|
182
|
+
}
|
|
183
|
+
async getContractInstance(address) {
|
|
174
184
|
const instance = await this.contractStore.getContractInstance(address);
|
|
175
185
|
if (!instance) {
|
|
176
186
|
throw new Error(`No contract instance found for address ${address.toString()}`);
|
|
@@ -182,7 +192,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
182
192
|
* for this transaction first, and falls back to the local database if not found.
|
|
183
193
|
* @param messageHash - Hash of the message to authenticate.
|
|
184
194
|
* @returns Authentication witness for the requested message hash.
|
|
185
|
-
*/
|
|
195
|
+
*/ utilityGetAuthWitness(messageHash) {
|
|
186
196
|
return Promise.resolve(this.authWitnesses.find((w)=>w.requestHash.equals(messageHash))?.witness);
|
|
187
197
|
}
|
|
188
198
|
/**
|
|
@@ -206,7 +216,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
206
216
|
* @param offset - The starting index for pagination.
|
|
207
217
|
* @param status - The status of notes to fetch.
|
|
208
218
|
* @returns Array of note data.
|
|
209
|
-
*/ async
|
|
219
|
+
*/ async utilityGetNotes(owner, storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
|
|
210
220
|
const noteService = new NoteService(this.noteStore, this.aztecNode, this.anchorBlockHeader, this.jobId);
|
|
211
221
|
const dbNotes = await noteService.getNotes(this.contractAddress, owner, storageSlot, status, this.scopes);
|
|
212
222
|
return pickNotes(dbNotes, {
|
|
@@ -235,7 +245,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
235
245
|
* Check if a nullifier exists in the nullifier tree.
|
|
236
246
|
* @param innerNullifier - The inner nullifier.
|
|
237
247
|
* @returns A boolean indicating whether the nullifier exists in the tree or not.
|
|
238
|
-
*/ async
|
|
248
|
+
*/ async utilityCheckNullifierExists(innerNullifier) {
|
|
239
249
|
const [nullifier, anchorBlockHash] = await Promise.all([
|
|
240
250
|
siloNullifier(this.contractAddress, innerNullifier),
|
|
241
251
|
this.anchorBlockHeader.hash()
|
|
@@ -252,7 +262,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
252
262
|
* @param secret - Secret used to compute a nullifier.
|
|
253
263
|
* @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
|
|
254
264
|
* @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
|
|
255
|
-
*/ async
|
|
265
|
+
*/ async utilityGetL1ToL2MembershipWitness(contractAddress, messageHash, secret) {
|
|
256
266
|
const [messageIndex, siblingPath] = await getNonNullifiedL1ToL2MessageWitness(this.aztecNode, contractAddress, messageHash, secret);
|
|
257
267
|
return new MessageLoadOracleInputs(messageIndex, siblingPath);
|
|
258
268
|
}
|
|
@@ -262,10 +272,10 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
262
272
|
* @param contractAddress - The address to read storage from.
|
|
263
273
|
* @param startStorageSlot - The starting storage slot.
|
|
264
274
|
* @param numberOfElements - Number of elements to read from the starting storage slot.
|
|
265
|
-
*/ async
|
|
275
|
+
*/ async utilityStorageRead(blockHash, contractAddress, startStorageSlot, numberOfElements) {
|
|
266
276
|
const slots = Array(numberOfElements).fill(0).map((_, i)=>new Fr(startStorageSlot.value + BigInt(i)));
|
|
267
277
|
const values = await Promise.all(slots.map((storageSlot)=>this.aztecNode.getPublicStorageAt(blockHash, contractAddress, storageSlot)));
|
|
268
|
-
this.
|
|
278
|
+
this.log.debug(`Oracle storage read: slots=[${slots.map((slot)=>slot.toString()).join(', ')}] address=${contractAddress.toString()} values=[${values.join(', ')}]`);
|
|
269
279
|
return values;
|
|
270
280
|
}
|
|
271
281
|
/**
|
|
@@ -280,15 +290,15 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
280
290
|
}
|
|
281
291
|
return this.contractLogger;
|
|
282
292
|
}
|
|
283
|
-
async
|
|
293
|
+
async utilityLog(level, message, fields) {
|
|
284
294
|
if (!LogLevels[level]) {
|
|
285
295
|
throw new Error(`Invalid log level: ${level}`);
|
|
286
296
|
}
|
|
287
297
|
const logger = await this.#getContractLogger();
|
|
288
298
|
logContractMessage(logger, LogLevels[level], message, fields);
|
|
289
299
|
}
|
|
290
|
-
async
|
|
291
|
-
const logService = new LogService(this.aztecNode, this.anchorBlockHeader, this.keyStore, this.capsuleStore, this.recipientTaggingStore, this.senderAddressBookStore, this.addressStore, this.jobId, this.
|
|
300
|
+
async utilityFetchTaggedLogs(pendingTaggedLogArrayBaseSlot) {
|
|
301
|
+
const logService = new LogService(this.aztecNode, this.anchorBlockHeader, this.keyStore, this.capsuleStore, this.recipientTaggingStore, this.senderAddressBookStore, this.addressStore, this.jobId, this.log.getBindings());
|
|
292
302
|
await logService.fetchTaggedLogs(this.contractAddress, pendingTaggedLogArrayBaseSlot, this.scopes);
|
|
293
303
|
}
|
|
294
304
|
/**
|
|
@@ -300,7 +310,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
300
310
|
* @param contractAddress - The address of the contract that the logs are tagged for.
|
|
301
311
|
* @param noteValidationRequestsArrayBaseSlot - The base slot of capsule array containing note validation requests.
|
|
302
312
|
* @param eventValidationRequestsArrayBaseSlot - The base slot of capsule array containing event validation requests.
|
|
303
|
-
*/ async
|
|
313
|
+
*/ async utilityValidateAndStoreEnqueuedNotesAndEvents(contractAddress, noteValidationRequestsArrayBaseSlot, eventValidationRequestsArrayBaseSlot) {
|
|
304
314
|
// TODO(#10727): allow other contracts to store notes
|
|
305
315
|
if (!this.contractAddress.equals(contractAddress)) {
|
|
306
316
|
throw new Error(`Got a note validation request from ${contractAddress}, expected ${this.contractAddress}`);
|
|
@@ -321,7 +331,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
321
331
|
await this.capsuleStore.setCapsuleArray(contractAddress, noteValidationRequestsArrayBaseSlot, [], this.jobId);
|
|
322
332
|
await this.capsuleStore.setCapsuleArray(contractAddress, eventValidationRequestsArrayBaseSlot, [], this.jobId);
|
|
323
333
|
}
|
|
324
|
-
async
|
|
334
|
+
async utilityBulkRetrieveLogs(contractAddress, logRetrievalRequestsArrayBaseSlot, logRetrievalResponsesArrayBaseSlot) {
|
|
325
335
|
// TODO(#10727): allow other contracts to process partial notes
|
|
326
336
|
if (!this.contractAddress.equals(contractAddress)) {
|
|
327
337
|
throw new Error(`Got a note validation request from ${contractAddress}, expected ${this.contractAddress}`);
|
|
@@ -329,14 +339,14 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
329
339
|
// We read all log retrieval requests and process them all concurrently. This makes the process much faster as we
|
|
330
340
|
// don't need to wait for the network round-trip.
|
|
331
341
|
const logRetrievalRequests = (await this.capsuleStore.readCapsuleArray(contractAddress, logRetrievalRequestsArrayBaseSlot, this.jobId)).map(LogRetrievalRequest.fromFields);
|
|
332
|
-
const logService = new LogService(this.aztecNode, this.anchorBlockHeader, this.keyStore, this.capsuleStore, this.recipientTaggingStore, this.senderAddressBookStore, this.addressStore, this.jobId, this.
|
|
342
|
+
const logService = new LogService(this.aztecNode, this.anchorBlockHeader, this.keyStore, this.capsuleStore, this.recipientTaggingStore, this.senderAddressBookStore, this.addressStore, this.jobId, this.log.getBindings());
|
|
333
343
|
const maybeLogRetrievalResponses = await logService.bulkRetrieveLogs(logRetrievalRequests);
|
|
334
344
|
// Requests are cleared once we're done.
|
|
335
345
|
await this.capsuleStore.setCapsuleArray(contractAddress, logRetrievalRequestsArrayBaseSlot, [], this.jobId);
|
|
336
346
|
// The responses are stored as Option<LogRetrievalResponse> in a second CapsuleArray.
|
|
337
347
|
await this.capsuleStore.setCapsuleArray(contractAddress, logRetrievalResponsesArrayBaseSlot, maybeLogRetrievalResponses.map(LogRetrievalResponse.toSerializedOption), this.jobId);
|
|
338
348
|
}
|
|
339
|
-
|
|
349
|
+
utilityStoreCapsule(contractAddress, slot, capsule) {
|
|
340
350
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
341
351
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
342
352
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
@@ -344,7 +354,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
344
354
|
this.capsuleStore.storeCapsule(this.contractAddress, slot, capsule, this.jobId);
|
|
345
355
|
return Promise.resolve();
|
|
346
356
|
}
|
|
347
|
-
async
|
|
357
|
+
async utilityLoadCapsule(contractAddress, slot) {
|
|
348
358
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
349
359
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
350
360
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
@@ -352,7 +362,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
352
362
|
return(// TODO(#12425): On the following line, the pertinent capsule gets overshadowed by the transient one. Tackle this.
|
|
353
363
|
this.capsules.find((c)=>c.contractAddress.equals(contractAddress) && c.storageSlot.equals(slot))?.data ?? await this.capsuleStore.loadCapsule(this.contractAddress, slot, this.jobId));
|
|
354
364
|
}
|
|
355
|
-
|
|
365
|
+
utilityDeleteCapsule(contractAddress, slot) {
|
|
356
366
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
357
367
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
358
368
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
@@ -360,7 +370,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
360
370
|
this.capsuleStore.deleteCapsule(this.contractAddress, slot, this.jobId);
|
|
361
371
|
return Promise.resolve();
|
|
362
372
|
}
|
|
363
|
-
|
|
373
|
+
utilityCopyCapsule(contractAddress, srcSlot, dstSlot, numEntries) {
|
|
364
374
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
365
375
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
366
376
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
@@ -368,7 +378,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
368
378
|
return this.capsuleStore.copyCapsule(this.contractAddress, srcSlot, dstSlot, numEntries, this.jobId);
|
|
369
379
|
}
|
|
370
380
|
// TODO(#11849): consider replacing this oracle with a pure Noir implementation of aes decryption.
|
|
371
|
-
|
|
381
|
+
utilityAes128Decrypt(ciphertext, iv, symKey) {
|
|
372
382
|
const aes128 = new Aes128();
|
|
373
383
|
return aes128.decryptBufferCBC(ciphertext, iv, symKey);
|
|
374
384
|
}
|
|
@@ -377,7 +387,10 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
377
387
|
* @param address - The address to get the secret for.
|
|
378
388
|
* @param ephPk - The ephemeral public key to get the secret for.
|
|
379
389
|
* @returns The secret for the given address.
|
|
380
|
-
*/
|
|
390
|
+
*/ utilityGetSharedSecret(address, ephPk) {
|
|
391
|
+
return this.getSharedSecret(address, ephPk);
|
|
392
|
+
}
|
|
393
|
+
async getSharedSecret(address, ephPk) {
|
|
381
394
|
// TODO(#12656): return an app-siloed secret
|
|
382
395
|
const recipientCompleteAddress = await this.getCompleteAddressOrFail(address);
|
|
383
396
|
const ivskM = await this.keyStore.getMasterSecretKey(recipientCompleteAddress.publicKeys.masterIncomingViewingPublicKey);
|
package/dest/oracle_version.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ORACLE_VERSION =
|
|
2
|
-
export declare const ORACLE_INTERFACE_HASH = "
|
|
1
|
+
export declare const ORACLE_VERSION = 12;
|
|
2
|
+
export declare const ORACLE_INTERFACE_HASH = "666a8a7fc697f72b29dbf0ae7464db269cf5afa019acac8861f814543147dbb4";
|
|
3
3
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JhY2xlX3ZlcnNpb24uZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9vcmFjbGVfdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxlQUFPLE1BQU0sY0FBYyxLQUFLLENBQUM7QUFLakMsZUFBTyxNQUFNLHFCQUFxQixxRUFBcUUsQ0FBQyJ9
|
package/dest/oracle_version.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/// to version the oracle interface to ensure that developers get a reasonable error message if they use incompatible
|
|
3
3
|
/// versions of Aztec.nr and PXE. The Noir counterpart is in `noir-projects/aztec-nr/aztec/src/oracle/version.nr`.
|
|
4
4
|
///
|
|
5
|
-
/// @dev Whenever a contract function or Noir test is run, the `
|
|
5
|
+
/// @dev Whenever a contract function or Noir test is run, the `utilityAssertCompatibleOracleVersion` oracle is called
|
|
6
6
|
/// and if the oracle version is incompatible an error is thrown.
|
|
7
|
-
export const ORACLE_VERSION =
|
|
7
|
+
export const ORACLE_VERSION = 12;
|
|
8
8
|
/// This hash is computed as by hashing the Oracle interface and it is used to detect when the Oracle interface changes,
|
|
9
9
|
/// which in turn implies that you need to update the ORACLE_VERSION constant in this file and in
|
|
10
10
|
/// `noir-projects/aztec-nr/aztec/src/oracle/version.nr`.
|
|
11
|
-
export const ORACLE_INTERFACE_HASH = '
|
|
11
|
+
export const ORACLE_INTERFACE_HASH = '666a8a7fc697f72b29dbf0ae7464db269cf5afa019acac8861f814543147dbb4';
|
package/dest/pxe.d.ts
CHANGED
|
@@ -70,7 +70,6 @@ export type PXECreateArgs = {
|
|
|
70
70
|
export declare class PXE {
|
|
71
71
|
#private;
|
|
72
72
|
private node;
|
|
73
|
-
private db;
|
|
74
73
|
private blockStateSynchronizer;
|
|
75
74
|
private keyStore;
|
|
76
75
|
private contractStore;
|
|
@@ -244,8 +243,8 @@ export declare class PXE {
|
|
|
244
243
|
*/
|
|
245
244
|
getPrivateEvents(eventSelector: EventSelector, filter: PrivateEventFilter): Promise<PackedPrivateEvent[]>;
|
|
246
245
|
/**
|
|
247
|
-
* Stops the PXE's job queue
|
|
246
|
+
* Stops the PXE's job queue.
|
|
248
247
|
*/
|
|
249
248
|
stop(): Promise<void>;
|
|
250
249
|
}
|
|
251
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
250
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHhlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvcHhlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFakUsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBcUMsTUFBTSx1QkFBdUIsQ0FBQztBQUl2RixPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRXpELE9BQU8sRUFBRSxLQUFLLHlCQUF5QixFQUF5QixNQUFNLDJCQUEyQixDQUFDO0FBQ2xHLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDaEUsT0FBTyxFQUNMLEtBQUssZ0JBQWdCLEVBQ3JCLGFBQWEsRUFDYixZQUFZLEVBR2IsTUFBTSxtQkFBbUI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AO,CAAC,IAAI,CAAC,CAE3B;CACF"}
|
package/dest/pxe.js
CHANGED
|
@@ -36,7 +36,6 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
36
36
|
* manage private state of users.
|
|
37
37
|
*/ export class PXE {
|
|
38
38
|
node;
|
|
39
|
-
db;
|
|
40
39
|
blockStateSynchronizer;
|
|
41
40
|
keyStore;
|
|
42
41
|
contractStore;
|
|
@@ -57,9 +56,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
57
56
|
jobQueue;
|
|
58
57
|
jobCoordinator;
|
|
59
58
|
debug;
|
|
60
|
-
constructor(node,
|
|
59
|
+
constructor(node, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
|
|
61
60
|
this.node = node;
|
|
62
|
-
this.db = db;
|
|
63
61
|
this.blockStateSynchronizer = blockStateSynchronizer;
|
|
64
62
|
this.keyStore = keyStore;
|
|
65
63
|
this.contractStore = contractStore;
|
|
@@ -117,7 +115,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
117
115
|
]);
|
|
118
116
|
const debugUtils = new PXEDebugUtils(contractSyncService, noteStore, synchronizer, anchorBlockStore);
|
|
119
117
|
const jobQueue = new SerialQueue();
|
|
120
|
-
const pxe = new PXE(node,
|
|
118
|
+
const pxe = new PXE(node, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debugUtils);
|
|
121
119
|
debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#executeUtility.bind(pxe));
|
|
122
120
|
pxe.jobQueue.start();
|
|
123
121
|
await pxe.#registerProtocolContracts();
|
|
@@ -656,8 +654,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
656
654
|
});
|
|
657
655
|
validationTime = validationTimer.ms();
|
|
658
656
|
if (validationResult.result === 'invalid') {
|
|
659
|
-
|
|
660
|
-
throw new Error(`The simulated transaction is unable to be added to state and is invalid.${reason}`);
|
|
657
|
+
throw new Error('The simulated transaction is unable to be added to state and is invalid.');
|
|
661
658
|
}
|
|
662
659
|
}
|
|
663
660
|
const txHash = simulatedTx.getTxHash();
|
|
@@ -770,9 +767,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
770
767
|
return this.privateEventStore.getPrivateEvents(eventSelector, sanitizedFilter);
|
|
771
768
|
}
|
|
772
769
|
/**
|
|
773
|
-
* Stops the PXE's job queue
|
|
774
|
-
*/
|
|
775
|
-
|
|
776
|
-
await this.db.close();
|
|
770
|
+
* Stops the PXE's job queue.
|
|
771
|
+
*/ stop() {
|
|
772
|
+
return this.jobQueue.end();
|
|
777
773
|
}
|
|
778
774
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/pxe",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.f81dbcf",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"typedocOptions": {
|
|
6
6
|
"entryPoints": [
|
|
@@ -70,19 +70,19 @@
|
|
|
70
70
|
]
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
74
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
75
|
-
"@aztec/builder": "0.0.1-commit.
|
|
76
|
-
"@aztec/constants": "0.0.1-commit.
|
|
77
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
78
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
79
|
-
"@aztec/key-store": "0.0.1-commit.
|
|
80
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
81
|
-
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.
|
|
82
|
-
"@aztec/noir-types": "0.0.1-commit.
|
|
83
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
84
|
-
"@aztec/simulator": "0.0.1-commit.
|
|
85
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
73
|
+
"@aztec/bb-prover": "0.0.1-commit.f81dbcf",
|
|
74
|
+
"@aztec/bb.js": "0.0.1-commit.f81dbcf",
|
|
75
|
+
"@aztec/builder": "0.0.1-commit.f81dbcf",
|
|
76
|
+
"@aztec/constants": "0.0.1-commit.f81dbcf",
|
|
77
|
+
"@aztec/ethereum": "0.0.1-commit.f81dbcf",
|
|
78
|
+
"@aztec/foundation": "0.0.1-commit.f81dbcf",
|
|
79
|
+
"@aztec/key-store": "0.0.1-commit.f81dbcf",
|
|
80
|
+
"@aztec/kv-store": "0.0.1-commit.f81dbcf",
|
|
81
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.f81dbcf",
|
|
82
|
+
"@aztec/noir-types": "0.0.1-commit.f81dbcf",
|
|
83
|
+
"@aztec/protocol-contracts": "0.0.1-commit.f81dbcf",
|
|
84
|
+
"@aztec/simulator": "0.0.1-commit.f81dbcf",
|
|
85
|
+
"@aztec/stdlib": "0.0.1-commit.f81dbcf",
|
|
86
86
|
"koa": "^2.16.1",
|
|
87
87
|
"koa-router": "^13.1.1",
|
|
88
88
|
"lodash.omit": "^4.5.0",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"viem": "npm:@aztec/viem@2.38.2"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@aztec/merkle-tree": "0.0.1-commit.
|
|
95
|
-
"@aztec/noir-test-contracts.js": "0.0.1-commit.
|
|
94
|
+
"@aztec/merkle-tree": "0.0.1-commit.f81dbcf",
|
|
95
|
+
"@aztec/noir-test-contracts.js": "0.0.1-commit.f81dbcf",
|
|
96
96
|
"@jest/globals": "^30.0.0",
|
|
97
97
|
"@types/jest": "^30.0.0",
|
|
98
98
|
"@types/lodash.omit": "^4.5.7",
|
|
@@ -277,7 +277,7 @@ export class ContractFunctionSimulator {
|
|
|
277
277
|
);
|
|
278
278
|
const publicFunctionsCalldata = await Promise.all(
|
|
279
279
|
publicCallRequests.map(async r => {
|
|
280
|
-
const calldata = await privateExecutionOracle.
|
|
280
|
+
const calldata = await privateExecutionOracle.privateLoadFromExecutionCache(r.calldataHash);
|
|
281
281
|
return new HashedValues(calldata, r.calldataHash);
|
|
282
282
|
}),
|
|
283
283
|
);
|
|
@@ -809,9 +809,9 @@ function meterGasUsed(data: PrivateToRollupAccumulatedData | PrivateToPublicAccu
|
|
|
809
809
|
meteredL2Gas += numPrivatelogs * L2_GAS_PER_PRIVATE_LOG;
|
|
810
810
|
|
|
811
811
|
const numContractClassLogs = arrayNonEmptyLength(data.contractClassLogsHashes, log => log.isEmpty());
|
|
812
|
-
// Every contract class log emits its contract address as
|
|
812
|
+
// Every contract class log emits its length and contract address as additional fields
|
|
813
813
|
meteredDAFields += data.contractClassLogsHashes.reduce(
|
|
814
|
-
(acc, log) => (!log.isEmpty() ? acc + log.logHash.length +
|
|
814
|
+
(acc, log) => (!log.isEmpty() ? acc + log.logHash.length + 2 : acc),
|
|
815
815
|
0,
|
|
816
816
|
);
|
|
817
817
|
meteredL2Gas += numContractClassLogs * L2_GAS_PER_CONTRACT_CLASS_LOG;
|