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

Replace blob chain info query usage with blob download #2079

Conversation

ndr-ds
Copy link
Contributor

@ndr-ds ndr-ds commented May 29, 2024

Motivation

Now that we can download blobs, using the chain info query isn't needed anymore

Proposal

Use the download blob entrypoint instead

Test Plan

CI

Copy link
Contributor Author

ndr-ds commented May 29, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @andresilva91 and the rest of your teammates on Graphite Graphite

@ndr-ds ndr-ds force-pushed the 05-29-replace_blob_chain_info_query_usage_with_blob_download branch from b17f2e0 to 715ccd6 Compare May 29, 2024 23:42
@ndr-ds ndr-ds marked this pull request as ready for review May 30, 2024 17:16
@graphite-app graphite-app bot requested review from ma2bd, jvff, Twey, afck, MathieuDutSik and christos-h and removed request for ma2bd May 30, 2024 17:16
Copy link

graphite-app bot commented May 30, 2024

Graphite Automations

"Assign reviewers" took an action on this PR • (05/30/24)

6 reviewers were added to this PR based on Andre da Silva's automation.

@ndr-ds ndr-ds force-pushed the 05-28-grpc_entrypoint_to_download_a_certificate branch from 7832aa3 to c8a3801 Compare May 30, 2024 20:12
@ndr-ds ndr-ds force-pushed the 05-29-replace_blob_chain_info_query_usage_with_blob_download branch from 715ccd6 to 4551e25 Compare May 30, 2024 20:41
@ndr-ds ndr-ds force-pushed the 05-28-grpc_entrypoint_to_download_a_certificate branch from c8a3801 to 143c6a4 Compare May 30, 2024 21:07
@ndr-ds ndr-ds force-pushed the 05-29-replace_blob_chain_info_query_usage_with_blob_download branch from 4551e25 to df695bc Compare May 30, 2024 21:07
@ndr-ds ndr-ds force-pushed the 05-28-grpc_entrypoint_to_download_a_certificate branch from 143c6a4 to 26ffb60 Compare May 31, 2024 02:29
@ndr-ds ndr-ds force-pushed the 05-29-replace_blob_chain_info_query_usage_with_blob_download branch from df695bc to adb92b5 Compare May 31, 2024 02:29
@ndr-ds ndr-ds force-pushed the 05-28-grpc_entrypoint_to_download_a_certificate branch from 26ffb60 to 19ddf6b Compare May 31, 2024 02:35
@ndr-ds ndr-ds force-pushed the 05-29-replace_blob_chain_info_query_usage_with_blob_download branch from adb92b5 to d00c5ae Compare May 31, 2024 02:36
@ndr-ds ndr-ds force-pushed the 05-28-grpc_entrypoint_to_download_a_certificate branch from 19ddf6b to cba62d9 Compare May 31, 2024 02:54
@ndr-ds ndr-ds force-pushed the 05-29-replace_blob_chain_info_query_usage_with_blob_download branch from d00c5ae to 5166833 Compare May 31, 2024 02:56
@ndr-ds ndr-ds force-pushed the 05-28-grpc_entrypoint_to_download_a_certificate branch from cba62d9 to 7a20c90 Compare May 31, 2024 15:30
@ndr-ds ndr-ds force-pushed the 05-29-replace_blob_chain_info_query_usage_with_blob_download branch from 5166833 to 10dbe38 Compare May 31, 2024 15:30
@ndr-ds ndr-ds force-pushed the 05-28-grpc_entrypoint_to_download_a_certificate branch from 7a20c90 to eded29e Compare June 1, 2024 03:21
@ndr-ds ndr-ds force-pushed the 05-29-replace_blob_chain_info_query_usage_with_blob_download branch from 10dbe38 to 4e2ecb0 Compare June 1, 2024 03:23
.await
.into_iter()
.flatten()
.flatten()
Copy link
Contributor

@afck afck Jun 1, 2024

Choose a reason for hiding this comment

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

Shouldn't we fail if one of the blobs can't be found? (Edit: I see, we already aren't doing that.)

@@ -71,6 +72,9 @@ pub enum LocalNodeError {

#[error("The chain info response received from the local node is invalid")]
InvalidChainInfoResponse,

#[error("Got different blob id from downloaded blob when trying to download {blob_id:?}")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#[error("Got different blob id from downloaded blob when trying to download {blob_id:?}")]
#[error("Got different blob ID from downloaded blob when trying to download {blob_id:?}")]

{
return Some(blob);
for mut node in validators {
if let Some(blob) = Self::try_download_blob_from(&mut node, blob_id).await? {
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't fail if one faulty/malicious validator sends us the wrong blob. We should continue trying to download it from someone else.

@afck
Copy link
Contributor

afck commented Jun 4, 2024

Closing in favor of #2098.

@afck afck closed this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants