rwadurian/backend
hailin dbeef9f415 fix(android): 修正2-of-3服务器备份参与方选择逻辑
问题描述:
之前的实现在勾选"包含服务器备份"时,会选择全部3个参与方
(2个用户设备 + 1个服务器),导致后端报错:
"need exactly 2 parties for threshold 2, got 3"

根本原因:
buildSigningParticipantList() 方法在 includeServerParties=true 时,
返回了所有参与方,没有排除丢失的设备。

修复内容:
1. buildSigningParticipantList() 新增 currentPartyId 参数
2. includeServerBackup=true 时的新逻辑:
   - 只选择当前设备 (currentPartyId)
   - 加上服务器方 (co-managed-party-*)
   - 排除另一个丢失的用户设备
   - 总共正好 2 个参与方,满足 threshold t=2
3. 增强调试日志:
   - [PARTICIPANT-LIST] Device lost mode
   - Selected X parties for signing

测试场景:
- 不勾选:2个用户设备参与(默认行为)
- 勾选:1个当前设备 + 1个服务器 = 2方(设备丢失场景)

修改文件:
- TssRepository.kt (lines 3719-3744, 3796-3804)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-26 18:11:17 -08:00
..
.claude refactor: simplify mpc-service to gateway mode 2025-12-06 17:16:14 -08:00
api-gateway fix(kong): remove ws/wss protocols from WebSocket route 2026-01-18 21:36:30 -08:00
infrastructure chore(docker): 为 mpc-system、api-gateway、infrastructure 添加时区配置 2025-12-23 18:35:09 -08:00
mpc-system fix(android): 修正2-of-3服务器备份参与方选择逻辑 2026-01-26 18:11:17 -08:00
scripts fix(scripts): 修正容器名为 rwa-blockchain-service 2025-12-15 10:34:25 -08:00
services fix(contribution-service): CDC planting_orders 阶段按 order_id 排序处理 2026-01-23 03:41:14 -08:00
.env.windows fix(referral): 修复 getMyReferralInfo 使用 userId 而不是 accountSequence 的问题 2025-12-14 05:05:03 -08:00
docker-compose.windows.yml feat(service-party-app): implement co-sign multi-party signing 2025-12-30 18:36:11 -08:00