Limit preaggregating attestations - #5256
Conversation
Performance Report鉁旓笍 no performance regression detected Full benchmark results
|
dapplion
left a comment
There was a problem hiding this comment.
I'm not sure about the safety of this change in adverse conditions. This settings should be flags in case they need to be customized in the future
|
@dapplion are you worry about the
|
|
Only |
23b11ed to
bdefdef
Compare
|
|
||
| // validator gets SyncCommitteeContribution at 2/3 of slot, it's no use to preaggregate later than that time | ||
| if (this.clock.secFromSlot(slot) > this.cutOffSecFromSlot) { | ||
| throw new OpPoolError({code: OpPoolErrorCode.LATE_MESSAGE, slot}); |
There was a problem hiding this comment.
How loud would be this error?
There was a problem hiding this comment.
we throw error here and gossipHandler would log error there.
since this is mainly for debugging purpose, not for end user so I changed log level to debug.
There was a problem hiding this comment.
Why not return an insert outcome? Then the caller can decide to maybe log a debug if result is not add
Co-authored-by: Cayman <caymannava@gmail.com>
8580147 to
7eaa0d0
Compare
* Limit preaggregating attestations * preaggregateSlotDistance hidden cli param * Log debug if error adding SyncCommitteeMessage to pool * SyncCommitteeMessagePool: return instead of throw error * Add SyncCommitteeMesssage insertOutcome metric * Update prune() method header Co-authored-by: Cayman <caymannava@gmail.com> --------- Co-authored-by: Cayman <caymannava@gmail.com>
|
馃帀 This PR is included in v1.8.0 馃帀 |
Motivation
As shown on a subscribe-all-subnets goerli node, preaggregating attestations takes 8% of cpu time, on mainnet it could be worse. I think some preaggregation are redundant because validators only get AggregatedAttestation at 2/3 of clock slot, including:
slot < clockSlotand> clockSlot - 3slot = clockSlotbut come to the pool at > 2/3 of slotI noticed that on mainnet node, the attestation job wait time is 7s in average at some points so they are not useful to preaggregate anymore
Description
part of #5247