Actions
업무 #392
진행중
JL
JL
WalletService 나머지 RPC 구현 (GetJobs, GetNodes, GetEarnings, GetEarningsToday, GetNodesDetail, GetEarningsByRange)
업무 #392:
WalletService 나머지 RPC 구현 (GetJobs, GetNodes, GetEarnings, GetEarningsToday, GetNodesDetail, GetEarningsByRange)
설명
개요¶
WalletService 에서 아직 구현되지 않은 6개 RPC 를 포팅한다.
이미 구현된 GetReceipts, GetEarningsSummary 는 제외.
ClaimVirtualNodes 는 virtual node 인프라가 미포팅이므로 이번 범위에서 제외.
구현 대상¶
| RPC | 주요 의존 테이블 |
|---|---|
GetJobs |
job_history (신규 migration 필요) |
GetNodes |
nodes (기존) |
GetNodesDetail |
nodes + job_receipts
|
GetEarnings |
aggregated_earnings (신규 migration 필요) |
GetEarningsToday |
wallets + job_receipts
|
GetEarningsByRange |
job_receipts + nodes
|
작업 계획¶
- Migration
0005_job_history_and_aggregated_earnings.sql추가 -
store/jobs.rs신규 — job_history 쿼리 -
store/receipts.rs확장 — earnings_by_range, earnings_today -
store/earnings.rs신규 — aggregated_earnings 쿼리 -
src/handler/wallet.rs핸들러 구현 - Admin UI 엔드포인트 추가
JL James Lee이(가) 6달 전에 변경
- 상태을(를) 신규에서 해결(으)로 변경되었습니다.
구현 완료 — commit:server|ef3f2ba¶
변경 파일¶
| 파일 | 내용 |
|---|---|
migrations/0005_job_history_and_aggregated_earnings.sql |
job_history, aggregated_earnings 테이블 + 인덱스 신규 추가 |
src/store/jobs.rs |
list_by_wallet, count_by_wallet, row_to_proto
|
src/store/earnings.rs |
list_by_wallet, count_by_wallet, row_to_proto
|
src/store/receipts.rs |
today_for_wallet, node_reward_stats, entries_by_range 추가 |
src/handler/wallet.rs |
6개 stub → 실 구현 |
src/admin/mod.rs |
6개 REST 엔드포인트 + 관리 UI 카드 추가 |
구현된 RPC¶
| RPC | 동작 |
|---|---|
GetNodes |
지갑 소유 활성 노드 목록 (nodes 테이블) |
GetNodesDetail |
노드별 총/주간 AGX, uptime_percent, running_days 포함 상세 정보 |
GetEarningsToday |
wallets 잔고 + job_receipts 당일 집계 |
GetEarnings |
aggregated_earnings 페이지네이션 |
GetEarningsByRange |
날짜 범위 receipts 항목 + 일별 chart 데이터 |
GetJobs |
job_history 페이지네이션 (assigned_node_id → 지갑 매핑) |
제외 항목¶
-
ClaimVirtualNodes: virtual node 인프라 미포팅 → stub 유지
Actions