-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consistent peer scoring for missing non-finalized parent #3381
Conversation
@cheatfate, shall we merge this? |
No i dont think so. This PR legend is about different item and this change actually breaks proper behavior. |
My thoughts behind it:
If the range request from And for backward case, the existing logic seems a bit asymmetric as well, because But yeah, it could definitely also be that this is not a problem as is, and/or that the proposed change is incorrect. |
if |
Neither So, if we send such a request, and peer sends us 30 good blocks, then 1 with missing parent, because maybe it is still doing some backfill sync and does not have one of the intermediate blocks available, we treat it as If the intention is indeed that behaviour, I still think the backwards sync condition needs an adjustment, checking for EDIT: In that example, the 30 good blocks could actually be enough to advance |
592b7f7
to
5c26101
Compare
When the sync queue processes results for a blocks by range request, and the requested range contained some slots that are already finalized, `BlockError.MissingParent` currently leads to `PeerScoreBadBlocks` even when the error occurs on a non-finalized slot in the requested range. This patch changes the scoring in that case to `PeerScoreMissingBlocks` for consistency with range requests solely covering non-finalized slots, and, likewise, rewinds the sync queue to the next `rewindSlot`.
|
When the sync queue processes results for a blocks by range request,
and the requested range contained some slots that are already finalized,
BlockError.MissingParent
currently leads toPeerScoreBadBlocks
evenwhen the error occurs on a non-finalized slot in the requested range.
This patch changes the scoring in that case to
PeerScoreMissingBlocks
for consistency with range requests solely covering non-finalized slots,
and, likewise, rewinds the sync queue to the next
rewindSlot
.