-
Notifications
You must be signed in to change notification settings - Fork 158
Automatic yellowstone gRPC deduplication for subscribing to multiple streams #494
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
base: main
Are you sure you want to change the base?
Conversation
update: adjusted metrics logging to include share of first arrival per datasource
| } | ||
| } | ||
| Update::Transaction(tx) => { | ||
| if tx.block_time.is_none() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only works if the BlockDetails arrive before the transaction. If the transaction arrives first, it will remain without a block_time.
| _ => {} | ||
| } | ||
|
|
||
| if let Some(slot) = extract_slot(&update) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use here tx index. #503
| } | ||
|
|
||
| pub fn get_datasource_last_slots() -> HashMap<String, u64> { | ||
| DATASOURCE_LAST_SLOTS.read().unwrap().clone() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each call creates a full copy of the HashMap.
| slot_time_index: LruCache<u64, i64>, | ||
| } | ||
|
|
||
| static DATASOURCE_LAST_SLOTS: Lazy<RwLock<HashMap<String, u64>>> = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RwLock may not be the best choice, but this appears to be dead code that isn't used anywhere
new: added automatic dedupe for yellowstone gRPC
update: adjusted metrics logging to include share of first arrival per datasource