Skip to content

release/3.x: correct foreign prevout handling (backport #423) - #636

Merged
noahjoeris merged 2 commits into
bitcoindevkit:release/3.xfrom
noahjoeris:backport3.x/foreign-prevout
Nov 15, 2026
Merged

noahjoeris merged 2 commits into
bitcoindevkit:release/3.xfrom
noahjoeris:backport3.x/foreign-prevout

Conversation

@noahjoeris

@noahjoeris noahjoeris commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

Backport of #423 to release/3.x.

Cherry-picked from master: 5a69e46, d3447f6.

Fixes #345, fixes #556.

Changelog notice

- Fixed `build_fee_bump` panic on a legacy foreign input with no parent tx; it now returns `BuildFeeBumpError::TransactionNotFound`.
- `add_foreign_utxo` now overwrites `witness_utxo` with the prevout from `non_witness_utxo`.
- Signing now fails with `InvalidNonWitnessUtxo` when `witness_utxo` and `non_witness_utxo` disagree.

Before submitting

@noahjoeris noahjoeris added this to the Wallet 3.3.0 milestone Nov 6, 2026
@noahjoeris noahjoeris self-assigned this Nov 6, 2026
@noahjoeris
noahjoeris requested a review from a team as a code owner November 6, 2026 16:26
@github-project-automation github-project-automation Bot moved this to Triage in BDK Wallet Nov 6, 2026
@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.76%. Comparing base (fe8de33) to head (9dfc8b4).

Additional details and impacted files
@@               Coverage Diff               @@
##           release/3.x     #636      +/-   ##
===============================================
+ Coverage        81.62%   81.76%   +0.14%     
===============================================
  Files               25       25              
  Lines             6339     6355      +16     
  Branches           302      303       +1     
===============================================
+ Hits              5174     5196      +22     
+ Misses            1056     1052       -4     
+ Partials           109      107       -2     
Flag Coverage Δ
rust 81.76% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@noahjoeris noahjoeris moved this from Triage to Needs Review in BDK Wallet Nov 6, 2026
@noahjoeris noahjoeris modified the milestones: Wallet 3.3.0, Wallet 3.2.1 Nov 10, 2026

@thunderbiscuit thunderbiscuit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 9dfc8b4. This is a clean backport.

Claude pointed out to me a small nit which I'll propose here:

The changelog notice in your PR description only mentions the build_fee_bump panic, but this also changes behaviour for users: signing that used to succeed can now return InvalidNonWitnessUtxo, and a caller's witness_utxo can be silently replaced.

It might be worth adding a line, for example: "add_foreign_utxo now overwrites a provided witness_utxo with the prevout from non_witness_utxo, and sign rejects inputs where the two disagree."

@noahjoeris

Copy link
Copy Markdown
Contributor Author

Thanks, I intentionally wanted to keep this change low key. Probably not necessary tho. Will add it.

@noahjoeris
noahjoeris merged commit bd5e6db into bitcoindevkit:release/3.x Nov 15, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in BDK Wallet Nov 15, 2026
noahjoeris added a commit that referenced this pull request Nov 17, 2026
…ackport #641)

cb20372 test(wallet): sign mixed taproot and non-taproot inputs (Noah Joeris)
896224f fix(wallet): sign mixed taproot and non-taproot inputs (Noah Joeris)

Pull request description:

  ### Description

  Backport of #641 to `release/3.x`.

  Cherry-picked from #641: d01c07d, 32dd8d8.

  Depends on #636.

  ### Changelog notice

  Fixed signing of mixed taproot/non-taproot inputs.

  ### Before submitting

  - [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk_wallet/blob/master/CONTRIBUTING.md)

ACKs for top commit:
  Musab1258:
    tACK cb20372
  reez:
    ACK cb20372
  notmandatory:
    ACK cb20372

Tree-SHA512: da7488479cf3c83ab7543a01f16a440250c74c2cf9fdaf814831e8b96e523e7f1d6a99da66547c71851ded91db7849f78ef151271bf97c5f66f9b9bb5926ef87
This was referenced Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants