rwadurian/backend/mpc-system/pkg
hailin 7ab28dced0 fix(tss): use BuildLocalSaveDataSubset for threshold signing with party subsets
When signing with fewer parties than keygen (e.g., 2-of-3 signing with only 2 parties),
the TSS-lib requires filtered save data containing only the participating parties.

Without this fix, signing fails with "U doesn't equal T" error because:
- Keygen creates save data for all N parties (e.g., 3 parties with indices 0, 1, 2)
- Sign uses only T parties (e.g., 2 parties with indices 1, 2)
- TSS-lib internal index validation fails due to mismatch

Changes:
- pkg/tss/signing.go: Use len(sortedPartyIDs) for partyCount and call BuildLocalSaveDataSubset
- tss-party/main.go: Add BuildLocalSaveDataSubset call for Electron app
- tss-wasm/main.go: Add BuildLocalSaveDataSubset call for WASM builds

This fix is backward compatible - when all parties participate, the subset equals the original data.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 11:25:22 -08:00
..
config refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
crypto refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
errors refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
grpcutil feat(mpc-system): integrate reliability mechanisms and enable party-driven architecture 2025-12-05 20:30:03 -08:00
jwt refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
logger test(logger): set Development=true to test if it affects debug logging 2025-12-06 03:41:50 -08:00
middleware feat(mpc-system): integrate reliability mechanisms and enable party-driven architecture 2025-12-05 20:30:03 -08:00
retry feat(mpc-system): integrate reliability mechanisms and enable party-driven architecture 2025-12-05 20:30:03 -08:00
tss fix(tss): use BuildLocalSaveDataSubset for threshold signing with party subsets 2025-12-31 11:25:22 -08:00
utils refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00