@aztec/archiver 4.0.0-nightly.20260114 → 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.
- package/dest/archiver.d.ts +134 -0
- package/dest/archiver.d.ts.map +1 -0
- package/dest/archiver.js +767 -0
- package/dest/{archiver/config.d.ts → config.d.ts} +9 -1
- package/dest/config.d.ts.map +1 -0
- package/dest/{archiver/config.js → config.js} +9 -0
- package/dest/{archiver/errors.d.ts → errors.d.ts} +1 -1
- package/dest/errors.d.ts.map +1 -0
- package/dest/factory.d.ts +5 -6
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +82 -5
- package/dest/index.d.ts +10 -4
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +8 -3
- package/dest/interfaces.d.ts +9 -0
- package/dest/interfaces.d.ts.map +1 -0
- package/dest/interfaces.js +3 -0
- package/dest/{archiver/l1 → l1}/bin/retrieve-calldata.d.ts +1 -1
- package/dest/l1/bin/retrieve-calldata.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/calldata_retriever.d.ts +2 -2
- package/dest/l1/calldata_retriever.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/data_retrieval.d.ts +2 -2
- package/dest/l1/data_retrieval.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/debug_tx.d.ts +1 -1
- package/dest/l1/debug_tx.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/spire_proposer.d.ts +1 -1
- package/dest/l1/spire_proposer.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/trace_tx.d.ts +1 -1
- package/dest/l1/trace_tx.d.ts.map +1 -0
- package/dest/l1/types.d.ts +12 -0
- package/dest/l1/types.d.ts.map +1 -0
- package/dest/{archiver/l1 → l1}/validate_trace.d.ts +1 -1
- package/dest/l1/validate_trace.d.ts.map +1 -0
- package/dest/modules/data_source_base.d.ts +83 -0
- package/dest/modules/data_source_base.d.ts.map +1 -0
- package/dest/{archiver/archive_source_base.js → modules/data_source_base.js} +109 -10
- package/dest/modules/data_store_updater.d.ts +46 -0
- package/dest/modules/data_store_updater.d.ts.map +1 -0
- package/dest/modules/data_store_updater.js +216 -0
- package/dest/modules/instrumentation.d.ts +37 -0
- package/dest/modules/instrumentation.d.ts.map +1 -0
- package/dest/modules/l1_synchronizer.d.ts +67 -0
- package/dest/modules/l1_synchronizer.d.ts.map +1 -0
- package/dest/{archiver/archiver.js → modules/l1_synchronizer.js} +60 -543
- package/dest/{archiver → modules}/validation.d.ts +1 -1
- package/dest/modules/validation.d.ts.map +1 -0
- package/dest/{archiver/kv_archiver_store → store}/block_store.d.ts +1 -1
- package/dest/store/block_store.d.ts.map +1 -0
- package/dest/store/contract_class_store.d.ts +18 -0
- package/dest/store/contract_class_store.d.ts.map +1 -0
- package/dest/store/contract_instance_store.d.ts +24 -0
- package/dest/store/contract_instance_store.d.ts.map +1 -0
- package/dest/{archiver/kv_archiver_store → store}/kv_archiver_store.d.ts +2 -2
- package/dest/store/kv_archiver_store.d.ts.map +1 -0
- package/dest/{archiver/kv_archiver_store → store}/log_store.d.ts +1 -1
- package/dest/store/log_store.d.ts.map +1 -0
- package/dest/{archiver/kv_archiver_store → store}/message_store.d.ts +1 -1
- package/dest/store/message_store.d.ts.map +1 -0
- package/dest/{archiver/structs → structs}/data_retrieval.d.ts +1 -1
- package/dest/structs/data_retrieval.d.ts.map +1 -0
- package/dest/structs/inbox_message.d.ts +15 -0
- package/dest/structs/inbox_message.d.ts.map +1 -0
- package/dest/{archiver/structs → structs}/published.d.ts +1 -1
- package/dest/structs/published.d.ts.map +1 -0
- package/dest/{archiver/test → test}/fake_l1_state.d.ts +1 -1
- package/dest/test/fake_l1_state.d.ts.map +1 -0
- package/dest/test/index.d.ts +2 -1
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +1 -0
- package/dest/test/mock_structs.d.ts +76 -2
- package/dest/test/mock_structs.d.ts.map +1 -1
- package/dest/test/mock_structs.js +133 -2
- package/package.json +15 -17
- package/src/archiver.ts +522 -0
- package/src/{archiver/config.ts → config.ts} +11 -0
- package/src/factory.ts +118 -6
- package/src/index.ts +10 -3
- package/src/interfaces.ts +9 -0
- package/src/{archiver/l1 → l1}/calldata_retriever.ts +1 -1
- package/src/{archiver/l1 → l1}/data_retrieval.ts +1 -1
- package/src/{archiver/archive_source_base.ts → modules/data_source_base.ts} +130 -30
- package/src/modules/data_store_updater.ts +318 -0
- package/src/{archiver/archiver.ts → modules/l1_synchronizer.ts} +68 -717
- package/src/test/index.ts +1 -0
- package/src/test/mock_structs.ts +247 -2
- package/dest/archiver/archive_source_base.d.ts +0 -75
- package/dest/archiver/archive_source_base.d.ts.map +0 -1
- package/dest/archiver/archiver.d.ts +0 -168
- package/dest/archiver/archiver.d.ts.map +0 -1
- package/dest/archiver/archiver_store_updates.d.ts +0 -38
- package/dest/archiver/archiver_store_updates.d.ts.map +0 -1
- package/dest/archiver/archiver_store_updates.js +0 -212
- package/dest/archiver/config.d.ts.map +0 -1
- package/dest/archiver/errors.d.ts.map +0 -1
- package/dest/archiver/index.d.ts +0 -8
- package/dest/archiver/index.d.ts.map +0 -1
- package/dest/archiver/index.js +0 -6
- package/dest/archiver/instrumentation.d.ts +0 -37
- package/dest/archiver/instrumentation.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/block_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts +0 -18
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +0 -24
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/log_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/message_store.d.ts.map +0 -1
- package/dest/archiver/l1/bin/retrieve-calldata.d.ts.map +0 -1
- package/dest/archiver/l1/calldata_retriever.d.ts.map +0 -1
- package/dest/archiver/l1/data_retrieval.d.ts.map +0 -1
- package/dest/archiver/l1/debug_tx.d.ts.map +0 -1
- package/dest/archiver/l1/spire_proposer.d.ts.map +0 -1
- package/dest/archiver/l1/trace_tx.d.ts.map +0 -1
- package/dest/archiver/l1/types.d.ts +0 -12
- package/dest/archiver/l1/types.d.ts.map +0 -1
- package/dest/archiver/l1/validate_trace.d.ts.map +0 -1
- package/dest/archiver/structs/data_retrieval.d.ts.map +0 -1
- package/dest/archiver/structs/inbox_message.d.ts +0 -15
- package/dest/archiver/structs/inbox_message.d.ts.map +0 -1
- package/dest/archiver/structs/published.d.ts.map +0 -1
- package/dest/archiver/test/fake_l1_state.d.ts.map +0 -1
- package/dest/archiver/validation.d.ts.map +0 -1
- package/dest/rpc/index.d.ts +0 -9
- package/dest/rpc/index.d.ts.map +0 -1
- package/dest/rpc/index.js +0 -15
- package/src/archiver/archiver_store_updates.ts +0 -321
- package/src/archiver/index.ts +0 -7
- package/src/rpc/index.ts +0 -16
- /package/dest/{archiver/errors.js → errors.js} +0 -0
- /package/dest/{archiver/l1 → l1}/bin/retrieve-calldata.js +0 -0
- /package/dest/{archiver/l1 → l1}/calldata_retriever.js +0 -0
- /package/dest/{archiver/l1 → l1}/data_retrieval.js +0 -0
- /package/dest/{archiver/l1 → l1}/debug_tx.js +0 -0
- /package/dest/{archiver/l1 → l1}/spire_proposer.js +0 -0
- /package/dest/{archiver/l1 → l1}/trace_tx.js +0 -0
- /package/dest/{archiver/l1 → l1}/types.js +0 -0
- /package/dest/{archiver/l1 → l1}/validate_trace.js +0 -0
- /package/dest/{archiver → modules}/instrumentation.js +0 -0
- /package/dest/{archiver → modules}/validation.js +0 -0
- /package/dest/{archiver/kv_archiver_store → store}/block_store.js +0 -0
- /package/dest/{archiver/kv_archiver_store → store}/contract_class_store.js +0 -0
- /package/dest/{archiver/kv_archiver_store → store}/contract_instance_store.js +0 -0
- /package/dest/{archiver/kv_archiver_store → store}/kv_archiver_store.js +0 -0
- /package/dest/{archiver/kv_archiver_store → store}/log_store.js +0 -0
- /package/dest/{archiver/kv_archiver_store → store}/message_store.js +0 -0
- /package/dest/{archiver/structs → structs}/data_retrieval.js +0 -0
- /package/dest/{archiver/structs → structs}/inbox_message.js +0 -0
- /package/dest/{archiver/structs → structs}/published.js +0 -0
- /package/dest/{archiver/test → test}/fake_l1_state.js +0 -0
- /package/src/{archiver/errors.ts → errors.ts} +0 -0
- /package/src/{archiver/l1 → l1}/README.md +0 -0
- /package/src/{archiver/l1 → l1}/bin/retrieve-calldata.ts +0 -0
- /package/src/{archiver/l1 → l1}/debug_tx.ts +0 -0
- /package/src/{archiver/l1 → l1}/spire_proposer.ts +0 -0
- /package/src/{archiver/l1 → l1}/trace_tx.ts +0 -0
- /package/src/{archiver/l1 → l1}/types.ts +0 -0
- /package/src/{archiver/l1 → l1}/validate_trace.ts +0 -0
- /package/src/{archiver → modules}/instrumentation.ts +0 -0
- /package/src/{archiver → modules}/validation.ts +0 -0
- /package/src/{archiver/kv_archiver_store → store}/block_store.ts +0 -0
- /package/src/{archiver/kv_archiver_store → store}/contract_class_store.ts +0 -0
- /package/src/{archiver/kv_archiver_store → store}/contract_instance_store.ts +0 -0
- /package/src/{archiver/kv_archiver_store → store}/kv_archiver_store.ts +0 -0
- /package/src/{archiver/kv_archiver_store → store}/log_store.ts +0 -0
- /package/src/{archiver/kv_archiver_store → store}/message_store.ts +0 -0
- /package/src/{archiver/structs → structs}/data_retrieval.ts +0 -0
- /package/src/{archiver/structs → structs}/inbox_message.ts +0 -0
- /package/src/{archiver/structs → structs}/published.ts +0 -0
- /package/src/{archiver/test → test}/fake_l1_state.ts +0 -0
|
@@ -1,17 +1,28 @@
|
|
|
1
|
-
import { CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
1
|
+
import { BlockNumber, CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import { isDefined } from '@aztec/foundation/types';
|
|
3
3
|
import { CommitteeAttestation, L2Block, PublishedL2Block } from '@aztec/stdlib/block';
|
|
4
4
|
import { Checkpoint, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
5
|
+
import { getSlotRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
|
|
5
6
|
/**
|
|
6
|
-
* Abstract base class implementing
|
|
7
|
+
* Abstract base class implementing ArchiverDataSource using a KVArchiverDataStore.
|
|
7
8
|
* Provides implementations for all store-delegating methods and declares abstract methods
|
|
8
9
|
* for L1-dependent functionality that subclasses must implement.
|
|
9
|
-
*/ export class
|
|
10
|
+
*/ export class ArchiverDataSourceBase {
|
|
10
11
|
store;
|
|
11
|
-
|
|
12
|
+
l1Constants;
|
|
13
|
+
constructor(store, l1Constants){
|
|
12
14
|
this.store = store;
|
|
15
|
+
this.l1Constants = l1Constants;
|
|
16
|
+
}
|
|
17
|
+
getCheckpointNumber() {
|
|
18
|
+
return this.store.getSynchedCheckpointNumber();
|
|
19
|
+
}
|
|
20
|
+
getSynchedCheckpointNumber() {
|
|
21
|
+
return this.store.getSynchedCheckpointNumber();
|
|
22
|
+
}
|
|
23
|
+
getProvenCheckpointNumber() {
|
|
24
|
+
return this.store.getProvenCheckpointNumber();
|
|
13
25
|
}
|
|
14
|
-
// Store-delegating methods
|
|
15
26
|
getBlockNumber() {
|
|
16
27
|
return this.store.getLatestBlockNumber();
|
|
17
28
|
}
|
|
@@ -29,6 +40,29 @@ import { Checkpoint, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
|
29
40
|
getCheckpointedBlock(number) {
|
|
30
41
|
return this.store.getCheckpointedBlock(number);
|
|
31
42
|
}
|
|
43
|
+
getCheckpointedBlockNumber() {
|
|
44
|
+
return this.store.getCheckpointedL2BlockNumber();
|
|
45
|
+
}
|
|
46
|
+
async getCheckpointHeader(number) {
|
|
47
|
+
if (number === 'latest') {
|
|
48
|
+
number = await this.store.getSynchedCheckpointNumber();
|
|
49
|
+
}
|
|
50
|
+
if (number === 0) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
const checkpoint = await this.store.getCheckpointData(number);
|
|
54
|
+
if (!checkpoint) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
return checkpoint.header;
|
|
58
|
+
}
|
|
59
|
+
async getLastBlockNumberInCheckpoint(checkpointNumber) {
|
|
60
|
+
const checkpointData = await this.store.getCheckpointData(checkpointNumber);
|
|
61
|
+
if (!checkpointData) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
return BlockNumber(checkpointData.startBlock + checkpointData.numBlocks - 1);
|
|
65
|
+
}
|
|
32
66
|
async getCheckpointedBlocks(from, limit, proven) {
|
|
33
67
|
const blocks = await this.store.getCheckpointedBlocks(from, limit);
|
|
34
68
|
if (proven === true) {
|
|
@@ -76,7 +110,6 @@ import { Checkpoint, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
|
76
110
|
}
|
|
77
111
|
return blocks;
|
|
78
112
|
}
|
|
79
|
-
// L2LogsSource methods
|
|
80
113
|
getPrivateLogsByTags(tags) {
|
|
81
114
|
return this.store.getPrivateLogsByTags(tags);
|
|
82
115
|
}
|
|
@@ -89,7 +122,6 @@ import { Checkpoint, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
|
89
122
|
getContractClassLogs(filter) {
|
|
90
123
|
return this.store.getContractClassLogs(filter);
|
|
91
124
|
}
|
|
92
|
-
// ContractDataSource methods
|
|
93
125
|
getContractClass(id) {
|
|
94
126
|
return this.store.getContractClass(id);
|
|
95
127
|
}
|
|
@@ -116,14 +148,12 @@ import { Checkpoint, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
|
116
148
|
registerContractFunctionSignatures(signatures) {
|
|
117
149
|
return this.store.registerContractFunctionSignatures(signatures);
|
|
118
150
|
}
|
|
119
|
-
// L1ToL2MessageSource methods
|
|
120
151
|
getL1ToL2Messages(checkpointNumber) {
|
|
121
152
|
return this.store.getL1ToL2Messages(checkpointNumber);
|
|
122
153
|
}
|
|
123
154
|
getL1ToL2MessageIndex(l1ToL2Message) {
|
|
124
155
|
return this.store.getL1ToL2MessageIndex(l1ToL2Message);
|
|
125
156
|
}
|
|
126
|
-
// Published checkpoint methods
|
|
127
157
|
async getPublishedCheckpoints(checkpointNumber, limit) {
|
|
128
158
|
const checkpoints = await this.store.getRangeOfCheckpoints(checkpointNumber, limit);
|
|
129
159
|
const blocks = (await Promise.all(checkpoints.map((ch)=>this.store.getBlocksForCheckpoint(ch.checkpointNumber)))).filter(isDefined);
|
|
@@ -137,6 +167,76 @@ import { Checkpoint, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
|
137
167
|
}
|
|
138
168
|
return fullCheckpoints;
|
|
139
169
|
}
|
|
170
|
+
async getBlocksForEpoch(epochNumber) {
|
|
171
|
+
if (!this.l1Constants) {
|
|
172
|
+
throw new Error('L1 constants not set');
|
|
173
|
+
}
|
|
174
|
+
const [start, end] = getSlotRangeForEpoch(epochNumber, this.l1Constants);
|
|
175
|
+
const blocks = [];
|
|
176
|
+
// Walk the list of checkpoints backwards and filter by slots matching the requested epoch.
|
|
177
|
+
// We'll typically ask for checkpoints for a very recent epoch, so we shouldn't need an index here.
|
|
178
|
+
let checkpoint = await this.store.getCheckpointData(await this.store.getSynchedCheckpointNumber());
|
|
179
|
+
const slot = (b)=>b.header.slotNumber;
|
|
180
|
+
while(checkpoint && slot(checkpoint) >= start){
|
|
181
|
+
if (slot(checkpoint) <= end) {
|
|
182
|
+
// push the blocks on backwards
|
|
183
|
+
const endBlock = checkpoint.startBlock + checkpoint.numBlocks - 1;
|
|
184
|
+
for(let i = endBlock; i >= checkpoint.startBlock; i--){
|
|
185
|
+
const block = await this.getBlock(BlockNumber(i));
|
|
186
|
+
if (block) {
|
|
187
|
+
blocks.push(block);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
checkpoint = await this.store.getCheckpointData(CheckpointNumber(checkpoint.checkpointNumber - 1));
|
|
192
|
+
}
|
|
193
|
+
return blocks.reverse();
|
|
194
|
+
}
|
|
195
|
+
async getBlockHeadersForEpoch(epochNumber) {
|
|
196
|
+
if (!this.l1Constants) {
|
|
197
|
+
throw new Error('L1 constants not set');
|
|
198
|
+
}
|
|
199
|
+
const [start, end] = getSlotRangeForEpoch(epochNumber, this.l1Constants);
|
|
200
|
+
const blocks = [];
|
|
201
|
+
// Walk the list of checkpoints backwards and filter by slots matching the requested epoch.
|
|
202
|
+
// We'll typically ask for checkpoints for a very recent epoch, so we shouldn't need an index here.
|
|
203
|
+
let checkpoint = await this.store.getCheckpointData(await this.store.getSynchedCheckpointNumber());
|
|
204
|
+
const slot = (b)=>b.header.slotNumber;
|
|
205
|
+
while(checkpoint && slot(checkpoint) >= start){
|
|
206
|
+
if (slot(checkpoint) <= end) {
|
|
207
|
+
// push the blocks on backwards
|
|
208
|
+
const endBlock = checkpoint.startBlock + checkpoint.numBlocks - 1;
|
|
209
|
+
for(let i = endBlock; i >= checkpoint.startBlock; i--){
|
|
210
|
+
const block = await this.getBlockHeader(BlockNumber(i));
|
|
211
|
+
if (block) {
|
|
212
|
+
blocks.push(block);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
checkpoint = await this.store.getCheckpointData(CheckpointNumber(checkpoint.checkpointNumber - 1));
|
|
217
|
+
}
|
|
218
|
+
return blocks.reverse();
|
|
219
|
+
}
|
|
220
|
+
async getCheckpointsForEpoch(epochNumber) {
|
|
221
|
+
if (!this.l1Constants) {
|
|
222
|
+
throw new Error('L1 constants not set');
|
|
223
|
+
}
|
|
224
|
+
const [start, end] = getSlotRangeForEpoch(epochNumber, this.l1Constants);
|
|
225
|
+
const checkpoints = [];
|
|
226
|
+
// Walk the list of checkpoints backwards and filter by slots matching the requested epoch.
|
|
227
|
+
// We'll typically ask for checkpoints for a very recent epoch, so we shouldn't need an index here.
|
|
228
|
+
let checkpointData = await this.store.getCheckpointData(await this.store.getSynchedCheckpointNumber());
|
|
229
|
+
const slot = (b)=>b.header.slotNumber;
|
|
230
|
+
while(checkpointData && slot(checkpointData) >= start){
|
|
231
|
+
if (slot(checkpointData) <= end) {
|
|
232
|
+
// push the checkpoints on backwards
|
|
233
|
+
const [checkpoint] = await this.getPublishedCheckpoints(checkpointData.checkpointNumber, 1);
|
|
234
|
+
checkpoints.push(checkpoint.checkpoint);
|
|
235
|
+
}
|
|
236
|
+
checkpointData = await this.store.getCheckpointData(CheckpointNumber(checkpointData.checkpointNumber - 1));
|
|
237
|
+
}
|
|
238
|
+
return checkpoints.reverse();
|
|
239
|
+
}
|
|
140
240
|
async getPublishedBlocks(from, limit, proven) {
|
|
141
241
|
const checkpoints = await this.store.getRangeOfCheckpoints(CheckpointNumber(from), limit);
|
|
142
242
|
const provenCheckpointNumber = await this.store.getProvenCheckpointNumber();
|
|
@@ -157,7 +257,6 @@ import { Checkpoint, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
|
157
257
|
}
|
|
158
258
|
return olbBlocks;
|
|
159
259
|
}
|
|
160
|
-
// Legacy APIs
|
|
161
260
|
async getBlock(number) {
|
|
162
261
|
// If the number provided is -ve, then return the latest block.
|
|
163
262
|
if (number < 0) {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
2
|
+
import type { L2BlockNew, ValidateCheckpointResult } from '@aztec/stdlib/block';
|
|
3
|
+
import type { PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
4
|
+
import type { KVArchiverDataStore } from '../store/kv_archiver_store.js';
|
|
5
|
+
/** Archiver helper module to handle updates to the data store. */
|
|
6
|
+
export declare class ArchiverDataStoreUpdater {
|
|
7
|
+
private store;
|
|
8
|
+
private readonly log;
|
|
9
|
+
constructor(store: KVArchiverDataStore);
|
|
10
|
+
/**
|
|
11
|
+
* Adds blocks to the store with contract class/instance extraction from logs.
|
|
12
|
+
* Extracts ContractClassPublished, ContractInstancePublished, ContractInstanceUpdated events,
|
|
13
|
+
* and individually broadcasted functions from the block logs.
|
|
14
|
+
*
|
|
15
|
+
* @param blocks - The L2 blocks to add.
|
|
16
|
+
* @param pendingChainValidationStatus - Optional validation status to set.
|
|
17
|
+
* @returns True if the operation is successful.
|
|
18
|
+
*/
|
|
19
|
+
addBlocksWithContractData(blocks: L2BlockNew[], pendingChainValidationStatus?: ValidateCheckpointResult): Promise<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Adds checkpoints to the store with contract class/instance extraction from logs.
|
|
22
|
+
* Extracts ContractClassPublished, ContractInstancePublished, ContractInstanceUpdated events,
|
|
23
|
+
* and individually broadcasted functions from the checkpoint block logs.
|
|
24
|
+
*
|
|
25
|
+
* @param checkpoints - The published checkpoints to add.
|
|
26
|
+
* @param pendingChainValidationStatus - Optional validation status to set.
|
|
27
|
+
* @returns True if the operation is successful.
|
|
28
|
+
*/
|
|
29
|
+
addCheckpointsWithContractData(checkpoints: PublishedCheckpoint[], pendingChainValidationStatus?: ValidateCheckpointResult): Promise<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Unwinds checkpoints from the store with reverse contract extraction.
|
|
32
|
+
* Deletes ContractClassPublished, ContractInstancePublished, ContractInstanceUpdated data
|
|
33
|
+
* that was stored for the unwound checkpoints.
|
|
34
|
+
*
|
|
35
|
+
* @param from - The checkpoint number to unwind from (must be the current tip).
|
|
36
|
+
* @param checkpointsToUnwind - The number of checkpoints to unwind.
|
|
37
|
+
* @returns True if the operation is successful.
|
|
38
|
+
*/
|
|
39
|
+
unwindCheckpointsWithContractData(from: CheckpointNumber, checkpointsToUnwind: number): Promise<boolean>;
|
|
40
|
+
private addBlockDataToDB;
|
|
41
|
+
private updatePublishedContractClasses;
|
|
42
|
+
private updateDeployedContractInstances;
|
|
43
|
+
private updateUpdatedContractInstances;
|
|
44
|
+
private storeBroadcastedIndividualFunctions;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaW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BTyxDQUFDLENBNENsQjtZQUthLGdCQUFnQjtZQW1CaEIsOEJBQThCO1lBNEI5QiwrQkFBK0I7WUF5Qi9CLDhCQUE4QjtZQTZCOUIsbUNBQW1DO0NBd0RsRCJ9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data_store_updater.d.ts","sourceRoot":"","sources":["../../src/modules/data_store_updater.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAYrF,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAapE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAQzE,kEAAkE;AAClE,qBAAa,wBAAwB;IAGvB,OAAO,CAAC,KAAK;IAFzB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA0C;IAE9D,YAAoB,KAAK,EAAE,mBAAmB,EAAI;IAElD;;;;;;;;OAQG;IACI,yBAAyB,CAC9B,MAAM,EAAE,UAAU,EAAE,EACpB,4BAA4B,CAAC,EAAE,wBAAwB,GACtD,OAAO,CAAC,OAAO,CAAC,CAelB;IAED;;;;;;;;OAQG;IACI,8BAA8B,CACnC,WAAW,EAAE,mBAAmB,EAAE,EAClC,4BAA4B,CAAC,EAAE,wBAAwB,GACtD,OAAO,CAAC,OAAO,CAAC,CAgBlB;IAED;;;;;;;;OAQG;IACU,iCAAiC,CAC5C,IAAI,EAAE,gBAAgB,EACtB,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAAC,OAAO,CAAC,CA4ClB;YAKa,gBAAgB;YAmBhB,8BAA8B;YA4B9B,+BAA+B;YAyB/B,8BAA8B;YA6B9B,mCAAmC;CAwDlD"}
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdHJ1bWVudGF0aW9uLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbW9kdWxlcy9pbnN0cnVtZW50YXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDdEQsT0FBTyxFQUtMLEtBQUssaUJBQWlCLEVBRXRCLEtBQUssZUFBZSxFQUNwQixLQUFLLE1BQU0sRUFFWixNQUFNLHlCQUF5QixDQUFDO0FBRWpDLHFCQUFhLHVCQUF1QjtJQTBCaEMsT0FBTyxDQUFDLFNBQVM7SUF6Qm5CLFNBQWdCLE1BQU0sRUFBRSxNQUFN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AAC,SAAS,EAAE,eAAe,EAAE,SAAS,CAAC,EAAE,iBAAiB,oCAUhF;IAEM,SAAS,IAAI,OAAO,CAE1B;IAEM,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAUrE;IAEM,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,QAMhE;IAEM,YAAY,CAAC,QAAQ,EAAE,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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibDFfc3luY2hyb25pemVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbW9kdWxlcy9sMV9zeW5jaHJvbml6ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUNyRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDaEQsT0FBTyxFQUFFLGFBQWEsRUFBRSxjQUFjLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUMxRSxPQUFPLEtBQUssRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHVDQUF1QyxDQUFDO0FBRWpGLE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLHFCQUFxQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFHckYsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUF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