I am trying to create an unsigned transaction in a wallet that contains a 3 of 7 public key descriptor.
Expected behavior
To be able to send half a UTXO and bitcoin core to handle the change address generation
Actual behavior
Instead, I get this error on clicking “create unsigned”. “Transaction needs a change address, but we can’t generate it. Please call keypoolrefill first.”
To reproduce
To create descriptor
- Create a standard wallet using bitcoin core
- Run “getnewaddress” to generate an address
- Run “dumpprivkey” using the address previously generated to get a WIF key
- XOR the WIF key with 256 “1"s to create a unique key(not to add security or randomness)
- Create a new standard wallet and run “sethdseed” with the modified WIF key
- Dump the second wallet to get the xpriv
- Repeat steps 2-5 to generate 7 xprivs
- Using the xprivs create the 3 of 7 descriptor example below wsh(multi(3,‘xpriv1’/,‘xpriv2’/,‘xpriv3’/,‘xpriv4’/,‘xpriv5’/,‘xpriv6’/,‘xpriv7’/*)) Remove ’ from the above string.
- In the first wallet Run “getdescriptorinfo” to both generate the checksum for the xpriv descriptor and the xpub descriptor itself
To reproduce error
- Create a descriptor wallet with disabled private keys
- Import the public key descriptor with “importdescriptors” example bellow importdescriptors ‘[{ “desc”:“wsh(multi(3,‘xpriv1’/,‘xpriv2’/,‘xpriv3’/,‘xpriv4’/,‘xpriv5’/,‘xpriv6’/,‘xpriv7’/*))#‘checksum’”, “timestamp”: “now”, “active”: true}]’ Remove ’ from the above string.
- Click “Create new receiving address” in the bitcoin core UI
- Send a small amount to the address
- In the Send tab enter a recipient and then attempt to send half of the original amount sent to the address.
- You should get an error “Transaction needs a change address, but we can’t generate it. Please call keypoolrefill first.”
System info I am using ubuntu 20 with bitcoin core 0.21.0 rc3