Don't request block components until having block#5774
Merged
mergify[bot] merged 4 commits intosigp:unstablefrom May 14, 2024
Merged
Don't request block components until having block#5774mergify[bot] merged 4 commits intosigp:unstablefrom
mergify[bot] merged 4 commits intosigp:unstablefrom
Conversation
dapplion
commented
May 13, 2024
| .block_missing_components() // blobs not yet imported | ||
| .blobs_response_was_valid() | ||
| .blob_imported(); // now blobs resolve as imported | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
Blobs can't be returned first
| .expect_penalty("NoResponseReturned") | ||
| .expect_block_request() | ||
| .expect_no_blobs_request(); | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
Scenario already covered by empty_block_is_retried
| .expect_no_block_request() | ||
| .expect_no_blobs_request() | ||
| .block_response_triggering_process() | ||
| .missing_components_from_block_request(); |
Collaborator
Author
There was a problem hiding this comment.
Scenario already covered by empty_block_is_retried
| .blobs_response() // blobs are not sent until the block is processed | ||
| .expect_no_penalty_and_no_requests() | ||
| .block_response_triggering_process(); | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
Can't respond blobs first, same for too_many_blobs_response_then_block_response_attestation
YoutacRandS-VA
approved these changes
May 14, 2024
realbigsean
approved these changes
May 14, 2024
Member
|
@mergify queue |
✅ The pull request has been merged automaticallyDetailsThe pull request has been merged automatically at 683d9df |
This was referenced May 14, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Addressed
Current stable when creating a new block lookup for
block_rootwill:block_rootbefore knowing if the block has blobs and how manyThis optimistic / blind request forces us to handle the case where we have processed blobs + blocks and turns out that the blob peer did not return enough blobs.
By delaying fetching blobs until we get the block we can be sure to:
Proposed Changes
ActiveBlobsByRootRequestto expect peer to return exactly the number of requested blobs. Else error withNotEnoughResponsesReturnedAvailabilityProcessingStatus::MissingComponents && both_components_processed == truehard error as an internal error. The condition above should ensure that this never happenssingle_block_response_then_too_many_blobs_response_attestationthe sync network context can produce multiple return values for a single request. In the test case it produces: (1)Some(blobs), (2)Err(TooManyResponses). However block lookup mod expects a single result, so we track if the request has been resolved (= a result value has been returned). If resolved, downscore but do not forward the result