@aztec/archiver 0.56.0 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dest/archiver/archiver.d.ts +27 -22
- package/dest/archiver/archiver.d.ts.map +1 -1
- package/dest/archiver/archiver.js +421 -115
- package/dest/archiver/archiver_store.d.ts +39 -10
- package/dest/archiver/archiver_store.d.ts.map +1 -1
- package/dest/archiver/archiver_store_test_suite.d.ts.map +1 -1
- package/dest/archiver/archiver_store_test_suite.js +84 -31
- package/dest/archiver/config.js +6 -6
- package/dest/archiver/data_retrieval.d.ts +2 -3
- package/dest/archiver/data_retrieval.d.ts.map +1 -1
- package/dest/archiver/data_retrieval.js +23 -22
- package/dest/archiver/epoch_helpers.d.ts +15 -0
- package/dest/archiver/epoch_helpers.d.ts.map +1 -0
- package/dest/archiver/epoch_helpers.js +23 -0
- package/dest/archiver/kv_archiver_store/block_store.d.ts +20 -1
- package/dest/archiver/kv_archiver_store/block_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/block_store.js +62 -5
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts +3 -3
- package/dest/archiver/kv_archiver_store/contract_class_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/contract_class_store.js +12 -5
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts +2 -2
- package/dest/archiver/kv_archiver_store/contract_instance_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/contract_instance_store.js +5 -2
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +29 -10
- package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/kv_archiver_store.js +57 -17
- package/dest/archiver/kv_archiver_store/log_store.d.ts +4 -5
- package/dest/archiver/kv_archiver_store/log_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/log_store.js +18 -14
- package/dest/archiver/kv_archiver_store/message_store.d.ts +2 -1
- package/dest/archiver/kv_archiver_store/message_store.d.ts.map +1 -1
- package/dest/archiver/kv_archiver_store/message_store.js +17 -13
- package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.d.ts +3 -2
- package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.d.ts.map +1 -1
- package/dest/archiver/memory_archiver_store/l1_to_l2_message_store.js +12 -14
- package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts +23 -23
- package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts.map +1 -1
- package/dest/archiver/memory_archiver_store/memory_archiver_store.js +130 -70
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +17 -1
- package/dest/index.js +2 -1
- package/dest/test/index.d.ts +4 -0
- package/dest/test/index.d.ts.map +1 -0
- package/dest/test/index.js +4 -0
- package/dest/test/mock_archiver.d.ts +22 -0
- package/dest/test/mock_archiver.d.ts.map +1 -0
- package/dest/test/mock_archiver.js +44 -0
- package/dest/test/mock_l1_to_l2_message_source.d.ts +16 -0
- package/dest/test/mock_l1_to_l2_message_source.d.ts.map +1 -0
- package/dest/test/mock_l1_to_l2_message_source.js +25 -0
- package/dest/test/mock_l2_block_source.d.ts +75 -0
- package/dest/test/mock_l2_block_source.d.ts.map +1 -0
- package/dest/test/mock_l2_block_source.js +154 -0
- package/package.json +15 -11
- package/src/archiver/archiver.ts +553 -170
- package/src/archiver/archiver_store.ts +48 -19
- package/src/archiver/archiver_store_test_suite.ts +111 -73
- package/src/archiver/config.ts +5 -5
- package/src/archiver/data_retrieval.ts +25 -26
- package/src/archiver/epoch_helpers.ts +26 -0
- package/src/archiver/kv_archiver_store/block_store.ts +70 -2
- package/src/archiver/kv_archiver_store/contract_class_store.ts +24 -9
- package/src/archiver/kv_archiver_store/contract_instance_store.ts +5 -2
- package/src/archiver/kv_archiver_store/kv_archiver_store.ts +71 -29
- package/src/archiver/kv_archiver_store/log_store.ts +18 -18
- package/src/archiver/kv_archiver_store/message_store.ts +16 -18
- package/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts +13 -19
- package/src/archiver/memory_archiver_store/memory_archiver_store.ts +154 -83
- package/src/factory.ts +18 -0
- package/src/index.ts +1 -0
- package/src/test/index.ts +3 -0
- package/src/test/mock_archiver.ts +55 -0
- package/src/test/mock_l1_to_l2_message_source.ts +31 -0
- package/src/test/mock_l2_block_source.ts +190 -0
- package/dest/archiver/kv_archiver_store/proven_store.d.ts +0 -14
- package/dest/archiver/kv_archiver_store/proven_store.d.ts.map +0 -1
- package/dest/archiver/kv_archiver_store/proven_store.js +0 -30
- package/src/archiver/kv_archiver_store/proven_store.ts +0 -34
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { L2Block, type L2BlockSource, type L2Tips, type TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types';
|
|
2
|
+
import { EthAddress, type Header } from '@aztec/circuits.js';
|
|
3
|
+
import { createDebugLogger } from '@aztec/foundation/log';
|
|
4
|
+
|
|
5
|
+
import { getSlotRangeForEpoch } from '../archiver/epoch_helpers.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A mocked implementation of L2BlockSource to be used in tests.
|
|
9
|
+
*/
|
|
10
|
+
export class MockL2BlockSource implements L2BlockSource {
|
|
11
|
+
protected l2Blocks: L2Block[] = [];
|
|
12
|
+
|
|
13
|
+
private provenEpochNumber: number = 0;
|
|
14
|
+
private provenBlockNumber: number = 0;
|
|
15
|
+
|
|
16
|
+
private log = createDebugLogger('aztec:archiver:mock_l2_block_source');
|
|
17
|
+
|
|
18
|
+
public createBlocks(numBlocks: number) {
|
|
19
|
+
for (let i = 0; i < numBlocks; i++) {
|
|
20
|
+
const blockNum = this.l2Blocks.length + 1;
|
|
21
|
+
const block = L2Block.random(blockNum);
|
|
22
|
+
this.l2Blocks.push(block);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
this.log.verbose(`Created ${numBlocks} blocks in the mock L2 block source`);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public addBlocks(blocks: L2Block[]) {
|
|
29
|
+
this.l2Blocks.push(...blocks);
|
|
30
|
+
this.log.verbose(`Added ${blocks.length} blocks to the mock L2 block source`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public removeBlocks(numBlocks: number) {
|
|
34
|
+
this.l2Blocks = this.l2Blocks.slice(0, -numBlocks);
|
|
35
|
+
this.log.verbose(`Removed ${numBlocks} blocks from the mock L2 block source`);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public setProvenBlockNumber(provenBlockNumber: number) {
|
|
39
|
+
this.provenBlockNumber = provenBlockNumber;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public setProvenEpochNumber(provenEpochNumber: number) {
|
|
43
|
+
this.provenEpochNumber = provenEpochNumber;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Method to fetch the rollup contract address at the base-layer.
|
|
48
|
+
* @returns The rollup address.
|
|
49
|
+
*/
|
|
50
|
+
getRollupAddress(): Promise<EthAddress> {
|
|
51
|
+
return Promise.resolve(EthAddress.random());
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Method to fetch the registry contract address at the base-layer.
|
|
56
|
+
* @returns The registry address.
|
|
57
|
+
*/
|
|
58
|
+
getRegistryAddress(): Promise<EthAddress> {
|
|
59
|
+
return Promise.resolve(EthAddress.random());
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Gets the number of the latest L2 block processed by the block source implementation.
|
|
64
|
+
* @returns In this mock instance, returns the number of L2 blocks that we've mocked.
|
|
65
|
+
*/
|
|
66
|
+
public getBlockNumber() {
|
|
67
|
+
return Promise.resolve(this.l2Blocks.length);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public async getProvenBlockNumber(): Promise<number> {
|
|
71
|
+
return this.provenBlockNumber ?? (await this.getBlockNumber());
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public getProvenL2EpochNumber(): Promise<number | undefined> {
|
|
75
|
+
return Promise.resolve(this.provenEpochNumber);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Gets an l2 block.
|
|
80
|
+
* @param number - The block number to return (inclusive).
|
|
81
|
+
* @returns The requested L2 block.
|
|
82
|
+
*/
|
|
83
|
+
public getBlock(number: number) {
|
|
84
|
+
return Promise.resolve(this.l2Blocks[number - 1]);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Gets up to `limit` amount of L2 blocks starting from `from`.
|
|
89
|
+
* @param from - Number of the first block to return (inclusive).
|
|
90
|
+
* @param limit - The maximum number of blocks to return.
|
|
91
|
+
* @returns The requested mocked L2 blocks.
|
|
92
|
+
*/
|
|
93
|
+
public getBlocks(from: number, limit: number, proven?: boolean) {
|
|
94
|
+
return Promise.resolve(
|
|
95
|
+
this.l2Blocks
|
|
96
|
+
.slice(from - 1, from - 1 + limit)
|
|
97
|
+
.filter(b => !proven || this.provenBlockNumber === undefined || b.number <= this.provenBlockNumber),
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
getBlockHeader(number: number | 'latest'): Promise<Header | undefined> {
|
|
102
|
+
return Promise.resolve(this.l2Blocks.at(typeof number === 'number' ? number - 1 : -1)?.header);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
getBlocksForEpoch(epochNumber: bigint): Promise<L2Block[]> {
|
|
106
|
+
const [start, end] = getSlotRangeForEpoch(epochNumber);
|
|
107
|
+
const blocks = this.l2Blocks.filter(b => {
|
|
108
|
+
const slot = b.header.globalVariables.slotNumber.toBigInt();
|
|
109
|
+
return slot >= start && slot <= end;
|
|
110
|
+
});
|
|
111
|
+
return Promise.resolve(blocks);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Gets a tx effect.
|
|
116
|
+
* @param txHash - The hash of a transaction which resulted in the returned tx effect.
|
|
117
|
+
* @returns The requested tx effect.
|
|
118
|
+
*/
|
|
119
|
+
public getTxEffect(txHash: TxHash) {
|
|
120
|
+
const txEffect = this.l2Blocks.flatMap(b => b.body.txEffects).find(tx => tx.txHash.equals(txHash));
|
|
121
|
+
return Promise.resolve(txEffect);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Gets a receipt of a settled tx.
|
|
126
|
+
* @param txHash - The hash of a tx we try to get the receipt for.
|
|
127
|
+
* @returns The requested tx receipt (or undefined if not found).
|
|
128
|
+
*/
|
|
129
|
+
public getSettledTxReceipt(txHash: TxHash): Promise<TxReceipt | undefined> {
|
|
130
|
+
for (const block of this.l2Blocks) {
|
|
131
|
+
for (const txEffect of block.body.txEffects) {
|
|
132
|
+
if (txEffect.txHash.equals(txHash)) {
|
|
133
|
+
return Promise.resolve(
|
|
134
|
+
new TxReceipt(
|
|
135
|
+
txHash,
|
|
136
|
+
TxStatus.SUCCESS,
|
|
137
|
+
'',
|
|
138
|
+
txEffect.transactionFee.toBigInt(),
|
|
139
|
+
block.hash().toBuffer(),
|
|
140
|
+
block.number,
|
|
141
|
+
),
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return Promise.resolve(undefined);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
async getL2Tips(): Promise<L2Tips> {
|
|
150
|
+
const [latest, proven, finalized] = [
|
|
151
|
+
await this.getBlockNumber(),
|
|
152
|
+
await this.getProvenBlockNumber(),
|
|
153
|
+
await this.getProvenBlockNumber(),
|
|
154
|
+
] as const;
|
|
155
|
+
|
|
156
|
+
return {
|
|
157
|
+
latest: { number: latest, hash: this.l2Blocks[latest - 1]?.hash().toString() },
|
|
158
|
+
proven: { number: proven, hash: this.l2Blocks[proven - 1]?.hash().toString() },
|
|
159
|
+
finalized: { number: finalized, hash: this.l2Blocks[finalized - 1]?.hash().toString() },
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
getL2EpochNumber(): Promise<bigint> {
|
|
164
|
+
throw new Error('Method not implemented.');
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
getL2SlotNumber(): Promise<bigint> {
|
|
168
|
+
throw new Error('Method not implemented.');
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
isEpochComplete(_epochNumber: bigint): Promise<boolean> {
|
|
172
|
+
throw new Error('Method not implemented.');
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Starts the block source. In this mock implementation, this is a noop.
|
|
177
|
+
* @returns A promise that signals the initialization of the l2 block source on completion.
|
|
178
|
+
*/
|
|
179
|
+
public start(): Promise<void> {
|
|
180
|
+
return Promise.resolve();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Stops the block source. In this mock implementation, this is a noop.
|
|
185
|
+
* @returns A promise that signals the l2 block source is now stopped.
|
|
186
|
+
*/
|
|
187
|
+
public stop(): Promise<void> {
|
|
188
|
+
return Promise.resolve();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type AztecKVStore } from '@aztec/kv-store';
|
|
2
|
-
import { type SingletonDataRetrieval } from '../structs/data_retrieval.js';
|
|
3
|
-
export declare class ProvenStore {
|
|
4
|
-
#private;
|
|
5
|
-
private db;
|
|
6
|
-
constructor(db: AztecKVStore);
|
|
7
|
-
/**
|
|
8
|
-
* Gets the most recent L1 block processed.
|
|
9
|
-
*/
|
|
10
|
-
getSynchedL1BlockNumber(): bigint | undefined;
|
|
11
|
-
getProvenL2BlockNumber(): number;
|
|
12
|
-
setProvenL2BlockNumber(blockNumber: SingletonDataRetrieval<number>): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=proven_store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proven_store.d.ts","sourceRoot":"","sources":["../../../src/archiver/kv_archiver_store/proven_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,iBAAiB,CAAC;AAEzE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,qBAAa,WAAW;;IAOV,OAAO,CAAC,EAAE;gBAAF,EAAE,EAAE,YAAY;IAKpC;;OAEG;IACH,uBAAuB,IAAI,MAAM,GAAG,SAAS;IAI7C,sBAAsB,IAAI,MAAM;IAI1B,sBAAsB,CAAC,WAAW,EAAE,sBAAsB,CAAC,MAAM,CAAC;CAMzE"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
var _ProvenStore_lastSynchedL1Block, _ProvenStore_lastProvenL2Block;
|
|
2
|
-
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
|
|
3
|
-
export class ProvenStore {
|
|
4
|
-
constructor(db) {
|
|
5
|
-
this.db = db;
|
|
6
|
-
/** Stores L1 block number in which the last processed L2 block was included */
|
|
7
|
-
_ProvenStore_lastSynchedL1Block.set(this, void 0);
|
|
8
|
-
/** Stores last proven L2 block number */
|
|
9
|
-
_ProvenStore_lastProvenL2Block.set(this, void 0);
|
|
10
|
-
__classPrivateFieldSet(this, _ProvenStore_lastSynchedL1Block, db.openSingleton('archiver_last_l1_block_proven_logs'), "f");
|
|
11
|
-
__classPrivateFieldSet(this, _ProvenStore_lastProvenL2Block, db.openSingleton('archiver_last_proven_l2_block'), "f");
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Gets the most recent L1 block processed.
|
|
15
|
-
*/
|
|
16
|
-
getSynchedL1BlockNumber() {
|
|
17
|
-
return __classPrivateFieldGet(this, _ProvenStore_lastSynchedL1Block, "f").get();
|
|
18
|
-
}
|
|
19
|
-
getProvenL2BlockNumber() {
|
|
20
|
-
return __classPrivateFieldGet(this, _ProvenStore_lastProvenL2Block, "f").get() ?? 0;
|
|
21
|
-
}
|
|
22
|
-
async setProvenL2BlockNumber(blockNumber) {
|
|
23
|
-
await this.db.transaction(() => {
|
|
24
|
-
void __classPrivateFieldGet(this, _ProvenStore_lastProvenL2Block, "f").set(blockNumber.retrievedData);
|
|
25
|
-
void __classPrivateFieldGet(this, _ProvenStore_lastSynchedL1Block, "f").set(blockNumber.lastProcessedL1BlockNumber);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
_ProvenStore_lastSynchedL1Block = new WeakMap(), _ProvenStore_lastProvenL2Block = new WeakMap();
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdmVuX3N0b3JlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FyY2hpdmVyL2t2X2FyY2hpdmVyX3N0b3JlL3Byb3Zlbl9zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUlBLE1BQU0sT0FBTyxXQUFXO0lBT3RCLFlBQW9CLEVBQWdCO1FBQWhCLE9BQUUsR0FBRixFQUFFLENBQWM7UUFOcEMsK0VBQStFO1FBQy9FLGtEQUE0QztRQUU1Qyx5Q0FBeUM7UUFDekMsaURBQTJDO1FBR3pDLHVCQUFBLElBQUksbUNBQXVCLEVBQUUsQ0FBQyxhQUFhLENBQUMsb0NBQW9DLENBQUMsTUFBQSxDQUFDO1FBQ2xGLHVCQUFBLElBQUksa0NBQXNCLEVBQUUsQ0FBQyxhQUFhLENBQUMsK0JBQStCLENBQUMsTUFBQSxDQUFDO0lBQzlFLENBQUM7SUFFRDs7T0FFRztJQUNILHVCQUF1QjtRQUNyQixPQUFPLHVCQUFBLElBQUksdUNBQW9CLENBQUMsR0FBRyxFQUFFLENBQUM7SUFDeEMsQ0FBQztJQUVELHNCQUFzQjtRQUNwQixPQUFPLHVCQUFBLElBQUksc0NBQW1CLENBQUMsR0FBRyxFQUFFLElBQUksQ0FBQyxDQUFDO0lBQzVDLENBQUM7SUFFRCxLQUFLLENBQUMsc0JBQXNCLENBQUMsV0FBMkM7UUFDdEUsTUFBTSxJQUFJLENBQUMsRUFBRSxDQUFDLFdBQVcsQ0FBQyxHQUFHLEVBQUU7WUFDN0IsS0FBSyx1QkFBQSxJQUFJLHNDQUFtQixDQUFDLEdBQUcsQ0FBQyxXQUFXLENBQUMsYUFBYSxDQUFDLENBQUM7WUFDNUQsS0FBSyx1QkFBQSxJQUFJLHVDQUFvQixDQUFDLEdBQUcsQ0FBQyxXQUFXLENBQUMsMEJBQTBCLENBQUMsQ0FBQztRQUM1RSxDQUFDLENBQUMsQ0FBQztJQUNMLENBQUM7Q0FDRiJ9
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type AztecKVStore, type AztecSingleton } from '@aztec/kv-store';
|
|
2
|
-
|
|
3
|
-
import { type SingletonDataRetrieval } from '../structs/data_retrieval.js';
|
|
4
|
-
|
|
5
|
-
export class ProvenStore {
|
|
6
|
-
/** Stores L1 block number in which the last processed L2 block was included */
|
|
7
|
-
#lastSynchedL1Block: AztecSingleton<bigint>;
|
|
8
|
-
|
|
9
|
-
/** Stores last proven L2 block number */
|
|
10
|
-
#lastProvenL2Block: AztecSingleton<number>;
|
|
11
|
-
|
|
12
|
-
constructor(private db: AztecKVStore) {
|
|
13
|
-
this.#lastSynchedL1Block = db.openSingleton('archiver_last_l1_block_proven_logs');
|
|
14
|
-
this.#lastProvenL2Block = db.openSingleton('archiver_last_proven_l2_block');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Gets the most recent L1 block processed.
|
|
19
|
-
*/
|
|
20
|
-
getSynchedL1BlockNumber(): bigint | undefined {
|
|
21
|
-
return this.#lastSynchedL1Block.get();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
getProvenL2BlockNumber(): number {
|
|
25
|
-
return this.#lastProvenL2Block.get() ?? 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
async setProvenL2BlockNumber(blockNumber: SingletonDataRetrieval<number>) {
|
|
29
|
-
await this.db.transaction(() => {
|
|
30
|
-
void this.#lastProvenL2Block.set(blockNumber.retrievedData);
|
|
31
|
-
void this.#lastSynchedL1Block.set(blockNumber.lastProcessedL1BlockNumber);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|