Skip to content

docs: clarify ProTx platform address RPC help#7375

Open
thepastaclaw wants to merge 2 commits into
dashpay:developfrom
thepastaclaw:fix-protx-netinfo-help
Open

docs: clarify ProTx platform address RPC help#7375
thepastaclaw wants to merge 2 commits into
dashpay:developfrom
thepastaclaw:fix-protx-netinfo-help

Conversation

@thepastaclaw

Copy link
Copy Markdown

Issue being fixed or feature implemented

Fixes #7370.

protx register_evo and protx update_service_evo accepted two different platform address formats depending on the ProTx net-info version, but the RPC help only described the Extended-address array form. When a legacy MnNetInfo / version-2 ProTx rejected "ADDR:PORT" or array input for platformP2PAddrs / platformHTTPSAddrs, the error only said the version supported ports, without showing the expected shape.

What was done?

  • Clarified the shared RPC help for coreP2PAddrs, platformP2PAddrs, platformHTTPSAddrs, and update variants to explain legacy MnNetInfo/version-2 bare-port input versus Extended addresses (ExtNetInfo) "ADDR:PORT" array input.
  • Reworded the legacy platform-field rejection to explicitly say the current ProTx version expects a bare port number and that address arrays require an Extended-addresses ProTx.
  • Used field-appropriate examples in the error text: 26656 for Platform P2P and 443 for Platform HTTPS.
  • Updated rpc_netinfo.py expectations so the clearer messages are covered, including the HTTPS example-port case caught during review.

How Has This Been Tested?

Tested on macOS arm64 in the fix-protx-netinfo-help worktree.

  • make -j8 src/dashd
  • test/functional/rpc_netinfo.py
  • code-review dashpay/dash upstream/develop fix-protx-netinfo-help "Fix issue #7370 by clarifying protx register/update platform address help and legacy v2 error messages" → ship

Breaking Changes

None. This changes RPC help/error text and matching functional-test expectations only; parsing behavior is unchanged.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

The RPC help for `protx register_evo` / `update_service_evo` (and the
register_fund_evo / register_prepare_evo variants) documented
`coreP2PAddrs`, `platformP2PAddrs`, and `platformHTTPSAddrs` only as
`["ADDR:PORT"]` arrays, but a legacy MnNetInfo / version-2 ProTx
accepts a bare port for the platform fields (the IP is inherited from
the core address) and only a single entry for the core field. Users
following the help would hit a terse `ProTx version only supports
ports` error with no example of what was actually accepted.

Update the help strings to call out the legacy vs. Extended addresses
(ExtNetInfo) format, and reword the rejection in `ProcessNetInfoPlatform`
to show an example port and point at Extended addresses for the array
form. Update the matching functional-test expectations and pin the full
new error string in one assertion to prevent regression of the hint.

Fixes dashpay#7370
@thepastaclaw

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

Copy link
Copy Markdown

This pull request has conflicts, please rebase.

@github-actions

Copy link
Copy Markdown

✅ No Merge Conflicts Detected

This PR currently has no conflicts with other open PRs.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ec5055c3-e556-4bb9-a4d3-36100817d98c

📥 Commits

Reviewing files that changed from the base of the PR and between c3c1d35 and a1ae591.

📒 Files selected for processing (1)
  • test/functional/rpc_netinfo.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/functional/rpc_netinfo.py

Walkthrough

The change updates legacy ProTx platform address validation messages and related RPC help text. ProcessNetInfoPlatform now returns a more specific RPC_INVALID_PARAMETER message with an example port number and an explicit bare-port/ExtNetInfo distinction. GetRpcArg() help strings for coreP2PAddrs, platformP2PAddrs, platformP2PAddrs_update, platformHTTPSAddrs, and platformHTTPSAddrs_update were updated to match. Functional tests in test_validation_legacy were revised to expect the new wording.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the main change: clarifying ProTx RPC help for platform addresses.
Description check ✅ Passed The description is directly about the same RPC help and error-text changes in this patch.
Linked Issues check ✅ Passed The changes match #7370 by clarifying version-dependent address formats and improving legacy error messages.
Out of Scope Changes check ✅ Passed The patch stays within documentation, error text, and matching test updates; no unrelated changes are evident.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/functional/rpc_netinfo.py`:
- Around line 275-278: The error message validation in the first register_mn
call on line 276 is missing the "Invalid param for platformP2PAddrs," prefix
that the validator actually returns. Additionally, the second register_mn call
on line 278 contains an outdated truncated error message text. Update both error
message strings in these two register_mn calls to match the complete and current
validator error messages, ensuring that the first one includes the "Invalid
param for platformP2PAddrs," prefix and the second one uses the full validator
message text instead of the truncated version.
- Around line 284-293: The error message expectations in all four register_mn
function calls need to be updated to match the new error message format. The
current error messages only contain the old prefix text, but they should be
updated to include the new example-port and ExtNetInfo wording that is now
emitted by ProcessNetInfoPlatform. Update each of the four error message strings
(passed as the last argument to each register_mn call) to include the additional
new wording that ProcessNetInfoPlatform now generates for invalid array-wrapped
port parameters in platformP2PAddrs and platformHTTPSAddrs.
- Around line 294-304: The test assertions for the empty-core and
partial-platform registration cases in the register_mn calls are using outdated
error message formats. Update all error message strings in the register_mn
method calls within this test section to use the full updated error message
format that includes the bare-port example (e.g., "Invalid param for
platformP2PAddrs, this ProTx version only accepts a bare port number"), ensuring
they match the current validator output being checked in the test.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8f06aaf0-59e9-4cbf-987c-c263d5c0fc9f

📥 Commits

Reviewing files that changed from the base of the PR and between a59ad9e and c3c1d35.

📒 Files selected for processing (3)
  • src/rpc/evo.cpp
  • src/rpc/evo_util.cpp
  • test/functional/rpc_netinfo.py

Comment thread test/functional/rpc_netinfo.py Outdated
Comment thread test/functional/rpc_netinfo.py
Comment thread test/functional/rpc_netinfo.py Outdated
@thepastaclaw

Copy link
Copy Markdown
Author

CI note: the failing linux64_multiprocess-test / Test source job failed in feature_asset_locks.py, while this PR only touches ProTx RPC help/error text and rpc_netinfo.py expectations. The neighboring non-multiprocess linux64-test / Test source job passed, including this PR’s functional-test surface. I’m treating this as unrelated CI noise rather than a blocker for the draft changes.

CodeRabbit flagged three sets of expected error strings in
test_validation_legacy as out of date with the updated
ProcessNetInfoPlatform output:

- The first legacy P2P rejection was missing the
  "Invalid param for platformP2PAddrs," prefix.
- The array-wrapped port and empty-core/partial-platform cases
  still matched only the old truncated text and did not exercise
  the new "(e.g. 26656|443); the \"ADDR:PORT\" / address-array
  form requires an Extended addresses (ExtNetInfo) ProTx" wording.

Update all nine affected assertions so the substring match covers
the full validator message that ProcessNetInfoPlatform now emits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thepastaclaw

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@thepastaclaw

Copy link
Copy Markdown
Author

CI note after a1ae5912: the new red check_merge job is the same Dash workflow quirk as on the earlier run, not a branch conflict. The log fast-forwards the PR head cleanly onto develop first:

Updating a59ad9e8b..a1ae59124
Fast-forward
...
Switched to branch 'master'
fatal: Not possible to fast-forward, aborting.

So the failure comes from the workflow's later master <- base_branch fast-forward step, after the PR/develop merge check has already succeeded. predict_conflicts is green on the current head.

@thepastaclaw

Copy link
Copy Markdown
Author

Addressed the three CodeRabbit rpc_netinfo.py findings in a1ae591244:

  • added the missing Invalid param for platformP2PAddrs, prefix on the first legacy P2P rejection;
  • expanded the array-wrapped port expectations to the full bare-port + ExtNetInfo message;
  • expanded the empty-core/partial-platform bare-port expectations while leaving the separate cannot be empty if other fields populated checks unchanged.

Validation: python3 -m py_compile test/functional/rpc_netinfo.py; also verified the expected strings against ProcessNetInfoPlatform in src/rpc/evo_util.cpp.

@thepastaclaw thepastaclaw marked this pull request as ready for review June 25, 2026 03:33
@thepastaclaw

thepastaclaw commented Jun 25, 2026

Copy link
Copy Markdown
Author

✅ Review complete (commit a1ae591)

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Code Review

Documentation/error-text clarification PR for ProTx platform address RPC help and the legacy MnNetInfo rejection message. New wording correctly reflects underlying behavior (CanStorePlatform()-gated path, single-entry CORE_P2P MnNetInfo) and test expectations are updated consistently. No correctness, security, or consensus concerns. Two minor process/docs suggestions remain.

💬 2 nitpick(s)

2 additional finding(s) omitted (not in diff).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant