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
When #45 is in, we'll need to find a way to throttle parallel validator executions, so if they take a long time we don't run out of memory.
I plan on doing this by passed them all a buffered chan struct{} that they write to before they are started and read from when they finish. Question is: Should we just block the event loop or should we drop a message when the maximum number of validators is running? I think we already drop messages in a similar situation, so I'd propose going the same way here.
This leads us to the next problem, which is that validators that block very long need to be cancelled because otherwise they'll start piling up until either the event loop blocks or we drop all packets. So, how large should the timeout be? 200ms?
It makes sense to drop messages when the validation queue is full, so that it doesn't grow unbounded.
Even a simple tail drop strategy might be sufficient, if it works for the Internet it works for us too :)
We should also disconnect from peers that send us bad data (data that fails to validate). It would be kind of nice to get a blacklist mechanism in libp2p as well but that's a different issue.
When #45 is in, we'll need to find a way to throttle parallel validator executions, so if they take a long time we don't run out of memory.
I plan on doing this by passed them all a buffered
chan struct{}
that they write to before they are started and read from when they finish. Question is: Should we just block the event loop or should we drop a message when the maximum number of validators is running? I think we already drop messages in a similar situation, so I'd propose going the same way here.This leads us to the next problem, which is that validators that block very long need to be cancelled because otherwise they'll start piling up until either the event loop blocks or we drop all packets. So, how large should the timeout be? 200ms?
ping @vyzo @whyrusleeping
The text was updated successfully, but these errors were encountered: