This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Description
Address points (1) and (2) of paritytech/polkadot#1348
We can add a crate similar to sc-network-gossip, except that it keeps track of the number of valid/invalid messages for each peer and pulls messages at a slower rate for peers whose ratio is too low.
The slower pulling rate should in turn apply back-pressure on the connection, and force the sending side to slow down the sending rate.
"Stops processing messages" requires some modifications to the API of sc-network in addition to paritytech/polkadot-sdk#554. paritytech/polkadot-sdk#554 itself depends on #5938.
Not strictly-speaking concerned by this issue, but related: #5481 will cause issues on the sending side if we back-pressure the connection.