mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 22:38:34 +00:00
Add range sync machinery on sync side
This commit is contained in:
@@ -33,6 +33,8 @@ pub enum SyncRequestId {
|
||||
DataColumnsByRange(DataColumnsByRangeRequestId),
|
||||
/// Request searching for an execution payload envelope given a block root.
|
||||
SinglePayloadEnvelope { id: SingleLookupReqId },
|
||||
/// Payload envelopes by range request
|
||||
PayloadEnvelopesByRange(PayloadEnvelopesByRangeRequestId),
|
||||
}
|
||||
|
||||
/// Request ID for data_columns_by_root requests. Block lookups do not issue this request directly.
|
||||
@@ -78,6 +80,14 @@ pub enum DataColumnsByRangeRequester {
|
||||
CustodyBackfillSync(CustodyBackFillBatchRequestId),
|
||||
}
|
||||
|
||||
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
|
||||
pub struct PayloadEnvelopesByRangeRequestId {
|
||||
/// Id to identify this attempt at a payload_envelopes_by_range request for `parent_request_id`
|
||||
pub id: Id,
|
||||
/// The Id of the overall By Range request for block components.
|
||||
pub parent_request_id: ComponentsByRangeRequestId,
|
||||
}
|
||||
|
||||
/// Block components by range request for range sync. Includes an ID for downstream consumers to
|
||||
/// handle retries and tie all their sub requests together.
|
||||
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
|
||||
@@ -254,6 +264,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);
|
||||
|
||||
Reference in New Issue
Block a user