Skip to content

feat(masternodes): Request status — ask an evonode for its DAPI status on demand - #1043

Merged
QuantumExplorer merged 1 commit into
developfrom
claude/evonode-status-request-3868ee
Aug 24, 2026
Merged

feat(masternodes): Request status — ask an evonode for its DAPI status on demand#1043
QuantumExplorer merged 1 commit into
developfrom
claude/evonode-status-request-3868ee

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Aug 23, 2026

Copy link
Copy Markdown
Member

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 getStatus to that node alone and shows everything it answered, grouped as the node groups it:

  • Request — the DAPI address asked (https://<service host>:<platform HTTP port>), time received, and a footer saying this is the node's own unverified self-report.
  • Software — DAPI / Drive / Tenderdash versions.
  • Protocol versions — Tenderdash P2P + block, Drive current / latest / next epoch.
  • Node — node id, proTxHash (tap-to-copy), and an Identity check: "Matches this evonode" / "Differs from this evonode" (the IP now serves another node) / "Not reported".
  • Chain — catching up, latest / earliest / max-peer heights, core chain-locked height, latest/earliest block + app hashes.
  • Network — chain id, peers, listening.
  • State sync — all eight counters.
  • Time — node clock, latest block, genesis, epoch.

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: EvonodeStatusViewModel owns the SDK call (SDK.getEvonodeStatus, blocking FFI run off the main actor) and builds the sections; EvonodeStatusScreen only renders. MasternodeDetailRow / MasternodeCopyRow promoted to internal and reused (no copy).

Depends on dashpay/platform#4461 (FFI dash_sdk_evonode_get_status, platform_http_port in the masternode aggregation, Swift EvonodeStatus / platformDAPIAddress). Build against that branch's xcframework until it merges into v4.2-dev.

Screenshots

Evonode detail — Request status row Node status (top) Node section + identity check
detail top node
Chain Network + State sync Time
chain network time
Asking… Unreachable node
loading failed

Test plan

  • dashpay simulator build green against a v4.2-dev + platform#4461 xcframework.
  • Simulator (mainnet wallet), evonode detail → Request status → real mainnet evonode (31.220.91.60:443) answered in < 1 s; every section populated as in the screenshots; identity check matched; Refresh keeps the previous report visible while re-asking.
  • Unreachable address (203.0.113.9:443): "Couldn't reach the evonode" with the transport detail and Try again after ~20 s (was ~2.5 min before the SDK connect timeout).
  • Rust: FFI JSON / error-code unit tests + an ignored live mainnet probe; aggregation latest-wins for the port. Swift SDK: decoding, time-unit accessors, DAPI address (IPv4 / IPv6) — 6/6.
  • Owner's mainnet phone: Request status on a real owned evonode (identity check should read "Matches this evonode").

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added evonode status details accessible from masternode information.
    • Displays DAPI, software, protocol, node, chain, network, synchronization, and timing information.
    • Added automatic status loading, manual refresh, retry, and copyable values.
    • Shows clear loading, error, and unavailable-status states.
  • Localization
    • Added English text for status requests, results, errors, and related metrics.

…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>
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e061a851-a697-4aaa-9b47-3902f0022350

📥 Commits

Reviewing files that changed from the base of the PR and between 6bd8338 and 820dc2d.

📒 Files selected for processing (5)
  • DashWallet.xcodeproj/project.pbxproj
  • DashWallet/Sources/UI/Menu/Tools/Evonode Status/EvonodeStatusScreen.swift
  • DashWallet/Sources/UI/Menu/Tools/Evonode Status/EvonodeStatusViewModel.swift
  • DashWallet/Sources/UI/Menu/Tools/MasternodesScreen.swift
  • DashWallet/en.lproj/Localizable.strings

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Added 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.

Changes

Evonode status reporting

Layer / File(s) Summary
Status data retrieval and formatting
DashWallet/Sources/UI/Menu/Tools/Evonode Status/EvonodeStatusViewModel.swift
The view model requests status data, maps errors, compares node identity, groups response fields, and formats values for display.
Status screen and masternode entry point
DashWallet/Sources/UI/Menu/Tools/Evonode Status/EvonodeStatusScreen.swift, DashWallet/Sources/UI/Menu/Tools/MasternodesScreen.swift, DashWallet/en.lproj/Localizable.strings
The UI adds loading, failure, refresh, retry, grouped status rows, conditional navigation, reusable detail rows, and localized strings.
Project target wiring
DashWallet.xcodeproj/project.pbxproj
The new status files are added to the project navigator and both target source phases.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 820dc

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
Loading

Suggested reviewers: llbartekll, romchornyi

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the on-demand DAPI status request feature added to the evonode detail flow.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/evonode-status-request-3868ee

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@QuantumExplorer

Copy link
Copy Markdown
Member Author

Reviewed

@QuantumExplorer
QuantumExplorer merged commit 84dcc7b into develop Aug 24, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant