refactor(sdk-core): EdDSA MPCv2 DSG post-merge nits#8721
Closed
bitgo-ai-agent-dev[bot] wants to merge 1 commit intomasterfrom
Closed
refactor(sdk-core): EdDSA MPCv2 DSG post-merge nits#8721bitgo-ai-agent-dev[bot] wants to merge 1 commit intomasterfrom
bitgo-ai-agent-dev[bot] wants to merge 1 commit intomasterfrom
Conversation
33eb8c1 to
728bad2
Compare
- Rename verifyBitGoMessageRoundOne/Two -> verifyPeerMessageRoundOne/Two
to reflect that the functions accept any peer party, not just BitGo
- Unify literal union param types (0|1, 0|1|2) to MPCv2PartiesEnum in
getSignatureShareRound{One,Two,Three} and partyIdToSignatureShareType;
add SignerPartyId alias enforcing USER|BACKUP for signer params
- Remove dead runtime assert in partyIdToSignatureShareType (TypeScript
now guarantees valid enum values at compile time) and unused assert import
- Replace if/throw GPG key guard in signRequestBase with assert() for
consistency with surrounding invariant checks
- Add round-2 wrong-type negative test to signTxRequest test suite,
symmetric to existing round-1 wrong-type test
Ticket: WCI-372
Session-Id: f87490c7-3cae-4e41-8080-cf6fab5f55b4
Task-Id: cf4b9ca6-45e4-4f2a-99a6-898185b4f147
728bad2 to
3c2ff18
Compare
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.
Summary
verifyBitGoMessageRoundOne/Two→verifyPeerMessageRoundOne/Two— both functions already accept any peer party, so theBitGoprefix is misleading. Updated all call sites and imports.0|1,0|1|2) withMPCv2PartiesEnumingetSignatureShareRound{One,Two,Three}andpartyIdToSignatureShareType. AddSignerPartyId = USER | BACKUPalias to enforce at the type level that the signer cannot be BITGO.partyIdToSignatureShareType— TypeScript now guarantees valid enum values at compile time; also removes the now-unusedassertimport.if/throwGPG key guard insignRequestBasewithassert(), matching all surrounding invariant checks.should throw if round 2 response has wrong typetosignTxRequest.ts, symmetric to the existing round-1 wrong-type test.Test plan
modules/sdk-coreEdDSA MPS DSG helper tests: 10 passingmodules/bitgosignTxRequest tests: 10 passing (includes new round-2 wrong-type test)Related
Closes WCI-372
🤖 Generated with Ralph