fix(adkg): concurrency issue when waiting for RBCs#256
Open
Conversation
Previously, instead of creating a view which was the union of available views, we were trying to find the minimal view. This would cause a bias towards view with a single estimate, thus hiding the disagreement, instead of preserving it.
AnomalRoil
approved these changes
Dec 18, 2025
Contributor
AnomalRoil
left a comment
There was a problem hiding this comment.
LGTM, just a little question and a reminder.
be27473 to
4070e1e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two issues are fixed in that PR.
The first is to wait for RBC instances to completes once all ABAs have been completed. Not a bug, but otherwise the ABAs may run for longer, which results in unnecessary communications.
The second issue, was more problematic, but with low probability of occurring. Essentially, before executing the final RBC, we were waiting as follows:
With the way the notification system works, a permit is only stored if a thread is already waiting, otherwise, no permit was issued. This means that if the notification occurred right after the condition, and before we actually await on the notification, it would be missed.
I fixed it by registering for the notification prior to checking the condition: