What’s the deal with "Enable PSBT controls" in the GUI?

11 replies 377 views
DarkSeedSenior Member
Posts: 209 · Reputation: 1423
#1Jan 8, 2022, 04:20 PM
So there's this option in the GUI called "Enable PSBT controls". Can anyone share screenshots showing where to find it? With Coin Control, it’s pretty straightforward. You get this nice new socket where you can click and it shows a list of addresses that have funds. You just pick the ones you want to use. I'm looking to use Coin Control for selecting my addresses, and then make the PSBT file based on that choice. I’ve got a setup with two laptops: one’s air-gapped and the other has the synced node. Just trying to understand what this option actually does.
6 Reply Quote Share
coin_sigmaLegendary
Posts: 1275 · Reputation: 5553
#2Jan 8, 2022, 06:22 PM
PSBT means "Partially Signed Bitcoin Transaction" I think PSBT is enabled by default on watch-only wallets. Check the image below for how to create an unsigned PSBT. Just in case you are using an old version and you can't find this feature, I suggest try enabling it in the options>wallet check image below. But I believe for the latest Bitcoin Core, this manual PSBT control is enabled by default, so you can't find it under that tab if you're trying to look for that. In your offline device Once you create an unsigned PSBT from an online device, transfer it to an offline device and load the PSBT to sign it. You should be able to find  "Load PSBT from file..." under the menu and then file. Image below for reference. It is for creating offline transaction and like I said it is enabled by default on latest version.
6 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#3Jan 8, 2022, 11:12 PM
The options in BitMaxz' screenshots will show regardless if that option is enabled or not. As for the send tab, "Create Unsigned" will display in place of "Send" if the wallet is watch-only regardless of the option. For the PSBT in the 'File' menu, those are available regardless of the option. The true menu that'll trigger with the option enabled is the "Create Unsigned" button during send confirmation. Normally, a wallet can only send after the 3sec timeout, but with the option enabled, there'll be a "Create Unsigned Button" there as well. Thus, there's a "PSBT control" instead of direct send. Here're the screenshots; without "Enable PSBT Controls": with "Enable PSBT Controls": Reference: github.com/bitcoinknots/bitcoin/blob/29.x-knots/src/qt/sendcoinsdialog.cpp#L352
2 Reply Quote Share
DarkSeedSenior Member
Posts: 209 · Reputation: 1423
#4Jan 10, 2022, 02:58 PM
Yeah, this is what I was looking for. It was confusing since I didn't see any changes, so I assume this was hidden in some further steps. So basically, you choose the addresses you want to use normally with Coin Control, but simply click on "Create Unsigned" instead of "Send" so you get this .psbt file, then you load this file in the offline computer which hosts the private keys so you can fully sign it by loading it with the GUI (File - > Load PSBT) so this is now fully signed, and then again you back to the online computer to broadcast it. Here is where im not sure how do you do it at least in the GUI. Looks like there's some command called finalizepsbt but im not sure about that. I mean I guess there is some way to finish it in the GUI.
3 Reply Quote Share
coin_sigmaLegendary
Posts: 1275 · Reputation: 5553
#5Jan 11, 2022, 11:12 AM
A little suggestion: if you are looking for an easier one and don't need to download or sync blocks, you can try Electrum as your watch-only wallet. The PSBT should be cross-compatible with Bitcoin Core, and it should be straightforward to broadcast your transaction. But if you want to keep using Bitcoin Core, you would need "finalizepsbt" to make it raw hex and broadcast it to any of this list or load it as text on Electrum and then broadcast.
1 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#6Jan 11, 2022, 04:10 PM
You load the non-finalized but signed PSBT via the same menu: "File->Load PSBT from..." and there should be a broadcast button there. BTW, since you're using it on a watch-only wallet, there's no reason to enable the option since "Send" would be available anyways. For finalizepsbt, it should be done in the offline wallet so the PSBT can be fully signed and encoded into serialized raw transaction. But it can't be broadcasted in the GUI, so use sendrawtransaction if you do that.
5 Reply Quote Share
DarkSeedSenior Member
Posts: 209 · Reputation: 1423
#7Jan 11, 2022, 09:10 PM
Right so just to summarize this whole workflow in a step by step list 1) Go on the watch-only wallet and with Coin Control pick addresses as needed. 2) Click on "Create unsigned" and save .psbt file (should you also save the raw hash thing created there? not sure what the name of this string is, I mean just in case the psbt file became corrupted or something) 3) Get this file into the airgap laptop and sign with the "File->Load PSBT from file..." GUI menu by clicking on "Sign Tx" 4) Save this now signed and move it back into watch-only laptop wallet 5) Load the file with "File->Load PSBT from file..." and click on "Broadcast Tx" Observations: I was a bit confused at how the exact same filename and file extension describes both an actual particially signed bitcoin tx and also a signed bitcoin tx. Im not sure if it would make sense to have a .sbt extension just to not confuse people or at least add a "signed-" prefix when saving the signed tx .psbt file, so you do not accidentally overwrite or just confuse files. Only if you are dealing with the "copy to clickboard" method you see the difference, or if you pay attention to the file size since the signed .psbt file will always be bigger, but on face value it saves the exact same filename with same file extension, I think auto signed-prefix could be easy and useful there. Also, it appears the filename format saves as: "[changeAddress]-[amount]-[destinationAddress]-[amount]", just to confirm this is correct, it appears it is. After testing this a few times in testnet, overall, very useful feature, compared to back then manually crafting raw transactions, seems to work well. You are always a bit paranoid and want to do everything on the shell, but that also adds a risk that you enter the wrong decimal point or copypaste the wrong address or something, so I think I will use this. There's also some paranoid concern about the new wallet format vs the older one in terms of how keys are dealt with. But overall, it is an interesting and useful workflow there. This is what Bitcoin devs should work on, not facilitate spam on the network.
4 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#8Jan 11, 2022, 09:50 PM
Overwriting the unsigned PSBT file shouldn't be an issue since it doesn't have any purpose after saving the signed PSBT file. For the name, it's actually a good idea to automatically rename it with "signed", not an absolute necessity though. But you can always rename it before saving if it's confusing. (the name is editable when saving) The thing is, this convenient HD cold-storage + HD watch-only workflow isn't possible with the old wallet type, at least based from your statement of how "keys are dealt with". The new wallet type is using the standard BIP44, BIP49, BIP84 and BIP86 derivation paths which opens a way to create a watch-only wallet version with its extended public key at 'account_index' because the lower levels aren't "hardened". The old wallet type on the other hand, was using full "hardened" derivation up to its address' prvKeys, so to create a watch-only wallet, each of the public keys have to be imported to the online wallet since those can only be derived from its parent extended private key, not xpub. Of course, it's just derivation path so it can be implemented in the legacy wallet but it wont be able to handle complex scripts such as TapRoot.
5 Reply Quote Share
DarkSeedSenior Member
Posts: 209 · Reputation: 1423
#9Jan 12, 2022, 01:27 AM
Does the PSBT carry any compromising date on any of its stages? what about if you save the output of "copy to clipboard" on a txt file? specially when signed Well they should keep old wallet format even if it's more cumbersome to deal with. Im still not convincing migrating is a good idea. The typical argument is something like "but you need to leak X address for the derivation to be a problem". Well it's still an higher risk vs having to leak each private address per public address separated. QED. As far as Taproot, who cares tbh. base58 is all you need. Whenever a quantum boogey man attack is actually realistic you can think of other address types. And still by then whoever is holding keys on old wallets should feel safer.
3 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#10Jan 12, 2022, 01:53 AM
Aside from the transaction's Locktime, there's no defined date/time in the PSBT. The "save to file" and "save to clipboard" options just differ on the encoding but the PSBT are the same. The former is in binary format and the latter is in base64.
0 Reply Quote Share
DarkSeedSenior Member
Posts: 209 · Reputation: 1423
#11Jan 12, 2022, 06:55 AM
I meant to say data, in general, that could be used by an attacker if they got the file or the base in raw format in some txt file (metadata leakage, derivation paths, etc etc)
3 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#12Jan 12, 2022, 08:35 AM
Ah, that explains it, I was wondering what you meant by "compromising date". Okay so: No, but it's worth mentioning that the xpub in the PSBT can be used together with any of its child private key to compromise its xprv pair. But realistically, it's already available in the watch-only wallet so it doesn't add a security threat as long a you wont compromise any private key from the Cold-storage wallet. If you want to see the contents of a PSBT, check its BIPs: BIP174: Partially Signed Bitcoin Transaction FormatBIP370: PSBT Version 2BIP375: Sending Silent Payments with PSBTs
3 Reply Quote Share

Related topics