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

Difference between Pubsub and Geyser for Slot update on processed level #32958

Open
fanatid opened this issue Aug 23, 2023 · 1 comment
Open
Labels
community Community contribution

Comments

@fanatid
Copy link
Contributor

fanatid commented Aug 23, 2023

Problem

  • In Pubsub interface slot_subscribe sends messages with processed commitment level, but in the code message sent on SlotUpdate::CreatedBank
  • In Geyser interface we receive a slot for processed level on SlotUpdate::Frozen

As I understand Geyser is correct and Pubsub should be fixed?

pubsub:

pub fn notify_slot(&self, slot: Slot, parent: Slot, root: Slot) {
self.enqueue_notification(NotificationEntry::Slot(SlotInfo { slot, parent, root }));
self.enqueue_notification(NotificationEntry::SlotUpdate(SlotUpdate::CreatedBank {
slot,
parent,
timestamp: timestamp(),
}));
}

geyser:
subscriptions.notify_slot_update(SlotUpdate::Frozen {
slot: frozen_slot,
timestamp: timestamp(),
stats: SlotTransactionStats {
num_transaction_entries: bank.transaction_entries_count(),
num_successful_transactions,
num_failed_transactions: bank.transaction_error_count(),
max_transactions_per_entry: bank.transactions_per_entry_max(),
},
});
Self::notify_slot_status(
slot_notification_subscribers,
SlotNotification::Frozen((bank.slot(), bank.parent_slot())),
);

Proposed Solution

Change Pubsub message trigger from CreatedBank to Frozen?

@fanatid fanatid added the community Community contribution label Aug 23, 2023
@fanatid
Copy link
Contributor Author

fanatid commented Feb 29, 2024

I created the tool that allows to see the difference: rpcpool/yellowstone-whirligig-client#4
example output:

251126282: pubsub +0ns, whirligig +31.974927ms, grpc +19.797746ms
251126283: pubsub +0ns, whirligig +15.008825ms, grpc +39.600677ms
251126284: pubsub +0ns, whirligig +433.768063ms, grpc +425.956658ms
251126285: pubsub +0ns, whirligig +317.083586ms, grpc +305.4413ms
251126286: pubsub +0ns, whirligig +504.957387ms, grpc +497.525325ms
251126287: pubsub +0ns, whirligig +65.747626ms, grpc +61.601354ms
251126288: pubsub +0ns, whirligig +265.528119ms, grpc +265.625734ms
251126289: pubsub +0ns, whirligig +313.040505ms, grpc +324.209449ms
251126290: pubsub +0ns, whirligig +31.276439ms, grpc +31.179749ms
251126291: pubsub +0ns, whirligig +63.168443ms, grpc +58.956834ms
251126292: pubsub +0ns, whirligig +293.489261ms, grpc +284.931629ms
251126293: pubsub +0ns, whirligig +193.688779ms, grpc +194.279531ms
251126294: pubsub +0ns, whirligig +544.215454ms, grpc +544.243569ms
251126295: pubsub +0ns, whirligig +54.454107ms, grpc +55.681706ms
251126296: pubsub +0ns, whirligig +322.057975ms, grpc +314.031081ms
251126297: pubsub +0ns, whirligig +116.324797ms, grpc +123.816471ms
251126298: pubsub +0ns, whirligig +105.542639ms, grpc +98.626028ms
251126299: pubsub +0ns, whirligig +103.090418ms, grpc +100.710078ms
251126300: pubsub +0ns, whirligig +123.780715ms, grpc +116.807639ms
251126301: pubsub +0ns, whirligig +128.658007ms, grpc +153.794561ms
251126302: pubsub +0ns, whirligig +49.44277ms, grpc +50.378555ms
251126303: pubsub +0ns, whirligig +360.656856ms, grpc +355.544306ms
251126304: pubsub +0ns, whirligig +467.695352ms, grpc +453.289899ms
251126305: pubsub +0ns, whirligig +34.883645ms, grpc +28.336245ms
251126306: pubsub +0ns, whirligig +389.828327ms, grpc +390.605315ms
251126307: pubsub +0ns, whirligig +323.772592ms, grpc +319.299433ms
251126308: pubsub +0ns, whirligig +570.882185ms, grpc +565.349832ms
251126309: pubsub +282.449659ms, whirligig +6.974607ms, grpc +0ns
251126310: pubsub +0ns, whirligig +148.47681ms, grpc +188.325993ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

No branches or pull requests

1 participant