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

@@ -726,20 +726,17 @@ pub fn rpc_data_column_limits<E: EthSpec>(
spec: &ChainSpec,
) -> RpcLimits {
let fork_name = spec.fork_name_at_epoch(current_digest_epoch);
let max_blobs = spec.max_blobs_per_block(current_digest_epoch) as usize;
if fork_name.gloas_enabled() {
RpcLimits::new(
DataColumnSidecarGloas::<E>::min_size(),
DataColumnSidecarFulu::<E>::max_size(
spec.max_blobs_per_block(current_digest_epoch) as usize
),
DataColumnSidecarFulu::<E>::max_size(max_blobs),
)
} else {
RpcLimits::new(
DataColumnSidecarFulu::<E>::min_size(),
DataColumnSidecarFulu::<E>::max_size(
spec.max_blobs_per_block(current_digest_epoch) as usize
),
DataColumnSidecarFulu::<E>::max_size(max_blobs),
)
}
}

View File

@@ -31,6 +31,8 @@ pub enum SyncRequestId {
BlobsByRange(BlobsByRangeRequestId),
/// Data columns by range request
DataColumnsByRange(DataColumnsByRangeRequestId),
/// Payload envelopes by range request
PayloadEnvelopesByRange(PayloadEnvelopesByRangeRequestId),
}
/// Request ID for data_columns_by_root requests. Block lookups do not issue this request directly.
@@ -57,6 +59,12 @@ pub struct BlobsByRangeRequestId {
pub parent_request_id: ComponentsByRangeRequestId,
}
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
pub struct PayloadEnvelopesByRangeRequestId {
pub id: Id,
pub parent_request_id: ComponentsByRangeRequestId,
}
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
pub struct DataColumnsByRangeRequestId {
/// Id to identify this attempt at a data_columns_by_range request for `parent_request_id`
@@ -259,6 +267,12 @@ macro_rules! impl_display {
impl_display!(BlocksByRangeRequestId, "{}/{}", id, parent_request_id);
impl_display!(BlobsByRangeRequestId, "{}/{}", id, parent_request_id);
impl_display!(DataColumnsByRangeRequestId, "{}/{}", id, parent_request_id);
impl_display!(
PayloadEnvelopesByRangeRequestId,
"{}/{}",
id,
parent_request_id
);
impl_display!(ComponentsByRangeRequestId, "{}/{}", id, requester);
impl_display!(DataColumnsByRootRequestId, "{}/{}", id, requester);
impl_display!(SingleLookupReqId, "{}/Lookup/{}", req_id, lookup_id);