Skip to content

fix(dashmate): send the port check from the node's own IP - #6407

Merged
shumkov merged 1 commit into
dashpay:v5.1-devfrom
hobby-eng:fix/dashmate-port-check-source-ip
Dec 2, 2026
Merged

shumkov merged 1 commit into
dashpay:v5.1-devfrom
hobby-eng:fix/dashmate-port-check-source-ip

Conversation

@hobby-eng

@hobby-eng hobby-eng commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Fixes #5976.

dashmate status core, dashmate status platform and dashmate doctor report INVALID_IP for a node whose externalIp is not the host's primary address. mnowatch.org compares validateIp with the address the request comes from, and the request leaves from the default route's source address, so every node on an additional IP looks unreachable even when its ports are open.

What was done?

providers.mnowatch.checkPortStatus now sets localAddress to the IP it validates when that address belongs to a non-loopback IPv4 interface of the host. In every other case (behind NAT, on a cloud VM with a private address, inside the helper container, or with no IP given) nothing is bound and the request leaves as before, so binding cannot fail with EADDRNOTAVAIL.

Loopback and IPv6 addresses are skipped: the request is forced to IPv4 (#2100), and a request sent from a loopback address cannot reach mnowatch.org.

How Has This Been Tested?

  • Four new unit tests in test/unit/status/providers.spec.js cover a node IP on the host, an IP not on the host, a loopback IP and no IP. providers.spec.js passes, 36 tests, and the first new test fails without the change.
  • eslint is clean on both changed files.
  • On a host running dashmate 5.1.1 with nodes on several public IPv4 addresses: before the change, nodes on additional addresses got INVALID_IP; with the change, the Core P2P port, the gateway port and the Tenderdash P2P port of every node report OPEN. The node on the primary address reports OPEN before and after.

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • My Rust, FFI, WASM, Swift or Kotlin changes follow the coding conventions
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request
  • If I added or changed a system contract's document schemas, I checked the contract viewer link posted on this pull request

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · 8bad001

  • Bots — thepastaclaw ✓
  • Self-review — posted; again after any push
  • Build green
  • Approvals
    • dashmate (packages/dashmate/src/status/providers.js, packages/dashmate/test/unit/status/providers.spec.js) — ktechmidas or shumkov

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

mnowatch.org answers INVALID_IP when the request comes from an address
other than validateIp. On a host with several IPv4 addresses the request
left from the primary one, so nodes on additional IPs looked unreachable.
Bind the request to the node's IP when that address is on a non-loopback
IPv4 interface of the host; otherwise leave it as before.

Fixes dashpay#5976

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot added this to the v5.1.0 milestone Nov 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Nov 30, 2026
@thepastaclaw

thepastaclaw commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 8bad001) · triage: low

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

The change binds mnowatch port-check requests to the configured external IPv4 address only when that address is assigned to a non-loopback interface on the host, while preserving the existing unbound behavior for NAT, container, loopback, IPv6, and missing-IP cases. The relevant unit tests cover each branch. CodeRabbit and other completed checks passed; the PastaClaw review and PR Hygiene checks remain in progress.

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: architecture-layering); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.2-sol (effort low) — This is a small, well-contained dashmate networking change that conditionally binds an outbound IPv4 request to a host interface, with focused unit tests and no critical protocol, funds, cryptography, or storage impact.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 99% left, weekly 99% left; passed over gemini-3.8-flash-high (antigravity quota lookup failed)
  • Fresh verifier: gpt-6.2-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.2-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.2-sol — architecture-layering (completed, effort medium); agent phase2-reviewer

@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 30, 2026
@hobby-eng

Copy link
Copy Markdown
Contributor Author

/self-reviewed

@github-actions

Copy link
Copy Markdown
Contributor

Ready for review — dashmate: ktechmidas or shumkov.
Full checklist in the description.

@github-actions github-actions Bot added ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human. and removed waiting-self-review Waiting for the author to post /self-reviewed labels Nov 30, 2026
@shumkov
shumkov merged commit 956ee2f into dashpay:v5.1-dev Dec 2, 2026
28 of 29 checks passed
@shumkov shumkov mentioned this pull request Dec 2, 2026
3 of 13 tasks
@hobby-eng
hobby-eng deleted the fix/dashmate-port-check-source-ip branch December 2, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants