Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support notify first shred received in geyser #3030

Conversation

lijunwangs
Copy link

@lijunwangs lijunwangs commented Sep 30, 2024

Problem

This is the first part to support more slot status notification type in geyser. FirstShredReceived.

Summary of Changes

Link SlotStatusNotifier in retransmit stage on FirstShredReceived.

Tests: tested change with Postgres geyser plugin and confirming the FirstShredReceived being received.

Fixes #

#2957

@fanatid
Copy link

fanatid commented Sep 30, 2024

Thank you! Is it also possible to add Completed, CreatedBank, Dead?

@lijunwangs
Copy link
Author

Thank you! Is it also possible to add Completed, CreatedBank, Dead?

Yes. Will be done in follow-on PRs to cut down one PR size.

@lijunwangs lijunwangs requested a review from t-nelson September 30, 2024 17:59
Copy link

@bw-solana bw-solana left a comment

Choose a reason for hiding this comment

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

Overall LGTM. Left a few comments

@@ -319,6 +319,9 @@ pub enum SlotStatus {

/// The highest slot that has been voted on by supermajority of the cluster, ie. is confirmed.
Confirmed,

/// First Shred Received

Choose a reason for hiding this comment

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

Are the comments for the other SlotStatus enums wrong? Almost seems like they were copy pasted from confirmation levels.. We send theses notifications out each time a slot transitions to the new state, right (assuming it makes it to that state)?

Copy link
Author

Choose a reason for hiding this comment

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

Yes -- they were largely copied. Which one is wrong?

Choose a reason for hiding this comment

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

I think the part explaining this is "The highest slot" makes more sense in the context of confirmation levels.

I would probably rewrite them like this:

    /// First shred has been received for this slot.
    FirstShredReceived,

    /// This slot has been processed.
    Processed,

    /// This slot has been optimistically confirmed by a supermajority of the cluster.
    Confirmed,

    /// This slot has been confirmed and reached max vote lockout on the canonical fork.
    Rooted,

I acknowledge this is sort of out of scope for this PR - I just noticed it because your comment is written more like how I would expect for a slot status notification but doesn't quite match the others.

turbine/src/retransmit_stage.rs Outdated Show resolved Hide resolved
Copy link

@bw-solana bw-solana left a comment

Choose a reason for hiding this comment

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

@lijunwangs lijunwangs force-pushed the support_notify_first_shred_received_in_geyser.2 branch from 3e4f03d to 11a1fba Compare October 3, 2024 16:06
@lijunwangs lijunwangs merged commit b6b5b1a into anza-xyz:master Oct 3, 2024
47 of 49 checks passed
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
* support notify first shred received in geyser
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.

3 participants