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

Pull in major blocksci feature release #27

Merged
merged 296 commits into from
Dec 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
296 commits
Select commit Hold shift + click to select a range
0d6a44d
Continuing through adding support
hkalodner Sep 10, 2017
be8c4b3
More segwit changes and code cleanup
hkalodner Sep 11, 2017
5432035
Switched file mapper to use vector buffer instead of array
hkalodner Sep 12, 2017
6f07c56
Switched to three thread parser
hkalodner Sep 13, 2017
baebb7a
Forgot to switch a few of the script classes from address to script
hkalodner Sep 13, 2017
b28111f
Added forgotten include
hkalodner Sep 13, 2017
9f56793
More speedups to parsing
hkalodner Sep 13, 2017
243a3a0
More speedups to parser
hkalodner Sep 14, 2017
1941a6f
Added include needed for old boost
hkalodner Sep 14, 2017
fa0e8c2
Add checks for segwit activation
hkalodner Sep 14, 2017
a28dc75
Improved handling of p2sh addresses
hkalodner Sep 16, 2017
8b6b5c2
Make first seen index safer
hkalodner Sep 16, 2017
6294624
Fix filesystem truncate when file does not exist
hkalodner Sep 16, 2017
d55883d
Forgot to add include for older boost
hkalodner Sep 16, 2017
d8e58e4
Protect file_mapper reload against empty file
hkalodner Sep 16, 2017
d651df0
Protect file_mapper reload against file not existing originally
hkalodner Sep 16, 2017
6511a19
Error in last commit
hkalodner Sep 16, 2017
6d1b91b
Reload after truncate
hkalodner Sep 17, 2017
759753f
Flipped comparison in first seen index
hkalodner Sep 17, 2017
d925b2e
Small change to last commit
hkalodner Sep 17, 2017
496115d
Decrease checkpoint rate in parser
hkalodner Sep 17, 2017
add7167
Fix handling of scripthash in indexes
hkalodner Sep 18, 2017
3482f21
Small bugs in last commit
hkalodner Sep 18, 2017
1e17ced
Fixed critical error in getOutputs and getInputs created in earlier c…
hkalodner Sep 18, 2017
0bebdad
Switch future wait to get
hkalodner Sep 18, 2017
b9ad033
Make sure that index threads finish before calling destructor:
hkalodner Sep 18, 2017
ad9fa2a
Add some race condition protection to parser index preDestructor
hkalodner Sep 18, 2017
40f2a7a
Make first_seen_index call predestructor directly
hkalodner Sep 18, 2017
7275d15
Make file_mapper uncopyable and fix related bug in first_seen_index
hkalodner Sep 18, 2017
abc0713
Some optimizations to block_processor
hkalodner Sep 18, 2017
8d3d4a9
Make sure parser_index teardown is complete before destructor
hkalodner Sep 18, 2017
442ea38
Index wasn't adding all new entries before terminating
hkalodner Sep 18, 2017
15e320b
Moved address_db p2sh logic to after index creation
hkalodner Sep 18, 2017
a5102bf
Fix off by 1 error in block splitting logic
hkalodner Sep 19, 2017
f52f9a5
Off by one error not properly fixed in last commit
hkalodner Sep 19, 2017
7db73b1
Flip endianness of segwit marker
hkalodner Sep 19, 2017
ae5b7e5
Added address index lookup for scripts along with addresses
hkalodner Sep 19, 2017
112ede0
Fix filemapper reload segfault when file didn't exist
hkalodner Sep 19, 2017
c9638d3
Add package script header
hkalodner Sep 19, 2017
082724f
Fix local include in header file
hkalodner Sep 19, 2017
57cc1a5
Fix another local include
hkalodner Sep 19, 2017
042690d
Fix parser_index bug where initial txes were skipped
hkalodner Sep 19, 2017
7285b38
Merge branch 'segwit' of https://github.com/citp/BlockSci into segwit
hkalodner Sep 19, 2017
eb9efdf
Add script pointer class
hkalodner Sep 20, 2017
86b32b0
Fix address index query
hkalodner Sep 20, 2017
3bbd313
Fix a bunch of warnings
hkalodner Sep 20, 2017
0d771cc
Remove usage of small_vector range constructor
hkalodner Sep 20, 2017
8f3e72f
Try out some c++17 functionality
hkalodner Sep 21, 2017
ceb66d1
Update pybind11 to v2.2.1
hkalodner Sep 21, 2017
11743e5
Clean up and update libs
hkalodner Sep 21, 2017
fda2332
Fix more warnings
hkalodner Sep 21, 2017
4c26eb4
Clean up index generation logic
hkalodner Sep 22, 2017
98129e1
Removed inline specifiers from source file
hkalodner Sep 22, 2017
035f1e3
Reset search query for p2sh in address db
hkalodner Sep 23, 2017
03f32eb
Surface tx_revealed
hkalodner Sep 23, 2017
3632567
Fix address recursive visitation
hkalodner Sep 24, 2017
8b7e559
Remove various cases of undefined behavior due to unaligned pointer d…
hkalodner Sep 24, 2017
393c6f4
Limit number of files that leveldb can open
hkalodner Sep 24, 2017
c634a5d
Reimplement ChainIndex::updateFromFilesystem to prevent segfaults
darwin Sep 25, 2017
6cfc2a8
Fix broken readVariableLengthInteger in SafeMemReader
darwin Sep 25, 2017
2125868
Merge pull request #8 from darwin/segfaults
hkalodner Sep 26, 2017
9cbd365
Added update_state class to blocksci
hkalodner Sep 24, 2017
13aea06
Add scripts to hash index
hkalodner Sep 25, 2017
2399bb0
Switch data access to holding unique pointers
hkalodner Sep 25, 2017
8443daa
Add back in tx hash lookup
hkalodner Sep 26, 2017
8e9ee88
Refactor SafeMemReader to use exceptions and use it for all reading
hkalodner Sep 26, 2017
c29cc99
Resolved small issues introduced in prev commit with SafeMemReader
hkalodner Sep 27, 2017
258bea6
Record length in BlockInfo to simplify ChainIndex logic
hkalodner Sep 27, 2017
7df6a57
Add some additional includes needed for gcc on linux
hkalodner Sep 27, 2017
593677e
Clean up RPC and Disk differences in parser
hkalodner Sep 28, 2017
ee55b53
Update to latest bitcoin-api-cpp
hkalodner Sep 28, 2017
96bff5e
Lower the parser address barrier because of RPC parser
hkalodner Sep 28, 2017
0d56d42
Add address lookup to hash index
hkalodner Sep 29, 2017
d7800be
Go back to more efficient clustering technique
hkalodner Sep 29, 2017
4bc0168
Add address lookup back into public interface
hkalodner Sep 29, 2017
fc8ff9a
Turn off pedantic errors
hkalodner Sep 29, 2017
1fccd90
Fix cluster manager
hkalodner Sep 29, 2017
00996eb
Attempting to fix off by 1 bug in clustering
hkalodner Sep 29, 2017
6b377a6
Clean up some errors in the last commit
hkalodner Sep 29, 2017
7b38eb3
Clean up clustering and use ScriptPointer
hkalodner Sep 29, 2017
f7ecc4a
Update cluster python and example
hkalodner Sep 29, 2017
a099a7e
Add include for linux
hkalodner Sep 29, 2017
46d6b41
Switch clusterer python from addressrange to scriptrange
hkalodner Sep 29, 2017
14e3d9b
Fix another off by 1 in clustering
hkalodner Sep 29, 2017
66a898c
Remove utxo leveldb db and switch to just map
hkalodner Sep 29, 2017
6b4735d
Clean up includes
hkalodner Sep 30, 2017
ecad489
Major clean up of parser code
hkalodner Oct 12, 2017
415d1db
Fix map reduce bugs and get example working
hkalodner Oct 12, 2017
a330cf5
Clean up some template code
hkalodner Oct 13, 2017
c8a2cb3
Switch to script variant
hkalodner Oct 21, 2017
c0e39b8
More parser cleanups
hkalodner Oct 21, 2017
48dc258
Fix bugs in new parser version
hkalodner Oct 23, 2017
da104dd
Yet another refactoring
hkalodner Oct 27, 2017
583ca81
Split up address writer and state for script outputs
hkalodner Oct 27, 2017
f5f0a3a
Remove InputInfo from address writer
hkalodner Oct 27, 2017
77c485e
Split InputInfo into two structs
hkalodner Oct 27, 2017
33699af
Split up input generation and processing
hkalodner Oct 27, 2017
d4efe2d
Make all ScriptInput store scriptNum and txNum
hkalodner Oct 27, 2017
ec90a6d
Enable creation of script inputs based on script output data
hkalodner Oct 27, 2017
8df1d3e
Simplified parser input creation
hkalodner Oct 28, 2017
06eb70a
Minimized dependence on addressWriter when constructing inputs
hkalodner Oct 28, 2017
7084e42
Separate parser into smaller steps
hkalodner Nov 9, 2017
53648b3
Clean up script writing
hkalodner Nov 12, 2017
4551b99
Move script output layout code to script output
hkalodner Nov 12, 2017
2ef432c
Make script outputs support generic visit
hkalodner Nov 12, 2017
921a0c4
Switch variant to use lambda visitors
hkalodner Nov 12, 2017
5026991
Switch to using ranges-v3 and mpark variant
hkalodner Nov 15, 2017
ac0a4fa
Some more updates to last commit
hkalodner Nov 15, 2017
022b9ea
Make tx hold a reference to chaindata
hkalodner Nov 15, 2017
4e53b73
Encapsulated all blocksci chain objects
hkalodner Nov 16, 2017
2fccae3
Update clustering to new API
hkalodner Nov 16, 2017
0d13372
Large scale refactor
hkalodner Nov 18, 2017
72c3b15
Switch over to using ranges library instead of iterators along with o…
hkalodner Nov 28, 2017
bc2f3ee
Switch to using lmdbxx as submodule
hkalodner Nov 28, 2017
bb11fe0
Typo in make file
hkalodner Nov 28, 2017
52d43db
Another make typo
hkalodner Nov 28, 2017
cef6692
CMake typo
hkalodner Nov 28, 2017
d5e68cd
Add change address heuristics
maltemoeser Nov 28, 2017
72c2c53
Merge pull request #22 from maltemoeser/changeaddress
hkalodner Nov 28, 2017
7d4959e
Added support for iterating over all scripts of a given type
hkalodner Nov 29, 2017
bb4c142
Reduce requirements to C++14
hkalodner Nov 30, 2017
c80c5fb
Added includes necessary for ubuntu
hkalodner Nov 30, 2017
7e1235d
Remove gperf and add default index creation
hkalodner Nov 30, 2017
b6c4320
Remove unneeded libraries and includes
hkalodner Nov 30, 2017
24b7da6
Update build instructions for latest update
hkalodner Nov 30, 2017
881d9c1
Removing py:arg usage fixes crash in python module exit
hkalodner Dec 1, 2017
809c385
Fix outputs_unspent and add it to blockchain also
hkalodner Dec 1, 2017
9157cd2
Fixing broken feesPerByte
hkalodner Dec 1, 2017
bdfd6b8
Use sudo for cmake `make install`
maltemoeser Dec 1, 2017
b5beb47
Make property names for size and hash consistent
maltemoeser Dec 1, 2017
dcc6f97
Make property names consistent with Python API
maltemoeser Dec 1, 2017
f7b013a
Use size_bytes instead of size
maltemoeser Dec 1, 2017
f6acf0a
Merge pull request #23 from maltemoeser/consistency
maltemoeser Dec 1, 2017
6d81481
Fix critical bug in addressName func
hkalodner Dec 2, 2017
5d9be53
Critical copy paste error in parser
hkalodner Dec 2, 2017
c4d1e0a
Moved obvious various functions into heuristics library
hkalodner Dec 3, 2017
519d0f3
Forgot ubuntu include
hkalodner Dec 3, 2017
daa16c1
Make input_count and output_count properties instead of functions
hkalodner Dec 3, 2017
beb5ce6
Small typo in build instructions
hkalodner Dec 3, 2017
e2733e7
Fix a few compiler warnings
hkalodner Dec 4, 2017
0b370b2
Python API updates
maltemoeser Dec 4, 2017
79b5811
Fix a bunch of type conversion warnings
hkalodner Dec 5, 2017
d9ff332
Add next_block and prev_block
hkalodner Dec 5, 2017
564bb0d
Merge pull request #24 from maltemoeser/segwit
maltemoeser Dec 5, 2017
acf9c6a
Add some type safety to BlockHeight
hkalodner Dec 5, 2017
ccba8bc
Fixed some small linux issues
hkalodner Dec 5, 2017
f539f10
Rename block methods related to fee
hkalodner Dec 5, 2017
1979298
Create block.txes and give it access to all tx methods
hkalodner Dec 6, 2017
42e9bd6
Unify transaction range definitions from two locations
hkalodner Dec 6, 2017
ba1384e
Also added block.inputs and block.outputs
hkalodner Dec 6, 2017
e87c46d
Fix to age calculation in input
hkalodner Dec 6, 2017
3cfee71
Move age to imp file
hkalodner Dec 6, 2017
787820a
Add methods to tx.inputs and tx.outputs as well
hkalodner Dec 6, 2017
e5a21b4
Mistake in last commit
hkalodner Dec 6, 2017
0193ddd
Add block.txes.inputs and block.txes.outputs
hkalodner Dec 6, 2017
6081a29
Add len and bool to ranges
hkalodner Dec 6, 2017
a39662d
Fix bool evaluation
hkalodner Dec 6, 2017
2dc6c85
Accidentally removed some block methods
hkalodner Dec 6, 2017
09294c9
Make block slice return a transaction range
hkalodner Dec 6, 2017
415302d
Fix block iteration
hkalodner Dec 6, 2017
336785a
Fix python interface bug
hkalodner Dec 6, 2017
bf2d944
Add input and output filtering
hkalodner Dec 7, 2017
2e03518
Replace iteration over lists with .all property
hkalodner Dec 7, 2017
3b2de74
Forgot to include chrono header in tx file
hkalodner Dec 9, 2017
f00cd79
Fix some reorg related bugs
hkalodner Dec 9, 2017
1bfa217
Remove operator[] from blockchain
hkalodner Dec 11, 2017
f9c5670
Add tx and block properties to input and output
hkalodner Dec 12, 2017
d1ce793
Add version number to data and throw if incorrect
hkalodner Dec 12, 2017
969d25a
Make sequence num available
hkalodner Dec 12, 2017
dc81c63
Fix a couple bugs in the last commit
hkalodner Dec 12, 2017
d0f23e6
Fix a couple bugs in the last commit
hkalodner Dec 12, 2017
1241de7
Add the ability to fetch the balance of an address
hkalodner Dec 12, 2017
15822d4
Bug in last commit
hkalodner Dec 12, 2017
8ea1c95
Bug in last commit
hkalodner Dec 12, 2017
21c0a99
Bug in last commit
hkalodner Dec 12, 2017
705d4d0
Bug in last commit
hkalodner Dec 12, 2017
bcb192b
Clean up group headers
hkalodner Dec 12, 2017
b33d55d
Typo in file name
hkalodner Dec 12, 2017
f9d2caa
Error in heuristics interface
hkalodner Dec 12, 2017
e196aa8
Forgot semicolon
hkalodner Dec 12, 2017
8d70f3d
Fix clustering code
hkalodner Dec 12, 2017
321106a
Fix clustering code
hkalodner Dec 12, 2017
ef2d50c
Add warmup script used in AMI
hkalodner Dec 12, 2017
debc5c3
Remove debug output from parser
hkalodner Dec 12, 2017
d8dafd8
Fix signature mismatch
hkalodner Dec 12, 2017
86517e5
Some more address related errors
hkalodner Dec 12, 2017
ccc00ed
Make single calculateBalance call with default parameter
hkalodner Dec 12, 2017
30b608c
Make single calculateBalance call with default parameter
hkalodner Dec 12, 2017
1f9802f
Make single calculateBalance call with default parameter
hkalodner Dec 12, 2017
ed53f6d
Add pretty name for witness types
hkalodner Dec 12, 2017
0dd897f
Make indexes open in readonly mode
hkalodner Dec 12, 2017
3714641
Move some code out of blockchain into heuristics
hkalodner Dec 13, 2017
3fea75f
Fix includes
hkalodner Dec 13, 2017
27be3e2
Fix includes
hkalodner Dec 13, 2017
6fa2312
Fix minor problems in code snippets in the readme
darwin Sep 22, 2017
f82c465
Make clear that BlockSci supports only python 3
hkalodner Sep 26, 2017
fa4d3de
Clarify in python directions that python3 should be used
hkalodner Sep 27, 2017
1240157
Closing #5 by adding AMI initialization to README
hkalodner Sep 27, 2017
48c2b58
fix parameters of mapreduce_block_ranges calls
Oct 6, 2017
48525ea
fix return of mapreduce_block_ranges when on single-core
Oct 6, 2017
e3010cc
minor update to readme
randomwalker Nov 3, 2017
343ba29
Add get_miner to init and add some AWS specific code
hkalodner Dec 13, 2017
c1575e9
Fix merge conflic
hkalodner Dec 13, 2017
176a538
Add more python documentation
hkalodner Dec 13, 2017
4dd7359
Change location of warmup files
hkalodner Dec 13, 2017
5d4d70b
Fix warmup permissions
hkalodner Dec 13, 2017
bf3a98b
Some fixes to the init file
hkalodner Dec 13, 2017
c162e12
Some fixes to the init file
hkalodner Dec 13, 2017
e0659b9
Some fixes to the CPP compilation
hkalodner Dec 13, 2017
948e48c
Fix global header
hkalodner Dec 13, 2017
24ca969
Add documentation to repo
hkalodner Dec 13, 2017
5bffe6e
Add forgotten include
hkalodner Dec 13, 2017
d4345b2
Temporary fix to templateMakefile
hkalodner Dec 13, 2017
0aede58
Temporary fix to templateMakefile
hkalodner Dec 13, 2017
b5f9540
Update the demo notebook
hkalodner Dec 13, 2017
0d4de34
Change warmup order
hkalodner Dec 13, 2017
f4c522f
Remove unneeded dependencies from clusterer
hkalodner Dec 13, 2017
a4df2c2
Fix off by 1 error in cluster manager
hkalodner Dec 13, 2017
9a93850
Add script balance to match address balance
hkalodner Dec 13, 2017
66d6d22
Add script balance singleton version
hkalodner Dec 13, 2017
3a25d59
Delete unused file
hkalodner Dec 13, 2017
ee22f9a
Add link to old documentation
hkalodner Dec 13, 2017
874d177
Updated demo notebook
hkalodner Dec 13, 2017
1980db1
Update AMI time estimations
hkalodner Dec 13, 2017
9b28e8b
Add address documentation
hkalodner Dec 13, 2017
d9b2e0a
Update the demo notebook to the latest version
hkalodner Dec 13, 2017
e962017
Some small documentation updates
hkalodner Dec 13, 2017
ff5b43d
Add documentation to the clusterer
hkalodner Dec 14, 2017
9e0a19c
Merge branch 'segwit' of https://github.com/citp/BlockSci into segwit
hkalodner Dec 14, 2017
c2ceb09
Error in last commit
hkalodner Dec 14, 2017
ed10ff3
Add blocksci.version
hkalodner Dec 14, 2017
495a2fc
Initial draft of the changelog for the new version
hkalodner Dec 14, 2017
7f0e437
Add the changelog to the documentation
hkalodner Dec 14, 2017
b4d60a0
Include blurb about new version in the readme
hkalodner Dec 14, 2017
6e8f5a3
Fix header line lengths
hkalodner Dec 14, 2017
38275ee
Fix header line lengths
hkalodner Dec 14, 2017
c0d8762
minor edits to changelog
randomwalker Dec 14, 2017
0314606
minor edits to changelog
randomwalker Dec 14, 2017
30569c7
minor edits to changelog
randomwalker Dec 14, 2017
c8202d5
minor edits to README
randomwalker Dec 14, 2017
daa8d98
minor edits to README
randomwalker Dec 14, 2017
60ce165
minor edits to README
randomwalker Dec 14, 2017
5cd2aa7
minor edits to README
randomwalker Dec 14, 2017
434279b
Added more bug fixes to the changelog
hkalodner Dec 14, 2017
7d6fd8f
minor edits to README
randomwalker Dec 14, 2017
0b15225
Change the warmup timing for the AMI
hkalodner Dec 14, 2017
1d049d3
Fix a typo in the clustering documentation
hkalodner Dec 14, 2017
06108c8
Update readme to new AMI
hkalodner Dec 14, 2017
75d424a
minor edits to changelog
randomwalker Dec 14, 2017
b8138c6
Update CHANGELOG.rst
randomwalker Dec 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
[submodule "libs/pybind11"]
path = libs/pybind11
url = https://github.com/pybind/pybind11/
[submodule "libs/sparsepp"]
path = libs/sparsepp
url = https://github.com/greg7mdp/sparsepp.git
[submodule "libs/bitcoin-api-cpp"]
path = libs/bitcoin-api-cpp
url = https://github.com/hkalodner/bitcoin-api-cpp.git
[submodule "libs/dset"]
path = libs/dset
url = https://github.com/wjakob/dset.git
[submodule "libs/variant"]
path = libs/variant
url = https://github.com/mpark/variant.git
[submodule "libs/range-v3"]
path = libs/range-v3
url = https://github.com/ericniebler/range-v3.git
[submodule "libs/lmdbxx"]
path = libs/lmdbxx
url = https://github.com/bendiken/lmdbxx
[submodule "libs/type_safe"]
path = libs/type_safe
url = https://github.com/foonathan/type_safe
[submodule "Notebooks/blocksci/Blockchain-Known-Pools"]
path = Notebooks/blocksci/Blockchain-Known-Pools
url = https://github.com/blockchain/Blockchain-Known-Pools
106 changes: 106 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
.. role:: python(code)
:language: python

Release notes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Version 0.3
========================

5x performance increase
-----------------------
We acheived a roughly 5x performance increase (for the C++ interface) at the cost of a small (under 4%) increase in memory consumption. BlockSci can now iterate over every transaction input and output on the Bitcoin blockchain in about 1 second on a single 4-core EC2 instance. Most of the improvements came from improving memory alignment in data files.

In our paper_ we presented performance results for iterating over transactions using the C++ library (up to block 478,449 of the Bitcoin blockchain). In the table below we compare the timings reported in the paper (Old) to the corresponding timings for version 0.3 (New).

.. _paper: https://arxiv.org/pdf/1709.02489.pdf

+-----------------------------+----------------------+----------------------------+
|Iterating over | Single Threaded | Multithreaded |
| +-----------+----------+-------------+--------------+
| | Old | New | Old | New |
+-----------------------------+-----------+----------+-------------+--------------+
|Transaction headers | 13.1 sec | 3.0 sec | 3.2 sec | 0.6 sec |
+-----------------------------+-----------+----------+-------------+--------------+
|Transaction outputs | 27.9 sec | 3.4 sec | 6.6 sec | 0.9 sec |
+-----------------------------+-----------+----------+-------------+--------------+
|Transaction inputs & outputs | 46.4 sec | 4.2 sec | 10.3 sec | 1.1 sec |
+-----------------------------+-----------+----------+-------------+--------------+
|Headers in random order | 303.0 sec | 99.9 sec | Unsupported | Unsupported |
+-----------------------------+-----------+----------+-------------+--------------+

In future versions we plan to bring the Python performance for most common types of queries closer to the C++ performance figures in the table.

New data format
------------------

As noted above, we updated the data format. This requires rerunning the parser from scratch if you are running a local
copy of BlockSci. If you are using the EC2 AMI image you can simply launch a new server with the BlockSci 0.3 image.

SegWit support & API changes
-----------------------------
- We provide full support to two new address types (Pay to Witness Script Hash and Pay to Witness Pubkey Hash)
- New distinction between address type and script type

Version 0.3 introduces a distinction between two outputs which are sent the same way and two outputs that can be spent
using the same information. This difference comes up in multiple circumstances including when a the same public key is used
is a pay to public key hash output and inside a multisignature output.

Inside the BlockSci interface these two related concepts map to the Address and Script types respectively. Both objects
possess very similar APIs, but operate somewhat differently. As an example, given a specific P2PKH address, :python:`address`, the
then :python:`address.outs()` will return all outputs sent to that specific address. If the pubkey used in that address
was also used in another type of output, this would not be shown. However calling :python:`address.script.outs()` will return
all outputs where that pubkey was used in any form.

Additionally Script objects contain a large amount of information about the script used. For instance Multisig scripts provide
access to all the pubkeys involved and P2SH scripts provide access to the wrapped address if it is known.

- Moved heuristic-based behavior to a separate module (blocksci.heuristics) to make it easier to distinguish it from core functionality.

The heuristics library contains two main types of heuristics: change address identification and transaction labeling.
In the previous version these functionalities were included in the main functionality of the library making it difficult to
distinguish between functions which are guaranteed to be correct and functions which only produce guesses.

New versions of the API are accessable by using

.. code-block:: python

blocksci.heuristics.change_by_client_change_address_behavior(tx)
blocksci.heuristics.is_coinjoin(tx)

Additional index lookup
------------------------
We have added an index to allow the lookup of transactions by hash and addresses by address string.

Transactions can be looked up via :python:`blocksci.Tx(hash_string)` and addresses can be looked up via :python:`blockcsi.Address.from_string(address_string)`.

Bug fixes
---------------------
- Many causes of crashes and instability have now been resolved.
- Segwit support has been introduced. (`Issue #1`_)
- The address index lookups now will return correct results. (`Issue #6`_)
- The parser no longer reads beyond memory boundaries causing occasional crashes. (`Issue #9`_)
- The initial header parse phase is now multithreaded leading to a substantial performance increase. (`Issue #12`_)
- Fixed bitcoin-api-cpp headers so it now works on both mac and linux. (`Issue #15`_)
- The parser now provides feedback as it goes. (`Issue #26`_)
- The python module no longer crashes on exit. (`Issue #25`_)

.. _Issue #1: https://github.com/citp/BlockSci/issues/1
.. _Issue #6: https://github.com/citp/BlockSci/issues/6
.. _Issue #9: https://github.com/citp/BlockSci/issues/9
.. _Issue #12: https://github.com/citp/BlockSci/issues/12
.. _Issue #15: https://github.com/citp/BlockSci/issues/15
.. _Issue #25: https://github.com/citp/BlockSci/issues/25
.. _Issue #26: https://github.com/citp/BlockSci/issues/26

Limitations
-------------------
Incremental updating of the blockchain is currently not supported due to some continuing bugs in blockchain reorg handling.
Rerunning the parser in the uncommon situation that a previously parsed block has been orphaned may cause data corruption.

Version 0.2
========================

This version was the initial release of BlockSci. Documentation_ for version 0.2 is still available.

.. _Documentation: https://citp.github.io/BlockSci/0.2/
29 changes: 22 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
cmake_minimum_required(VERSION 3.5.0)
cmake_minimum_required(VERSION 3.9)
project(blocksci)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")

#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-old-style-cast -Wno-documentation-unknown-command -Wno-documentation -Wno-shadow -Wno-switch-enum -Wno-missing-prototypes -Wno-weak-vtables -Wno-exit-time-destructors -Wno-unused-macros -Wno-padded -Wno-undefined-func-template")

#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG")

# use, i.e. don't skip the full RPATH for the build tree
Expand All @@ -27,24 +31,35 @@ ENDIF("${isSystemDir}" STREQUAL "-1")

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

find_package( Boost 1.58 COMPONENTS program_options system filesystem thread iostreams REQUIRED )
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

find_package( Boost 1.58 COMPONENTS program_options system filesystem thread iostreams serialization REQUIRED )
add_library(boost INTERFACE)
target_link_libraries(boost INTERFACE ${Boost_LIBRARIES})
target_include_directories(boost INTERFACE ${Boost_INCLUDE_DIR})
target_include_directories(boost INTERFACE SYSTEM ${Boost_INCLUDE_DIR})

find_package(OpenSSL REQUIRED)
add_library(openssl INTERFACE)
target_link_libraries(openssl INTERFACE ${OPENSSL_LIBRARIES})
target_include_directories(openssl INTERFACE ${OPENSSL_INCLUDE_DIR})
target_include_directories(openssl INTERFACE SYSTEM ${OPENSSL_INCLUDE_DIR})

add_library(sparsepp INTERFACE)
target_include_directories(sparsepp INTERFACE libs/sparsepp)
add_library(Ranges INTERFACE)
target_include_directories(Ranges INTERFACE SYSTEM libs/range-v3/include)

add_library(lmdbxx INTERFACE)
target_include_directories(lmdbxx INTERFACE SYSTEM libs)
target_link_libraries(lmdbxx INTERFACE lmdb)

link_directories(/usr/local/lib)
include_directories("src")

add_subdirectory(libs/pybind11)

add_subdirectory(libs/variant)

add_subdirectory(libs/type_safe)

add_subdirectory(src/blocksci)
add_subdirectory(src/parser)
add_subdirectory(src/mempool_recorder)
Expand Down
Loading