eth/downloader: ignore headers not requested#22214
eth/downloader: ignore headers not requested#22214holiman wants to merge 2 commits intoethereum:masterfrom
Conversation
|
What this PR does, is ignore 'spurious' headers that arrive while we're waiting for some specific headers (specifically: during ancestor search). So does this mean that now, instead of rejecting quickly from a malicious peer, we now 'hang' for a full minute? Well, one can then switch it, and say: the attacker can already perform that attack, simply by not answering our header-request. So regardless of what we do, the starvation/timeout attack is present. But if we roll with this PR, we might be able to continue the sync without stop/rollback/resync in case it's just a matter of a misdelivered header. |
|
Hm, this PR unintentionally surfaced another bug in the downloader, which now causes certiain tests to hang. If we request header The reason the tests hang (e.g. |
|
After triage: this is the right approach, need to fix up the tests and also take a look at why/of the block filter in the fetcher does not filter out any fetcher-initiated headers |
|
I'll revisit this once the req-id downloader changes are in |
|
I was going through old PRs and noticed this PR and #22249 were put on hold until req ids were in. Since req ids are now merged I'll go ahead and remove the labels. Just a friendly reminder that they're up for grabs. |
|
Can be closed now that we have request ids |
This is a bit of work in progress.
Explanation here: #22209 (comment)