Skip to content

Commit 69e7d28

Browse files
feat: new BLS aggregation service interface (#578)
Co-authored-by: Tomás Grüner <[email protected]>
1 parent f99bef1 commit 69e7d28

File tree

4 files changed

+251
-144
lines changed

4 files changed

+251
-144
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,30 @@ Each version will have a separate `Breaking Changes` section as well. To describ
1111

1212
### Added 🎉
1313

14+
* feat: new BLS aggregation service interface by @maximopalopoli in <https://github.com/Layr-Labs/eigensdk-go/pull/578>
15+
* The new interface implies starting the service before using it, interact with it using a handler and receiving the aggregated responses in a separate channel.
16+
* An example using the interface is:
17+
18+
```Go
19+
// initialize service
20+
blsAgg := NewBlsAggregatorBuilder(fakeAvsRegistryService, hashFunction, logger)
21+
handler, aggResponsesC := blsAgg.Start()
22+
23+
// Initialize task
24+
metadata := NewTaskMetadata(taskIndex, blockNum, quorumNumbers, quorumThresholdPercentages, tasksTimeToExpiry)
25+
err := handler.InitializeNewTask(metadata)
26+
27+
// Process signature
28+
taskSignature := NewTaskSignature(taskIndex, taskResponse, blsSig, testOperator1.OperatorId)
29+
err = handler.ProcessNewSignature(
30+
context.Background(),
31+
taskSignature,
32+
)
33+
34+
// Receive responses
35+
aggregationServiceResponse := <-aggResponsesC
36+
```
37+
1438
* Added field `DontUseAllocationManager` to `BuildAllConfig` in [#580](https://github.com/Layr-Labs/eigensdk-go/pull/580)
1539

1640
### Changed

0 commit comments

Comments
 (0)