Skip to content

fix(signing): publish round state before messages - #36

Merged
piotr-roslaniec merged 2 commits into
devfrom
fix/round5-state-before-send
Sep 30, 2026
Merged

piotr-roslaniec merged 2 commits into
devfrom
fix/round5-state-before-send

Conversation

@piotr-roslaniec

Copy link
Copy Markdown

Problem

The final full-suite race run found TestRounds3to5CTWiring reading round-5 state concurrently with round5.Start. round5.Start emitted its outbound message before storing si, rx, and the rest of its completed local state, so receiving the message did not synchronize those writes. The same publication-order variant existed for DTelda in round 7.

Fix

Store all round-local state before publishing the corresponding outbound message in rounds 5 and 7. Wire bytes and arithmetic are unchanged.

Evidence

  • go test -race ./ecdsa/signing -run ^TestRounds3to5CTWiring$ -count=3
  • go test -race -shuffle=on -count=1 ./ecdsa/signing

@piotr-roslaniec

Copy link
Copy Markdown
Author

Final evidence at f73a2c135e0b1b71a466f07742cac58fc0d0f2f2:

  • Root cause: rounds 5 and 7 published outbound messages before their final local-state writes.
  • Targeted round-5 race regression passed 3 consecutive runs.
  • Full signing package race+shuffle passed.
  • Final repository-wide race+shuffle suite passed, including keygen (2058s) and signing (397s).
  • Go-fmt run 36697246316 and full Go Test run 36697246297 passed.

@piotr-roslaniec
piotr-roslaniec merged commit e7be9a0 into dev Sep 30, 2026
4 checks passed
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.

1 participant