Bech32 address not provided when creating a new receiving address #19446

issue MatthewLM opened this issue on July 4, 2020
  1. MatthewLM commented at 5:00 PM on July 4, 2020: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    Expected behavior

    <!--- What behavior did you expect? -->

    I go to the Receive tab, ensuring that "Generate native segwit (Bech32) address" is selected. I fill the label as "Test Bech32" and then click "Create new receiving address". I expect the address to be a bech32 address

    Actual behavior

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    The address is a p2pkh address.

    20200704_174715_bitcoin_no_work

    To reproduce

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    On my own wallet this is reproducible according to the steps above each time.

    System information

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    v0.20.0 from bitcoin.org/en/bitcoin-core/ (The issue was present in 0.19.0 too)

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    Linux Debian 4.19.118-2+deb10u1 (x86-64) HDD KDE plasmashell 5.14.5

    <!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

    This is using a pre-HD wallet

  2. MatthewLM added the label Bug on Jul 4, 2020
  3. sipa commented at 5:04 PM on July 4, 2020: member

    Is this a wallet created before v0.5.0?

  4. MatthewLM commented at 5:16 PM on July 4, 2020: none

    Yes, I believe the wallet was created before v0.5.0.

  5. sipa commented at 5:41 PM on July 4, 2020: member

    This is probably the result of the keys in your wallet's keypool being uncompressed. Such keys can't be used in segwit addresses.

  6. MatthewLM commented at 5:58 PM on July 4, 2020: none

    Thanks, that makes sense. I imagined that newer versions would create compressed keys even if there are unused keys in an older wallet. I suppose using -upgradewallet would resolve this issue? I'll take a look in the next few days and see if the issue is resolved.

    I think it would good to have some warning to users of old wallets that they need to upgrade the wallet to use bech32.

  7. MarcoFalke commented at 6:20 PM on July 4, 2020: member

    Btw, getwalletinfo gives you the wallet version and the keypool size (which you might have to drain)

    Duplicate of #16178

  8. MarcoFalke closed this on Jul 4, 2020

  9. MarcoFalke removed the label Bug on Jul 4, 2020
  10. MarcoFalke added the label Questions and Help on Jul 4, 2020
  11. MarcoFalke added the label Wallet on Jul 4, 2020
  12. MatthewLM commented at 2:04 PM on July 6, 2020: none

    @MarcoFalke @sipa Thanks for your help though there is an issue with using -upgradewallet: Error: DeriveNewSeed: AddKeyPubKey failed. I imagine the upgrade will fail for encrypted wallets as according to #14422 and that I'll need to wait for the new upgradewallet RPC method which shall be coming in 0.21.0?

  13. mattpopovich commented at 11:01 PM on July 26, 2020: none

    @MarcoFalke @sipa Thanks for your help though there is an issue with using -upgradewallet: Error: DeriveNewSeed: AddKeyPubKey failed. I imagine the upgrade will fail for encrypted wallets as according to #14422 and that I'll need to wait for the new upgradewallet RPC method which shall be coming in 0.21.0? @MatthewLM I can confirm that #14422 fixed the Error: DeriveNewSeed: AddKeyPubKey failed issue for my wallet. The new upgradewallet RPC also worked for me. Visit my comment here for more info.

  14. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me