feat(masternodes): Request status — ask an evonode for its DAPI status on demand - #1043
Conversation
…s on demand Adds a "Request status" row to the evonode detail screen. Tapping it pushes `EvonodeStatusScreen`, which sends DAPI `getStatus` to that node alone (`https://<service host>:<platform HTTP port>` — the SDK's new `PlatformMasternode.platformDAPIAddress`) and lists everything the node answered, grouped as the node groups it: Request (address asked, time received), Software (DAPI/Drive/Tenderdash), Protocol versions, Node (node id, proTxHash, an identity check against the masternode being viewed), Chain (catching up, heights, hashes), Network (chain id, peers, listening), State sync, Time (node clock, latest block, genesis, epoch). Optional fields the node omitted read "Not reported". Hashes/addresses are tap-to-copy. Nothing is requested automatically: the request is sent only when the user taps the row (and again on the screen's Refresh / Try again). The row is disabled with the reason when the aggregation doesn't know the node's DAPI address. An unreachable node shows the transport error and a Try again button (~20 s with the SDK's single-node timeouts). `EvonodeStatusViewModel` owns the SDK call (`SDK.getEvonodeStatus`, run off the main actor) and the row layout/formatting; the view only renders. `MasternodeDetailRow` / `MasternodeCopyRow` become internal and are reused. Requires dashpay/platform#4461 (FFI `dash_sdk_evonode_get_status`, `platform_http_port` in the masternode aggregation, Swift `EvonodeStatus`). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAdded evonode DAPI status retrieval and display. Evonode details now provide conditional navigation to the status screen, with loading, refresh, retry, error, formatting, copying, and localization support. ChangesEvonode status reporting
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This PR adds an on-demand evonode status view and related detail-screen navigation without any supplied current-head issue requiring follow-up; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant MasternodesScreen
participant EvonodeStatusScreen
participant EvonodeStatusViewModel
participant DAPI SDK
MasternodesScreen->>EvonodeStatusScreen: Open status when DAPI address exists
EvonodeStatusScreen->>EvonodeStatusViewModel: Request status on appearance or refresh
EvonodeStatusViewModel->>DAPI SDK: Retrieve evonode status
DAPI SDK-->>EvonodeStatusViewModel: Return status or error
EvonodeStatusViewModel-->>EvonodeStatusScreen: Publish phase and status sections
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Reviewed |
Summary
On an evonode's detail screen there is now a "Request status" row (under Service). Tapping it opens a Node status screen that sends DAPI
getStatusto that node alone and shows everything it answered, grouped as the node groups it:https://<service host>:<platform HTTP port>), time received, and a footer saying this is the node's own unverified self-report.Fields the node omitted read "Not reported" (never a fabricated zero / 1970). Hashes and the address are tap-to-copy.
Nothing is automatic: no request is sent until the user taps the row; Refresh (toolbar) / Try again ask again. The row is disabled with the reason if the aggregation doesn't know the node's DAPI address. An unreachable node shows "Couldn't reach the evonode" with the transport error and Try again (~20 s — the SDK bounds the single-node probe to 10 s connect / 15 s request / one retry).
Architecture:
EvonodeStatusViewModelowns the SDK call (SDK.getEvonodeStatus, blocking FFI run off the main actor) and builds the sections;EvonodeStatusScreenonly renders.MasternodeDetailRow/MasternodeCopyRowpromoted to internal and reused (no copy).Depends on dashpay/platform#4461 (FFI
dash_sdk_evonode_get_status,platform_http_portin the masternode aggregation, SwiftEvonodeStatus/platformDAPIAddress). Build against that branch's xcframework until it merges intov4.2-dev.Screenshots
Test plan
dashpaysimulator build green against av4.2-dev+ platform#4461 xcframework.🤖 Generated with Claude Code
Summary by CodeRabbit