Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
aditiharini committed Sep 13, 2024
1 parent 6bd7c3c commit 2365e16
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions apps/hubble/src/eth/l2EventsProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,17 +700,10 @@ export class L2EventsProvider<chain extends Chain = Chain, transport extends Tra

// Let's not remove. No need to retry same fid many times. If we allow retrying multiple times, we need to rate limit. The map will get cleared periodically to prevent memory bloat.
try {
// Set a timeout of 10 seconds per retry. We don't expect a lot of retries.
setTimeout(() => {
throw new HubError("timeout", "Took too long to query for historical events");
}, 10000);

// The viem API requires an event kind if you want to provide filters by indexed arguments-- this is why we're making multiple calls to syncHistoricalEvents and prioritizing the most common event types.

// The batch sizes are artificially large-- this batch size is internally enforced and we essentially want to eliminate batches given that we don't expct a lot of results from these queries.

const eventSpecificArgs = this.getEventSpecificArgs(fid);

// The batch sizes are artificially large-- this batch size is internally enforced and we essentially want to eliminate batches given that we don't expct a lot of results from these queries.
this.syncHistoricalEvents(0, this._lastBlockNumber, this._lastBlockNumber, eventSpecificArgs);

log.info({ fid }, `Finished retryEventsForFid ${fid}`);
Expand Down

0 comments on commit 2365e16

Please sign in to comment.