Gloas backfill#9575
Conversation
| /// `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>>); |
There was a problem hiding this comment.
We have a RangeSyncBlock with a gloas variant that you should use instead
| &self, | ||
| blocks_and_envelopes: impl Iterator< | ||
| Item = ( | ||
| &'a AvailableBlock<T::EthSpec>, |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
this is already a range sync block, we can probably clean this up to prevent the wierd mapping logic
| if let Err(e) = self | ||
| .chain | ||
| .data_availability_checker | ||
| .batch_verify_kzg_for_available_blocks(&available_blocks) |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
I think theres an opportunity to unify some pre/post gloas logic and make the code a bit easier to reason about
Issue Addressed
addresses #9526
Additional Info
This PR is conservatively scope as mentioned in the issue. Pruning envelopes still need to be handled