Questions tagged [database]

A database is a store of information (data) about a specific subject area. Specific software to facilitate the storage indexing and retrieval of a database is known as a database management system DBMS. For example, The Bitcoin-Core wallet uses several DBMS' to maintain several databases about wallet contents and about the list of transactions known as the blockchain.

118 questions
62
votes
6 answers

What is the Merkle root?

The Bitcoin wiki Vocabulary article explains why the Merkle root exists: Every transaction has a hash associated with it. In a block, all of the transaction hashes in the block are themselves hashed (sometimes several times -- the exact process…
Steven Roose
  • 11,473
  • 8
  • 44
  • 71
44
votes
1 answer

What do the different .dat files contain?

What data do different Bitcoin .dat files contain? How about the other files in the same folder? The wallet.dat file is somewhat documented and there are some ways to convert it to human-readable form, but I don't think the same can be said about…
ThePiachu
  • 42,931
  • 25
  • 138
  • 347
33
votes
7 answers

Is a private blockchain better in any sense than a database?

Since the banks appear to be currently looking into the idea of "blockchains" but don't want to be dealing with "Bitcoin", it seems that there is a lot of hype for private blockchains out there like Eris or Hyperledger. However, a lot of people tend…
ThePiachu
  • 42,931
  • 25
  • 138
  • 347
33
votes
1 answer

What is the database for?

I see the block chain is stored according to the block chain format specification. But I also see there is a database, which is currently a leveldb database. Why is the block chain stored in two different ways? Seems redundant.
turtlepower
  • 478
  • 1
  • 4
  • 7
22
votes
1 answer

Migration from Berkeley DB to LevelDB

In 2013 a new bitcoin core was released and one of the supposed improvement was migrating from Berkeley DB to LevelDB. According to the release notes at bitcoin.org: LevelDB, a fast, open-source, non-relational database from Google, is now used…
11
votes
1 answer

Why is Bitcoin Core using LevelDB instead of Redis or SQLite?

Why did Core move from BDB to LevelDB? Why don't they use SQLite or move to Redis now? Is there a technical reason for this choice?
Etherkimist
  • 135
  • 1
  • 5
10
votes
4 answers

Possible to speed up reindex?

I just reindexed a node that was already synced (in order to enable txindex); it took around 9 hours. It's on a pretty good system: 16G RAM, i7 with 4 physical cores. Storage is a weak point, with LUKS on software RAID0 on spinning disks. dbcache is…
jwelsh
  • 373
  • 2
  • 8
9
votes
1 answer

Why is the Bitcoin Core wallet database moving from Berkeley DB to SQLite?

Why is the Bitcoin Core wallet moving from Berkeley DB to SQLite for its database backend?
Michael Folkson
  • 14,337
  • 3
  • 11
  • 45
8
votes
1 answer

UXTO DB structure

After update Bitcoin Core to version 0.15, chainstate database changed format of data. Old prefix of key has been 0x63, now 0x43, and key/value are different Where is the new format described, or can someone have work on…
Ninazu
  • 195
  • 6
8
votes
1 answer

Why are blk*.dat files ~134200000 bytes?

I understand that blocks are stored on disk across multiple blk*.dat files, but why is the maximum file size roughly 134,200,000 bytes? What's the reason behind this file size? Where can I find this setting in the source code? What's the exact…
inersha
  • 2,928
  • 1
  • 17
  • 41
7
votes
3 answers

Cache the Bitcoin Datadir to Improve Performance? Increase Bitcoin DB Cache Size?

Bitcoin is very disk-intensive and that slows it down. It seems to flush data to disk often thus preventing proper caching. With the datadir on a RAMdisk it is much faster. Is it possible to increase the db cache size or do something else to improve…
kermit
  • 2,009
  • 1
  • 17
  • 26
7
votes
2 answers

How does a Bitcoin client efficiently change forks?

Occasionally, a Bitcoin client will come across a fork of blocks that is longer than the chain it is currently on. Depending on how often orphaned blocks occur, this could be quite often. When this happens, any internal data structures relating to…
interfect
  • 243
  • 1
  • 5
6
votes
1 answer

What database engine does Bitcoin and other top altcoins use?

I'm curious to what database engine does Bitcoin and other altcoins use to store their blockchain data. Do they all support sql queries or is it something else? The main ones I'd like to know are: Bitcoin, Litecoin, Monero, Ethereum, Dash, Ripple,…
Patoshi パトシ
  • 10,956
  • 18
  • 80
  • 151
6
votes
1 answer

Why does bitcoind use a fork of LevelDB for key-value storage?

Since 0.8 bitcoind uses LevelDB for the storage of the UTXO set in chainstate/ and the block index in blocks/index/. On github special branch of LevelDB can be found: https://github.com/bitcoin/leveldb What reasons made LevelDB the best choice for…
Felix Weis
  • 319
  • 3
  • 10
6
votes
3 answers

How to store blockchain data

If I wanted to imprint the blockchain data on a database, with the purpose of performing complex or just different than the RPC-based queries, how would I do it? Would I have to go for a relational database or a NoSQL one? Eventually the database…
Doug Peters
  • 1,366
  • 14
  • 23
1
2 3 4 5 6 7 8