mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:54:42 +00:00
Import PSBT shows “Ready to broadcast” without accounting for transaction identity or current node state #1071
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml#1071
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Import PSBT treats a complete PSBT with a known fee as ready for broadcast without checking whether the finalized transaction is already known, currently acceptable to the node, or a replacement for another transaction.
These states need different review outcomes. Currently, rejected transactions can receive the same Ready state as valid payments, and an accepted replacement is presented without identifying the transaction it replaces.
Inputs already spent by another transaction
The node’s
testmempoolacceptrejects A withmissing-inputs. Clicking Broadcast does not broadcast it; the recorded GUI run remains on review without a visible explanation.In a separate run, leave B unconfirmed and give A a sufficiently higher fee to satisfy replacement policy. Importing A produces the same Ready review. Broadcasting succeeds and replaces B, but neither review nor completion identifies B or explains that this payment replaces it.
The replacement itself is valid under node policy. The missing behavior is disclosure and confirmation of that consequence.
Other non-broadcastable transactions
The same Ready state appears for:
nLockTime500 blocks ahead and an input sequence that makes the locktime effective. The node rejects it withnon-final.min relay fee not met.In the recorded runs, clicking Broadcast did not submit either transaction successfully, and the review did not show the applicable reason.
Already-known transactions
The GUI opens a new Ready review instead of recognizing the transaction. The native-SegWit control correctly opens the already-known dialog.
The lookup uses the unsigned transaction’s hash. For legacy and wrapped-SegWit inputs, the finalized scriptSig changes the txid, so the lookup misses the transaction already recorded by the wallet.
Expected behavior and responsibility
QML should use the finalized transaction identity and current node results to distinguish:
Recheck the result when broadcasting and display any failure that occurs after review.
Core’s
AnalyzePSBTis not a current mempool-admission check. Core correctly rejects the non-admissible examples and accepts the eligible replacement. The defect is in QML’s review/broadcast integration and its already-known lookup.Spent-input, replacement, locktime, and minimum-fee cases were reproduced on the merged build at
6e54a48ab571. The legacy/wrapped-SegWit already-known cases were reproduced atd567e3eb2497. All used macOS arm64, Qt 6.9.0, and disposable regtest fixtures.