Send fee preview uses a different change-output type from transaction preparation #1104

Open
opened 2026-11-10 14:45:48 +00:00 by jarolrod · 1 comment
jarolrod commented 2026-11-10 14:45:48 +00:00 (Migrated from github.com)

The Send form can size its dummy change output differently from the change output Core creates for Review. This produces an avoidable fee and total difference even with a fixed payment, one input and an unchanged fee rate.

To reproduce:

  1. Use a regtest descriptor wallet with the default bech32 address type and no -changetype override.
  2. Fund a bech32 receiving address with one confirmed 1 BTC coin, leaving it as the wallet's only spendable input.
  3. Open Send and enter a Taproot destination belonging to another wallet, with a fixed amount of 0.5 BTC.
  4. Leave the standard fee preset selected, which uses 1 sat/vB in this regtest setup. Wait for the preview to finish.
  5. Note the fee and total, then open Review Transaction and export the PSBT.

The form shows a fee of 153 sats and a total of 0.50000153 BTC. Review shows 165 sats and 0.50000165 BTC. The exported PSBT also pays a 165-sat fee, and the signed transaction is 165 vB.

The same fixture produced:

Recipient type Form fee Review and PSBT fee
Bech32 141 sats 141 sats
Taproot 153 sats 165 sats
Legacy 144 sats 147 sats
P2SH-segwit 142 sats 143 sats

The GUI's preview selector falls back to getDefaultAddressType(), then pins a dummy destination of that type. Transaction preparation lets Core select the actual change type. In the Taproot case, the preview sizes P2WPKH change while the prepared transaction uses P2TR change, accounting for the 12-vbyte difference.

Related to closed #715: use a non-persistent dummy destination whose script size follows the actual change policy. Review remains authoritative; this report concerns the known change-type mismatch rather than requiring every estimate to equal the final transaction.

Observed on qt6 at eed1f426fcb6, macOS arm64 / Qt 6.9, using the full application with isolated offscreen regtest profiles. Review, exported fees and recipient amounts were correct in all four cases. The test payments were not broadcast.

The Send form can size its dummy change output differently from the change output Core creates for Review. This produces an avoidable fee and total difference even with a fixed payment, one input and an unchanged fee rate. To reproduce: 1. Use a regtest descriptor wallet with the default bech32 address type and no `-changetype` override. 2. Fund a bech32 receiving address with one confirmed 1 BTC coin, leaving it as the wallet's only spendable input. 3. Open Send and enter a Taproot destination belonging to another wallet, with a fixed amount of 0.5 BTC. 4. Leave the standard fee preset selected, which uses 1 sat/vB in this regtest setup. Wait for the preview to finish. 5. Note the fee and total, then open Review Transaction and export the PSBT. The form shows a fee of **153 sats** and a total of **0.50000153 BTC**. Review shows **165 sats** and **0.50000165 BTC**. The exported PSBT also pays a 165-sat fee, and the signed transaction is 165 vB. The same fixture produced: | Recipient type | Form fee | Review and PSBT fee | | --- | ---: | ---: | | Bech32 | 141 sats | 141 sats | | Taproot | 153 sats | 165 sats | | Legacy | 144 sats | 147 sats | | P2SH-segwit | 142 sats | 143 sats | The GUI's [preview selector](https://github.com/bitcoin-core/gui-qml/blob/eed1f426fcb64daa61b004590335a03afe376274/qml/models/walletqmlmodel.cpp#L2166) falls back to `getDefaultAddressType()`, then [pins a dummy destination of that type](https://github.com/bitcoin-core/gui-qml/blob/eed1f426fcb64daa61b004590335a03afe376274/qml/models/walletqmlmodel.cpp#L230). Transaction preparation lets Core select the actual change type. In the Taproot case, the preview sizes P2WPKH change while the prepared transaction uses P2TR change, accounting for the 12-vbyte difference. Related to closed [#715](https://github.com/bitcoin-core/gui-qml/issues/715): use a non-persistent dummy destination whose script size follows the actual change policy. Review remains authoritative; this report concerns the known change-type mismatch rather than requiring every estimate to equal the final transaction. Observed on `qt6` at `eed1f426fcb6`, macOS arm64 / Qt 6.9, using the full application with isolated offscreen regtest profiles. Review, exported fees and recipient amounts were correct in all four cases. The test payments were not broadcast.
reez commented 2026-11-10 19:27:45 +00:00 (Migrated from github.com)

+1

Ran into the same thing on signet (sending to a Taproot address at 2 sat/vB, the Send form showed 286 sats and Review showed 310)

+1 Ran into the same thing on signet (sending to a Taproot address at 2 sat/vB, the Send form showed 286 sats and Review showed 310)
Sign in to join this conversation.
No description provided.