Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track request IDs in RangeBlockComponentsRequest #6998

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

dapplion
Copy link
Collaborator

Issue Addressed

Part of

Proposed Changes

RangeBlockComponentsRequest handles a set of by_range requests. It's quite lose on these requests, not tracking them by ID. We want to implement individual request retries, so we must make RangeBlockComponentsRequest aware of its requests IDs. We don't want the result of a prior by_range request to affect the state of a future retry. Lookup sync uses this mechanism.

Now RangeBlockComponentsRequest tracks:

pub struct RangeBlockComponentsRequest<E: EthSpec> {
    blocks_request: ByRangeRequest<BlocksByRangeRequestId, Vec<Arc<SignedBeaconBlock<E>>>>,
    block_data_request: RangeBlockDataRequest<E>,
}

enum RangeBlockDataRequest<E: EthSpec> {
    NoData,
    Blobs(ByRangeRequest<BlobsByRangeRequestId, Vec<Arc<BlobSidecar<E>>>>),
    DataColumns {
        requests: HashMap<
            DataColumnsByRangeRequestId,
            ByRangeRequest<DataColumnsByRangeRequestId, DataColumnSidecarList<E>>,
        >,
        expected_custody_columns: Vec<ColumnIndex>,
    },
}

enum ByRangeRequest<I: PartialEq + std::fmt::Display, T> {
    Active(I),
    Complete(T),
}

I have merged is_finished and Into_responses into the same function. Otherwise, we need to duplicate the logic to figure out if the requests are done.

@dapplion dapplion requested a review from jxs as a code owner February 13, 2025 16:45
@dapplion dapplion requested review from jimmygchen and pawanjay176 and removed request for jxs February 13, 2025 16:45
@dapplion dapplion added syncing das Data Availability Sampling labels Feb 13, 2025
@dapplion dapplion mentioned this pull request Feb 13, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
das Data Availability Sampling syncing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant