@aztec/pxe 0.77.1 → 0.78.0

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 (180) hide show
  1. package/dest/bin/index.js +1 -1
  2. package/dest/config/index.d.ts +1 -0
  3. package/dest/config/index.d.ts.map +1 -1
  4. package/dest/config/index.js +1 -0
  5. package/dest/entrypoints/client/bundle/index.d.ts +6 -0
  6. package/dest/entrypoints/client/bundle/index.d.ts.map +1 -0
  7. package/dest/entrypoints/client/bundle/index.js +5 -0
  8. package/dest/entrypoints/client/bundle/utils.d.ts +16 -0
  9. package/dest/entrypoints/client/bundle/utils.d.ts.map +1 -0
  10. package/dest/entrypoints/client/bundle/utils.js +30 -0
  11. package/dest/entrypoints/client/lazy/index.d.ts +6 -0
  12. package/dest/entrypoints/client/lazy/index.d.ts.map +1 -0
  13. package/dest/entrypoints/client/lazy/index.js +5 -0
  14. package/dest/entrypoints/client/lazy/utils.d.ts +15 -0
  15. package/dest/entrypoints/client/lazy/utils.d.ts.map +1 -0
  16. package/dest/entrypoints/client/lazy/utils.js +29 -0
  17. package/dest/entrypoints/client/pxe_creation_options.d.ts +11 -0
  18. package/dest/entrypoints/client/pxe_creation_options.d.ts.map +1 -0
  19. package/dest/entrypoints/server/index.d.ts +7 -0
  20. package/dest/entrypoints/server/index.d.ts.map +1 -0
  21. package/dest/entrypoints/server/index.js +6 -0
  22. package/dest/{utils/create_pxe_service.d.ts → entrypoints/server/utils.d.ts} +4 -4
  23. package/dest/entrypoints/server/utils.d.ts.map +1 -0
  24. package/dest/{utils/create_pxe_service.js → entrypoints/server/utils.js} +5 -11
  25. package/dest/kernel_oracle/index.d.ts +2 -1
  26. package/dest/kernel_oracle/index.d.ts.map +1 -1
  27. package/dest/kernel_prover/kernel_prover.d.ts.map +1 -1
  28. package/dest/kernel_prover/kernel_prover.js +0 -24
  29. package/dest/note_decryption_utils/add_public_values_to_payload.d.ts +2 -2
  30. package/dest/note_decryption_utils/add_public_values_to_payload.d.ts.map +1 -1
  31. package/dest/note_decryption_utils/add_public_values_to_payload.js +3 -3
  32. package/dest/{pxe_data_provider → pxe_oracle_interface}/index.d.ts +17 -9
  33. package/dest/pxe_oracle_interface/index.d.ts.map +1 -0
  34. package/dest/{pxe_data_provider → pxe_oracle_interface}/index.js +104 -61
  35. package/dest/pxe_oracle_interface/tagging_utils.d.ts.map +1 -0
  36. package/dest/pxe_service/error_enriching.d.ts +3 -4
  37. package/dest/pxe_service/error_enriching.d.ts.map +1 -1
  38. package/dest/pxe_service/error_enriching.js +4 -4
  39. package/dest/pxe_service/pxe_service.d.ts +18 -14
  40. package/dest/pxe_service/pxe_service.d.ts.map +1 -1
  41. package/dest/pxe_service/pxe_service.js +118 -65
  42. package/dest/storage/address_data_provider/address_data_provider.d.ts +13 -0
  43. package/dest/storage/address_data_provider/address_data_provider.d.ts.map +1 -0
  44. package/dest/storage/address_data_provider/address_data_provider.js +50 -0
  45. package/dest/storage/address_data_provider/index.d.ts +2 -0
  46. package/dest/storage/address_data_provider/index.d.ts.map +1 -0
  47. package/dest/storage/address_data_provider/index.js +1 -0
  48. package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.d.ts +11 -0
  49. package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.d.ts.map +1 -0
  50. package/dest/storage/auth_witness_data_provider/auth_witness_data_provider.js +20 -0
  51. package/dest/storage/auth_witness_data_provider/index.d.ts +2 -0
  52. package/dest/storage/auth_witness_data_provider/index.d.ts.map +1 -0
  53. package/dest/storage/auth_witness_data_provider/index.js +1 -0
  54. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts +16 -0
  55. package/dest/storage/capsule_data_provider/capsule_data_provider.d.ts.map +1 -0
  56. package/dest/storage/capsule_data_provider/capsule_data_provider.js +57 -0
  57. package/dest/storage/capsule_data_provider/index.d.ts +2 -0
  58. package/dest/storage/capsule_data_provider/index.d.ts.map +1 -0
  59. package/dest/storage/capsule_data_provider/index.js +1 -0
  60. package/dest/{contract_data_provider → storage/contract_data_provider}/contract_data_provider.d.ts +38 -33
  61. package/dest/storage/contract_data_provider/contract_data_provider.d.ts.map +1 -0
  62. package/dest/{contract_data_provider → storage/contract_data_provider}/contract_data_provider.js +87 -42
  63. package/dest/storage/contract_data_provider/index.d.ts.map +1 -0
  64. package/dest/storage/contract_data_provider/private_functions_tree.d.ts.map +1 -0
  65. package/dest/storage/data_provider.d.ts +4 -0
  66. package/dest/storage/data_provider.d.ts.map +1 -0
  67. package/dest/storage/data_provider.js +1 -0
  68. package/dest/storage/index.d.ts +10 -0
  69. package/dest/storage/index.d.ts.map +1 -0
  70. package/dest/storage/index.js +9 -0
  71. package/dest/storage/note_data_provider/index.d.ts +3 -0
  72. package/dest/storage/note_data_provider/index.d.ts.map +1 -0
  73. package/dest/storage/note_data_provider/index.js +2 -0
  74. package/dest/storage/note_data_provider/note_dao.d.ts.map +1 -0
  75. package/dest/storage/note_data_provider/note_data_provider.d.ts +20 -0
  76. package/dest/storage/note_data_provider/note_data_provider.d.ts.map +1 -0
  77. package/dest/storage/note_data_provider/note_data_provider.js +249 -0
  78. package/dest/storage/sync_data_provider/index.d.ts +2 -0
  79. package/dest/storage/sync_data_provider/index.d.ts.map +1 -0
  80. package/dest/storage/sync_data_provider/index.js +1 -0
  81. package/dest/storage/sync_data_provider/sync_data_provider.d.ts +12 -0
  82. package/dest/storage/sync_data_provider/sync_data_provider.d.ts.map +1 -0
  83. package/dest/storage/sync_data_provider/sync_data_provider.js +29 -0
  84. package/dest/storage/tagging_data_provider/index.d.ts +2 -0
  85. package/dest/storage/tagging_data_provider/index.d.ts.map +1 -0
  86. package/dest/storage/tagging_data_provider/index.js +1 -0
  87. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts +18 -0
  88. package/dest/storage/tagging_data_provider/tagging_data_provider.d.ts.map +1 -0
  89. package/dest/storage/tagging_data_provider/tagging_data_provider.js +65 -0
  90. package/dest/synchronizer/synchronizer.d.ts +7 -3
  91. package/dest/synchronizer/synchronizer.d.ts.map +1 -1
  92. package/dest/synchronizer/synchronizer.js +16 -11
  93. package/dest/test/pxe_test_suite.d.ts.map +1 -0
  94. package/dest/{pxe_service/test → test}/pxe_test_suite.js +2 -6
  95. package/package.json +19 -26
  96. package/src/bin/index.ts +1 -1
  97. package/src/config/index.ts +2 -0
  98. package/src/entrypoints/client/bundle/index.ts +5 -0
  99. package/src/entrypoints/client/bundle/utils.ts +58 -0
  100. package/src/entrypoints/client/lazy/index.ts +5 -0
  101. package/src/entrypoints/client/lazy/utils.ts +53 -0
  102. package/src/entrypoints/client/pxe_creation_options.ts +7 -0
  103. package/src/entrypoints/server/index.ts +6 -0
  104. package/src/{utils/create_pxe_service.ts → entrypoints/server/utils.ts} +7 -18
  105. package/src/kernel_oracle/index.ts +1 -1
  106. package/src/kernel_prover/kernel_prover.ts +0 -46
  107. package/src/note_decryption_utils/add_public_values_to_payload.ts +4 -4
  108. package/src/{pxe_data_provider → pxe_oracle_interface}/index.ts +128 -96
  109. package/src/pxe_service/error_enriching.ts +8 -6
  110. package/src/pxe_service/pxe_service.ts +155 -89
  111. package/src/storage/address_data_provider/address_data_provider.ts +71 -0
  112. package/src/storage/address_data_provider/index.ts +1 -0
  113. package/src/storage/auth_witness_data_provider/auth_witness_data_provider.ts +34 -0
  114. package/src/storage/auth_witness_data_provider/index.ts +1 -0
  115. package/src/storage/capsule_data_provider/capsule_data_provider.ts +80 -0
  116. package/src/storage/capsule_data_provider/index.ts +1 -0
  117. package/src/{contract_data_provider → storage/contract_data_provider}/contract_data_provider.ts +128 -48
  118. package/src/storage/data_provider.ts +3 -0
  119. package/src/storage/index.ts +10 -0
  120. package/src/storage/note_data_provider/index.ts +2 -0
  121. package/src/storage/note_data_provider/note_data_provider.ts +345 -0
  122. package/src/storage/sync_data_provider/index.ts +1 -0
  123. package/src/storage/sync_data_provider/sync_data_provider.ts +40 -0
  124. package/src/storage/tagging_data_provider/index.ts +1 -0
  125. package/src/storage/tagging_data_provider/tagging_data_provider.ts +92 -0
  126. package/src/synchronizer/synchronizer.ts +15 -10
  127. package/src/{pxe_service/test → test}/pxe_test_suite.ts +2 -9
  128. package/dest/contract_data_provider/contract_data_provider.d.ts.map +0 -1
  129. package/dest/contract_data_provider/index.d.ts.map +0 -1
  130. package/dest/contract_data_provider/private_functions_tree.d.ts.map +0 -1
  131. package/dest/database/index.d.ts +0 -3
  132. package/dest/database/index.d.ts.map +0 -1
  133. package/dest/database/index.js +0 -2
  134. package/dest/database/interfaces/contract_artifact_db.d.ts +0 -20
  135. package/dest/database/interfaces/contract_artifact_db.d.ts.map +0 -1
  136. package/dest/database/interfaces/contract_artifact_db.js +0 -3
  137. package/dest/database/interfaces/contract_instance_db.d.ts +0 -20
  138. package/dest/database/interfaces/contract_instance_db.d.ts.map +0 -1
  139. package/dest/database/interfaces/contract_instance_db.js +0 -3
  140. package/dest/database/interfaces/index.d.ts +0 -4
  141. package/dest/database/interfaces/index.d.ts.map +0 -1
  142. package/dest/database/interfaces/pxe_database.d.ts +0 -211
  143. package/dest/database/interfaces/pxe_database.d.ts.map +0 -1
  144. package/dest/database/interfaces/pxe_database.js +0 -4
  145. package/dest/database/interfaces/pxe_database_test_suite.d.ts +0 -7
  146. package/dest/database/interfaces/pxe_database_test_suite.d.ts.map +0 -1
  147. package/dest/database/interfaces/pxe_database_test_suite.js +0 -557
  148. package/dest/database/kv_pxe_database.d.ts +0 -58
  149. package/dest/database/kv_pxe_database.d.ts.map +0 -1
  150. package/dest/database/kv_pxe_database.js +0 -480
  151. package/dest/database/note_dao.d.ts.map +0 -1
  152. package/dest/index.d.ts +0 -9
  153. package/dest/index.d.ts.map +0 -1
  154. package/dest/index.js +0 -8
  155. package/dest/pxe_data_provider/index.d.ts.map +0 -1
  156. package/dest/pxe_data_provider/tagging_utils.d.ts.map +0 -1
  157. package/dest/pxe_service/test/pxe_test_suite.d.ts.map +0 -1
  158. package/dest/utils/create_pxe_service.d.ts.map +0 -1
  159. package/src/database/index.ts +0 -2
  160. package/src/database/interfaces/contract_artifact_db.ts +0 -20
  161. package/src/database/interfaces/contract_instance_db.ts +0 -21
  162. package/src/database/interfaces/index.ts +0 -3
  163. package/src/database/interfaces/pxe_database.ts +0 -240
  164. package/src/database/interfaces/pxe_database_test_suite.ts +0 -558
  165. package/src/database/kv_pxe_database.ts +0 -670
  166. package/src/index.ts +0 -9
  167. /package/dest/{database/interfaces/index.js → entrypoints/client/pxe_creation_options.js} +0 -0
  168. /package/dest/{pxe_data_provider → pxe_oracle_interface}/tagging_utils.d.ts +0 -0
  169. /package/dest/{pxe_data_provider → pxe_oracle_interface}/tagging_utils.js +0 -0
  170. /package/dest/{contract_data_provider → storage/contract_data_provider}/index.d.ts +0 -0
  171. /package/dest/{contract_data_provider → storage/contract_data_provider}/index.js +0 -0
  172. /package/dest/{contract_data_provider → storage/contract_data_provider}/private_functions_tree.d.ts +0 -0
  173. /package/dest/{contract_data_provider → storage/contract_data_provider}/private_functions_tree.js +0 -0
  174. /package/dest/{database → storage/note_data_provider}/note_dao.d.ts +0 -0
  175. /package/dest/{database → storage/note_data_provider}/note_dao.js +0 -0
  176. /package/dest/{pxe_service/test → test}/pxe_test_suite.d.ts +0 -0
  177. /package/src/{pxe_data_provider → pxe_oracle_interface}/tagging_utils.ts +0 -0
  178. /package/src/{contract_data_provider → storage/contract_data_provider}/index.ts +0 -0
  179. /package/src/{contract_data_provider → storage/contract_data_provider}/private_functions_tree.ts +0 -0
  180. /package/src/{database → storage/note_data_provider}/note_dao.ts +0 -0
@@ -0,0 +1,92 @@
1
+ import type { Fr } from '@aztec/foundation/fields';
2
+ import { toArray } from '@aztec/foundation/iterable';
3
+ import type { AztecAsyncKVStore, AztecAsyncMap } from '@aztec/kv-store';
4
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
5
+ import type { IndexedTaggingSecret } from '@aztec/stdlib/logs';
6
+
7
+ export class TaggingDataProvider {
8
+ #store: AztecAsyncKVStore;
9
+ #addressBook: AztecAsyncMap<string, true>;
10
+
11
+ // Stores the last index used for each tagging secret, taking direction into account
12
+ // This is necessary to avoid reusing the same index for the same secret, which happens if
13
+ // sender and recipient are the same
14
+ #taggingSecretIndexesForSenders: AztecAsyncMap<string, number>;
15
+ #taggingSecretIndexesForRecipients: AztecAsyncMap<string, number>;
16
+
17
+ constructor(store: AztecAsyncKVStore) {
18
+ this.#store = store;
19
+
20
+ this.#addressBook = this.#store.openMap('address_book');
21
+
22
+ this.#taggingSecretIndexesForSenders = this.#store.openMap('tagging_secret_indexes_for_senders');
23
+ this.#taggingSecretIndexesForRecipients = this.#store.openMap('tagging_secret_indexes_for_recipients');
24
+ }
25
+
26
+ async setTaggingSecretsIndexesAsSender(indexedSecrets: IndexedTaggingSecret[]): Promise<void> {
27
+ await this.#setTaggingSecretsIndexes(indexedSecrets, this.#taggingSecretIndexesForSenders);
28
+ }
29
+
30
+ async setTaggingSecretsIndexesAsRecipient(indexedSecrets: IndexedTaggingSecret[]): Promise<void> {
31
+ await this.#setTaggingSecretsIndexes(indexedSecrets, this.#taggingSecretIndexesForRecipients);
32
+ }
33
+
34
+ async #setTaggingSecretsIndexes(indexedSecrets: IndexedTaggingSecret[], storageMap: AztecAsyncMap<string, number>) {
35
+ await Promise.all(
36
+ indexedSecrets.map(indexedSecret =>
37
+ storageMap.set(indexedSecret.appTaggingSecret.toString(), indexedSecret.index),
38
+ ),
39
+ );
40
+ }
41
+
42
+ async getTaggingSecretsIndexesAsRecipient(appTaggingSecrets: Fr[]) {
43
+ return await this.#getTaggingSecretsIndexes(appTaggingSecrets, this.#taggingSecretIndexesForRecipients);
44
+ }
45
+
46
+ async getTaggingSecretsIndexesAsSender(appTaggingSecrets: Fr[]) {
47
+ return await this.#getTaggingSecretsIndexes(appTaggingSecrets, this.#taggingSecretIndexesForSenders);
48
+ }
49
+
50
+ #getTaggingSecretsIndexes(appTaggingSecrets: Fr[], storageMap: AztecAsyncMap<string, number>): Promise<number[]> {
51
+ return Promise.all(appTaggingSecrets.map(async secret => (await storageMap.getAsync(`${secret.toString()}`)) ?? 0));
52
+ }
53
+
54
+ resetNoteSyncData(): Promise<void> {
55
+ return this.#store.transactionAsync(async () => {
56
+ const recipients = await toArray(this.#taggingSecretIndexesForRecipients.keysAsync());
57
+ await Promise.all(recipients.map(recipient => this.#taggingSecretIndexesForRecipients.delete(recipient)));
58
+ const senders = await toArray(this.#taggingSecretIndexesForSenders.keysAsync());
59
+ await Promise.all(senders.map(sender => this.#taggingSecretIndexesForSenders.delete(sender)));
60
+ });
61
+ }
62
+
63
+ async addSenderAddress(address: AztecAddress): Promise<boolean> {
64
+ if (await this.#addressBook.hasAsync(address.toString())) {
65
+ return false;
66
+ }
67
+
68
+ await this.#addressBook.set(address.toString(), true);
69
+
70
+ return true;
71
+ }
72
+
73
+ async getSenderAddresses(): Promise<AztecAddress[]> {
74
+ return (await toArray(this.#addressBook.keysAsync())).map(AztecAddress.fromString);
75
+ }
76
+
77
+ async removeSenderAddress(address: AztecAddress): Promise<boolean> {
78
+ if (!(await this.#addressBook.hasAsync(address.toString()))) {
79
+ return false;
80
+ }
81
+
82
+ await this.#addressBook.delete(address.toString());
83
+
84
+ return true;
85
+ }
86
+
87
+ async getSize() {
88
+ const addressesCount = (await toArray(this.#addressBook.keysAsync())).length;
89
+ // All keys are addresses
90
+ return 3 * addressesCount * AztecAddress.SIZE_IN_BYTES;
91
+ }
92
+ }
@@ -5,7 +5,9 @@ import { L2BlockStream, type L2BlockStreamEvent, type L2BlockStreamEventHandler
5
5
  import type { AztecNode } from '@aztec/stdlib/interfaces/client';
6
6
 
7
7
  import type { PXEConfig } from '../config/index.js';
8
- import type { PxeDatabase } from '../database/index.js';
8
+ import type { NoteDataProvider } from '../storage/note_data_provider/note_data_provider.js';
9
+ import type { SyncDataProvider } from '../storage/sync_data_provider/sync_data_provider.js';
10
+ import type { TaggingDataProvider } from '../storage/tagging_data_provider/tagging_data_provider.js';
9
11
 
10
12
  /**
11
13
  * The Synchronizer class manages the synchronization with the aztec node, allowing PXE to retrieve the
@@ -21,7 +23,9 @@ export class Synchronizer implements L2BlockStreamEventHandler {
21
23
 
22
24
  constructor(
23
25
  private node: AztecNode,
24
- private db: PxeDatabase,
26
+ private syncDataProvider: SyncDataProvider,
27
+ private noteDataProvider: NoteDataProvider,
28
+ private taggingDataProvider: TaggingDataProvider,
25
29
  private l2TipsStore: L2TipsStore,
26
30
  config: Partial<Pick<PXEConfig, 'l2StartingBlock'>> = {},
27
31
  loggerOrSuffix?: string | Logger,
@@ -51,23 +55,24 @@ export class Synchronizer implements L2BlockStreamEventHandler {
51
55
  archive: lastBlock.archive.root.toString(),
52
56
  header: lastBlock.header.toInspect(),
53
57
  });
54
- await this.db.setHeader(lastBlock.header);
58
+ await this.syncDataProvider.setHeader(lastBlock.header);
55
59
  break;
56
60
  }
57
61
  case 'chain-pruned': {
58
62
  this.log.warn(`Pruning data after block ${event.blockNumber} due to reorg`);
59
63
  // We first unnullify and then remove so that unnullified notes that were created after the block number end up deleted.
60
- await this.db.unnullifyNotesAfter(event.blockNumber);
61
- await this.db.removeNotesAfter(event.blockNumber);
64
+ const lastSynchedBlockNumber = await this.syncDataProvider.getBlockNumber();
65
+ await this.noteDataProvider.unnullifyNotesAfter(event.blockNumber, lastSynchedBlockNumber);
66
+ await this.noteDataProvider.removeNotesAfter(event.blockNumber);
62
67
  // Remove all note tagging indexes to force a full resync. This is suboptimal, but unless we track the
63
68
  // block number in which each index is used it's all we can do.
64
- await this.db.resetNoteSyncData();
69
+ await this.taggingDataProvider.resetNoteSyncData();
65
70
  // Update the header to the last block.
66
71
  const newHeader = await this.node.getBlockHeader(event.blockNumber);
67
72
  if (!newHeader) {
68
73
  this.log.error(`Block header not found for block number ${event.blockNumber} during chain prune`);
69
74
  } else {
70
- await this.db.setHeader(newHeader);
75
+ await this.syncDataProvider.setHeader(newHeader);
71
76
  }
72
77
  break;
73
78
  }
@@ -99,18 +104,18 @@ export class Synchronizer implements L2BlockStreamEventHandler {
99
104
  let currentHeader;
100
105
 
101
106
  try {
102
- currentHeader = await this.db.getBlockHeader();
107
+ currentHeader = await this.syncDataProvider.getBlockHeader();
103
108
  } catch (e) {
104
109
  this.log.debug('Header is not set, requesting from the node');
105
110
  }
106
111
  if (!currentHeader) {
107
112
  // REFACTOR: We should know the header of the genesis block without having to request it from the node.
108
- await this.db.setHeader((await this.node.getBlockHeader(0))!);
113
+ await this.syncDataProvider.setHeader((await this.node.getBlockHeader(0))!);
109
114
  }
110
115
  await this.blockStream.sync();
111
116
  }
112
117
 
113
118
  public async getSynchedBlockNumber() {
114
- return (await this.db.getBlockNumber()) ?? this.initialSyncBlockNumber;
119
+ return (await this.syncDataProvider.getBlockNumber()) ?? this.initialSyncBlockNumber;
115
120
  }
116
121
  }
@@ -81,7 +81,7 @@ export const pxeTestSuite = (testName: string, pxeSetup: () => Promise<PXE>) =>
81
81
 
82
82
  it('refuses to register a contract with a class that has not been registered', async () => {
83
83
  const instance = await randomContractInstanceWithAddress();
84
- await expect(pxe.registerContract({ instance })).rejects.toThrow(/Missing contract artifact/i);
84
+ await expect(pxe.registerContract({ instance })).rejects.toThrow(/DB has no contract class with id/i);
85
85
  });
86
86
 
87
87
  it('refuses to register a contract with an artifact with mismatching class id', async () => {
@@ -93,14 +93,7 @@ export const pxeTestSuite = (testName: string, pxeSetup: () => Promise<PXE>) =>
93
93
  // Note: Not testing a successful run of `proveTx`, `sendTx`, `getTxReceipt` and `simulateUnconstrained` here as it requires
94
94
  // a larger setup and it's sufficiently tested in the e2e tests.
95
95
 
96
- it('throws when getting public storage for non-existent contract', async () => {
97
- const contract = await AztecAddress.random();
98
- await expect(async () => await pxe.getPublicStorageAt(contract, new Fr(0n))).rejects.toThrow(
99
- `Contract ${contract.toString()} is not deployed`,
100
- );
101
- });
102
-
103
- // Note: Not testing `getContractData` and `getPublicLogs` here as these
96
+ // Note: Not testing `getContractData`, `getPublicLogs` and `getPublicStorageAt` here as these
104
97
  // functions only call AztecNode and these methods are frequently used by the e2e tests.
105
98
 
106
99
  it('successfully gets a block number', async () => {
@@ -1 +0,0 @@
1
- {"version":3,"file":"contract_data_provider.d.ts","sourceRoot":"","sources":["../../src/contract_data_provider/contract_data_provider.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EAEtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC/F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAG/F;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAInB,OAAO,CAAC,EAAE;IAHtB,2DAA2D;IAC3D,OAAO,CAAC,eAAe,CAAgD;gBAEnD,EAAE,EAAE,wBAAwB,GAAG,wBAAwB;IAE3E,4EAA4E;IAC/D,mBAAmB,CAAC,eAAe,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAQ1F,0EAA0E;IAC7D,gBAAgB,CAAC,eAAe,EAAE,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC;IAK7D,mBAAmB,CAAC,eAAe,EAAE,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAKhF;;;;;;;;OAQG;IACU,mBAAmB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB;IAK1F;;;;;;;;OAQG;IACU,yBAAyB,CACpC,eAAe,EAAE,YAAY,EAC7B,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAKxC;;;;;;;;;OASG;IACU,wBAAwB,CACnC,eAAe,EAAE,YAAY,EAC7B,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC;IAM7C;;;;;;;;;OASG;IACU,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB;IAKlF;;;;;;;;OAQG;IACU,4BAA4B,CACvC,eAAe,EAAE,EAAE,EACnB,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAKnB,oBAAoB,CAAC,eAAe,EAAE,YAAY;IAKlD,oBAAoB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB;IAO3F;;;;;;;;;OASG;YACW,iBAAiB;IAY/B;;;;;;;;;OASG;YACW,iBAAiB;CAIhC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract_data_provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"private_functions_tree.d.ts","sourceRoot":"","sources":["../../src/contract_data_provider/private_functions_tree.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACL,KAAK,mBAAmB,EAIzB,MAAM,wBAAwB,CAAC;AAEhC;;;;;GAKG;AACH,qBAAa,oBAAoB;IAGX,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAAoB,OAAO,CAAC,aAAa;IAFtF,OAAO,CAAC,IAAI,CAAC,CAAa;IAE1B,OAAO;WAEM,MAAM,CAAC,QAAQ,EAAE,gBAAgB;IAK9C;;;;;;;OAOG;IACU,mBAAmB,CAAC,QAAQ,EAAE,gBAAgB;IAkB3D;;;;;;;OAOG;IACU,WAAW,CAAC,QAAQ,EAAE,gBAAgB;IAKnD;;;;;;OAMG;IACI,mBAAmB;IAI1B,yCAAyC;IAClC,gBAAgB;IAIvB,qCAAqC;IAC9B,WAAW;IAIlB;;OAEG;IACI,kBAAkB;IAIzB;;;;;;;;OAQG;IACU,4BAA4B,CACvC,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,iBAAiB,CAAC,OAAO,oBAAoB,CAAC,CAAC;YAiB5C,OAAO;CAOtB"}
@@ -1,3 +0,0 @@
1
- export * from './kv_pxe_database.js';
2
- export * from './interfaces/index.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './kv_pxe_database.js';
2
- export * from './interfaces/index.js';
@@ -1,20 +0,0 @@
1
- import type { Fr } from '@aztec/foundation/fields';
2
- import type { ContractArtifact } from '@aztec/stdlib/abi';
3
- /**
4
- * PXE database for managing contract artifacts.
5
- */
6
- export interface ContractArtifactDatabase {
7
- /**
8
- * Adds a new contract artifact to the database or updates an existing one.
9
- * @param id - Id of the corresponding contract class.
10
- * @param contract - Contract artifact to add.
11
- * @throws - If there are duplicate private function selectors.
12
- */
13
- addContractArtifact(id: Fr, contract: ContractArtifact): Promise<void>;
14
- /**
15
- * Gets a contract artifact given its resulting contract class id.
16
- * @param id - Contract class id for the given artifact.
17
- */
18
- getContractArtifact(id: Fr): Promise<ContractArtifact | undefined>;
19
- }
20
- //# sourceMappingURL=contract_artifact_db.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contract_artifact_db.d.ts","sourceRoot":"","sources":["../../../src/database/interfaces/contract_artifact_db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvE;;;OAGG;IACH,mBAAmB,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC;CACpE"}
@@ -1,3 +0,0 @@
1
- /**
2
- * PXE database for managing contract artifacts.
3
- */ export { };
@@ -1,20 +0,0 @@
1
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
2
- import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
3
- /**
4
- * PXE database for managing contract instances.
5
- */
6
- export interface ContractInstanceDatabase {
7
- /**
8
- * Adds a new contract to the db or updates an existing one.
9
- * @param contract - Contract to insert.
10
- */
11
- addContractInstance(contract: ContractInstanceWithAddress): Promise<void>;
12
- /**
13
- * Gets a contract given its address.
14
- * @param address - Address of the contract.
15
- */
16
- getContractInstance(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
17
- /** Returns the addresses all contract instances registered in the DB. */
18
- getContractsAddresses(): Promise<AztecAddress[]>;
19
- }
20
- //# sourceMappingURL=contract_instance_db.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contract_instance_db.d.ts","sourceRoot":"","sources":["../../../src/database/interfaces/contract_instance_db.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,mBAAmB,CAAC,QAAQ,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E;;;OAGG;IACH,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAAC;IAE7F,yEAAyE;IACzE,qBAAqB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAClD"}
@@ -1,3 +0,0 @@
1
- /**
2
- * PXE database for managing contract instances.
3
- */ export { };
@@ -1,4 +0,0 @@
1
- export type { ContractArtifactDatabase } from './contract_artifact_db.js';
2
- export type { ContractInstanceDatabase } from './contract_instance_db.js';
3
- export type { PxeDatabase } from './pxe_database.js';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/database/interfaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,YAAY,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,211 +0,0 @@
1
- import type { Fr } from '@aztec/foundation/fields';
2
- import type { ContractArtifact } from '@aztec/stdlib/abi';
3
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
- import type { InBlock } from '@aztec/stdlib/block';
5
- import type { CompleteAddress, ContractInstanceWithAddress } from '@aztec/stdlib/contract';
6
- import type { PublicKey } from '@aztec/stdlib/keys';
7
- import type { IndexedTaggingSecret } from '@aztec/stdlib/logs';
8
- import type { NotesFilter } from '@aztec/stdlib/note';
9
- import type { BlockHeader } from '@aztec/stdlib/tx';
10
- import type { NoteDao } from '../note_dao.js';
11
- import type { ContractArtifactDatabase } from './contract_artifact_db.js';
12
- import type { ContractInstanceDatabase } from './contract_instance_db.js';
13
- /**
14
- * A database interface that provides methods for retrieving, adding, and removing transactional data related to Aztec
15
- * addresses, storage slots, and nullifiers.
16
- */
17
- export interface PxeDatabase extends ContractArtifactDatabase, ContractInstanceDatabase {
18
- getContract(address: AztecAddress): Promise<(ContractInstanceWithAddress & ContractArtifact) | undefined>;
19
- /**
20
- * Add a auth witness to the database.
21
- * @param messageHash - The message hash.
22
- * @param witness - An array of field elements representing the auth witness.
23
- */
24
- addAuthWitness(messageHash: Fr, witness: Fr[]): Promise<void>;
25
- /**
26
- * Fetching the auth witness for a given message hash.
27
- * @param messageHash - The message hash.
28
- * @returns A Promise that resolves to an array of field elements representing the auth witness.
29
- */
30
- getAuthWitness(messageHash: Fr): Promise<Fr[] | undefined>;
31
- /**
32
- * Gets notes based on the provided filter.
33
- * @param filter - The filter to apply to the notes.
34
- * @returns The requested notes.
35
- */
36
- getNotes(filter: NotesFilter): Promise<NoteDao[]>;
37
- /**
38
- * Adds a note to DB.
39
- * @param note - The note to add.
40
- * @param scope - The scope to add the note under. Currently optional.
41
- * @remark - Will create a database for the scope if it does not already exist.
42
- */
43
- addNote(note: NoteDao, scope?: AztecAddress): Promise<void>;
44
- /**
45
- * Adds a nullified note to DB.
46
- * @param note - The note to add.
47
- */
48
- addNullifiedNote(note: NoteDao): Promise<void>;
49
- /**
50
- * Adds an array of notes to DB.
51
- * This function is used to insert multiple notes to the database at once,
52
- * which can improve performance when dealing with large numbers of transactions.
53
- *
54
- * @param notes - An array of notes.
55
- * @param scope - The scope to add the notes under. Currently optional.
56
- * @remark - Will create a database for the scope if it does not already exist.
57
- */
58
- addNotes(notes: NoteDao[], scope?: AztecAddress): Promise<void>;
59
- /**
60
- * Remove nullified notes associated with the given account and nullifiers.
61
- *
62
- * @param nullifiers - An array of Fr instances representing nullifiers to be matched.
63
- * @param account - A PublicKey instance representing the account for which the records are being removed.
64
- * @returns Removed notes.
65
- */
66
- removeNullifiedNotes(nullifiers: InBlock<Fr>[], account: PublicKey): Promise<NoteDao[]>;
67
- /**
68
- * Gets the most recently processed block number.
69
- * @returns The most recently processed block number or undefined if never synched.
70
- */
71
- getBlockNumber(): Promise<number | undefined>;
72
- /**
73
- * Retrieve the stored Block Header from the database.
74
- * The function returns a Promise that resolves to the Block Header.
75
- * This data is required to reproduce block attestations.
76
- * Throws an error if the block header is not available within the database.
77
- *
78
- * note: this data is a combination of the tree roots and the global variables hash.
79
- *
80
- * @returns The Block Header.
81
- * @throws If no block have been processed yet.
82
- */
83
- getBlockHeader(): Promise<BlockHeader>;
84
- /**
85
- * Set the latest Block Header.
86
- * Note that this will overwrite any existing hash or roots in the database.
87
- *
88
- * @param header - An object containing the most recent block header.
89
- * @returns A Promise that resolves when the hash has been successfully updated in the database.
90
- */
91
- setHeader(header: BlockHeader): Promise<void>;
92
- /**
93
- * Adds sender address to the database.
94
- * @param address - The address to add to the address book.
95
- * @returns A promise resolving to true if the address was added, false if it already exists.
96
- */
97
- addSenderAddress(address: AztecAddress): Promise<boolean>;
98
- /**
99
- * Retrieves the list of sender addresses in the address book.
100
- * @returns An array of Aztec addresses.
101
- */
102
- getSenderAddresses(): Promise<AztecAddress[]>;
103
- /**
104
- * Removes a sender address from the database.
105
- * @param address - The address to remove from the address book.
106
- * @returns A promise resolving to true if the address was removed, false if it does not exist.
107
- */
108
- removeSenderAddress(address: AztecAddress): Promise<boolean>;
109
- /**
110
- * Adds complete address to the database.
111
- * @param address - The complete address to add.
112
- * @returns A promise resolving to true if the address was added, false if it already exists.
113
- * @throws If we try to add a CompleteAddress with the same AztecAddress but different public key or partial
114
- * address.
115
- */
116
- addCompleteAddress(address: CompleteAddress): Promise<boolean>;
117
- /**
118
- * Retrieve the complete address associated to a given address.
119
- * @param account - The account address.
120
- * @returns A promise that resolves to a CompleteAddress instance if found, or undefined if not found.
121
- */
122
- getCompleteAddress(account: AztecAddress): Promise<CompleteAddress | undefined>;
123
- /**
124
- * Retrieves the list of complete addresses added to this database
125
- * @returns A promise that resolves to an array of AztecAddress instances.
126
- */
127
- getCompleteAddresses(): Promise<CompleteAddress[]>;
128
- /**
129
- * Returns the estimated size in bytes of this db.
130
- * @returns The estimated size in bytes of this db.
131
- */
132
- estimateSize(): Promise<number>;
133
- /**
134
- * Returns the last seen indexes for the provided app siloed tagging secrets or 0 if they've never been seen.
135
- * @param appTaggingSecrets - The app siloed tagging secrets.
136
- * @returns The indexes for the provided secrets, 0 if they've never been seen.
137
- */
138
- getTaggingSecretsIndexesAsRecipient(appTaggingSecrets: Fr[]): Promise<number[]>;
139
- /**
140
- * Returns the last seen indexes for the provided app siloed tagging secrets or 0 if they've never been used
141
- * @param appTaggingSecrets - The app siloed tagging secrets.
142
- * @returns The indexes for the provided secrets, 0 if they've never been seen.
143
- */
144
- getTaggingSecretsIndexesAsSender(appTaggingSecrets: Fr[]): Promise<number[]>;
145
- /**
146
- * Sets the index for the provided app siloed tagging secrets
147
- * To be used when the generated tags have been "seen" as a sender
148
- * @param appTaggingSecrets - The app siloed tagging secrets.
149
- */
150
- setTaggingSecretsIndexesAsSender(indexedTaggingSecrets: IndexedTaggingSecret[]): Promise<void>;
151
- /**
152
- * Sets the index for the provided app siloed tagging secrets
153
- * To be used when the generated tags have been "seen" as a recipient
154
- * @param appTaggingSecrets - The app siloed tagging secrets.
155
- */
156
- setTaggingSecretsIndexesAsRecipient(indexedTaggingSecrets: IndexedTaggingSecret[]): Promise<void>;
157
- /**
158
- * Deletes all notes synched after this block number.
159
- * @param blockNumber - All notes strictly after this block number are removed.
160
- */
161
- removeNotesAfter(blockNumber: number): Promise<void>;
162
- /**
163
- * Restores notes nullified after the given block.
164
- * @param blockNumber - All nullifiers strictly after this block are removed.
165
- */
166
- unnullifyNotesAfter(blockNumber: number): Promise<void>;
167
- /**
168
- * Resets the indexes used to sync notes to 0 for every sender and recipient, causing the next sync process to
169
- * start from scratch, taking longer than usual.
170
- * This can help fix desynchronization issues, including finding logs that had previously been overlooked, and
171
- * is also required to deal with chain reorgs.
172
- */
173
- resetNoteSyncData(): Promise<void>;
174
- /**
175
- * Stores arbitrary information in a per-contract non-volatile database (called capsules), which can later
176
- * be retrieved with `loadCapsule`. If data was already stored at this slot, it is overwritten.
177
- * @param contractAddress - The contract address to scope the data under.
178
- * @param slot - The slot in the database in which to store the value. Slots need not be contiguous.
179
- * @param capsule - An array of field elements representing the capsule.
180
- * @remarks A capsule is a "blob" of data that is passed to the contract through an oracle. It works similarly
181
- * to public contract storage in that it's indexed by the contract address and storage slot but instead of the global
182
- * network state it's backed by local PXE db.
183
- */
184
- storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void>;
185
- /**
186
- * Returns data previously stored via `storeCapsule` in the per-contract non-volatile database (called capsules).
187
- * @param contractAddress - The contract address under which the data is scoped.
188
- * @param slot - The slot in the database to read.
189
- * @returns The stored data or `null` if no data is stored under the slot.
190
- */
191
- loadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
192
- /**
193
- * Deletes data in the per-contract non-volatile database (called capsules). Does nothing if no data was present.
194
- * @param contractAddress - The contract address under which the data is scoped.
195
- * @param slot - The slot in the database to delete.
196
- */
197
- deleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void>;
198
- /**
199
- * Copies a number of contiguous entries in the per-contract non-volatile database (called capsules). This allows for
200
- * efficient data structures by avoiding repeated calls to `loadCapsule` and `storeCapsule`.
201
- * Supports overlapping source and destination regions (which will result in the overlapped source values being
202
- * overwritten). All copied slots must exist in the database (i.e. have been stored and not deleted)
203
- *
204
- * @param contractAddress - The contract address under which the data is scoped.
205
- * @param srcSlot - The first slot to copy from.
206
- * @param dstSlot - The first slot to copy to.
207
- * @param numEntries - The number of entries to copy.
208
- */
209
- copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
210
- }
211
- //# sourceMappingURL=pxe_database.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pxe_database.d.ts","sourceRoot":"","sources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AAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzG"}
@@ -1,4 +0,0 @@
1
- /**
2
- * A database interface that provides methods for retrieving, adding, and removing transactional data related to Aztec
3
- * addresses, storage slots, and nullifiers.
4
- */ export { };
@@ -1,7 +0,0 @@
1
- import type { PxeDatabase } from './pxe_database.js';
2
- /**
3
- * A common test suite for a PXE database.
4
- * @param getDatabase - A function that returns a database instance.
5
- */
6
- export declare function describePxeDatabase(getDatabase: () => PxeDatabase): void;
7
- //# sourceMappingURL=pxe_database_test_suite.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pxe_database_test_suite.d.ts","sourceRoot":"","sources":["../../../src/database/interfaces/pxe_database_test_suite.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,WAAW,QAuhBjE"}