-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement further BLS batching and data parallelism #2339
Comments
Batching opportunities overviewRecapaggregate != batchingAn aggregate is spec-defined, for a receiver:
Batching is client optimization
According to Justin Drake there is an incoming optimization that will make validation != verificationValidation is according to gossipsub rebroadcasting rules
Validation requires verifying 1 signature per object Verification is according to consensus rules
FlowFor attestations, exists, slashings (during steady state):
For blocks during sync:
For blocks during steady state:
During sync or steady state, for missing ancestors:
BottlenecksDuring sync:
During steady state:
Batching opportunitiesFor blocks:
AnalysisIn a well functioning chain we rarely receive more than 1 block per slot at a steady state. One issue is that verifying blocks is expensive and we may not have enough time to verify 5 missing blocks For attestations:
AnalysisWe kind of already process multiple at once (without returning control to event loop) Architecture explorationIf we want to batch blocks, we need to avoid blocking the networking and validator duties (so DAG, forkchoice as well).
Whatever we use as a solution we need a way to tie in the communication (Channels, Flowvar) with Chronos. I've outlined a way to make both Flowvar (including ones for custom threadpools) or Channels (including Nim channels) |
@cheatfate's implementation of AsyncChannels is already based on a primitive called |
The attestation batching I think is perhaps the easiest and the most impactful thing we can do, followed by sync blocks. Fork choice reorgs, not so much because there is still not a lot of them being created, even in forky situations.. One more thing that would be interesting about attestations is if we could somehow batch aggregating them - ie right now when an attestation arrives, after it's been verified we'll look for an existing attestation to aggregate it with - if somehow we could batch verification and aggregation, that would be pretty nice. |
Yes AsyncThreadEvent can be used to build the AsyncConditionVariable or AsyncSemaphores. I think it's worth it to split them from the stalled AsyncChannel PR. The main issue with AsyncThreadEvent is that there is no "2-phase commit" protocol to ensure usage without deadlocks:
But the base primitive can indeed be used as a replacement to It's possible that the issues the desktop team is facing is in part due to that. It took me weeks, before resorting to formal verification to write the protocol properly. And even published papers in the past made errors http://research.microsoft.com/en-us/um/people/lamport/tla/dcas.pdf |
Attestation batching is done in #2439. |
The text was updated successfully, but these errors were encountered: