Fix unexpected UnrequestedBlobId and ExtraBlocksReturned errors due to race conditions.#5477
Closed
jimmygchen wants to merge 2 commits intosigp:unstablefrom
Closed
Fix unexpected UnrequestedBlobId and ExtraBlocksReturned errors due to race conditions.#5477jimmygchen wants to merge 2 commits intosigp:unstablefrom
UnrequestedBlobId and ExtraBlocksReturned errors due to race conditions.#5477jimmygchen wants to merge 2 commits intosigp:unstablefrom
Conversation
…ue to race conditions.
da505f0 to
a36c1ef
Compare
…y known, rather than returning an error.
Closed
realbigsean
requested changes
Mar 26, 2024
Member
realbigsean
left a comment
There was a problem hiding this comment.
I think we should take out the block root check, and revert the deleted tests, but I'm on board with adding the BlockIsAlreadyKnown change and the error information improvement
Comment on lines
+382
to
+386
| if expected_block_root == received_id.block_root { | ||
| // We may have already received this blob via gossip since the lookup, | ||
| // so don't return an error here. | ||
| return Ok(None); | ||
| } |
Member
There was a problem hiding this comment.
Suggested change
| if expected_block_root == received_id.block_root { | |
| // We may have already received this blob via gossip since the lookup, | |
| // so don't return an error here. | |
| return Ok(None); | |
| } |
I think the issue is really that we update requested_ids mid-response which keeps us from tracking what we should receive. If this is the case, this is more treating a symptom than the cause. This is an alternative:
77c4ffe#diff-af9c70c212795da7557f17c24d6fc12fa4aa6833d06db6eb2d807c277ee2aadbR260
Member
|
closing in favor of #5488 |
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
Fix unexpected
UnrequestedBlobIdandExtraBlocksReturnederrors due to race conditions.Scenario
UnrequestedBlobIdas we already have the blob. This updates the lookup state toState::AwaitingDownload, which causes subsequent blobs received to trigger errorExtraBlocksReturned