-
Notifications
You must be signed in to change notification settings - Fork 29
feat: don't discard BlockComponent::VersionedBlockMarkers
#446
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: master
Are you sure you want to change the base?
feat: don't discard BlockComponent::VersionedBlockMarkers
#446
Conversation
BlockComponent::VersionedBlockMarker'sBlockComponent::VersionedBlockMarkers
|
Any reason not to develop this in the upstream (Agave) repo? |
cdfdd1b to
03dc5a4
Compare
Discussed offline, updating the thread here - prior to developing this in (0) wait for solana-foundation/solana-improvement-documents#337 to pass |
03dc5a4 to
590db03
Compare
| pub fn get_components_in_data_block( | ||
| &self, | ||
| slot: Slot, | ||
| range: Range<u32>, | ||
| slot_meta: Option<&SlotMeta>, | ||
| ) -> Result<Vec<BlockComponent>> { | ||
| self.get_slot_components_in_block(slot, vec![range], slot_meta) | ||
| } |
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.
does this just wrap range in a vec? Could we just do this inside get_entries_in_data_block?
| .into_iter() | ||
| .filter_map(|component| component.into_entries()) | ||
| .flatten() | ||
| .collect() |
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.
oof. The double alloc is pain. But I think we already do this upstream
| pub fn get_slot_components( | ||
| &self, | ||
| slot: Slot, | ||
| shred_start_index: u64, | ||
| ) -> Result<Vec<BlockComponent>> { | ||
| self.get_slot_components_with_shred_info(slot, shred_start_index, false) | ||
| .map(|x| x.0) | ||
| } |
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.
Could probably live without this shim layer as well, but I guess it's fine
|
Will resume this once I have code working that's able to successfully disseminate block markers around. |
Problem
To get fast leader handover rolling (#293), we need to send out
ParentReadyUpdatemessages. These are of typeBlockComponent::VersionedBlockMarker, which are currently entirely discarded.Summary of Changes
Vec<Entry>, we turn shreds into aVec<BlockComponent>vectorVec<Entry>andVec<BlockComponent>when necessary