Open screwyprof opened 1 month ago
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
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.