mev-boost icon indicating copy to clipboard operation
mev-boost copied to clipboard

Make relay request timeout configurable or at least limited.

Open screwyprof opened this issue 1 year ago • 1 comments

At the moment when a request to relay is made the default context with no timeout is passed which means the request will block until the server replies.

Later on the wait group will block until all the go-routines are done.

If I get it correctly, if we have a faulty relay which doesn't respond quick enough, all the other request still will be waiting.

It would be better if we could set a request timeout for each relay request.

screwyprof avatar Sep 26 '24 11:09 screwyprof

Not quite. On that same line you link a http client is passed. If you follow the code to where it is constructed you can see some default timeout is passed on it. Not the most obvious but the timeout is set 😄. In other words, by default mev boost only waits a certain time and then works with whatever replies made it in time, if any.

Different calls use different timeouts. If you'd want to control them you can see a short description of cli arguments that control the timeouts here: https://github.com/flashbots/mev-boost#mev-boost-cli-arguments

alextes avatar Oct 02 '24 10:10 alextes