26
votes
What is the Merkle root?
"Figure 7-2. Calculating the nodes in a merkle tree" from Mastering Bitcoin shows the Merkle Root (HABCD) of a list of four transactions: Tx A, Tx B, Tx C, and Tx D:
To verify that a transaction—for ...
17
votes
Accepted
Migration from Berkeley DB to LevelDB
As someone who was involved in doing that migration at the time, I believe it was the right decision. LevelDB is far from perfect, but I wouldn't know what else to use.
In particular:
BDB is much ...
12
votes
Accepted
Why is Bitcoin Core using LevelDB instead of Redis or SQLite?
Redis and LevelDB solve very different problems. We tried using SQLite and its performance was abysmal.
Bitcoin Core needs a database to store the set of unspent transaction outputs (UTXOs). This ...
11
votes
Accepted
Possible to speed up reindex?
reindex doesn't also re-validate blocks, does it?
It does, but signature verification (the slowest bit) is skipped on most of the early blockchain. The command attempts to sync with the network by ...
9
votes
Is a private blockchain better in any sense than a database?
It depends on what you mean by "private". The word private is not really associated with Eris as far as I can tell. Rather, the word "permissioned" is used instead, and therein lies all the difference ...
9
votes
Is a private blockchain better in any sense than a database?
Signed commitments with immutable history are all that’s required for proof of integrity. Moreover, assuming commitments are immutable (transactions can only be reversed by adding a new commitment ...
9
votes
Accepted
Why is the Bitcoin Core wallet database moving from Berkeley DB to SQLite?
The introduction of descriptor wallets presents an opportunity to introduce a new database backend as descriptor wallets are backwards incompatible. The following is taken from Andrew Chow's blog post ...
7
votes
Accepted
Why does bitcoind use a fork of LevelDB for key-value storage?
The fork serves two purposes:
Local modifications that are hard to bring upstream:
Windows support (which is partially based on the existing Windows port, but needed changes for building in MinGW)
...
7
votes
Is a private blockchain better in any sense than a database?
Private blockchains can be seen as a new method for ensuring consistency in a distributed database, even if that database is an environment of perfect trust. There is an equivalence between how a ...
7
votes
Why are blk*.dat files ~134200000 bytes?
The constant is called MAX_BLOCKFILE_SIZE and is set in src/validation.h. It is currently set to 0x8000000 which is 128 MiB (134,217,728 bytes).
You can see where it is checked in FindBlockPos() ...
6
votes
Accepted
How long is a Bitcoin?
A bitcoin is not a piece of data, and therefore does not have a length. A bitcoin, the unit of currency, is just like any other unit of measurement. It wouldn't make sense to ask "how much data is a ...
6
votes
Accepted
UXTO DB structure
Each entry in the new 0.15 format is defined as outpoint:coin, and has the following structure:
Outpoint is formed by: key | tx_hash | index.
Where the key corresponds to b'C', or 43 in hex. The ...
6
votes
Accepted
API for large number of queries to different addresses every few minutes
You can use a self-hosted (but low-burden!) instance of Esplora.
Blockstream is also exposing an instance for free (at the moment) at blockstream.info.
Disclaimer: if you take part of Bitcoin as an ...
5
votes
Is a private blockchain better in any sense than a database?
Researcher Arvind Narayanan stated his opinion on this matter in his post “Private blockchain” is just a confusing name for a shared database:
It is true that adding signatures and hash pointers ...
5
votes
Accepted
What is the most efficient way to store bitcoin addresses in a database?
It's not really clear what your use case is.
If you need to retrieve the addresses later, you can store each address as a string. That's only ~34MB, which easily fits in memory.
To save space, you ...
5
votes
How does "headers first" affect BLKxxxx.dat structure?
To the best of my understanding, it's just that the blocks are stored in a different order. Headers first synchronization makes use of parallel downloads and the blocks are downloaded (and then stored)...
5
votes
Accepted
What database engine does Bitcoin and other top altcoins use?
It depends on the implementation. The network itself does not have a database engine. Bitcoin Core and software derived from it (most altcoin software is derived from Core) uses LevelDB to index the ...
4
votes
Accepted
Does Ripple use an RDBMS? If so, which one?
The ripple server uses SQLite for structured data and a configurable "back end" for unstructured "bulk" storage.
The structured data consists of things like transactions indexed by which accounts ...
4
votes
How to store blockchain data
If you settle for a relational DB you can try BitcoinDatabaseGenerator.
https://github.com/ladimolnar/BitcoinDatabaseGenerator/releases
Sources and wiki: https://github.com/ladimolnar/...
4
votes
Where can I learn how to build a blockchain from scratch?
There was a recent presentation by Portia Burton going over some of the basic steps in creating your own custom blockchain based on Ethereum, however it is in Node not Python as you are requesting.
...
4
votes
Accepted
How to save the bitcoin core (bitcoin-qt) database for later?
Ok, I think I got it.
Here is a short guide based on this bitcoin wiki article.
Notes:
This does not concern backing up your keys. If you lost your wallet, or your keys, and you made the backup ...
4
votes
Why was Bitcoin Core in need of a fork of LevelDB?
Sometimes LevelDB has bugs and those bugs sometimes are not fixed in a timely manner in the upstream LevelDB project. These bugs can be problematic for Bitcoin Core so a fork of LevelDB was created to ...
4
votes
Accepted
How to store private key in MySQL database?
Storing private keys in an online server is not best practices (even if you quickly transfer to an offline wallet). Generally, you should not store private keys on an online device
Instead, if you ...
4
votes
What database tables structure do bitcoin uses?
There simply is none. There's a key value store in LevelDB for the UTXO, and for miscellaneous things like the locations of block files on disk. Relational databses are far too slow for the task, and ...
4
votes
Accepted
Bitcoind Node crashes after using -dbcache option
You are allocating far too much dbcache. If you allocate 4000 MB to the dbcache, you will use up all of your RAM and it will crash. Your operating system needs RAM, Bitcoin Core itself needs RAM ...
4
votes
Getting "Unable to find DB driver for sqlite3" when trying to start c-lightning node
Most likely this is due to a mismatch between the sqlite3 version that c-lightining was compiled with and the version your OS currently has installed. With the recently release v0.10
2, c-lightining ...
4
votes
Accepted
explore sqlite wallet
The data stored is binary data, which is why it comes out garbled. It is not text. So you will have to convert the data to something human readable. One such method is to convert it to hex. One such ...
3
votes
Is a private blockchain better in any sense than a database?
Blockchain is a mere chain of blocks and this respect is worse than every database on earth. What makes the public blockchain unique is the proof-of-work that ensures that thousands of copies of the ...
3
votes
How to store blockchain data
This probably depends on the type of queries you want to make and the data you want to retrieve from the database.
Personally, I have made good experiences with using a graph-database to traverse the ...
3
votes
Meaning of the Tables in the Blockchain Database
I've worked with Abe for some time; I'll try to have a run at it... I'm using the latest table list from Database version Abe39 on MySQL.
Utility tables:
abe_lock:
Used for locking while performing ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
database × 111blockchain × 33
bitcoin-core × 25
leveldb × 11
bitcoind × 9
bitcoin-core-development × 9
transactions × 7
wallet × 7
utxo × 6
block × 5
wallet.dat × 5
raw-data × 4
storage × 4
address × 3
security × 3
api × 3
synchronization × 3
full-node × 3
ripple × 3
error × 3
cache × 3
private-key × 2
exchanges × 2
blockchain.info × 2
client × 2