@aztec/archiver 0.0.1-commit.b2a5d0dd1 → 0.0.1-commit.b3d3157a
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 +7 -5
- package/dest/archiver.d.ts +49 -14
- package/dest/archiver.d.ts.map +1 -1
- package/dest/archiver.js +216 -68
- package/dest/config.d.ts +4 -3
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +11 -16
- package/dest/errors.d.ts +19 -13
- package/dest/errors.d.ts.map +1 -1
- package/dest/errors.js +32 -16
- package/dest/factory.d.ts +12 -6
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +31 -21
- package/dest/index.d.ts +9 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +8 -1
- package/dest/l1/calldata_retriever.d.ts +2 -1
- package/dest/l1/calldata_retriever.d.ts.map +1 -1
- package/dest/l1/calldata_retriever.js +13 -4
- package/dest/l1/trace_tx.d.ts +12 -66
- package/dest/l1/trace_tx.d.ts.map +1 -1
- package/dest/modules/contract_data_source_adapter.d.ts +25 -0
- package/dest/modules/contract_data_source_adapter.d.ts.map +1 -0
- package/dest/modules/contract_data_source_adapter.js +40 -0
- package/dest/modules/data_source_base.d.ts +71 -49
- package/dest/modules/data_source_base.d.ts.map +1 -1
- package/dest/modules/data_source_base.js +269 -143
- package/dest/modules/data_store_updater.d.ts +18 -6
- package/dest/modules/data_store_updater.d.ts.map +1 -1
- package/dest/modules/data_store_updater.js +108 -59
- package/dest/modules/instrumentation.js +3 -1
- package/dest/modules/l1_synchronizer.d.ts +6 -5
- package/dest/modules/l1_synchronizer.d.ts.map +1 -1
- package/dest/modules/l1_synchronizer.js +203 -100
- package/dest/modules/outbox_trees_resolver.d.ts +62 -0
- package/dest/modules/outbox_trees_resolver.d.ts.map +1 -0
- package/dest/modules/outbox_trees_resolver.js +162 -0
- package/dest/modules/validation.d.ts +4 -3
- package/dest/modules/validation.d.ts.map +1 -1
- package/dest/modules/validation.js +4 -4
- package/dest/store/block_store.d.ts +155 -98
- package/dest/store/block_store.d.ts.map +1 -1
- package/dest/store/block_store.js +473 -265
- package/dest/store/contract_class_store.d.ts +17 -3
- package/dest/store/contract_class_store.d.ts.map +1 -1
- package/dest/store/contract_class_store.js +17 -1
- package/dest/store/contract_instance_store.d.ts +28 -1
- package/dest/store/contract_instance_store.d.ts.map +1 -1
- package/dest/store/contract_instance_store.js +31 -0
- package/dest/store/data_stores.d.ts +68 -0
- package/dest/store/data_stores.d.ts.map +1 -0
- package/dest/store/data_stores.js +54 -0
- package/dest/store/function_names_cache.d.ts +17 -0
- package/dest/store/function_names_cache.d.ts.map +1 -0
- package/dest/store/function_names_cache.js +30 -0
- package/dest/store/l2_tips_cache.d.ts +13 -8
- package/dest/store/l2_tips_cache.d.ts.map +1 -1
- package/dest/store/l2_tips_cache.js +13 -96
- package/dest/store/log_store.d.ts +42 -40
- package/dest/store/log_store.d.ts.map +1 -1
- package/dest/store/log_store.js +257 -478
- package/dest/store/log_store_codec.d.ts +70 -0
- package/dest/store/log_store_codec.d.ts.map +1 -0
- package/dest/store/log_store_codec.js +101 -0
- package/dest/store/message_store.d.ts +9 -3
- package/dest/store/message_store.d.ts.map +1 -1
- package/dest/store/message_store.js +31 -1
- package/dest/test/fake_l1_state.d.ts +2 -1
- package/dest/test/fake_l1_state.d.ts.map +1 -1
- package/dest/test/fake_l1_state.js +25 -8
- package/dest/test/mock_l2_block_source.d.ts +47 -51
- package/dest/test/mock_l2_block_source.d.ts.map +1 -1
- package/dest/test/mock_l2_block_source.js +223 -185
- package/dest/test/noop_l1_archiver.d.ts +10 -6
- package/dest/test/noop_l1_archiver.d.ts.map +1 -1
- package/dest/test/noop_l1_archiver.js +19 -8
- package/package.json +14 -14
- package/src/archiver.ts +265 -72
- package/src/config.ts +12 -19
- package/src/errors.ts +46 -23
- package/src/factory.ts +38 -20
- package/src/index.ts +16 -1
- package/src/l1/calldata_retriever.ts +14 -4
- package/src/modules/contract_data_source_adapter.ts +55 -0
- package/src/modules/data_source_base.ts +335 -187
- package/src/modules/data_store_updater.ts +118 -61
- package/src/modules/instrumentation.ts +1 -1
- package/src/modules/l1_synchronizer.ts +278 -120
- package/src/modules/outbox_trees_resolver.ts +199 -0
- package/src/modules/validation.ts +8 -7
- package/src/store/block_store.ts +566 -323
- package/src/store/contract_class_store.ts +28 -2
- package/src/store/contract_instance_store.ts +43 -0
- package/src/store/data_stores.ts +104 -0
- package/src/store/function_names_cache.ts +37 -0
- package/src/store/l2_tips_cache.ts +16 -115
- package/src/store/log_store.ts +296 -650
- package/src/store/log_store_codec.ts +132 -0
- package/src/store/message_store.ts +35 -2
- package/src/test/fake_l1_state.ts +24 -14
- package/src/test/mock_l2_block_source.ts +271 -239
- package/src/test/noop_l1_archiver.ts +39 -8
- package/dest/store/kv_archiver_store.d.ts +0 -383
- package/dest/store/kv_archiver_store.d.ts.map +0 -1
- package/dest/store/kv_archiver_store.js +0 -501
- package/src/store/kv_archiver_store.ts +0 -728
package/src/archiver.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { BlobClientInterface } from '@aztec/blob-client/client';
|
|
2
|
-
import { EpochCache } from '@aztec/epoch-cache';
|
|
3
|
-
import { BlockTagTooOldError, RollupContract } from '@aztec/ethereum/contracts';
|
|
2
|
+
import { EpochCache, PROPOSER_PIPELINING_SLOT_OFFSET } from '@aztec/epoch-cache';
|
|
3
|
+
import { BlockTagTooOldError, OutboxContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
4
4
|
import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses';
|
|
5
5
|
import type { ViemPublicClient, ViemPublicDebugClient } from '@aztec/ethereum/types';
|
|
6
6
|
import { BlockNumber, CheckpointNumber, EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
7
7
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
8
|
-
import { merge } from '@aztec/foundation/collection';
|
|
8
|
+
import { merge, pick } from '@aztec/foundation/collection';
|
|
9
9
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
10
10
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
11
11
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
@@ -14,8 +14,10 @@ import { RunningPromise, makeLoggingErrorHandler } from '@aztec/foundation/runni
|
|
|
14
14
|
import { DateProvider, elapsed } from '@aztec/foundation/timer';
|
|
15
15
|
import {
|
|
16
16
|
type ArchiverEmitter,
|
|
17
|
+
type BlockHash,
|
|
17
18
|
L2Block,
|
|
18
19
|
type L2BlockSink,
|
|
20
|
+
L2BlockSourceEvents,
|
|
19
21
|
type L2Tips,
|
|
20
22
|
type ValidateCheckpointResult,
|
|
21
23
|
} from '@aztec/stdlib/block';
|
|
@@ -25,19 +27,23 @@ import {
|
|
|
25
27
|
getEpochAtSlot,
|
|
26
28
|
getSlotAtNextL1Block,
|
|
27
29
|
getSlotRangeForEpoch,
|
|
30
|
+
getTimestampForSlot,
|
|
28
31
|
getTimestampRangeForEpoch,
|
|
29
32
|
} from '@aztec/stdlib/epoch-helpers';
|
|
33
|
+
import type { L2ToL1MembershipWitness } from '@aztec/stdlib/messaging';
|
|
34
|
+
import type { BlockHeader, TxHash } from '@aztec/stdlib/tx';
|
|
30
35
|
import { type TelemetryClient, type Traceable, type Tracer, trackSpan } from '@aztec/telemetry-client';
|
|
31
36
|
|
|
32
37
|
import { type ArchiverConfig, mapArchiverConfig } from './config.js';
|
|
33
|
-
import { BlockAlreadyCheckpointedError, NoBlobBodiesFoundError } from './errors.js';
|
|
38
|
+
import { BlockAlreadyCheckpointedError, BlockOrCheckpointSlotExpiredError, NoBlobBodiesFoundError } from './errors.js';
|
|
34
39
|
import { validateAndLogHistoricalLogsAvailability } from './l1/validate_historical_logs.js';
|
|
35
40
|
import { validateAndLogTraceAvailability } from './l1/validate_trace.js';
|
|
36
41
|
import { ArchiverDataSourceBase } from './modules/data_source_base.js';
|
|
37
42
|
import { ArchiverDataStoreUpdater } from './modules/data_store_updater.js';
|
|
38
43
|
import type { ArchiverInstrumentation } from './modules/instrumentation.js';
|
|
39
44
|
import type { ArchiverL1Synchronizer } from './modules/l1_synchronizer.js';
|
|
40
|
-
import
|
|
45
|
+
import { OutboxTreesResolver } from './modules/outbox_trees_resolver.js';
|
|
46
|
+
import { type ArchiverDataStores, backupArchiverDataStores, getArchiverSynchPoint } from './store/data_stores.js';
|
|
41
47
|
import { L2TipsCache } from './store/l2_tips_cache.js';
|
|
42
48
|
|
|
43
49
|
/** Export ArchiverEmitter for use in factory and tests. */
|
|
@@ -45,11 +51,20 @@ export type { ArchiverEmitter };
|
|
|
45
51
|
|
|
46
52
|
/** Request to add a block to the archiver, queued for processing by the sync loop. */
|
|
47
53
|
type AddBlockRequest = {
|
|
54
|
+
type: 'block';
|
|
48
55
|
block: L2Block;
|
|
49
56
|
resolve: () => void;
|
|
50
57
|
reject: (err: Error) => void;
|
|
51
58
|
};
|
|
52
59
|
|
|
60
|
+
/** Request to add a proposed checkpoint to the archiver, queued for processing by the sync loop. */
|
|
61
|
+
type AddProposedCheckpointRequest = {
|
|
62
|
+
type: 'checkpoint';
|
|
63
|
+
checkpoint: ProposedCheckpointInput;
|
|
64
|
+
resolve: () => void;
|
|
65
|
+
reject: (err: Error) => void;
|
|
66
|
+
};
|
|
67
|
+
|
|
53
68
|
export type ArchiverDeps = {
|
|
54
69
|
telemetry?: TelemetryClient;
|
|
55
70
|
blobClient: BlobClientInterface;
|
|
@@ -72,11 +87,14 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
72
87
|
/** L1 synchronizer that handles fetching checkpoints and messages from L1. */
|
|
73
88
|
private readonly synchronizer: ArchiverL1Synchronizer;
|
|
74
89
|
|
|
90
|
+
/** Resolver for L2-to-L1 message membership witnesses, built over this archiver's read view. */
|
|
91
|
+
private readonly outboxTreesResolver: OutboxTreesResolver;
|
|
92
|
+
|
|
75
93
|
private initialSyncComplete: boolean = false;
|
|
76
94
|
private initialSyncPromise: PromiseWithResolvers<void>;
|
|
77
95
|
|
|
78
|
-
/** Queue of blocks to be added to the store, processed by the sync loop. */
|
|
79
|
-
private
|
|
96
|
+
/** Queue of blocks and checkpoints to be added to the store, processed by the sync loop. */
|
|
97
|
+
private inboundQueue: (AddBlockRequest | AddProposedCheckpointRequest)[] = [];
|
|
80
98
|
|
|
81
99
|
/** Helper to handle updates to the store */
|
|
82
100
|
private readonly updater: ArchiverDataStoreUpdater;
|
|
@@ -93,27 +111,34 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
93
111
|
* @param publicClient - A client for interacting with the Ethereum node.
|
|
94
112
|
* @param debugClient - A client for interacting with the Ethereum node for debug/trace methods.
|
|
95
113
|
* @param rollup - Rollup contract instance.
|
|
114
|
+
* @param outbox - Outbox contract instance, used to read per-epoch L2-to-L1 message roots.
|
|
96
115
|
* @param inbox - Inbox contract instance.
|
|
97
116
|
* @param l1Addresses - L1 contract addresses (registry, governance proposer, slashing proposer).
|
|
98
|
-
* @param
|
|
117
|
+
* @param dataStores - Archiver substores for storage & retrieval of blocks, encrypted logs & contract data.
|
|
99
118
|
* @param config - Archiver configuration options.
|
|
100
119
|
* @param blobClient - Client for retrieving blob data.
|
|
101
|
-
* @param dateProvider - Provider for current date/time.
|
|
102
120
|
* @param instrumentation - Instrumentation for metrics and tracing.
|
|
103
121
|
* @param l1Constants - L1 rollup constants.
|
|
122
|
+
* @param synchronizer - L1 synchronizer that handles fetching checkpoints and messages from L1.
|
|
123
|
+
* @param events - Event emitter shared with the synchronizer.
|
|
124
|
+
* @param initialHeader - Genesis block header.
|
|
125
|
+
* @param initialBlockHash - Precomputed hash of the genesis block header.
|
|
126
|
+
* @param l2TipsCache - In-memory cache for L2 chain tips.
|
|
127
|
+
* @param dateProvider - Provider for current date/time, used for wall-clock orphan-block pruning.
|
|
104
128
|
* @param log - A logger.
|
|
105
129
|
*/
|
|
106
130
|
constructor(
|
|
107
131
|
private readonly publicClient: ViemPublicClient,
|
|
108
132
|
private readonly debugClient: ViemPublicDebugClient,
|
|
109
133
|
private readonly rollup: RollupContract,
|
|
134
|
+
private readonly outbox: OutboxContract,
|
|
110
135
|
private readonly l1Addresses: Pick<
|
|
111
136
|
L1ContractAddresses,
|
|
112
137
|
'rollupAddress' | 'registryAddress' | 'inboxAddress' | 'governanceProposerAddress'
|
|
113
138
|
> & {
|
|
114
139
|
slashingProposerAddress: EthAddress;
|
|
115
140
|
},
|
|
116
|
-
readonly
|
|
141
|
+
readonly dataStores: ArchiverDataStores,
|
|
117
142
|
private config: {
|
|
118
143
|
pollingIntervalMs: number;
|
|
119
144
|
batchSize: number;
|
|
@@ -121,6 +146,8 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
121
146
|
maxAllowedEthClientDriftSeconds: number;
|
|
122
147
|
ethereumAllowNoDebugHosts?: boolean;
|
|
123
148
|
skipHistoricalLogsCheck?: boolean;
|
|
149
|
+
orphanProposedBlockPruneGraceSeconds: number;
|
|
150
|
+
enableOrphanProposedBlockPruning: boolean;
|
|
124
151
|
},
|
|
125
152
|
private readonly blobClient: BlobClientInterface,
|
|
126
153
|
instrumentation: ArchiverInstrumentation,
|
|
@@ -130,21 +157,33 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
130
157
|
},
|
|
131
158
|
synchronizer: ArchiverL1Synchronizer,
|
|
132
159
|
events: ArchiverEmitter,
|
|
133
|
-
|
|
160
|
+
initialHeader: BlockHeader,
|
|
161
|
+
initialBlockHash: BlockHash,
|
|
162
|
+
l2TipsCache: L2TipsCache,
|
|
163
|
+
private readonly dateProvider: DateProvider,
|
|
134
164
|
private readonly log: Logger = createLogger('archiver'),
|
|
135
165
|
) {
|
|
136
|
-
super(
|
|
166
|
+
super(dataStores, l1Constants, initialHeader, initialBlockHash, l1Constants.genesisArchiveRoot);
|
|
137
167
|
|
|
138
168
|
this.tracer = instrumentation.tracer;
|
|
139
169
|
this.instrumentation = instrumentation;
|
|
140
170
|
this.initialSyncPromise = promiseWithResolvers();
|
|
141
171
|
this.synchronizer = synchronizer;
|
|
142
172
|
this.events = events;
|
|
143
|
-
this.l2TipsCache = l2TipsCache
|
|
144
|
-
this.updater = new ArchiverDataStoreUpdater(this.
|
|
173
|
+
this.l2TipsCache = l2TipsCache;
|
|
174
|
+
this.updater = new ArchiverDataStoreUpdater(this.dataStores, this.l2TipsCache, {
|
|
145
175
|
rollupManaLimit: l1Constants.rollupManaLimit,
|
|
146
176
|
});
|
|
147
177
|
|
|
178
|
+
// The resolver reads its witness data from this archiver and pins its lazy Outbox-root fetches
|
|
179
|
+
// to the archiver's synced L1 block. No method on `this` is invoked during construction.
|
|
180
|
+
this.outboxTreesResolver = new OutboxTreesResolver(
|
|
181
|
+
this.outbox,
|
|
182
|
+
this,
|
|
183
|
+
() => Promise.resolve(this.getL1BlockNumber()),
|
|
184
|
+
l1Constants.epochDuration,
|
|
185
|
+
);
|
|
186
|
+
|
|
148
187
|
// Running promise starts with a small interval inbetween runs, so all iterations needed for the initial sync
|
|
149
188
|
// are done as fast as possible. This then gets updated once the initial sync completes.
|
|
150
189
|
this.runningPromise = new RunningPromise(
|
|
@@ -155,6 +194,27 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
155
194
|
);
|
|
156
195
|
}
|
|
157
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Returns the L2-to-L1 membership witness for `message` emitted by tx `txHash`. The node selects
|
|
199
|
+
* the smallest partial-proof root on the Outbox that covers the tx's checkpoint and builds the
|
|
200
|
+
* witness against it.
|
|
201
|
+
*
|
|
202
|
+
* The node reads the Outbox roots lazily, pinned to its synced L1 block, so the witness reflects
|
|
203
|
+
* the node's synced view. Returns `undefined` if the tx isn't yet in a block/epoch or no covering
|
|
204
|
+
* root has landed on L1 as of the synced block.
|
|
205
|
+
*
|
|
206
|
+
* Caveat: roots are cached only for the current synced L1 block and re-fetched once the node
|
|
207
|
+
* advances, so a reorg is picked up on the next synced-block advance rather than re-validated per
|
|
208
|
+
* request.
|
|
209
|
+
*/
|
|
210
|
+
public getL2ToL1MembershipWitness(
|
|
211
|
+
txHash: TxHash,
|
|
212
|
+
message: Fr,
|
|
213
|
+
messageIndexInTx?: number,
|
|
214
|
+
): Promise<L2ToL1MembershipWitness | undefined> {
|
|
215
|
+
return this.outboxTreesResolver.getL2ToL1MembershipWitness(txHash, message, messageIndexInTx);
|
|
216
|
+
}
|
|
217
|
+
|
|
158
218
|
/** Updates archiver config */
|
|
159
219
|
public updateConfig(newConfig: Partial<ArchiverConfig>) {
|
|
160
220
|
this.config = merge(this.config, mapArchiverConfig(newConfig));
|
|
@@ -191,8 +251,10 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
191
251
|
|
|
192
252
|
// Log initial state for the archiver
|
|
193
253
|
const { l1StartBlock } = this.l1Constants;
|
|
194
|
-
const { blocksSynchedTo = l1StartBlock, messagesSynchedTo = l1StartBlock } = await
|
|
195
|
-
|
|
254
|
+
const { blocksSynchedTo = l1StartBlock, messagesSynchedTo = l1StartBlock } = await getArchiverSynchPoint(
|
|
255
|
+
this.stores,
|
|
256
|
+
);
|
|
257
|
+
const currentL2Checkpoint = await this.getCheckpointNumber();
|
|
196
258
|
this.log.info(
|
|
197
259
|
`Starting archiver sync to rollup contract ${this.rollup.address} from L1 block ${blocksSynchedTo} and L2 checkpoint ${currentL2Checkpoint}`,
|
|
198
260
|
{ blocksSynchedTo, messagesSynchedTo, currentL2Checkpoint },
|
|
@@ -209,6 +271,14 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
209
271
|
return this.runningPromise.trigger();
|
|
210
272
|
}
|
|
211
273
|
|
|
274
|
+
public trySyncImmediate() {
|
|
275
|
+
try {
|
|
276
|
+
return this.syncImmediate();
|
|
277
|
+
} catch (err) {
|
|
278
|
+
this.log.error(`Failed to trigger immediate archiver sync: ${err}`, err);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
212
282
|
/**
|
|
213
283
|
* Queues a block to be added to the archiver store and triggers processing.
|
|
214
284
|
* The block will be processed by the sync loop.
|
|
@@ -217,63 +287,85 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
217
287
|
* @returns A promise that resolves when the block has been added to the store, or rejects on error.
|
|
218
288
|
*/
|
|
219
289
|
public addBlock(block: L2Block): Promise<void> {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
this.log.error(`Sync immediate call failed: ${err}`);
|
|
226
|
-
});
|
|
227
|
-
});
|
|
290
|
+
const promise = promiseWithResolvers<void>();
|
|
291
|
+
this.inboundQueue.push({ block, ...promise, type: 'block' });
|
|
292
|
+
this.log.debug(`Queued block ${block.number} for processing`);
|
|
293
|
+
void this.trySyncImmediate();
|
|
294
|
+
return promise.promise;
|
|
228
295
|
}
|
|
229
296
|
|
|
230
|
-
|
|
231
|
-
|
|
297
|
+
/**
|
|
298
|
+
* Queues a new proposed checkpoint into the archiver store.
|
|
299
|
+
* Checks that the checkpoint is not for an L2 slot already synced from L1.
|
|
300
|
+
* Resolves once the checkpoint has been processed.
|
|
301
|
+
*/
|
|
302
|
+
public addProposedCheckpoint(pending: ProposedCheckpointInput): Promise<void> {
|
|
303
|
+
const promise = promiseWithResolvers<void>();
|
|
304
|
+
this.inboundQueue.push({ checkpoint: pending, ...promise, type: 'checkpoint' });
|
|
305
|
+
this.log.debug(`Queued checkpoint ${pending.checkpointNumber} for processing`);
|
|
306
|
+
void this.trySyncImmediate();
|
|
307
|
+
return promise.promise;
|
|
232
308
|
}
|
|
233
309
|
|
|
234
310
|
/**
|
|
235
|
-
* Processes all queued blocks, adding them to the store.
|
|
311
|
+
* Processes all queued blocks and checkpoints, adding them to the store.
|
|
236
312
|
* Called at the beginning of each sync iteration.
|
|
237
|
-
*
|
|
313
|
+
* Items are processed in the order they were queued.
|
|
238
314
|
*/
|
|
239
|
-
private async
|
|
240
|
-
if (this.
|
|
315
|
+
private async processInboundQueue(): Promise<void> {
|
|
316
|
+
if (this.inboundQueue.length === 0) {
|
|
241
317
|
return;
|
|
242
318
|
}
|
|
243
319
|
|
|
244
|
-
// Take all
|
|
245
|
-
const queuedItems = this.
|
|
246
|
-
this.log.debug(`Processing ${queuedItems.length} queued
|
|
320
|
+
// Take all items from the queue
|
|
321
|
+
const queuedItems = this.inboundQueue.splice(0, this.inboundQueue.length);
|
|
322
|
+
this.log.debug(`Processing ${queuedItems.length} queued inbound items`);
|
|
247
323
|
|
|
248
324
|
// Calculate slot threshold for validation
|
|
249
325
|
const l1Timestamp = this.synchronizer.getL1Timestamp();
|
|
250
326
|
const slotAtNextL1Block =
|
|
251
327
|
l1Timestamp === undefined ? undefined : getSlotAtNextL1Block(l1Timestamp, this.l1Constants);
|
|
252
328
|
|
|
253
|
-
//
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
329
|
+
// Helpers for manipulating blocks and checkpoints in the queue
|
|
330
|
+
const getSlot: (item: AddBlockRequest | AddProposedCheckpointRequest) => SlotNumber = item =>
|
|
331
|
+
item.type === 'block' ? item.block.header.globalVariables.slotNumber : item.checkpoint.header.slotNumber;
|
|
332
|
+
const getNumber: (item: AddBlockRequest | AddProposedCheckpointRequest) => number = item =>
|
|
333
|
+
item.type === 'block' ? item.block.number : item.checkpoint.checkpointNumber;
|
|
334
|
+
|
|
335
|
+
// Process each item individually to properly resolve/reject each promise
|
|
336
|
+
for (const item of queuedItems) {
|
|
337
|
+
const { resolve, reject, type } = item;
|
|
338
|
+
const itemSlot = getSlot(item);
|
|
339
|
+
const itemNumber = getNumber(item);
|
|
340
|
+
if (slotAtNextL1Block !== undefined && itemSlot < slotAtNextL1Block) {
|
|
341
|
+
const nextSlotTimestamp = getTimestampForSlot(slotAtNextL1Block, this.l1Constants);
|
|
257
342
|
this.log.warn(
|
|
258
|
-
`Rejecting proposed
|
|
259
|
-
{
|
|
343
|
+
`Rejecting proposed ${type} ${itemNumber} for past slot ${itemSlot} (current ${slotAtNextL1Block})`,
|
|
344
|
+
{ number: itemNumber, type, l1Timestamp, slotAtNextL1Block, nextSlotTimestamp },
|
|
260
345
|
);
|
|
261
|
-
reject(new
|
|
346
|
+
reject(new BlockOrCheckpointSlotExpiredError(itemSlot, nextSlotTimestamp, l1Timestamp));
|
|
262
347
|
continue;
|
|
263
348
|
}
|
|
264
349
|
|
|
265
350
|
try {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
351
|
+
if (type === 'block') {
|
|
352
|
+
const [durationMs] = await elapsed(() => this.updater.addProposedBlock(item.block));
|
|
353
|
+
this.instrumentation.processNewProposedBlock(durationMs, item.block);
|
|
354
|
+
} else {
|
|
355
|
+
await this.updater.addProposedCheckpoint(item.checkpoint);
|
|
356
|
+
}
|
|
357
|
+
this.log.debug(`Added ${type} ${itemNumber} to store`);
|
|
269
358
|
resolve();
|
|
270
359
|
} catch (err: any) {
|
|
271
360
|
if (err instanceof BlockAlreadyCheckpointedError) {
|
|
272
|
-
this.log.debug(`Proposed block ${
|
|
361
|
+
this.log.debug(`Proposed block ${itemNumber} matches already checkpointed block, ignoring late proposal`);
|
|
273
362
|
resolve();
|
|
274
363
|
continue;
|
|
275
364
|
}
|
|
276
|
-
this.log.error(`Failed to add
|
|
365
|
+
this.log.error(`Failed to add ${type} ${itemNumber} to store: ${err.message}`, err, {
|
|
366
|
+
number: itemNumber,
|
|
367
|
+
type,
|
|
368
|
+
});
|
|
277
369
|
reject(err);
|
|
278
370
|
}
|
|
279
371
|
}
|
|
@@ -289,9 +381,106 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
289
381
|
@trackSpan('Archiver.sync')
|
|
290
382
|
private async sync() {
|
|
291
383
|
// Process any queued blocks first, before doing L1 sync
|
|
292
|
-
await this.
|
|
384
|
+
await this.processInboundQueue();
|
|
293
385
|
// Now perform L1 sync
|
|
294
386
|
await this.syncFromL1();
|
|
387
|
+
// Prune proposed blocks with no corresponding proposed checkpoint by the end of their build slot.
|
|
388
|
+
await this.pruneOrphanProposedBlocks();
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Prunes a block-only local tip that was built atop a checkpoint that was never itself proposed.
|
|
393
|
+
*
|
|
394
|
+
* Under pipelining, a proposer publishes the blocks for a checkpoint (block-only proposals) before
|
|
395
|
+
* assembling and publishing the enclosing proposed checkpoint at the end of the build slot. A node
|
|
396
|
+
* that received those blocks but never the proposed checkpoint is left with an orphan tip it must
|
|
397
|
+
* not build on. We prune it once enough wall-clock time has elapsed that the proposed checkpoint
|
|
398
|
+
* should have arrived. This runs on wall-clock time (not L1 block advancement) so it fires during
|
|
399
|
+
* quiet L1 periods, and is the liveness counterpart to the sequencer's checkSync guard.
|
|
400
|
+
*
|
|
401
|
+
* The uncheckpointed suffix is scanned in order. Blocks covered by proposed checkpoints are left in
|
|
402
|
+
* place; the first block not covered by a proposed checkpoint starts the orphan suffix to prune.
|
|
403
|
+
*/
|
|
404
|
+
private async pruneOrphanProposedBlocks(): Promise<void> {
|
|
405
|
+
// Orphan pruning is a pipelining-only liveness mechanism: it cleans up block-only proposals
|
|
406
|
+
// whose enclosing checkpoint never arrived over gossip. The test-only automine sequencer is
|
|
407
|
+
// non-pipelined — it publishes each checkpoint synchronously in the slot it builds — so it
|
|
408
|
+
// never produces orphan proposed blocks. Running the prune there would race its two-step local
|
|
409
|
+
// push (addBlock then addProposedCheckpoint) and delete the block before its checkpoint attaches.
|
|
410
|
+
if (!this.config.enableOrphanProposedBlockPruning) {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
const tips = await this.getL2Tips();
|
|
414
|
+
const now = BigInt(this.dateProvider.nowInSeconds());
|
|
415
|
+
const pipeliningOffset = PROPOSER_PIPELINING_SLOT_OFFSET;
|
|
416
|
+
|
|
417
|
+
// The proposed tip is a proposed-checkpointed block, so there are no orphan proposed blocks to prune
|
|
418
|
+
if (tips.proposedCheckpoint.block.number === tips.proposed.number) {
|
|
419
|
+
this.log.trace(
|
|
420
|
+
`No orphan proposed blocks to prune: proposed tip ${tips.proposed.number} is checkpointed`,
|
|
421
|
+
pick(tips, 'proposed', 'proposedCheckpoint'),
|
|
422
|
+
);
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// Load the blocks that are candidates for pruning (ie blocks without a proposed checkpoint covering them)
|
|
427
|
+
const blocksWithoutProposedCheckpoint = await this.stores.blocks.getBlocksData({
|
|
428
|
+
from: BlockNumber(tips.proposedCheckpoint.block.number + 1),
|
|
429
|
+
limit: tips.proposed.number - tips.proposedCheckpoint.block.number,
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
// Iterate through them in order, the first one with a slot that should have received a proposed checkpoint
|
|
433
|
+
// is the first orphan block, and all blocks after it are also orphaned and should be pruned.
|
|
434
|
+
let lastSlotChecked = undefined;
|
|
435
|
+
for (const blockData of blocksWithoutProposedCheckpoint) {
|
|
436
|
+
// No need to recheck if this block had the same slot as the previous one.
|
|
437
|
+
const blockSlot = blockData.header.getSlot();
|
|
438
|
+
const blockNumber = blockData.header.getBlockNumber();
|
|
439
|
+
if (lastSlotChecked !== undefined && blockSlot === lastSlotChecked) {
|
|
440
|
+
continue;
|
|
441
|
+
}
|
|
442
|
+
lastSlotChecked = blockSlot;
|
|
443
|
+
|
|
444
|
+
// The proposed checkpoint should have landed by the start of the slot after the block's build slot
|
|
445
|
+
// (build slot = blockSlot - pipeliningOffset). Wait a grace period beyond that to tolerate propagation.
|
|
446
|
+
const expectedCheckpointedBySlot = SlotNumber(Number(blockSlot) - pipeliningOffset + 1);
|
|
447
|
+
const expectedCheckpointedByTime =
|
|
448
|
+
getTimestampForSlot(expectedCheckpointedBySlot, this.l1Constants) +
|
|
449
|
+
BigInt(this.config.orphanProposedBlockPruneGraceSeconds);
|
|
450
|
+
|
|
451
|
+
// If it's not checkpointed by the expected time, prune it along with all blocks after it.
|
|
452
|
+
if (now >= expectedCheckpointedByTime) {
|
|
453
|
+
const pruneAfterBlockNumber = BlockNumber(blockNumber - 1);
|
|
454
|
+
this.log.warn(
|
|
455
|
+
`Pruning orphan blocks after block ${pruneAfterBlockNumber}: block at slot ${blockSlot} belongs to ` +
|
|
456
|
+
`checkpoint ${blockData.checkpointNumber} which has no matching proposed checkpoint`,
|
|
457
|
+
{
|
|
458
|
+
firstUncheckpointedBlockHeader: blockData.header.toInspect(),
|
|
459
|
+
blockCheckpointNumber: blockData.checkpointNumber,
|
|
460
|
+
blockNumber,
|
|
461
|
+
blockSlot,
|
|
462
|
+
pipeliningOffset,
|
|
463
|
+
expectedCheckpointedBySlot,
|
|
464
|
+
expectedCheckpointedByTime,
|
|
465
|
+
now,
|
|
466
|
+
},
|
|
467
|
+
);
|
|
468
|
+
|
|
469
|
+
const prunedBlocks = await this.updater.removeBlocksWithoutProposedCheckpointAfter(pruneAfterBlockNumber);
|
|
470
|
+
if (prunedBlocks.length > 0) {
|
|
471
|
+
this.events.emit(L2BlockSourceEvents.L2PruneUncheckpointed, {
|
|
472
|
+
type: L2BlockSourceEvents.L2PruneUncheckpointed,
|
|
473
|
+
slotNumber: blockSlot,
|
|
474
|
+
blocks: prunedBlocks,
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
this.log.trace('No orphan proposed blocks to prune: all uncheckpointed blocks are still within the grace period', {
|
|
482
|
+
blocksWithoutProposedCheckpoint: blocksWithoutProposedCheckpoint.map(b => b.header.toInspect()),
|
|
483
|
+
});
|
|
295
484
|
}
|
|
296
485
|
|
|
297
486
|
private async syncFromL1() {
|
|
@@ -305,7 +494,7 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
305
494
|
if (currentL1BlockNumber + 1n >= l1BlockNumberAtEnd) {
|
|
306
495
|
this.log.info(`Initial archiver sync to L1 block ${currentL1BlockNumber} complete`, {
|
|
307
496
|
l1BlockNumber: currentL1BlockNumber,
|
|
308
|
-
syncPoint: await this.
|
|
497
|
+
syncPoint: await getArchiverSynchPoint(this.stores),
|
|
309
498
|
...(await this.getL2Tips()),
|
|
310
499
|
});
|
|
311
500
|
this.runningPromise.setPollingIntervalMS(this.config.pollingIntervalMs);
|
|
@@ -337,7 +526,7 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
337
526
|
}
|
|
338
527
|
|
|
339
528
|
public backupTo(destPath: string): Promise<string> {
|
|
340
|
-
return this.
|
|
529
|
+
return backupArchiverDataStores(this.dataStores, destPath);
|
|
341
530
|
}
|
|
342
531
|
|
|
343
532
|
public getL1Constants(): Promise<L1RollupConstants> {
|
|
@@ -379,9 +568,9 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
379
568
|
}
|
|
380
569
|
|
|
381
570
|
let slotFromCheckpoint: SlotNumber | undefined;
|
|
382
|
-
const latestCheckpointNumber = await this.
|
|
571
|
+
const latestCheckpointNumber = await this.stores.blocks.getLatestCheckpointNumber();
|
|
383
572
|
if (latestCheckpointNumber > 0) {
|
|
384
|
-
const checkpointData = await this.
|
|
573
|
+
const checkpointData = await this.stores.blocks.getCheckpointData(latestCheckpointNumber);
|
|
385
574
|
if (checkpointData) {
|
|
386
575
|
slotFromCheckpoint = checkpointData.header.slotNumber;
|
|
387
576
|
}
|
|
@@ -413,8 +602,7 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
413
602
|
// The epoch is complete if the current checkpointed L2 block is the last one in the epoch (or later).
|
|
414
603
|
// We use the checkpointed block number (synced from L1) instead of 'latest' to avoid returning true
|
|
415
604
|
// prematurely when proposed blocks have been pushed to the archiver but not yet checkpointed on L1.
|
|
416
|
-
const
|
|
417
|
-
const header = checkpointedBlockNumber > 0 ? await this.getBlockHeader(checkpointedBlockNumber) : undefined;
|
|
605
|
+
const header = (await this.getBlockData({ tag: 'checkpointed' }))?.header;
|
|
418
606
|
const slot = header ? header.globalVariables.slotNumber : undefined;
|
|
419
607
|
const [_startSlot, endSlot] = getSlotRangeForEpoch(epochNumber, this.l1Constants);
|
|
420
608
|
if (slot && slot >= endSlot) {
|
|
@@ -470,29 +658,34 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
470
658
|
if (targetL2BlockNumber >= currentL2Block) {
|
|
471
659
|
throw new Error(`Target L2 block ${targetL2BlockNumber} must be less than current L2 block ${currentL2Block}`);
|
|
472
660
|
}
|
|
473
|
-
const
|
|
474
|
-
if (
|
|
661
|
+
const checkpointedTip = await this.stores.blocks.getCheckpointedL2BlockNumber();
|
|
662
|
+
if (targetL2BlockNumber > checkpointedTip) {
|
|
663
|
+
throw new Error(`Target L2 block ${targetL2BlockNumber} is not checkpointed yet`);
|
|
664
|
+
}
|
|
665
|
+
const targetBlockData = await this.stores.blocks.getBlockData({ number: targetL2BlockNumber });
|
|
666
|
+
if (!targetBlockData) {
|
|
475
667
|
throw new Error(`Target L2 block ${targetL2BlockNumber} not found`);
|
|
476
668
|
}
|
|
477
|
-
const targetCheckpointNumber =
|
|
669
|
+
const targetCheckpointNumber = targetBlockData.checkpointNumber;
|
|
478
670
|
|
|
479
671
|
// Rollback operates at checkpoint granularity: the target block must be the last block of its checkpoint.
|
|
480
|
-
const checkpointData = await this.
|
|
481
|
-
if (checkpointData) {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
672
|
+
const checkpointData = await this.stores.blocks.getCheckpointData(targetCheckpointNumber);
|
|
673
|
+
if (!checkpointData) {
|
|
674
|
+
throw new Error(`Checkpoint ${targetCheckpointNumber} not found for block ${targetL2BlockNumber}`);
|
|
675
|
+
}
|
|
676
|
+
const lastBlockInCheckpoint = BlockNumber(checkpointData.startBlock + checkpointData.blockCount - 1);
|
|
677
|
+
if (targetL2BlockNumber !== lastBlockInCheckpoint) {
|
|
678
|
+
const previousCheckpointBoundary =
|
|
679
|
+
checkpointData.startBlock > 1 ? BlockNumber(checkpointData.startBlock - 1) : BlockNumber(0);
|
|
680
|
+
throw new Error(
|
|
681
|
+
`Target L2 block ${targetL2BlockNumber} is not at a checkpoint boundary. ` +
|
|
682
|
+
`Checkpoint ${targetCheckpointNumber} spans blocks ${checkpointData.startBlock} to ${lastBlockInCheckpoint}. ` +
|
|
683
|
+
`Use block ${lastBlockInCheckpoint} to roll back to this checkpoint, ` +
|
|
684
|
+
`or block ${previousCheckpointBoundary} to roll back to the previous one.`,
|
|
685
|
+
);
|
|
493
686
|
}
|
|
494
687
|
|
|
495
|
-
const targetL1BlockNumber =
|
|
688
|
+
const targetL1BlockNumber = checkpointData.l1.blockNumber;
|
|
496
689
|
const targetL1Block = await this.publicClient.getBlock({
|
|
497
690
|
blockNumber: targetL1BlockNumber,
|
|
498
691
|
includeTransactions: false,
|
|
@@ -506,10 +699,10 @@ export class Archiver extends ArchiverDataSourceBase implements L2BlockSink, Tra
|
|
|
506
699
|
);
|
|
507
700
|
await this.updater.removeCheckpointsAfter(targetCheckpointNumber);
|
|
508
701
|
this.log.info(`Rolling back L1 to L2 messages to checkpoint ${targetCheckpointNumber}`);
|
|
509
|
-
await this.
|
|
702
|
+
await this.stores.messages.rollbackL1ToL2MessagesToCheckpoint(targetCheckpointNumber);
|
|
510
703
|
this.log.info(`Setting L1 syncpoints to ${targetL1BlockNumber}`);
|
|
511
|
-
await this.
|
|
512
|
-
await this.
|
|
704
|
+
await this.stores.blocks.setSynchedL1BlockNumber(targetL1BlockNumber);
|
|
705
|
+
await this.stores.messages.setMessageSyncState(
|
|
513
706
|
{ l1BlockNumber: targetL1BlockNumber, l1BlockHash: targetL1BlockHash },
|
|
514
707
|
undefined,
|
|
515
708
|
);
|
package/src/config.ts
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { type BlobClientConfig, blobClientConfigMapping } from '@aztec/blob-client/client/config';
|
|
2
2
|
import { type L1ContractsConfig, l1ContractsConfigMappings } from '@aztec/ethereum/config';
|
|
3
|
-
import { l1ContractAddressesMapping } from '@aztec/ethereum/l1-contract-addresses';
|
|
4
3
|
import { type L1ReaderConfig, l1ReaderConfigMappings } from '@aztec/ethereum/l1-reader';
|
|
5
4
|
import {
|
|
6
5
|
type ConfigMappingsType,
|
|
7
6
|
booleanConfigHelper,
|
|
8
7
|
getConfigFromMappings,
|
|
9
8
|
numberConfigHelper,
|
|
9
|
+
optionalNumberConfigHelper,
|
|
10
10
|
} from '@aztec/foundation/config';
|
|
11
|
-
import {
|
|
12
|
-
type ChainConfig,
|
|
13
|
-
type PipelineConfig,
|
|
14
|
-
chainConfigMappings,
|
|
15
|
-
pipelineConfigMappings,
|
|
16
|
-
} from '@aztec/stdlib/config';
|
|
11
|
+
import { type ChainConfig, chainConfigMappings } from '@aztec/stdlib/config';
|
|
17
12
|
import type { ArchiverSpecificConfig } from '@aztec/stdlib/interfaces/server';
|
|
18
13
|
|
|
19
14
|
/**
|
|
@@ -26,13 +21,11 @@ import type { ArchiverSpecificConfig } from '@aztec/stdlib/interfaces/server';
|
|
|
26
21
|
export type ArchiverConfig = ArchiverSpecificConfig &
|
|
27
22
|
L1ReaderConfig &
|
|
28
23
|
L1ContractsConfig &
|
|
29
|
-
PipelineConfig & // required to pass through to epoch cache
|
|
30
24
|
BlobClientConfig &
|
|
31
25
|
ChainConfig;
|
|
32
26
|
|
|
33
27
|
export const archiverConfigMappings: ConfigMappingsType<ArchiverConfig> = {
|
|
34
28
|
...blobClientConfigMapping,
|
|
35
|
-
...pipelineConfigMappings,
|
|
36
29
|
archiverPollingIntervalMS: {
|
|
37
30
|
env: 'ARCHIVER_POLLING_INTERVAL_MS',
|
|
38
31
|
description: 'The polling interval in ms for retrieving new L2 blocks and encrypted logs.',
|
|
@@ -43,14 +36,9 @@ export const archiverConfigMappings: ConfigMappingsType<ArchiverConfig> = {
|
|
|
43
36
|
description: 'The number of L2 blocks the archiver will attempt to download at a time.',
|
|
44
37
|
...numberConfigHelper(100),
|
|
45
38
|
},
|
|
46
|
-
maxLogs: {
|
|
47
|
-
env: 'ARCHIVER_MAX_LOGS',
|
|
48
|
-
description: 'The max number of logs that can be obtained in 1 "getPublicLogs" call.',
|
|
49
|
-
...numberConfigHelper(1_000),
|
|
50
|
-
},
|
|
51
39
|
archiverStoreMapSizeKb: {
|
|
52
40
|
env: 'ARCHIVER_STORE_MAP_SIZE_KB',
|
|
53
|
-
|
|
41
|
+
...optionalNumberConfigHelper(),
|
|
54
42
|
description: 'The maximum possible size of the archiver DB in KB. Overwrites the general dataStoreMapSizeKb.',
|
|
55
43
|
},
|
|
56
44
|
skipValidateCheckpointAttestations: {
|
|
@@ -78,6 +66,14 @@ export const archiverConfigMappings: ConfigMappingsType<ArchiverConfig> = {
|
|
|
78
66
|
'Set to true to bypass the check when the connected RPC node is known to prune old logs.',
|
|
79
67
|
...booleanConfigHelper(false),
|
|
80
68
|
},
|
|
69
|
+
orphanProposedBlockPruneGraceSeconds: {
|
|
70
|
+
env: 'ARCHIVER_ORPHAN_PROPOSED_BLOCK_PRUNE_GRACE_SECONDS',
|
|
71
|
+
description:
|
|
72
|
+
'Grace period in seconds, measured from the end of a proposed block build slot, after which a ' +
|
|
73
|
+
'proposed block with no matching proposed checkpoint is pruned as an orphan. Defaults from the ' +
|
|
74
|
+
'sequencer block duration at the node wiring layer when unset.',
|
|
75
|
+
...optionalNumberConfigHelper(),
|
|
76
|
+
},
|
|
81
77
|
...chainConfigMappings,
|
|
82
78
|
...l1ReaderConfigMappings,
|
|
83
79
|
viemPollingIntervalMS: {
|
|
@@ -86,10 +82,6 @@ export const archiverConfigMappings: ConfigMappingsType<ArchiverConfig> = {
|
|
|
86
82
|
...numberConfigHelper(1000),
|
|
87
83
|
},
|
|
88
84
|
...l1ContractsConfigMappings,
|
|
89
|
-
l1Contracts: {
|
|
90
|
-
description: 'The deployed L1 contract addresses',
|
|
91
|
-
nested: l1ContractAddressesMapping,
|
|
92
|
-
},
|
|
93
85
|
};
|
|
94
86
|
|
|
95
87
|
/**
|
|
@@ -111,5 +103,6 @@ export function mapArchiverConfig(config: Partial<ArchiverConfig>) {
|
|
|
111
103
|
maxAllowedEthClientDriftSeconds: config.maxAllowedEthClientDriftSeconds,
|
|
112
104
|
ethereumAllowNoDebugHosts: config.ethereumAllowNoDebugHosts,
|
|
113
105
|
skipHistoricalLogsCheck: config.archiverSkipHistoricalLogsCheck,
|
|
106
|
+
orphanProposedBlockPruneGraceSeconds: config.orphanProposedBlockPruneGraceSeconds,
|
|
114
107
|
};
|
|
115
108
|
}
|