@@ -138,13 +138,17 @@ export async function retrievedToPublishedCheckpoint({
138138
139139/**
140140 * Fetches new checkpoints.
141+ * @param rollup - The rollup contract instance.
141142 * @param publicClient - The viem public client to use for transaction retrieval.
142143 * @param debugClient - The viem debug client to use for trace/debug RPC methods (optional).
143- * @param rollupAddress - The address of the rollup contract .
144+ * @param blobSinkClient - The blob sink client for fetching blob data .
144145 * @param searchStartBlock - The block number to use for starting the search.
145146 * @param searchEndBlock - The highest block number that we should search up to.
146- * @param expectedNextL2BlockNum - The next L2 block number that we expect to find.
147- * @returns An array of block; as well as the next eth block to search from.
147+ * @param contractAddresses - The contract addresses (governanceProposerAddress, slashFactoryAddress, slashingProposerAddress).
148+ * @param instrumentation - The archiver instrumentation instance.
149+ * @param logger - The logger instance.
150+ * @param isHistoricalSync - Whether this is a historical sync.
151+ * @returns An array of retrieved checkpoints.
148152 */
149153export async function retrieveCheckpointsFromRollup (
150154 rollup : GetContractReturnType < typeof RollupAbi , ViemPublicClient > ,
@@ -160,6 +164,7 @@ export async function retrieveCheckpointsFromRollup(
160164 } ,
161165 instrumentation : ArchiverInstrumentation ,
162166 logger : Logger = createLogger ( 'archiver' ) ,
167+ isHistoricalSync : boolean = false ,
163168) : Promise < RetrievedCheckpoint [ ] > {
164169 const retrievedCheckpoints : RetrievedCheckpoint [ ] = [ ] ;
165170
@@ -211,6 +216,7 @@ export async function retrieveCheckpointsFromRollup(
211216 contractAddresses ,
212217 instrumentation ,
213218 logger ,
219+ isHistoricalSync ,
214220 ) ;
215221 retrievedCheckpoints . push ( ...newCheckpoints ) ;
216222 searchStartBlock = lastLog . blockNumber ! + 1n ;
@@ -222,11 +228,17 @@ export async function retrieveCheckpointsFromRollup(
222228
223229/**
224230 * Processes newly received CheckpointProposed logs.
225- * @param rollup - The rollup contract
231+ * @param rollup - The rollup contract instance.
226232 * @param publicClient - The viem public client to use for transaction retrieval.
227233 * @param debugClient - The viem debug client to use for trace/debug RPC methods (optional).
234+ * @param blobSinkClient - The blob sink client for fetching blob data.
228235 * @param logs - CheckpointProposed logs.
229- * @returns - An array of checkpoints.
236+ * @param rollupConstants - The rollup constants (chainId, version, targetCommitteeSize).
237+ * @param contractAddresses - The contract addresses (governanceProposerAddress, slashFactoryAddress, slashingProposerAddress).
238+ * @param instrumentation - The archiver instrumentation instance.
239+ * @param logger - The logger instance.
240+ * @param isHistoricalSync - Whether this is a historical sync.
241+ * @returns An array of retrieved checkpoints.
230242 */
231243async function processCheckpointProposedLogs (
232244 rollup : GetContractReturnType < typeof RollupAbi , ViemPublicClient > ,
@@ -242,6 +254,7 @@ async function processCheckpointProposedLogs(
242254 } ,
243255 instrumentation : ArchiverInstrumentation ,
244256 logger : Logger ,
257+ isHistoricalSync : boolean ,
245258) : Promise < RetrievedCheckpoint [ ] > {
246259 const retrievedCheckpoints : RetrievedCheckpoint [ ] = [ ] ;
247260 const calldataRetriever = new CalldataRetriever (
@@ -272,6 +285,7 @@ async function processCheckpointProposedLogs(
272285 blobHashes ,
273286 checkpointNumber ,
274287 logger ,
288+ isHistoricalSync ,
275289 ) ;
276290
277291 const l1 : L1PublishedData = {
@@ -309,8 +323,9 @@ export async function getCheckpointBlobDataFromBlobs(
309323 blobHashes : Buffer < ArrayBufferLike > [ ] ,
310324 checkpointNumber : CheckpointNumber ,
311325 logger : Logger ,
326+ isHistoricalSync : boolean ,
312327) : Promise < CheckpointBlobData > {
313- const blobBodies = await blobSinkClient . getBlobSidecar ( blockHash , blobHashes ) ;
328+ const blobBodies = await blobSinkClient . getBlobSidecar ( blockHash , blobHashes , undefined , { isHistoricalSync } ) ;
314329 if ( blobBodies . length === 0 ) {
315330 throw new NoBlobBodiesFoundError ( checkpointNumber ) ;
316331 }
0 commit comments