Add back proof slot

This commit is contained in:
Tan Chee Keong
2025-03-27 10:44:22 +08:00
parent 57e0bb60e2
commit 1535f40f53

View File

@@ -544,6 +544,9 @@ pub async fn fill_in_aggregation_proofs<T: SlotClock + 'static, E: EthSpec>(
} }
}; };
// Construct proof for prior slot.
let proof_slot = slot - 1;
// Create futures for all subnet IDs for this validator // Create futures for all subnet IDs for this validator
for subnet_id in subnet_ids { for subnet_id in subnet_ids {
let duties_service = duties_service.clone(); let duties_service = duties_service.clone();
@@ -562,7 +565,7 @@ pub async fn fill_in_aggregation_proofs<T: SlotClock + 'static, E: EthSpec>(
Ok(proof) => { Ok(proof) => {
let sync_committee_selection = SyncCommitteeSelection { let sync_committee_selection = SyncCommitteeSelection {
validator_index: duty.validator_index, validator_index: duty.validator_index,
slot, slot: proof_slot,
subcommittee_index: subnet_id, subcommittee_index: subnet_id,
selection_proof: proof.into(), selection_proof: proof.into(),
}; };
@@ -573,7 +576,7 @@ pub async fn fill_in_aggregation_proofs<T: SlotClock + 'static, E: EthSpec>(
log, log,
"Missing pubkey for sync selection proof"; "Missing pubkey for sync selection proof";
"pubkey" => ?pubkey, "pubkey" => ?pubkey,
"slot" => slot, "slot" => proof_slot,
); );
None None
} }
@@ -583,7 +586,7 @@ pub async fn fill_in_aggregation_proofs<T: SlotClock + 'static, E: EthSpec>(
"Unable to sign selection proof"; "Unable to sign selection proof";
"error" => ?e, "error" => ?e,
"pubkey" => ?duty.pubkey, "pubkey" => ?duty.pubkey,
"slot" => slot, "slot" => proof_slot,
); );
None None
} }