This update is shorter, as last week led to a few WIP patches that are still in progress and will be ready by next update: rewritten bid analysis functions (rules of "validity" of bid received via getHeader()
), completed flow of pushing all analysis + faults into a DB, and report generation from the DB (and even turning this into a stream).
I also got started playing around with some initial work on refactoring handling validator registrations by the relay monitor, but I'm focusing on the existing WIPs first.
I rewrote pieces of the "collector" to support retries and kick-off retrying to collect the bid from the relay if the initial requests fails or if the relay claims that there is no bid for that slot. This work is done and has been committed into the repo. The individual processes in the relay monitor work together in parallel and utilize a "clock" in order to keep track of slots and make calls to fetch data per-slot when the time comes. (all data is pretty much in slot granularity). Of course unforceen errors or discrepencies with this clock might case some requests to fail, hence the work to easy support re-tries.
The first part where this has been currently added is the GetBid
function that is a wrapper around the getHeader()
endpoint that a Relay exposes (the endpoint itself is actually part of the Builder API – link to getHeader in Builder API and the Relay implements/supports this). Now if the GetBid
code path fails for whatever reason, the relay-monitor will retry for a few times, waiting a few seconds in-between (configurable). At the same time, the new getHeader()
call for the new slot can be kicked off too. So the relay monitor can be retrying in the background while the "main" collector tries to fetch the bid (if any) for the next slot. Once the bid is found via the initial request or any of the re-tries, it follows the same path and is saved to the DB.
I've already briefly mentioned this, but this week the WIP patches that are getting wrapped up prior to next week's updates are