Commit Graph

8 Commits

Author SHA1 Message Date
hailin e114723ab0 feat(mpc-system): add server-party-co-managed for co_managed_keygen sessions
- Create new server-party-co-managed service with two-phase event handling
  - Phase 1 (session_created): Store join token and wait
  - Phase 2 (session_started): Execute TSS protocol (same timing as service-party-app)
- Add PartyRoleCoManagedPersistent role to isolate from normal keygen/sign
- Update docker-compose.yml with 3 co-managed party instances
- Update deploy.sh service lists
- Modify selectPartiesByCompositionForCoManaged to use new role

This ensures co_managed_keygen sessions use dedicated parties that behave
100% compatible with service-party-app, without affecting existing keygen/sign flows.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 23:54:45 -08:00
hailin cc3644de9d feat(mpc-system): 添加单服务管理命令到deploy.sh
新增命令:
- start-svc: 启动单个服务
- stop-svc: 停止单个服务
- restart-svc: 重启单个服务
- rebuild-svc: 重建并重启服务 (支持--no-cache)

支持开发模式和生产模式

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 04:23:22 -08:00
hailin aa74e2b2e2 feat(mpc-system): add signing parties configuration and delegate signing support
- Add signing-config API endpoints (POST/PUT/DELETE/GET) for configuring
  which parties should participate in signing operations
- Add SigningParties field to Account entity with database migration
- Modify CreateSigningSession to use configured parties if set,
  otherwise use all active parties (backward compatible)
- Add delegate party signing support: user provides encrypted share
  at sign time for delegate party to use
- Update protobuf definitions for DelegateUserShare in session events
- Add ShareTypeDelegate to support hybrid custody model

API endpoints:
- POST /accounts/:id/signing-config - Set signing parties (first time)
- PUT /accounts/:id/signing-config - Update signing parties
- DELETE /accounts/:id/signing-config - Clear config (use all parties)
- GET /accounts/:id/signing-config - Get current configuration

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 22:47:55 -08:00
hailin 34f0f7b897 chore(mpc-system): update Dockerfiles to Go 1.24 and fix line endings
- Update all Dockerfiles from Go 1.21 to Go 1.24 (required by go.mod)
- Fix line endings in deploy.sh and .env.example for Unix compatibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 16:40:32 -08:00
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 24e14da24b docs(mpc-system): add complete end-to-end API verification report
- Verified all 10 services health and connectivity
- Tested complete session lifecycle (create, join, ready, start, complete, close)
- Validated gRPC internal communication and port isolation
- Confirmed security design (API auth, JWT tokens, input validation)
- Documented Account Service placeholder implementation status
- Identified minor issues (PartyIndex bug, API naming inconsistency)
- System readiness: 85% ready for integration

Test coverage:
-  Infrastructure: 100% (all services healthy)
-  Session Coordinator API: 95% (7/7 endpoints tested)
-  gRPC communication: 100% (verified)
-  Security design: 100% (validated)
- ⚠️  Account Service: 30% (placeholder implementation)
-  TSS protocol: pending end-to-end testing

Added comprehensive verification report with test commands,
findings, and recommended action plan.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 00:39:40 -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 d9f6c24b18 feat(mpc-system): 添加一键部署脚本
deploy.sh 提供以下功能:
- build/build-no-cache: 构建 Docker 镜像
- up/start/down/stop: 启动/停止所有服务
- logs/logs-tail: 查看日志
- status/health: 检查服务状态
- infra up/down: 仅管理基础设施 (postgres/redis/rabbitmq)
- mpc up/down/restart: 仅管理 MPC 服务
- shell: 进入容器
- test-api: 测试 Account Service API
- clean: 清理所有容器和数据卷

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 16:58:39 -08:00