Skip to content

solana-indexer: advance the finalized watermark from slot statuses - #4854

Draft
squadgazzz wants to merge 3 commits into
mainfrom
solana-indexer/be-203-finalized-watermark
Draft

solana-indexer: advance the finalized watermark from slot statuses#4854
squadgazzz wants to merge 3 commits into
mainfrom
solana-indexer/be-203-finalized-watermark

Conversation

@squadgazzz

@squadgazzz squadgazzz commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

The yellowstone subscription only delivered confirmed slot statuses, so the indexer never saw finality: solana.indexer_state.finalized_slot and solana.chain_tip had 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

  • The slot filter subscribes to every status transition. The ingester forwards confirmed statuses (flush signal and tip counter) and finalized ones (watermark), and drops the rest: a status ahead of the transaction stream's commitment must not flush a buffer whose transactions are still in flight.
  • finalized_slot advances from finalized statuses, monotone and update-only.
  • The last-indexed watermark advances on quiet slots up to the flush hold-back, so the resume point tracks the stream instead of the last settlement.
  • solana.chain_tip is dropped (V2 migration). The quiet-slot advancement makes indexer_state.slot move 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

@linear-code

linear-code Bot commented Sep 3, 2026

Copy link
Copy Markdown

BE-203

@squadgazzz squadgazzz changed the title solana-indexer: advance the finalized watermark and chain tip from slot statuses solana-indexer: advance the finalized watermark from slot statuses Sep 3, 2026
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.

1 participant