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
Developer
9dee0d36a5
feat(backup,mpc): 添加 prisma 迁移文件
...
backup-service 和 mpc-service 缺少 prisma/migrations 目录
导致 prisma migrate deploy 无法执行
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 04:01:47 -08:00
Developer
9363e4991f
fix(mpc-service): 使用 prisma db push 自动同步数据库 schema
...
- 容器启动时执行 prisma db push 自动创建/同步表结构
- 删除 migrations 目录,不再使用 migrate 机制
- 这是标准做法:schema.prisma 定义表结构,db push 同步到数据库
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 21:56:30 -08:00
Developer
8850ea6ab0
fix(mpc-service): 重构数据库迁移机制,从根本解决表不存在问题
...
问题分析:
- 旧迁移文件只有 party_shares 表,缺少 session_states 和 share_backups 表
- Prisma 的 _prisma_migrations 表记录迁移已完成,导致新表无法创建
- 迁移状态与实际数据库不一致
解决方案:
1. 删除旧迁移目录,创建全新的 0001_init 迁移
2. 新迁移包含所有三个表: party_shares, session_states, share_backups
3. 添加 docker-entrypoint.sh 启动脚本,容器启动时自动运行迁移
4. 修改 Dockerfile 使用 entrypoint 脚本
deploy.sh 新增命令:
- migrate-reset: 重置数据库并重新运行迁移
- migrate-push: 强制同步 schema (创建缺失的表)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 21:47:42 -08:00
Developer
122bf84c24
fix(mpc-service): 修复数据库迁移,添加缺失的表
...
migration.sql 与 schema.prisma 不同步,缺失以下表:
- session_states: 会话状态跟踪表
- share_backups: 分片备份表
同时修复了索引名称以匹配 schema 定义。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 21:32:36 -08:00
Developer
451aa8fae8
feat(mpc-service): 添加初始数据库 migration
...
创建 party_shares 和 signing_sessions 表及索引
修复健康检查失败问题(缺少数据库表)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 10:03:03 -08:00