The past three weeks have been dedicated to the following topics
We found some additional opportunities to refactor and delete some code. I had combined most of the v2 and v3 logic into one "flow", however the code branched out at certain places to handle the different endpoint versions. We found a way to combine these branches into one fully coherent flow, and were able to delete around 400+ lines of code in the process. The refactor here mostly involved playing with types and adding a conversion from a full payload to a blinded payload.
PR: https://github.com/sigp/lighthouse/pull/4813
Currently the Lighthouse validator client uses the block v2 endpoint to produce blocks. Once the deneb fork occurs, VCs should migrate from using the v2 endpoint to v3. Migrating from v2 to v3 on the users end will require an upgrade to both the users beacon node and validator client. This means we need to come up with a sensible upgrade strategy.
We should:
My PR introduces a new config value produce-block-v3
that when set, will use the new block v3 endpoint in the VC. This config value is only relevant pre deneb, post deneb the VC will always use the v3 endpoint
The VC also contains some logic that decides wether to try to fetch a blinded payload or a full payload. This logic is now handled downstream inside the block v3 endpoint itself, so I also found an opportunity to remove some logic from the VC itself.
Initially I was able to get batch times down to around 50 seconds by altering two pragma values:
journal_mode: wal and synchronous: NORMAL (https://www.sqlite.org/pragma.html)
Updated metrics:
https://snapshots.raintank.io/dashboard/snapshot/GJ1PseLyV5RLTDcvoJuSx93jruw6Vsc3
My most recent changes have gotten batch times down to around 23 seconds
https://snapshots.raintank.io/dashboard/snapshot/hIwPCJmC26Yjg2REEAdb0ueJFPpyNz22
These changes include