Skip to content

fix(send): reject eligible inputs without private keys - #63

Merged
nymius merged 2 commits into
bitcoindevkit:masterfrom
reez:eligible
Jul 23, 2026
Merged

fix(send): reject eligible inputs without private keys#63
nymius merged 2 commits into
bitcoindevkit:masterfrom
reez:eligible

Conversation

@reez

@reez reez commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

Looking through derive_sp I noticed it can continue when the private key for an eligible input is missing as long as it finds a key for another input. That gives the sender an incomplete input key sum which won’t match what the receiver calculates, so this PR returns KeyError instead. (Inputs that aren’t eligible for silent payments are still skipped)

Notes to the reviewers

Added coverage for a missing key among multiple eligible inputs and for skipping an ineligible input.

Changelog notice

Return an error when an eligible silent payment input key is missing.

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@reez
reez marked this pull request as ready for review July 20, 2026 20:02
Comment thread silentpayments/src/send/psbt/mod.rs Outdated

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

cACK 913b997

Thanks for reviewing the code! Good find.

Comment thread silentpayments/src/send/psbt/tests.rs
Comment thread silentpayments/src/send/psbt/tests.rs

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

ACK 91698ff

@nymius
nymius merged commit 536e984 into bitcoindevkit:master Jul 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants