This pull request is in early stage but discussions could help driving this into the right direction.
It will basically remove bdb (currently not on compile level) and make use of a internal key/value store. Logdb (the internal key/value store) is a append only store where every key/value-frame contains a sha256 checksum all available frames. Consistency is guaranteed.
The current implementation passes all tests but has lack of recover/rewrite possibilities.
Why this
- IMO BerkleyDB is oversized for a "reference wallet implementation". This append-only file-store could prevent from corruptions and relieves compile stress.
- wallet flush threads are no longer required.
- remove another dependency and get more control over our stack
What's next / ToDos
add compact(added 2015/01/22)Rewrite()function (save whole memory map atomically to a clean file): this is required after encrypting the wallet- add thread safe / concurrency tests for logdb
- add
Recover()function: scan through a corrupt wallet file and try to recover keys even when some key/value-frames and/or checksums are corrupted - add more tests
- add wallet encryption test
This is on my internal roadmap:
remove bdb
- transform account to labels
- implement bip32
- add spv mode