Skip to content
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 12 commits into from
Oct 17, 2023
Merged

Conversation

samlaf
Copy link
Collaborator

@samlaf samlaf commented Oct 10, 2023

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.

samlaf added 2 commits October 8, 2023 14:54
tested and working with inc-sq, but still probably needs good brutal review and some more tests (multiquorum for eg)
types/avs.go Outdated Show resolved Hide resolved
@samlaf samlaf mentioned this pull request Oct 14, 2023
@samlaf
Copy link
Collaborator Author

samlaf commented Oct 17, 2023

@shrimalmadhur addressed all your comments. Should be good to go!

@samlaf samlaf merged commit 8a60549 into master Oct 17, 2023
3 checks passed
@samlaf samlaf deleted the samlaf/bls-aggregation-service branch October 17, 2023 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants