Conversation
Add Express routing for EdDSA MPCv2 external signer share generation. Wire MPCv2 wallet signing params to use the EdDSA round generators. - Route EddsaMPCv2Round1/2/3 share requests to offline helpers - Add EdDSA MPCv2 external signer generator factories - Add typed route response codecs for EdDSA MPCv2 share responses - Cover route dispatch, generator requests, and signing-param wiring - Avoid external signer test fixture rewrites during test imports Ticket: WCI-380
|
Claude finished @pranavjain97's task —— View job Code Review Complete ✅Reviewing the PR changes for EdDSA MPCv2 external signer routing implementation. Todo List:
Review SummaryThis PR successfully implements EdDSA MPCv2 external signer routing by adding support for the three-round EdDSA MPCv2 signing protocol alongside the existing EdDSA v1 protocol. The implementation is well-structured and follows established patterns. ✅ Strengths1. Comprehensive Implementation
2. Code Quality & Architecture
3. Backward Compatibility
4. Excellent Test Coverage
🔍 Technical ReviewclientRoutes.ts (Lines 461-497)const isMPCv2 = [
ShareType.EddsaMPCv2Round1.toString(),
ShareType.EddsaMPCv2Round2.toString(),
ShareType.EddsaMPCv2Round3.toString(),
].includes(req.decoded.sharetype) || req.decoded.sharetype.startsWith('EddsaMPCv2');✅ Good: Robust MPCv2 detection with both enum matching and string prefix matching External Signer Routing (Lines 924-951)if (wallet._wallet.multisigTypeVersion === 'MPCv2') {
return {
...req.body,
customEddsaMPCv2SigningRound1GenerationFunction: createCustomEddsaMPCv2SigningRound1Generator(/*...*/),
customEddsaMPCv2SigningRound2GenerationFunction: createCustomEddsaMPCv2SigningRound2Generator(/*...*/),
customEddsaMPCv2SigningRound3GenerationFunction: createCustomEddsaMPCv2SigningRound3Generator(/*...*/),
};
}✅ Good: Clear separation between MPCv2 and v1 generator assignment Generator Functions (Lines 1824-1867)✅ Good: Identical structure to ECDSA MPCv2 generators with proper error handling and retry logic 📝 Minor Suggestions1. Error Message ConsistencyThe EdDSA MPCv2 error message could match the ECDSA format: // Current (line 480)
`Share type ${req.decoded.sharetype} not supported for EdDSA MPCv2, only EddsaMPCv2Round1, EddsaMPCv2Round2 and EddsaMPCv2Round3 is supported.`
// Suggested (matches ECDSA format on line 516)
`Share type ${req.decoded.sharetype} not supported for EdDSA MPCv2, only EddsaMPCv2Round1, EddsaMPCv2Round2 and EddsaMPCv2Round3 are supported.`2. Type Documentation EnhancementThe type definitions are excellent, but consider adding examples for better developer experience: /**
* @example
* // EdDSA MPCv2 Round 1 request
* POST /api/v2/tsol/tssshare/EddsaMPCv2Round1
* {
* "txRequest": { "walletId": "...", "transactions": [...] }
* }
*/🚀 Recommendation: APPROVEThis is a high-quality implementation that:
The implementation demonstrates solid understanding of the existing codebase architecture and cryptographic protocols. The minor suggestions above are optional enhancements that don't block approval. Job Run: View workflow run |
Add Express routing for EdDSA MPCv2 external signer share generation. Wire MPCv2 wallet signing params to use the EdDSA round generators.
Ticket: WCI-380