Skip to content

fix(rpc): describe Platform addresses consistently in validateaddress and getaddressinfo - #7578

Merged
PastaPastaPasta merged 1 commit into
dashpay:developfrom
PastaPastaPasta:fix-platform-address-rpc-consistency
Aug 11, 2026
Merged

fix(rpc): describe Platform addresses consistently in validateaddress and getaddressinfo#7578
PastaPastaPasta merged 1 commit into
dashpay:developfrom
PastaPastaPasta:fix-platform-address-rpc-consistency

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

Follow-up to #7294. Built on top of that PR's branch; only the last commit is new here — please review just fix(rpc): describe Platform addresses consistently in validateaddress and getaddressinfo.

With #7294, the two address-introspection RPCs tell inconsistent stories about the same DIP-18 Platform address: validateaddress deliberately omits scriptPubKey ("a Platform address has no layer-1 output script"), while getaddressinfo describes the address against the credit output script an asset lock would carry for it, including scriptPubKey, isscript and ismine — and ismine: true there is easy to misread as Platform identity ownership.

What was done?

  • validateaddress now also reports the credit output script (scriptPubKey) and isscript for a valid DIP-18 Platform address, matching getaddressinfo, with help text spelling out the semantics.
  • getaddressinfo help now clarifies that ismine/solvable refer to the derived credit output script, not to ownership of a Platform identity.

How Has This Been Tested?

Updated rpc_invalid_address_message.py: check_platform now asserts the exact scriptPubKey and isscript for the DIP-18 P2PKH and P2SH test vectors (the P2SH script hash constant is decoded from the DIP-0018 test vector), alongside the existing normalization and error-field checks.

Breaking Changes

validateaddress output for DIP-18 Platform addresses gains scriptPubKey and isscript fields (previously absent). No behavior change for regular addresses.

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)

@knstknst 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.

utACK ab38b87

@knstknst added this to the 24 milestone Aug 11, 2026
@PastaPastaPasta
PastaPastaPasta marked this pull request as ready for review August 11, 2026 15:53
@thepastaclaw

thepastaclaw commented Aug 11, 2026

Copy link
Copy Markdown

✅ Final review complete — no blockers (commit e8d0420)

Comment threadsrc/rpc/output_script.cpp Outdated
"\nReturn information about the given Dash address.\n",
"\nReturn information about the given Dash address.\n"
"A DIP-18 Dash Platform address is described against the credit output script an asset\n"
"lock would carry for it, the same way getaddressinfo describes it.\n",

@knstknstAug 11, 2026

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.

should remove disclaimer about getaddressinfo ; it seems irrelevant

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Done — dropped the getaddressinfo reference from the help text; it now just states the credit-output-script semantics on its own.


🤖 Posted autonomously by Claude on behalf of pasta.

@coderabbitai

coderabbitaiBot commented Aug 11, 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 Plus

Run ID: 3f198495-88fa-4789-a1e7-33b2d1237af0

📥 Commits

Reviewing files that changed from the base of the PR and between ab38b87 and e8d0420.

📒 Files selected for processing (1)
  • src/rpc/output_script.cpp

Walkthrough

Platform address handling now generates and returns the corresponding credit-output script from validateaddress. When the script produces an L1 destination, the response includes its address details. RPC help text documents this behavior for validateaddress and getaddressinfo. Functional tests now verify expected P2PKH and P2SH scripts and their isscript values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
participant Client
participant validateaddress
participant PlatformAddress
participant RPCResponse
Client->>validateaddress: Submit Platform address
validateaddress->>PlatformAddress: Build credit-output script
PlatformAddress->>RPCResponse: Return scriptPubKey and isscript
PlatformAddress->>RPCResponse: Add L1 address details when available
validateaddress-->>Client: Return address information
Loading

Possibly related PRs

  • dashpay/dash#7492: Adds the related validateaddress Platform-address handling and tests extended by this pull request.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly and concisely identifies the consistent Platform-address documentation changes in both RPCs.
Description check✅ PassedThe description directly explains the Platform-address behavior changes, testing updates, semantics, and compatibility impact.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitaicoderabbitaiBot 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.

🧹 Nitpick comments (1)
src/rpc/output_script.cpp (1)

30-32: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep the help text self-contained.

Remove the getaddressinfo cross-reference. The validateaddress help should describe the credit-output behavior directly. Cross-RPC wording can become stale when the other RPC help changes.

Proposed wording
- "lock would carry for it, the same way getaddressinfo describes it.\n",+ "lock would carry for it.\n",
🤖 Prompt for 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.
In `@src/rpc/output_script.cpp` around lines 30 - 32, Update the validateaddress
help text in the RPC description to remove the getaddressinfo cross-reference,
while retaining a self-contained direct description of the DIP-18 credit-output
behavior for the supplied Dash address.
🤖 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.
Nitpick comments:
In `@src/rpc/output_script.cpp`:
- Around line 30-32: Update the validateaddress help text in the RPC description
to remove the getaddressinfo cross-reference, while retaining a self-contained
direct description of the DIP-18 credit-output behavior for the supplied Dash
address.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 802e9070-c507-4deb-bc82-f6edd312cbaf

📥 Commits

Reviewing files that changed from the base of the PR and between 2a28739 and ab38b87.

📒 Files selected for processing (3)
  • src/rpc/output_script.cpp
  • src/wallet/rpc/addresses.cpp
  • test/functional/rpc_invalid_address_message.py

@thepastaclawthepastaclaw 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.

Final validation — Codex/Sol only (Phase 2 disabled)

The exact-head diff consistently reports the derived DIP-18 credit output script and destination type from validateaddress, clarifies the corresponding wallet RPC semantics, and adds functional coverage for both P2PKH and P2SH Platform addresses. No in-scope correctness, documentation, or test-coverage defects were identified.
Source: reviewer backends gpt-5.6-sol (general and dash-core-commit-history); final verifier backend gpt-5.6-sol. Orchestration-only: openclaw-agent/cliproxy/gpt-5.6-sol (not reviewer evidence).

Validated zero-blocker Codex/Sol precheck evidence was promoted to final because Phase 2 (Sonnet/Opus) is temporarily disabled. This is Codex/Sol-only final validation, not Codex + Sonnet/Opus coverage.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed), gpt-5.6-sol — dash-core-commit-history (completed)
  • Verifier: gpt-5.6-sol — verifier
  • Sonnet/Opus: not run (Phase 2 disabled — temporary Codex/Sol-only final)
  • Secondary pass: disabled (temporary_phase2_sonnet_disable)

… and getaddressinfo
validateaddress deliberately omitted scriptPubKey for DIP-18 Platform addresses while getaddressinfo reported the derived credit output script along with ismine and isscript, so the two RPCs told inconsistent stories about the same address. Align them: validateaddress now also reports the credit output script an asset lock would carry for the address (plus isscript), with help text spelling out the semantics, and getaddressinfo's help clarifies that ismine/solvable refer to that script rather than to Platform identity ownership.
@PastaPastaPasta
PastaPastaPastaforce-pushed the fix-platform-address-rpc-consistency branch from ab38b87 to e8d0420CompareAugust 11, 2026 16:59

@thepastaclawthepastaclaw 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.

Final validation — Codex/Sol only (Phase 2 disabled)

At exact head e8d0420, the implementation consistently derives the DIP-18 credit output script in validateaddress, reports the corresponding destination type, clarifies wallet-field semantics, and tests exact P2PKH and P2SH results. No in-scope correctness, documentation, or test-coverage defects were identified.
Source: reviewer backends gpt-5.6-sol (general) and gpt-5.6-sol (dash-core-commit-history); final verifier backend gpt-5.6-sol. Orchestration-only: openclaw-agent/cliproxy/gpt-5.6-sol (not reviewer evidence).

Validated zero-blocker Codex/Sol precheck evidence was promoted to final because Phase 2 (Sonnet/Opus) is temporarily disabled. This is Codex/Sol-only final validation, not Codex + Sonnet/Opus coverage.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed), gpt-5.6-sol — dash-core-commit-history (completed)
  • Verifier: gpt-5.6-sol — verifier
  • Sonnet/Opus: not run (Phase 2 disabled — temporary Codex/Sol-only final)
  • Secondary pass: disabled (temporary_phase2_sonnet_disable)

@knstknst 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.

utACK e8d0420

@PastaPastaPasta
PastaPastaPasta merged commit 4defcfb into dashpay:developAug 11, 2026
47 of 48 checks passed
@thephezthephez added the RPC Some notable changes to RPC params/behaviour/descriptions label Aug 12, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RPCSome notable changes to RPC params/behaviour/descriptions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@PastaPastaPasta@thepastaclaw@knst@thephez