solana-indexer: advance the finalized watermark from slot statuses - #4854
Draft
squadgazzz wants to merge 3 commits into
Draft
solana-indexer: advance the finalized watermark from slot statuses#4854squadgazzz wants to merge 3 commits into
squadgazzz wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The yellowstone subscription only delivered confirmed slot statuses, so the indexer never saw finality:
solana.indexer_state.finalized_slotandsolana.chain_tiphad no writer, and the last-indexed watermark only advanced when a settlement flushed. On an idle chain that stalls the resume point until it falls out of the provider's replay window (observed 825 slots behind on devnet), turning every restart into a live-tip resubscribe with a gap.This is the first half of BE-203. The rollback cascade for rows above the finalized watermark follows in its own PR.
Changes
finalized_slotadvances from finalized statuses, monotone and update-only.solana.chain_tipis dropped (V2 migration). The quiet-slot advancement makesindexer_state.slotmove every confirmed slot, so the tip row would trail it by the 2-slot hold-back and add no signal: freshness checks read the watermark.How to test
New unit tests and ignored postgres tests, including the pipeline test driving finalized and quiet-slot statuses end to end.
Related issues
BE-203