fix(wallet): added the validation of previous tx outputs for get_psbt_input#1911
Closed
ItshMoh wants to merge 4 commits intobitcoindevkit:masterfrom
Closed
fix(wallet): added the validation of previous tx outputs for get_psbt_input#1911ItshMoh wants to merge 4 commits intobitcoindevkit:masterfrom
ItshMoh wants to merge 4 commits intobitcoindevkit:masterfrom
Conversation
Collaborator
|
Note that adding the enum variant would constitute a major semver change, but there should be a way to reuse an error from rust-miniscript, for example |
Author
hey @ValuedMammal As per your suggestion i have updated the error variant . I have found IndexOutOfBounds error variant in UtxoUpdateError i have used that. |
Author
|
Hey @ValuedMammal updated as you have suggested. |
6 tasks
Member
|
Hey @ItshMoh, this PR needs to be closed and moved to the new bdk_wallet repo. Here's how:
|
4 tasks
Member
|
Replaced by bitcoindevkit/bdk_wallet#232 |
ValuedMammal
added a commit
to bitcoindevkit/bdk_wallet
that referenced
this pull request
May 28, 2025
6ffc874 fix!: Check prevout bounds in `Wallet::build_fee_bump` (志宇) 00a57cf fix: Validate prevouts in `get_psbt_input` (ItshMoh) Pull request description: Fixes #50 Fixes #51 Replaces bitcoindevkit/bdk#1911 Replaces bitcoindevkit/bdk#1913 ### Description We should check the bounds of the prev txs. ### Changelog notice ```md 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: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### Bugfixes: ~~* [ ] I've added tests to reproduce the issue which are now passing~~ * [x] I'm linking the issue being fixed by this PR ACKs for top commit: ValuedMammal: ACK 6ffc874 Tree-SHA512: f2df49b5bc827583251b1dc8b965a038a239a7fa321cc30504d2f1862523be4e132066643c1e1309122d19eefd65ddbac4c714724899b662c6a879df71bd3752
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
It is fixing the issue bitcoindevkit/bdk_wallet#50 . This PR is adding validation of previous tx outputs. we would be checking the size of the prev_tx.output vector.
Notes to the reviewers
Here i have checked the size of the prev_tx.output vector. I have also added an error type of "InvalidVoutIndex"
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingBugfixes: