@aztec/pxe 0.0.1-commit.8f9871590 → 0.0.1-commit.9117c5f5a

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.
Files changed (96) hide show
  1. package/dest/config/package_info.js +1 -1
  2. package/dest/contract_function_simulator/contract_function_simulator.d.ts +1 -1
  3. package/dest/contract_function_simulator/contract_function_simulator.d.ts.map +1 -1
  4. package/dest/contract_function_simulator/contract_function_simulator.js +8 -8
  5. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts +5 -5
  6. package/dest/contract_function_simulator/execution_tagging_index_cache.d.ts.map +1 -1
  7. package/dest/contract_function_simulator/execution_tagging_index_cache.js +3 -3
  8. package/dest/contract_function_simulator/noir-structs/event_validation_request.js +1 -1
  9. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts +2 -2
  10. package/dest/contract_function_simulator/noir-structs/note_validation_request.d.ts.map +1 -1
  11. package/dest/contract_function_simulator/noir-structs/note_validation_request.js +1 -1
  12. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts +1 -1
  13. package/dest/contract_function_simulator/oracle/private_execution_oracle.d.ts.map +1 -1
  14. package/dest/contract_function_simulator/oracle/private_execution_oracle.js +10 -18
  15. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts +1 -1
  16. package/dest/contract_function_simulator/oracle/utility_execution_oracle.d.ts.map +1 -1
  17. package/dest/contract_function_simulator/oracle/utility_execution_oracle.js +4 -7
  18. package/dest/contract_logging.d.ts +22 -0
  19. package/dest/contract_logging.d.ts.map +1 -0
  20. package/dest/contract_logging.js +23 -0
  21. package/dest/debug/pxe_debug_utils.d.ts +2 -2
  22. package/dest/debug/pxe_debug_utils.d.ts.map +1 -1
  23. package/dest/debug/pxe_debug_utils.js +4 -4
  24. package/dest/entrypoints/client/bundle/index.d.ts +2 -1
  25. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -1
  26. package/dest/entrypoints/client/bundle/index.js +1 -0
  27. package/dest/entrypoints/client/lazy/index.d.ts +2 -1
  28. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -1
  29. package/dest/entrypoints/client/lazy/index.js +1 -0
  30. package/dest/logs/log_service.d.ts +1 -1
  31. package/dest/logs/log_service.d.ts.map +1 -1
  32. package/dest/logs/log_service.js +4 -4
  33. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts +4 -3
  34. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.d.ts.map +1 -1
  35. package/dest/private_kernel/hints/private_kernel_reset_private_inputs_builder.js +129 -68
  36. package/dest/private_kernel/hints/test_utils.d.ts +122 -0
  37. package/dest/private_kernel/hints/test_utils.d.ts.map +1 -0
  38. package/dest/private_kernel/hints/test_utils.js +203 -0
  39. package/dest/private_kernel/private_kernel_execution_prover.d.ts +1 -1
  40. package/dest/private_kernel/private_kernel_execution_prover.d.ts.map +1 -1
  41. package/dest/private_kernel/private_kernel_execution_prover.js +13 -5
  42. package/dest/private_kernel/private_kernel_oracle.d.ts +6 -2
  43. package/dest/private_kernel/private_kernel_oracle.d.ts.map +1 -1
  44. package/dest/private_kernel/private_kernel_oracle.js +7 -3
  45. package/dest/pxe.d.ts +8 -7
  46. package/dest/pxe.d.ts.map +1 -1
  47. package/dest/pxe.js +37 -29
  48. package/dest/storage/contract_store/contract_store.d.ts +42 -15
  49. package/dest/storage/contract_store/contract_store.d.ts.map +1 -1
  50. package/dest/storage/contract_store/contract_store.js +140 -64
  51. package/dest/storage/tagging_store/recipient_tagging_store.d.ts +6 -6
  52. package/dest/storage/tagging_store/recipient_tagging_store.d.ts.map +1 -1
  53. package/dest/storage/tagging_store/sender_tagging_store.d.ts +5 -5
  54. package/dest/storage/tagging_store/sender_tagging_store.d.ts.map +1 -1
  55. package/dest/storage/tagging_store/sender_tagging_store.js +4 -4
  56. package/dest/tagging/index.d.ts +2 -2
  57. package/dest/tagging/index.d.ts.map +1 -1
  58. package/dest/tagging/index.js +1 -1
  59. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts +4 -5
  60. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.d.ts.map +1 -1
  61. package/dest/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.js +3 -3
  62. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts +6 -7
  63. package/dest/tagging/recipient_sync/utils/load_logs_for_range.d.ts.map +1 -1
  64. package/dest/tagging/recipient_sync/utils/load_logs_for_range.js +12 -11
  65. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts +4 -8
  66. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.d.ts.map +1 -1
  67. package/dest/tagging/sender_sync/sync_sender_tagging_indexes.js +3 -6
  68. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts +4 -7
  69. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.d.ts.map +1 -1
  70. package/dest/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.js +14 -15
  71. package/package.json +16 -16
  72. package/src/config/package_info.ts +1 -1
  73. package/src/contract_function_simulator/contract_function_simulator.ts +15 -17
  74. package/src/contract_function_simulator/execution_tagging_index_cache.ts +5 -5
  75. package/src/contract_function_simulator/noir-structs/event_validation_request.ts +1 -1
  76. package/src/contract_function_simulator/noir-structs/note_validation_request.ts +1 -1
  77. package/src/contract_function_simulator/oracle/private_execution_oracle.ts +14 -20
  78. package/src/contract_function_simulator/oracle/utility_execution_oracle.ts +8 -7
  79. package/src/contract_logging.ts +39 -0
  80. package/src/debug/pxe_debug_utils.ts +4 -4
  81. package/src/entrypoints/client/bundle/index.ts +1 -0
  82. package/src/entrypoints/client/lazy/index.ts +1 -0
  83. package/src/logs/log_service.ts +10 -5
  84. package/src/private_kernel/hints/private_kernel_reset_private_inputs_builder.ts +164 -117
  85. package/src/private_kernel/hints/test_utils.ts +325 -0
  86. package/src/private_kernel/private_kernel_execution_prover.ts +13 -6
  87. package/src/private_kernel/private_kernel_oracle.ts +7 -7
  88. package/src/pxe.ts +41 -34
  89. package/src/storage/contract_store/contract_store.ts +170 -71
  90. package/src/storage/tagging_store/recipient_tagging_store.ts +9 -5
  91. package/src/storage/tagging_store/sender_tagging_store.ts +8 -8
  92. package/src/tagging/index.ts +1 -1
  93. package/src/tagging/recipient_sync/load_private_logs_for_sender_recipient_pair.ts +3 -6
  94. package/src/tagging/recipient_sync/utils/load_logs_for_range.ts +10 -15
  95. package/src/tagging/sender_sync/sync_sender_tagging_indexes.ts +4 -9
  96. package/src/tagging/sender_sync/utils/load_and_store_new_tagging_indexes.ts +11 -20
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';
@@ -35,6 +36,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
35
36
  * manage private state of users.
36
37
  */ export class PXE {
37
38
  node;
39
+ db;
38
40
  blockStateSynchronizer;
39
41
  keyStore;
40
42
  contractStore;
@@ -55,8 +57,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
55
57
  jobQueue;
56
58
  jobCoordinator;
57
59
  debug;
58
- constructor(node, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
60
+ constructor(node, db, blockStateSynchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debug){
59
61
  this.node = node;
62
+ this.db = db;
60
63
  this.blockStateSynchronizer = blockStateSynchronizer;
61
64
  this.keyStore = keyStore;
62
65
  this.contractStore = contractStore;
@@ -114,8 +117,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
114
117
  ]);
115
118
  const debugUtils = new PXEDebugUtils(contractSyncService, noteStore, synchronizer, anchorBlockStore);
116
119
  const jobQueue = new SerialQueue();
117
- 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);
118
- debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#simulateUtility.bind(pxe));
120
+ const pxe = new PXE(node, store, synchronizer, keyStore, contractStore, noteStore, capsuleStore, anchorBlockStore, senderTaggingStore, senderAddressBookStore, recipientTaggingStore, addressStore, privateEventStore, contractSyncService, simulator, proverEnabled, proofCreator, protocolContractsProvider, log, jobQueue, jobCoordinator, debugUtils);
121
+ debugUtils.setPXEHelpers(pxe.#putInJobQueue.bind(pxe), pxe.#getSimulatorForTx.bind(pxe), pxe.#executeUtility.bind(pxe));
119
122
  pxe.jobQueue.start();
120
123
  await pxe.#registerProtocolContracts();
121
124
  log.info(`Started PXE connected to chain ${info.l1ChainId} version ${info.rollupVersion}`);
@@ -180,8 +183,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
180
183
  async #registerProtocolContracts() {
181
184
  const registered = {};
182
185
  for (const name of protocolContractNames){
183
- const { address, contractClass, instance, artifact } = await this.protocolContractsProvider.getProtocolContractArtifact(name);
184
- await this.contractStore.addContractArtifact(contractClass.id, artifact);
186
+ const { address, instance, artifact } = await this.protocolContractsProvider.getProtocolContractArtifact(name);
187
+ await this.contractStore.addContractArtifact(artifact);
185
188
  await this.contractStore.addContractInstance(instance);
186
189
  registered[name] = address.toString();
187
190
  }
@@ -193,7 +196,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
193
196
  const { origin: contractAddress, functionSelector } = txRequest;
194
197
  try {
195
198
  const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
196
- await this.contractSyncService.ensureContractSynced(contractAddress, functionSelector, (privateSyncCall, execScopes)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
199
+ await this.contractSyncService.ensureContractSynced(contractAddress, functionSelector, (privateSyncCall, execScopes)=>this.#executeUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
197
200
  const result = await contractFunctionSimulator.run(txRequest, {
198
201
  contractAddress,
199
202
  selector: functionSelector,
@@ -211,15 +214,15 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
211
214
  }
212
215
  }
213
216
  /**
214
- * Simulate a utility function call on the given contract.
217
+ * Execute a utility function call on the given contract.
215
218
  * @param contractFunctionSimulator - The simulator to use for the function call.
216
219
  * @param call - The function call to execute.
217
220
  * @param authWitnesses - Authentication witnesses required for the function call.
218
221
  * @param scopes - Optional array of account addresses whose notes can be accessed in this call. Defaults to all
219
222
  * accounts if not specified.
220
223
  * @param jobId - The job ID for staged writes.
221
- * @returns The simulation result containing the outputs of the utility function.
222
- */ async #simulateUtility(contractFunctionSimulator, call, authWitnesses, scopes, jobId) {
224
+ * @returns The execution result containing the outputs of the utility function.
225
+ */ async #executeUtility(contractFunctionSimulator, call, authWitnesses, scopes, jobId) {
223
226
  try {
224
227
  const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
225
228
  return contractFunctionSimulator.runUtility(call, authWitnesses ?? [], anchorBlockHeader, scopes, jobId);
@@ -371,8 +374,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
371
374
  *
372
375
  * @param artifact - The build artifact for the contract class.
373
376
  */ async registerContractClass(artifact) {
374
- const { id: contractClassId } = await getContractClassFromArtifact(artifact);
375
- await this.contractStore.addContractArtifact(contractClassId, artifact);
377
+ const contractClassId = await this.contractStore.addContractArtifact(artifact);
376
378
  this.log.info(`Added contract class ${artifact.name} with id ${contractClassId}`);
377
379
  }
378
380
  /**
@@ -388,15 +390,14 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
388
390
  if (artifact) {
389
391
  // If the user provides an artifact, validate it against the expected class id and register it
390
392
  const contractClass = await getContractClassFromArtifact(artifact);
391
- const contractClassId = contractClass.id;
392
- if (!contractClassId.equals(instance.currentContractClassId)) {
393
- throw new Error(`Artifact does not match expected class id (computed ${contractClassId} but instance refers to ${instance.currentContractClassId})`);
393
+ if (!contractClass.id.equals(instance.currentContractClassId)) {
394
+ throw new Error(`Artifact does not match expected class id (computed ${contractClass.id} but instance refers to ${instance.currentContractClassId})`);
394
395
  }
395
396
  const computedAddress = await computeContractAddressFromInstance(instance);
396
397
  if (!computedAddress.equals(instance.address)) {
397
398
  throw new Error('Added a contract in which the address does not match the contract instance.');
398
399
  }
399
- await this.contractStore.addContractArtifact(contractClass.id, artifact);
400
+ await this.contractStore.addContractArtifact(artifact, contractClass);
400
401
  const publicFunctionSignatures = artifact.functions.filter((fn)=>fn.functionType === FunctionType.PUBLIC).map((fn)=>decodeFunctionSignature(fn.name, fn.parameters));
401
402
  await this.node.registerContractFunctionSignatures(publicFunctionSignatures);
402
403
  } else {
@@ -432,11 +433,13 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
432
433
  if (!contractClass.id.equals(currentClassId)) {
433
434
  throw new Error('Could not update contract to a class different from the current one.');
434
435
  }
435
- await this.contractStore.addContractArtifact(contractClass.id, artifact);
436
436
  const publicFunctionSignatures = artifact.functions.filter((fn)=>fn.functionType === FunctionType.PUBLIC).map((fn)=>decodeFunctionSignature(fn.name, fn.parameters));
437
437
  await this.node.registerContractFunctionSignatures(publicFunctionSignatures);
438
438
  currentInstance.currentContractClassId = contractClass.id;
439
- await this.contractStore.addContractInstance(currentInstance);
439
+ await Promise.all([
440
+ this.contractStore.addContractArtifact(artifact, contractClass),
441
+ this.contractStore.addContractInstance(currentInstance)
442
+ ]);
440
443
  this.log.info(`Updated contract ${artifact.name} at ${contractAddress.toString()} to class ${contractClass.id}`);
441
444
  });
442
445
  }
@@ -640,6 +643,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
640
643
  const publicSimulationTimer = new Timer();
641
644
  publicOutput = await this.#simulatePublicCalls(simulatedTx, skipFeeEnforcement);
642
645
  publicSimulationTime = publicSimulationTimer.ms();
646
+ if (publicOutput?.debugLogs?.length) {
647
+ await displayDebugLogs(publicOutput.debugLogs, (addr)=>this.contractStore.getDebugContractName(addr));
648
+ }
643
649
  }
644
650
  let validationTime;
645
651
  if (!skipTxValidation) {
@@ -650,7 +656,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
650
656
  });
651
657
  validationTime = validationTimer.ms();
652
658
  if (validationResult.result === 'invalid') {
653
- throw new Error('The simulated transaction is unable to be added to state and is invalid.');
659
+ const reason = validationResult.reason.length > 0 ? ` Reason: ${validationResult.reason.join(', ')}` : '';
660
+ throw new Error(`The simulated transaction is unable to be added to state and is invalid.${reason}`);
654
661
  }
655
662
  }
656
663
  const txHash = simulatedTx.getTxHash();
@@ -688,14 +695,14 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
688
695
  });
689
696
  }
690
697
  /**
691
- * Simulates the execution of a contract utility function.
698
+ * Executes a contract utility function.
692
699
  * @param call - The function call containing the function details, arguments, and target contract address.
693
- */ simulateUtility(call, { authwits, scopes } = {
700
+ */ executeUtility(call, { authwits, scopes } = {
694
701
  scopes: 'ALL_SCOPES'
695
702
  }) {
696
- // We disable concurrent simulations since those might execute oracles which read and write to the PXE stores (e.g.
703
+ // We disable concurrent executions since those might execute oracles which read and write to the PXE stores (e.g.
697
704
  // to the capsules), and we need to prevent concurrent runs from interfering with one another (e.g. attempting to
698
- // delete the same read value, or reading values that another simulation is currently modifying).
705
+ // delete the same read value, or reading values that another execution is currently modifying).
699
706
  return this.#putInJobQueue(async (jobId)=>{
700
707
  try {
701
708
  const totalTimer = new Timer();
@@ -705,8 +712,8 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
705
712
  const functionTimer = new Timer();
706
713
  const contractFunctionSimulator = this.#getSimulatorForTx();
707
714
  const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
708
- await this.contractSyncService.ensureContractSynced(call.to, call.selector, (privateSyncCall, execScopes)=>this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
709
- const executionResult = await this.#simulateUtility(contractFunctionSimulator, call, authwits ?? [], scopes, jobId);
715
+ await this.contractSyncService.ensureContractSynced(call.to, call.selector, (privateSyncCall, execScopes)=>this.#executeUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, scopes);
716
+ const executionResult = await this.#executeUtility(contractFunctionSimulator, call, authwits ?? [], scopes, jobId);
710
717
  const functionTime = functionTimer.ms();
711
718
  const totalTime = totalTimer.ms();
712
719
  const perFunction = [
@@ -732,7 +739,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
732
739
  } catch (err) {
733
740
  const { to, name, args } = call;
734
741
  const stringifiedArgs = args.map((arg)=>arg.toString()).join(', ');
735
- throw this.#contextualizeError(err, `simulateUtility ${to}:${name}(${stringifiedArgs})`, `scopes=${scopes === 'ALL_SCOPES' ? scopes : scopes.map((s)=>s.toString()).join(', ')}`);
742
+ throw this.#contextualizeError(err, `executeUtility ${to}:${name}(${stringifiedArgs})`, `scopes=${scopes === 'ALL_SCOPES' ? scopes : scopes.map((s)=>s.toString()).join(', ')}`);
736
743
  }
737
744
  });
738
745
  }
@@ -755,7 +762,7 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
755
762
  const anchorBlockHeader = await this.anchorBlockStore.getBlockHeader();
756
763
  anchorBlockNumber = anchorBlockHeader.getBlockNumber();
757
764
  const contractFunctionSimulator = this.#getSimulatorForTx();
758
- await this.contractSyncService.ensureContractSynced(filter.contractAddress, null, async (privateSyncCall, execScopes)=>await this.#simulateUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, filter.scopes);
765
+ await this.contractSyncService.ensureContractSynced(filter.contractAddress, null, async (privateSyncCall, execScopes)=>await this.#executeUtility(contractFunctionSimulator, privateSyncCall, [], execScopes, jobId), anchorBlockHeader, jobId, filter.scopes);
759
766
  });
760
767
  // anchorBlockNumber is set during the job and fixed to whatever it is after a block sync
761
768
  const sanitizedFilter = new PrivateEventFilterValidator(anchorBlockNumber).validate(filter);
@@ -763,8 +770,9 @@ import { SenderTaggingStore } from './storage/tagging_store/sender_tagging_store
763
770
  return this.privateEventStore.getPrivateEvents(eventSelector, sanitizedFilter);
764
771
  }
765
772
  /**
766
- * Stops the PXE's job queue.
767
- */ stop() {
768
- return this.jobQueue.end();
773
+ * Stops the PXE's job queue and closes the backing store.
774
+ */ async stop() {
775
+ await this.jobQueue.end();
776
+ await this.db.close();
769
777
  }
770
778
  }
@@ -1,10 +1,37 @@
1
1
  import type { FUNCTION_TREE_HEIGHT } from '@aztec/constants';
2
- import type { Fr } from '@aztec/foundation/curves/bn254';
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 ContractClass, type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
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
- addContractArtifact(id: Fr, contract: ContractArtifact): Promise<void>;
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. Throws if not found. */
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. Throws if not found. */
25
- getContractClass(contractClassId: Fr): Promise<ContractClass | undefined>;
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 artifact as an object.
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3Rfc3RvcmUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9zdG9yYWdlL2NvbnRyYWN0X3N0b3JlL2NvbnRyYWN0X3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDN0QsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFFekQsT0FBTyxLQUFLLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUNqRSxPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBaUIsTUFBTSxpQkFBaUIsQ0FBQztBQUN4RSxPQUFPLEVBQ0wsS0FBSyxnQkFBZ0IsRUFDckIsS0FBSyxXQUFXLEVBRWhCLEtBQUssZ0NBQWdDLEVBQ3JDLFlBQVksRUFDWixLQUFLLHFCQUFxQixFQUMxQixnQkFBZ0IsRUFNakIsTUFBTSxtQkFBbUIsQ0FBQztBQUMzQixPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDM0QsT0FBTyxFQUNMLEtBQUssYUFBYSxFQUNsQixLQUFLLDJCQUEyQixFQUdqQyxNQU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