feat(alpenglow): enable blockstore BlockComponent parsing#10566
feat(alpenglow): enable blockstore BlockComponent parsing#10566ksn6 merged 4 commits intoanza-xyz:masterfrom
BlockComponent parsing#10566Conversation
| pub fn get_slot_components_with_shred_info( | ||
| &self, | ||
| slot: Slot, | ||
| start_index: u64, | ||
| allow_dead_slots: bool, | ||
| ) -> Result<(Vec<BlockComponent>, Vec<Range<u32>>, bool)> { |
There was a problem hiding this comment.
This is the key function.
- Today, we invoke
get_slot_entries_with_shred_infoin blockstore processor withinconfirm_slotduring replay. - With Alpenglow, we'll invoke
get_slot_components_with_shred_infoinstead (we'll upstream this shortly).
| pub fn get_slot_entries_with_shred_info( | ||
| &self, | ||
| slot: Slot, | ||
| start_index: u64, | ||
| allow_dead_slots: bool, | ||
| ) -> Result<(Vec<Entry>, u64, bool)> { |
There was a problem hiding this comment.
Diffs are rendered poorly - nothing logically changes about get_slot_entries_with_shred_info; we're factoring out logic common to block component parsing into the function get_slot_data_with_shred_info_common, which we then invoke here.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #10566 +/- ##
=========================================
- Coverage 83.0% 83.0% -0.1%
=========================================
Files 848 848
Lines 316606 316656 +50
=========================================
+ Hits 262944 262953 +9
- Misses 53662 53703 +41 🚀 New features to boost your workflow:
|
451c0f7 to
3714ddf
Compare
steviez
left a comment
There was a problem hiding this comment.
Two smaller things from me, and I think Zach brought up a good point. I'm inclined to say that we should land the item Zach called out in a separate PR prior to this one
0c87c7d to
2db9719
Compare
|
With #10622 landed, would you mind rebasing on top of tip of master ? Don't think it will make much difference for CI or anything, but still doesn't hurt |
2db9719 to
676d766
Compare
676d766 to
7c2b61c
Compare
Problem and Summary of Changes
Today, blockstore purely interprets sequences of shreds as as
Vec<Entry>. Alpenglow requires blocks to storeBlockComponentinstead:Described in #10090, we take careful measures to ensure that the serialization scheme for
BlockComponent::EntryBatchis identical to how we currently serializeVec<Entry>.Summary of Changes
This PR introduces functions which allow us to reason about shreds as
BlockComponents.Note: we do not introduce any logical changes to blockstore in this PR. In the near future, we'll modify blockstore processor to (1) detect whether migration has occurred, and if so, (2) interpret sequences of shreds as block components and replay accordingly.