mirror of https://github.com/hyperledger/besu
Fix banning (static peers) because of late response in eth/66 (#4377)
* RequestManager: Lessen penalty for late responses with request ID If the communication with a peer uses the eth/66 protocol, requests have an accompanying request ID. If the response to any of these requests was late, we would disconnect and ban the peer mmediately. This is too excessive a punishment. A late response is typically already punished with a timeout before (too many of which and we disconnect). This commit changes the immediate banning of the peer to just considering the late response useless (again, too many of which and we disconnect). Note that in eth/65, the lack of a request ID would mean we would just consider the late response to be useless (or process it anyway). This commit therefore brings the punishment of late responses more in line with what it used to be before request IDs were introduced. Closes #4320 Signed-off-by: Pietje Puk <pietje@pietjepuk.net> * PeerDenylistManager: Do not ban static/maintained peers These types of peers are added manually by the user, and have a certain trusted status. We should therefore not ban them. Note that we will still disconnect from these peers when they exhibit undesirable behavior (e.g. repeated timeouts). We will however continue to reconnect to them. Signed-off-by: Pietje Puk <pietje@pietjepuk.net> Signed-off-by: Pietje Puk <pietje@pietjepuk.net> Co-authored-by: Pietje Puk <pietje@pietjepuk.net>pull/4489/head
parent
ef69a6c3aa
commit
8b05dd47c8
Loading…
Reference in new issue