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

Add BLS Aggregation window waiting after quorum #152

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

TomasArrachea
Copy link
Collaborator

@TomasArrachea TomasArrachea commented Oct 29, 2024

Add BLS aggregation window-waiting-after-quorum feature. Once the aggregator reaches quorum, instead of sending the aggregated signature response, it will wait for a window_duration time. During that window time, it will continue to receive and aggregate new signatures, allowing to reduce the gas cost of validating the aggregation on chain. When the window time finishes, the aggregation is sent.
In the case that task's expiry time is reached during that window, the aggregation response is sent.

To implement this feature, the aggregation loop was modified. There are 3 posible cases:

  • receiving a new signature,
  • expiration timer,
  • window timer (implemented using a channel and a tokio task).

Each time a new signature is received, it checks if quorum is reached. Once it's reached, the window timer fires. The loop continues until one of the two timers finish (window timer or task expiration).

This tests cases were added:

  • signatures are processed during window after quorum
  • if quorum has been reached and the task expires during window, the response is sent
  • if window duration is zero, no signatures are aggregated after reaching quorum
  • no signatures are aggregated after window

@TomasArrachea TomasArrachea changed the title [WIP] BLS Aggregation window Add BLS Aggregation window waiting after quorum Oct 30, 2024
@TomasArrachea TomasArrachea marked this pull request as ready for review November 8, 2024 21:37
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.

2 participants