Skip to content

fix(tx_builder)!: Remove include_output_redeem_witness_script#392

Merged
ValuedMammal merged 2 commits intobitcoindevkit:masterfrom
Dmenec:fix/deprecate-include-output-redeem-witness-script
Mar 4, 2026
Merged

fix(tx_builder)!: Remove include_output_redeem_witness_script#392
ValuedMammal merged 2 commits intobitcoindevkit:masterfrom
Dmenec:fix/deprecate-include-output-redeem-witness-script

Conversation

@Dmenec
Copy link
Contributor

@Dmenec Dmenec commented Mar 3, 2026

Description

Closes #236

Removes TxBuilder::include_output_redeem_witness_script as it currently has no effect.

Originally, this method controlled an explicit block in the transaction creation pipeline that derived the descriptor and populated psbt::Output::witness_script and psbt::Output::redeem_script for outputs requiring it (e.g. sh(wsh(...))). That logic was guarded behind this flag, making it opt-in.

At some point during refactoring, this responsibility was delegated to miniscript.

Checklists

New Features:

  • I've added a test to verify that the redeem and witness scritps are still being populated even when the flag is not used.

Workflow:

  • Traced all references to include_output_redeem_witness_script in the codebase.
  • Checked if the existing test test_include_output_redeem_witness_script passes with or without calling the method, since the scripts are populated automatically
  • Found the original commit that introduced the method, which showed the conditional block that no longer exists in the current code

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran just fmt, just check and just test before pushing

Note on deprecation policy

The contribution guidelines recommend deprecating APIs before removal. However, given the proximity of the Wallet 3.0.0 release, it might be reasonable to include this change in that milestone.

In any case I'll be happy to adjust it if the maintainers prefer following the standard deprectation flow.

@luisschwab luisschwab moved this to Needs Review in BDK Wallet Mar 3, 2026
@ValuedMammal ValuedMammal added this to the Wallet 3.0.0 milestone Mar 3, 2026
@ValuedMammal ValuedMammal added the api A breaking API change label Mar 3, 2026
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.15%. Comparing base (c422104) to head (8ca39a7).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #392      +/-   ##
==========================================
- Coverage   79.17%   79.15%   -0.02%     
==========================================
  Files          24       24              
  Lines        5311     5307       -4     
  Branches      242      242              
==========================================
- Hits         4205     4201       -4     
  Misses       1029     1029              
  Partials       77       77              
Flag Coverage Δ
rust 79.15% <ø> (-0.02%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

@Dmenec Dmenec changed the title Fix/deprecate include output redeem witness script fix: deprecate include output redeem witness script Mar 3, 2026
@Dmenec Dmenec changed the title fix: deprecate include output redeem witness script fix: deprecate include_output_redeem_witness_script Mar 3, 2026
@Dmenec Dmenec changed the title fix: deprecate include_output_redeem_witness_script fix(wallet): deprecate include_output_redeem_witness_script Mar 3, 2026
@Dmenec Dmenec changed the title fix(wallet): deprecate include_output_redeem_witness_script fix: deprecate include_output_redeem_witness_script Mar 3, 2026
@Dmenec Dmenec changed the title fix: deprecate include_output_redeem_witness_script fix(wallet): deprecate include_output_redeem_witness_script Mar 3, 2026
Copy link
Collaborator

@ValuedMammal ValuedMammal left a comment

Choose a reason for hiding this comment

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

ACK 8ca39a7

Copy link
Contributor

@nymius nymius left a comment

Choose a reason for hiding this comment

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

ACK 8ca39a7

As per #236, the logic to handle this option doesn't exist (a no-op), we can skip the deprecation flag this time.

Copy link
Member

@luisschwab luisschwab left a comment

Choose a reason for hiding this comment

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

ACK 8ca39a7

@ValuedMammal ValuedMammal changed the title fix(wallet): deprecate include_output_redeem_witness_script fix(tx_builder)!: Remove include_output_redeem_witness_script Mar 4, 2026
@ValuedMammal ValuedMammal merged commit 491d1b6 into bitcoindevkit:master Mar 4, 2026
17 checks passed
@github-project-automation github-project-automation bot moved this from Needs Review to Done in BDK Wallet Mar 4, 2026
@ValuedMammal ValuedMammal mentioned this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api A breaking API change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Deprecate method TxBuilder::include_output_redeem_witness_script

4 participants