Skip to content

fix: Validate prevouts in get_psbt_input#232

Merged
ValuedMammal merged 2 commits intobitcoindevkit:masterfrom
evanlinjin:fix/50-validate-prevouts-for-get-psbt-input
May 28, 2025
Merged

fix: Validate prevouts in get_psbt_input#232
ValuedMammal merged 2 commits intobitcoindevkit:masterfrom
evanlinjin:fix/50-validate-prevouts-for-get-psbt-input

Conversation

@evanlinjin
Copy link
Copy Markdown
Member

@evanlinjin evanlinjin commented May 16, 2025

Fixes #50
Fixes #51
Replaces bitcoindevkit/bdk#1911
Replaces bitcoindevkit/bdk#1913

Description

We should check the bounds of the prev txs.

Changelog notice

Fixed:
    - Wallet::get_psbt_input method now checks bounds when fetching prevout
    - Wallet::build_fee_bump method now checks bounds when fetching prevout

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

Bugfixes:

* [ ] I've added tests to reproduce the issue which are now passing

  • I'm linking the issue being fixed by this PR

@coveralls
Copy link
Copy Markdown

coveralls commented May 16, 2025

Pull Request Test Coverage Report for Build 15289953340

Details

  • 15 of 19 (78.95%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.008%) to 85.336%

Changes Missing Coverage Covered Lines Changed/Added Lines %
wallet/src/wallet/error.rs 0 2 0.0%
wallet/src/wallet/mod.rs 15 17 88.24%
Totals Coverage Status
Change from base Build 15166368710: -0.008%
Covered Lines: 7280
Relevant Lines: 8531

💛 - Coveralls

@ValuedMammal ValuedMammal added this to the Wallet 2.0.0 milestone May 20, 2025
@ValuedMammal ValuedMammal moved this to Needs Review in BDK Wallet May 20, 2025
@notmandatory
Copy link
Copy Markdown
Member

@evanlinjin please give this one a rebase to fix CI.
@ValuedMammal can I add you as the reviewer for this one?

@ValuedMammal
Copy link
Copy Markdown
Collaborator

Yes I can take a look.

@ValuedMammal ValuedMammal self-requested a review May 21, 2025 21:35
ItshMoh and others added 2 commits May 27, 2025 21:15
Co-authored-by: 志宇 <hello@evanlinjin.me>
Added `InvalidOutputIndex` variant to `BuildFeeBumpError`
@notmandatory notmandatory force-pushed the fix/50-validate-prevouts-for-get-psbt-input branch from 99d83fe to 6ffc874 Compare May 28, 2025 02:16
@notmandatory
Copy link
Copy Markdown
Member

I force-pushed a rebase on current master.

Copy link
Copy Markdown
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 6ffc874

@ValuedMammal ValuedMammal merged commit f0840c0 into bitcoindevkit:master May 28, 2025
20 checks passed
@github-project-automation github-project-automation bot moved this from Needs Review to Done in BDK Wallet May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Validate UTXO data for build_fee_bump Validate previous tx outputs for get_psbt_input

5 participants