Gloas range sync (#9362)

N/A


  Implement range sync in gloas.
Basically requests blocks and payloads post gloas from the same peer, couples them and sends it for processing.
Does not change sync much at all other than adding the machinery for payloads by range requests.

Main changes are:
`RangeSyncBlock` which used to be a struct is an enum to account for the Gloas case. This allows a clear separation between gloas and pre-gloas code.
`AvailableBlockData` now has a `BlockInEnvelope` variant. This is to clearly indicate the post gloas case. I feel this is simpler to follow compared to `NoData` variant.


Tries to extract post gloas logic into its own functions so that there is minimal logic change in mainnet range sync behaviour.

This is meant as a stable base on which we can iterate further to make range sync cleaner and for unblocking range sync support on devnet. Some ideas for later is removing the retry mechanism in favour of delegating column fetching to lookup sync which can be done post #9155 and batch signature verifying envelopes.


Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
Pawan Dhananjay
2026-06-10 16:00:57 +05:30
committed by GitHub
parent 844c6dd4a0
commit db3192e001
24 changed files with 1311 additions and 232 deletions

View File

@@ -533,7 +533,8 @@ mod tests {
use super::*;
use beacon_chain::{
PayloadVerificationStatus,
block_verification_types::{AvailableBlockData, RangeSyncBlock},
block_verification_types::AvailableBlockData,
data_availability_checker::AvailableBlock,
test_utils::{
BeaconChainHarness, EphemeralHarnessType, fork_name_from_env,
generate_data_column_sidecars_from_block,
@@ -611,14 +612,13 @@ mod tests {
"precondition: {fork_name:?} test block must produce data columns"
);
let available_block = RangeSyncBlock::new(
let available_block = AvailableBlock::new(
block.clone(),
AvailableBlockData::new_with_data_columns(data_columns),
&chain.data_availability_checker,
chain.spec.clone(),
)
.unwrap()
.into_available_block();
.unwrap();
let current_slot = harness.get_current_slot();
let cached_head = chain.canonical_head.cached_head();