@aztec/pxe 0.0.1-commit.2d9cb6034 → 0.0.1-commit.2e20a94
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/bin/check_oracle_version.js +4 -4
- package/dest/config/index.d.ts +1 -1
- package/dest/config/index.d.ts.map +1 -1
- package/dest/config/index.js +7 -14
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +4 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +5 -1
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts +28 -0
- package/dest/contract_function_simulator/ephemeral_array_service.d.ts.map +1 -0
- package/dest/contract_function_simulator/ephemeral_array_service.js +78 -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/interfaces.d.ts +13 -2
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/legacy_oracle_mappings.js +10 -1
- package/dest/contract_function_simulator/oracle/oracle.d.ts +13 -2
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +98 -3
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +3 -2
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +26 -10
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +97 -24
- package/dest/contract_function_simulator/pick_notes.d.ts +1 -1
- package/dest/contract_function_simulator/pick_notes.d.ts.map +1 -1
- package/dest/contract_function_simulator/pick_notes.js +9 -2
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.d.ts.map +1 -1
- package/dest/contract_function_simulator/proxied_contract_data_source.js +3 -0
- package/dest/contract_sync/contract_sync_service.d.ts +1 -1
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -1
- package/dest/contract_sync/contract_sync_service.js +35 -23
- package/dest/entrypoints/client/bundle/utils.d.ts +2 -2
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +2 -2
- package/dest/entrypoints/client/lazy/utils.d.ts +2 -2
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +2 -2
- package/dest/entrypoints/pxe_creation_options.d.ts +3 -1
- package/dest/entrypoints/pxe_creation_options.d.ts.map +1 -1
- package/dest/entrypoints/pxe_creation_options.js +3 -1
- package/dest/entrypoints/server/index.d.ts +2 -2
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +1 -1
- package/dest/entrypoints/server/utils.d.ts +2 -2
- package/dest/entrypoints/server/utils.d.ts.map +1 -1
- package/dest/entrypoints/server/utils.js +2 -2
- package/dest/events/private_event_filter_validator.d.ts +3 -2
- package/dest/events/private_event_filter_validator.d.ts.map +1 -1
- package/dest/events/private_event_filter_validator.js +15 -0
- package/dest/logs/log_service.d.ts +6 -6
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +8 -20
- package/dest/oracle_version.d.ts +4 -3
- package/dest/oracle_version.d.ts.map +1 -1
- package/dest/oracle_version.js +20 -10
- 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 +4 -7
- package/dest/pxe.d.ts +2 -1
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +8 -2
- package/dest/storage/private_event_store/stored_private_event.js +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +2 -2
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +1 -15
- package/package.json +16 -16
- package/src/bin/check_oracle_version.ts +4 -4
- package/src/config/index.ts +2 -8
- package/src/contract_function_simulator/contract_function_simulator.ts +6 -1
- package/src/contract_function_simulator/ephemeral_array_service.ts +110 -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/interfaces.ts +20 -1
- package/src/contract_function_simulator/oracle/legacy_oracle_mappings.ts +7 -1
- package/src/contract_function_simulator/oracle/oracle.ts +143 -3
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +2 -1
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +160 -51
- package/src/contract_function_simulator/pick_notes.ts +9 -2
- package/src/contract_function_simulator/proxied_contract_data_source.ts +8 -1
- package/src/contract_sync/contract_sync_service.ts +57 -51
- package/src/entrypoints/client/bundle/utils.ts +2 -3
- package/src/entrypoints/client/lazy/utils.ts +2 -3
- package/src/entrypoints/pxe_creation_options.ts +7 -0
- package/src/entrypoints/server/index.ts +1 -1
- package/src/entrypoints/server/utils.ts +2 -3
- package/src/events/private_event_filter_validator.ts +21 -1
- package/src/logs/log_service.ts +14 -50
- package/src/oracle_version.ts +20 -10
- package/src/private_kernel/private_kernel_execution_prover.ts +4 -9
- package/src/pxe.ts +10 -0
- package/src/storage/private_event_store/stored_private_event.ts +1 -1
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +2 -14
|
@@ -11,7 +11,8 @@ import { createContractLogger, logContractMessage, stripAztecnrLogPrefix } from
|
|
|
11
11
|
import { EventService } from '../../events/event_service.js';
|
|
12
12
|
import { LogService } from '../../logs/log_service.js';
|
|
13
13
|
import { NoteService } from '../../notes/note_service.js';
|
|
14
|
-
import {
|
|
14
|
+
import { ORACLE_VERSION_MAJOR } from '../../oracle_version.js';
|
|
15
|
+
import { EphemeralArrayService } from '../ephemeral_array_service.js';
|
|
15
16
|
import { EventValidationRequest } from '../noir-structs/event_validation_request.js';
|
|
16
17
|
import { LogRetrievalRequest } from '../noir-structs/log_retrieval_request.js';
|
|
17
18
|
import { LogRetrievalResponse } from '../noir-structs/log_retrieval_response.js';
|
|
@@ -27,6 +28,9 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
27
28
|
contractLogger;
|
|
28
29
|
aztecnrLogger;
|
|
29
30
|
offchainEffects = [];
|
|
31
|
+
ephemeralArrayService = new EphemeralArrayService();
|
|
32
|
+
// We store oracle version to be able to show a nice error message when an oracle handler is missing.
|
|
33
|
+
contractOracleVersion;
|
|
30
34
|
contractAddress;
|
|
31
35
|
authWitnesses;
|
|
32
36
|
capsules;
|
|
@@ -42,6 +46,7 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
42
46
|
privateEventStore;
|
|
43
47
|
messageContextService;
|
|
44
48
|
contractSyncService;
|
|
49
|
+
l2TipsStore;
|
|
45
50
|
jobId;
|
|
46
51
|
logger;
|
|
47
52
|
scopes;
|
|
@@ -61,11 +66,12 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
61
66
|
this.privateEventStore = args.privateEventStore;
|
|
62
67
|
this.messageContextService = args.messageContextService;
|
|
63
68
|
this.contractSyncService = args.contractSyncService;
|
|
69
|
+
this.l2TipsStore = args.l2TipsStore;
|
|
64
70
|
this.jobId = args.jobId;
|
|
65
71
|
this.logger = args.log ?? createLogger('simulator:client_view_context');
|
|
66
72
|
this.scopes = args.scopes;
|
|
67
73
|
}
|
|
68
|
-
assertCompatibleOracleVersion(
|
|
74
|
+
assertCompatibleOracleVersion(major, minor) {
|
|
69
75
|
// TODO(F-416): Remove this hack on v5 when protocol contracts are redeployed.
|
|
70
76
|
// Protocol contracts/canonical contracts shipped with committed bytecode that cannot be changed. Assert they use
|
|
71
77
|
// the expected pinned version or the current one. We want to allow for both the pinned and the current versions
|
|
@@ -73,16 +79,29 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
73
79
|
// pinned contracts (like e.g. next)
|
|
74
80
|
const LEGACY_ORACLE_VERSION = 12;
|
|
75
81
|
if (isProtocolContract(this.contractAddress)) {
|
|
76
|
-
if (
|
|
77
|
-
const hint =
|
|
78
|
-
throw new Error(`Incompatible private environment version: ${hint} See https://docs.aztec.network/errors/8 (expected oracle version ${LEGACY_ORACLE_VERSION} or ${
|
|
82
|
+
if (major !== LEGACY_ORACLE_VERSION && major !== ORACLE_VERSION_MAJOR) {
|
|
83
|
+
const hint = major > ORACLE_VERSION_MAJOR ? 'The contract was compiled with a newer version of Aztec.nr than your private environment supports. Upgrade your private environment to a compatible version.' : 'The contract was compiled with an older version of Aztec.nr than your private environment supports. Recompile the contract with a compatible version of Aztec.nr.';
|
|
84
|
+
throw new Error(`Incompatible private environment version: ${hint} See https://docs.aztec.network/errors/8 (expected oracle major version ${LEGACY_ORACLE_VERSION} or ${ORACLE_VERSION_MAJOR}, got ${major})`);
|
|
79
85
|
}
|
|
86
|
+
this.contractOracleVersion = {
|
|
87
|
+
major,
|
|
88
|
+
minor
|
|
89
|
+
};
|
|
80
90
|
return;
|
|
81
91
|
}
|
|
82
|
-
if (
|
|
83
|
-
const hint =
|
|
84
|
-
throw new Error(`Incompatible private environment version: ${hint} See https://docs.aztec.network/errors/8 (expected oracle version ${
|
|
92
|
+
if (major !== ORACLE_VERSION_MAJOR) {
|
|
93
|
+
const hint = major > ORACLE_VERSION_MAJOR ? 'The contract was compiled with a newer version of Aztec.nr than your private environment supports. Upgrade your private environment to a compatible version.' : 'The contract was compiled with an older version of Aztec.nr than your private environment supports. Recompile the contract with a compatible version of Aztec.nr.';
|
|
94
|
+
throw new Error(`Incompatible private environment version: ${hint} See https://docs.aztec.network/errors/8 (expected oracle major version ${ORACLE_VERSION_MAJOR}, got ${major})`);
|
|
85
95
|
}
|
|
96
|
+
// Major matches - store both major and minor for later diagnostics (e.g. when an oracle is not found)
|
|
97
|
+
this.contractOracleVersion = {
|
|
98
|
+
major,
|
|
99
|
+
minor
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
// Prefixed with "nonOracleFunction" as it is not used as an oracle handler.
|
|
103
|
+
nonOracleFunctionGetContractOracleVersion() {
|
|
104
|
+
return this.contractOracleVersion;
|
|
86
105
|
}
|
|
87
106
|
getRandomField() {
|
|
88
107
|
return Fr.random();
|
|
@@ -330,28 +349,46 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
330
349
|
const logger = kind == 'aztecnr' ? await this.#getAztecnrLogger() : await this.#getContractLogger();
|
|
331
350
|
logContractMessage(logger, LogLevels[level], strippedMessage, fields);
|
|
332
351
|
}
|
|
352
|
+
// Deprecated, only kept for backwards compatibility until Alpha v5 rolls out.
|
|
333
353
|
async getPendingTaggedLogs(pendingTaggedLogArrayBaseSlot, scope) {
|
|
334
|
-
const logService =
|
|
335
|
-
await logService.fetchTaggedLogs(this.contractAddress,
|
|
354
|
+
const logService = this.#createLogService();
|
|
355
|
+
const logs = await logService.fetchTaggedLogs(this.contractAddress, scope);
|
|
356
|
+
await this.capsuleService.appendToCapsuleArray(this.contractAddress, pendingTaggedLogArrayBaseSlot, logs.map((log)=>log.toFields()), this.jobId, scope);
|
|
357
|
+
}
|
|
358
|
+
/** Fetches pending tagged logs into a freshly allocated ephemeral array and returns its base slot. */ async getPendingTaggedLogsV2(scope) {
|
|
359
|
+
const logService = this.#createLogService();
|
|
360
|
+
const logs = await logService.fetchTaggedLogs(this.contractAddress, scope);
|
|
361
|
+
return this.ephemeralArrayService.newArray(logs.map((log)=>log.toFields()));
|
|
362
|
+
}
|
|
363
|
+
#createLogService() {
|
|
364
|
+
return new LogService(this.aztecNode, this.anchorBlockHeader, this.l2TipsStore, this.keyStore, this.recipientTaggingStore, this.senderAddressBookStore, this.addressStore, this.jobId, this.logger.getBindings());
|
|
336
365
|
}
|
|
337
366
|
/**
|
|
338
|
-
*
|
|
339
|
-
* `enqueue_event_for_validation`, inserting them into the note database and event store respectively, making them
|
|
340
|
-
* queryable via `get_notes` and `getPrivateEvents`.
|
|
367
|
+
* Legacy: validates note/event requests stored in capsule arrays.
|
|
341
368
|
*
|
|
342
|
-
*
|
|
343
|
-
* @param contractAddress - The address of the contract that the logs are tagged for.
|
|
344
|
-
* @param noteValidationRequestsArrayBaseSlot - The base slot of capsule array containing note validation requests.
|
|
345
|
-
* @param eventValidationRequestsArrayBaseSlot - The base slot of capsule array containing event validation requests.
|
|
369
|
+
* Deprecated, only kept for backwards compatibility until Alpha v5 rolls out.
|
|
346
370
|
*/ async validateAndStoreEnqueuedNotesAndEvents(contractAddress, noteValidationRequestsArrayBaseSlot, eventValidationRequestsArrayBaseSlot, maxNotePackedLen, maxEventSerializedLen, scope) {
|
|
347
371
|
// TODO(#10727): allow other contracts to store notes
|
|
348
372
|
if (!this.contractAddress.equals(contractAddress)) {
|
|
349
373
|
throw new Error(`Got a note validation request from ${contractAddress}, expected ${this.contractAddress}`);
|
|
350
374
|
}
|
|
351
|
-
// We read all note and event validation requests and process them all concurrently. This makes the process much
|
|
352
|
-
// faster as we don't need to wait for the network round-trip.
|
|
353
375
|
const noteValidationRequests = (await this.capsuleService.readCapsuleArray(contractAddress, noteValidationRequestsArrayBaseSlot, this.jobId, scope)).map((fields)=>NoteValidationRequest.fromFields(fields, maxNotePackedLen));
|
|
354
376
|
const eventValidationRequests = (await this.capsuleService.readCapsuleArray(contractAddress, eventValidationRequestsArrayBaseSlot, this.jobId, scope)).map((fields)=>EventValidationRequest.fromFields(fields, maxEventSerializedLen));
|
|
377
|
+
await this.#processValidationRequests(noteValidationRequests, eventValidationRequests, scope);
|
|
378
|
+
await this.capsuleService.setCapsuleArray(contractAddress, noteValidationRequestsArrayBaseSlot, [], this.jobId, scope);
|
|
379
|
+
await this.capsuleService.setCapsuleArray(contractAddress, eventValidationRequestsArrayBaseSlot, [], this.jobId, scope);
|
|
380
|
+
}
|
|
381
|
+
async validateAndStoreEnqueuedNotesAndEventsV2(noteValidationRequestsArrayBaseSlot, eventValidationRequestsArrayBaseSlot, maxNotePackedLen, maxEventSerializedLen, scope) {
|
|
382
|
+
const noteValidationRequests = this.ephemeralArrayService.readArrayAt(noteValidationRequestsArrayBaseSlot).map((fields)=>NoteValidationRequest.fromFields(fields, maxNotePackedLen));
|
|
383
|
+
const eventValidationRequests = this.ephemeralArrayService.readArrayAt(eventValidationRequestsArrayBaseSlot).map((fields)=>EventValidationRequest.fromFields(fields, maxEventSerializedLen));
|
|
384
|
+
await this.#processValidationRequests(noteValidationRequests, eventValidationRequests, scope);
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Dispatches note and event validation requests to the service layer.
|
|
388
|
+
*
|
|
389
|
+
* This function is an auxiliary to support legacy (capsule backed) and new (ephemeral array backed) versions of the
|
|
390
|
+
* `validateAndStoreEnqueuedNotesAndEvents` oracle.
|
|
391
|
+
*/ async #processValidationRequests(noteValidationRequests, eventValidationRequests, scope) {
|
|
355
392
|
const noteService = new NoteService(this.noteStore, this.aztecNode, this.anchorBlockHeader, this.jobId);
|
|
356
393
|
const noteStorePromises = noteValidationRequests.map((request)=>noteService.validateAndStoreNote(request.contractAddress, request.owner, request.storageSlot, request.randomness, request.noteNonce, request.content, request.noteHash, request.nullifier, request.txHash, scope));
|
|
357
394
|
const eventService = new EventService(this.anchorBlockHeader, this.aztecNode, this.privateEventStore, this.jobId);
|
|
@@ -360,9 +397,6 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
360
397
|
...noteStorePromises,
|
|
361
398
|
...eventStorePromises
|
|
362
399
|
]);
|
|
363
|
-
// Requests are cleared once we're done.
|
|
364
|
-
await this.capsuleService.setCapsuleArray(contractAddress, noteValidationRequestsArrayBaseSlot, [], this.jobId, scope);
|
|
365
|
-
await this.capsuleService.setCapsuleArray(contractAddress, eventValidationRequestsArrayBaseSlot, [], this.jobId, scope);
|
|
366
400
|
}
|
|
367
401
|
async getLogsByTag(contractAddress, logRetrievalRequestsArrayBaseSlot, logRetrievalResponsesArrayBaseSlot, scope) {
|
|
368
402
|
// TODO(#10727): allow other contracts to process partial notes
|
|
@@ -372,19 +406,26 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
372
406
|
// We read all log retrieval requests and process them all concurrently. This makes the process much faster as we
|
|
373
407
|
// don't need to wait for the network round-trip.
|
|
374
408
|
const logRetrievalRequests = (await this.capsuleService.readCapsuleArray(contractAddress, logRetrievalRequestsArrayBaseSlot, this.jobId, scope)).map(LogRetrievalRequest.fromFields);
|
|
375
|
-
const logService =
|
|
409
|
+
const logService = this.#createLogService();
|
|
376
410
|
const maybeLogRetrievalResponses = await logService.fetchLogsByTag(contractAddress, logRetrievalRequests);
|
|
377
411
|
// Requests are cleared once we're done.
|
|
378
412
|
await this.capsuleService.setCapsuleArray(contractAddress, logRetrievalRequestsArrayBaseSlot, [], this.jobId, scope);
|
|
379
413
|
// The responses are stored as Option<LogRetrievalResponse> in a second CapsuleArray.
|
|
380
414
|
await this.capsuleService.setCapsuleArray(contractAddress, logRetrievalResponsesArrayBaseSlot, maybeLogRetrievalResponses.map(LogRetrievalResponse.toSerializedOption), this.jobId, scope);
|
|
381
415
|
}
|
|
416
|
+
async getLogsByTagV2(requestArrayBaseSlot) {
|
|
417
|
+
const logRetrievalRequests = this.ephemeralArrayService.readArrayAt(requestArrayBaseSlot).map(LogRetrievalRequest.fromFields);
|
|
418
|
+
const logService = this.#createLogService();
|
|
419
|
+
const maybeLogRetrievalResponses = await logService.fetchLogsByTag(this.contractAddress, logRetrievalRequests);
|
|
420
|
+
return this.ephemeralArrayService.newArray(maybeLogRetrievalResponses.map(LogRetrievalResponse.toSerializedOption));
|
|
421
|
+
}
|
|
422
|
+
// Deprecated, only kept for backwards compatibility until Alpha v5 rolls out.
|
|
382
423
|
async getMessageContextsByTxHash(contractAddress, messageContextRequestsArrayBaseSlot, messageContextResponsesArrayBaseSlot, scope) {
|
|
383
424
|
try {
|
|
384
425
|
if (!this.contractAddress.equals(contractAddress)) {
|
|
385
426
|
throw new Error(`Got a message context request from ${contractAddress}, expected ${this.contractAddress}`);
|
|
386
427
|
}
|
|
387
|
-
// TODO(@mverzilli): this is a prime example of where using
|
|
428
|
+
// TODO(@mverzilli): this is a prime example of where using an ephemeral array would make much more sense, we don't
|
|
388
429
|
// need scopes here, we just need a bit of shared memory to cross boundaries between Noir and TS.
|
|
389
430
|
// At the same time, we don't want to allow any global scope access other than where backwards compatibility
|
|
390
431
|
// forces us to. Hence we need the scope here to be artificial.
|
|
@@ -402,6 +443,17 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
402
443
|
await this.capsuleService.setCapsuleArray(contractAddress, messageContextRequestsArrayBaseSlot, [], this.jobId, scope);
|
|
403
444
|
}
|
|
404
445
|
}
|
|
446
|
+
/** Reads tx hash requests from an ephemeral array, resolves their contexts, and returns the response slot. */ async getMessageContextsByTxHashV2(requestArrayBaseSlot) {
|
|
447
|
+
const requestFields = this.ephemeralArrayService.readArrayAt(requestArrayBaseSlot);
|
|
448
|
+
const txHashes = requestFields.map((fields, i)=>{
|
|
449
|
+
if (fields.length !== 1) {
|
|
450
|
+
throw new Error(`Malformed message context request at index ${i}: expected 1 field (tx hash), got ${fields.length}`);
|
|
451
|
+
}
|
|
452
|
+
return fields[0];
|
|
453
|
+
});
|
|
454
|
+
const maybeMessageContexts = await this.messageContextService.getMessageContextsByTxHash(txHashes, this.anchorBlockHeader.getBlockNumber());
|
|
455
|
+
return this.ephemeralArrayService.newArray(maybeMessageContexts.map(MessageContext.toSerializedOption));
|
|
456
|
+
}
|
|
405
457
|
setCapsule(contractAddress, slot, capsule, scope) {
|
|
406
458
|
if (!contractAddress.equals(this.contractAddress)) {
|
|
407
459
|
// TODO(#10727): instead of this check that this.contractAddress is allowed to access the external DB
|
|
@@ -459,6 +511,27 @@ import { MessageLoadOracleInputs } from './message_load_oracle_inputs.js';
|
|
|
459
511
|
const addressSecret = await computeAddressSecret(await recipientCompleteAddress.getPreaddress(), ivskM);
|
|
460
512
|
return deriveAppSiloedSharedSecret(addressSecret, ephPk, this.contractAddress);
|
|
461
513
|
}
|
|
514
|
+
pushEphemeral(slot, elements) {
|
|
515
|
+
return this.ephemeralArrayService.push(slot, elements);
|
|
516
|
+
}
|
|
517
|
+
popEphemeral(slot) {
|
|
518
|
+
return this.ephemeralArrayService.pop(slot);
|
|
519
|
+
}
|
|
520
|
+
getEphemeral(slot, index) {
|
|
521
|
+
return this.ephemeralArrayService.get(slot, index);
|
|
522
|
+
}
|
|
523
|
+
setEphemeral(slot, index, elements) {
|
|
524
|
+
this.ephemeralArrayService.set(slot, index, elements);
|
|
525
|
+
}
|
|
526
|
+
getEphemeralLen(slot) {
|
|
527
|
+
return this.ephemeralArrayService.len(slot);
|
|
528
|
+
}
|
|
529
|
+
removeEphemeral(slot, index) {
|
|
530
|
+
this.ephemeralArrayService.remove(slot, index);
|
|
531
|
+
}
|
|
532
|
+
clearEphemeral(slot) {
|
|
533
|
+
this.ephemeralArrayService.clear(slot);
|
|
534
|
+
}
|
|
462
535
|
emitOffchainEffect(data) {
|
|
463
536
|
this.offchainEffects.push({
|
|
464
537
|
data,
|
|
@@ -82,4 +82,4 @@ interface ContainsNote {
|
|
|
82
82
|
*/
|
|
83
83
|
export declare function pickNotes<T extends ContainsNote>(noteDatas: T[], { selects, sorts, limit, offset }: GetOptions): T[];
|
|
84
84
|
export {};
|
|
85
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
85
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGlja19ub3Rlcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9waWNrX25vdGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUNwRCxPQUFPLEVBQUUsVUFBVSxFQUFFLEtBQUssSUFBSSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFFM0QsTUFBTSxXQUFXLGdCQUFnQjtJQUMvQixLQUFLLEVBQUUsTUFBTSxDQUFDO0lBQ2QsTUFBTSxFQUFFLE1BQU0sQ0FBQztJQUNmLE1BQU0sRUFBRSxNQUFNLENBQUM7Q0FDaEI7QUFFRDs7R0FFRztBQUNILE1BQU0sV0FBVyxNQUFNO0lBQ3JCOztPQUVHO0lBQ0gsUUFBUSxFQUFFLGdCQUFnQixDQUFDO0lBQzNCOztPQUVHO0lBQ0gsS0FBSyxFQUFFLEVBQUUsQ0FBQztJQUNWOztPQUVHO0lBQ0gsVUFBVSxFQUFFLFVBQVUsQ0FBQztDQUN4QjtBQUVEOztHQUVHO0FBQ0gsb0JBQVksU0FBUztJQUNuQixJQUFJLElBQUk7SUFDUixJQUFJLElBQUk7SUFDUixHQUFHLElBQUk7Q0FDUjtBQUVEOztHQUVHO0FBQ0gsTUFBTSxXQUFXLElBQUk7SUFDbkI7O09BRUc7SUFDSCxRQUFRLEVBQUUsZ0JBQWdCLENBQUM7SUFDM0I7O09BRUc7SUFDSCxLQUFLLEVBQUUsU0FBUyxDQUFDO0NBQ2xCO0FBRUQ7O0dBRUc7QUFDSCxVQUFVLFVBQVU7SUFDbEI7OztPQUdHO0lBQ0gsT0FBTyxDQUFDLEVBQUUsTUFBTSxFQUFFLENBQUM7SUFDbkI7OztPQUdHO0lBQ0gsS0FBSyxDQUFDLEVBQUUsSUFBSSxFQUFFLENBQUM7SUFDZjs7O09BR0c7SUFDSCxLQUFLLENBQUMsRUFBRSxNQUFNLENBQUM7SUFDZjs7O09BR0c7SUFDSCxNQUFNLENBQUMsRUFBRSxNQUFNLENBQUM7Q0FDakI7QUFFRDs7R0FFRztBQUNILFVBQVUsWUFBWTtJQUNwQjs7T0FFRztJQUNILElBQUksRUFBRSxJQUFJLENBQUM7Q0FDWjtBQXFERDs7R0FFRztBQUNILHdCQUFnQixTQUFTLENBQUMsQ0FBQyxTQUFTLFlBQVksRUFDOUMsU0FBUyxFQUFFLENBQUMsRUFBRSxFQUNkLEVBQUUsT0FBWSxFQUFFLEtBQVUsRUFBRSxLQUFTLEVBQUUsTUFBVSxFQUFFLEVBQUUsVUFBVSxHQUM5RCxDQUFDLEVBQUUsQ0FJTCJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pick_notes.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/pick_notes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,KAAK,EAAE,EAAE,CAAC;IACV;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,IAAI,IAAI;IACR,IAAI,IAAI;IACR,GAAG,IAAI;CACR;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;GAEG;AACH,UAAU,UAAU;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,UAAU,YAAY;IACpB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ;
|
|
1
|
+
{"version":3,"file":"pick_notes.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/pick_notes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,KAAK,EAAE,EAAE,CAAC;IACV;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,IAAI,IAAI;IACR,IAAI,IAAI;IACR,GAAG,IAAI;CACR;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;GAEG;AACH,UAAU,UAAU;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,UAAU,YAAY;IACpB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ;AAqDD;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,YAAY,EAC9C,SAAS,EAAE,CAAC,EAAE,EACd,EAAE,OAAY,EAAE,KAAU,EAAE,KAAS,EAAE,MAAU,EAAE,EAAE,UAAU,GAC9D,CAAC,EAAE,CAIL"}
|
|
@@ -10,8 +10,15 @@ import { Comparator } from '@aztec/stdlib/note';
|
|
|
10
10
|
}({});
|
|
11
11
|
const selectPropertyFromPackedNoteContent = (noteData, selector)=>{
|
|
12
12
|
const noteValueBuffer = noteData[selector.index].toBuffer();
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
// Noir's PropertySelector counts offset from the LSB (last byte of the big-endian buffer),
|
|
14
|
+
// so offset=0,length=Fr.SIZE_IN_BYTES reads the entire field, and offset=0,length=1 reads the last byte.
|
|
15
|
+
const start = Fr.SIZE_IN_BYTES - selector.offset - selector.length;
|
|
16
|
+
const end = Fr.SIZE_IN_BYTES - selector.offset;
|
|
17
|
+
const noteValue = noteValueBuffer.subarray(start, end);
|
|
18
|
+
// Left-pad to Fr.SIZE_IN_BYTES so Fr.fromBuffer interprets the value correctly.
|
|
19
|
+
const padded = Buffer.alloc(Fr.SIZE_IN_BYTES);
|
|
20
|
+
noteValue.copy(padded, Fr.SIZE_IN_BYTES - noteValue.length);
|
|
21
|
+
return Fr.fromBuffer(padded);
|
|
15
22
|
};
|
|
16
23
|
const selectNotes = (noteDatas, selects)=>noteDatas.filter((noteData)=>selects.every(({ selector, value, comparator })=>{
|
|
17
24
|
const noteValueFr = selectPropertyFromPackedNoteContent(noteData.note.items, selector);
|
|
@@ -3,4 +3,4 @@ import type { ContractStore } from '../storage/contract_store/contract_store.js'
|
|
|
3
3
|
export declare class ProxiedContractStoreFactory {
|
|
4
4
|
static create(contractStore: ContractStore, overrides?: ContractOverrides): ContractStore;
|
|
5
5
|
}
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJveGllZF9jb250cmFjdF9kYXRhX3NvdXJjZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnRyYWN0X2Z1bmN0aW9uX3NpbXVsYXRvci9wcm94aWVkX2NvbnRyYWN0X2RhdGFfc291cmNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFMUQsT0FBTyxLQUFLLEVBQUUsYUFBYSxFQUFFLE1BQU0sNkNBQTZDLENBQUM7QUFPakYscUJBQWEsMkJBQTJCO0lBQ3RDLE1BQU0sQ0FBQyxNQUFNLENBQUMsYUFBYSxFQUFFLGFBQWEsRUFBRSxTQUFTLENBQUMsRUFBRSxpQkFBaUIsaUJBNEV4RTtDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxied_contract_data_source.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/proxied_contract_data_source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAOjF,qBAAa,2BAA2B;IACtC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"proxied_contract_data_source.d.ts","sourceRoot":"","sources":["../../src/contract_function_simulator/proxied_contract_data_source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAOjF,qBAAa,2BAA2B;IACtC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,iBAAiB,iBA4ExE;CACF"}
|
|
@@ -23,6 +23,7 @@ import { FunctionSelector } from '@aztec/stdlib/abi';
|
|
|
23
23
|
}
|
|
24
24
|
instance.currentContractClassId = realInstance.currentContractClassId;
|
|
25
25
|
instance.originalContractClassId = realInstance.originalContractClassId;
|
|
26
|
+
instance.initializationHash = realInstance.initializationHash;
|
|
26
27
|
return instance;
|
|
27
28
|
} else {
|
|
28
29
|
return target.getContractInstance(address);
|
|
@@ -42,6 +43,7 @@ import { FunctionSelector } from '@aztec/stdlib/abi';
|
|
|
42
43
|
return fn;
|
|
43
44
|
}
|
|
44
45
|
}
|
|
46
|
+
throw new Error(`Function with selector ${selector} not found in stub artifact for overridden contract at ${contractAddress}. The stub does not implement this function.`);
|
|
45
47
|
} else {
|
|
46
48
|
return target.getFunctionArtifact(contractAddress, selector);
|
|
47
49
|
}
|
|
@@ -60,6 +62,7 @@ import { FunctionSelector } from '@aztec/stdlib/abi';
|
|
|
60
62
|
return fn;
|
|
61
63
|
}
|
|
62
64
|
}
|
|
65
|
+
throw new Error(`Function with selector ${selector} not found in stub artifact for overridden contract at ${contractAddress}. The stub does not implement this function.`);
|
|
63
66
|
} else {
|
|
64
67
|
return target.getFunctionArtifactWithDebugMetadata(contractAddress, selector);
|
|
65
68
|
}
|
|
@@ -41,4 +41,4 @@ export declare class ContractSyncService implements StagedStore {
|
|
|
41
41
|
commit(jobId: string): Promise<void>;
|
|
42
42
|
discardStaged(jobId: string): Promise<void>;
|
|
43
43
|
}
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3Rfc3luY19zZXJ2aWNlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udHJhY3Rfc3luYy9jb250cmFjdF9zeW5jX3NlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFcEQsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLGdCQUFnQixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDeEUsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDaEUsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDakUsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFcEQsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sdUNBQXVDLENBQUM7QUFDekUsT0FBTyxLQUFLLEVBQUUsYUFBYSxFQUFFLE1BQU0sNkNBQTZDLENBQUM7QUFDakYsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0scUNBQXFDLENBQUM7QUFNckU7Ozs7O0dBS0c7QUFDSCxxQkFBYSxtQkFBb0IsWUFBVyxXQUFXOztJQWlCbkQsT0FBTyxDQUFDLFNBQVM7SUFDakIsT0FBTyxDQUFDLGFBQWE7SUFDckIsT0FBTyxDQUFDLFNBQVM7SUFDakIsT0FBTyxDQUFDLEdBQUc7SUFuQmIsUUFBUSxDQUFDLFNBQVMsbUJBQW1CO0lBS3JDLE9BQU8sQ0FBQyxlQUFlLENBQXlDO0lBR2hFLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBdUM7SUFPL0QsWUFDVSxTQUFTLEVBQUUsU0FBUyxFQUNwQixhQUFhLEVBQUUsYUFBYSxFQUM1QixTQUFTLEVBQUUsU0FBUyxFQUNwQixHQUFHLEVBQUUsTUFBTSxFQUNqQjtJQUVKLDRFQUE0RTtJQUM1RSxtQkFBbUIsQ0FBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLFNBQVMsRUFBRSxHQUFHLENBQUMsTUFBTSxDQUFDLEdBQUcsSUFBSSxDQUUvRDtJQUVEOzs7Ozs7OztPQVFHO0lBQ0csb0JBQW9CLENBQ3hCLGVBQWUsRUFBRSxZQUFZLEVBQzdCLHlCQUF5QixFQUFFLGdCQUFnQixHQUFHLElBQUksRUFDbEQsZUFBZSxFQUFFLENBQUMsSUFBSSxFQUFFLFlBQVksRUFBRSxNQUFNLEVBQUUsWUFBWSxFQUFFLEtBQUssT0FBTyxDQUFDLEdBQUcsQ0FBQyxFQUM3RSxpQkFBaUIsRUFBRSxXQUFXLEVBQzlCLEtBQUssRUFBRSxNQUFNLEVBQ2IsTUFBTSxFQUFFLFlBQVksRUFBRSxHQUNyQixPQUFPLENBQUMsSUFBSSxDQUFDLENBd0JmO0lBRUQsb0VBQW9FO0lBQ3BFLDJCQUEyQixDQUFDLGVBQWUsRUFBRSxZQUFZLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxHQUFHLElBQUksQ0FLdkY7SUFFRCxnRkFBZ0Y7SUFDaEYsSUFBSSxJQUFJLElBQUksQ0FHWDtJQUVELE1BQU0sQ0FBQyxLQUFLLEVBQUUsTUFBTSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FJbkM7SUFFRCxhQUFhLENBQUMsS0FBSyxFQUFFLE1BQU0sR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLENBTTFDO0NBc0RGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_sync_service.d.ts","sourceRoot":"","sources":["../../src/contract_sync/contract_sync_service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"contract_sync_service.d.ts","sourceRoot":"","sources":["../../src/contract_sync/contract_sync_service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAMrE;;;;;GAKG;AACH,qBAAa,mBAAoB,YAAW,WAAW;;IAiBnD,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,GAAG;IAnBb,QAAQ,CAAC,SAAS,mBAAmB;IAKrC,OAAO,CAAC,eAAe,CAAyC;IAGhE,OAAO,CAAC,gBAAgB,CAAuC;IAO/D,YACU,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACjB;IAEJ,4EAA4E;IAC5E,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAE/D;IAED;;;;;;;;OAQG;IACG,oBAAoB,CACxB,eAAe,EAAE,YAAY,EAC7B,yBAAyB,EAAE,gBAAgB,GAAG,IAAI,EAClD,eAAe,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAC7E,iBAAiB,EAAE,WAAW,EAC9B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,YAAY,EAAE,GACrB,OAAO,CAAC,IAAI,CAAC,CAwBf;IAED,oEAAoE;IACpE,2BAA2B,CAAC,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAKvF;IAED,gFAAgF;IAChF,IAAI,IAAI,IAAI,CAGX;IAED,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAInC;IAED,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM1C;CAsDF"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Semaphore } from '@aztec/foundation/queue';
|
|
1
2
|
import { syncState, verifyCurrentClassId } from './helpers.js';
|
|
3
|
+
/** Maximum number of scope syncs running concurrently across the PXE. */ const MAX_CONCURRENT_SCOPE_SYNCS = 5;
|
|
2
4
|
/**
|
|
3
5
|
* Service for syncing the private state of contracts and verifying that the PXE holds the current class artifact.
|
|
4
6
|
* It uses a cache to avoid redundant sync operations - the cache is wiped when the anchor block changes.
|
|
@@ -16,6 +18,10 @@ import { syncState, verifyCurrentClassId } from './helpers.js';
|
|
|
16
18
|
syncedContracts;
|
|
17
19
|
// Per-job excluded contract addresses - these contracts should not be synced.
|
|
18
20
|
excludedFromSync;
|
|
21
|
+
// Bounds the number of scope syncs running concurrently. Scopes beyond this limit queue here. Sized to trade off
|
|
22
|
+
// parallelism on non-ACIR work (node RPC, note store reads) against memory pressure from concurrent circuit
|
|
23
|
+
// execution.
|
|
24
|
+
#syncSlot;
|
|
19
25
|
constructor(aztecNode, contractStore, noteStore, log){
|
|
20
26
|
this.aztecNode = aztecNode;
|
|
21
27
|
this.contractStore = contractStore;
|
|
@@ -24,6 +30,7 @@ import { syncState, verifyCurrentClassId } from './helpers.js';
|
|
|
24
30
|
this.storeName = 'contract_sync';
|
|
25
31
|
this.syncedContracts = new Map();
|
|
26
32
|
this.excludedFromSync = new Map();
|
|
33
|
+
this.#syncSlot = new Semaphore(MAX_CONCURRENT_SCOPE_SYNCS);
|
|
27
34
|
}
|
|
28
35
|
/** Sets contracts that should be skipped during sync for a specific job. */ setExcludedFromSync(jobId, addresses) {
|
|
29
36
|
this.excludedFromSync.set(jobId, addresses);
|
|
@@ -40,7 +47,7 @@ import { syncState, verifyCurrentClassId } from './helpers.js';
|
|
|
40
47
|
if (this.#shouldSkipSync(jobId, contractAddress)) {
|
|
41
48
|
return;
|
|
42
49
|
}
|
|
43
|
-
this.#startSyncIfNeeded(contractAddress, scopes, (
|
|
50
|
+
this.#startSyncIfNeeded(contractAddress, scopes, ()=>verifyCurrentClassId(contractAddress, this.aztecNode, this.contractStore, anchorBlockHeader), (scope)=>syncState(contractAddress, this.contractStore, functionToInvokeAfterSync, utilityExecutor, this.noteStore, this.aztecNode, anchorBlockHeader, jobId, scope));
|
|
44
51
|
await this.#awaitSync(contractAddress, scopes);
|
|
45
52
|
}
|
|
46
53
|
/** Clears sync cache entries for the given scopes of a contract. */ invalidateContractForScopes(contractAddress, scopes) {
|
|
@@ -49,20 +56,6 @@ import { syncState, verifyCurrentClassId } from './helpers.js';
|
|
|
49
56
|
}
|
|
50
57
|
scopes.forEach((scope)=>this.syncedContracts.delete(toKey(contractAddress, scope)));
|
|
51
58
|
}
|
|
52
|
-
async #syncContract(contractAddress, functionToInvokeAfterSync, utilityExecutor, anchorBlockHeader, jobId, scopes) {
|
|
53
|
-
this.log.debug(`Syncing contract ${contractAddress}`);
|
|
54
|
-
await Promise.all([
|
|
55
|
-
// Call sync_state sequentially for each scope address — each invocation synchronizes one account's private
|
|
56
|
-
// state using scoped capsule arrays.
|
|
57
|
-
(async ()=>{
|
|
58
|
-
for (const scope of scopes){
|
|
59
|
-
await syncState(contractAddress, this.contractStore, functionToInvokeAfterSync, utilityExecutor, this.noteStore, this.aztecNode, anchorBlockHeader, jobId, scope);
|
|
60
|
-
}
|
|
61
|
-
})(),
|
|
62
|
-
verifyCurrentClassId(contractAddress, this.aztecNode, this.contractStore, anchorBlockHeader)
|
|
63
|
-
]);
|
|
64
|
-
this.log.debug(`Contract ${contractAddress} synced`);
|
|
65
|
-
}
|
|
66
59
|
/** Clears sync cache. Called by BlockSynchronizer when anchor block changes. */ wipe() {
|
|
67
60
|
this.log.debug(`Wiping contract sync cache (${this.syncedContracts.size} entries)`);
|
|
68
61
|
this.syncedContracts.clear();
|
|
@@ -82,17 +75,36 @@ import { syncState, verifyCurrentClassId } from './helpers.js';
|
|
|
82
75
|
/** Returns true if sync should be skipped for this contract */ #shouldSkipSync(jobId, contractAddress) {
|
|
83
76
|
return !!this.excludedFromSync.get(jobId)?.has(contractAddress.toString());
|
|
84
77
|
}
|
|
85
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* If there are unsynced scopes, starts one sync per scope (bounded by #syncSlot) and stores each promise in the
|
|
80
|
+
* cache with per-scope error cleanup. The verifyFn runs once for the whole fan-out and is awaited by every new
|
|
81
|
+
* scope's promise, matching the pre-parallelization invariant that a cache-miss batch re-verifies the class id.
|
|
82
|
+
*/ #startSyncIfNeeded(contractAddress, scopes, verifyFn, syncScopeFn) {
|
|
86
83
|
const scopesToSync = scopes.filter((scope)=>!this.syncedContracts.has(toKey(contractAddress, scope)));
|
|
87
|
-
|
|
88
|
-
if (keys.length === 0) {
|
|
84
|
+
if (scopesToSync.length === 0) {
|
|
89
85
|
return;
|
|
90
86
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
this.log.debug(`Syncing contract ${contractAddress} for ${scopesToSync.length} scope(s)`);
|
|
88
|
+
const verifyPromise = verifyFn();
|
|
89
|
+
for (const scope of scopesToSync){
|
|
90
|
+
const key = toKey(contractAddress, scope);
|
|
91
|
+
const promise = Promise.all([
|
|
92
|
+
verifyPromise,
|
|
93
|
+
this.#runBounded(()=>syncScopeFn(scope))
|
|
94
|
+
]).then(()=>{}).catch((err)=>{
|
|
95
|
+
this.syncedContracts.delete(key);
|
|
96
|
+
throw err;
|
|
97
|
+
});
|
|
98
|
+
this.syncedContracts.set(key, promise);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/** Runs fn while holding a slot in #syncSlot, bounding total concurrent scope syncs. */ async #runBounded(fn) {
|
|
102
|
+
await this.#syncSlot.acquire();
|
|
103
|
+
try {
|
|
104
|
+
return await fn();
|
|
105
|
+
} finally{
|
|
106
|
+
this.#syncSlot.release();
|
|
107
|
+
}
|
|
96
108
|
}
|
|
97
109
|
/** Collects all relevant scope promises (including in-flight ones from concurrent calls) and awaits them. */ async #awaitSync(contractAddress, scopes) {
|
|
98
110
|
const promises = scopes.map((scope)=>this.syncedContracts.get(toKey(contractAddress, scope))).filter((p)=>p !== undefined);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
2
2
|
import type { PXEConfig } from '../../../config/index.js';
|
|
3
3
|
import { PXE } from '../../../pxe.js';
|
|
4
|
-
import type
|
|
4
|
+
import { type PXECreationOptions } from '../../pxe_creation_options.js';
|
|
5
5
|
/**
|
|
6
6
|
* Create and start an PXE instance with the given AztecNode.
|
|
7
7
|
* If no keyStore or database is provided, it will use KeyStore and MemoryDB as default values.
|
|
@@ -13,4 +13,4 @@ import type { PXECreationOptions } from '../../pxe_creation_options.js';
|
|
|
13
13
|
* @returns A Promise that resolves to the started PXE instance.
|
|
14
14
|
*/
|
|
15
15
|
export declare function createPXE(aztecNode: AztecNode, config: PXEConfig, options?: PXECreationOptions): Promise<PXE>;
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9jbGllbnQvYnVuZGxlL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUtBLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRWpFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzFELE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUV0QyxPQUFPLEVBQUUsS0FBSyxrQkFBa0IsRUFBeUIsTUFBTSwrQkFBK0IsQ0FBQztBQUUvRjs7Ozs7Ozs7O0dBU0c7QUFDSCx3QkFBc0IsU0FBUyxDQUM3QixTQUFTLEVBQUUsU0FBUyxFQUNwQixNQUFNLEVBQUUsU0FBUyxFQUNqQixPQUFPLEdBQUUsa0JBQW9DLGdCQXNDOUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/bundle/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/bundle/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,KAAK,kBAAkB,EAAyB,MAAM,+BAA+B,CAAC;AAE/F;;;;;;;;;GASG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,kBAAoC,gBAsC9C"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BBPrivateKernelProver } from '@aztec/bb-prover/client';
|
|
2
1
|
import { BBBundlePrivateKernelProver } from '@aztec/bb-prover/client/bundle';
|
|
3
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
3
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
@@ -6,6 +5,7 @@ import { BundledProtocolContractsProvider } from '@aztec/protocol-contracts/prov
|
|
|
6
5
|
import { WASMSimulator } from '@aztec/simulator/client';
|
|
7
6
|
import { PXE } from '../../../pxe.js';
|
|
8
7
|
import { PXE_DATA_SCHEMA_VERSION } from '../../../storage/metadata.js';
|
|
8
|
+
import { isPrivateKernelProver } from '../../pxe_creation_options.js';
|
|
9
9
|
/**
|
|
10
10
|
* Create and start an PXE instance with the given AztecNode.
|
|
11
11
|
* If no keyStore or database is provided, it will use KeyStore and MemoryDB as default values.
|
|
@@ -34,7 +34,7 @@ import { PXE_DATA_SCHEMA_VERSION } from '../../../storage/metadata.js';
|
|
|
34
34
|
actor
|
|
35
35
|
});
|
|
36
36
|
let prover;
|
|
37
|
-
if (options.proverOrOptions
|
|
37
|
+
if (isPrivateKernelProver(options.proverOrOptions)) {
|
|
38
38
|
prover = options.proverOrOptions;
|
|
39
39
|
} else {
|
|
40
40
|
prover = new BBBundlePrivateKernelProver(simulator, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
2
2
|
import type { PXEConfig } from '../../../config/index.js';
|
|
3
3
|
import { PXE } from '../../../pxe.js';
|
|
4
|
-
import type
|
|
4
|
+
import { type PXECreationOptions } from '../../pxe_creation_options.js';
|
|
5
5
|
/**
|
|
6
6
|
* Create and start an PXE instance with the given AztecNode.
|
|
7
7
|
* Returns a Promise that resolves to the started PXE instance.
|
|
@@ -12,4 +12,4 @@ import type { PXECreationOptions } from '../../pxe_creation_options.js';
|
|
|
12
12
|
* @returns A Promise that resolves to the started PXE instance.
|
|
13
13
|
*/
|
|
14
14
|
export declare function createPXE(aztecNode: AztecNode, config: PXEConfig, options?: PXECreationOptions): Promise<PXE>;
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9jbGllbnQvbGF6eS91dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLQSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUVqRSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFdEMsT0FBTyxFQUFFLEtBQUssa0JBQWtCLEVBQXlCLE1BQU0sK0JBQStCLENBQUM7QUFFL0Y7Ozs7Ozs7O0dBUUc7QUFDSCx3QkFBc0IsU0FBUyxDQUM3QixTQUFTLEVBQUUsU0FBUyxFQUNwQixNQUFNLEVBQUUsU0FBUyxFQUNqQixPQUFPLEdBQUUsa0JBQW9DLGdCQXVDOUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/lazy/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/entrypoints/client/lazy/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,KAAK,kBAAkB,EAAyB,MAAM,+BAA+B,CAAC;AAE/F;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,kBAAoC,gBAuC9C"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BBPrivateKernelProver } from '@aztec/bb-prover/client';
|
|
2
1
|
import { BBLazyPrivateKernelProver } from '@aztec/bb-prover/client/lazy';
|
|
3
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
4
3
|
import { createStore } from '@aztec/kv-store/indexeddb';
|
|
@@ -6,6 +5,7 @@ import { LazyProtocolContractsProvider } from '@aztec/protocol-contracts/provide
|
|
|
6
5
|
import { WASMSimulator } from '@aztec/simulator/client';
|
|
7
6
|
import { PXE } from '../../../pxe.js';
|
|
8
7
|
import { PXE_DATA_SCHEMA_VERSION } from '../../../storage/metadata.js';
|
|
8
|
+
import { isPrivateKernelProver } from '../../pxe_creation_options.js';
|
|
9
9
|
/**
|
|
10
10
|
* Create and start an PXE instance with the given AztecNode.
|
|
11
11
|
* Returns a Promise that resolves to the started PXE instance.
|
|
@@ -33,7 +33,7 @@ import { PXE_DATA_SCHEMA_VERSION } from '../../../storage/metadata.js';
|
|
|
33
33
|
actor
|
|
34
34
|
});
|
|
35
35
|
let prover;
|
|
36
|
-
if (options.proverOrOptions
|
|
36
|
+
if (isPrivateKernelProver(options.proverOrOptions)) {
|
|
37
37
|
prover = options.proverOrOptions;
|
|
38
38
|
} else {
|
|
39
39
|
prover = new BBLazyPrivateKernelProver(simulator, {
|
|
@@ -15,4 +15,6 @@ export type PXECreationOptions = {
|
|
|
15
15
|
store?: AztecAsyncKVStore;
|
|
16
16
|
simulator?: CircuitSimulator;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
/** Checks if the given value implements the PrivateKernelProver interface via duck-typing. */
|
|
19
|
+
export declare function isPrivateKernelProver(value: unknown): value is PrivateKernelProver;
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHhlX2NyZWF0aW9uX29wdGlvbnMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbnRyeXBvaW50cy9weGVfY3JlYXRpb25fb3B0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSw0QkFBNEIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzVFLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ3BELE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDekQsT0FBTyxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUNoRSxPQUFPLEtBQUssRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRTNFLE1BQU0sTUFBTSxrQkFBa0IsR0FBRztJQUMvQixPQUFPLENBQUMsRUFBRTtRQUFFLEtBQUssQ0FBQyxFQUFFLE1BQU0sQ0FBQztRQUFDLEdBQUcsQ0FBQyxFQUFFLE1BQU0sQ0FBQztRQUFDLE1BQU0sQ0FBQyxFQUFFLE1BQU0sQ0FBQTtLQUFFLENBQUM7SUFDNUQsd0VBQXdFO0lBQ3hFLGdCQUFnQixDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQzFCLGVBQWUsQ0FBQyxFQUFFLG1CQUFtQixHQUFHLDRCQUE0QixDQUFDO0lBQ3JFLEtBQUssQ0FBQyxFQUFFLGlCQUFpQixDQUFDO0lBQzFCLFNBQVMsQ0FBQyxFQUFFLGdCQUFnQixDQUFDO0NBQzlCLENBQUM7QUFFRiw4RkFBOEY7QUFDOUYsd0JBQWdCLHFCQUFxQixDQUFDLEtBQUssRUFBRSxPQUFPLEdBQUcsS0FBSyxJQUFJLG1CQUFtQixDQUlsRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pxe_creation_options.d.ts","sourceRoot":"","sources":["../../src/entrypoints/pxe_creation_options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,mBAAmB,GAAG,4BAA4B,CAAC;IACrE,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B,CAAC"}
|
|
1
|
+
{"version":3,"file":"pxe_creation_options.d.ts","sourceRoot":"","sources":["../../src/entrypoints/pxe_creation_options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,mBAAmB,GAAG,4BAA4B,CAAC;IACrE,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF,8FAA8F;AAC9F,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAIlF"}
|
|
@@ -5,8 +5,8 @@ export * from '../../error_enriching.js';
|
|
|
5
5
|
export * from '../../storage/index.js';
|
|
6
6
|
export * from './utils.js';
|
|
7
7
|
export { NoteService } from '../../notes/note_service.js';
|
|
8
|
-
export {
|
|
8
|
+
export { ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR } from '../../oracle_version.js';
|
|
9
9
|
export { type PXECreationOptions } from '../pxe_creation_options.js';
|
|
10
10
|
export { JobCoordinator } from '../../job_coordinator/job_coordinator.js';
|
|
11
11
|
export { ContractSyncService } from '../../contract_sync/contract_sync_service.js';
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9zZXJ2ZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsMEJBQTBCLENBQUM7QUFDekMsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLFlBQVksQ0FBQztBQUMzQixPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDMUQsT0FBTyxFQUFFLG9CQUFvQixFQUFFLG9CQUFvQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDckYsT0FBTyxFQUFFLEtBQUssa0JBQWtCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUNyRSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sMENBQTBDLENBQUM7QUFDMUUsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sOENBQThDLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC"}
|
|
@@ -5,6 +5,6 @@ export * from '../../error_enriching.js';
|
|
|
5
5
|
export * from '../../storage/index.js';
|
|
6
6
|
export * from './utils.js';
|
|
7
7
|
export { NoteService } from '../../notes/note_service.js';
|
|
8
|
-
export {
|
|
8
|
+
export { ORACLE_VERSION_MAJOR, ORACLE_VERSION_MINOR } from '../../oracle_version.js';
|
|
9
9
|
export { JobCoordinator } from '../../job_coordinator/job_coordinator.js';
|
|
10
10
|
export { ContractSyncService } from '../../contract_sync/contract_sync_service.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
2
2
|
import type { PXEConfig } from '../../config/index.js';
|
|
3
3
|
import { PXE } from '../../pxe.js';
|
|
4
|
-
import type
|
|
4
|
+
import { type PXECreationOptions } from '../pxe_creation_options.js';
|
|
5
5
|
type PXEConfigWithoutDefaults = Omit<PXEConfig, 'l1Contracts' | 'l1ChainId' | 'l2BlockBatchSize' | 'rollupVersion'>;
|
|
6
6
|
export declare function createPXE(aztecNode: AztecNode, config: PXEConfigWithoutDefaults, options?: PXECreationOptions): Promise<PXE>;
|
|
7
7
|
export {};
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9lbnRyeXBvaW50cy9zZXJ2ZXIvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBTUEsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFFakUsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDdkQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUVuQyxPQUFPLEVBQUUsS0FBSyxrQkFBa0IsRUFBeUIsTUFBTSw0QkFBNEIsQ0FBQztBQUU1RixLQUFLLHdCQUF3QixHQUFHLElBQUksQ0FBQyxTQUFTLEVBQUUsYUFBYSxHQUFHLFdBQVcsR0FBRyxrQkFBa0IsR0FBRyxlQUFlLENBQUMsQ0FBQztBQUVwSCx3QkFBc0IsU0FBUyxDQUM3QixTQUFTLEVBQUUsU0FBUyxFQUNwQixNQUFNLEVBQUUsd0JBQXdCLEVBQ2hDLE9BQU8sR0FBRSxrQkFBb0MsZ0JBbUQ5QyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/server/utils.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,KAAK,kBAAkB,EAAyB,MAAM,4BAA4B,CAAC;AAE5F,KAAK,wBAAwB,GAAG,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,WAAW,GAAG,kBAAkB,GAAG,eAAe,CAAC,CAAC;AAEpH,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,wBAAwB,EAChC,OAAO,GAAE,kBAAoC,gBAmD9C"}
|