fix(co-sign): use keygen N and T for TSS signing parameters
The TSS signing was failing with "U doesn't equal T" error because tss-party was passing incorrect parameters to tss.NewParameters(): - Was: len(sortedPartyIDs)=3 (signing participants), thresholdT-1=2 - Now: thresholdN=5 (keygen N), thresholdT=3 (keygen T) This matches how pkg/tss/signing.go creates parameters in server-party, which uses TotalParties=N and Threshold=T from the original keygen. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5ebdd4d592
commit
ca69ebc839
|
|
@ -597,9 +597,13 @@ func executeSign(
|
|||
// Create peer context and parameters
|
||||
// For signing with T parties from an N-party keygen:
|
||||
// - The peer context contains only the T signing parties
|
||||
// - threshold parameter should be T-1 (since we need T parties to sign, threshold = T-1)
|
||||
// - IMPORTANT: partyCount must be the original N from keygen, NOT current signers count
|
||||
// - threshold must be the original T from keygen, NOT T-1
|
||||
// This matches how pkg/tss/signing.go creates parameters in server-party:
|
||||
// params := tss.NewParameters(tss.S256(), peerCtx, selfTSSID, config.TotalParties, config.Threshold)
|
||||
// where TotalParties=N from keygen and Threshold=T from keygen
|
||||
peerCtx := tss.NewPeerContext(sortedPartyIDs)
|
||||
params := tss.NewParameters(tss.S256(), peerCtx, selfTSSID, len(sortedPartyIDs), thresholdT-1)
|
||||
params := tss.NewParameters(tss.S256(), peerCtx, selfTSSID, thresholdN, thresholdT)
|
||||
|
||||
// Create channels
|
||||
outCh := make(chan tss.Message, thresholdT*10)
|
||||
|
|
|
|||
Loading…
Reference in New Issue