@aztec/pxe 0.0.1-commit.27d773e65 → 0.0.1-commit.2c85e299c
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/index.d.ts +2 -2
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.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 +132 -89
- 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 +28 -28
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +36 -34
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +42 -41
- package/dest/oracle_version.d.ts +2 -2
- package/dest/oracle_version.js +3 -3
- package/dest/pxe.d.ts +3 -2
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +8 -5
- package/package.json +16 -16
- package/src/config/index.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 +135 -107
- package/src/contract_function_simulator/oracle/private_execution.ts +1 -1
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +28 -28
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +43 -50
- package/src/oracle_version.ts +3 -3
- package/src/pxe.ts +6 -3
|
@@ -38,7 +38,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
38
38
|
capsuleStore;
|
|
39
39
|
privateEventStore;
|
|
40
40
|
jobId;
|
|
41
|
-
|
|
41
|
+
logger;
|
|
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.logger = args.log ?? createLogger('simulator:client_view_context');
|
|
59
59
|
this.scopes = args.scopes;
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
assertCompatibleOracleVersion(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
|
+
getRandomField() {
|
|
67
67
|
return Fr.random();
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
getUtilityContext() {
|
|
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 getKeyValidationRequest(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
|
+
*/ getNoteHashMembershipWitness(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
|
+
*/ getBlockHashMembershipWitness(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
|
+
*/ getNullifierMembershipWitness(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
|
+
*/ getLowNullifierMembershipWitness(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
|
+
*/ getPublicDataWitness(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 getBlockHeader(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 tryGetPublicKeysAndPartialAddress(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,10 +177,7 @@ 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
|
-
*/
|
|
174
|
-
return this.getContractInstance(address);
|
|
175
|
-
}
|
|
176
|
-
async getContractInstance(address) {
|
|
180
|
+
*/ async getContractInstance(address) {
|
|
177
181
|
const instance = await this.contractStore.getContractInstance(address);
|
|
178
182
|
if (!instance) {
|
|
179
183
|
throw new Error(`No contract instance found for address ${address.toString()}`);
|
|
@@ -185,7 +189,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
185
189
|
* for this transaction first, and falls back to the local database if not found.
|
|
186
190
|
* @param messageHash - Hash of the message to authenticate.
|
|
187
191
|
* @returns Authentication witness for the requested message hash.
|
|
188
|
-
*/
|
|
192
|
+
*/ getAuthWitness(messageHash) {
|
|
189
193
|
return Promise.resolve(this.authWitnesses.find((w)=>w.requestHash.equals(messageHash))?.witness);
|
|
190
194
|
}
|
|
191
195
|
/**
|
|
@@ -209,7 +213,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
209
213
|
* @param offset - The starting index for pagination.
|
|
210
214
|
* @param status - The status of notes to fetch.
|
|
211
215
|
* @returns Array of note data.
|
|
212
|
-
*/ async
|
|
216
|
+
*/ async getNotes(owner, storageSlot, numSelects, selectByIndexes, selectByOffsets, selectByLengths, selectValues, selectComparators, sortByIndexes, sortByOffsets, sortByLengths, sortOrder, limit, offset, status) {
|
|
213
217
|
const noteService = new NoteService(this.noteStore, this.aztecNode, this.anchorBlockHeader, this.jobId);
|
|
214
218
|
const dbNotes = await noteService.getNotes(this.contractAddress, owner, storageSlot, status, this.scopes);
|
|
215
219
|
return pickNotes(dbNotes, {
|
|
@@ -238,7 +242,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
238
242
|
* Check if a nullifier exists in the nullifier tree.
|
|
239
243
|
* @param innerNullifier - The inner nullifier.
|
|
240
244
|
* @returns A boolean indicating whether the nullifier exists in the tree or not.
|
|
241
|
-
*/ async
|
|
245
|
+
*/ async checkNullifierExists(innerNullifier) {
|
|
242
246
|
const [nullifier, anchorBlockHash] = await Promise.all([
|
|
243
247
|
siloNullifier(this.contractAddress, innerNullifier),
|
|
244
248
|
this.anchorBlockHeader.hash()
|
|
@@ -255,7 +259,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
255
259
|
* @param secret - Secret used to compute a nullifier.
|
|
256
260
|
* @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
|
|
257
261
|
* @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
|
|
258
|
-
*/ async
|
|
262
|
+
*/ async getL1ToL2MembershipWitness(contractAddress, messageHash, secret) {
|
|
259
263
|
const [messageIndex, siblingPath] = await getNonNullifiedL1ToL2MessageWitness(this.aztecNode, contractAddress, messageHash, secret);
|
|
260
264
|
return new MessageLoadOracleInputs(messageIndex, siblingPath);
|
|
261
265
|
}
|
|
@@ -265,10 +269,10 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
265
269
|
* @param contractAddress - The address to read storage from.
|
|
266
270
|
* @param startStorageSlot - The starting storage slot.
|
|
267
271
|
* @param numberOfElements - Number of elements to read from the starting storage slot.
|
|
268
|
-
*/ async
|
|
272
|
+
*/ async storageRead(blockHash, contractAddress, startStorageSlot, numberOfElements) {
|
|
269
273
|
const slots = Array(numberOfElements).fill(0).map((_, i)=>new Fr(startStorageSlot.value + BigInt(i)));
|
|
270
274
|
const values = await Promise.all(slots.map((storageSlot)=>this.aztecNode.getPublicStorageAt(blockHash, contractAddress, storageSlot)));
|
|
271
|
-
this.
|
|
275
|
+
this.logger.debug(`Oracle storage read: slots=[${slots.map((slot)=>slot.toString()).join(', ')}] address=${contractAddress.toString()} values=[${values.join(', ')}]`);
|
|
272
276
|
return values;
|
|
273
277
|
}
|
|
274
278
|
/**
|
|
@@ -283,15 +287,15 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
283
287
|
}
|
|
284
288
|
return this.contractLogger;
|
|
285
289
|
}
|
|
286
|
-
async
|
|
290
|
+
async log(level, message, fields) {
|
|
287
291
|
if (!LogLevels[level]) {
|
|
288
292
|
throw new Error(`Invalid log level: ${level}`);
|
|
289
293
|
}
|
|
290
294
|
const logger = await this.#getContractLogger();
|
|
291
295
|
logContractMessage(logger, LogLevels[level], message, fields);
|
|
292
296
|
}
|
|
293
|
-
async
|
|
294
|
-
const logService = new LogService(this.aztecNode, this.anchorBlockHeader, this.keyStore, this.capsuleStore, this.recipientTaggingStore, this.senderAddressBookStore, this.addressStore, this.jobId, this.
|
|
297
|
+
async fetchTaggedLogs(pendingTaggedLogArrayBaseSlot) {
|
|
298
|
+
const logService = new LogService(this.aztecNode, this.anchorBlockHeader, this.keyStore, this.capsuleStore, this.recipientTaggingStore, this.senderAddressBookStore, this.addressStore, this.jobId, this.logger.getBindings());
|
|
295
299
|
await logService.fetchTaggedLogs(this.contractAddress, pendingTaggedLogArrayBaseSlot, this.scopes);
|
|
296
300
|
}
|
|
297
301
|
/**
|
|
@@ -303,7 +307,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
303
307
|
* @param contractAddress - The address of the contract that the logs are tagged for.
|
|
304
308
|
* @param noteValidationRequestsArrayBaseSlot - The base slot of capsule array containing note validation requests.
|
|
305
309
|
* @param eventValidationRequestsArrayBaseSlot - The base slot of capsule array containing event validation requests.
|
|
306
|
-
*/ async
|
|
310
|
+
*/ async validateAndStoreEnqueuedNotesAndEvents(contractAddress, noteValidationRequestsArrayBaseSlot, eventValidationRequestsArrayBaseSlot) {
|
|
307
311
|
// TODO(#10727): allow other contracts to store notes
|
|
308
312
|
if (!this.contractAddress.equals(contractAddress)) {
|
|
309
313
|
throw new Error(`Got a note validation request from ${contractAddress}, expected ${this.contractAddress}`);
|
|
@@ -324,7 +328,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
324
328
|
await this.capsuleStore.setCapsuleArray(contractAddress, noteValidationRequestsArrayBaseSlot, [], this.jobId);
|
|
325
329
|
await this.capsuleStore.setCapsuleArray(contractAddress, eventValidationRequestsArrayBaseSlot, [], this.jobId);
|
|
326
330
|
}
|
|
327
|
-
async
|
|
331
|
+
async bulkRetrieveLogs(contractAddress, logRetrievalRequestsArrayBaseSlot, logRetrievalResponsesArrayBaseSlot) {
|
|
328
332
|
// TODO(#10727): allow other contracts to process partial notes
|
|
329
333
|
if (!this.contractAddress.equals(contractAddress)) {
|
|
330
334
|
throw new Error(`Got a note validation request from ${contractAddress}, expected ${this.contractAddress}`);
|
|
@@ -332,14 +336,14 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
332
336
|
// We read all log retrieval requests and process them all concurrently. This makes the process much faster as we
|
|
333
337
|
// don't need to wait for the network round-trip.
|
|
334
338
|
const logRetrievalRequests = (await this.capsuleStore.readCapsuleArray(contractAddress, logRetrievalRequestsArrayBaseSlot, this.jobId)).map(LogRetrievalRequest.fromFields);
|
|
335
|
-
const logService = new LogService(this.aztecNode, this.anchorBlockHeader, this.keyStore, this.capsuleStore, this.recipientTaggingStore, this.senderAddressBookStore, this.addressStore, this.jobId, this.
|
|
339
|
+
const logService = new LogService(this.aztecNode, this.anchorBlockHeader, this.keyStore, this.capsuleStore, this.recipientTaggingStore, this.senderAddressBookStore, this.addressStore, this.jobId, this.logger.getBindings());
|
|
336
340
|
const maybeLogRetrievalResponses = await logService.bulkRetrieveLogs(logRetrievalRequests);
|
|
337
341
|
// Requests are cleared once we're done.
|
|
338
342
|
await this.capsuleStore.setCapsuleArray(contractAddress, logRetrievalRequestsArrayBaseSlot, [], this.jobId);
|
|
339
343
|
// The responses are stored as Option<LogRetrievalResponse> in a second CapsuleArray.
|
|
340
344
|
await this.capsuleStore.setCapsuleArray(contractAddress, logRetrievalResponsesArrayBaseSlot, maybeLogRetrievalResponses.map(LogRetrievalResponse.toSerializedOption), this.jobId);
|
|
341
345
|
}
|
|
342
|
-
|
|
346
|
+
storeCapsule(contractAddress, slot, capsule) {
|
|
343
347
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
344
348
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
345
349
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
@@ -347,7 +351,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
347
351
|
this.capsuleStore.storeCapsule(this.contractAddress, slot, capsule, this.jobId);
|
|
348
352
|
return Promise.resolve();
|
|
349
353
|
}
|
|
350
|
-
async
|
|
354
|
+
async loadCapsule(contractAddress, slot) {
|
|
351
355
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
352
356
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
353
357
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
@@ -355,7 +359,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
355
359
|
return(// TODO(#12425): On the following line, the pertinent capsule gets overshadowed by the transient one. Tackle this.
|
|
356
360
|
this.capsules.find((c)=>c.contractAddress.equals(contractAddress) && c.storageSlot.equals(slot))?.data ?? await this.capsuleStore.loadCapsule(this.contractAddress, slot, this.jobId));
|
|
357
361
|
}
|
|
358
|
-
|
|
362
|
+
deleteCapsule(contractAddress, slot) {
|
|
359
363
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
360
364
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
361
365
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
@@ -363,7 +367,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
363
367
|
this.capsuleStore.deleteCapsule(this.contractAddress, slot, this.jobId);
|
|
364
368
|
return Promise.resolve();
|
|
365
369
|
}
|
|
366
|
-
|
|
370
|
+
copyCapsule(contractAddress, srcSlot, dstSlot, numEntries) {
|
|
367
371
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
368
372
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
369
373
|
throw new Error(`Contract ${contractAddress} is not allowed to access ${this.contractAddress}'s PXE DB`);
|
|
@@ -371,7 +375,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
371
375
|
return this.capsuleStore.copyCapsule(this.contractAddress, srcSlot, dstSlot, numEntries, this.jobId);
|
|
372
376
|
}
|
|
373
377
|
// TODO(#11849): consider replacing this oracle with a pure Noir implementation of aes decryption.
|
|
374
|
-
|
|
378
|
+
aes128Decrypt(ciphertext, iv, symKey) {
|
|
375
379
|
const aes128 = new Aes128();
|
|
376
380
|
return aes128.decryptBufferCBC(ciphertext, iv, symKey);
|
|
377
381
|
}
|
|
@@ -380,10 +384,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
380
384
|
* @param address - The address to get the secret for.
|
|
381
385
|
* @param ephPk - The ephemeral public key to get the secret for.
|
|
382
386
|
* @returns The secret for the given address.
|
|
383
|
-
*/
|
|
384
|
-
return this.getSharedSecret(address, ephPk);
|
|
385
|
-
}
|
|
386
|
-
async getSharedSecret(address, ephPk) {
|
|
387
|
+
*/ async getSharedSecret(address, ephPk) {
|
|
387
388
|
// TODO(#12656): return an app-siloed secret
|
|
388
389
|
const recipientCompleteAddress = await this.getCompleteAddressOrFail(address);
|
|
389
390
|
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 = 14;
|
|
2
|
+
export declare const ORACLE_INTERFACE_HASH = "9fb918682455c164ce8dd3acb71c751e2b9b2fc48913604069c9ea885fa378ca";
|
|
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 `aztec_utl_assertCompatibleOracleVersion` 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 = 14;
|
|
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 = '9fb918682455c164ce8dd3acb71c751e2b9b2fc48913604069c9ea885fa378ca';
|
package/dest/pxe.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export type PXECreateArgs = {
|
|
|
70
70
|
export declare class PXE {
|
|
71
71
|
#private;
|
|
72
72
|
private node;
|
|
73
|
+
private db;
|
|
73
74
|
private blockStateSynchronizer;
|
|
74
75
|
private keyStore;
|
|
75
76
|
private contractStore;
|
|
@@ -243,8 +244,8 @@ export declare class PXE {
|
|
|
243
244
|
*/
|
|
244
245
|
getPrivateEvents(eventSelector: EventSelector, filter: PrivateEventFilter): Promise<PackedPrivateEvent[]>;
|
|
245
246
|
/**
|
|
246
|
-
* Stops the PXE's job queue.
|
|
247
|
+
* Stops the PXE's job queue and closes the backing store.
|
|
247
248
|
*/
|
|
248
249
|
stop(): Promise<void>;
|
|
249
250
|
}
|
|
250
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
251
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHhlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvcHhlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFakUsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sRUFBRSxLQUFLLE1BQU0sRUFBcUMsTUFBTSx1QkFBdUIsQ0FBQztBQUl2RixPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRXpELE9BQU8sRUFBRSxLQUFLLHlCQUF5QixFQUF5QixNQUFNLDJCQUEyQixDQUFDO0FBQ2xHLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDaEUsT0FBTyxFQUNMLEtBQUssZ0JBQWdCLEVBQ3JCLGFBQWEsRUFDYixZQUFZLEVBR2IsTUFBTSxtQkFBbUIsQ0FBQztBQUMzQixPQUFPLEtBQUssRUFBRSxXQUFXLEVBQ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AAC,CAkE1B;IAED;;;;;;;;;;;;;;;;;OAiBG;IACI,UAAU,CACf,SAAS,EAAE,kBAAkB,EAC7B,EAAE,cAAc,EAAE,gBAAwB,EAAE,kBAA0B,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,cAAc,GAC1G,OAAO,CAAC,kBAAkB,CAAC,CAoI7B;IAED;;;OAGG;IACI,cAAc,CACnB,IAAI,EAAE,YAAY,EAClB,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAE,kBAA6C,GAClE,OAAO,CAAC,sBAAsB,CAAC,CAwDjC;IAED;;;;;;;;;;;;OAYG;IACU,gBAAgB,CAC3B,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CA8B/B;IAED;;OAEG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAGjC;CACF"}
|
package/dest/pxe.js
CHANGED
|
@@ -36,6 +36,7 @@ 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;
|
|
39
40
|
blockStateSynchronizer;
|
|
40
41
|
keyStore;
|
|
41
42
|
contractStore;
|
|
@@ -56,8 +57,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
56
57
|
jobQueue;
|
|
57
58
|
jobCoordinator;
|
|
58
59
|
debug;
|
|
59
|
-
constructor(node, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
|
|
60
|
+
constructor(node, db, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
|
|
60
61
|
this.node = node;
|
|
62
|
+
this.db = db;
|
|
61
63
|
this.blockStateSynchronizer = blockStateSynchronizer;
|
|
62
64
|
this.keyStore = keyStore;
|
|
63
65
|
this.contractStore = contractStore;
|
|
@@ -115,7 +117,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
115
117
|
]);
|
|
116
118
|
const debugUtils = new PXEDebugUtils(contractSyncService, noteStore, synchronizer, anchorBlockStore);
|
|
117
119
|
const jobQueue = new SerialQueue();
|
|
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);
|
|
120
|
+
const pxe = new PXE(node, store, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debugUtils);
|
|
119
121
|
debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#executeUtility.bind(pxe));
|
|
120
122
|
pxe.jobQueue.start();
|
|
121
123
|
await pxe.#registerProtocolContracts();
|
|
@@ -768,8 +770,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
768
770
|
return this.privateEventStore.getPrivateEvents(eventSelector, sanitizedFilter);
|
|
769
771
|
}
|
|
770
772
|
/**
|
|
771
|
-
* Stops the PXE's job queue.
|
|
772
|
-
*/ stop() {
|
|
773
|
-
|
|
773
|
+
* Stops the PXE's job queue and closes the backing store.
|
|
774
|
+
*/ async stop() {
|
|
775
|
+
await this.jobQueue.end();
|
|
776
|
+
await this.db.close();
|
|
774
777
|
}
|
|
775
778
|
}
|
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.2c85e299c",
|
|
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.2c85e299c",
|
|
74
|
+
"@aztec/bb.js": "0.0.1-commit.2c85e299c",
|
|
75
|
+
"@aztec/builder": "0.0.1-commit.2c85e299c",
|
|
76
|
+
"@aztec/constants": "0.0.1-commit.2c85e299c",
|
|
77
|
+
"@aztec/ethereum": "0.0.1-commit.2c85e299c",
|
|
78
|
+
"@aztec/foundation": "0.0.1-commit.2c85e299c",
|
|
79
|
+
"@aztec/key-store": "0.0.1-commit.2c85e299c",
|
|
80
|
+
"@aztec/kv-store": "0.0.1-commit.2c85e299c",
|
|
81
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.2c85e299c",
|
|
82
|
+
"@aztec/noir-types": "0.0.1-commit.2c85e299c",
|
|
83
|
+
"@aztec/protocol-contracts": "0.0.1-commit.2c85e299c",
|
|
84
|
+
"@aztec/simulator": "0.0.1-commit.2c85e299c",
|
|
85
|
+
"@aztec/stdlib": "0.0.1-commit.2c85e299c",
|
|
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.2c85e299c",
|
|
95
|
+
"@aztec/noir-test-contracts.js": "0.0.1-commit.2c85e299c",
|
|
96
96
|
"@jest/globals": "^30.0.0",
|
|
97
97
|
"@types/jest": "^30.0.0",
|
|
98
98
|
"@types/lodash.omit": "^4.5.7",
|
package/src/config/index.ts
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
numberConfigHelper,
|
|
6
6
|
parseBooleanEnv,
|
|
7
7
|
} from '@aztec/foundation/config';
|
|
8
|
-
import { type DataStoreConfig, dataConfigMappings } from '@aztec/kv-store/config';
|
|
9
8
|
import { type ChainConfig, chainConfigMappings } from '@aztec/stdlib/config';
|
|
9
|
+
import { type DataStoreConfig, dataConfigMappings } from '@aztec/stdlib/kv-store';
|
|
10
10
|
|
|
11
11
|
export { getPackageInfo } from './package_info.js';
|
|
12
12
|
|
|
@@ -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.loadFromExecutionCache(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
|
|
812
|
+
// Every contract class log emits its contract address as an additional field
|
|
813
813
|
meteredDAFields += data.contractClassLogsHashes.reduce(
|
|
814
|
-
(acc, log) => (!log.isEmpty() ? acc + log.logHash.length +
|
|
814
|
+
(acc, log) => (!log.isEmpty() ? acc + log.logHash.length + 1 : acc),
|
|
815
815
|
0,
|
|
816
816
|
);
|
|
817
817
|
meteredL2Gas += numContractClassLogs * L2_GAS_PER_CONTRACT_CLASS_LOG;
|