@aztec/pxe 0.0.1-commit.d6f2b3f94 → 0.0.1-commit.dbf9cec
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/access_scopes.d.ts +9 -0
- package/dest/access_scopes.d.ts.map +1 -0
- package/dest/access_scopes.js +6 -0
- package/dest/config/package_info.js +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.d.ts +53 -29
- package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
- package/dest/contract_function_simulator/contract_function_simulator.js +172 -68
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +5 -5
- package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -1
- package/dest/contract_function_simulator/execution_tagging_index_cache.js +3 -3
- package/dest/contract_function_simulator/noir-structs/event_validation_request.js +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +2 -2
- package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
- package/dest/contract_function_simulator/noir-structs/note_validation_request.js +1 -1
- package/dest/contract_function_simulator/oracle/interfaces.d.ts +2 -2
- package/dest/contract_function_simulator/oracle/interfaces.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.d.ts +2 -2
- package/dest/contract_function_simulator/oracle/oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/oracle.js +2 -2
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +35 -36
- package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/private_execution_oracle.js +71 -26
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +30 -12
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
- package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +36 -36
- package/dest/contract_logging.d.ts +22 -0
- package/dest/contract_logging.d.ts.map +1 -0
- package/dest/contract_logging.js +23 -0
- package/dest/contract_sync/contract_sync_service.d.ts +4 -2
- package/dest/contract_sync/contract_sync_service.d.ts.map +1 -1
- package/dest/contract_sync/contract_sync_service.js +34 -19
- package/dest/contract_sync/helpers.d.ts +3 -2
- package/dest/contract_sync/helpers.d.ts.map +1 -1
- package/dest/contract_sync/helpers.js +3 -3
- package/dest/debug/pxe_debug_utils.d.ts +5 -4
- package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
- package/dest/debug/pxe_debug_utils.js +4 -4
- package/dest/entrypoints/client/bundle/index.d.ts +4 -1
- package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/index.js +3 -0
- package/dest/entrypoints/client/bundle/utils.d.ts +1 -1
- package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/bundle/utils.js +9 -1
- package/dest/entrypoints/client/lazy/index.d.ts +4 -1
- package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/index.js +3 -0
- package/dest/entrypoints/client/lazy/utils.d.ts +1 -1
- package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -1
- package/dest/entrypoints/client/lazy/utils.js +9 -1
- package/dest/entrypoints/server/index.d.ts +3 -1
- package/dest/entrypoints/server/index.d.ts.map +1 -1
- package/dest/entrypoints/server/index.js +2 -0
- package/dest/entrypoints/server/utils.js +9 -1
- package/dest/logs/log_service.d.ts +3 -2
- package/dest/logs/log_service.d.ts.map +1 -1
- package/dest/logs/log_service.js +9 -14
- package/dest/notes/note_service.d.ts +4 -3
- package/dest/notes/note_service.d.ts.map +1 -1
- package/dest/notes/note_service.js +3 -2
- package/dest/notes_filter.d.ts +25 -0
- package/dest/notes_filter.d.ts.map +1 -0
- package/dest/notes_filter.js +4 -0
- package/dest/oracle_version.d.ts +2 -2
- package/dest/oracle_version.js +2 -2
- package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts +4 -0
- package/dest/private_kernel/hints/compute_tx_expiration_timestamp.d.ts.map +1 -0
- package/dest/private_kernel/hints/{compute_tx_include_by_timestamp.js → compute_tx_expiration_timestamp.js} +12 -12
- package/dest/private_kernel/hints/index.d.ts +1 -1
- package/dest/private_kernel/hints/index.js +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +4 -3
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -1
- package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.js +129 -68
- package/dest/private_kernel/hints/test_utils.d.ts +122 -0
- package/dest/private_kernel/hints/test_utils.d.ts.map +1 -0
- package/dest/private_kernel/hints/test_utils.js +203 -0
- package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_execution_prover.js +19 -11
- package/dest/private_kernel/private_kernel_oracle.d.ts +6 -2
- package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
- package/dest/private_kernel/private_kernel_oracle.js +7 -3
- package/dest/pxe.d.ts +58 -23
- package/dest/pxe.d.ts.map +1 -1
- package/dest/pxe.js +65 -53
- package/dest/storage/contract_store/contract_store.d.ts +42 -15
- package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
- package/dest/storage/contract_store/contract_store.js +140 -64
- package/dest/storage/note_store/note_store.d.ts +3 -3
- package/dest/storage/note_store/note_store.d.ts.map +1 -1
- package/dest/storage/note_store/note_store.js +3 -4
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts +6 -6
- package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/sender_tagging_store.d.ts +5 -5
- package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
- package/dest/storage/tagging_store/sender_tagging_store.js +4 -4
- package/dest/tagging/get_all_logs_by_tags.d.ts +1 -1
- package/dest/tagging/get_all_logs_by_tags.d.ts.map +1 -1
- package/dest/tagging/get_all_logs_by_tags.js +17 -3
- package/dest/tagging/index.d.ts +2 -2
- package/dest/tagging/index.d.ts.map +1 -1
- package/dest/tagging/index.js +1 -1
- package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +4 -5
- 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 +7 -7
- package/dest/tagging/recipient_sync/utils/find_highest_indexes.js +2 -2
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +6 -7
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -1
- package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +12 -11
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +4 -8
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +3 -6
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +4 -7
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -1
- package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +14 -15
- package/package.json +16 -16
- package/src/access_scopes.ts +9 -0
- package/src/config/package_info.ts +1 -1
- package/src/contract_function_simulator/contract_function_simulator.ts +320 -128
- package/src/contract_function_simulator/execution_tagging_index_cache.ts +5 -5
- package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -1
- package/src/contract_function_simulator/noir-structs/note_validation_request.ts +1 -1
- package/src/contract_function_simulator/oracle/interfaces.ts +1 -1
- package/src/contract_function_simulator/oracle/oracle.ts +2 -2
- package/src/contract_function_simulator/oracle/private_execution_oracle.ts +95 -102
- package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +77 -33
- package/src/contract_logging.ts +39 -0
- package/src/contract_sync/contract_sync_service.ts +49 -26
- package/src/contract_sync/helpers.ts +7 -2
- package/src/debug/pxe_debug_utils.ts +11 -9
- package/src/entrypoints/client/bundle/index.ts +3 -0
- package/src/entrypoints/client/bundle/utils.ts +9 -1
- package/src/entrypoints/client/lazy/index.ts +3 -0
- package/src/entrypoints/client/lazy/utils.ts +9 -1
- package/src/entrypoints/server/index.ts +2 -0
- package/src/entrypoints/server/utils.ts +7 -7
- package/src/logs/log_service.ts +17 -24
- package/src/notes/note_service.ts +4 -3
- package/src/notes_filter.ts +26 -0
- package/src/oracle_version.ts +2 -2
- package/src/private_kernel/hints/{compute_tx_include_by_timestamp.ts → compute_tx_expiration_timestamp.ts} +13 -13
- package/src/private_kernel/hints/index.ts +1 -1
- package/src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts +164 -117
- package/src/private_kernel/hints/test_utils.ts +325 -0
- package/src/private_kernel/private_kernel_execution_prover.ts +19 -12
- package/src/private_kernel/private_kernel_oracle.ts +7 -7
- package/src/pxe.ts +132 -98
- package/src/storage/contract_store/contract_store.ts +170 -71
- package/src/storage/note_store/note_store.ts +8 -5
- package/src/storage/tagging_store/recipient_tagging_store.ts +9 -5
- package/src/storage/tagging_store/sender_tagging_store.ts +8 -8
- package/src/tagging/get_all_logs_by_tags.ts +28 -4
- package/src/tagging/index.ts +1 -1
- package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +7 -10
- package/src/tagging/recipient_sync/utils/find_highest_indexes.ts +2 -2
- package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +10 -15
- package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +4 -9
- package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +11 -20
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts +0 -4
- package/dest/private_kernel/hints/compute_tx_include_by_timestamp.d.ts.map +0 -1
package/dest/pxe.js
CHANGED
|
@@ -13,6 +13,7 @@ import { BlockSynchronizer } from './block_synchronizer/index.js';
|
|
|
13
13
|
import { BenchmarkedNodeFactory } from './contract_function_simulator/benchmarked_node.js';
|
|
14
14
|
import { ContractFunctionSimulator, generateSimulatedProvingResult } from './contract_function_simulator/contract_function_simulator.js';
|
|
15
15
|
import { ProxiedContractStoreFactory } from './contract_function_simulator/proxied_contract_data_source.js';
|
|
16
|
+
import { displayDebugLogs } from './contract_logging.js';
|
|
16
17
|
import { ContractSyncService } from './contract_sync/contract_sync_service.js';
|
|
17
18
|
import { readCurrentClassId } from './contract_sync/helpers.js';
|
|
18
19
|
import { PXEDebugUtils } from './debug/pxe_debug_utils.js';
|
|
@@ -84,11 +85,12 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
84
85
|
* can be contacted.
|
|
85
86
|
*
|
|
86
87
|
* @returns A promise that resolves PXE is ready to be used.
|
|
87
|
-
*/ static async create(node, store, proofCreator, simulator, protocolContractsProvider, config, loggerOrSuffix) {
|
|
88
|
+
*/ static async create({ node, store, proofCreator, simulator, protocolContractsProvider, config, loggerOrSuffix }) {
|
|
88
89
|
// Extract bindings from the logger, or use empty bindings if a string suffix is provided.
|
|
89
90
|
const bindings = loggerOrSuffix && typeof loggerOrSuffix !== 'string' ? loggerOrSuffix.getBindings() : undefined;
|
|
90
91
|
const log = !loggerOrSuffix || typeof loggerOrSuffix === 'string' ? createLogger(loggerOrSuffix ? `pxe:service:${loggerOrSuffix}` : `pxe:service`) : loggerOrSuffix;
|
|
91
|
-
const
|
|
92
|
+
const info = await node.getNodeInfo();
|
|
93
|
+
const proverEnabled = config.proverEnabled !== undefined ? config.proverEnabled : info.realProofs;
|
|
92
94
|
const addressStore = new AddressStore(store);
|
|
93
95
|
const privateEventStore = new PrivateEventStore(store);
|
|
94
96
|
const contractStore = new ContractStore(store);
|
|
@@ -114,17 +116,29 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
114
116
|
const debugUtils = new PXEDebugUtils(contractSyncService, noteStore, synchronizer, anchorBlockStore);
|
|
115
117
|
const jobQueue = new SerialQueue();
|
|
116
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);
|
|
117
|
-
debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#
|
|
119
|
+
debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#executeUtility.bind(pxe));
|
|
118
120
|
pxe.jobQueue.start();
|
|
119
121
|
await pxe.#registerProtocolContracts();
|
|
120
|
-
const info = await node.getNodeInfo();
|
|
121
122
|
log.info(`Started PXE connected to chain ${info.l1ChainId} version ${info.rollupVersion}`);
|
|
122
123
|
return pxe;
|
|
123
124
|
}
|
|
124
125
|
// Internal methods
|
|
125
126
|
#getSimulatorForTx(overrides) {
|
|
126
127
|
const proxyContractStore = ProxiedContractStoreFactory.create(this.contractStore, overrides?.contracts);
|
|
127
|
-
return new ContractFunctionSimulator(
|
|
128
|
+
return new ContractFunctionSimulator({
|
|
129
|
+
contractStore: proxyContractStore,
|
|
130
|
+
noteStore: this.noteStore,
|
|
131
|
+
keyStore: this.keyStore,
|
|
132
|
+
addressStore: this.addressStore,
|
|
133
|
+
aztecNode: BenchmarkedNodeFactory.create(this.node),
|
|
134
|
+
senderTaggingStore: this.senderTaggingStore,
|
|
135
|
+
recipientTaggingStore: this.recipientTaggingStore,
|
|
136
|
+
senderAddressBookStore: this.senderAddressBookStore,
|
|
137
|
+
capsuleStore: this.capsuleStore,
|
|
138
|
+
privateEventStore: this.privateEventStore,
|
|
139
|
+
simulator: this.simulator,
|
|
140
|
+
contractSyncService: this.contractSyncService
|
|
141
|
+
});
|
|
128
142
|
}
|
|
129
143
|
#contextualizeError(err, ...context) {
|
|
130
144
|
let contextStr = '';
|
|
@@ -167,8 +181,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
167
181
|
async #registerProtocolContracts() {
|
|
168
182
|
const registered = {};
|
|
169
183
|
for (const name of protocolContractNames){
|
|
170
|
-
const { address,
|
|
171
|
-
await this.contractStore.addContractArtifact(
|
|
184
|
+
const { address, instance, artifact } = await this.protocolContractsProvider.getProtocolContractArtifact(name);
|
|
185
|
+
await this.contractStore.addContractArtifact(artifact);
|
|
172
186
|
await this.contractStore.addContractInstance(instance);
|
|
173
187
|
registered[name] = address.toString();
|
|
174
188
|
}
|
|
@@ -180,10 +194,14 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
180
194
|
const { origin: contractAddress, functionSelector } = txRequest;
|
|
181
195
|
try {
|
|
182
196
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
183
|
-
await this.contractSyncService.ensureContractSynced(contractAddress, functionSelector, (privateSyncCall)=>this.#
|
|
184
|
-
const result = await contractFunctionSimulator.run(txRequest,
|
|
185
|
-
|
|
186
|
-
|
|
197
|
+
await this.contractSyncService.ensureContractSynced(contractAddress, functionSelector, (privateSyncCall, execScopes)=>this.#executeUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
|
|
198
|
+
const result = await contractFunctionSimulator.run(txRequest, {
|
|
199
|
+
contractAddress,
|
|
200
|
+
selector: functionSelector,
|
|
201
|
+
anchorBlockHeader,
|
|
202
|
+
scopes,
|
|
203
|
+
jobId
|
|
204
|
+
});
|
|
187
205
|
this.log.debug(`Private simulation completed for ${contractAddress.toString()}:${functionSelector}`);
|
|
188
206
|
return result;
|
|
189
207
|
} catch (err) {
|
|
@@ -194,15 +212,15 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
194
212
|
}
|
|
195
213
|
}
|
|
196
214
|
/**
|
|
197
|
-
*
|
|
215
|
+
* Execute a utility function call on the given contract.
|
|
198
216
|
* @param contractFunctionSimulator - The simulator to use for the function call.
|
|
199
217
|
* @param call - The function call to execute.
|
|
200
218
|
* @param authWitnesses - Authentication witnesses required for the function call.
|
|
201
219
|
* @param scopes - Optional array of account addresses whose notes can be accessed in this call. Defaults to all
|
|
202
220
|
* accounts if not specified.
|
|
203
221
|
* @param jobId - The job ID for staged writes.
|
|
204
|
-
* @returns The
|
|
205
|
-
*/ async #
|
|
222
|
+
* @returns The execution result containing the outputs of the utility function.
|
|
223
|
+
*/ async #executeUtility(contractFunctionSimulator, call, authWitnesses, scopes, jobId) {
|
|
206
224
|
try {
|
|
207
225
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
208
226
|
return contractFunctionSimulator.runUtility(call, authWitnesses ?? [], anchorBlockHeader, scopes, jobId);
|
|
@@ -354,8 +372,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
354
372
|
*
|
|
355
373
|
* @param artifact - The build artifact for the contract class.
|
|
356
374
|
*/ async registerContractClass(artifact) {
|
|
357
|
-
const
|
|
358
|
-
await this.contractStore.addContractArtifact(contractClassId, artifact);
|
|
375
|
+
const contractClassId = await this.contractStore.addContractArtifact(artifact);
|
|
359
376
|
this.log.info(`Added contract class ${artifact.name} with id ${contractClassId}`);
|
|
360
377
|
}
|
|
361
378
|
/**
|
|
@@ -371,15 +388,14 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
371
388
|
if (artifact) {
|
|
372
389
|
// If the user provides an artifact, validate it against the expected class id and register it
|
|
373
390
|
const contractClass = await getContractClassFromArtifact(artifact);
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
throw new Error(`Artifact does not match expected class id (computed ${contractClassId} but instance refers to ${instance.currentContractClassId})`);
|
|
391
|
+
if (!contractClass.id.equals(instance.currentContractClassId)) {
|
|
392
|
+
throw new Error(`Artifact does not match expected class id (computed ${contractClass.id} but instance refers to ${instance.currentContractClassId})`);
|
|
377
393
|
}
|
|
378
394
|
const computedAddress = await computeContractAddressFromInstance(instance);
|
|
379
395
|
if (!computedAddress.equals(instance.address)) {
|
|
380
396
|
throw new Error('Added a contract in which the address does not match the contract instance.');
|
|
381
397
|
}
|
|
382
|
-
await this.contractStore.addContractArtifact(
|
|
398
|
+
await this.contractStore.addContractArtifact(artifact, contractClass);
|
|
383
399
|
const publicFunctionSignatures = artifact.functions.filter((fn)=>fn.functionType === FunctionType.PUBLIC).map((fn)=>decodeFunctionSignature(fn.name, fn.parameters));
|
|
384
400
|
await this.node.registerContractFunctionSignatures(publicFunctionSignatures);
|
|
385
401
|
} else {
|
|
@@ -415,11 +431,13 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
415
431
|
if (!contractClass.id.equals(currentClassId)) {
|
|
416
432
|
throw new Error('Could not update contract to a class different from the current one.');
|
|
417
433
|
}
|
|
418
|
-
await this.contractStore.addContractArtifact(contractClass.id, artifact);
|
|
419
434
|
const publicFunctionSignatures = artifact.functions.filter((fn)=>fn.functionType === FunctionType.PUBLIC).map((fn)=>decodeFunctionSignature(fn.name, fn.parameters));
|
|
420
435
|
await this.node.registerContractFunctionSignatures(publicFunctionSignatures);
|
|
421
436
|
currentInstance.currentContractClassId = contractClass.id;
|
|
422
|
-
await
|
|
437
|
+
await Promise.all([
|
|
438
|
+
this.contractStore.addContractArtifact(artifact, contractClass),
|
|
439
|
+
this.contractStore.addContractInstance(currentInstance)
|
|
440
|
+
]);
|
|
423
441
|
this.log.info(`Updated contract ${artifact.name} at ${contractAddress.toString()} to class ${contractClass.id}`);
|
|
424
442
|
});
|
|
425
443
|
}
|
|
@@ -434,10 +452,11 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
434
452
|
* (where validators prove the public portion).
|
|
435
453
|
*
|
|
436
454
|
* @param txRequest - An authenticated tx request ready for proving
|
|
455
|
+
* @param scopes - Addresses whose private state and keys are accessible during private execution.
|
|
437
456
|
* @returns A result containing the proof and public inputs of the tail circuit.
|
|
438
457
|
* @throws If contract code not found, or public simulation reverts.
|
|
439
458
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
440
|
-
*/ proveTx(txRequest) {
|
|
459
|
+
*/ proveTx(txRequest, scopes) {
|
|
441
460
|
let privateExecutionResult;
|
|
442
461
|
// We disable proving concurrently mostly out of caution, since it accesses some of our stores. Proving is so
|
|
443
462
|
// computationally demanding that it'd be rare for someone to try to do it concurrently regardless.
|
|
@@ -448,7 +467,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
448
467
|
await this.blockStateSynchronizer.sync();
|
|
449
468
|
const syncTime = syncTimer.ms();
|
|
450
469
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
451
|
-
privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest,
|
|
470
|
+
privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes, jobId);
|
|
452
471
|
const { publicInputs, chonkProof, executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
|
|
453
472
|
simulate: false,
|
|
454
473
|
skipFeeEnforcement: false,
|
|
@@ -498,13 +517,10 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
498
517
|
}
|
|
499
518
|
/**
|
|
500
519
|
* Profiles a transaction, reporting gate counts (unless disabled) and returns an execution trace.
|
|
501
|
-
*
|
|
502
|
-
* @param txRequest - An authenticated tx request ready for simulation
|
|
503
|
-
* @param msgSender - (Optional) The message sender to use for the simulation.
|
|
504
|
-
* @param skipTxValidation - (Optional) If false, this function throws if the transaction is unable to be included in a block at the current state.
|
|
520
|
+
* @param txRequest - An authenticated tx request ready for simulation.
|
|
505
521
|
* @returns A trace of the program execution with gate counts.
|
|
506
522
|
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
507
|
-
*/ profileTx(txRequest, profileMode, skipProofGeneration = true) {
|
|
523
|
+
*/ profileTx(txRequest, { profileMode, skipProofGeneration = true, scopes }) {
|
|
508
524
|
// We disable concurrent profiles for consistency with simulateTx.
|
|
509
525
|
return this.#putInJobQueue(async (jobId)=>{
|
|
510
526
|
const totalTimer = new Timer();
|
|
@@ -522,7 +538,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
522
538
|
await this.blockStateSynchronizer.sync();
|
|
523
539
|
const syncTime = syncTimer.ms();
|
|
524
540
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
525
|
-
const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest,
|
|
541
|
+
const privateExecutionResult = await this.#executePrivate(contractFunctionSimulator, txRequest, scopes, jobId);
|
|
526
542
|
const { executionSteps, timings: { proving } = {} } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
|
|
527
543
|
simulate: skipProofGeneration,
|
|
528
544
|
skipFeeEnforcement: false,
|
|
@@ -567,18 +583,13 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
567
583
|
* In that case, the transaction returned is only potentially ready to be sent to the network for execution.
|
|
568
584
|
*
|
|
569
585
|
*
|
|
570
|
-
* @param txRequest - An authenticated tx request ready for simulation
|
|
571
|
-
* @param simulatePublic - Whether to simulate the public part of the transaction.
|
|
572
|
-
* @param skipTxValidation - (Optional) If false, this function throws if the transaction is unable to be included in a block at the current state.
|
|
573
|
-
* @param skipFeeEnforcement - (Optional) If false, fees are enforced.
|
|
574
|
-
* @param overrides - (Optional) State overrides for the simulation, such as msgSender, contract instances and artifacts.
|
|
575
|
-
* @param scopes - (Optional) The accounts whose notes we can access in this call. Currently optional and will default to all.
|
|
586
|
+
* @param txRequest - An authenticated tx request ready for simulation.
|
|
576
587
|
* @returns A simulated transaction result object that includes public and private return values.
|
|
577
588
|
* @throws If the code for the functions executed in this transaction have not been made available via `addContracts`.
|
|
578
589
|
* Also throws if simulatePublic is true and public simulation reverts.
|
|
579
590
|
*
|
|
580
591
|
* TODO(#7456) Prevent msgSender being defined here for the first call
|
|
581
|
-
*/ simulateTx(txRequest, simulatePublic, skipTxValidation = false, skipFeeEnforcement = false, overrides, scopes) {
|
|
592
|
+
*/ simulateTx(txRequest, { simulatePublic, skipTxValidation = false, skipFeeEnforcement = false, overrides, scopes }) {
|
|
582
593
|
// We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
|
|
583
594
|
// to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
|
|
584
595
|
// delete the same read value, or reading values that another simulation is currently modifying).
|
|
@@ -613,7 +624,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
613
624
|
let publicInputs;
|
|
614
625
|
let executionSteps = [];
|
|
615
626
|
if (skipKernels) {
|
|
616
|
-
({ publicInputs, executionSteps } = await generateSimulatedProvingResult(privateExecutionResult, (addr, sel)=>this.contractStore.getDebugFunctionName(addr, sel)));
|
|
627
|
+
({ publicInputs, executionSteps } = await generateSimulatedProvingResult(privateExecutionResult, (addr, sel)=>this.contractStore.getDebugFunctionName(addr, sel), this.node));
|
|
617
628
|
} else {
|
|
618
629
|
// Kernel logic, plus proving of all private functions and kernels.
|
|
619
630
|
({ publicInputs, executionSteps } = await this.#prove(txRequest, this.proofCreator, privateExecutionResult, {
|
|
@@ -630,6 +641,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
630
641
|
const publicSimulationTimer = new Timer();
|
|
631
642
|
publicOutput = await this.#simulatePublicCalls(simulatedTx, skipFeeEnforcement);
|
|
632
643
|
publicSimulationTime = publicSimulationTimer.ms();
|
|
644
|
+
if (publicOutput?.debugLogs?.length) {
|
|
645
|
+
await displayDebugLogs(publicOutput.debugLogs, (addr)=>this.contractStore.getDebugContractName(addr));
|
|
646
|
+
}
|
|
633
647
|
}
|
|
634
648
|
let validationTime;
|
|
635
649
|
if (!skipTxValidation) {
|
|
@@ -640,7 +654,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
640
654
|
});
|
|
641
655
|
validationTime = validationTimer.ms();
|
|
642
656
|
if (validationResult.result === 'invalid') {
|
|
643
|
-
|
|
657
|
+
const reason = validationResult.reason.length > 0 ? ` Reason: ${validationResult.reason.join(', ')}` : '';
|
|
658
|
+
throw new Error(`The simulated transaction is unable to be added to state and is invalid.${reason}`);
|
|
644
659
|
}
|
|
645
660
|
}
|
|
646
661
|
const txHash = simulatedTx.getTxHash();
|
|
@@ -673,22 +688,19 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
673
688
|
nodeRPCCalls: simulatorStats.nodeRPCCalls
|
|
674
689
|
});
|
|
675
690
|
} catch (err) {
|
|
676
|
-
throw this.#contextualizeError(err, inspect(txRequest), `simulatePublic=${simulatePublic}`, `skipTxValidation=${skipTxValidation}`, `scopes=${scopes
|
|
691
|
+
throw this.#contextualizeError(err, inspect(txRequest), `simulatePublic=${simulatePublic}`, `skipTxValidation=${skipTxValidation}`, `scopes=${scopes === 'ALL_SCOPES' ? scopes : scopes.map((s)=>s.toString()).join(', ')}`);
|
|
677
692
|
}
|
|
678
693
|
});
|
|
679
694
|
}
|
|
680
695
|
/**
|
|
681
|
-
*
|
|
682
|
-
*
|
|
696
|
+
* Executes a contract utility function.
|
|
683
697
|
* @param call - The function call containing the function details, arguments, and target contract address.
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
*/ simulateUtility(call, authwits, scopes) {
|
|
689
|
-
// We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
|
|
698
|
+
*/ executeUtility(call, { authwits, scopes } = {
|
|
699
|
+
scopes: 'ALL_SCOPES'
|
|
700
|
+
}) {
|
|
701
|
+
// We disable concurrent executions since those might execute oracles which read and write to the PXE stores (e.g.
|
|
690
702
|
// to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
|
|
691
|
-
// delete the same read value, or reading values that another
|
|
703
|
+
// delete the same read value, or reading values that another execution is currently modifying).
|
|
692
704
|
return this.#putInJobQueue(async (jobId)=>{
|
|
693
705
|
try {
|
|
694
706
|
const totalTimer = new Timer();
|
|
@@ -698,8 +710,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
698
710
|
const functionTimer = new Timer();
|
|
699
711
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
700
712
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
701
|
-
await this.contractSyncService.ensureContractSynced(call.to, call.selector, (privateSyncCall)=>this.#
|
|
702
|
-
const executionResult = await this.#
|
|
713
|
+
await this.contractSyncService.ensureContractSynced(call.to, call.selector, (privateSyncCall, execScopes)=>this.#executeUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
|
|
714
|
+
const executionResult = await this.#executeUtility(contractFunctionSimulator, call, authwits ?? [], scopes, jobId);
|
|
703
715
|
const functionTime = functionTimer.ms();
|
|
704
716
|
const totalTime = totalTimer.ms();
|
|
705
717
|
const perFunction = [
|
|
@@ -725,7 +737,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
725
737
|
} catch (err) {
|
|
726
738
|
const { to, name, args } = call;
|
|
727
739
|
const stringifiedArgs = args.map((arg)=>arg.toString()).join(', ');
|
|
728
|
-
throw this.#contextualizeError(err, `
|
|
740
|
+
throw this.#contextualizeError(err, `executeUtility ${to}:${name}(${stringifiedArgs})`, `scopes=${scopes === 'ALL_SCOPES' ? scopes : scopes.map((s)=>s.toString()).join(', ')}`);
|
|
729
741
|
}
|
|
730
742
|
});
|
|
731
743
|
}
|
|
@@ -748,7 +760,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
|
|
|
748
760
|
const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
|
|
749
761
|
anchorBlockNumber = anchorBlockHeader.getBlockNumber();
|
|
750
762
|
const contractFunctionSimulator = this.#getSimulatorForTx();
|
|
751
|
-
await this.contractSyncService.ensureContractSynced(filter.contractAddress, null, async (privateSyncCall)=>await this.#
|
|
763
|
+
await this.contractSyncService.ensureContractSynced(filter.contractAddress, null, async (privateSyncCall, execScopes)=>await this.#executeUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, filter.scopes);
|
|
752
764
|
});
|
|
753
765
|
// anchorBlockNumber is set during the job and fixed to whatever it is after a block sync
|
|
754
766
|
const sanitizedFilter = new PrivateEventFilterValidator(anchorBlockNumber).validate(filter);
|
|
@@ -1,10 +1,37 @@
|
|
|
1
1
|
import type { FUNCTION_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
import { BufferReader } from '@aztec/foundation/serialize';
|
|
3
4
|
import type { MembershipWitness } from '@aztec/foundation/trees';
|
|
4
5
|
import type { AztecAsyncKVStore } from '@aztec/kv-store';
|
|
5
6
|
import { type ContractArtifact, type FunctionAbi, type FunctionArtifactWithContractName, FunctionCall, type FunctionDebugMetadata, FunctionSelector } from '@aztec/stdlib/abi';
|
|
6
7
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
|
-
import { type
|
|
8
|
+
import { type ContractClassIdPreimage, type ContractClassWithId, type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
9
|
+
/**
|
|
10
|
+
* All contract class data except the large packedBytecode.
|
|
11
|
+
* The expensive data from the ContractClass is precomputed and stored in this format to avoid redundant hashing.
|
|
12
|
+
* Since we have to store the artifacts anyway, the final ContractClass is reconstructed by combining this data
|
|
13
|
+
* with the packedBytecode obtained from the former. That way we can have quick class lookups without wasted storage.
|
|
14
|
+
*/
|
|
15
|
+
export declare class SerializableContractClassData {
|
|
16
|
+
readonly version: 1;
|
|
17
|
+
readonly id: Fr;
|
|
18
|
+
readonly artifactHash: Fr;
|
|
19
|
+
readonly privateFunctionsRoot: Fr;
|
|
20
|
+
readonly publicBytecodeCommitment: Fr;
|
|
21
|
+
readonly privateFunctions: {
|
|
22
|
+
selector: FunctionSelector;
|
|
23
|
+
vkHash: Fr;
|
|
24
|
+
}[];
|
|
25
|
+
constructor(data: ContractClassIdPreimage & {
|
|
26
|
+
id: Fr;
|
|
27
|
+
privateFunctions: {
|
|
28
|
+
selector: FunctionSelector;
|
|
29
|
+
vkHash: Fr;
|
|
30
|
+
}[];
|
|
31
|
+
});
|
|
32
|
+
toBuffer(): Buffer;
|
|
33
|
+
static fromBuffer(bufferOrReader: Buffer | BufferReader): SerializableContractClassData;
|
|
34
|
+
}
|
|
8
35
|
/**
|
|
9
36
|
* ContractStore serves as a data manager and retriever for Aztec.nr contracts.
|
|
10
37
|
* It provides methods to obtain contract addresses, function ABI, bytecode, and membership witnesses
|
|
@@ -15,19 +42,24 @@ import { type ContractClass, type ContractInstanceWithAddress } from '@aztec/std
|
|
|
15
42
|
export declare class ContractStore {
|
|
16
43
|
#private;
|
|
17
44
|
constructor(store: AztecAsyncKVStore);
|
|
18
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Registers a new contract artifact and its corresponding class data.
|
|
47
|
+
* IMPORTANT: This method does not verify that the provided artifact matches the class data or that the class id matches the artifact.
|
|
48
|
+
* It is the caller's responsibility to ensure the consistency and correctness of the provided data.
|
|
49
|
+
* This is done to avoid redundant, expensive contract class computations
|
|
50
|
+
*/
|
|
51
|
+
addContractArtifact(contract: ContractArtifact, contractClassWithIdAndPreimage?: ContractClassWithId & ContractClassIdPreimage): Promise<Fr>;
|
|
19
52
|
addContractInstance(contract: ContractInstanceWithAddress): Promise<void>;
|
|
20
53
|
getContractsAddresses(): Promise<AztecAddress[]>;
|
|
21
|
-
/** Returns a contract instance for a given address.
|
|
54
|
+
/** Returns a contract instance for a given address. */
|
|
22
55
|
getContractInstance(contractAddress: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
|
|
56
|
+
/** Returns the raw contract artifact for a given class id. */
|
|
23
57
|
getContractArtifact(contractClassId: Fr): Promise<ContractArtifact | undefined>;
|
|
24
|
-
/** Returns a contract class for a given class id.
|
|
25
|
-
|
|
58
|
+
/** Returns a contract class for a given class id. */
|
|
59
|
+
getContractClassWithPreimage(contractClassId: Fr): Promise<(ContractClassWithId & ContractClassIdPreimage) | undefined>;
|
|
26
60
|
getContract(address: AztecAddress): Promise<(ContractInstanceWithAddress & ContractArtifact) | undefined>;
|
|
27
61
|
/**
|
|
28
62
|
* Retrieves the artifact of a specified function within a given contract.
|
|
29
|
-
* The function is identified by its selector, which is a unique code generated from the function's signature.
|
|
30
|
-
* Throws an error if the contract address or function selector are invalid or not found.
|
|
31
63
|
*
|
|
32
64
|
* @param contractAddress - The AztecAddress representing the contract containing the function.
|
|
33
65
|
* @param selector - The function selector.
|
|
@@ -39,20 +71,15 @@ export declare class ContractStore {
|
|
|
39
71
|
getFunctionAbi(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionAbi | undefined>;
|
|
40
72
|
/**
|
|
41
73
|
* Retrieves the debug metadata of a specified function within a given contract.
|
|
42
|
-
* The function is identified by its selector, which is a unique code generated from the function's signature.
|
|
43
|
-
* Returns undefined if the debug metadata for the given function is not found.
|
|
44
|
-
* Throws if the contract has not been added to the database.
|
|
45
74
|
*
|
|
46
75
|
* @param contractAddress - The AztecAddress representing the contract containing the function.
|
|
47
76
|
* @param selector - The function selector.
|
|
48
|
-
* @returns The corresponding function's
|
|
77
|
+
* @returns The corresponding function's debug metadata, or undefined.
|
|
49
78
|
*/
|
|
50
79
|
getFunctionDebugMetadata(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionDebugMetadata | undefined>;
|
|
51
80
|
getPublicFunctionDebugMetadata(contractAddress: AztecAddress): Promise<FunctionDebugMetadata | undefined>;
|
|
52
81
|
/**
|
|
53
82
|
* Retrieve the function membership witness for the given contract class and function selector.
|
|
54
|
-
* The function membership witness represents a proof that the function belongs to the specified contract.
|
|
55
|
-
* Throws an error if the contract address or function selector is unknown.
|
|
56
83
|
*
|
|
57
84
|
* @param contractClassId - The id of the class.
|
|
58
85
|
* @param selector - The function selector.
|
|
@@ -63,4 +90,4 @@ export declare class ContractStore {
|
|
|
63
90
|
getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
|
|
64
91
|
getFunctionCall(functionName: string, args: any[], to: AztecAddress): Promise<FunctionCall>;
|
|
65
92
|
}
|
|
66
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
93
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3Rfc3RvcmUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdG9yYWdlL2NvbnRyYWN0X3N0b3JlL2NvbnRyYWN0X3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDN0QsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBRXBELE9BQU8sRUFBRSxZQUFZLEVBQWlDLE1BQU0sNkJBQTZCLENBQUM7QUFDMUYsT0FBTyxLQUFLLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUNqRSxPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBaUIsTUFBTSxpQkFBaUIsQ0FBQztBQUN4RSxPQUFPLEVBQ0wsS0FBSyxnQkFBZ0IsRUFDckIsS0FBSyxXQUFXLEVBRWhCLEtBQUssZ0NBQWdDLEVBQ3JDLFlBQVksRUFDWixLQUFLLHFCQUFxQixFQUMxQixnQkFBZ0IsRUFNakIsTUFBTSxtQkFBbUIsQ0FBQztBQUMzQixPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDM0QsT0FBTyxFQUNMLEtBQUssdUJBQXVCLEVBQzVCLEtBQUssbUJBQW1CLEVBQ3hCLEtBQUssMkJBQTJCLEVBR2pDLE1BQU0sd0JBQXdCLENBQUM7QUFNaEM7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IsR0FDekIsT0FBTyxDQUFDLFdBQVcsR0FBRyxTQUFTLENBQUMsQ0FHbEM7SUFFRDs7Ozs7O09BTUc7SUFDVSx3QkFBd0IsQ0FDbkMsZUFBZSxFQUFFLFlBQVksRUFDN0IsUUFBUSxFQUFFLGdCQUFnQixHQUN6QixPQUFPLENBQUMscUJBQXFCLEdBQUcsU0FBUyxDQUFDLENBTzVDO0lBRVksOEJBQThCLENBQ3pDLGVBQWUsRUFBRSxZQUFZLEdBQzVCLE9BQU8sQ0FBQyxxQkFBcUIsR0FBRyxTQUFTLENBQUMsQ0FJNUM7SUFFRDs7Ozs7O09BTUc7SUFDVSw0QkFBNEIsQ0FDdkMsZUFBZSxFQUFFLEVBQUUsRUFDbkIsUUFBUSxFQUFFLGdCQUFnQixHQUN6QixPQUFPLENBQUMsaUJBQWlCLENBQUMsT0FBTyxvQkFBb0IsQ0FBQyxHQUFHLFNBQVMsQ0FBQyxDQUdyRTtJQUVZLG9CQUFvQixDQUFDLGVBQWUsRUFBRSxZQUFZLCtCQUc5RDtJQUVZLG9CQUFvQixDQUFDLGVBQWUsRUFBRSxZQUFZLEVBQUUsUUFBUSxFQUFFLGdCQUFnQixtQkFJMUY7SUEwQlksZUFBZSxDQUFDLFlBQVksRUFBRSxNQUFNLEVBQUUsSUFBSSxFQUFFLEdBQUcsRUFBRSxFQUFFLEVBQUUsRUFBRSxZQUFZLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQXlCdkc7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_store.d.ts","sourceRoot":"","sources":["../../../src/storage/contract_store/contract_store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"contract_store.d.ts","sourceRoot":"","sources":["../../../src/storage/contract_store/contract_store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,o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