feat(sdk-lib-mpc): add executeTillRound handler util#8762
Merged
Conversation
Marzooqa
reviewed
May 13, 2026
Marzooqa
reviewed
May 13, 2026
Adds an executeTillRound orchestration utility for the EdDSA MPSv2 DSG protocol, mirroring DklsUtils.executeTillRound for ECDSA DKLS. Also exposes getPartyIdx and getOtherPartyIdx accessors on the DSG class to support index-free wiring inside the utility. - Add executeTillRound to modules/sdk-lib-mpc/src/tss/eddsa-mps/util.ts; accepts two un-initialized DSG instances plus key shares, message, and derivation path, calls initDsg internally using getPartyIdx(), and drives all 3 interactive rounds (WaitMsg1 -> WaitMsg2 -> WaitMsg3 -> Complete) - Return intermediate DeserializedMessages[][] for rounds 1-2 and the final 64-byte Ed25519 signature Buffer for round 3 - Add getPartyIdx() and getOtherPartyIdx() accessors to DSG class - Add unit tests in modules/sdk-lib-mpc/test/unit/tss/eddsa/eddsa-utils.ts for executeTillRound: per-pair signatures across all three 2-of-3 party combinations (0+1, 0+2, 1+2), root-key verification via getCommonKeychain(), derived-path (m/0/0) key isolation check, intermediate round return-type assertions, and out-of-range round error handling - Migrate existing dsg.ts callers from the local runEdDsaDSG test helper to MPSUtil.executeTillRound and remove runEdDsaDSG from test/unit/tss/eddsa/util.ts - Add dsg.ts protocol test asserting wasm-mps rejects cross-message signing with the wrapped "round WaitMsg2: Protocol Error" failure Ticket: WCI-386
7c3783d to
02a232a
Compare
Marzooqa
approved these changes
May 14, 2026
Contributor
Marzooqa
left a comment
There was a problem hiding this comment.
Implementation is correct, well-tested, and consistent with the ECDSA DKLS pattern. Two minor test-only nits as follow-ups — no public API impact.
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.
Description
Adds an executeTillRound orchestration utility for the EdDSA MPSv2 DSG protocol, mirroring DklsUtils.executeTillRound for ECDSA DKLS. Also exposes getPartyIdx and getOtherPartyIdx accessors on the DSG class to support index-free wiring inside the utility.
Issue Number
WCI-386
Type of change
How Has This Been Tested?
Unit tests added in modules/sdk-lib-mpc/test/unit/tss/eddsa/eddsa-utils.ts under the executeTillRound describe block, plus a cross-message protocol test in dsg.ts. Tests cover:
Run with:
yarn run unit-test --scope @bitgo/sdk-lib-mpc -- -- --grep "executeTillRound"
Checklist