Commit Graph

9 Commits

Author SHA1 Message Date
hailin 747e4ae8ef refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing
- Remove Address field from PartyEndpoint (parties connect to router themselves)
- Update K8s Discovery to only manage PartyID and Role labels
- Add Party registration and SessionEvent protobuf definitions
- Implement PartyRegistry and SessionEventBroadcaster domain logic
- Add RegisterParty and SubscribeSessionEvents gRPC handlers
- Prepare infrastructure for party-driven MPC coordination

This is the first phase of migrating from coordinator-driven to party-driven
architecture following international MPC system design patterns.
2025-12-05 08:11:28 -08:00
hailin 2556fea841 refactor: separate configuration from code following 12-Factor App principles
- Created .env.example files with comprehensive security warnings
- Removed hardcoded IP addresses and credentials from docker-compose files
- Made database passwords mandatory (fail-fast on missing config)
- Removed Chinese mirror sources from all Dockerfiles
- Enhanced deploy.sh scripts with .env validation and auto-creation
- Added comprehensive README.md deployment guides
- Changed ALLOWED_IPS default to enable cross-server deployment
- Updated all docker-compose files to use environment variables

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 21:46:35 -08:00
Developer 4db5534372 feat(mpc): 添加 server-party-api 服务,实现用户 share 生成
新增 mpc-system/services/server-party-api:
- 为 mpc-service 提供同步的 TSS keygen/signing API
- 参与 TSS 协议生成用户 share 并直接返回(不存储)
- 支持 API Key 认证
- 端口 8083 对外暴露

更新 mpc-service TSSWrapper:
- 改为调用 server-party-api 而非本地二进制
- 新增 MPC_SERVER_PARTY_API_URL 配置
- 超时时间调整为 10 分钟

架构: mpc-service -> account-service -> server-party-api -> TSS

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 05:32:41 -08:00
Developer 08541f1d8d fix(mpc): 修复 MPC 服务连接配置
问题: mpc-service 无法连接到 mpc-session-coordinator,超时 30 秒

修复:
1. mpc-system/docker-compose.yml:
   - session-coordinator 暴露端口 8081:8080
   - message-router 暴露端口 8082:8080

2. services/docker-compose.yml:
   - MPC_COORDINATOR_URL: 192.168.1.100 -> 192.168.1.111
   - MPC_MESSAGE_ROUTER_WS_URL: 192.168.1.100 -> 192.168.1.111

3. 同步更新 .env.example 和 deploy.sh

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 20:39:53 -08:00
Developer a06688d892 fix(mpc-system): 为 account-service 添加 RabbitMQ 配置
- 添加 MPC_RABBITMQ_HOST/PORT/USER/PASSWORD 环境变量
- 添加 rabbitmq 到 depends_on

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 17:59:22 -08:00
Developer 621d76646e fix(mpc-system): 修复 docker-compose 健康检查为 curl
统一所有服务的健康检查使用 curl -sf 替代 wget --spider

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 17:55:49 -08:00
Developer c63be04322 feat(mpc-system): 优化 Docker 部署配置适配生产环境
部署位置: 192.168.1.100 (Nginx + MPC 服务器)

主要修改:
- 对外仅暴露端口 4000 (account-service)
- 移除基础设施服务的外部端口暴露
- 默认使用 production 环境
- 添加 MPC_API_KEY 和 ALLOWED_IPS 安全配置
- 新增 .env.example 生产环境配置模板
- 移除 Consul 服务发现 (简化部署)
- 优化 Redis 内存配置

架构说明:
- account-service:4000 为对外 API 入口
- 后端服务器 (192.168.1.111) 的 mpc-service 通过此端口调用

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 21:59:01 -08:00
Developer 79ccdd7116 feat: Complete MPC TSS implementation with t-of-n threshold signing
Major changes:
- Add TSS core library (pkg/tss) with keygen and signing protocols
- Implement gRPC clients for Server Party service
- Add MPC session endpoints to Account service
- Deploy 3 Server Party instances in docker-compose
- Add MarkPartyReady and StartSession to proto definitions
- Complete integration tests for 2-of-3, 3-of-5, 4-of-7 thresholds
- Add comprehensive documentation (architecture, API, testing, deployment)

Test results:
- 2-of-3: PASSED (keygen 93s, signing 80s)
- 3-of-5: PASSED (keygen 198s, signing 120s)
- 4-of-7: PASSED (keygen 221s, signing 150s)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 06:57:53 -08:00
Developer 393c0ef04d > 2025-11-29 01:35:10 -08:00