mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Rework DV aggregation selection proofs (#15156)
* Reword DV selection proofs * Add changelog * Expect 1 call to DomainData in DV update duties test --------- Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
This commit is contained in:
@@ -45,16 +45,7 @@ func (v *validator) SubmitAggregateAndProof(ctx context.Context, slot primitives
|
||||
}
|
||||
|
||||
var slotSig []byte
|
||||
if v.distributed {
|
||||
slotSig, err = v.attSelection(attSelectionKey{slot: slot, index: duty.ValidatorIndex})
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Could not find aggregated selection proof")
|
||||
if v.emitAccountMetrics {
|
||||
ValidatorAggFailVec.WithLabelValues(fmtKey).Inc()
|
||||
}
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if !v.distributed {
|
||||
// Avoid sending beacon node duplicated aggregation requests.
|
||||
k := validatorSubnetSubscriptionKey(slot, duty.CommitteeIndex)
|
||||
v.aggregatedSlotCommitteeIDCacheLock.Lock()
|
||||
@@ -80,6 +71,21 @@ func (v *validator) SubmitAggregateAndProof(ctx context.Context, slot primitives
|
||||
// https://github.com/ethereum/consensus-specs/blob/v0.9.3/specs/validator/0_beacon-chain-validator.md#broadcast-aggregate
|
||||
v.waitToSlotTwoThirds(ctx, slot)
|
||||
|
||||
// In a DV setup, selection proofs need to be agreed upon by the DV.
|
||||
// Checking for selection proofs at slot 0 of the epoch will result in an error, as the call to the DV executes slower than the start of this function.
|
||||
// Checking for selection proofs after 2/3 of slot in a DV setup is much faster than non-DV as it's quickly fetched from memory,
|
||||
// hence it does not slow down the aggregation as a non-DV would.
|
||||
if v.distributed {
|
||||
slotSig, err = v.attSelection(attSelectionKey{slot: slot, index: duty.ValidatorIndex})
|
||||
if err != nil {
|
||||
log.WithError(err).Error("Could not find aggregated selection proof")
|
||||
if v.emitAccountMetrics {
|
||||
ValidatorAggFailVec.WithLabelValues(fmtKey).Inc()
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
postElectra := slots.ToEpoch(slot) >= params.BeaconConfig().ElectraForkEpoch
|
||||
|
||||
aggSelectionRequest := ðpb.AggregateSelectionRequest{
|
||||
|
||||
Reference in New Issue
Block a user