Go to file
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
.claude refactor(android): 回归简单可靠的流管理架构 2026-01-27 01:34:16 -08:00
backend fix(mining-service): Redis DB 11 冲突修复,迁移至 DB 16 2026-01-30 02:22:20 -08:00
contracts feat(blockchain): 部署 eUSDT 和 fUSDT 代币合约 2026-01-19 05:30:25 -08:00
docs docs: 添加 RWADurian 2.0 部署与运维成本方案 2026-01-22 03:29:51 -08:00
frontend feat(mining-app): 分离发送/接收记录 + 隐藏买入待开启 2026-01-29 22:10:47 -08:00
kubernetes . 2025-11-25 10:29:24 +08:00
scripts fix(snapshot): 修改 Services PostgreSQL 用户名为 rwa_user 2026-01-08 09:05:22 -08:00
tests . 2025-11-25 10:29:24 +08:00
.gitignore feat(mining-ecosystem): 添加挖矿生态系统完整微服务与前端 2026-01-10 17:45:46 -08:00
README.md first commit 2025-11-23 21:21:44 -08:00
SEED01-qrcode.png fix: 短信超时返回成功状态避免前端报错 2025-12-21 20:55:31 -08:00
STKAITI.TTF feat(mobile-app): 添加合同签署 API 详细调试日志 2025-12-25 03:14:10 -08:00
contract.docx feat(kyc): 实名认证前检查手机号验证状态 2025-12-24 21:00:53 -08:00
docker-compose.yml first commit 2025-11-23 21:21:44 -08:00
挖矿.xlsx feat(contribution): 添加系统账户算力来源类型字段 2026-01-21 04:23:50 -08:00
榴莲皇后数据.xlsx fix(mobile-app): 修复多账号切换后账号列表只显示一个的问题 2025-12-27 11:12:50 -08:00
联合种植协议董事长_release_form.pdf fix(reporting-service): add /api/v1 prefix to wallet and reward service API calls 2026-01-04 23:18:10 -08:00

README.md