-
Notifications
You must be signed in to change notification settings - Fork 76
Of transactions in the Bitcoin blockchain
The Bitcoin blockchain is a ledger of transactions, grouped into blocks that have been verified together.
The steps below describe how to use SPADE's Bitcoin reporter to ingest the blockchain.
The reference implementation of Bitcoin must be installed.
On Ubuntu 14.04, Bitcoin can be installed with:
sudo apt-add-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind
On Mac OS X, Bitcoin can be installed with:
curl -O https://bitcoin.org/bin/bitcoin-core-0.11.2/bitcoin-0.11.2-osx64.tar.gz
tar xvf bitcoin-0.11.2-osx64.tar.gz
echo $PWD/bitcoin-0.11.2/bin > $SPADE/cfg/bitcoin.path
assuming $SPADE
is set to SPADE's top-level directory.
Configure and run the Bitcoin daemon, bitcoind
:
mkdir ~/.bitcoin
cp $SPADE/cfg/bitcoin.conf ~/.bitcoin/bitcoin.conf
bitcoind
Since initialization can take a significant period of time, its progress can be monitored with:
bitcoin-cli getblockcount
The Bitcoin reporter can be started using SPADE's controller:
-> add reporter Bitcoin
The reporter will connect to bitcoind
and start downloading blocks from the genesis block (which has height 0). The blocks and transactions will be represented as data provenance using the W3C PROV data model. Details of the key-value annotations are available here.
Since ingestion of the entire blockchain can take days even on a server, the reporter supports collection of a limited set of blocks. This can be done using the optional arguments start
and end
. For example, to ingest the blocks with height 10, 11, and 12, the reporter can be started with:
-> add reporter Bitcoin start=10 end=12
If an end
argument is not provided, the reporter will continue ingesting new blocks as they become available from the Bitcoin daemon.
To stop collecting Bitcoin blocks, use this command in SPADE's controller:
-> remove reporter Bitcoin
This material is based upon work supported by the National Science Foundation under Grants OCI-0722068, IIS-1116414, and ACI-1547467. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
- Setting up SPADE
- Storing provenance
-
Collecting provenance
- Across the operating system
- Limiting collection to a part of the filesystem
- From an external application
- With compile-time instrumentation
- Using the reporting API
- Of transactions in the Bitcoin blockchain
- Filtering provenance
- Viewing provenance
-
Querying SPADE
- Illustrative example
- Transforming query responses
- Protecting query responses
- Miscellaneous