Skip to content

refactor(solana-indexer) PR 6.2: drop account-update half, watchdog, dead-letter#4601

Merged
squadgazzz merged 1 commit into
mainfrom
solana-indexer/PR6.2-drop-account-half
Jul 9, 2026
Merged

refactor(solana-indexer) PR 6.2: drop account-update half, watchdog, dead-letter#4601
squadgazzz merged 1 commit into
mainfrom
solana-indexer/PR6.2-drop-account-half

Conversation

@squadgazzz

@squadgazzz squadgazzz commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

The decoder used to need two things per settlement: the transaction (the instructions) and a snapshot of the resulting on-chain account state, which arrive as separate stream messages. It buffered whichever landed first and paired them by (slot, signature). We no longer need the account snapshot: per-order fills will come from the settlement program's own instruction data (BeginSettle/FinalizeSettle), so decoding is transaction-only. This PR removes the account half and the machinery that paired and expired the two halves.

Old decoder waited for both halves before it could act. The new one acts on the transaction alone.

Changes

  • Drop the account subscription from the ingester, so it streams only transactions and slots
  • Remove StreamUpdate::Account, PartialHalf, and PartialEvent from the channel
  • Delete the partial-event watchdog: with nothing to pair, there is nothing to expire or dead-letter
  • Remove the dead-letter path (write_dead_letter plus DeadLetterEntry/DeadLetterReason), which nothing else called
  • Drop TxContext.account_snapshot and the decoder's partials field
  • Drop dashmap, which only the partials map used

How to test

Existing tests.

@squadgazzz squadgazzz marked this pull request as ready for review July 6, 2026 14:25
@squadgazzz squadgazzz requested a review from a team as a code owner July 6, 2026 14:25

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request removes the partial-event watchdog, account-update subscription and handling, and dead-letter queue logic, simplifying the indexer to focus solely on decoding and persisting transaction events. Feedback on the changes points out a missing import for the Slot type in persistence.rs that will cause a compilation error.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

dead_letter::DeadLetterEntry,
errors::PersistenceError,
events::DecodedEvent,
recovery::PdaSnapshot,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

The Slot type is used in get_confirmed_rows (line 61) but its import was accidentally removed from this file. This will cause a compilation error. Please add slot::Slot back to the imports.

Suggested change
recovery::PdaSnapshot,
recovery::PdaSnapshot,
slot::Slot,

@tilacog tilacog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔥 🔥 🔥

@MartinquaXD MartinquaXD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹

@squadgazzz squadgazzz force-pushed the solana-indexer/PR6.2-drop-account-half branch from ffca95d to c126a11 Compare July 8, 2026 12:33
Base automatically changed from solana-indexer/PR6-decoder to main July 9, 2026 10:03
@squadgazzz squadgazzz force-pushed the solana-indexer/PR6.2-drop-account-half branch from c126a11 to e902aef Compare July 9, 2026 10:28

@jmg-duarte jmg-duarte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 but is this 6.1 instead?

@squadgazzz squadgazzz added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit 470309c Jul 9, 2026
22 checks passed
@squadgazzz squadgazzz deleted the solana-indexer/PR6.2-drop-account-half branch July 9, 2026 11:01
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants