Closed dapplion closed 2 years ago
@dapplion kindly assign, could take a look at it and study lighthouse implementation while crunching metrics
Taking it myself since it's time-sensitive. I do recommend to take in less wide reaching complex tasks just to get a better handle on the lodestar package, gossip, etc.
After thinking about it for while the best to put this is in the BLS queue itself.
Still WIP: How to efficiently force buffering without slowing processing when it's necessary? I.e. we don't want to slow syncing or block processing.
onWork(work) {
if (work.shouldBuffer) {
if (now % 100 < 50) {
a.push(work)
} else {
b.push(work)
}
} else {
submitWork(work)
}
}
when(now % 100 === 0, () => submitWork(a)) when(now % 100 === 50, () => submitWork(b))
Is your feature request related to a problem? Please describe.
Very promising optimization, it has been very successful in Nimbus and Lighthouse. See results here: https://github.com/sigp/lighthouse/pull/2399. We struggle to process all attestations and aggregates in Prater, this will help a lot.
Describe the solution you'd like
https://github.com/sigp/lighthouse/pull/2399