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.
124
questions
1
vote
1
answer
50
views
levelDB : How does the key/values pairs work for datadir/blocks/index/
I'm trying to understand the format of key/value pairs in LevelDB for Bitcoin data storage.
Given the following raw key and value:
Raw Key: ...
2
votes
1
answer
148
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 ...
0
votes
0
answers
223
views
how to get the private key in Bitcoin Core 26.0.0 and how to create a legacy wallet
i had tried many methods but nothing help me
,
by using bitcoind -deprecatedrpc=create_bdb
i think i had installed the Berkeley DB
please help me to solve the problem
0
votes
1
answer
46
views
Bitcoin API for getting an input script?
I wanted to try talking to my bitcoin node to get the input scripts and put them into a database. Does anyone have good resources on where I can look to get started?
4
votes
3
answers
347
views
What data does the Bitcoin Core wallet search for during a blockchain rescan?
When the wallet examines a transaction for relevance what does it do exactly with that transaction's output scripts and what is that data compared to? Does the wallet database store a table of all the ...
1
vote
0
answers
47
views
Indexing Spent UTXOs
I want to do analytics on bitcoin data and for this I would need to be able to check in what tx a spent UTXO is spent.
For this Im going to index all spent UTXOs in a database and I need help with ...
1
vote
1
answer
144
views
Understanding Bitcoin - Usage of Merkle Trees
I'm currently learning about the Bitcoin blockchain.
I've come across the concept of Merkle trees in the context of Bitcoin. I understand that Merkle trees are used to verify the integrity of the data,...
1
vote
1
answer
3k
views
How can one examine the contents of the wallet.dat file using sqlite3?
These two questions (1, 2) discuss what is in wallet.dat. Andrew Chow states in 2017 (when the database was still BDB and not sqlite):
The wallet.dat file contains your private keys, public keys, ...
5
votes
1
answer
189
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 ...
3
votes
1
answer
59
views
Why isn't the backed up sqlite3 exactly same as the lightningd.sqlite3?
In the backing up page of C-Lightning, it says:
The main and backup files will not be identical at every byte, but they will still contain the same data.
Is there any specific reason this happens? ...
1
vote
1
answer
338
views
Error installing on Mac - Build does not support Berkeley DB database format
Im following the guide here (https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md) to install Bitcoin on my Mac. I want to be able to run bitcoind with and without the GUI.
The first time I ...
4
votes
1
answer
111
views
What is involved in the "database compaction" of a LND node?
As lightning network channels route payments, channel updates require the 2 channel peers (Alice & Bob) to do a round of signing and trade commitment transactions for the most up-to-date channel ...
0
votes
1
answer
77
views
Database of altcoins?
Is there a database of all the major altcoins and their address types?
Bitcoin Wiki doesn't have very many, nor does it describe their address formats.
3
votes
1
answer
192
views
explore sqlite wallet
I created an sqlite wallet, tried to browse it from the sqlite3 program, but had to reset (tset) the terminal after querying the main table garbled the console characters. How to query the main table ...
3
votes
2
answers
131
views
Getting "Unable to find DB driver for sqlite3" when trying to start c-lightning node
Hey I just started receiving this message for my c-lightning node when try to start it.
Unable to find DB driver for sqlite3:///root/.lightning/bitcoin/lightningd.sqlite3
It started happening after I ...
1
vote
1
answer
2k
views
How to fix “Error opening block database”?
How to fix this?
My computer shut down without closing the program and now I try to help the network but cannot open the app... I'm a newbie, excuse myself please!
0
votes
1
answer
144
views
Are the block headers kept in memory?
Bitcoin Core keeps block data as files in the file system and blocks indexes in a LevelDB database to make the search process of transactions and blocks faster. But Bitcoin Core also stores block ...
4
votes
1
answer
429
views
Layout of new SQLite descriptor wallets in v0.21 and v22.0?
I'm trying to explore the database format of the new descriptor wallets in Bitcoin Core v0.21 and v22.0, but I can't quite figure it out. I've created a new descriptor wallet and dumped it's contents ...
2
votes
1
answer
189
views
How to identify Taproot transaction using big query?
From bitcoin magazine, I saw that
When Taproot/Schnorr goes live soon, they will use the new witness version one to distinguish them from older Segregated Witness transactions.
But when I check the ...
1
vote
0
answers
143
views
Use wallet db for locked UTXOs in Bitcoin Core
Related question: Why are UTXO locks stored in memory only?
Sorry this maybe a dumb question for people good with using database in C++ however I am not able to understand what exactly is going wrong ...
0
votes
1
answer
185
views
Bitcoin data by country?
I am a political science graduate student looking to do research on bitcoin and cryptocurrency. To do so, however, I need data. While many datasets provide wonderful histories of bitcoin price and ...
1
vote
0
answers
69
views
DB Structure for bitcoin blocks
https://github.com/blockchain-etl/bitcoin-etl#schema
I found a library to parse the block data in json format. I want to parse that json and put it into a db to then use that for calculating balances. ...
1
vote
2
answers
2k
views
How to extract all info for a public address from a local full node's db?
I recently started running bitcoind on a local Debian host, and I am still learning how to use the information in the local copy of the bitcoin blockchain.
I would like to extract all the information ...
0
votes
1
answer
133
views
how is blockchain data stored and accessed?
Can blockchain data be stored in a relational database? If so what would the schema be? I know blockchain itself is a data structure, but how is the data stored? In JSON files? In a RDBMS? in CSV file?...
3
votes
2
answers
303
views
Is there any reason for an alternative Bitcoin implementation to use Berkeley DB?
The primary reason Bitcoin's C++ reference implementation uses Berkeley DB 4.8 seems to be backwards compatibility. It doesn't appear that BDB4.8 (or BDB at all for that matter) has any superior ...
1
vote
1
answer
502
views
Can I use my "chainstate" folder for anything?
I've recently found an old folder called "chainstate" in my PC.
Can't remember why I saved it but inside it there's the following files:
"000003.log"
"CURRENT"
"LOCK&...
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?
3
votes
1
answer
1k
views
What is in the Bitcoin Core LevelDB dbcache? Is it full records or metadata?
What is in the Bitcoin Core LevelDB dbcache? Is it full records or metadata?
This question was asked on IRC by Anonymous.
0
votes
1
answer
88
views
Tiny 1-block forks in blk.dat files
I just completed parsing the Testnet3 Bitcoin blockchain stored in the blk.dat files into a database. Since I was using multi-processing to parse several files at the same time, I didn't add the ...
3
votes
1
answer
556
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 ...
0
votes
1
answer
342
views
Why does Bitcoin store keys in a database?
According to this Bitcoin stores the user's keys and some additional data in a file called wallet.dat, which is a Berkley DB. Let's suppose the wallet.dat contained only the user's keys. Let's also ...
1
vote
1
answer
56
views
Is the index db downloaded from peers or generated locally?
When the user start the Bitcoin client for the first time, it will download the whole blockchain.
But what about the block index (blkindex.dat in older versions) ?
Is it downloaded from peers just ...
-1
votes
1
answer
60
views
Are Core's blockchain reads parallelized?
Does Core have a mutex allowing one read at a time from the blockchain, or can reads be parallelized? If multiple reads from different threads is possible and there's no single mutex, it is advised to ...
1
vote
1
answer
477
views
Raspberry Pi 3 / Bitcoin Node / No space left on device / Link Database to External Hard drive / [duplicate]
I was following @meeDamian Bitcoin node guide on a Raspberry Pi 3 and could get almost everything to work except that it stores the Blockchain on my USB Harddrive. Its mounted and I have disk space ...
4
votes
4
answers
912
views
What is the currently most efficient and reliable method to store the Bitcoin blockchain in a local database?
I have seen several posts on this before, and have tried all the suggested solutions, but I can't get any of them to work.
I am interested in analysing transactions with the OP_RETURN opcode for a ...
4
votes
0
answers
359
views
Is it safe to skip the initial block verification at startup?
The longest step in bitcoin core initialization is "Verifying last 6 blocks at level 3". The number of blocks checked at startup went down from 288 in 2014 to 6 now. Therefore, in order to speedup ...
0
votes
0
answers
273
views
Creating a "listunspent" API call using MongoDB
I used a tutorial online to create my own block explorer (https://www.youtube.com/watch?v=laeV2slJgc8).
In this tutorial, I used "Iquidus" to create the block explorer, which uses MongoDB and Node....
-2
votes
1
answer
172
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 ...
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 -...
5
votes
1
answer
4k
views
Recovery of a corrupted wallet
I have a very old wallet.dat that I've put into my .bitcoin folder. When trying to run bitcoind, the service stops giving the following error
2019-06-11T18:14:02Z Using wallet directory /home/nom/....
0
votes
1
answer
68
views
What database tables structure do bitcoin uses?
What databases do bitcoin core (nodes) uses? And how looks tables structure? I can't find it anywhere...
1
vote
1
answer
130
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, ...
3
votes
2
answers
2k
views
How to store private key in MySQL database?
I want to receive payments from Bitcoin on my web app, but I do not want to use corporate gateways (coinpayments, bitpay, etc), I'm wanting to make my own gateway. I do not know how best to do this ...
-1
votes
1
answer
95
views
"Centralized Relational Databases" vs. "Decentralized Blockchain " : Which one is really more scalable?
There are many research papers on problem of scalability of blockchains:
Just as an example : An Overview of Blockchain Technology: Architecture, Consensus, and Future Trends
However, (usually by ...
3
votes
2
answers
422
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?
1
vote
1
answer
81
views
how a system based on a blockchain would deal with exponential growth of informations carried in it?
I was reading this article about the difference between a blockchain and centralized servers and a question came up to my mind: if I understand well the difference stands in the fact that in a ...
0
votes
1
answer
451
views
How to explore ripple ledger? [closed]
I'm running a ripple node on my own server, and try to conduct some analysis to the balance of all ripple accounts. Thus I need to synchronize the ledgers and analyse them.
Currently, my server has ...
2
votes
1
answer
672
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 ...
0
votes
1
answer
838
views
Bitcoin blockchain in mongodb
How bad would it be to use MongoDB as a Bitcoin database instead of LevelDB? I know that LevelDB is faster but I've also read that MongoDB is better for doing queries.
It seems cleaner to store the ...
1
vote
2
answers
68
views
what's CCoinsViewDB::GetHeadBlocks for?
I have google a lot, there exists little information, confused with the code comments
Retrieve the range of blocks that may have been only partially written. If the database is in a consistent state,...