docs: clarify ProTx platform address RPC help#7375
Conversation
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
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
This pull request has conflicts, please rebase. |
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe change updates legacy ProTx platform address validation messages and related RPC help text. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
src/rpc/evo.cppsrc/rpc/evo_util.cpptest/functional/rpc_netinfo.py
|
CI note: the failing |
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>
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
CI note after So the failure comes from the workflow's later |
|
Addressed the three CodeRabbit
Validation: |
|
✅ Review complete (commit a1ae591) |
thepastaclaw
left a comment
There was a problem hiding this comment.
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).
Issue being fixed or feature implemented
Fixes #7370.
protx register_evoandprotx update_service_evoaccepted 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 forplatformP2PAddrs/platformHTTPSAddrs, the error only said the version supported ports, without showing the expected shape.What was done?
coreP2PAddrs,platformP2PAddrs,platformHTTPSAddrs, and update variants to explain legacy MnNetInfo/version-2 bare-port input versus Extended addresses (ExtNetInfo)"ADDR:PORT"array input.26656for Platform P2P and443for Platform HTTPS.rpc_netinfo.pyexpectations 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-helpworktree.make -j8 src/dashdtest/functional/rpc_netinfo.pycode-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"→ shipBreaking Changes
None. This changes RPC help/error text and matching functional-test expectations only; parsing behavior is unchanged.
Checklist: