Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [leveldb]

LevelDB is an embedded key-value storage developed by Google that is used in Bitcoin Core for block index storage and quick access to the UTXO set (unspent transaction outputs).

0
votes
1answer
38 views

Python - Querying bitcoin's block header using leveldb

I am facing a stupid problem. I am trying to read bitcoin/blocks/index leveldb using plyvel. I've set up a regtest and i know there is a block with the hash : ...
0
votes
1answer
18 views

EXCEPTION: 15dbwrapper_error

I'm running Bitcoind 0.17 on a raspberry Pi 3. Everything ran smoothly until I did something wrong (I guess) but can't figure out what happened. Now I got this error. Has someone experience with this ...
0
votes
1answer
34 views

why is bitcoin leveldb separated in so many small pieces?

Currently I could see 1418 ldb files on my box, from 210040.ldb to 215423.ldb (some missing). Why are they separated in this way? I want to read the leveldb using golang, but I don't know which one ...
0
votes
0answers
87 views

LevelDB Key and Value decoding

How to decode Key and Value from LevelDB 482733.ldb (just for example) file which is in bitcoin\chainstate directory? I've parse this file and now try to understand the meanings of the data I have. ...
0
votes
1answer
76 views

How can I get the key of blockindex

According to this post: What are the keys used in the blockchain levelDB (ie what are the key:value pairs)? One type of the keys in leveldb of bitcoin is formed in the following way 'b' + 32-byte ...
0
votes
0answers
160 views

Get value from leveldb bitcoin using node.js?

I request information about the block 100001 using leveldb and node js. Below is my code example. var level = require('level'); var db = level('E:/download/blockchain/block'); var str = '...
3
votes
2answers
119 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?
2
votes
1answer
133 views

Why is wallet.dat BerkeleyDB instead of LevelDB?

Why wasn't wallet.dat migrated to LevelDB? Is it because BerkeleyDB is better at [something] Backwards compatibility
1
vote
1answer
106 views

bitcoin chainstate database parsing in python giving wrong value

I am trying to decode chainstate db for a specific out index for a transaction in python just for learning. Transaction ID: 4d4a4c6ca4f3c91e69563199943336d3279fad71c9e8d9c1708ef9dc6ac16000 out index = ...
0
votes
2answers
66 views

Very hard to sync Core Client from scratch

Recently I started running a Core 15.1 node with the blockchain on an external hard drive, and found it very hard to fully sync the blockchain. The problem I keep running into is that (in about 90% of ...
0
votes
1answer
55 views

Trojans detected in ldb bitcoin database?

I started regular scan and clamscan found lots of trojans in bitcon.lfb blocks. What is it? A mistake? sudo clamscan --infected --recursive --exclude-dir="^/sys" / /root/.bitcoin/data/blocks/index/...
0
votes
1answer
457 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 ...
3
votes
1answer
470 views

Format of a block key's contents in bitcoind's LevelDB?

I am trying to use bitcoind's LevelDB block index files (that are stored in blocks/index) to find the file (e.g. blk00029.dat) and byte position of specfic blocks. Thanks to questions What is the ...
2
votes
0answers
248 views

How to delete last n blocks / roll back to specific block number in Bitcoin Core? (Like `monero-blockchain-import --pop-blocks n`)

I have Bitcoin Core's bitcoind running and synced in a VM. Now I want to clone the VM and run one of the various hard forks (such as Bitcoin Cash) in the clone. The plan is to roll back my copy of the ...
0
votes
2answers
157 views

How does bitcoind store blocks?

I want to parse blockchain manually and extract the UTXO set (for various reasons). Is there any way to understand how the blocks are stored without going through the C++ code? Some specs will be ...
1
vote
2answers
125 views

Non-obfuscated chainstate data

I'm wondering if there is a flag that allows running bitcoind without using an obfuscation key for the chainstate. I haven't been able to find it.
3
votes
1answer
231 views

Chainstate Bitcoin Core 0.15

Recently updated my LevelDB parser to work with the new LevelDB 0.15 internal structure. However, I'm wondering about two small changes I found: The prefix for transactions was changed from b'c' to b'...
-1
votes
1answer
394 views

how to build altcoin in mingw?

OS : Windows 10 Installed Dependencies: -qt4.8.6 gcc 6.3.0 boost 1_55_0 berkeleyDB 4.8.30NC openssl 1.0.2l I tried compiling with the following commands: qmake "USE_UPNP=1" coin-pt.pro mingw32-...
2
votes
1answer
198 views

What will happen when the blockchain size will reach 1 Tb? Or 10 Tb?

My question is more about bitcoin client (bitcoind). Will it still be working fine or maybe something will go wrong? I mean, maybe LevelDB can't handle this amount of data correctly?
2
votes
1answer
167 views

Bcoin - Database backend not found

/root/BCoin/node_modules/bcoin/lib/db/backends.js:16 throw new Error('Database backend "' + name + '" not found.'); ^ Error: Database backend "leveldown" not found. at Object.get (/root/...
2
votes
1answer
103 views

Resyncing bcoin brings up database version error

I was resyncing my bcoin node and got the following error: Error: Warning: Your database does not match the current database version. This is likely because the database layout or serialization ...
4
votes
1answer
589 views

In which order does the leveldb iterator iterate over utxos?

I would like to know in which order the leveldb iterator iterates over the chainstate entries. I aim to serialize the chainstate and have to make sure that every node can calculate exactly the same ...
4
votes
1answer
553 views

Chainstate LevelDB corruption after reading from the database

I've been working with the LevelDB for a few weeks, coding some tools to access the database and parse the data to be human readable. However, every single time I read from the chainstate the data ...
3
votes
2answers
397 views

CVarint serialization format

Recently I started analyzing the UTXO set data that every full node stores in chainstate folder (a LevelDB database). By looking into the code you can learn more or less how the data entries are ...
16
votes
1answer
3k 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, ...
1
vote
1answer
162 views

How does the wallet know which outputs are available with LevelDB

So, I found that in the original Bitcoin client there was a member variable vSpent in the class CWalletTX, however it appears that this is no longer the case in the new version. I know that the new ...
12
votes
1answer
5k views

How does Bitcoin read from/write to LevelDB

I know that Bitcoin Core uses LevelDB since 0.8 version. However, I couldn't find detailed explanation about how Bitcoin stores and retrieves from LevelDB. E.g. If B transaction uses an output from ...
0
votes
0answers
99 views

bitcoin leveldb query give 8 bytes and then?

I try to analyse the bitcoin leveldb database. I give the key: 'b' + 32-byte block hash = 'b' E8 05 E1 78 EF 04 BF 58 38 F1 30 86 56 97 C2 D9 0C 58 60 B2 6F 82 34 FD 78 B3 00 00 00 00 00 00 and get ...
9
votes
1answer
2k 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?
2
votes
1answer
321 views

Bitcoin Chainstate Leveldb sst

I'm trying to read the chainstate, and wrote a small Leveldb client to do so. When I run leveldb, it tells me Corruption: 960 missing files; e.g.: /opt/bitcoin/chainstate/890787.sst. Googling shows ...
0
votes
1answer
440 views

What is the memory usage for checking transaction inputs?

Whenever a transaction is received by a node, the node verifies its validity. To that end, it checks for each transaction input whether that input is part of the UTXO set. It is my understanding that ...
5
votes
1answer
453 views

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/...
3
votes
1answer
868 views

mysql instead of leveldb for bitcoin core

Is it possible to use db other than leveldb for bitcoin core? I'd like to make queries on running node and make views with decoded data
1
vote
1answer
768 views

bitcoin compile error on CentOS 6.6: ‘SIZE_MAX’ was not declared in this scope

I am trying to run a bitcoind instance (branch 0.9 from git repository) on CentOS 6.6 following this guide but I get this error when building LevelDB: Building LevelDB ... make[3]: Entering directory ...
3
votes
1answer
663 views

Trying to understand how bitcore-node stores the data in the DB

I'm looking into the data and source of bitcore-node ( http://bitcore.io/ ), I'm a bit confused how all the information is stored in the database, probably it's in a similar way to others block ...
1
vote
0answers
538 views

Error While making windows.exe using gitian build?

Actually I'm making a logos windows exe (logosd and logos-qt) following the release process, which is mention on below path on any coin you can find that path, I'm working logos LGS Coin that's why I'...
3
votes
0answers
670 views

Querying insight-api to dump all addresses with a positive balance

It's been some time I've been using 'insight-api' (https://github.com/bitpay/insight-api) and I couldn't find any documentation / anything helpful to query leveldb in a way that all addresses with a ...
2
votes
1answer
156 views

How does serializing in coins.h work?

I'm talking specifically about this: /** pruned version of CTransaction: only retains metadata and unspent transaction outputs * * Serialized format: * - VARINT(nVersion) * - VARINT(nCode) * - ...
33
votes
2answers
10k views

What are the keys used in the blockchain levelDB (ie what are the key:value pairs)?

I am wondering if I can use node.js and levelup to access a copy of the blockchain database directly. But from what I can see, I need to know the name of the key(s) before I can get any data, as this ...
8
votes
2answers
9k views

How to access Bitcoin's transaction database?

I want to process the Bitcoin network's transactions. As I understand it, the Bitcoin-Qt client downloads and stores all that information locally. Since version 0.8 LevelDB has been used to access ...