Fix race condition between validator duties service and proposer preferences (#9309)

The proposer preferences service was attempting to publish preferences at the start of each epoch. This caused it to race with the validator duties service, it wouldn't calculate validator duties in time for the proposer preference service.

This PR first updates the validator duties service to calculate proposer duties for the current epoch and the next epoch. After Fulu we have the ability to look ahead one epoch for proposer duties, but we never updated the vc to leverage this feature.

This PR also updates the proposer preferences service to fire at every slot. We have an `(Epoch, DependentRoot)` map that prevents us from publishing the same preferences twice.

The changes here should prevent the race condition between the two services and make the proposer preferences service more robust in general.


  


Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
Eitan Seri-Levi
2026-06-20 12:41:30 -07:00
committed by GitHub
parent 560f90611e
commit 477c25db9f
7 changed files with 182 additions and 80 deletions

View File

@@ -200,6 +200,11 @@ Flags:
If present, do not configure the system allocator. Providing this flag
will generally increase memory usage, it should only be provided when
debugging specific memory allocation issues.
--disable-proposer-duties-v2
Fetch proposer duties using the v1 beacon node endpoint instead of v2.
The v1 endpoint reports an incorrect dependent root which causes
spurious proposer duty re-org warnings. Only enable this flag if your
beacon node does not serve the v2 proposer duties endpoint.
--disable-slashing-protection-web3signer
Disable Lighthouse's slashing protection for all web3signer keys. This
can reduce the I/O burden on the VC but is only safe if slashing