Skip to content

feat(indexer): recover missing blocks#488

Open
stanlou wants to merge 2 commits intodevelopfrom
feat/indexer-recover-blocks
Open

feat(indexer): recover missing blocks#488
stanlou wants to merge 2 commits intodevelopfrom
feat/indexer-recover-blocks

Conversation

@stanlou
Copy link
Copy Markdown
Collaborator

@stanlou stanlou commented Apr 2, 2026

closes #480

@stanlou stanlou requested a review from rpanic April 2, 2026 13:43
IndexBlockTaskParametersSerializer,
} from "./IndexBlockTaskParameters";

export interface IndexBlockResult {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I think for this we can type it as a union type
{ status: "ok" } | { status: "missing-blocks", missingHeights: .... } if we want.
But I leave it to you if we want to do it that way

this.indexMissingBlocksTask.name,
serialized
);
} catch (error) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave that to the queue implementation to handle errors that come from this. Generally, catching stuff early and not handling it (just emitting it is not handling it imo) lead to weird and non-recoverable behaviour.
Throwing stuff is okay, sometimes stuff just breaks down, but then the sequencer should crash and restart.
At least that's the ideal philosophy I try to approach these things nowadays. Idk I just thought I'd share this - here it's definitely not missing critical so it might be unwise to let the sequencer crash because of a peripherial system. Yeah idk let's talk about it more i guess

);

const filteredBlocks = blocks.filter(
(block): block is BlockWithResult => block !== undefined
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is filterNonUndefined in the common package that we can reuse for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indexer: Recovery missing blocks

2 participants