snarkOS icon indicating copy to clipboard operation
snarkOS copied to clipboard

[Bug] Streamline peer banning and block sync

Open vicsn opened this issue 2 months ago • 1 comments

🐛 Bug Report

  • We should ban in dev mode
  • We should revisit banning on BlockResponse timeouts, because we ban peers when we restart our node
  • We should add some tests to make sure it is handled correctly and we don't regress
  • We should fix the following edge-case:
    • A validator sends out block requests to a peer
    • The peer's Router disconnects due to peer refresh
    • Despite this log Block sync is removing all block requests to peer - no block requests are removed
    • 10 minutes later, the block requests time out and we see IP-banning 44.251.223.68 reason: timed out on block requests

Tested on commit hash: 7a3f235e3

vicsn avatar Nov 06 '25 13:11 vicsn

It might be good to postpone this until https://github.com/ProvableHQ/snarkOS/pull/3670 is done. There are some interesting subtleties to consider, such as differentiating between malicious nodes (sending invalid blocks) and other faulty/slow nodes (simply not responding in time).

kaimast avatar Nov 07 '25 18:11 kaimast