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

Add data column lookup and response handling #5350

Closed
wants to merge 1 commit into from

Conversation

jimmygchen
Copy link
Member

Issue Addressed

Part of #4983.

Add data column lookup and response handling logic, mostly copied from blob lookup. Lots of boilerplate here, need to think about whether we need all of this.

@jimmygchen jimmygchen added ready-for-review The code is ready for review das Data Availability Sampling labels Mar 5, 2024
@jimmygchen jimmygchen mentioned this pull request Mar 5, 2024
52 tasks
@jimmygchen jimmygchen added work-in-progress PR is a work-in-progress and removed ready-for-review The code is ready for review labels Mar 8, 2024
/// We know for certain these data columns are missing.
KnownMissing(Vec<DataColumnIdentifier>),
/// We think these data columns might be missing.
PossibleMissing(Vec<DataColumnIdentifier>),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This state is dangerous because it can trigger us to fetch all samples. If we haven't received the block yet we should not fetch anything and just wait for the block.

@@ -157,6 +157,10 @@ const MAX_RPC_BLOCK_QUEUE_LEN: usize = 1_024;
/// will be stored before we start dropping them.
const MAX_RPC_BLOB_QUEUE_LEN: usize = 1_024;

/// The maximum number of queued `DataColumnSidecar` objects received from the network RPC that
/// will be stored before we start dropping them.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a TODO(das) to refine this value

pub fn send_rpc_data_columns(
self: &Arc<Self>,
block_root: Hash256,
data_columns: FixedDataColumnSidecarList<T::EthSpec>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder of the need to send a fixed vector instead of just a vec of sidecars

Comment on lines +471 to +479
fn make_request(
id: SingleLookupReqId,
peer_id: PeerId,
request: Self::RequestType,
cx: &SyncNetworkContext<T>,
) -> Result<(), LookupRequestError> {
cx.data_column_lookup_request(id, peer_id, request, L::lookup_type())
.map_err(LookupRequestError::SendFailed)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This won't work because the set of requested_ids is not custodied by a single peer. Instead we need to figure out which peer has each column and do multiple requests

@jimmygchen
Copy link
Member Author

Looks like the same approach may not work very well with DAS, so the lookup may be re-designed. Will mark this PR as blocked for now.

@jimmygchen jimmygchen marked this pull request as draft March 15, 2024 05:40
@jimmygchen
Copy link
Member Author

Closing this PR as the branch is very outdated.

@jimmygchen jimmygchen closed this Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked das Data Availability Sampling work-in-progress PR is a work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants