mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:54:42 +00:00
Save transaction writes a version 2 PSBT that Bitcoin Core 31 cannot read #1112
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#1112
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?
Save transaction in Send Review always writes a version 2 PSBT. Bitcoin Core 31.0 rejects that file, so a cosigner or offline signer on a Core release before v32 cannot load it. The GUI reports Saved. and offers no version choice.
To reproduce:
decodepsbton the file with the bundled Core. It reports"psbt_version": 2.decodepsbt,analyzepsbt,finalizepsbtorwalletprocesspsbton the same file with Bitcoin Core 31.0.Each call in step 3 fails with error -22,
TX decode failed Unsupported version number. I got the same result for an ordinary wallet, a watch-only wallet, and an external-signer wallet saved before approval.As a control, I rebuilt the same transaction as a version 0 PSBT. Core 31.0 decoded it and signed it completely, and the bundled node accepted the result with
testmempoolaccept. Importing works in both directions: the GUI opens version 0 and version 2 files, and an imported PSBT is saved back unchanged in the version it arrived with.Upstream context
Version 2 is Core's intended default for the RPCs, and Core's own GUI has gone back to version 0 for file exports:
psbt_versionwith a default of 2 (createpsbt,converttopsbt,walletcreatefundedpsbt).joinpsbtsaccepts version 0 only.joinpsbtscannot take it.In this repository
The Widgets change is in the Core commit vendored here, but the QML export still passes 2 at both construction sites: walletqmlmodel.cpp#L2760 and #L2773.
The behavior is not new in #1056. The previous Core pin defaulted to version 2, and files saved by
d567e3eb2497in October are already version 2. #1056 is where the version became an explicit argument, because #36539 removed the constructor's default.Suggested change
Write version 0 for wallet-created drafts in Save transaction, to match the Widgets GUI, and keep saving imported PSBTs unchanged. The external-signer hand-off already matches Widgets at version 2. A version choice in the save dialog is also an option here, since the constraint that removed the checkbox upstream was the backport. No funds are at risk: the failure appears in the other party's software.
Reproduced on merged
qt6ateed1f426fcb6(Core44901d8f64cb), macOS / Qt 6.9, isolated regtest, offscreen and native. Only Core 31.0 was tested as the older reader, over RPC. File paths were supplied through the test-automation path field in place of the native file dialog.