flashbots / flashbots/mev-boost
Make relay request timeout configurable or at least limited.
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 292
- PR merge metrics
- No merged PRs in 30d
Description
At the moment when a request to relay is made the default context with no timeout is [passed](https://github.com/flashbots/mev-boost/blob/4035cb3c8c8f9b0118a0170049203f0167c604a0/server/service.go#L361) which means the request will block until the server replies.
Later on the wait group will [block](https://github.com/flashbots/mev-boost/blob/4035cb3c8c8f9b0118a0170049203f0167c604a0/server/service.go#L465) 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.
Contributor guide
Research direction
Read server/service.go around the request creation at line 361 and the wait group at line 465 to understand how relay calls are started and awaited. Add a bounded or configurable timeout per relay request, then verify that an unresponsive relay cannot keep the overall wait blocked indefinitely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100