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

bug(plugin): signal end of startup for genesis cluster if parent slot 0 seen #207

Merged
merged 3 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The minor version will be incremented upon a breaking change and the patch versi

### Fixes

- Trigger end of startup when parent slot 0 seen in `update_slot_status` notification because `notify_end_of_startup` is not triggered when cluster started from genesis ([#207](https://github.com/rpcpool/yellowstone-grpc/pull/207))

### Features

### Breaking
Expand Down
7 changes: 7 additions & 0 deletions yellowstone-grpc-geyser/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ impl GeyserPlugin for Plugin {
status: SlotStatus,
) -> PluginResult<()> {
let inner = self.inner.as_ref().expect("initialized");
// if plugin run on genesis of network, notify_end_of_startup will not be triggered, and slot 0 will not
// come through this function.
if parent == Some(0) {
inner
.startup_status
.fetch_or(STARTUP_END_OF_RECEIVED, Ordering::SeqCst);
}
if inner.startup_status.load(Ordering::SeqCst) == STARTUP_END_OF_RECEIVED
&& status == SlotStatus::Processed
{
Expand Down
Loading