fix(core): announce slot lifecycle to geyser plugins - #747
Open
snehendu098 wants to merge 1 commit into
Open
Conversation
Contributor
Greptile SummaryThe PR expands Surfpool’s Geyser slot-status model and announces each slot before emitting its block data.
Confidence Score: 5/5The code changes appear safe to merge, with no concrete runtime or security failure identified. Slot lifecycle notifications remain ordered on the single Geyser event channel, and normal block production advances slots sequentially with consistent parent relationships. Important Files Changed
Reviews (1): Last reviewed commit: "fix(core): announce slot lifecycle to ge..." | Re-trigger Greptile |
MicaiahReid
self-requested a review
August 11, 2026 21:08
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.
Fixes #719
GeyserSlotStatusdeclared 2 of agave's 7 variants and only theConfirmedandRootedwere emitted.Processedwas declared but never emitted. Consumers that reconstruct block data start tracking a slot only on a lifecycle status and drop block data for untracked slots, so the blocks metadata and entries surfpool produces get discarded on arrivalWhat I did was announce each newly opened slot with
CreatedBank, plus on at startup for the genesis slot. I also emitProcessedwhich is not really needed here but #719 actually depends on it. I can drop it alsoRegression test drives five blocks through
confirm_current_blockand asserts everyNotifyBlockMetadataandNotifyEntryis for a slot announced beforehand. Before the fix:block metadata for slot 32 was emitted before the slot was announced.I verified with a geyser plugin logging every callback over approx 54 slots
created_bankwent from 0 to 55, and all 109 block-metadata, entry and transaction events landed on an announced slotNote: I added
FirstShredReceivedandCompletedbut never emit them, as surfpool has no gossip layer. I kept them because the enum's doc comment says it mirrors agave'sSlotStatus. I can trim that to only what's emitted also