Merged
Conversation
added 10 commits
October 5, 2016 11:09
Adds new bitcoin.conf configuration options for three new indexes: -addressindex=1 -spentindex=1 -timestampindex=1 The addressindex records all changes to an address for retrieving txids, balances and unspent outputs for addresses. Changes are stored and sorted in block order. Both p2sh and p2pkh address types are supported. The index records two sets of key/value pairs. The first records all activity and is useful for viewing transaction history and all changes. The second is specifically for retrieving unspent outputs by address, and is smaller as values are removed once they are spent. The spentindex has multiple purposes and brings closer together inputs and outputs of transactions. The main purpose is to efficiently determine the address and amount of an input's previous output. The second purpose is to be able to determine which input spent an output. The timestampindex keeps track of timestamps with block hashes and is useful for searching blocks by date instead of by height. This is useful for a block explorer that will give search options by date. The index uses logical time correction to make sure that the results are sorted in block order. The logical time of a block is actual timestamp of the block, unless it is less than (earlier) the previous block's logical time, and in that case it is one second greater than the previous block's logical time. Includes logical time fix by Chethan Krishna Conflicts: src/main.cpp src/main.h src/txdb.cpp src/txdb.h src/txmempool.h
Adds new rpc commands that use the address, spent and timestamp indexes, including the new commands: - getblockdeltas - getblockhashes - getaddressmempool - getaddressutxos - getaddressdeltas - getaddressbalance - getaddresstxids - getspentinfo And modifications to the command: - getrawtransaction Conflicts: src/rpc/blockchain.cpp src/rpc/client.cpp src/rpc/misc.cpp src/rpc/rawtransaction.cpp src/rpc/server.cpp src/rpcserver.h
Tests the functionality of the indexes as well as the rpc commands
There was a previous assumption that blockindex would be quite small. With addressindex and spentindex enabled the blockindex is much larger and the amount of cache allocated for it should also increase. Furthermore, enabling compression should decrease the amount of disk space required and less data to write/read. The default leveldb max_open_files is set to 1000, for the blockindex the default is set to 1000 with compression. The 64 value that is current is kept for the utxo database and does not enable compression. Two additional options are added here to be able to configure the values for leveldb and the block index: - `-dbmaxopenfiles` A number of files for leveldb to keep open - `-dbcompression` Boolean 0 or 1 to enable snappy leveldb compression Conflicts: src/dbwrapper.cpp src/init.cpp
|
Is this stable? Has anyone tried running bitcore-node against this version? |
Author
|
I did quite awhile ago, bitcore-node needs segwit bitpay/bitcore-lib#50 version of bitcore-lib to handle serialization of transactions on testnet. |
|
Thanks @braydonf Braydonf. I'm working on a fork of bitcore/insight-api that updates bitcoin-core more frequently, ill make sure to pull in those changes. Nice work btw. |
|
@moeadham Have you had any progress with that? With UASF on the way we'll need to make a change soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebased bitcore patches from 0.12.1 to 0.13:
Includes all changes except the wallet-utility at braydonf@352ec3d which can possibly be included or added with another pull request.
Closes #32