You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AaronFeickert
changed the title
Peers aren't banned for forwarding empty messages
Peers aren't banned for forwarding empty encrypted messages
Jan 24, 2023
After discussion with @sdbondi, it was decided that forwarding an empty non-encrypted message is not a banned offence. The relevant RFC should be updated to reflect this.
Description
---
Bans peers who send empty encrypted messages. Significantly updates tests to check for more failure modes and assert ban status for each.
Closes [issue 5132](#5132).
Motivation and Context
---
An [earlier PR](#5123) introduces an error when a peer sends an empty encrypted message, which is not allowed. However, the peer was not banned.
Further, [another PR](#5129) updates the handling of unsigned encrypted messages to ensure that bans are done correctly, but does not update tests to check for the bug that led to it.
This PR updates the banning logic to ban a peer who forwards an empty encrypted message, which is always detectable.
It also significantly refactors and updates tests. For each relevant high-level message failure mode, we test for proper error detection. We also check for the proper ban status of the forwarding peer.
How Has This Been Tested?
---
[Who tests the testers?](https://en.wikipedia.org/wiki/Quis_custodiet_ipsos_custodes%3F)
Empty encrypted messages sent by peers are not allowed. However, sending an empty message is not a banned offence.
Because all nodes can detect this, forwarding such a message should result in a ban.
The text was updated successfully, but these errors were encountered: