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 #386

Open
wants to merge 17 commits into
base: dev
Choose a base branch
from

Conversation

TomasArrachea
Copy link
Contributor

@TomasArrachea TomasArrachea commented Oct 28, 2024

Closes #300

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 windowDuration 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.

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

What Changed?

Reviewer Checklist

  • Code is well-documented
  • Code adheres to Go naming conventions
  • Code deprecates any old functionality before removing it

@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 1, 2024 20:22
@pablodeymo pablodeymo added the maintenance version next maintenance version label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance version next maintenance version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat(blsagg): use block-based expiry instead of time-based
3 participants