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

Fix misc PeerDAS todos #6862

Open
wants to merge 12 commits into
base: unstable
Choose a base branch
from
Open

Fix misc PeerDAS todos #6862

wants to merge 12 commits into from

Conversation

dapplion
Copy link
Collaborator

Issue Addressed

Address misc PeerDAS TODOs that are not too big for a dedicated PR

Proposed Changes

I'll justify each TODO on an inlined comment

@dapplion dapplion added work-in-progress PR is a work-in-progress das Data Availability Sampling labels Jan 24, 2025
@dapplion dapplion requested a review from jxs as a code owner January 24, 2025 19:18
@dapplion dapplion requested a review from jimmygchen January 24, 2025 19:19
beacon_node/beacon_chain/src/beacon_chain.rs Show resolved Hide resolved
@@ -182,8 +173,7 @@ impl<E: EthSpec> PendingComponents<E> {
kzg_verified_data_columns: I,
) -> Result<(), AvailabilityCheckError> {
for data_column in kzg_verified_data_columns {
// TODO(das): Add equivalent checks for data columns if necessary
if !self.data_column_exists(data_column.index()) {
if self.get_cached_data_column(data_column.index()).is_none() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Checks not necessary, we check the inclusion proof both via RPC and gossip. Inlined the function as it makes it easier to follow what's actually doing the data_column_exists check

@@ -753,7 +752,6 @@ impl TestRig {
}

// Expect work event
// TODO(das): worth it to append sender id to the work event for stricter assertion?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not needed, there's a single request in this test

peer_id,
PeerAction::MidToleranceError,
"blob_not_required",
);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Implemented the penalty, all implementations should not send blobs by now @jimmygchen

let delay = get_slot_delay_ms(seen_timestamp, slot, &self.chain.slot_clock);
metrics::observe_duration(&metrics::BEACON_BLOB_RPC_SLOT_START_DELAY_TIME, delay);
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Use seen_timestamp is the same metric for blobs. Should we generalize the name?

@@ -102,8 +103,6 @@ impl<T: BeaconChainTypes> ActiveCustodyRequest<T> {
resp: RpcResponseResult<DataColumnSidecarList<T::EthSpec>>,
cx: &mut SyncNetworkContext<T>,
) -> CustodyRequestResult<T::EthSpec> {
// TODO(das): Should downscore peers for verify errors here
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, verify errors are handled in network_context.rs and downscored there

@dapplion dapplion mentioned this pull request Jan 25, 2025
52 tasks
@dapplion dapplion added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
das Data Availability Sampling ready-for-review The code is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant