snarkOS
snarkOS copied to clipboard
[Bug] Streamline peer banning and block sync
🐛 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
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).