Skip to content

Gloas backfill#9575

Open
hopinheimer wants to merge 6 commits into
sigp:unstablefrom
hopinheimer:gloas-backfill
Open

Gloas backfill#9575
hopinheimer wants to merge 6 commits into
sigp:unstablefrom
hopinheimer:gloas-backfill

Conversation

@hopinheimer

Copy link
Copy Markdown
Member

Issue Addressed

addresses #9526

Additional Info

This PR is conservatively scope as mentioned in the issue. Pruning envelopes still need to be handled

@hopinheimer hopinheimer requested a review from jxs as a code owner July 5, 2026 04:03
/// `RangeSyncBlock::into_available_block` and consumed by `import_historical_block_batch`.
///
/// The envelope is `None` for pre-Gloas blocks (and for Gloas blocks with no payload data).
pub type AvailableBlockWithEnvelope<E> = (AvailableBlock<E>, Option<AvailableEnvelope<E>>);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have a RangeSyncBlock with a gloas variant that you should use instead

&self,
blocks_and_envelopes: impl Iterator<
Item = (
&'a AvailableBlock<T::EthSpec>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AvailableBlock isn't really a concept post-gloas (blocks are always available by default). Once you move to RangeSyncBlock this should probably change to SignedBeaconBlock

// Split each block into its `AvailableBlock` and (for Gloas) the coupled payload envelope.
// The envelope carries the data columns for Gloas blocks, so keep it paired with the block
// in order to verify (and later persist) it.
let blocks_and_envelopes = match downloaded_blocks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this is already a range sync block, we can probably clean this up to prevent the wierd mapping logic

Comment on lines +697 to 700
if let Err(e) = self
.chain
.data_availability_checker
.batch_verify_kzg_for_available_blocks(&available_blocks)

@eserilev eserilev Jul 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

for example we can have batch_verifiy_kzg accept a vec of RangeSyncBlock. then we might not need the iter().map() logic from above

@eserilev eserilev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think theres an opportunity to unify some pre/post gloas logic and make the code a bit easier to reason about

@hopinheimer hopinheimer added waiting-on-author The reviewer has suggested changes and awaits thier implementation. work-in-progress PR is a work-in-progress labels Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-author The reviewer has suggested changes and awaits thier implementation. work-in-progress PR is a work-in-progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants