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

Reflect relays statuses in `status` endpoint

Open tbenr opened this issue 3 years ago • 8 comments

I think mev-boost status endpoint should call status endpoints for each relays and return OK if at least one returned OK. Otherwise it should return KO (503?).

tbenr avatar Jun 24 '22 06:06 tbenr

I think that could make sense. Would love to hear inputs from the other CL clients on this too!

metachris avatar Jun 24 '22 08:06 metachris

I see a problem with this approach, namely that mev-boost uses it's internal request timeout, waiting for the slowest relay. But it has no notion about the BN timeout for this call. Thus even if a relay already responded okay, boost would still wait for further relay responses.

Either we should allow the BN to pass the request timeout as argument, or we should revert this change. Any thoughts?

metachris avatar Jul 03 '22 07:07 metachris

I think mev-boost should respond immediately as soon as the first relay responds ok. (So it requires calling status in parallel against all relays).

Another approach could be to detach the calls. Mev-boost can do it's own polling to relays and maintain its own view of the situation, so the mev-boost can respond immediately with its current view.

tbenr avatar Jul 03 '22 10:07 tbenr

Good ideas! Thanks 👍

metachris avatar Jul 03 '22 14:07 metachris

The second approach adds a bit of latency but saves from the need of coordinating the timeouts, so slightly prefer that over the first option :)

tbenr avatar Jul 03 '22 15:07 tbenr

Implemented the first option in v0.7.2, moving to option 2 in the future

metachris avatar Jul 06 '22 19:07 metachris

What timeout are you applying on the relays call?

tbenr avatar Jul 07 '22 08:07 tbenr

The default timeout used for all requests. But perhaps that's not good enough and we need to define them per request... See also #181

metachris avatar Jul 07 '22 10:07 metachris

finished

metachris avatar Aug 26 '22 09:08 metachris