This repository was archived by the owner on Oct 28, 2021. It is now read-only.
Cap max incoming new block hashes at c_maxIncomingNewHashes#5676
Merged
halfalicious merged 2 commits intomasterfrom Jul 18, 2019
Merged
Cap max incoming new block hashes at c_maxIncomingNewHashes#5676halfalicious merged 2 commits intomasterfrom
halfalicious merged 2 commits intomasterfrom
Conversation
gumb0
approved these changes
Jul 17, 2019
Member
gumb0
left a comment
There was a problem hiding this comment.
Looks fine, did you see this happening?
(our own code looks to be sending out no more than 20 hashes)
Contributor
Author
|
@gumb0 Haven't checked to see if we're actually hitting this, came across this issue when comparing our behavior to the Ethereum Wire Protocol spec / other clients' behavior |
Contributor
Author
|
gcc CI failure looks infrastructure-related: |
Codecov Report
@@ Coverage Diff @@
## master #5676 +/- ##
==========================================
+ Coverage 62.97% 63.03% +0.06%
==========================================
Files 350 350
Lines 29990 29953 -37
Branches 3361 3352 -9
==========================================
- Hits 18885 18881 -4
+ Misses 9885 9856 -29
+ Partials 1220 1216 -4 |
Member
|
You can at least see in the coverage report that this code is not hit by any unit test. https://codecov.io/gh/ethereum/aleth/pull/5676/diff |
46a0426 to
333fa99
Compare
Contributor
Author
|
Fixed CHANGELOG merge conflict |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fix #5677
When we receive a NewBlockHashes ethereum capability packet which contains more hashes than
c_maxIncomingNewHashes, process the firstc_maxIncomingNewHasheshashes rather than disabling the peer.This bring's Aleth's behavior in line with Parity's (and I suspect Geth's as well).
Parity's processing of the NewBlockHashes packet is here: https://github.com/paritytech/parity-ethereum/blob/7f707fa524baaaccac499d69f9e452b380c31ffa/ethcore/sync/src/chain/handler.rs#L219-L288