-
Notifications
You must be signed in to change notification settings - Fork 54
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
Samlaf/bls aggregation service #24
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tested and working with inc-sq, but still probably needs good brutal review and some more tests (multiquorum for eg)
Closed
@shrimalmadhur addressed all your comments. Should be good to go! |
shrimalmadhur
approved these changes
Oct 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sorry for massive PR. This generic bls aggregation service turned out more complicated than I anticipated.
I think it still needs more tests, I'm prob forgetting some edge cases, so please go all out on the review.
Motivation
Goal of this feature is to make it easy for avs teams to develop their own aggregator (basically bls signature aggregator).
Solution
This service aggregates signatures over taskResponseDigests, and returns, after reaching the required signature threshold, all the information needed to verify the signature onchain (this struct).
See the comment on top of the service definition for more info, but basically this service aggregates signatures by making the least number of assumption about task sending order. It's based off of the incredible-squaring avs task structure (which is similar to any offchain coprocessor/computation oracle system like truebit), which is that many tasks can be sent in parallel, and a task sent at a later time can be completed before a task sent earlier. This makes the goroutine play (one goroutine per task) necessary and complicates this service's implementation. A different service with a much more structured set of tasks (say eigenDA where tasks are only started offchain by aggregator->node messaging, and so aggregated task responses are always sent onchain orderly) could most likely benefit from a much simpler implementation, which we should eventually provide.
Open questions
What do you guys think of the interface for this service? Open to suggestions to make this easier to use/more understandable. I added a bunch of comments and TODOs in the code listing the assumptions that this code is making, so please do go through them.