Repository navigation
Conversation
bdk_wallet 3.2.1 verifies the signatures of an unconfirmed transaction's inputs that spend the wallet's own outputs. When they fail it drops the transaction on sync and refuses to fee-bump it. Our manifest admits 3.2.1 and we don't commit a lock file, so CI builds against it. Several wallet tests inserted such transactions with empty witnesses, which the wallet no longer took in. Nine tests failed. Four more kept passing without the transaction they are about: three expect a fee bump to be refused with the error an unknown transaction also yields, and one expects an evicted fee bump to stay out of the wallet. Sign those inputs in the test helpers, and have the helpers check that the wallet took the transaction in, so that a transaction dropped again fails the test that inserts it. Only tests change. The wallet's outputs are all P2WPKH, whose signatures verify without the previous outputs of a transaction's other inputs, and the transactions a chain source relays are signed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
I've assigned @tnull as a reviewer! |
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.
bdk_wallet3.2.1 (released 2026-11-23) verifies the signatures of an unconfirmed transaction's inputs that spend the wallet's own outputs. When they fail,Wallet::apply_updateandWallet::apply_unconfirmed_txsdrop the transaction andWallet::build_fee_bumprefuses it. We ask forbdk_wallet = "3.2.0"and don't commit a lock file, so every fresh CI run now builds against 3.2.1.Several wallet tests insert spends of wallet coins with empty witnesses, which the wallet no longer takes in. On main with 3.2.1:
a_sync_evicting_a_pending_send_returns_it_to_the_walletan_evicted_fee_bump_returns_over_the_transaction_it_replacedan_evicted_send_does_not_return_over_other_transactionsan_on_chain_fee_bump_passes_a_transaction_that_funds_no_channelan_on_chain_fee_bump_refuses_a_transaction_whose_facts_cannot_be_readan_on_chain_fee_bump_refuses_while_the_channel_state_cannot_be_consultedbump_fee_rbf_keeps_replaced_txid_mappedconfirmed_unlocked_amount_does_not_depend_on_seeing_a_spliceevicted_sends_return_along_with_the_sends_they_spendInvalidPaymentId, which is also what a transaction missing from the wallet yields:an_on_chain_fee_bump_refuses_a_transaction_a_channel_reportedan_on_chain_fee_bump_refuses_a_transaction_spending_a_coin_the_wallet_does_not_ownan_on_chain_fee_bump_refuses_a_transaction_whose_output_belongs_to_a_channelan_evicted_fee_bump_does_not_return_over_a_confirmed_transactionexpects the bump to stay out of the wallet, where it never was.This PR signs those inputs in the test helpers. The helpers also assert that the wallet took the transaction in, so that a transaction dropped again fails the test that inserts it.
Production code
Only tests change. The wallet's descriptors are BIP84, so every input it owns is P2WPKH, and its signature verifies from that input's own previous output. The case the release notes warn about (a taproot input next to foreign inputs, for which Electrum users should sync with
fetch_prev_txouts = true) does not arise, and our Electrum sync already passestrue. Transactions a chain source relays are signed, and the ones the node inserts itself are signed first.Testing
cargo test --libwith 3.2.1 in the lock file: 478 passed, 9 failed on main; 487 passed with this PR.cargo test --libwith 3.2.0: 487 passed with this PR.OnchainPaymentTracker#1240 addsa_late_funding_classification_tracks_the_channels, which fails on 3.2.1 for the same reason. With this commit on top of its head3d522b8b, all 495 lib tests pass.🤖 Generated with Claude Code