@aztec/archiver 4.0.0-nightly.20260113 → 4.0.0-nightly.20260115

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 (174) hide show
  1. package/README.md +139 -22
  2. package/dest/archiver.d.ts +134 -0
  3. package/dest/archiver.d.ts.map +1 -0
  4. package/dest/archiver.js +767 -0
  5. package/dest/{archiver/config.d.ts → config.d.ts} +9 -1
  6. package/dest/config.d.ts.map +1 -0
  7. package/dest/{archiver/config.js → config.js} +9 -0
  8. package/dest/{archiver/errors.d.ts → errors.d.ts} +1 -1
  9. package/dest/errors.d.ts.map +1 -0
  10. package/dest/factory.d.ts +5 -6
  11. package/dest/factory.d.ts.map +1 -1
  12. package/dest/factory.js +82 -5
  13. package/dest/index.d.ts +10 -4
  14. package/dest/index.d.ts.map +1 -1
  15. package/dest/index.js +8 -3
  16. package/dest/interfaces.d.ts +9 -0
  17. package/dest/interfaces.d.ts.map +1 -0
  18. package/dest/interfaces.js +3 -0
  19. package/dest/{archiver/l1 → l1}/bin/retrieve-calldata.d.ts +1 -1
  20. package/dest/l1/bin/retrieve-calldata.d.ts.map +1 -0
  21. package/dest/{archiver/l1 → l1}/calldata_retriever.d.ts +2 -2
  22. package/dest/l1/calldata_retriever.d.ts.map +1 -0
  23. package/dest/l1/data_retrieval.d.ts +88 -0
  24. package/dest/l1/data_retrieval.d.ts.map +1 -0
  25. package/dest/{archiver/l1 → l1}/data_retrieval.js +32 -51
  26. package/dest/{archiver/l1 → l1}/debug_tx.d.ts +1 -1
  27. package/dest/l1/debug_tx.d.ts.map +1 -0
  28. package/dest/{archiver/l1 → l1}/spire_proposer.d.ts +1 -1
  29. package/dest/l1/spire_proposer.d.ts.map +1 -0
  30. package/dest/{archiver/l1 → l1}/trace_tx.d.ts +1 -1
  31. package/dest/l1/trace_tx.d.ts.map +1 -0
  32. package/dest/l1/types.d.ts +12 -0
  33. package/dest/l1/types.d.ts.map +1 -0
  34. package/dest/{archiver/l1 → l1}/validate_trace.d.ts +1 -1
  35. package/dest/l1/validate_trace.d.ts.map +1 -0
  36. package/dest/modules/data_source_base.d.ts +83 -0
  37. package/dest/modules/data_source_base.d.ts.map +1 -0
  38. package/dest/modules/data_source_base.js +301 -0
  39. package/dest/modules/data_store_updater.d.ts +46 -0
  40. package/dest/modules/data_store_updater.d.ts.map +1 -0
  41. package/dest/modules/data_store_updater.js +216 -0
  42. package/dest/modules/instrumentation.d.ts +37 -0
  43. package/dest/modules/instrumentation.d.ts.map +1 -0
  44. package/dest/modules/l1_synchronizer.d.ts +67 -0
  45. package/dest/modules/l1_synchronizer.d.ts.map +1 -0
  46. package/dest/modules/l1_synchronizer.js +1064 -0
  47. package/dest/{archiver → modules}/validation.d.ts +1 -1
  48. package/dest/modules/validation.d.ts.map +1 -0
  49. package/dest/{archiver/kv_archiver_store → store}/block_store.d.ts +2 -2
  50. package/dest/store/block_store.d.ts.map +1 -0
  51. package/dest/{archiver/kv_archiver_store → store}/block_store.js +1 -1
  52. package/dest/store/contract_class_store.d.ts +18 -0
  53. package/dest/store/contract_class_store.d.ts.map +1 -0
  54. package/dest/{archiver/kv_archiver_store → store}/contract_class_store.js +1 -1
  55. package/dest/store/contract_instance_store.d.ts +24 -0
  56. package/dest/store/contract_instance_store.d.ts.map +1 -0
  57. package/dest/{archiver/kv_archiver_store → store}/contract_instance_store.js +1 -1
  58. package/dest/{archiver/archiver_store.d.ts → store/kv_archiver_store.d.ts} +143 -139
  59. package/dest/store/kv_archiver_store.d.ts.map +1 -0
  60. package/dest/{archiver/kv_archiver_store → store}/kv_archiver_store.js +157 -49
  61. package/dest/{archiver/kv_archiver_store → store}/log_store.d.ts +1 -1
  62. package/dest/store/log_store.d.ts.map +1 -0
  63. package/dest/{archiver/kv_archiver_store → store}/message_store.d.ts +1 -1
  64. package/dest/store/message_store.d.ts.map +1 -0
  65. package/dest/{archiver/structs → structs}/data_retrieval.d.ts +1 -1
  66. package/dest/structs/data_retrieval.d.ts.map +1 -0
  67. package/dest/structs/inbox_message.d.ts +15 -0
  68. package/dest/structs/inbox_message.d.ts.map +1 -0
  69. package/dest/{archiver/structs → structs}/published.d.ts +1 -1
  70. package/dest/structs/published.d.ts.map +1 -0
  71. package/dest/test/fake_l1_state.d.ts +173 -0
  72. package/dest/test/fake_l1_state.d.ts.map +1 -0
  73. package/dest/test/fake_l1_state.js +364 -0
  74. package/dest/test/index.d.ts +2 -1
  75. package/dest/test/index.d.ts.map +1 -1
  76. package/dest/test/index.js +1 -0
  77. package/dest/test/mock_structs.d.ts +76 -2
  78. package/dest/test/mock_structs.d.ts.map +1 -1
  79. package/dest/test/mock_structs.js +133 -2
  80. package/package.json +15 -17
  81. package/src/archiver.ts +522 -0
  82. package/src/{archiver/config.ts → config.ts} +11 -0
  83. package/src/factory.ts +118 -6
  84. package/src/index.ts +10 -3
  85. package/src/interfaces.ts +9 -0
  86. package/src/{archiver/l1 → l1}/calldata_retriever.ts +1 -1
  87. package/src/{archiver/l1 → l1}/data_retrieval.ts +52 -69
  88. package/src/modules/data_source_base.ts +439 -0
  89. package/src/modules/data_store_updater.ts +318 -0
  90. package/src/modules/l1_synchronizer.ts +870 -0
  91. package/src/{archiver/kv_archiver_store → store}/block_store.ts +1 -1
  92. package/src/{archiver/kv_archiver_store → store}/contract_class_store.ts +1 -1
  93. package/src/{archiver/kv_archiver_store → store}/contract_instance_store.ts +1 -1
  94. package/src/{archiver/kv_archiver_store → store}/kv_archiver_store.ts +170 -8
  95. package/src/test/fake_l1_state.ts +561 -0
  96. package/src/test/index.ts +1 -0
  97. package/src/test/mock_structs.ts +247 -2
  98. package/dest/archiver/archiver.d.ts +0 -307
  99. package/dest/archiver/archiver.d.ts.map +0 -1
  100. package/dest/archiver/archiver.js +0 -2102
  101. package/dest/archiver/archiver_store.d.ts.map +0 -1
  102. package/dest/archiver/archiver_store.js +0 -4
  103. package/dest/archiver/archiver_store_test_suite.d.ts +0 -8
  104. package/dest/archiver/archiver_store_test_suite.d.ts.map +0 -1
  105. package/dest/archiver/archiver_store_test_suite.js +0 -2770
  106. package/dest/archiver/config.d.ts.map +0 -1
  107. package/dest/archiver/errors.d.ts.map +0 -1
  108. package/dest/archiver/index.d.ts +0 -7
  109. package/dest/archiver/index.d.ts.map +0 -1
  110. package/dest/archiver/index.js +0 -4
  111. package/dest/archiver/instrumentation.d.ts +0 -37
  112. package/dest/archiver/instrumentation.d.ts.map +0 -1
  113. package/dest/archiver/kv_archiver_store/block_store.d.ts.map +0 -1
  114. package/dest/archiver/kv_archiver_store/contract_class_store.d.ts +0 -18
  115. package/dest/archiver/kv_archiver_store/contract_class_store.d.ts.map +0 -1
  116. package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +0 -24
  117. package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +0 -1
  118. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +0 -159
  119. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +0 -1
  120. package/dest/archiver/kv_archiver_store/log_store.d.ts.map +0 -1
  121. package/dest/archiver/kv_archiver_store/message_store.d.ts.map +0 -1
  122. package/dest/archiver/l1/bin/retrieve-calldata.d.ts.map +0 -1
  123. package/dest/archiver/l1/calldata_retriever.d.ts.map +0 -1
  124. package/dest/archiver/l1/data_retrieval.d.ts +0 -90
  125. package/dest/archiver/l1/data_retrieval.d.ts.map +0 -1
  126. package/dest/archiver/l1/debug_tx.d.ts.map +0 -1
  127. package/dest/archiver/l1/spire_proposer.d.ts.map +0 -1
  128. package/dest/archiver/l1/trace_tx.d.ts.map +0 -1
  129. package/dest/archiver/l1/types.d.ts +0 -12
  130. package/dest/archiver/l1/types.d.ts.map +0 -1
  131. package/dest/archiver/l1/validate_trace.d.ts.map +0 -1
  132. package/dest/archiver/structs/data_retrieval.d.ts.map +0 -1
  133. package/dest/archiver/structs/inbox_message.d.ts +0 -15
  134. package/dest/archiver/structs/inbox_message.d.ts.map +0 -1
  135. package/dest/archiver/structs/published.d.ts.map +0 -1
  136. package/dest/archiver/validation.d.ts.map +0 -1
  137. package/dest/rpc/index.d.ts +0 -9
  138. package/dest/rpc/index.d.ts.map +0 -1
  139. package/dest/rpc/index.js +0 -15
  140. package/src/archiver/archiver.ts +0 -2265
  141. package/src/archiver/archiver_store.ts +0 -380
  142. package/src/archiver/archiver_store_test_suite.ts +0 -2842
  143. package/src/archiver/index.ts +0 -6
  144. package/src/rpc/index.ts +0 -16
  145. /package/dest/{archiver/errors.js → errors.js} +0 -0
  146. /package/dest/{archiver/l1 → l1}/bin/retrieve-calldata.js +0 -0
  147. /package/dest/{archiver/l1 → l1}/calldata_retriever.js +0 -0
  148. /package/dest/{archiver/l1 → l1}/debug_tx.js +0 -0
  149. /package/dest/{archiver/l1 → l1}/spire_proposer.js +0 -0
  150. /package/dest/{archiver/l1 → l1}/trace_tx.js +0 -0
  151. /package/dest/{archiver/l1 → l1}/types.js +0 -0
  152. /package/dest/{archiver/l1 → l1}/validate_trace.js +0 -0
  153. /package/dest/{archiver → modules}/instrumentation.js +0 -0
  154. /package/dest/{archiver → modules}/validation.js +0 -0
  155. /package/dest/{archiver/kv_archiver_store → store}/log_store.js +0 -0
  156. /package/dest/{archiver/kv_archiver_store → store}/message_store.js +0 -0
  157. /package/dest/{archiver/structs → structs}/data_retrieval.js +0 -0
  158. /package/dest/{archiver/structs → structs}/inbox_message.js +0 -0
  159. /package/dest/{archiver/structs → structs}/published.js +0 -0
  160. /package/src/{archiver/errors.ts → errors.ts} +0 -0
  161. /package/src/{archiver/l1 → l1}/README.md +0 -0
  162. /package/src/{archiver/l1 → l1}/bin/retrieve-calldata.ts +0 -0
  163. /package/src/{archiver/l1 → l1}/debug_tx.ts +0 -0
  164. /package/src/{archiver/l1 → l1}/spire_proposer.ts +0 -0
  165. /package/src/{archiver/l1 → l1}/trace_tx.ts +0 -0
  166. /package/src/{archiver/l1 → l1}/types.ts +0 -0
  167. /package/src/{archiver/l1 → l1}/validate_trace.ts +0 -0
  168. /package/src/{archiver → modules}/instrumentation.ts +0 -0
  169. /package/src/{archiver → modules}/validation.ts +0 -0
  170. /package/src/{archiver/kv_archiver_store → store}/log_store.ts +0 -0
  171. /package/src/{archiver/kv_archiver_store → store}/message_store.ts +0 -0
  172. /package/src/{archiver/structs → structs}/data_retrieval.ts +0 -0
  173. /package/src/{archiver/structs → structs}/inbox_message.ts +0 -0
  174. /package/src/{archiver/structs → structs}/published.ts +0 -0
@@ -0,0 +1,216 @@
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
+ import { createLogger } from '@aztec/foundation/log';
3
+ import { ContractClassPublishedEvent, PrivateFunctionBroadcastedEvent, UtilityFunctionBroadcastedEvent } from '@aztec/protocol-contracts/class-registry';
4
+ import { ContractInstancePublishedEvent, ContractInstanceUpdatedEvent } from '@aztec/protocol-contracts/instance-registry';
5
+ import { computePublicBytecodeCommitment, isValidPrivateFunctionMembershipProof, isValidUtilityFunctionMembershipProof } from '@aztec/stdlib/contract';
6
+ import groupBy from 'lodash.groupby';
7
+ /** Operation type for contract data updates. */ var Operation = /*#__PURE__*/ function(Operation) {
8
+ Operation[Operation["Store"] = 0] = "Store";
9
+ Operation[Operation["Delete"] = 1] = "Delete";
10
+ return Operation;
11
+ }(Operation || {});
12
+ /** Archiver helper module to handle updates to the data store. */ export class ArchiverDataStoreUpdater {
13
+ store;
14
+ log;
15
+ constructor(store){
16
+ this.store = store;
17
+ this.log = createLogger('archiver:store_updater');
18
+ }
19
+ /**
20
+ * Adds blocks to the store with contract class/instance extraction from logs.
21
+ * Extracts ContractClassPublished, ContractInstancePublished, ContractInstanceUpdated events,
22
+ * and individually broadcasted functions from the block logs.
23
+ *
24
+ * @param blocks - The L2 blocks to add.
25
+ * @param pendingChainValidationStatus - Optional validation status to set.
26
+ * @returns True if the operation is successful.
27
+ */ addBlocksWithContractData(blocks, pendingChainValidationStatus) {
28
+ return this.store.transactionAsync(async ()=>{
29
+ await this.store.addBlocks(blocks);
30
+ const opResults = await Promise.all([
31
+ // Update the pending chain validation status if provided
32
+ pendingChainValidationStatus && this.store.setPendingChainValidationStatus(pendingChainValidationStatus),
33
+ // Add any logs emitted during the retrieved blocks
34
+ this.store.addLogs(blocks),
35
+ // Unroll all logs emitted during the retrieved blocks and extract any contract classes and instances from them
36
+ ...blocks.map((block)=>this.addBlockDataToDB(block))
37
+ ]);
38
+ return opResults.every(Boolean);
39
+ });
40
+ }
41
+ /**
42
+ * Adds checkpoints to the store with contract class/instance extraction from logs.
43
+ * Extracts ContractClassPublished, ContractInstancePublished, ContractInstanceUpdated events,
44
+ * and individually broadcasted functions from the checkpoint block logs.
45
+ *
46
+ * @param checkpoints - The published checkpoints to add.
47
+ * @param pendingChainValidationStatus - Optional validation status to set.
48
+ * @returns True if the operation is successful.
49
+ */ addCheckpointsWithContractData(checkpoints, pendingChainValidationStatus) {
50
+ return this.store.transactionAsync(async ()=>{
51
+ await this.store.addCheckpoints(checkpoints);
52
+ const allBlocks = checkpoints.flatMap((ch)=>ch.checkpoint.blocks);
53
+ const opResults = await Promise.all([
54
+ // Update the pending chain validation status if provided
55
+ pendingChainValidationStatus && this.store.setPendingChainValidationStatus(pendingChainValidationStatus),
56
+ // Add any logs emitted during the retrieved blocks
57
+ this.store.addLogs(allBlocks),
58
+ // Unroll all logs emitted during the retrieved blocks and extract any contract classes and instances from them
59
+ ...allBlocks.map((block)=>this.addBlockDataToDB(block))
60
+ ]);
61
+ return opResults.every(Boolean);
62
+ });
63
+ }
64
+ /**
65
+ * Unwinds checkpoints from the store with reverse contract extraction.
66
+ * Deletes ContractClassPublished, ContractInstancePublished, ContractInstanceUpdated data
67
+ * that was stored for the unwound checkpoints.
68
+ *
69
+ * @param from - The checkpoint number to unwind from (must be the current tip).
70
+ * @param checkpointsToUnwind - The number of checkpoints to unwind.
71
+ * @returns True if the operation is successful.
72
+ */ async unwindCheckpointsWithContractData(from, checkpointsToUnwind) {
73
+ if (checkpointsToUnwind <= 0) {
74
+ throw new Error(`Cannot unwind ${checkpointsToUnwind} blocks`);
75
+ }
76
+ const last = await this.store.getSynchedCheckpointNumber();
77
+ if (from != last) {
78
+ throw new Error(`Cannot unwind checkpoints from checkpoint ${from} when the last checkpoint is ${last}`);
79
+ }
80
+ const blocks = [];
81
+ const lastCheckpointNumber = from + checkpointsToUnwind - 1;
82
+ for(let checkpointNumber = from; checkpointNumber <= lastCheckpointNumber; checkpointNumber++){
83
+ const blocksForCheckpoint = await this.store.getBlocksForCheckpoint(checkpointNumber);
84
+ if (!blocksForCheckpoint) {
85
+ continue;
86
+ }
87
+ blocks.push(...blocksForCheckpoint);
88
+ }
89
+ const opResults = await Promise.all([
90
+ // Prune rolls back to the last proven block, which is by definition valid
91
+ this.store.setPendingChainValidationStatus({
92
+ valid: true
93
+ }),
94
+ // Unroll all logs emitted during the retrieved blocks and extract any contract classes and instances from them
95
+ ...blocks.map(async (block)=>{
96
+ const contractClassLogs = block.body.txEffects.flatMap((txEffect)=>txEffect.contractClassLogs);
97
+ // ContractInstancePublished event logs are broadcast in privateLogs.
98
+ const privateLogs = block.body.txEffects.flatMap((txEffect)=>txEffect.privateLogs);
99
+ const publicLogs = block.body.txEffects.flatMap((txEffect)=>txEffect.publicLogs);
100
+ return (await Promise.all([
101
+ this.updatePublishedContractClasses(contractClassLogs, block.number, 1),
102
+ this.updateDeployedContractInstances(privateLogs, block.number, 1),
103
+ this.updateUpdatedContractInstances(publicLogs, block.header.globalVariables.timestamp, 1)
104
+ ])).every(Boolean);
105
+ }),
106
+ this.store.deleteLogs(blocks),
107
+ this.store.unwindCheckpoints(from, checkpointsToUnwind)
108
+ ]);
109
+ return opResults.every(Boolean);
110
+ }
111
+ /**
112
+ * Extracts and stores contract data from a single block.
113
+ */ async addBlockDataToDB(block) {
114
+ const contractClassLogs = block.body.txEffects.flatMap((txEffect)=>txEffect.contractClassLogs);
115
+ // ContractInstancePublished event logs are broadcast in privateLogs.
116
+ const privateLogs = block.body.txEffects.flatMap((txEffect)=>txEffect.privateLogs);
117
+ const publicLogs = block.body.txEffects.flatMap((txEffect)=>txEffect.publicLogs);
118
+ return (await Promise.all([
119
+ this.updatePublishedContractClasses(contractClassLogs, block.number, 0),
120
+ this.updateDeployedContractInstances(privateLogs, block.number, 0),
121
+ this.updateUpdatedContractInstances(publicLogs, block.header.globalVariables.timestamp, 0),
122
+ this.storeBroadcastedIndividualFunctions(contractClassLogs, block.number)
123
+ ])).every(Boolean);
124
+ }
125
+ /**
126
+ * Extracts and stores contract classes out of ContractClassPublished events emitted by the class registry contract.
127
+ */ async updatePublishedContractClasses(allLogs, blockNum, operation) {
128
+ const contractClassPublishedEvents = allLogs.filter((log)=>ContractClassPublishedEvent.isContractClassPublishedEvent(log)).map((log)=>ContractClassPublishedEvent.fromLog(log));
129
+ const contractClasses = await Promise.all(contractClassPublishedEvents.map((e)=>e.toContractClassPublic()));
130
+ if (contractClasses.length > 0) {
131
+ contractClasses.forEach((c)=>this.log.verbose(`${Operation[operation]} contract class ${c.id.toString()}`));
132
+ if (operation == 0) {
133
+ // TODO: Will probably want to create some worker threads to compute these bytecode commitments as they are expensive
134
+ const commitments = await Promise.all(contractClasses.map((c)=>computePublicBytecodeCommitment(c.packedBytecode)));
135
+ return await this.store.addContractClasses(contractClasses, commitments, blockNum);
136
+ } else if (operation == 1) {
137
+ return await this.store.deleteContractClasses(contractClasses, blockNum);
138
+ }
139
+ }
140
+ return true;
141
+ }
142
+ /**
143
+ * Extracts and stores contract instances out of ContractInstancePublished events emitted by the canonical deployer contract.
144
+ */ async updateDeployedContractInstances(allLogs, blockNum, operation) {
145
+ const contractInstances = allLogs.filter((log)=>ContractInstancePublishedEvent.isContractInstancePublishedEvent(log)).map((log)=>ContractInstancePublishedEvent.fromLog(log)).map((e)=>e.toContractInstance());
146
+ if (contractInstances.length > 0) {
147
+ contractInstances.forEach((c)=>this.log.verbose(`${Operation[operation]} contract instance at ${c.address.toString()}`));
148
+ if (operation == 0) {
149
+ return await this.store.addContractInstances(contractInstances, blockNum);
150
+ } else if (operation == 1) {
151
+ return await this.store.deleteContractInstances(contractInstances, blockNum);
152
+ }
153
+ }
154
+ return true;
155
+ }
156
+ /**
157
+ * Extracts and stores contract instance updates out of ContractInstanceUpdated events.
158
+ */ async updateUpdatedContractInstances(allLogs, timestamp, operation) {
159
+ const contractUpdates = allLogs.filter((log)=>ContractInstanceUpdatedEvent.isContractInstanceUpdatedEvent(log)).map((log)=>ContractInstanceUpdatedEvent.fromLog(log)).map((e)=>e.toContractInstanceUpdate());
160
+ if (contractUpdates.length > 0) {
161
+ contractUpdates.forEach((c)=>this.log.verbose(`${Operation[operation]} contract instance update at ${c.address.toString()}`));
162
+ if (operation == 0) {
163
+ return await this.store.addContractInstanceUpdates(contractUpdates, timestamp);
164
+ } else if (operation == 1) {
165
+ return await this.store.deleteContractInstanceUpdates(contractUpdates, timestamp);
166
+ }
167
+ }
168
+ return true;
169
+ }
170
+ /**
171
+ * Stores the functions that were broadcasted individually.
172
+ *
173
+ * @dev Beware that there is not a delete variant of this, since they are added to contract classes
174
+ * and will be deleted as part of the class if needed.
175
+ */ async storeBroadcastedIndividualFunctions(allLogs, _blockNum) {
176
+ // Filter out private and utility function broadcast events
177
+ const privateFnEvents = allLogs.filter((log)=>PrivateFunctionBroadcastedEvent.isPrivateFunctionBroadcastedEvent(log)).map((log)=>PrivateFunctionBroadcastedEvent.fromLog(log));
178
+ const utilityFnEvents = allLogs.filter((log)=>UtilityFunctionBroadcastedEvent.isUtilityFunctionBroadcastedEvent(log)).map((log)=>UtilityFunctionBroadcastedEvent.fromLog(log));
179
+ // Group all events by contract class id
180
+ for (const [classIdString, classEvents] of Object.entries(groupBy([
181
+ ...privateFnEvents,
182
+ ...utilityFnEvents
183
+ ], (e)=>e.contractClassId.toString()))){
184
+ const contractClassId = Fr.fromHexString(classIdString);
185
+ const contractClass = await this.store.getContractClass(contractClassId);
186
+ if (!contractClass) {
187
+ this.log.warn(`Skipping broadcasted functions as contract class ${contractClassId.toString()} was not found`);
188
+ continue;
189
+ }
190
+ // Split private and utility functions, and filter out invalid ones
191
+ const allFns = classEvents.map((e)=>e.toFunctionWithMembershipProof());
192
+ const privateFns = allFns.filter((fn)=>'utilityFunctionsTreeRoot' in fn);
193
+ const utilityFns = allFns.filter((fn)=>'privateFunctionsArtifactTreeRoot' in fn);
194
+ const privateFunctionsWithValidity = await Promise.all(privateFns.map(async (fn)=>({
195
+ fn,
196
+ valid: await isValidPrivateFunctionMembershipProof(fn, contractClass)
197
+ })));
198
+ const validPrivateFns = privateFunctionsWithValidity.filter(({ valid })=>valid).map(({ fn })=>fn);
199
+ const utilityFunctionsWithValidity = await Promise.all(utilityFns.map(async (fn)=>({
200
+ fn,
201
+ valid: await isValidUtilityFunctionMembershipProof(fn, contractClass)
202
+ })));
203
+ const validUtilityFns = utilityFunctionsWithValidity.filter(({ valid })=>valid).map(({ fn })=>fn);
204
+ const validFnCount = validPrivateFns.length + validUtilityFns.length;
205
+ if (validFnCount !== allFns.length) {
206
+ this.log.warn(`Skipping ${allFns.length - validFnCount} invalid functions`);
207
+ }
208
+ // Store the functions in the contract class in a single operation
209
+ if (validFnCount > 0) {
210
+ this.log.verbose(`Storing ${validFnCount} functions for contract class ${contractClassId.toString()}`);
211
+ }
212
+ return await this.store.addFunctions(contractClassId, validPrivateFns, validUtilityFns);
213
+ }
214
+ return true;
215
+ }
216
+ }
@@ -0,0 +1,37 @@
1
+ import type { L2BlockNew } from '@aztec/stdlib/block';
2
+ import { type LmdbStatsCallback, type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
3
+ export declare class ArchiverInstrumentation {
4
+ private telemetry;
5
+ readonly tracer: Tracer;
6
+ private blockHeight;
7
+ private txCount;
8
+ private l1BlockHeight;
9
+ private proofsSubmittedDelay;
10
+ private proofsSubmittedCount;
11
+ private dbMetrics;
12
+ private pruneDuration;
13
+ private pruneCount;
14
+ private syncDurationPerBlock;
15
+ private syncBlockCount;
16
+ private manaPerBlock;
17
+ private txsPerBlock;
18
+ private syncDurationPerMessage;
19
+ private syncMessageCount;
20
+ private blockProposalTxTargetCount;
21
+ private log;
22
+ private constructor();
23
+ static new(telemetry: TelemetryClient, lmdbStats?: LmdbStatsCallback): Promise<ArchiverInstrumentation>;
24
+ isEnabled(): boolean;
25
+ processNewBlocks(syncTimePerBlock: number, blocks: L2BlockNew[]): void;
26
+ processNewMessages(count: number, syncPerMessageMs: number): void;
27
+ processPrune(duration: number): void;
28
+ updateLastProvenBlock(blockNumber: number): void;
29
+ processProofsVerified(logs: {
30
+ proverId: string;
31
+ l2BlockNumber: bigint;
32
+ delay: bigint;
33
+ }[]): void;
34
+ updateL1BlockHeight(blockNumber: bigint): void;
35
+ recordBlockProposalTxTarget(target: string, usedTrace: boolean): void;
36
+ }
37
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdHJ1bWVudGF0aW9uLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbW9kdWxlcy9pbnN0cnVtZW50YXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDdEQsT0FBTyxFQUtMLEtBQUssaUJBQWlCLEVBRXRCLEtBQUssZUFBZSxFQUNwQixLQUFLLE1BQU0sRUFFWixNQUFNLHlCQUF5QixDQUFDO0FBRWpDLHFCQUFhLHVCQUF1QjtJQTBCaEMsT0FBTyxDQUFDLFNBQVM7SUF6Qm5CLFNBQWdCLE1BQU0sRUFBRSxNQUFNLENBQUM7SUFFL0IsT0FBTyxDQUFDLFdBQVcsQ0FBUTtJQUMzQixPQUFPLENBQUMsT0FBTyxDQUFnQjtJQUMvQixPQUFPLENBQUMsYUFBYSxDQUFRO0lBQzdCLE9BQU8sQ0FBQyxvQkFBb0IsQ0FBWTtJQUN4QyxPQUFPLENBQUMsb0JBQW9CLENBQWdCO0lBQzVDLE9BQU8sQ0FBQyxTQUFTLEN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AE,MAAM,QAGnC;IAEM,qBAAqB,CAAC,WAAW,EAAE,MAAM,QAE/C;IAEM,qBAAqB,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,QAW9F;IAEM,mBAAmB,CAAC,WAAW,EAAE,MAAM,QAE7C;IAEM,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,QAKpE;CACF"}
@@ -0,0 +1,67 @@
1
+ import type { BlobClientInterface } from '@aztec/blob-client/client';
2
+ import { EpochCache } from '@aztec/epoch-cache';
3
+ import { InboxContract, RollupContract } from '@aztec/ethereum/contracts';
4
+ import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
5
+ import type { ViemPublicClient, ViemPublicDebugClient } from '@aztec/ethereum/types';
6
+ import { Buffer32 } from '@aztec/foundation/buffer';
7
+ import { Fr } from '@aztec/foundation/curves/bn254';
8
+ import { EthAddress } from '@aztec/foundation/eth-address';
9
+ import { type Logger } from '@aztec/foundation/log';
10
+ import { DateProvider } from '@aztec/foundation/timer';
11
+ import { type ArchiverEmitter } from '@aztec/stdlib/block';
12
+ import { type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
13
+ import { type Traceable, type Tracer } from '@aztec/telemetry-client';
14
+ import type { KVArchiverDataStore } from '../store/kv_archiver_store.js';
15
+ import type { ArchiverInstrumentation } from './instrumentation.js';
16
+ /**
17
+ * Handles L1 synchronization for the archiver.
18
+ * Responsible for fetching checkpoints, L1→L2 messages, and handling L1 reorgs.
19
+ */
20
+ export declare class ArchiverL1Synchronizer implements Traceable {
21
+ private readonly publicClient;
22
+ private readonly debugClient;
23
+ private readonly rollup;
24
+ private readonly inbox;
25
+ private readonly l1Addresses;
26
+ private readonly store;
27
+ private readonly config;
28
+ private readonly blobClient;
29
+ private readonly epochCache;
30
+ private readonly dateProvider;
31
+ private readonly instrumentation;
32
+ private readonly l1constants;
33
+ private readonly events;
34
+ private readonly log;
35
+ private l1BlockNumber;
36
+ private l1Timestamp;
37
+ private readonly updater;
38
+ readonly tracer: Tracer;
39
+ constructor(publicClient: ViemPublicClient, debugClient: ViemPublicDebugClient, rollup: RollupContract, inbox: InboxContract, l1Addresses: Pick<L1ContractAddresses, 'registryAddress' | 'governanceProposerAddress' | 'slashFactoryAddress'> & {
40
+ slashingProposerAddress: EthAddress;
41
+ }, store: KVArchiverDataStore, config: {
42
+ batchSize: number;
43
+ skipValidateCheckpointAttestations?: boolean;
44
+ maxAllowedEthClientDriftSeconds: number;
45
+ }, blobClient: BlobClientInterface, epochCache: EpochCache, dateProvider: DateProvider, instrumentation: ArchiverInstrumentation, l1constants: L1RollupConstants & {
46
+ l1StartBlockHash: Buffer32;
47
+ genesisArchiveRoot: Fr;
48
+ }, events: ArchiverEmitter, tracer: Tracer, log?: Logger);
49
+ /** Returns the last L1 block number that was synced. */
50
+ getL1BlockNumber(): bigint | undefined;
51
+ /** Returns the last L1 timestamp that was synced. */
52
+ getL1Timestamp(): bigint | undefined;
53
+ /** Checks that the ethereum node we are connected to has a latest timestamp no more than the allowed drift. Throw if not. */
54
+ testEthereumNodeSynced(): Promise<void>;
55
+ syncFromL1(initialSyncComplete: boolean): Promise<void>;
56
+ private canPrune;
57
+ private handleEpochPrune;
58
+ private nextRange;
59
+ private handleL1ToL2Messages;
60
+ private retrieveL1ToL2Message;
61
+ private rollbackL1ToL2Messages;
62
+ private getL1BlockHash;
63
+ private handleCheckpoints;
64
+ private checkForNewCheckpointsBeforeL1SyncPoint;
65
+ private getCheckpointHeader;
66
+ }
67
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibDFfc3luY2hyb25pemVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbW9kdWxlcy9sMV9zeW5jaHJvbml6ZXIudHMiXSwibmFtZXMiOltdLCJtY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