Skip to content

feat(bcast): add broadcast_and_wait for bcast#384

Merged
iamquang95 merged 4 commits into
mainfrom
iamquang95/bcast-wait
May 11, 2026
Merged

feat(bcast): add broadcast_and_wait for bcast#384
iamquang95 merged 4 commits into
mainfrom
iamquang95/bcast-wait

Conversation

@iamquang95
Copy link
Copy Markdown
Collaborator

This change makes DKG broadcast observable by callers that need completion.

Before, bcast::Component::broadcast() only enqueued work. Actual send success/failure arrived later as bcast::Event, but nodesigs and FROST flows had already moved on or were waiting elsewhere. That meant a failed broadcast could be dropped or ignored, causing DKG to hang until cancellation instead of failing with the real send error.

The fix adds broadcast_and_wait(): it enqueues the broadcast and waits for the behaviour’s terminal status. Nodesigs and FROST now use this API before continuing, so broadcast failures propagate immediately through their normal error paths. The old enqueue-only broadcast() remains for callers that consume events separately.

Comment thread crates/dkg/src/nodesigs.rs Outdated
Co-authored-by: Maciej Skrzypkowski <mskr@gmx.com>
@iamquang95 iamquang95 merged commit 65596a5 into main May 11, 2026
10 checks passed
@iamquang95 iamquang95 deleted the iamquang95/bcast-wait branch May 11, 2026 09:29
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.

3 participants