Skip to content

Commit d09f9d1

Browse files
committed
feat(client): spawn LH ProposerPreferencesService with AnchorValidatorStore backend
Construct Lighthouse's ProposerPreferencesService with AnchorValidatorStore and start it via start_update_service(), inside the existing is_gloas_scheduled() gate next to PayloadAttestationService. Completes the Anchor-side ProposerPreferences pipeline: LH's service drives sign_proposer_preferences (#1063) per validator per epoch, dispatching both proposal_data and signing through Anchor's ValidatorStore impl. Part of #1064.
1 parent ceaa8c0 commit d09f9d1

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

anchor/client/src/lib.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ use validator_services::{
6363
latency_service::start_latency_service,
6464
payload_attestation_service::PayloadAttestationService,
6565
preparation_service::PreparationServiceBuilder,
66+
proposer_preferences_service::ProposerPreferencesService,
6667
sync_committee_service::SyncCommitteeService,
6768
};
6869

@@ -821,7 +822,6 @@ impl Client {
821822
// mirroring LH's VC (validator_client/src/lib.rs:657). The service also self-gates per
822823
// slot on `gloas_enabled()`, but gating the start avoids spawning a perpetual idle task
823824
// on networks where Gloas is not scheduled.
824-
// TODO(gloas, #1064): `ProposerPreferences` joins this block once implemented
825825
if spec.is_gloas_scheduled() {
826826
PayloadAttestationService::new(
827827
duties_service.clone(),
@@ -833,6 +833,17 @@ impl Client {
833833
)
834834
.start_update_service()
835835
.map_err(|e| format!("Unable to start payload attestation service: {e}"))?;
836+
837+
ProposerPreferencesService::new(
838+
duties_service.clone(),
839+
validator_store.clone(),
840+
slot_clock.clone(),
841+
beacon_nodes.clone(),
842+
executor.clone(),
843+
spec.clone(),
844+
)
845+
.start_update_service()
846+
.map_err(|e| format!("Unable to start proposer preferences service: {e}"))?;
836847
}
837848

838849
http_api_shared_state.write().database_state = Some(database.watch());

0 commit comments

Comments
 (0)