Author

Topic: Get all bitcoin data in a structured manner (Read 579 times)

newbie
Activity: 6
Merit: 2
February 07, 2017, 10:24:53 AM
#4
Thanks I will look into it!
full member
Activity: 322
Merit: 151
They're tactical
February 06, 2017, 06:11:31 PM
#3
Maybe you can check block explorer code to get the logic, they pretty much do what you are talking about Smiley
staff
Activity: 3458
Merit: 6793
Just writing some code
February 06, 2017, 04:24:35 PM
#2
You should use Bitcoin Core for this. Bitcoin Core has a JSON-RPC interface which is also accessible through a provided bitcoin-cli binary. It also provides some notifier and listener services.

You will probably want to use the ZeroMQ interface provided by Bitcoin Core. You can set it up to give you block hashes, tx hashes, raw blocks, and raw transactions, every time it receives a new block or transaction. This will essentially give you a live stream of all valid transactions and blocks received by Bitcoin Core. Documentation on using ZMQ with Bitcoin Core is available at https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md
newbie
Activity: 6
Merit: 2
February 06, 2017, 04:12:30 PM
#1
First of all hi, I am totally new to bitcoin development. I did do some mining back in the days but now I am doing something new, researching graph theory and then mainly time evolving graphs.

What is better then actually use a live stream of transactions that make the graph between wallets? Well nothing really.

So what I am asking here is some directions on the easiest way to get all bitcoin block and transaction data and stuff it into a database, possibly with live updates.

At first I though of using the bootstrap.dat file and just read it line by line. However any research in the file on google doesnt hit any developer resources (like file encoding & structure) and mainly shows resources telling its use is outdated.

Some of the options I see are:
- Just downloading a wallet/node, let it sync and read all data files (no idea how yet but it must be somewhere on disk).
- I saw there are some python libraries (https://github.com/petertodd/python-bitcoinlib) that I can use to run the RPC interface? (probably end up downloading all data through that?)
- I saw that there is a RPC Cli? Not sure how it works or if it fits my purpose or if it is mainly useful to keep my database up to date.

PS I am quite the experienced programmer but just don't know C++.

Thanks in advance!
Jump to: