Add --disable-attesting flag to validator client (#7046)

Cleaned up and isolated version of the `--disable-attesting` flag for the VC, from the `holesky-rescue` branch:

- https://github.com/sigp/lighthouse/pull/7041

I figured we don't need the `--disable-attesting` flag on the BN for now, and it was a much more invasive impl.
This commit is contained in:
Michael Sproul
2025-02-27 00:07:16 +11:00
committed by GitHub
parent fe0cf9cb67
commit 80cd8bd911
7 changed files with 43 additions and 0 deletions

View File

@@ -230,6 +230,7 @@ pub struct DutiesService<T, E: EthSpec> {
pub enable_high_validator_count_metrics: bool,
/// If this validator is running in distributed mode.
pub distributed: bool,
pub disable_attesting: bool,
}
impl<T: SlotClock + 'static, E: EthSpec> DutiesService<T, E> {
@@ -403,6 +404,11 @@ pub fn start_update_service<T: SlotClock + 'static, E: EthSpec>(
"duties_service_proposers",
);
// Skip starting attestation duties or sync committee services.
if core_duties_service.disable_attesting {
return;
}
/*
* Spawn the task which keeps track of local attestation duties.
*/