Author

Topic: Bitcoin blockchian in sql db (Read 2135 times)

full member
Activity: 136
Merit: 120
August 26, 2014, 09:26:39 AM
#11
JavaBitcoin is a full node (no mining support) which uses either LevelDB or H2 for the database.  LevelDB is a mapped database while H2 is a SQL database.  Note that LevelDB is much faster than any of the SQL databases that I have tried (H2, Firebird, PostgreSQL), especially when deleting rows.  I went with H2 because it is a small embedded database manager compared to Firebird or PostgreSQL.  If you want to use another SQL database, you will need to tweak some of the database definitions to handle the differences in data type definitions.

If you decide to use a SQL database, it is best to first download the blockchain using the LevelDB database and then migrate the LevelDB database to the H2 database (JavaBitcoin will do this for you).  The actual blocks are stored in external files in the same format as Bitcoin-QT (JavaBitcoin will import the block chain from the Bitcoin-QT blocks directory if available).

You can browse the source code on GitHub (https://github.com/ScripterRon/JavaBitcoin).  It requires Java 8 since I'm using some of the new features in the latest version.
newbie
Activity: 23
Merit: 0
August 26, 2014, 09:13:03 AM
#10
i haven't saw the stubs you are talking about is this the right repo ? https://github.com/pmlyon/BitSharp

is there a way to change the src of bitcoin node to use sql db?
i mean i'm currently syncing the blockchain using btcd (bitcoin full node made in go lang) but is store the blocks in a levelDB database.
hero member
Activity: 765
Merit: 503
August 26, 2014, 06:14:24 AM
#9
If your using c#, check out bitsharp on github.  Last time i check, there where stubs for different DBs. 
newbie
Activity: 23
Merit: 0
August 26, 2014, 05:56:42 AM
#8
yes
 
i've checked out the repository with git

npm install fails at the stage where gyp is making visual studio compile something binding.sln or something like that.
i tried again running npm install from the visual studio 2010 CMD  now gyp start the visual studio compiling process but fails for compiling errors.
member
Activity: 73
Merit: 10
August 26, 2014, 01:18:02 AM
#7
Visual studio? You need node to run insight. Did you read the installation doc?

Quick Install

To install Insight, clone the main repository:
$ git clone [email protected]:bitpay/insight.git && cd insight
Install dependencies:
$ npm install
Fire it up:
$ node insight.js
Then open a browser and go to:
http://localhost:3001
newbie
Activity: 23
Merit: 0
August 25, 2014, 01:16:57 PM
#6
ok but still is not downloading the new blocks from the blockchian.
i need a full node capable to download and verify the blocks into sql db. (i know i've repeated this three times Smiley)

i checked out insight it seems pretty cool Smiley but i'm not able to build insight because there are some compile problems whit gyp and visual studio.
hero member
Activity: 525
Merit: 531
August 25, 2014, 12:00:53 PM
#5
The problem with abe is that everytime you want to update the db it needs to reprocess the whole blockchian if abe it will be able to download verify and parse the new blocks into the db is fine. i do not want to rebuild abe db everytime there's a new block Smiley

i'll check insight more closely.

so if you know other ways to run a full btc node with sql db for the blockchian (windows working) please tell me. Smiley

abe is watching the block dat files, if new data is available, process the new blocks/tx to db. no need to rebuild the whole db.
newbie
Activity: 23
Merit: 0
August 25, 2014, 07:02:19 AM
#4
The problem with abe is that everytime you want to update the db it needs to reprocess the whole blockchian if abe it will be able to download verify and parse the new blocks into the db is fine. i do not want to rebuild abe db everytime there's a new block Smiley

i'll check insight more closely.

so if you know other ways to run a full btc node with sql db for the blockchian (windows working) please tell me. Smiley
member
Activity: 73
Merit: 10
August 25, 2014, 12:12:19 AM
#3
Check out https://insight.is
staff
Activity: 4242
Merit: 8672
August 24, 2014, 06:41:13 PM
#2
Your english seems fine— far better than my {whatever your native language is}, no doubt.

Importing Bitcoin data into a SQL database is tricky, you end up with hundreds of gigas of data once you're out of Bitcoin's pretty efficient encoding.   If you're prepared to deal with that, look into Bitcoin ABE.
newbie
Activity: 23
Merit: 0
August 24, 2014, 05:22:10 PM
#1
Hello guys!
i hope you guys can help me find a bitcoin client (runs on windows) that can download and verify the blockchian from the network into sql db.
wallet function is not really need but if there is fine Cheesy.
thanks in advance.
(sorry for mispelling errors i'm not english)
Jump to: