-
Notifications
You must be signed in to change notification settings - Fork 635
Optimized address service mempool index size #352
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
Conversation
- Adds default to store a large portion of the mempool index in leveldb - Includes an option to use memdown to have the mempool index in-memory
Replaced with using `tx` and `txleave` to manage the state of the mempool indexes.
|
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice not to have these prefixes hardcoded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which prefixes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also mirrors: https://github.com/bitpay/bitcore-node/blob/master/lib/services/db.js#L75
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, instead of having to write this same code block multiple times, it could be DRY'ed up. Not a show stopper, we can clean it up later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prefixes I was talking about were {livenet: '', testnet: 'testnet3', regtest: 'regtest'}.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there is some shared code, it could be useful to have this.node.networks.getBaseDataDir() or at least a utility function on node, we can spawn an issue and add it in later, since this should also touch the db.js code.
|
LGTM |
Optimized address service mempool index size
Closes #324
New features:
mempoolSpentIndexhas been kept to be memory only and the key will be 37 bytestxandtxleaveevents from bitcoind and will nolonger make an expensive query for all transactions in the mempoolIncludes breaking API changes:
resetMempoolIndexmethod have been removedrunAllMempoolIndexeshas been removed