-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Don't start evicting peers right after SyncingEngine
is started
#14216
Conversation
Parachain collators may need to wait to receive a relaychain block before they can start producing blocks which can cause `SyncingEngine` to incorrectly evict them. When `SyncingEngine` is started, wait 2 minutes before the eviction is activated to give collators a chance to produce a block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also update the comment in here to be 30 seconds.
Thanks!!
For my understanding: If I see correctly, the reputation of a peer that is evicted because of inactivity is lowered. After what time will that same evicted peer be able to connect again? |
If there are no peers with higher reputation, the peer is selected again right away and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a hack, not super nice. So, let's hope we can remove this in the near future.
@altonen do we already have some issue to remove this eviction logic after your refactorings?
We can remove it soon. The notification PR is published already and here the code checks if it can accept the peer and if it fails, the handshake will fail for the remote peer and it won't have peers that rejected it. The eviction has not been removed in that PR though but I'll probably remove before it's converted from the draft state to ready state. |
Btw I noticed that changes introduced in #13800 have made syncing tests visibly slower. If you checkout to its parent or revert the commit, they execute in around 60 seconds and after those changes the execution time is ~10 seconds slower. |
bot rebase |
Rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bot rebase |
Rebased |
…4216) * Don't start evicting peers right after `SyncingEngine` is started Parachain collators may need to wait to receive a relaychain block before they can start producing blocks which can cause `SyncingEngine` to incorrectly evict them. When `SyncingEngine` is started, wait 2 minutes before the eviction is activated to give collators a chance to produce a block. * fix doc * Use `continue` instead of `break` * Trigger CI --------- Co-authored-by: parity-processbot <>
…ritytech#14216) * Don't start evicting peers right after `SyncingEngine` is started Parachain collators may need to wait to receive a relaychain block before they can start producing blocks which can cause `SyncingEngine` to incorrectly evict them. When `SyncingEngine` is started, wait 2 minutes before the eviction is activated to give collators a chance to produce a block. * fix doc * Use `continue` instead of `break` * Trigger CI --------- Co-authored-by: parity-processbot <>
Parachain collators may need to wait to receive a relaychain block before they can start producing blocks which can cause
SyncingEngine
to incorrectly evict them.When
SyncingEngine
is started, wait 2 minutes before the eviction is activated to give collators a chance to produce a block.