Skip to content

fix(sdk-lib-mpc): throw in Dsg.endSession() when signature exists#8497

Merged
zahin-mohammad merged 1 commit intomasterfrom
fix/wal-383-dsg-end-session-throw
Apr 17, 2026
Merged

fix(sdk-lib-mpc): throw in Dsg.endSession() when signature exists#8497
zahin-mohammad merged 1 commit intomasterfrom
fix/wal-383-dsg-end-session-throw

Conversation

@mohammadalfaiyazbitgo
Copy link
Copy Markdown
Contributor

Summary

  • Dsg.endSession() at dsg.ts:167 was constructing new Error(...) without throw, silently resetting dsgState to Uninitialized after signing
  • A subsequent init() call would succeed, enabling inadvertent session reuse on the same key share
  • Fix adds throw to the existing new Error(...) call

Test plan

  • New unit test verifying endSession() throws when signature is already produced
  • Full DKLS Dsg 2x3 test suite (11 tests) continues to pass

Ticket: WAL-383

🤖 Generated with Claude Code

@linear
Copy link
Copy Markdown

linear bot commented Apr 13, 2026

@mohammadalfaiyazbitgo mohammadalfaiyazbitgo marked this pull request as ready for review April 14, 2026 16:02
@mohammadalfaiyazbitgo mohammadalfaiyazbitgo requested review from a team as code owners April 14, 2026 16:02
Marzooqa
Marzooqa previously approved these changes Apr 16, 2026
mrdanish26
mrdanish26 previously approved these changes Apr 16, 2026
@mohammadalfaiyazbitgo mohammadalfaiyazbitgo force-pushed the fix/wal-383-dsg-end-session-throw branch from 4ad5dd7 to 10e94a7 Compare April 16, 2026 19:58
zahin-mohammad
zahin-mohammad previously approved these changes Apr 16, 2026
@bitgo-ai-agent-dev bitgo-ai-agent-dev bot force-pushed the fix/wal-383-dsg-end-session-throw branch from 10e94a7 to c664793 Compare April 16, 2026 20:26
pranavjain97
pranavjain97 previously approved these changes Apr 16, 2026
Without the throw, endSession() silently reset dsgState to
Uninitialized after signing, allowing init() to succeed again
and enabling inadvertent session reuse on the same key share.

Ticket: WAL-383
@zahin-mohammad zahin-mohammad merged commit 902654c into master Apr 17, 2026
21 of 22 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.

5 participants