Skip to content

feat(alpenglow): enable blockstore BlockComponent parsing#10566

Merged
ksn6 merged 4 commits intoanza-xyz:masterfrom
ksn6:alpenglow-enable-blockstore-block-component-parsing
Feb 19, 2026
Merged

feat(alpenglow): enable blockstore BlockComponent parsing#10566
ksn6 merged 4 commits intoanza-xyz:masterfrom
ksn6:alpenglow-enable-blockstore-block-component-parsing

Conversation

@ksn6
Copy link

@ksn6 ksn6 commented Feb 12, 2026

Problem and Summary of Changes

Today, blockstore purely interprets sequences of shreds as as Vec<Entry>. Alpenglow requires blocks to store BlockComponent instead:

#[derive(Debug, Clone, PartialEq, Eq)]
#[allow(clippy::large_enum_variant)]
pub enum BlockComponent {
    EntryBatch(Vec<Entry>),
    BlockMarker(VersionedBlockMarker),
}

Described in #10090, we take careful measures to ensure that the serialization scheme for BlockComponent::EntryBatch is identical to how we currently serialize Vec<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.

@ksn6 ksn6 requested review from AshwinSekar and steviez February 12, 2026 13:32
Comment on lines +3579 to +3584
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)> {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the key function.

  • Today, we invoke get_slot_entries_with_shred_info in blockstore processor within confirm_slot during replay.
  • With Alpenglow, we'll invoke get_slot_components_with_shred_info instead (we'll upstream this shortly).

Comment on lines +3559 to +3564
pub fn get_slot_entries_with_shred_info(
&self,
slot: Slot,
start_index: u64,
allow_dead_slots: bool,
) -> Result<(Vec<Entry>, u64, bool)> {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-commenter
Copy link

codecov-commenter commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 52.23881% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.0%. Comparing base (cc15ab6) to head (7c2b61c).
⚠️ Report is 1 commits behind head on master.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ksn6 ksn6 force-pushed the alpenglow-enable-blockstore-block-component-parsing branch from 451c0f7 to 3714ddf Compare February 12, 2026 23:32
@steviez steviez requested a review from cpubot February 14, 2026 02:02
Copy link

@steviez steviez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ksn6 ksn6 force-pushed the alpenglow-enable-blockstore-block-component-parsing branch 2 times, most recently from 0c87c7d to 2db9719 Compare February 16, 2026 21:34
@ksn6 ksn6 requested a review from steviez February 16, 2026 23:25
@ksn6
Copy link
Author

ksn6 commented Feb 17, 2026

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

FYI: #10622 addresses this.

CC: @steviez @cpubot

@steviez
Copy link

steviez commented Feb 17, 2026

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

@ksn6 ksn6 force-pushed the alpenglow-enable-blockstore-block-component-parsing branch from 2db9719 to 676d766 Compare February 18, 2026 02:12
@ksn6 ksn6 force-pushed the alpenglow-enable-blockstore-block-component-parsing branch from 676d766 to 7c2b61c Compare February 18, 2026 23:02
@ksn6 ksn6 requested a review from cpubot February 18, 2026 23:02
@ksn6 ksn6 enabled auto-merge February 18, 2026 23:09
@steviez steviez disabled auto-merge February 19, 2026 03:43
Copy link

@steviez steviez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, but wouldn't mind grabbing explicit sign off from @cpubot as well

Copy link

@cpubot cpubot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ksn6 ksn6 added this pull request to the merge queue Feb 19, 2026
Merged via the queue into anza-xyz:master with commit 6b2edb9 Feb 19, 2026
50 checks passed
@ksn6 ksn6 deleted the alpenglow-enable-blockstore-block-component-parsing branch February 19, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants