Save transaction writes a version 2 PSBT that Bitcoin Core 31 cannot read #1112

Open
opened 2026-11-10 22:28:21 +00:00 by jarolrod · 0 comments
jarolrod commented 2026-11-10 22:28:21 +00:00 (Migrated from github.com)

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:

  1. In any wallet, enter a payment, open Review and click Save transaction.
  2. Run decodepsbt on the file with the bundled Core. It reports "psbt_version": 2.
  3. Run decodepsbt, analyzepsbt, finalizepsbt or walletprocesspsbt on 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:

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 d567e3eb2497 in 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 qt6 at eed1f426fcb6 (Core 44901d8f64cb), 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.

**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: 1. In any wallet, enter a payment, open Review and click **Save transaction**. 2. Run `decodepsbt` on the file with the bundled Core. It reports `"psbt_version": 2`. 3. Run `decodepsbt`, `analyzepsbt`, `finalizepsbt` or `walletprocesspsbt` on 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: - [bitcoin/bitcoin#21283](https://github.com/bitcoin/bitcoin/pull/21283) added BIP 370 support and made version 2 the default. The RPCs that create a PSBT take `psbt_version` with a default of 2 ([`createpsbt`](https://github.com/bitcoin/bitcoin/blob/44901d8f64cb617714707bd025ecd83f108353c2/src/rpc/rawtransaction.cpp#L1732), [`converttopsbt`](https://github.com/bitcoin/bitcoin/blob/44901d8f64cb617714707bd025ecd83f108353c2/src/rpc/rawtransaction.cpp#L1782), [`walletcreatefundedpsbt`](https://github.com/bitcoin/bitcoin/blob/44901d8f64cb617714707bd025ecd83f108353c2/src/wallet/rpc/spend.cpp#L1785)). [`joinpsbts`](https://github.com/bitcoin/bitcoin/blob/44901d8f64cb617714707bd025ecd83f108353c2/src/rpc/rawtransaction.cpp#L1916) accepts version 0 only. - [bitcoin/bitcoin#36518](https://github.com/bitcoin/bitcoin/issues/36518) asked whether the compatibility break was intentional. The answer was [yes](https://github.com/bitcoin/bitcoin/issues/36518#issuecomment-6159644075). The [case made for the GUI](https://github.com/bitcoin/bitcoin/issues/36518#issuecomment-6170748528) was that GUI users gain nothing from version 2 today, nodes before v32 cannot load it, some signers may not accept it, and `joinpsbts` cannot take it. - [bitcoin/bitcoin#36539](https://github.com/bitcoin/bitcoin/pull/36539), merged November 4, set the Widgets GUI's "Create Unsigned" and fee-bump PSBTs to version 0 ([sendcoinsdialog.cpp](https://github.com/bitcoin/bitcoin/blob/44901d8f64cb617714707bd025ecd83f108353c2/src/qt/sendcoinsdialog.cpp#L488-L490), [walletmodel.cpp](https://github.com/bitcoin/bitcoin/blob/44901d8f64cb617714707bd025ecd83f108353c2/src/qt/walletmodel.cpp#L504)). A version checkbox was drafted first and [dropped](https://github.com/bitcoin/bitcoin/pull/36539#issuecomment-6205749329) so that the backport would add no new strings. Reviewers [accepted version 0 as the simpler choice for now](https://github.com/bitcoin/bitcoin/pull/36539#issuecomment-6231604993), with the RPC available for version 2. - The external-signer hand-off [stays version 2](https://github.com/bitcoin/bitcoin/blob/44901d8f64cb617714707bd025ecd83f108353c2/src/qt/sendcoinsdialog.cpp#L504-L507) at a [reviewer's request](https://github.com/bitcoin/bitcoin/pull/36539#issuecomment-6282081305), with a [release note](https://github.com/bitcoin/bitcoin/blob/44901d8f64cb617714707bd025ecd83f108353c2/doc/release-notes-hwi-minver.md) that HWI 2.1.0 or later is required. - Earlier, a [review comment on #21283](https://github.com/bitcoin/bitcoin/pull/21283#issuecomment-2611925575) suggested keeping the GUI on version 0 and switching to version 2 later where a feature such as silent payments needs it. - Core v32.0 and v32.1 shipped with the Widgets GUI writing version 2. The fix is milestoned for 32.2 and its backport is in [bitcoin/bitcoin#36727](https://github.com/bitcoin/bitcoin/pull/36727), which is still open. v31.2 still reads version 0 only. **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](https://github.com/bitcoin-core/gui-qml/blob/eed1f426fcb64daa61b004590335a03afe376274/qml/models/walletqmlmodel.cpp#L2760) and [#L2773](https://github.com/bitcoin-core/gui-qml/blob/eed1f426fcb64daa61b004590335a03afe376274/qml/models/walletqmlmodel.cpp#L2773). The behavior is not new in #1056. The previous Core pin defaulted to version 2, and files saved by `d567e3eb2497` in 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 `qt6` at `eed1f426fcb6` (Core `44901d8f64cb`), 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.
Sign in to join this conversation.
No description provided.