hailin
fdff3a3119
feat(mining-wallet-service): add migration for SHARE_POOL_A and SHARE_POOL_B
...
Split the share pool into two accounts:
- SHARE_POOL_A: 100亿 for burning
- SHARE_POOL_B: 200万 for mining distribution
Total: 100.02亿
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 06:40:56 -08:00
hailin
bfafd6d34c
refactor(prisma): consolidate migrations into single init files
...
Merge multiple incremental migrations into single init migration for each service:
- auth-service: 3 migrations → 1 (user auth, SMS, KYC)
- contribution-service: 4 migrations → 1 (contribution accounts, 15-level hierarchy, 3-tier bonus)
- mining-admin-service: 6 migrations → 1 (admin, CDC sync tables, prisma relation mode)
- mining-service: 1 migration (no change needed, renamed for consistency)
- mining-wallet-service: 3 migrations → 1 (wallet system, removed blockchain tables)
- trading-service: 1 migration (no change needed, renamed for consistency)
All migrations renamed from timestamp format (20260111000000_*) to sequential format (0001_init)
for cleaner migration history.
Note: Requires clearing _prisma_migrations table before applying to existing databases.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 11:04:24 -08:00
hailin
8e30438433
refactor(mining-wallet-service): remove KAVA blockchain integration
...
- Remove KavaBlockchainService and blockchain.repository
- Remove BlockchainIntegrationService and BlockchainController
- Update health controller to remove blockchain check
- Clean up Prisma schema (remove blockchain models and enums)
- Add migration to drop blockchain-related tables
This functionality will be re-implemented when needed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 06:31:30 -08:00
hailin
7fe954e563
feat(contribution/wallet): 实现贡献值2.0计算与钱包存储架构
...
主要变更:
- contribution-service: 添加省市字段到认种同步数据
- contribution-service: 实现分配结果发布服务,通过Outbox模式发布到Kafka
- contribution-service: 更新Outbox调度器,支持4小时最大退避重试
- mining-wallet-service: 添加贡献值消费者,处理分配结果入账
- mining-wallet-service: 添加用户注册消费者,自动创建钱包
- mining-wallet-service: 添加贡献值过期调度器
- mining-wallet-service: 系统账户添加contributionBalance字段
Kafka事件流:
- contribution.distribution.completed: 分配结果事件
- auth.user.registered: 用户注册事件
可靠性保证:
- Outbox模式确保事件可靠发布
- 4小时幂等退避策略(30s,1m,2m,5m,10m,30m,1h,2h,4h)
- Redis+DB双重幂等检查
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 06:13:18 -08:00
hailin
51456373a9
feat(2.0-services): 添加所有服务的初始Prisma migrations
...
使用 prisma migrate diff 生成初始数据库迁移脚本:
- mining-admin-service: 管理后台相关表及CDC同步表
- auth-service: 用户认证相关表
- trading-service: 交易相关表
- mining-wallet-service: 钱包相关表
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 00:06:46 -08:00