@aztec/archiver 0.0.1-commit.96bb3f7 → 0.0.1-commit.993d240

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 (232) hide show
  1. package/README.md +164 -22
  2. package/dest/archiver.d.ts +158 -0
  3. package/dest/archiver.d.ts.map +1 -0
  4. package/dest/archiver.js +881 -0
  5. package/dest/config.d.ts +33 -0
  6. package/dest/config.d.ts.map +1 -0
  7. package/dest/{archiver/config.js → config.js} +31 -14
  8. package/dest/errors.d.ts +87 -0
  9. package/dest/errors.d.ts.map +1 -0
  10. package/dest/errors.js +129 -0
  11. package/dest/factory.d.ts +16 -10
  12. package/dest/factory.d.ts.map +1 -1
  13. package/dest/factory.js +112 -20
  14. package/dest/index.d.ts +19 -4
  15. package/dest/index.d.ts.map +1 -1
  16. package/dest/index.js +17 -3
  17. package/dest/interfaces.d.ts +9 -0
  18. package/dest/interfaces.d.ts.map +1 -0
  19. package/dest/interfaces.js +3 -0
  20. package/dest/{archiver/l1 → l1}/bin/retrieve-calldata.d.ts +1 -1
  21. package/dest/l1/bin/retrieve-calldata.d.ts.map +1 -0
  22. package/dest/{archiver/l1 → l1}/bin/retrieve-calldata.js +35 -32
  23. package/dest/l1/calldata_retriever.d.ts +136 -0
  24. package/dest/l1/calldata_retriever.d.ts.map +1 -0
  25. package/dest/l1/calldata_retriever.js +412 -0
  26. package/dest/l1/data_retrieval.d.ts +97 -0
  27. package/dest/l1/data_retrieval.d.ts.map +1 -0
  28. package/dest/{archiver/l1 → l1}/data_retrieval.js +65 -89
  29. package/dest/{archiver/l1 → l1}/debug_tx.d.ts +1 -1
  30. package/dest/l1/debug_tx.d.ts.map +1 -0
  31. package/dest/{archiver/l1 → l1}/spire_proposer.d.ts +5 -5
  32. package/dest/l1/spire_proposer.d.ts.map +1 -0
  33. package/dest/{archiver/l1 → l1}/spire_proposer.js +9 -17
  34. package/dest/l1/trace_tx.d.ts +43 -0
  35. package/dest/l1/trace_tx.d.ts.map +1 -0
  36. package/dest/l1/types.d.ts +12 -0
  37. package/dest/l1/types.d.ts.map +1 -0
  38. package/dest/l1/validate_historical_logs.d.ts +23 -0
  39. package/dest/l1/validate_historical_logs.d.ts.map +1 -0
  40. package/dest/l1/validate_historical_logs.js +108 -0
  41. package/dest/{archiver/l1 → l1}/validate_trace.d.ts +6 -3
  42. package/dest/l1/validate_trace.d.ts.map +1 -0
  43. package/dest/{archiver/l1 → l1}/validate_trace.js +13 -9
  44. package/dest/modules/contract_data_source_adapter.d.ts +25 -0
  45. package/dest/modules/contract_data_source_adapter.d.ts.map +1 -0
  46. package/dest/modules/contract_data_source_adapter.js +40 -0
  47. package/dest/modules/data_source_base.d.ts +113 -0
  48. package/dest/modules/data_source_base.d.ts.map +1 -0
  49. package/dest/modules/data_source_base.js +351 -0
  50. package/dest/modules/data_store_updater.d.ts +105 -0
  51. package/dest/modules/data_store_updater.d.ts.map +1 -0
  52. package/dest/modules/data_store_updater.js +392 -0
  53. package/dest/modules/instrumentation.d.ts +55 -0
  54. package/dest/modules/instrumentation.d.ts.map +1 -0
  55. package/dest/{archiver → modules}/instrumentation.js +61 -19
  56. package/dest/modules/l1_synchronizer.d.ts +77 -0
  57. package/dest/modules/l1_synchronizer.d.ts.map +1 -0
  58. package/dest/modules/l1_synchronizer.js +1344 -0
  59. package/dest/modules/validation.d.ts +18 -0
  60. package/dest/modules/validation.d.ts.map +1 -0
  61. package/dest/{archiver → modules}/validation.js +12 -6
  62. package/dest/store/block_store.d.ts +300 -0
  63. package/dest/store/block_store.d.ts.map +1 -0
  64. package/dest/store/block_store.js +1219 -0
  65. package/dest/store/contract_class_store.d.ts +31 -0
  66. package/dest/store/contract_class_store.d.ts.map +1 -0
  67. package/dest/store/contract_class_store.js +80 -0
  68. package/dest/store/contract_instance_store.d.ts +51 -0
  69. package/dest/store/contract_instance_store.d.ts.map +1 -0
  70. package/dest/{archiver/kv_archiver_store → store}/contract_instance_store.js +38 -3
  71. package/dest/store/data_stores.d.ts +68 -0
  72. package/dest/store/data_stores.d.ts.map +1 -0
  73. package/dest/store/data_stores.js +54 -0
  74. package/dest/store/function_names_cache.d.ts +17 -0
  75. package/dest/store/function_names_cache.d.ts.map +1 -0
  76. package/dest/store/function_names_cache.js +30 -0
  77. package/dest/store/l2_tips_cache.d.ts +25 -0
  78. package/dest/store/l2_tips_cache.d.ts.map +1 -0
  79. package/dest/store/l2_tips_cache.js +26 -0
  80. package/dest/store/log_store.d.ts +59 -0
  81. package/dest/store/log_store.d.ts.map +1 -0
  82. package/dest/store/log_store.js +310 -0
  83. package/dest/store/log_store_codec.d.ts +70 -0
  84. package/dest/store/log_store_codec.d.ts.map +1 -0
  85. package/dest/store/log_store_codec.js +101 -0
  86. package/dest/store/message_store.d.ts +50 -0
  87. package/dest/store/message_store.d.ts.map +1 -0
  88. package/dest/{archiver/kv_archiver_store → store}/message_store.js +51 -9
  89. package/dest/{archiver/structs → structs}/data_retrieval.d.ts +1 -1
  90. package/dest/structs/data_retrieval.d.ts.map +1 -0
  91. package/dest/structs/inbox_message.d.ts +15 -0
  92. package/dest/structs/inbox_message.d.ts.map +1 -0
  93. package/dest/{archiver/structs → structs}/published.d.ts +1 -1
  94. package/dest/structs/published.d.ts.map +1 -0
  95. package/dest/test/fake_l1_state.d.ts +214 -0
  96. package/dest/test/fake_l1_state.d.ts.map +1 -0
  97. package/dest/test/fake_l1_state.js +517 -0
  98. package/dest/test/index.d.ts +2 -1
  99. package/dest/test/index.d.ts.map +1 -1
  100. package/dest/test/index.js +4 -1
  101. package/dest/test/mock_archiver.d.ts +2 -2
  102. package/dest/test/mock_archiver.d.ts.map +1 -1
  103. package/dest/test/mock_archiver.js +3 -3
  104. package/dest/test/mock_l1_to_l2_message_source.d.ts +1 -1
  105. package/dest/test/mock_l1_to_l2_message_source.d.ts.map +1 -1
  106. package/dest/test/mock_l1_to_l2_message_source.js +2 -1
  107. package/dest/test/mock_l2_block_source.d.ts +65 -41
  108. package/dest/test/mock_l2_block_source.d.ts.map +1 -1
  109. package/dest/test/mock_l2_block_source.js +330 -151
  110. package/dest/test/mock_structs.d.ts +81 -3
  111. package/dest/test/mock_structs.d.ts.map +1 -1
  112. package/dest/test/mock_structs.js +152 -7
  113. package/dest/test/noop_l1_archiver.d.ts +29 -0
  114. package/dest/test/noop_l1_archiver.d.ts.map +1 -0
  115. package/dest/test/noop_l1_archiver.js +85 -0
  116. package/package.json +17 -18
  117. package/src/archiver.ts +681 -0
  118. package/src/{archiver/config.ts → config.ts} +43 -12
  119. package/src/errors.ts +203 -0
  120. package/src/factory.ts +175 -22
  121. package/src/index.ts +27 -3
  122. package/src/interfaces.ts +9 -0
  123. package/src/l1/README.md +55 -0
  124. package/src/{archiver/l1 → l1}/bin/retrieve-calldata.ts +45 -33
  125. package/src/l1/calldata_retriever.ts +522 -0
  126. package/src/{archiver/l1 → l1}/data_retrieval.ts +106 -134
  127. package/src/{archiver/l1 → l1}/spire_proposer.ts +7 -15
  128. package/src/l1/validate_historical_logs.ts +140 -0
  129. package/src/{archiver/l1 → l1}/validate_trace.ts +24 -6
  130. package/src/modules/contract_data_source_adapter.ts +55 -0
  131. package/src/modules/data_source_base.ts +493 -0
  132. package/src/modules/data_store_updater.ts +518 -0
  133. package/src/{archiver → modules}/instrumentation.ts +72 -20
  134. package/src/modules/l1_synchronizer.ts +1257 -0
  135. package/src/{archiver → modules}/validation.ts +15 -9
  136. package/src/store/block_store.ts +1590 -0
  137. package/src/store/contract_class_store.ts +108 -0
  138. package/src/{archiver/kv_archiver_store → store}/contract_instance_store.ts +52 -6
  139. package/src/store/data_stores.ts +104 -0
  140. package/src/store/function_names_cache.ts +37 -0
  141. package/src/store/l2_tips_cache.ts +35 -0
  142. package/src/store/log_store.ts +379 -0
  143. package/src/store/log_store_codec.ts +132 -0
  144. package/src/{archiver/kv_archiver_store → store}/message_store.ts +60 -10
  145. package/src/{archiver/structs → structs}/inbox_message.ts +1 -1
  146. package/src/test/fake_l1_state.ts +770 -0
  147. package/src/test/index.ts +4 -0
  148. package/src/test/mock_archiver.ts +4 -3
  149. package/src/test/mock_l1_to_l2_message_source.ts +1 -0
  150. package/src/test/mock_l2_block_source.ts +403 -171
  151. package/src/test/mock_structs.ts +283 -8
  152. package/src/test/noop_l1_archiver.ts +139 -0
  153. package/dest/archiver/archiver.d.ts +0 -307
  154. package/dest/archiver/archiver.d.ts.map +0 -1
  155. package/dest/archiver/archiver.js +0 -2102
  156. package/dest/archiver/archiver_store.d.ts +0 -315
  157. package/dest/archiver/archiver_store.d.ts.map +0 -1
  158. package/dest/archiver/archiver_store.js +0 -4
  159. package/dest/archiver/archiver_store_test_suite.d.ts +0 -8
  160. package/dest/archiver/archiver_store_test_suite.d.ts.map +0 -1
  161. package/dest/archiver/archiver_store_test_suite.js +0 -2770
  162. package/dest/archiver/config.d.ts +0 -22
  163. package/dest/archiver/config.d.ts.map +0 -1
  164. package/dest/archiver/errors.d.ts +0 -36
  165. package/dest/archiver/errors.d.ts.map +0 -1
  166. package/dest/archiver/errors.js +0 -54
  167. package/dest/archiver/index.d.ts +0 -7
  168. package/dest/archiver/index.d.ts.map +0 -1
  169. package/dest/archiver/index.js +0 -4
  170. package/dest/archiver/instrumentation.d.ts +0 -37
  171. package/dest/archiver/instrumentation.d.ts.map +0 -1
  172. package/dest/archiver/kv_archiver_store/block_store.d.ts +0 -164
  173. package/dest/archiver/kv_archiver_store/block_store.d.ts.map +0 -1
  174. package/dest/archiver/kv_archiver_store/block_store.js +0 -626
  175. package/dest/archiver/kv_archiver_store/contract_class_store.d.ts +0 -18
  176. package/dest/archiver/kv_archiver_store/contract_class_store.d.ts.map +0 -1
  177. package/dest/archiver/kv_archiver_store/contract_class_store.js +0 -120
  178. package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +0 -24
  179. package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +0 -1
  180. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +0 -159
  181. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +0 -1
  182. package/dest/archiver/kv_archiver_store/kv_archiver_store.js +0 -316
  183. package/dest/archiver/kv_archiver_store/log_store.d.ts +0 -45
  184. package/dest/archiver/kv_archiver_store/log_store.d.ts.map +0 -1
  185. package/dest/archiver/kv_archiver_store/log_store.js +0 -401
  186. package/dest/archiver/kv_archiver_store/message_store.d.ts +0 -40
  187. package/dest/archiver/kv_archiver_store/message_store.d.ts.map +0 -1
  188. package/dest/archiver/l1/bin/retrieve-calldata.d.ts.map +0 -1
  189. package/dest/archiver/l1/calldata_retriever.d.ts +0 -112
  190. package/dest/archiver/l1/calldata_retriever.d.ts.map +0 -1
  191. package/dest/archiver/l1/calldata_retriever.js +0 -471
  192. package/dest/archiver/l1/data_retrieval.d.ts +0 -90
  193. package/dest/archiver/l1/data_retrieval.d.ts.map +0 -1
  194. package/dest/archiver/l1/debug_tx.d.ts.map +0 -1
  195. package/dest/archiver/l1/spire_proposer.d.ts.map +0 -1
  196. package/dest/archiver/l1/trace_tx.d.ts +0 -97
  197. package/dest/archiver/l1/trace_tx.d.ts.map +0 -1
  198. package/dest/archiver/l1/types.d.ts +0 -12
  199. package/dest/archiver/l1/types.d.ts.map +0 -1
  200. package/dest/archiver/l1/validate_trace.d.ts.map +0 -1
  201. package/dest/archiver/structs/data_retrieval.d.ts.map +0 -1
  202. package/dest/archiver/structs/inbox_message.d.ts +0 -15
  203. package/dest/archiver/structs/inbox_message.d.ts.map +0 -1
  204. package/dest/archiver/structs/published.d.ts.map +0 -1
  205. package/dest/archiver/validation.d.ts +0 -17
  206. package/dest/archiver/validation.d.ts.map +0 -1
  207. package/dest/rpc/index.d.ts +0 -9
  208. package/dest/rpc/index.d.ts.map +0 -1
  209. package/dest/rpc/index.js +0 -15
  210. package/src/archiver/archiver.ts +0 -2265
  211. package/src/archiver/archiver_store.ts +0 -380
  212. package/src/archiver/archiver_store_test_suite.ts +0 -2842
  213. package/src/archiver/errors.ts +0 -90
  214. package/src/archiver/index.ts +0 -6
  215. package/src/archiver/kv_archiver_store/block_store.ts +0 -850
  216. package/src/archiver/kv_archiver_store/contract_class_store.ts +0 -176
  217. package/src/archiver/kv_archiver_store/kv_archiver_store.ts +0 -442
  218. package/src/archiver/kv_archiver_store/log_store.ts +0 -516
  219. package/src/archiver/l1/README.md +0 -98
  220. package/src/archiver/l1/calldata_retriever.ts +0 -641
  221. package/src/rpc/index.ts +0 -16
  222. /package/dest/{archiver/l1 → l1}/debug_tx.js +0 -0
  223. /package/dest/{archiver/l1 → l1}/trace_tx.js +0 -0
  224. /package/dest/{archiver/l1 → l1}/types.js +0 -0
  225. /package/dest/{archiver/structs → structs}/data_retrieval.js +0 -0
  226. /package/dest/{archiver/structs → structs}/inbox_message.js +0 -0
  227. /package/dest/{archiver/structs → structs}/published.js +0 -0
  228. /package/src/{archiver/l1 → l1}/debug_tx.ts +0 -0
  229. /package/src/{archiver/l1 → l1}/trace_tx.ts +0 -0
  230. /package/src/{archiver/l1 → l1}/types.ts +0 -0
  231. /package/src/{archiver/structs → structs}/data_retrieval.ts +0 -0
  232. /package/src/{archiver/structs → structs}/published.ts +0 -0
@@ -0,0 +1,31 @@
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
+ import type { AztecAsyncKVStore } from '@aztec/kv-store';
3
+ import type { ContractClassPublic, ContractClassPublicWithCommitment } from '@aztec/stdlib/contract';
4
+ /**
5
+ * LMDB-based contract class storage for the archiver.
6
+ */
7
+ export declare class ContractClassStore {
8
+ #private;
9
+ private db;
10
+ constructor(db: AztecAsyncKVStore);
11
+ /**
12
+ * Adds multiple contract classes to the store.
13
+ * @param data - Contract classes (with bytecode commitments) to add.
14
+ * @param blockNumber - L2 block number where the classes were registered.
15
+ * @returns True if every insert succeeded.
16
+ */
17
+ addContractClasses(data: ContractClassPublicWithCommitment[], blockNumber: number): Promise<boolean>;
18
+ /**
19
+ * Removes multiple contract classes from the store, but only if they were registered at or after the given block.
20
+ * @param data - Contract classes to delete.
21
+ * @param blockNumber - Lower bound on the block number at which the classes were registered.
22
+ * @returns True if every delete succeeded.
23
+ */
24
+ deleteContractClasses(data: ContractClassPublic[], blockNumber: number): Promise<boolean>;
25
+ addContractClass(contractClass: ContractClassPublic, bytecodeCommitment: Fr, blockNumber: number): Promise<void>;
26
+ deleteContractClass(contractClass: ContractClassPublic, blockNumber: number): Promise<void>;
27
+ getContractClass(id: Fr): Promise<ContractClassPublic | undefined>;
28
+ getBytecodeCommitment(id: Fr): Promise<Fr | undefined>;
29
+ getContractClassIds(): Promise<Fr[]>;
30
+ }
31
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RfY2xhc3Nfc3RvcmUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdG9yZS9jb250cmFjdF9jbGFzc19zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFHcEQsT0FBTyxLQUFLLEVBQUUsaUJBQWlCLEVBQWlCLE1BQU0saUJBQWlCLENBQUM7QUFDeEUsT0FBTyxLQUFLLEVBQ1YsbUJBQW1CLEVBRW5CLGlDQUFpQyxFQUNsQyxNQUFNLHdCQUF3QixDQUFDO0FBRWhDOztHQUVHO0FBQ0gscUJBQWEsa0JBQWtCOztJQUlqQixPQUFPLENBQUMsRUFBRTtJQUF0QixZQUFvQixFQUFFLEVBQUUsaUJBQWlCLEVBR3hDO0lBRUQ7Ozs7O09BS0c7SUFDRyxrQkFBa0IsQ0FBQyxJQUFJLEVBQUUsaUNBQWlDLEVBQUUsRUFBRSxXQUFXLEVBQUUsTUFBTSxHQUFHLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FJekc7SUFFRDs7Ozs7T0FLRztJQUNHLHFCQUFxQixDQUFDLElBQUksRUFBRSxtQkFBbUIsRUFBRSxFQUFFLFdBQVc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,CAAC,IAAI,EAAE,mBAAmB,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE9F;IAEK,gBAAgB,CACpB,aAAa,EAAE,mBAAmB,EAClC,kBAAkB,EAAE,EAAE,EACtB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAYf;IAEK,mBAAmB,CAAC,aAAa,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQhG;IAEK,gBAAgB,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAGvE;IAEK,qBAAqB,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC,CAG3D;IAEK,mBAAmB,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAEzC;CACF"}
@@ -0,0 +1,80 @@
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
+ import { toArray } from '@aztec/foundation/iterable';
3
+ import { BufferReader, numToUInt8, serializeToBuffer } from '@aztec/foundation/serialize';
4
+ /**
5
+ * LMDB-based contract class storage for the archiver.
6
+ */ export class ContractClassStore {
7
+ db;
8
+ #contractClasses;
9
+ #bytecodeCommitments;
10
+ constructor(db){
11
+ this.db = db;
12
+ this.#contractClasses = db.openMap('archiver_contract_classes');
13
+ this.#bytecodeCommitments = db.openMap('archiver_bytecode_commitments');
14
+ }
15
+ /**
16
+ * Adds multiple contract classes to the store.
17
+ * @param data - Contract classes (with bytecode commitments) to add.
18
+ * @param blockNumber - L2 block number where the classes were registered.
19
+ * @returns True if every insert succeeded.
20
+ */ async addContractClasses(data, blockNumber) {
21
+ return (await Promise.all(data.map((c)=>this.addContractClass(c, c.publicBytecodeCommitment, blockNumber)))).every(Boolean);
22
+ }
23
+ /**
24
+ * Removes multiple contract classes from the store, but only if they were registered at or after the given block.
25
+ * @param data - Contract classes to delete.
26
+ * @param blockNumber - Lower bound on the block number at which the classes were registered.
27
+ * @returns True if every delete succeeded.
28
+ */ async deleteContractClasses(data, blockNumber) {
29
+ return (await Promise.all(data.map((c)=>this.deleteContractClass(c, blockNumber)))).every(Boolean);
30
+ }
31
+ async addContractClass(contractClass, bytecodeCommitment, blockNumber) {
32
+ await this.db.transactionAsync(async ()=>{
33
+ const key = contractClass.id.toString();
34
+ if (await this.#contractClasses.hasAsync(key)) {
35
+ throw new Error(`Contract class ${key} already exists, cannot add again at block ${blockNumber}`);
36
+ }
37
+ await this.#contractClasses.set(key, serializeContractClassPublic({
38
+ ...contractClass,
39
+ l2BlockNumber: blockNumber
40
+ }));
41
+ await this.#bytecodeCommitments.set(key, bytecodeCommitment.toBuffer());
42
+ });
43
+ }
44
+ async deleteContractClass(contractClass, blockNumber) {
45
+ const restoredContractClass = await this.#contractClasses.getAsync(contractClass.id.toString());
46
+ if (restoredContractClass && deserializeContractClassPublic(restoredContractClass).l2BlockNumber >= blockNumber) {
47
+ await this.db.transactionAsync(async ()=>{
48
+ await this.#contractClasses.delete(contractClass.id.toString());
49
+ await this.#bytecodeCommitments.delete(contractClass.id.toString());
50
+ });
51
+ }
52
+ }
53
+ async getContractClass(id) {
54
+ const contractClass = await this.#contractClasses.getAsync(id.toString());
55
+ return contractClass && {
56
+ ...deserializeContractClassPublic(contractClass),
57
+ id
58
+ };
59
+ }
60
+ async getBytecodeCommitment(id) {
61
+ const value = await this.#bytecodeCommitments.getAsync(id.toString());
62
+ return value === undefined ? undefined : Fr.fromBuffer(value);
63
+ }
64
+ async getContractClassIds() {
65
+ return (await toArray(this.#contractClasses.keysAsync())).map((key)=>Fr.fromHexString(key));
66
+ }
67
+ }
68
+ function serializeContractClassPublic(contractClass) {
69
+ return serializeToBuffer(contractClass.l2BlockNumber, numToUInt8(contractClass.version), contractClass.artifactHash, contractClass.packedBytecode.length, contractClass.packedBytecode, contractClass.privateFunctionsRoot);
70
+ }
71
+ function deserializeContractClassPublic(buffer) {
72
+ const reader = BufferReader.asReader(buffer);
73
+ return {
74
+ l2BlockNumber: reader.readNumber(),
75
+ version: reader.readUInt8(),
76
+ artifactHash: reader.readObject(Fr),
77
+ packedBytecode: reader.readBuffer(),
78
+ privateFunctionsRoot: reader.readObject(Fr)
79
+ };
80
+ }
@@ -0,0 +1,51 @@
1
+ import type { Fr } from '@aztec/foundation/curves/bn254';
2
+ import type { AztecAsyncKVStore } from '@aztec/kv-store';
3
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
+ import { type ContractInstanceUpdateWithAddress, type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
5
+ import type { UInt64 } from '@aztec/stdlib/types';
6
+ type ContractInstanceUpdateKey = [string, string] | [string, string, number];
7
+ /**
8
+ * LMDB-based contract instance storage for the archiver.
9
+ */
10
+ export declare class ContractInstanceStore {
11
+ #private;
12
+ private db;
13
+ constructor(db: AztecAsyncKVStore);
14
+ /**
15
+ * Adds multiple contract instances to the store.
16
+ * @param data - Contract instances to add.
17
+ * @param blockNumber - L2 block number where the instances were deployed.
18
+ * @returns True if every insert succeeded.
19
+ */
20
+ addContractInstances(data: ContractInstanceWithAddress[], blockNumber: number): Promise<boolean>;
21
+ /**
22
+ * Removes multiple contract instances from the store.
23
+ * @param data - Contract instances to delete.
24
+ * @returns True if every delete succeeded.
25
+ */
26
+ deleteContractInstances(data: ContractInstanceWithAddress[]): Promise<boolean>;
27
+ /**
28
+ * Adds multiple contract instance updates to the store.
29
+ * @param data - Contract instance updates to add.
30
+ * @param timestamp - Timestamp at which the updates were scheduled.
31
+ * @returns True if every insert succeeded.
32
+ */
33
+ addContractInstanceUpdates(data: ContractInstanceUpdateWithAddress[], timestamp: UInt64): Promise<boolean>;
34
+ /**
35
+ * Removes multiple contract instance updates from the store.
36
+ * @param data - Contract instance updates to delete.
37
+ * @param timestamp - Timestamp at which the updates were scheduled.
38
+ * @returns True if every delete succeeded.
39
+ */
40
+ deleteContractInstanceUpdates(data: ContractInstanceUpdateWithAddress[], timestamp: UInt64): Promise<boolean>;
41
+ addContractInstance(contractInstance: ContractInstanceWithAddress, blockNumber: number): Promise<void>;
42
+ deleteContractInstance(contractInstance: ContractInstanceWithAddress): Promise<void>;
43
+ getUpdateKey(contractAddress: AztecAddress, timestamp: UInt64, logIndex?: number): ContractInstanceUpdateKey;
44
+ addContractInstanceUpdate(contractInstanceUpdate: ContractInstanceUpdateWithAddress, timestamp: UInt64, logIndex: number): Promise<void>;
45
+ deleteContractInstanceUpdate(contractInstanceUpdate: ContractInstanceUpdateWithAddress, timestamp: UInt64, logIndex: number): Promise<void>;
46
+ getCurrentContractInstanceClassId(address: AztecAddress, timestamp: UInt64, originalClassId: Fr): Promise<Fr>;
47
+ getContractInstance(address: AztecAddress, timestamp: UInt64): Promise<ContractInstanceWithAddress | undefined>;
48
+ getContractInstanceDeploymentBlockNumber(address: AztecAddress): Promise<number | undefined>;
49
+ }
50
+ export {};
51
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RfaW5zdGFuY2Vfc3RvcmUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdG9yZS9jb250cmFjdF9pbnN0YW5jZV9zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUN6RCxPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBaUIsTUFBTSxpQkFBaUIsQ0FBQztBQUN4RSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUNoRSxPQUFPLEVBQ0wsS0FBSyxpQ0FBaUMsRUFDdEMsS0FBSywyQkFBMkIsRUFHakMsTUFBTSx3QkFBd0IsQ0FBQztBQUNoQyxPQUFPLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxxQkF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AM,GACf,OAAO,CAAC,IAAI,CAAC,CAEf;IAEK,iCAAiC,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,CAoBlH;IAEK,mBAAmB,CACvB,OAAO,EAAE,YAAY,EACrB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAalD;IAED,wCAAwC,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE3F;CACF"}
@@ -1,6 +1,6 @@
1
1
  import { SerializableContractInstance, SerializableContractInstanceUpdate } from '@aztec/stdlib/contract';
2
2
  /**
3
- * LMDB implementation of the ArchiverDataStore interface.
3
+ * LMDB-based contract instance storage for the archiver.
4
4
  */ export class ContractInstanceStore {
5
5
  db;
6
6
  #contractInstances;
@@ -12,10 +12,45 @@ import { SerializableContractInstance, SerializableContractInstanceUpdate } from
12
12
  this.#contractInstancePublishedAt = db.openMap('archiver_contract_instances_publication_block_number');
13
13
  this.#contractInstanceUpdates = db.openMap('archiver_contract_instance_updates');
14
14
  }
15
+ /**
16
+ * Adds multiple contract instances to the store.
17
+ * @param data - Contract instances to add.
18
+ * @param blockNumber - L2 block number where the instances were deployed.
19
+ * @returns True if every insert succeeded.
20
+ */ async addContractInstances(data, blockNumber) {
21
+ return (await Promise.all(data.map((c)=>this.addContractInstance(c, blockNumber)))).every(Boolean);
22
+ }
23
+ /**
24
+ * Removes multiple contract instances from the store.
25
+ * @param data - Contract instances to delete.
26
+ * @returns True if every delete succeeded.
27
+ */ async deleteContractInstances(data) {
28
+ return (await Promise.all(data.map((c)=>this.deleteContractInstance(c)))).every(Boolean);
29
+ }
30
+ /**
31
+ * Adds multiple contract instance updates to the store.
32
+ * @param data - Contract instance updates to add.
33
+ * @param timestamp - Timestamp at which the updates were scheduled.
34
+ * @returns True if every insert succeeded.
35
+ */ async addContractInstanceUpdates(data, timestamp) {
36
+ return (await Promise.all(data.map((update, logIndex)=>this.addContractInstanceUpdate(update, timestamp, logIndex)))).every(Boolean);
37
+ }
38
+ /**
39
+ * Removes multiple contract instance updates from the store.
40
+ * @param data - Contract instance updates to delete.
41
+ * @param timestamp - Timestamp at which the updates were scheduled.
42
+ * @returns True if every delete succeeded.
43
+ */ async deleteContractInstanceUpdates(data, timestamp) {
44
+ return (await Promise.all(data.map((update, logIndex)=>this.deleteContractInstanceUpdate(update, timestamp, logIndex)))).every(Boolean);
45
+ }
15
46
  addContractInstance(contractInstance, blockNumber) {
16
47
  return this.db.transactionAsync(async ()=>{
17
- await this.#contractInstances.set(contractInstance.address.toString(), new SerializableContractInstance(contractInstance).toBuffer());
18
- await this.#contractInstancePublishedAt.set(contractInstance.address.toString(), blockNumber);
48
+ const key = contractInstance.address.toString();
49
+ if (await this.#contractInstances.hasAsync(key)) {
50
+ throw new Error(`Contract instance at ${key} already exists (deployed at block ${await this.#contractInstancePublishedAt.getAsync(key)}), cannot add again at block ${blockNumber}`);
51
+ }
52
+ await this.#contractInstances.set(key, new SerializableContractInstance(contractInstance).toBuffer());
53
+ await this.#contractInstancePublishedAt.set(key, blockNumber);
19
54
  });
20
55
  }
21
56
  deleteContractInstance(contractInstance) {
@@ -0,0 +1,68 @@
1
+ import type { L1BlockId } from '@aztec/ethereum/l1-types';
2
+ import type { AztecAsyncKVStore } from '@aztec/kv-store';
3
+ import type { BlockHash } from '@aztec/stdlib/block';
4
+ import type { ContractDataSource } from '@aztec/stdlib/contract';
5
+ import { BlockStore } from './block_store.js';
6
+ import { ContractClassStore } from './contract_class_store.js';
7
+ import { ContractInstanceStore } from './contract_instance_store.js';
8
+ import { FunctionNamesCache } from './function_names_cache.js';
9
+ import { LogStore } from './log_store.js';
10
+ import { MessageStore } from './message_store.js';
11
+ export declare const ARCHIVER_DB_VERSION = 7;
12
+ /**
13
+ * Represents the latest L1 block processed by the archiver for various objects in L2.
14
+ */
15
+ export type ArchiverL1SynchPoint = {
16
+ /** Number of the last L1 block that added a new L2 checkpoint metadata. */
17
+ blocksSynchedTo?: bigint;
18
+ /** Last L1 block checked for L1 to L2 messages. */
19
+ messagesSynchedTo?: L1BlockId;
20
+ };
21
+ /**
22
+ * Bundle of archiver-owned LMDB substores plus the in-memory caches that span them.
23
+ *
24
+ * Replaces the former `KVArchiverDataStore` pass-through wrapper. Callers reach into
25
+ * the relevant substore directly (e.g. `stores.blocks.getBlock`) and use
26
+ * {@link createArchiverDataStores} to wire them up against a shared KV store.
27
+ */
28
+ export type ArchiverDataStores = {
29
+ /** The underlying key-value store. Use {@link AztecAsyncKVStore.transactionAsync} to compose updates atomically. */
30
+ db: AztecAsyncKVStore;
31
+ /** Blocks, checkpoints, tx effects, proven/finalized state. */
32
+ blocks: BlockStore;
33
+ /** Public, private and contract class logs. */
34
+ logs: LogStore;
35
+ /** L1 to L2 messages and message sync state. */
36
+ messages: MessageStore;
37
+ /** Contract classes (with bytecode commitments). */
38
+ contractClasses: ContractClassStore;
39
+ /** Contract instances and contract instance updates. */
40
+ contractInstances: ContractInstanceStore;
41
+ /** In-memory cache of public function selectors -> names. */
42
+ functionNames: FunctionNamesCache;
43
+ };
44
+ /**
45
+ * Wires up the archiver substores against a shared KV store and returns the
46
+ * {@link ArchiverDataStores} bundle.
47
+ *
48
+ * @param genesisBlockHash - Hash of the synthetic genesis block, forwarded to the {@link LogStore} so it
49
+ * can resolve a genesis `referenceBlock` (used by the PXE during early sync) instead of treating it as a
50
+ * reorg.
51
+ */
52
+ export declare function createArchiverDataStores(db: AztecAsyncKVStore, genesisBlockHash: BlockHash): ArchiverDataStores;
53
+ /**
54
+ * Returns the L1 sync point of the archiver, combining the block sync point from {@link BlockStore}
55
+ * and the message sync point from {@link MessageStore}.
56
+ */
57
+ export declare function getArchiverSynchPoint(stores: ArchiverDataStores): Promise<ArchiverL1SynchPoint>;
58
+ /**
59
+ * Backs up the underlying KV store to the given folder. Returns the path to the resulting db file.
60
+ */
61
+ export declare function backupArchiverDataStores(stores: ArchiverDataStores, path: string, compress?: boolean): Promise<string>;
62
+ /**
63
+ * Returns a {@link ContractDataSource} adapter over {@link ArchiverDataStores}.
64
+ * Used by contexts (e.g. offline epoch re-prover tools) that need a ContractDataSource
65
+ * but do not need a full archiver instance.
66
+ */
67
+ export declare function createContractDataSource(stores: ArchiverDataStores): ContractDataSource;
68
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YV9zdG9yZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdG9yZS9kYXRhX3N0b3Jlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMxRCxPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ3pELE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3JELE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFLakUsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQzlDLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQy9ELE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBQ3JFLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQy9ELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUMxQyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFFbEQsZUFBTyxNQUFNLG1CQUFtQixJQUFJLENBQUM7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AC;IACpC,wDAAwD;IACxD,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,6DAA6D;IAC7D,aAAa,EAAE,kBAAkB,CAAC;CACnC,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,SAAS,GAAG,kBAAkB,CAW/G;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAMrG;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,kBAAkB,EAC1B,IAAI,EAAE,MAAM,EACZ,QAAQ,UAAO,GACd,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAEvF"}
@@ -0,0 +1,54 @@
1
+ import { join } from 'path';
2
+ import { ArchiverContractDataSourceAdapter } from '../modules/contract_data_source_adapter.js';
3
+ import { BlockStore } from './block_store.js';
4
+ import { ContractClassStore } from './contract_class_store.js';
5
+ import { ContractInstanceStore } from './contract_instance_store.js';
6
+ import { FunctionNamesCache } from './function_names_cache.js';
7
+ import { LogStore } from './log_store.js';
8
+ import { MessageStore } from './message_store.js';
9
+ export const ARCHIVER_DB_VERSION = 7;
10
+ /**
11
+ * Wires up the archiver substores against a shared KV store and returns the
12
+ * {@link ArchiverDataStores} bundle.
13
+ *
14
+ * @param genesisBlockHash - Hash of the synthetic genesis block, forwarded to the {@link LogStore} so it
15
+ * can resolve a genesis `referenceBlock` (used by the PXE during early sync) instead of treating it as a
16
+ * reorg.
17
+ */ export function createArchiverDataStores(db, genesisBlockHash) {
18
+ const blocks = new BlockStore(db);
19
+ return {
20
+ db,
21
+ blocks,
22
+ logs: new LogStore(db, blocks, genesisBlockHash),
23
+ messages: new MessageStore(db),
24
+ contractClasses: new ContractClassStore(db),
25
+ contractInstances: new ContractInstanceStore(db),
26
+ functionNames: new FunctionNamesCache()
27
+ };
28
+ }
29
+ /**
30
+ * Returns the L1 sync point of the archiver, combining the block sync point from {@link BlockStore}
31
+ * and the message sync point from {@link MessageStore}.
32
+ */ export async function getArchiverSynchPoint(stores) {
33
+ const [blocksSynchedTo, messagesSynchedTo] = await Promise.all([
34
+ stores.blocks.getSynchedL1BlockNumber(),
35
+ stores.messages.getSynchedL1Block()
36
+ ]);
37
+ return {
38
+ blocksSynchedTo,
39
+ messagesSynchedTo
40
+ };
41
+ }
42
+ /**
43
+ * Backs up the underlying KV store to the given folder. Returns the path to the resulting db file.
44
+ */ export async function backupArchiverDataStores(stores, path, compress = true) {
45
+ await stores.db.backupTo(path, compress);
46
+ return join(path, 'data.mdb');
47
+ }
48
+ /**
49
+ * Returns a {@link ContractDataSource} adapter over {@link ArchiverDataStores}.
50
+ * Used by contexts (e.g. offline epoch re-prover tools) that need a ContractDataSource
51
+ * but do not need a full archiver instance.
52
+ */ export function createContractDataSource(stores) {
53
+ return new ArchiverContractDataSourceAdapter(stores);
54
+ }
@@ -0,0 +1,17 @@
1
+ import { FunctionSelector } from '@aztec/stdlib/abi';
2
+ /**
3
+ * In-memory cache mapping public function selectors to function names.
4
+ *
5
+ * Populated opportunistically (e.g. by PXE registering signatures from artifacts) so the
6
+ * archiver can attach human-readable names to logs and traces. Bounded by
7
+ * {@link MAX_FUNCTION_SIGNATURES} to avoid unbounded growth from untrusted callers.
8
+ */
9
+ export declare class FunctionNamesCache {
10
+ private readonly log;
11
+ private readonly names;
12
+ /** Adds the given public function signatures to the cache. */
13
+ register(signatures: string[]): Promise<void>;
14
+ /** Looks up a function name for the given selector, or returns undefined if not registered. */
15
+ get(selector: FunctionSelector): string | undefined;
16
+ }
17
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb25fbmFtZXNfY2FjaGUuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdG9yZS9mdW5jdGlvbl9uYW1lc19jYWNoZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUtyRDs7Ozs7O0dBTUc7QUFDSCxxQkFBYSxrQkFBa0I7SUFDN0IsT0FBTyxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQXdDO0lBQzVELE9BQU8sQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFrQztJQUV4RCw4REFBOEQ7SUFDakQsUUFBUSxDQUFDLFVBQVUsRUFBRSxNQUFNLEVBQUUsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLENBWXpEO0lBRUQsK0ZBQStGO0lBQ3hGLEdBQUcsQ0FBQyxRQUFRLEVBQUUsZ0JBQWdCLEdBQUcsTUFBTSxHQUFHLFNBQVMsQ0FFekQ7Q0FDRiJ9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function_names_cache.d.ts","sourceRoot":"","sources":["../../src/store/function_names_cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAKrD;;;;;;GAMG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAwC;IAC5D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkC;IAExD,8DAA8D;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAYzD;IAED,+FAA+F;IACxF,GAAG,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,GAAG,SAAS,CAEzD;CACF"}
@@ -0,0 +1,30 @@
1
+ import { createLogger } from '@aztec/foundation/log';
2
+ import { FunctionSelector } from '@aztec/stdlib/abi';
3
+ const MAX_FUNCTION_SIGNATURES = 1000;
4
+ const MAX_FUNCTION_NAME_LEN = 256;
5
+ /**
6
+ * In-memory cache mapping public function selectors to function names.
7
+ *
8
+ * Populated opportunistically (e.g. by PXE registering signatures from artifacts) so the
9
+ * archiver can attach human-readable names to logs and traces. Bounded by
10
+ * {@link MAX_FUNCTION_SIGNATURES} to avoid unbounded growth from untrusted callers.
11
+ */ export class FunctionNamesCache {
12
+ log = createLogger('archiver:data-stores');
13
+ names = new Map();
14
+ /** Adds the given public function signatures to the cache. */ async register(signatures) {
15
+ for (const sig of signatures){
16
+ if (this.names.size > MAX_FUNCTION_SIGNATURES) {
17
+ return;
18
+ }
19
+ try {
20
+ const selector = await FunctionSelector.fromSignature(sig);
21
+ this.names.set(selector.toString(), sig.slice(0, sig.indexOf('(')).slice(0, MAX_FUNCTION_NAME_LEN));
22
+ } catch {
23
+ this.log.warn(`Failed to parse signature: ${sig}. Ignoring`);
24
+ }
25
+ }
26
+ }
27
+ /** Looks up a function name for the given selector, or returns undefined if not registered. */ get(selector) {
28
+ return this.names.get(selector.toString());
29
+ }
30
+ }
@@ -0,0 +1,25 @@
1
+ import type { BlockHash, L2Tips } from '@aztec/stdlib/block';
2
+ import type { BlockStore } from './block_store.js';
3
+ /**
4
+ * In-memory cache for L2 chain tips (proposed, checkpointed, proven, finalized).
5
+ * Populated from the BlockStore on first access, then kept up-to-date by the ArchiverDataStoreUpdater.
6
+ * Refresh calls should happen *after* the store transaction that mutates block data has committed,
7
+ * so the cache loads from committed state and is never replaced if the writer aborts.
8
+ */
9
+ export declare class L2TipsCache {
10
+ #private;
11
+ private blockStore;
12
+ private readonly initialBlockHash;
13
+ /**
14
+ * The genesis block hash is dynamic — derived from the injected initial header, which depends on
15
+ * `genesisTimestamp` and any prefilled state — so it is supplied here rather than read from store.
16
+ * The genesis checkpoint hash, by contrast, is the static protocol constant and is resolved
17
+ * inside the block store.
18
+ */
19
+ constructor(blockStore: BlockStore, initialBlockHash: BlockHash);
20
+ /** Returns the cached L2 tips. Loads from the block store on first call. */
21
+ getL2Tips(): Promise<L2Tips>;
22
+ /** Reloads the L2 tips from the block store. Should be called after the writer transaction has committed. */
23
+ refresh(): Promise<void>;
24
+ }
25
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibDJfdGlwc19jYWNoZS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3N0b3JlL2wyX3RpcHNfY2FjaGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBRTdELE9BQU8sS0FBSyxFQUFFLFVBQVUsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRW5EOzs7OztHQUtHO0FBQ0gscUJBQWEsV0FBVzs7SUFVcEIsT0FBTyxDQUFDLFVBQVU7SUFDbEIsT0FBTyxDQUFDLFFBQVEsQ0FBQyxnQkFBZ0I7SUFSbkM7Ozs7O09BS0c7SUFDSCxZQUNVLFVBQVUsRUFBRSxVQUFVLEVBQ2IsZ0JBQWdCLEVBQUUsU0FBUyxFQUMxQztJQUVKLDRFQUE0RTtJQUNyRSxTQUFTLElBQUksT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUVsQztJQUVELDZHQUE2RztJQUNoRyxPQUFPLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUdwQztDQUNGIn0=
@@ -0,0 +1 @@
1
+ {"version":3,"file":"l2_tips_cache.d.ts","sourceRoot":"","sources":["../../src/store/l2_tips_cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;GAKG;AACH,qBAAa,WAAW;;IAUpB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IARnC;;;;;OAKG;IACH,YACU,UAAU,EAAE,UAAU,EACb,gBAAgB,EAAE,SAAS,EAC1C;IAEJ,4EAA4E;IACrE,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAElC;IAED,6GAA6G;IAChG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAGpC;CACF"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * In-memory cache for L2 chain tips (proposed, checkpointed, proven, finalized).
3
+ * Populated from the BlockStore on first access, then kept up-to-date by the ArchiverDataStoreUpdater.
4
+ * Refresh calls should happen *after* the store transaction that mutates block data has committed,
5
+ * so the cache loads from committed state and is never replaced if the writer aborts.
6
+ */ export class L2TipsCache {
7
+ blockStore;
8
+ initialBlockHash;
9
+ #tipsPromise;
10
+ /**
11
+ * The genesis block hash is dynamic — derived from the injected initial header, which depends on
12
+ * `genesisTimestamp` and any prefilled state — so it is supplied here rather than read from store.
13
+ * The genesis checkpoint hash, by contrast, is the static protocol constant and is resolved
14
+ * inside the block store.
15
+ */ constructor(blockStore, initialBlockHash){
16
+ this.blockStore = blockStore;
17
+ this.initialBlockHash = initialBlockHash;
18
+ }
19
+ /** Returns the cached L2 tips. Loads from the block store on first call. */ getL2Tips() {
20
+ return this.#tipsPromise ??= this.blockStore.getL2TipsData(this.initialBlockHash);
21
+ }
22
+ /** Reloads the L2 tips from the block store. Should be called after the writer transaction has committed. */ async refresh() {
23
+ this.#tipsPromise = this.blockStore.getL2TipsData(this.initialBlockHash);
24
+ await this.#tipsPromise;
25
+ }
26
+ }
@@ -0,0 +1,59 @@
1
+ import type { AztecAsyncKVStore } from '@aztec/kv-store';
2
+ import type { BlockHash, L2Block } from '@aztec/stdlib/block';
3
+ import type { LogResult, PrivateLogsQuery, PublicLogsQuery } from '@aztec/stdlib/logs';
4
+ import type { BlockStore } from './block_store.js';
5
+ /**
6
+ * Indexes every emitted private and public log under a composite hex-string key
7
+ * `[contractAddress (public only)]-tag-blockNumber-txIndexWithinBlock-logIndexWithinTx`,
8
+ * where each numeric segment is zero-padded to 8 lowercase hex digits (4 bytes BE) and
9
+ * `contractAddress` / `tag` are the bare 64-hex-char field representations (no `0x` prefix). The
10
+ * fixed-width zero-padded hex segments sort lexicographically in the same order as the canonical
11
+ * `(contract, tag, blockNumber, txIndexWithinBlock, logIndexWithinTx)` tuple, so a single ordered
12
+ * range scan answers every {@link PrivateLogsQuery} / {@link PublicLogsQuery}.
13
+ *
14
+ * Per-block secondary indices (`#privateKeysByBlock`, `#publicKeysByBlock`) record the exact primary
15
+ * keys written for each block so {@link deleteLogs} can drop them on reorg without having to range
16
+ * scan by block (block isn't the leading key segment).
17
+ *
18
+ * Contract-class logs are no longer stored or served by the log store.
19
+ */
20
+ export declare class LogStore {
21
+ #private;
22
+ private db;
23
+ private blockStore;
24
+ private readonly genesisBlockHash;
25
+ /**
26
+ * @param genesisBlockHash - Hash of the synthetic genesis block. During early sync the PXE anchors to
27
+ * genesis and passes its hash as a query `referenceBlock`; since the archiver never indexes the
28
+ * genesis block, the store recognizes this hash directly and resolves it to the genesis block number
29
+ * rather than mistaking it for a reorg.
30
+ */
31
+ constructor(db: AztecAsyncKVStore, blockStore: BlockStore, genesisBlockHash: BlockHash);
32
+ /**
33
+ * Indexes every emitted private and public log from the given blocks. Wraps the write in a single
34
+ * `db.transactionAsync` so the primary entries and the per-block secondary indices stay consistent.
35
+ *
36
+ * A block is only ever added once; on reorg the archiver calls {@link deleteLogs} first, so we write
37
+ * the secondary index entries with a plain `set` (overwrite) rather than read-modify-append.
38
+ */
39
+ addLogs(blocks: L2Block[]): Promise<boolean>;
40
+ /**
41
+ * Deletes every log indexed under any of the given blocks. Secondary-index driven, so it doesn't
42
+ * have to range-scan the primary maps.
43
+ */
44
+ deleteLogs(blocks: L2Block[]): Promise<boolean>;
45
+ /** Returns one inner array per element of `query.tags`, in input order. */
46
+ getPrivateLogsByTags(query: PrivateLogsQuery): Promise<LogResult[][]>;
47
+ /** Returns one inner array per element of `query.tags`, in input order. */
48
+ getPublicLogsByTags(query: PublicLogsQuery): Promise<LogResult[][]>;
49
+ /**
50
+ * Reads back every private log indexed for the given block via the per-block secondary index. Order
51
+ * matches the canonical composite-key order (`tag`, `blockNumber`, `txIndexWithinBlock`,
52
+ * `logIndexWithinTx`). Used by the data-store-updater test suite to verify the indexed-vs-block-body
53
+ * counts without depending on the removed `getPublicLogs(LogFilter)` API.
54
+ */
55
+ getPrivateLogsForBlock(blockNumber: number): Promise<LogResult[]>;
56
+ /** {@inheritDoc LogStore.getPrivateLogsForBlock} */
57
+ getPublicLogsForBlock(blockNumber: number): Promise<LogResult[]>;
58
+ }
59
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nX3N0b3JlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc3RvcmUvbG9nX3N0b3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLE9BQU8sS0FBSyxFQUFFLGlCQUFpQixFQUFpQixNQUFNLGlCQUFpQixDQUFDO0FBQ3hFLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxPQUFPLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUU5RCxPQUFPLEtBQUssRUFFVixTQUFTLEVBQ1QsZ0JBQWdCLEVBQ2hCLGVBQWUsRUFJaEIsTUFBTSxvQkFBb0IsQ0FBQztBQUc1QixPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQWFuRDs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUNILHFCQUFhLFFBQVE7O0lBbUJqQixPQUFPLENBQUMsRUFBRTtJQUNWLE9BQU8sQ0FBQyxVQUFVO0lBQ2xCLE9BQU8sQ0FBQyxRQUFRLENBQUMsZ0JBQWdCO0lBVG5DOzs7OztPQUtHO0lBQ0gsWUFDVSxFQUFFLEVBQUUsaUJBQWlCLEVBQ3JCLFVBQVUsRUFBRSxVQUFVL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