-
Notifications
You must be signed in to change notification settings - Fork 354
Closed
Description
https://ethereum.github.io/beacon-APIs/#/Validator/produceAttestationData
there is no point in calling the api for each validators in the same committee anymore.
We can call it once for all validators now.
this only affects VC running A LOT of validators (multiple validators attesting on multiple committees)
Lines 119 to 140 in 99df3fd
| private Stream<SafeFuture<ProductionResult<Attestation>>> produceAllAttestations( | |
| final UInt64 slot, | |
| final ForkInfo forkInfo, | |
| final Int2ObjectMap<ScheduledCommittee> validatorsByCommitteeIndex) { | |
| return validatorsByCommitteeIndex.int2ObjectEntrySet().stream() | |
| .flatMap( | |
| entry -> | |
| produceAttestationsForCommittee(slot, forkInfo, entry.getIntKey(), entry.getValue()) | |
| .stream()); | |
| } | |
| private List<SafeFuture<ProductionResult<Attestation>>> produceAttestationsForCommittee( | |
| final UInt64 slot, | |
| final ForkInfo forkInfo, | |
| final int committeeIndex, | |
| final ScheduledCommittee committee) { | |
| final SafeFuture<Optional<AttestationData>> unsignedAttestationFuture = | |
| validatorDutyMetrics.record( | |
| () -> validatorApiChannel.createAttestationData(slot, committeeIndex), | |
| this, | |
| CREATE_TOTAL); | |
| unsignedAttestationFuture.propagateTo(committee.getAttestationDataFuture()); |
currently on VC running 20k validators we have bursts of 50-60 createAttestationData calls at the same moment.
we should also rise a beacon-API pr to clarify that post-Electra the API can be used this way (calling it once with committe_index = 0) so BNs must not expect the api to be called with the actual committee index.
Metadata
Metadata
Assignees
Labels
No labels