dash/test/functional/test_framework
Wladimir J. van der Laan 5179599526 Merge #12493: [wallet] Reopen CDBEnv after encryption instead of shutting down
c1dde3a949b36ce9c2155777b3fa1372e7ed97d8 No longer shutdown after encrypting the wallet (Andrew Chow)
d7637c5a3f1d62922594cdfb6272e30dacf60ce9 After encrypting the wallet, reload the database environment (Andrew Chow)
5d296ac810755dc47f105eb95b52b7e2bcb8aea8 Add function to close all Db's and reload the databae environment (Andrew Chow)
a769461d5e37ddcb771ae836254fdc69177a28c4 Move BerkeleyEnvironment deletion from internal method to callsite (Andrew Chow)

Pull request description:

  This is the replacement for #11678 which implements @ryanofsky's [suggestion](https://github.com/bitcoin/bitcoin/pull/11678#pullrequestreview-76464511).

  Shutting down the software was to prevent the BDB environment from writing unencrypted private keys to disk in the database log files, as was noted [here](https://bitcointalk.org/index.php?topic=51474.msg616068#msg616068). This PR replaces the shutdown behavior with a CDBEnv flush, close, and reopen which achieves the same effect: everything is cleanly flushed and closed, the log files are removed, and then the environment reopened to continue normal operation.

  To ensure that no unencrypted private keys are in the log files after encrypting the wallet, I wrote [this script](https://gist.github.com/achow101/7f7143e6c3d3fdc034d3470e72823e9d) to pull private keys from the original wallet file and searches for these keys in the log files (note that you will have to change your file paths to make it work on your own machine).

  As for concerns about private keys being written to slack space or being kept in memory, these behaviors no longer exist after the original wallet encryption PR and the shutting down solution from 2011.

  cc @ryanofsky

Tree-SHA512: 34b894283b0677a873d06dee46dff8424dec85a2973009ac9b84bcf3d22d05f227c494168c395219d9aee3178e420cf70d4b3eeacc9785aa86b6015d25758e75
2021-04-05 03:31:50 +02:00
..
__init__.py
authproxy.py Merge #12284: Remove assigned but never used local variables. Enable Travis checking for unused local variables. 2020-10-26 20:35:28 -04:00
bignum.py Merge #10781: Python cleanups 2020-01-02 22:01:29 -06:00
blocktools.py Implement Block Reward Reallocation (#3691) 2020-09-10 19:23:11 +03:00
coverage.py Some Dashification (#3513) 2020-06-11 11:39:04 +03:00
key.py Merge #12993: tests: Remove compatibility code not needed now when we're on Python 3 2020-06-27 10:43:32 -05:00
messages.py llmq|rpc|test|version: Implement P2P messages QGETDATA <-> QDATA (#3953) 2021-01-28 17:33:18 -05:00
mininode.py llmq|rpc|test|version: Implement P2P messages QGETDATA <-> QDATA (#3953) 2021-01-28 17:33:18 -05:00
netutil.py Merge #12627: qa: Fix some tests to work on native windows 2020-06-18 11:41:53 -05:00
script.py Consensus: DIP-0020: Dash opcode updates. Remaining dip0020 opcodes (#3893) 2021-01-13 14:45:04 -06:00
siphash.py
socks5.py Merge #12987: tests/tools: Enable additional Python flake8 rules for automatic linting via Travis 2020-07-22 12:12:46 -05:00
test_framework.py llmq|init|test: Add "mode" to -llmq-qvvec-sync parameter (#4030) 2021-03-16 18:50:41 -04:00
test_node.py Merge #12493: [wallet] Reopen CDBEnv after encryption instead of shutting down 2021-04-05 03:31:50 +02:00
util.py backport bitcoin#16509 and add devnet test (#3946) 2021-01-22 09:58:07 -05:00