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

Update to 0.13.0 #35

Merged
merged 12 commits into from
Oct 7, 2016
Merged

Update to 0.13.0 #35

merged 12 commits into from
Oct 7, 2016

Conversation

braydonf
Copy link

@braydonf braydonf commented Oct 5, 2016

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

Braydon Fuller 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
@braydonf braydonf changed the title 0.13 bitcore Update to 0.13.0 Oct 5, 2016
@kleetus kleetus merged commit 4822847 into bitpay:0.13-bitcore Oct 7, 2016
@moeadham
Copy link

Is this stable? Has anyone tried running bitcore-node against this version?

@braydonf
Copy link
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.

@moeadham
Copy link

moeadham commented Mar 17, 2017

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.

@STRML
Copy link

STRML commented Apr 4, 2017

@moeadham Have you had any progress with that? With UASF on the way we'll need to make a change soon.

kleetus pushed a commit that referenced this pull request Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants