Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bech32m unavailable for encrypted wallets #571

Closed
hebasto opened this issue Mar 29, 2022 · 7 comments · Fixed by bitcoin/bitcoin#24711
Closed

Bech32m unavailable for encrypted wallets #571

hebasto opened this issue Mar 29, 2022 · 7 comments · Fixed by bitcoin/bitcoin#24711
Labels
Bug Something isn't working Wallet
Milestone

Comments

@hebasto
Copy link
Member

hebasto commented Mar 29, 2022

#459 introduced an ability to chose Bech32m address type in the GUI.

On master and on v23.0rc2 this option is unavailable for a just created encrypted wallet, at least on Ubuntu 22.04.

For macOS a slightly different behavior reported.

See details:

@hebasto hebasto added the Bug Something isn't working label Mar 29, 2022
@hebasto hebasto added this to the 23.0 milestone Mar 29, 2022
@hebasto hebasto added the Wallet label Mar 29, 2022
@hebasto
Copy link
Member Author

hebasto commented Mar 29, 2022

cc @Sjors @promag @achow101

@Sjors
Copy link
Member

Sjors commented Mar 29, 2022

I'm able to reproduce. For some reason in the GUI we're not producing a taproot descriptor when encryption is enabled (see listdescriptors). This does not happen for wallets created via the createwallet RPC.

Thanks for catching that @eriknylund.

@Sjors
Copy link
Member

Sjors commented Mar 29, 2022

Uh no never mind, it does generate the descriptor. I selected the wrong wallet in the console. Pfew. So it's a pure UI issue, investigating...

Restarting Bitcoin Core does add Bech32m to the menu. Maybe some reference to the receive screen got borked in the passphrase dialogs? See #509.

@eriknylund if you're not seeing Bech32m after a restart, are you sure you checked the "Descriptor" box (it's selected by default)? You can run getwalletinfo in the Console (make sure to select the correct wallet in the console too) and look if you see "descriptors": true. Only descriptor wallets have Taproot support.

@eriknylund
Copy link
Contributor

Uh no never mind, it does generate the descriptor. I selected the wrong wallet in the console. Pfew. So it's a pure UI issue, investigating...

Restarting Bitcoin Core does add Bech32m to the menu. Maybe some reference to the receive screen got borked in the passphrase dialogs? See #509.

@eriknylund if you're not seeing Bech32m after a restart, are you sure you checked the "Descriptor" box (it's selected by default)? You can run getwalletinfo in the Console (make sure to select the correct wallet in the console too) and look if you see "descriptors": true. Only descriptor wallets have Taproot support.

Something sure looks borked. I cannot even generate receive addresses on the other three types, the Create new receiving address button is disabled.
image
This is the output from the Console:

{
  "walletname": "Mainnet Wallet 1 Encrypted",
  "walletversion": 169900,
  "format": "sqlite",
  "balance": 0.00000000,
  "unconfirmed_balance": 0.00000000,
  "immature_balance": 0.00000000,
  "txcount": 0,
  "keypoolsize": 0,
  "keypoolsize_hd_internal": 0,
  "unlocked_until": 0,
  "paytxfee": 0.00000000,
  "private_keys_enabled": true,
  "avoid_reuse": false,
  "scanning": false,
  "descriptors": true,
  "external_signer": false
}

@Sjors
Copy link
Member

Sjors commented Mar 29, 2022

@eriknylund this last screenshot is from after a restart?

@eriknylund
Copy link
Contributor

eriknylund commented Mar 29, 2022

@eriknylund this last screenshot is from after a restart?

@Sjors Correct. However, this could also be the wallet that I started seeing problems with as I continued testing. See comment bitcoin/bitcoin#24501 (comment) I tried creating a new encrypted wallet and there the receive address button is enabled, yet I still only have three options, missing Taproot.

getwalletinfo
{
  "walletname": "Mainnet Wallet 2 Encrypted",
  "walletversion": 169900,
  "format": "sqlite",
  "balance": 0.00000000,
  "unconfirmed_balance": 0.00000000,
  "immature_balance": 0.00000000,
  "txcount": 0,
  "keypoolsize": 3999,
  "keypoolsize_hd_internal": 4000,
  "unlocked_until": 0,
  "paytxfee": 0.00000000,
  "private_keys_enabled": true,
  "avoid_reuse": false,
  "scanning": false,
  "descriptors": true,
  "external_signer": false
}

@hebasto
Copy link
Member Author

hebasto commented Mar 29, 2022

A fixed has been suggested in bitcoin/bitcoin#24711.

sidhujag pushed a commit to syscoin/syscoin that referenced this issue Apr 3, 2022
… encrypted wallets

0c12f01 wallet: Postpone NotifyWalletLoaded() for encrypted wallets (Hennadii Stepanov)
aeee419 wallet, refactor: Add wallet::NotifyWalletLoaded() function (Hennadii Stepanov)

Pull request description:

  Fixes bitcoin-core/gui#571.

  `CWallet::Create()` notifies about wallet loading too early, that results the notification goes before `DescriptorScriptPubKeyMan`s were created and added to an encrypted wallet.

  And `interfaces::Wallet::taprootEnabled()` in https://github.com/bitcoin/bitcoin/blob/ecf692b466860f44334a1da967fc2559da913bec/src/qt/receivecoinsdialog.cpp#L100-L102 erroneously returns `false` for just created encrypted descriptor wallets.

ACKs for top commit:
  Sjors:
    utACK 0c12f01
  achow101:
    ACK 0c12f01

Tree-SHA512: 2694bacd12748cd5f6c95d9d3bf8bcf4502ee67fecd8d057f33236b72069c61401b08f49deb013fc71c3f1e51ae16bdfd827ddcbc2a083d7044589be7a78982e
@bitcoin-core bitcoin-core locked and limited conversation to collaborators Mar 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Wallet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@Sjors @eriknylund @hebasto and others