Commit Graph

6 Commits

Author SHA1 Message Date
hailin 83384acdac fix(mining-service): Redis DB 11 冲突修复,迁移至 DB 16
问题:
  mining-service (2.0) 与 blockchain-service (1.0) 共用 Redis DB 11,
  存在数据污染和资源抢占风险。虽然当前 Key 前缀不同
  (mining:* vs blockchain:*),但缺乏结构性隔离保障。

方案:
  - 将 mining-service Redis DB 从 11 迁移到 16 (超出默认 0-15 范围)
  - Redis 基础设施配置增加 --databases 20,支持 DB 16+
  - 同步修正 .env.example 与代码默认值不一致的问题 (原 .env=1, 代码=11)

修改清单:
  - mining-service/infrastructure.module.ts: 代码默认值 11 → 16
  - mining-service/redis.service.ts: fallback 默认值 1 → 16
  - mining-service/.env.example: REDIS_DB=1 → REDIS_DB=16
  - docker-compose.2.0.yml: mining-service REDIS_DB 11 → 16 + 注释
  - docker-compose.yml: Redis 添加 --databases 20
  - docker-compose.infra.yml: Redis 添加 --databases 20
  - docker-compose.windows.yml: Redis 添加 --databases 20

部署注意:
  1. 需重启 Redis 容器使 --databases 20 生效
  2. 需重启 mining-service 使新 DB 16 生效
  3. 旧 DB 11 中 mining-service 的残留数据可手动清理:
     redis-cli -n 11 KEYS "mining:*" | xargs redis-cli -n 11 DEL

Redis DB 分配表 (修改后):
  1.0: DB 0-11 (identity=0, wallet=1, ..., blockchain=11)
  2.0: DB 8,10,12-16 (blockchain=8, contribution=10, trading=12,
       admin=13, auth=14, wallet=15, mining=16)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 02:22:20 -08:00
hailin ebea74e57b feat(service-party-app): implement co-sign multi-party signing
Add complete co-sign functionality for multi-party transaction signing:

Frontend (React):
- CoSignCreate.tsx: Create signing session with share selection
- CoSignJoin.tsx: Join signing session via invite code
- CoSignSession.tsx: Monitor signing progress and results
- Add routes in App.tsx for new pages

Backend (Electron):
- main.ts: Add IPC handlers for co-sign operations
- tss-handler.ts: Add participateSign() for TSS signing
- preload.ts: Expose cosign API to renderer
- account-client.ts: Add sign session API types

TSS Party (Go):
- main.go: Implement 'sign' command for GG20 signing protocol
- integration_test.go: Add comprehensive tests for signing flow

Infrastructure:
- docker-compose.windows.yml: Expose gRPC port 50051

This is a pure additive change that does not affect existing
persistent role keygen/sign functionality.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 18:36:11 -08:00
hailin 6572ef22c5 fix(docker): 移除 authorization-service 对 reward-service 的启动依赖
避免循环依赖:authorization-service <-> reward-service
使用 fallback 机制处理服务暂时不可用的情况(与 referral-service 类似)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 05:17:35 -08:00
hailin 16a3e76588 fix(authorization): 配置 REWARD_SERVICE_URL 环境变量
- 在 .env.example 添加 REWARD_SERVICE_URL 配置
- 在 docker-compose.yml 添加 REWARD_SERVICE_URL 和 REWARD_SERVICE_ENABLED 环境变量
- 在 docker-compose.windows.yml 添加相同配置
- authorization-service 依赖 reward-service 启动

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 05:15:20 -08:00
hailin e4f2a61ecb fix(authorization-service): 添加 identity-service 连接配置
authorization-service 缺少 IDENTITY_SERVICE_URL 和 IDENTITY_SERVICE_ENABLED
环境变量配置,导致无法获取用户信息(昵称、头像)。

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:31:45 -08:00
hailin 6ef8824ef0 fix(referral): 修复 getMyReferralInfo 使用 userId 而不是 accountSequence 的问题
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 05:05:03 -08:00