Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: x3m on June 13, 2020, 10:40:15 PM



Title: createwallet "disableprivatekeys"
Post by: x3m on June 13, 2020, 10:40:15 PM
The purpose of this feature as explained here: https://github.com/bitcoin/bitcoin/pull/9662 (https://github.com/bitcoin/bitcoin/pull/9662) should be to ensure no mix between hot and cold keys but honestly I don't understand the use case.
What I've used instead, is the watch-only deterministic wallet created using a Master Public Key as explained here: https://bitcoinelectrum.com/creating-a-watch-only-wallet/ (https://bitcoinelectrum.com/creating-a-watch-only-wallet/).

Can anyone explain how to use createwallet "disableprivatekeys" together with fundrawtransaction?


Title: Re: createwallet "disableprivatekeys"
Post by: achow101 on June 14, 2020, 01:45:15 AM
The description in the PR isn't saying that disableprivatekeys wallets should be used with fundrawtransaction, but rather that they can be because fundrawtransaction allows setting a custom change address.


Title: Re: createwallet "disableprivatekeys"
Post by: x3m on June 14, 2020, 08:07:58 AM
The description in the PR isn't saying that disableprivatekeys wallets should be used with fundrawtransaction, but rather that they can be because fundrawtransaction allows setting a custom change address.

Could you please make an example on how to manage creating transactions on a cold wallet and broadcasting through a hot wallet created with disableprivatekeys set?


Title: Re: createwallet "disableprivatekeys"
Post by: achow101 on June 14, 2020, 05:31:40 PM
A workflow using Hardware wallets is described here: https://github.com/bitcoin-core/HWI/blob/master/docs/bitcoin-core-usage.md. Note that this uses another feature that allows for pubkeys to be imported into the keypool of wallets with private keys disabled.


Title: Re: createwallet "disableprivatekeys"
Post by: HCP on June 15, 2020, 03:18:46 AM
A workflow using Hardware wallets is described here: https://github.com/bitcoin-core/HWI/blob/master/docs/bitcoin-core-usage.md.
@x3m, I can confirm that this works... I've just tested this workflow using Bitcoin Core (TestNet) 0.20.0 and a Ledger Nano S. I installed the "HWI" Python module (and libusb) and was able to successfully create a "watching only" wallet within Bitcoin Core. I funded it with 0.1 tBTC and was then able to create the PSBT, finalise it and send it using HWI, my Ledger Nano S and bitcoin-cli.

I did get an "Unverified Inputs" warning on the Ledger device when signing the transaction, but I was able to "ignore" that error and continue.

@achow101, is that warning possibly due to the fact that the transaction that created the UTXO I was spending only had 1 confirmation when I was attempting to sign the transaction? ???



Title: Re: createwallet "disableprivatekeys"
Post by: achow101 on June 15, 2020, 04:44:20 AM
I did get an "Unverified Inputs" warning on the Ledger device when signing the transaction, but I was able to "ignore" that error and continue.

@achow101, is that warning possibly due to the fact that the transaction that created the UTXO I was spending only had 1 confirmation when I was attempting to sign the transaction? ???
No, that's because of a recent update to the Ledger Bitcoin App that requires software to provide more UTXO data. There's a PR to fix that (along with a bunch of other related issues in other devices).