Skip to content

fix(discojs): keep one aggregation round per payload exchange - #1248

Merged
ale18V merged 1 commit into
mainfrom
fix/issue-1247-aggregation-round-race
Oct 6, 2026
Merged

ale18V merged 1 commit into
mainfrom
fix/issue-1247-aggregation-round-race

Conversation

@ale18V

@ale18V ale18V commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

What & why

Resolves #1247. Fixes a race condition in DecentralizedClient where outgoing peer payload messages could be stamped with a subsequent aggregation round. During asynchronous payload encoding, incoming contributions from other peers could advance this.aggregator.round before PeerMessage construction, causing outgoing payloads to carry an advanced round number and leaving recipient peers hanging indefinitely.

Technical plan

Snapshot this.aggregator.round into a local aggregationRound constant at the start of each communication round in onRoundEndCommunication. Use this captured value consistently when adding the local contribution, constructing outgoing peer messages, and logging debug messages.

Deviations from plan

None.

Todo

None.

@ale18V
ale18V merged commit fb850db into main Oct 6, 2026
19 checks passed
@ale18V
ale18V deleted the fix/issue-1247-aggregation-round-race branch October 6, 2026 12:58
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.

DecentralizedClient can label outgoing payload messages with advanced aggregation round

2 participants