Author

Topic: Bitcoin Core PSBT creates huge to be signed file (Read 71 times)

full member
Activity: 193
Merit: 121
Just digging around
Just posting here, may helps someone:
(answer from Core user forum)
>>>
This is expected behavior. Bitcoin Core is not including a lot of addresses in the PSBT. It is including an entire previous transaction which happens to be enormous. Due to the way that signing works currently, many airgapped/offline/hardware signers need the entire previous transaction for each input in order to verify the correctness of amounts before they sign the transaction. As such, PSBT includes entire previous transactions. Sometimes this results in very large PSBTs when previous transactions are themselves large. In this case, the previous transaction for the input in this transaction is very large - it is 131953 bytes. You can see this in the non_witness_utxo field of the input.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
Why does Core include a lot/all addresses in a PSBT, but only the needed one at the beginning?

If you run that through bitcoin-cli decodepsbt, do you have several entries inside the "input", "output" or "unknown" fields?

Code:
{
 "tx": {
...
  },
  "unknown": {
     <--- check how big this field is
  },
  "inputs": [
    {
    <--- check how big this field is
    }
  ],
  "outputs": [
    {
     <--- check how big this field is
    }
  ]
}

If the new transaction is particularly large, as in has a lot of inputs/outputs, maybe that "leaked" over to the corresponding inputs and outputs fields (not vin/vout).
full member
Activity: 193
Merit: 121
Just digging around
Hi,

I am trying to set-up a ColdCard to work air-gapped with Bitcoin Core (via SD card). Latest Bitcoin Core 0.21.0 and latest ColdCard firmware used.

- I create a watch-only non-descriptor wallet and I execute the importmulti command created by ColdCard (2x5000 addresses), OK
- I receive the correct addresses from Core which are watch only, OK

- I do a two simle (1in 1 out) test transactions (main-net) when all looks good. Core exports the PSBT ~600 bytes. Coldcard signs it and creates the final TXN ~400 bytes. All good.

BUT:
Later nothing changed (I mean Core closed and reopened few hours later, that's all). New TX arrives. Trying to do the same spend and PSBT export is now ~176 Kilobytes. Takes minutes while ColdCard digs through all of that and finally signs the one used and produces a ~400 bytes TXN.

Nothing fancy is going on, no multisig, no nothing. Why does Core include a lot/all addresses in a PSBT, but only the needed one at the beginning?

Any help would be appreciated as I seem to be stuck.

Thanks
Gabor
Jump to: