refactor(sdk-core): eddsa MPCv2 DSG post-merge nits#8724
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit intomasterfrom
Draft
refactor(sdk-core): eddsa MPCv2 DSG post-merge nits#8724bitgo-ai-agent-dev[bot] wants to merge 1 commit intomasterfrom
bitgo-ai-agent-dev[bot] wants to merge 1 commit intomasterfrom
Conversation
- 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
f3de859 to
c3dee70
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/Twoto reflect that the functions accept any peer party, not just BitGo0|1,0|1|2) toMPCv2PartiesEnumingetSignatureShareRound{One,Two,Three}andpartyIdToSignatureShareType; addSignerPartyIdalias enforcingUSER|BACKUPfor signer paramspartyIdToSignatureShareType(TypeScript now guarantees valid enum values at compile time) and unusedassertimportif/throwGPG key guard insignRequestBasewithassert()for consistency with surrounding invariant checkssignTxRequesttest suite, symmetric to the existing round-1 wrong-type testTest plan
yarn run unit-test --scope bitgoandyarn run unit-test --scope @bitgo/sdk-core)should throw if round 2 response has wrong type) exercises the round-2 wrong-type pathyarn check-fmt)Ticket: WCI-372