Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Ikinoki on November 22, 2013, 11:59:50 PM



Title: //////////////////////////////////////////////////
Post by: Ikinoki on November 22, 2013, 11:59:50 PM
/////////////////////////


Title: Re: Alternative storage for the blockchain
Post by: moderate on November 23, 2013, 12:41:48 AM

I know that leveldb ..

So is there a way to store blockchain in key-value storages ?


Have you tried finding out what leveldb is ?


Title: Re: Alternative storage for the blockchain
Post by: Sukrim on November 23, 2013, 01:36:21 AM
Do you know what levelDB is used for in bitcoind? ::)

Anyways, if you need a faster version of it, you can check facebook's pimped version: http://rocksdb.org/


Title: Re: Alternative storage for the blockchain
Post by: gmaxwell on November 23, 2013, 02:42:28 AM
Why don't you go do some testing and find out where it falls down?

Otherwise it's all just buzzwords: REDIS HAZ WEBSCALE!!!!

You might also try looking at the implementations which alreay have used postgresql...


Title: Re: Alternative storage for the blockchain
Post by: Sukrim on November 23, 2013, 03:49:50 AM
Yeah, looks like MtGox tried the multiple bitcoind thingie - they started to get into race conditions and double spend each other from time to time.


Title: Re: Alternative storage for the blockchain
Post by: justusranvier on November 23, 2013, 04:46:29 AM
Both btcd and Bits of Proof are capable of swapping out block storage databases.


Title: Re: Alternative storage for the blockchain
Post by: wumpus on November 26, 2013, 07:14:03 AM
It's the wallet implementation in bitcoind (which uses berkelydb) that has performance/scaling problems, not the block chain handling (which uses leveldb).

The 0.9 release will include "disable wallet" mode, and I expect in time that will be the recommended way of running your own full node. You can use any SPV-ish wallet client (or multiple!) on top.

Sure, because you'll need to cross verify the txs, and it's not that easy with no direct leveldb access and only json capabilities of bitcoind, and I'm not sure it's possible to partly lock leveldb to make a transaction atomically.
You may be able to do what you want through the raw transaction API (createrawtransaction/signrawtransaction/sendrawtransaction/getrawtransaction). There is no direct leveldb access but there are low-level queries in the JSON interface.

You can also lock specific outputs from being spent using lockunspent.


Title: Re: Alternative storage for the blockchain
Post by: jdbtracker on November 26, 2013, 08:47:44 AM
Hi everyone,

I know that leveldb is fine for embedded, but we need to think big. Soon or later the Nodes will also be a business.
So leveldb will start to slow down soon or later.

So is there a way to store blockchain in SQL (postgresql, mysql), No-SQL (mongo, orient), key-value storages (redis, memcached)?
It would be really nice to choose a medium, especially for big business.

I think SQLite is part of BerkleyDB, I went and looked at the performance between SQLite and LevelDB is pretty much the same... so what needs improvement?