les: prevent double validation#16955
Closed
rjl493456442 wants to merge 1 commit intoethereum:masterfrom
Closed
Conversation
zsfelfoldi
reviewed
Jun 12, 2018
Contributor
zsfelfoldi
left a comment
There was a problem hiding this comment.
Double validation was a deliberate decision. If a server times out and we send multiple requests then it is still a valuable information for the peer selection logic to know whether they all sent valid answers. Timing out (soft timeout) just reduces the short term priority of the server while not giving a valid answer results in disconnection. I think having useful server connections is worth the extra effort. We should not check unrequested "replies" though (that could be a DoS vector) but there is a check for that.
Member
Author
|
Thank you! Get your point now and will close this PR. |
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.
This PR is a complement of the #16776, and #16921 can be fixed by the #16776 too.
Now when a request sent by retrieve manager is soft timeout, it will spawn a new request to another peer. In some corner case, two new arrived data will be validated twice. To avoid this, a new flag
deliveredis added into thesentRequest