You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use unbounded channels in p2p. This makes the node more vulnerable to DoS attacks when the used memory grows without bounds (if peers overload the node with requests). It would be good to do something about this.
Maybe we can can apply back-pressure on the connected peers, when we read from the network socket?
Check how many pending requests there are, and stop reading from the socket until the number is below some threshold.
Something like this:
response = self.cmd_rx.recv() {
// Request was processed, send response to the peer...
request_count -= 1;
},
// Read from the socket if only there is some free capacity
request = self.socket.recv(), if request_count < 10 => {
// New request received, send it to backend...
request_count += 1;
}
The text was updated successfully, but these errors were encountered:
We now use bounded channels to read network messages and send them to the BlockSyncManager tasks (PR #973). I think this should solve most of the problems with the unbounded channels.
We use unbounded channels in p2p. This makes the node more vulnerable to DoS attacks when the used memory grows without bounds (if peers overload the node with requests). It would be good to do something about this.
Maybe we can can apply back-pressure on the connected peers, when we read from the network socket?
Check how many pending requests there are, and stop reading from the socket until the number is below some threshold.
Something like this:
The text was updated successfully, but these errors were encountered: