-
Notifications
You must be signed in to change notification settings - Fork 635
WIP: Performance optimized indexes #413
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
We can update this to be optimized using the prevout index if necessary.
|
As summary of results here thus far: Appending txid values to key/values dramatically helps improve the query time for Node.js for txids for multiple addresses (https://github.com/braydonf/bitcore-storage-tests#multi-address-transaction-history-queries) however read-modify-write performance with LevelDB isn't great. While syncing with livenet it will mostly freeze at around block height 180,000. Writing txids for addresses with key only values is write optimized; however, the performance while streaming or using an iterator carries overhead. Tests with using the The read performance for txids for several address when queried from MongoDB is promising (https://github.com/braydonf/bitcore-storage-tests#multi-address-transaction-history-queries). However writing blocks across multiple collections atomically isn't supported, making a simple write a more complex multi-phase commit with the additional overhead. Even without all necessary indexes (sans unspent info), the sync times for full 1MB blocks was around 0.5 blocks per second. An additional year would estimate at 30 additional hours. |
|
Will close this for the time being until there are more concrete results, as I'm not convinced this is the best direction. |
|
Anyone following this issue can continue on this PR: #422 |
This is a work in progress to optimize indexes for these use cases:
Note: The initial sync times for these indexes remains comparable to current implementation and within the same amount of time it takes for the initial bitcoind sync. This is around 24 hours for livenet and 1 hour for testnet.
Necessary updates to the Insight API: bitpay/insight-api#461
Closes and resolves: bitpay/bitcore-lib#36, bitpay/insight-api#444, #400, #373, #397, #375, bitpay/insight-api#459, bitpay/insight-api#351, bitpay/insight-api#309
For more verbose details with performance comparisons take a look at: https://github.com/braydonf/bitcore-storage-tests