NOTE: This PR is based on code in #144, #145, #146. Need to update merge branch to master once those PR's are merged. Do not merge until that happens but is ready for review
Motivation
Aggregation of signatures in lodestar can take up to 25% of cpu thread time. The process includes a lot of generated JS objects that immediately get thrown away once the signatures are aggregated. This PR is designed to create a single signature call that will do the deserialization and aggregation, with added randomness, in a single function call. By moving this to native the JS objects do not need to be created so only the native deserialization is necessary. Created an async version as well to move this time-intensive work to the worker pool.
Description of Inclusions
Add aggregateWithRandomness and asyncAggregateWithRandomness functions and unit tests
Add perf test comparison between current implementation and aggregateWithRandomness
Add test helper function getTestSetsSameMessage and SameMessageTestSets type
NOTE: This PR is based on code in #144, #145, #146. Need to update merge branch to
master
once those PR's are merged. Do not merge until that happens but is ready for reviewMotivation
Aggregation of signatures in lodestar can take up to 25% of cpu thread time. The process includes a lot of generated JS objects that immediately get thrown away once the signatures are aggregated. This PR is designed to create a single signature call that will do the deserialization and aggregation, with added randomness, in a single function call. By moving this to native the JS objects do not need to be created so only the native deserialization is necessary. Created an async version as well to move this time-intensive work to the worker pool.
Description of Inclusions
aggregateWithRandomness
andasyncAggregateWithRandomness
functions and unit testsaggregateWithRandomness
getTestSetsSameMessage
andSameMessageTestSets
type