encryptwallet has address pool limitation? #12907

issue J-Liu opened this issue on April 7, 2018
  1. J-Liu commented at 1:45 PM on April 7, 2018: none

    <!-- Describe the issue -->

    in btc.conf keypool=200000

    then I run bitcoin-cli encryptwallet "pass" will failed.

    but when I change it into 2000, everything going fine.

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

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

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

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

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

    <!-- 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. -->

  2. fanquake added the label RPC/REST/ZMQ on Apr 7, 2018
  3. maflcko commented at 2:17 PM on April 7, 2018: member

    Please include the error message and version

  4. J-Liu commented at 3:06 PM on April 7, 2018: none

    bitcoin-0.16.0 and there is no error message, even no any message, it just made bitcoind exit.

  5. maflcko commented at 4:36 PM on April 7, 2018: member

    Please note that " Successfully executing this command shuts down bitcoin core, it will need to be manually restarted. "

    So, this is expected

  6. J-Liu commented at 5:05 PM on April 7, 2018: none

    Sorry, it is my fault. I didn't make a clear description. I know if the encryptwallet success, it will shut down bitcoind, and we should restart it manually. But, when I start bitcoind manually, again, the wallet is still NOT encrypted.

  7. achow101 commented at 5:20 PM on April 7, 2018: member

    Can you please post your debug.log file? Also keypoolpool is not a valid option.

  8. J-Liu commented at 2:04 AM on April 8, 2018: none

    Sorry, typo, keypool And, I run a release binary...

  9. maflcko commented at 2:42 AM on April 8, 2018: member

    Please check your debug.log for possible causes; Alternatively you can upload it here.

    You can find the debug.log in your data dir.

  10. J-Liu commented at 12:41 PM on April 8, 2018: none

    Sorry I can not use the product system, so I built a test environment and run the test again. And sorry for I don't understand the log file, so I attached it. Hope it will be helpful. debug.log db.log

  11. maflcko commented at 4:23 PM on April 8, 2018: member

    Thanks. I can reproduce on master (7e23972d1f715f596e61e6e3775a3ada75604497) with gdb --args ./src/qt/bitcoin-qt -datadir=/tmp/aaaa -keypool=200000 -regtest

    The assert is hit here:

    https://github.com/bitcoin/bitcoin/blob/7e23972d1f715f596e61e6e3775a3ada75604497/src/wallet/wallet.cpp#L643-L650

    So it seems to return false in either of those:

    https://github.com/bitcoin/bitcoin/blob/d889c036cd6f683116e6a27e404be2809d1deb76/src/wallet/crypter.cpp#L320-L323

  12. maflcko added the label Wallet on Apr 8, 2018
  13. maflcko removed the label RPC/REST/ZMQ on Apr 8, 2018
  14. maflcko added the label Bug on Apr 8, 2018
  15. maflcko added this to the milestone 0.17.0 on Apr 8, 2018
  16. achow101 commented at 4:44 PM on April 8, 2018: member

    The db.log file says it's running out of BDB locks. Is there really a fix for this other than changing the database system? We could limit the number of keypool entries or increase the number of locks, but those aren't really solutions.

  17. maflcko removed the label Bug on Apr 8, 2018
  18. TheBlueMatt commented at 5:31 PM on April 17, 2018: contributor

    I believe you can change the locks limit with a DB_CONFIG file which BDB will read and set the locks size. https://bitcointalk.org/index.php?topic=152208.0 may be of use (just googled around for those settings cause you ahve to apply them to pre-0.8 nodes to get them to sync the chain).

  19. maflcko removed this from the milestone 0.17.0 on Jul 29, 2018
  20. maflcko commented at 12:24 PM on May 9, 2020: member

    I can still reproduce. Probably getting rid of bdb is going to fix this #18916

  21. achow101 commented at 10:02 PM on October 26, 2022: member

    Legacy wallets that use BDB are being deprecated. Using descriptor wallets should solve this problem.

  22. achow101 closed this on Oct 26, 2022

  23. bitcoin locked this on Oct 26, 2023

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:15 UTC

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