fuel-core
fuel-core copied to clipboard
Decrease peer reputation on request timeouts and decode errors
Closes #1345. Closes #1346 Closes #1350.
This PR stops discarding request errors from libp2p, and instead returns them to the sender of the request. Also penalizes peers for sending invalid responses or for not replying at all.
Making penalty configurable should be a follow-up PR, as there are other penalties that should be configurable as well
TODO:
- [x] Make timeout configutable: Already seems to be case on master branch
- [x] Add tests
- [x] Fix current tests that for some reason don't terminate
Tests fail in CI due to a timeout. Cannot reproduce locally. Investigating.
One of the test cases seems flakey, looking into that one