Skip to content

feat(sdk)!: a DashPay profile update can set or remove its payment addresses - #5970

Merged
QuantumExplorer merged 1 commit into
v5.1-devfrom
claude/sdk-profile-payment-addresses
Nov 17, 2026
Merged

QuantumExplorer merged 1 commit into
v5.1-devfrom
claude/sdk-profile-payment-addresses

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Basic explanation

What this does: The Rust SDK can now set, replace or remove the three payment addresses a DashPay profile may publish: a Core address, a Platform address and a private (shielded) address.

Value: The DashPay contract has had these profile fields since protocol version 14, but the SDK's profile helper could not write them. Anything that wants to publish an address on a profile, starting with the wallet, needs this first.

Risks: Low. A profile update that names no address leaves the published ones alone, so existing callers behave as before. Code that builds ProfileFields with a full struct literal must add the new fields or ..Default::default().

Issue being fixed or feature implemented

Sdk::create_profile and Sdk::update_profile take a ProfileFields, which had no way to carry corePaymentAddress, platformPaymentAddress or shieldedAddress. Those properties are in DashPay contract v2 (protocol version 14) and v3 (protocol version 15).

Taken from #5288, which carries the same change together with the wallet, storage and host work that builds on it.

What was done?

  • PaymentAddressUpdate: Keep (the default), Set(bytes) or Remove, exported from dash_sdk::platform::dashpay.
  • ProfileFields gains core_payment_address, platform_payment_address and shielded_address, each a PaymentAddressUpdate.
  • ProfileFields::overlay writes a Set address, removes a Remove one and leaves a Keep one as the existing document has it.
  • The SDK sends the bytes as given. Platform enforces their length; decoding them is the caller's check.
  • The wallet's profile update names no address, so it keeps whatever the profile publishes.

Example, an update that only renames the profile:

before: could not carry an address at all
after : display name changes, corePaymentAddress, platformPaymentAddress and shieldedAddress stay as published

and one that sets shielded_address: Set(..) and core_payment_address: Remove replaces the first, drops the second and keeps the third.

How Has This Been Tested?

New tests in rs-sdk, dashpay/profile.rs: each address is kept, replaced or removed on its own, and an update that names none keeps all three; removing an address on create leaves it out.

Run locally:

  • cargo test -p dash-sdk --features mocks --lib dashpay::profile (10 passed)
  • cargo clippy -p dash-sdk --features mocks --all-targets: no warnings
  • cargo check of platform-wallet (--features shielded --tests), platform-wallet-ffi, wasm-sdk and dash-sdk-cxx

Not tested: a profile write against a network.

Breaking Changes

No consensus change.

Rust source compatibility: dash_sdk's ProfileFields gains three fields, so code that builds it with a full struct literal must set them or add ..Default::default() (the default keeps the published addresses).

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 · 447c9ae

  • Bots — thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Reviewer requests paused — your 5 review slots are occupied; this PR is excluded from reviewers' queues. Required approvals still count without a slot.
  • Build running
  • Approvals
    • rs-platform-wallet (packages/rs-platform-wallet/src/wallet/identity/network/profile.rs) — HashEngineering or ZocoLini or llbartekll or romchornyi
    • rust-sdk (packages/rs-sdk/src/platform/dashpay/mod.rs, packages/rs-sdk/src/platform/dashpay/profile.rs) — lklimek 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.

…dresses

The DashPay contract gives a profile three payment addresses since
protocol version 14 (corePaymentAddress, platformPaymentAddress,
shieldedAddress), and ProfileFields could not carry them.

PaymentAddressUpdate is Keep, Set or Remove, with Keep the default, so
an update that names no address leaves the published ones alone. The
SDK sends the bytes as given; Platform enforces their length.

The wallet's profile update names no address and keeps them.

Taken from #5288.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9da740b and 447c9ae.

Files selected for processing: 3

  • packages/rs-platform-wallet/src/wallet/identity/network/profile.rs
  • packages/rs-sdk/src/platform/dashpay/mod.rs
  • packages/rs-sdk/src/platform/dashpay/profile.rs
  • 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 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

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 17, 2026
@thepastaclaw

thepastaclaw commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 447c9ae) · triage: normal

@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 SDK change correctly adds Keep/Set/Remove semantics for all three DashPay payment-address properties, preserves unspecified properties during replacement, and keeps existing wallet writes non-destructive through the default Keep behavior. No in-scope correctness, architecture, consensus, or code-quality findings were identified. CI has no failures on this head; the workspace and JS checks were still queued at the captured time.

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 9: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 10: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a contained SDK behavior change involving profile document field overlay and address serialization, but it changes user-visible state and warrants more than a trivial or low-effort review.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Second Phase-2 pass: on this first full review every Phase-2 reviewer also ran a second, independent time, and the verifier weighed both sets
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer
Out-of-scope follow-up suggestions (1)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • Wallet profile read/cache drops payment addresses — The wallet parser in packages/rs-platform-wallet/src/wallet/identity/network/profile.rs only copies display name, public message, avatar URL, and avatar hashes into DashPayProfile. Consequently, a profile containing only corePaymentAddress, platformPaymentAddress, or shieldedAddress is cached as absent, and profiles with those fields cannot expose them through wallet/FFI reads. This predates the SDK write enablement and does not make the new SDK set/remove path incorrect, so it should be handled in the wallet/storage/host follow-up rather than blocking this SDK PR.
    • Follow-up: Address this in the #5288 follow-up by adding the three payment-address fields to DashPayProfile, the wallet cache parsers and persistence model, and the FFI views.

@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 17, 2026
@QuantumExplorer
QuantumExplorer merged commit f1be678 into v5.1-dev Nov 17, 2026
26 of 27 checks passed
@QuantumExplorer
QuantumExplorer deleted the claude/sdk-profile-payment-addresses branch November 17, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants