ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.11k stars 272 forks source link

Batch BLS verification for attestations #2686

Closed dapplion closed 2 years ago

dapplion commented 3 years ago

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

g11tech commented 3 years ago

@dapplion kindly assign, could take a look at it and study lighthouse implementation while crunching metrics

dapplion commented 3 years ago

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.

dapplion commented 3 years ago

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.

when(now % 100 === 0, () => submitWork(a)) when(now % 100 === 50, () => submitWork(b))