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

Use LMDB by default for the wallet #87

Closed
chjj opened this issue Oct 23, 2016 · 2 comments
Closed

Use LMDB by default for the wallet #87

chjj opened this issue Oct 23, 2016 · 2 comments
Labels
enhancement Improving a current feature

Comments

@chjj
Copy link
Member

chjj commented Oct 23, 2016

Using LMDB would solve a lot of issues (primarily the LRU caches littered all over the wallet code). The wallet requires much faster reads than the chain, LMDB offers that, as well as hot backups (something that's currently hacked into the leveldb backend and only works because iterators snapshot the tree).

I've rewritten the node.js lmdb module completely (rvagg/archived-lmdb#14) and it seems stable enough. It doesn't expose envs/dbs/txns since it's a mirror of the leveldb API. Faster reads and hot backups are nice though.

Further rewriting: transactions (the non-bitcoin kind) would solve a lot of problems. A future module that properly exposes all LMDB features would be ideal (one for node.js exists, but the API is synchronous). There were a few times I tried to hack in a key "state" by wrapping a leveldb batch because I needed txns so bad.

@BluSyn BluSyn added the enhancement Improving a current feature label Jul 11, 2017
@yayitswei
Copy link

Thanks for making and constantly improving bcoin @chjj! Curious whether you'd recommend LMDB in production over LevelDB in its current state. (in this PR it seemed you had yet to try the new module in production, but were planning to).

@bucko13 bucko13 added the enhancement Improving a current feature label Nov 21, 2017
@bucko13
Copy link
Contributor

bucko13 commented Nov 27, 2017

Closing as we will probably be deprecating lmdb in favor of preferring leveldb.

@bucko13 bucko13 closed this as completed Nov 27, 2017
@bucko13 bucko13 added the enhancement Improving a current feature label Apr 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving a current feature
Projects
None yet
Development

No branches or pull requests

4 participants