Skip to content

fix(key-wallet): load unparsable sent addresses as None - #1280

Merged
xdustinface merged 1 commit into
dashpay:devfrom
xdustinface:fix/lenient-output-detail-address
Nov 2, 2026
Merged

xdustinface merged 1 commit into
dashpay:devfrom
xdustinface:fix/lenient-output-detail-address

Conversation

@xdustinface

@xdustinface xdustinface commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Dash Platform persists TransactionRecords with bincode::serde, where OutputDetail.address is stored as the address display string. When a stored string no longer parses, the whole record fails to decode and the Platform wallet load aborts. This already happens for testnet and devnet witness addresses, which display with the tb prefix while Address::from_str only accepts td.

OutputDetail now decodes through StoredOutputDetail, which keeps the address as text until the role is known. On a Sent or Unspendable output an unparsable address loads as None with a warning, since a counterparty address is only informational and the full transaction stays in the record. On a Received or Change output it still fails the load, because those addresses are always our own P2PKH addresses and Platform derives UTXOs from them. Serialization and the stored encoding are unchanged.

PR Hygiene · 49fd223

  • Bots — coderabbitai skipped after its own rate limit
  • Self-review — post /self-reviewed
  • Build green
  • Approvals — you own every area touched; none needed

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.

Dash Platform persists `TransactionRecord`s with `bincode::serde`, where `OutputDetail.address` is stored as the address display string. When a stored string no longer parses, the whole record fails to decode and the Platform wallet load aborts. This already happens for testnet and devnet witness addresses, which display with the `tb` prefix while `Address::from_str` only accepts `td`.

`OutputDetail` now decodes through `StoredOutputDetail`, which keeps the address as text until the role is known. On a `Sent` or `Unspendable` output an unparsable address loads as `None` with a warning, since a counterparty address is only informational and the full transaction stays in the record. On a `Received` or `Change` output it still fails the load, because those addresses are always our own P2PKH addresses and Platform derives UTXOs from them. Serialization and the stored encoding are unchanged.
@coderabbitai

coderabbitai Bot commented Nov 1, 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 59 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 24b2977 and 49fd223.

Files selected for processing: 1
  • key-wallet/src/managed_account/transaction_record.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 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai 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 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai 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 1, 2026
@codecov

codecov Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.05%. Comparing base (3e99485) to head (49fd223).
⚠️ Report is 6 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1280      +/-   ##
==========================================
+ Coverage   80.75%   81.05%   +0.29%     
==========================================
  Files         291      291              
  Lines       77899    78057     +158     
==========================================
+ Hits        62911    63270     +359     
+ Misses      14988    14787     -201     
Flag Coverage Δ
core 78.48% <ø> (ø)
ffi 60.42% <ø> (+2.22%) ⬆️
rpc 52.05% <ø> (ø)
spv 93.73% <ø> (+0.01%) ⬆️
wallet 83.05% <100.00%> (+0.13%) ⬆️
Files with missing lines Coverage Δ
...y-wallet/src/managed_account/transaction_record.rs 100.00% <100.00%> (ø)

... and 26 files with indirect coverage changes

@github-actions

github-actions Bot commented Nov 1, 2026

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 bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. and removed waiting-bots Waiting for the review bots to report on this head labels Nov 1, 2026
@xdustinface

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

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.

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

Approving: together with #400, this solves the issue I raised.

This only fixes this one case, though. Platform persists our structs directly with bincode, and TransactionRecord includes both key-wallet and dash types, so any field we add, remove or change can break loading existing records, and every refactor here has to keep that in mind.

The same thing already happened with the Core v24 update: I had to modify the consensus structures, which broke serialization/deserialization, so I had to implement those pipelines by hand instead of using derive as we did before.

It would be better to address that directly. Maybe Platform could persist its own structs and map them from ours, so we can change key-wallet and dash freely. This doesn't need to block this PR.

@xdustinface

Copy link
Copy Markdown
Collaborator Author

@ZocoLini I opened #5713.

@xdustinface
xdustinface merged commit 7226198 into dashpay:dev Nov 2, 2026
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. 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