Post
Topic
Board Bitcoin Technical Support
Re: Need Help Setting up Node
by
mocacinno
on 25/07/2018, 08:23:38 UTC
Hi,
I am looking to set up a main BTC node and loading the data into a DB. i downloaded the node software from BTC core and have proceeded with sync..Now i have a set of files but they dont seem to be in a readable format. How do i load them into a DB? Is there a schema? I tried searching the internet but i am unable to find it. Or am i missing something?

There are several options, the easyest one is searching for an existing block parser in a language you understand, and adapting it in order to insert all data into a relational database. Do expect this to be a very time and resource consuming process... You'll need hundreds of gigabytes of diskspace, and if you mess up your relational database, inserting, deleting, updating or selecting records will be painstakingly slow.

In the past, i've found a couple projects you could find interesting:
https://github.com/znort987/blockparser
https://github.com/alecalve/python-bitcoin-blockchain-parser
https://github.com/neocogent/sqlchain

Great! Thanks a lot. But is there a schema or something for the data? I want to load the data using java. so if i have the data structure for the data, i will probably able to write it myself?
No, there's no schema, it's not a relational database.

Here's an old document i found on http://codesuppository.blogspot.com/2014/01/how-to-parse-bitcoin-blockchain.html
http://2.bp.blogspot.com/-DaJcdsyqQSs/UsiTXNHP-0I/AAAAAAAATC0/kiFRowh-J18/s1600/blockchain.png

Here's a link to the wiki: https://en.bitcoin.it/wiki/Block

Good luck