Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: reduce timeouts and increase bans (#5882)
Description --- Reduces the latency of timeouts from 30 seconds to 15 seconds Increases the ban periods Motivation and Context --- Reduces the latency of the timeouts from 30 secs to 15 secs: #5860 Increase the short ban to 4 mins up from 30 seconds. The short ban is used for timeouts etc. and is used to ensure the base node can select a new node to sync from etc. But if this is too short, or under the block time, timeouts can be used maliciously by nodes. For example a node can say it has a better pow, let your node try and sync to it, wait for the timeouts, get banned for 30 seconds. This means your node waits the 30 seconds -> 1 mins if needs more than 1 call, which is likely. This means you node rejects all new blocks for 1 min, and then you ban the peer for 30 secs. They can then submit their new block to you after the 30 secs. This makes it longer than the block time. This means the bad node is excluded from all new nodes for 2 blocks on avg. Fixes: : #5860 Fixes: #5867
- Loading branch information