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.

Filter by
Sorted by
Tagged with
62 votes
6 answers
68k views

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 ...
Steven Roose's user avatar
  • 11.8k
33 votes
1 answer
12k views

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 ...
turtlepower's user avatar
44 votes
1 answer
10k views

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 ...
ThePiachu's user avatar
  • 43.1k
22 votes
1 answer
6k views

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, ...
Mark Messa's user avatar
5 votes
1 answer
3k views

Can I regenerate blkindex.dat from blk0001.dat?

My copy of blkindex.dat became corrupted, but I still have the whole blk0001.dat file. Is it possible to reconstruct the blkindex.dat file from the blk0001.dat file or do I have to delete both files ...
Chris Moore's user avatar
  • 14.8k
5 votes
1 answer
747 views

What technology will supersede the BerkleyDB format? What are the current scalability limitations?

How scalable is the BerkleyDB format (the technology used within a wallet), and what are its limitations? What technology would replace or supplement BerkleyDB to address those scalability challenges?...
makerofthings7's user avatar
2 votes
1 answer
4k views

Bitcoind Node crashes after using -dbcache option

I've been trying to speed up my node sync by increasing the dbcache. However my node tends to crash overnight. My system is running ubuntu 18.04, 4GM of ram bitcoin core v0.18. I've tried bitcoind -...
nakamoto_connection's user avatar
33 votes
7 answers
10k views

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 ...
ThePiachu's user avatar
  • 43.1k
12 votes
1 answer
6k views

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's user avatar
10 votes
1 answer
3k views

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's user avatar
10 votes
4 answers
9k views

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 ...
jwelsh's user avatar
  • 373
8 votes
1 answer
1k views

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 ...
Ninazu's user avatar
  • 195
5 votes
2 answers
633 views

Is the transaction database ever shortened?

I just downloaded the bitcoin client and the full transaction database and did not fail to notice that it took me more than a day to download and check the transaction database and that it occupies ...
Jocour's user avatar
  • 51
5 votes
1 answer
143 views

Efficiency of storing/querying transactions in a relational database

I have a full node, and have written some limited python programs with bitcoinrpc. I want to start doing slightly more ambitious things now, e.g. visualisations across the entire blockchain (possibly ...
d3wannabe's user avatar
  • 275
4 votes
1 answer
1k views

What is the most efficient way to store bitcoin addresses in a database?

Let's pretend I wanted to store 1MILLION btc addresses in mysql, I thought about saving the last 10 digits of each submitted address and testing against that but would 10 characters be enough to ...
derrend's user avatar
  • 696
3 votes
1 answer
515 views

API for large number of queries to different addresses every few minutes

I have an application that needs to makes queries to get address balances and transaction data from Bitcoin. What are some possible solutions to this? It would be great if I didn't have to manage a ...
Patoshi パトシ's user avatar
3 votes
2 answers
417 views

Why was Bitcoin Core in need of a fork of LevelDB?

Why did Bitcoin Core fork LevelDB? What special needs does Bitcoin Core have, which require a specialized version of LevelDB?
MCCCS's user avatar
  • 10.2k
2 votes
1 answer
100 views

What is the data format layout for txindex LevelDB values?

The keys I understand, t + 32-byte hash. But my problem are the values. I understand from sources such as What are the keys used in the blockchain levelDB (ie what are the key:value pairs)? that the ...
Ciro Santilli OurBigBook.com's user avatar
2 votes
1 answer
638 views

What's raw undo data for?

I see block chain is stored basically four pieces of data that are maintained: blocks/blk*.dat: the actual Bitcoin blocks, in network format, dumped in raw on disk. They are only needed for ...
memorybox's user avatar
  • 141
1 vote
1 answer
127 views

Is blockchain really secure to store sensitive data?

Plenty of developers these days trying to decentralise everything. I noticed some developers claim that they are gonna replace email with blockchain technology. johnmcafeeswiftmail, CryptaMail, ...
PrivateUser's user avatar
1 vote
1 answer
291 views

storing bitcoin's database directory on an external drive?

I have a new-ish powerful laptop with SSD, limited to 128GB. It came with a RAID which somehow didn't work for installing linux, so I had to disable the RAID and now I have actually two 64GB disks ...
unsafe_where_true's user avatar
-2 votes
1 answer
168 views

How do I upload a file to a testnet blockchain?

I want to upload files to the testnet blockchain, specifically the Bitcoin testnet. I am looking for help on how to add a file to the Bitcoin testnet blockchain. I know that these coins are super easy ...
Number File's user avatar