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

Generalize sync ActiveRequests #6398

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

Conversation

dapplion
Copy link
Collaborator

Part of

To address PeerDAS sync issues we need to make individual by_range requests within a batch retriable. We should adopt the same pattern for lookup sync where each request (block/blobs/columns) is tracked individually within a "meta" request that group them all and handles retry logic.

The first step is to add ActiveBlocksByRangeRequest, ActiveBlobsByRangeRequest and ActiveDataColumnsByRangeRequest. I'm in the progress of doing that in this branch https://github.com/sigp/lighthouse/compare/unstable...dapplion:lighthouse:sync-active-requests?expand=1 but I noted a lot of sensitive code repetition.

This PR is pre-step to add ActiveRequest to our existing ActiveRequest*ByRoot (the ones for by_root). Next PR will add the ActiveRequest*ByRange goodies :)

@dapplion dapplion added ready-for-review The code is ready for review syncing and removed ready-for-review The code is ready for review labels Sep 16, 2024
@dapplion dapplion marked this pull request as draft September 16, 2024 11:42
@dapplion dapplion added the ready-for-review The code is ready for review label Sep 17, 2024
@dapplion dapplion marked this pull request as ready for review September 17, 2024 12:19
@dapplion dapplion force-pushed the sync-active-request-generalize branch from 2e502a9 to 043d52b Compare September 17, 2024 12:21
@@ -42,11 +37,19 @@ pub enum SyncRequestId {
/// Request searching for a set of blobs given a hash.
SingleBlob { id: SingleLookupReqId },
/// Request searching for a set of data columns given a hash and list of column indices.
DataColumnsByRoot(DataColumnsByRootRequestId, DataColumnsByRootRequester),
DataColumnsByRoot(DataColumnsByRootRequestId),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having the requester inside the ID just simplifies downstream code and makes it symmetrical with the other variants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review The code is ready for review syncing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant