Linked Questions

41 votes
4 answers
17k 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 ...
T9b's user avatar
  • 1,354
8 votes
5 answers
10k views

How to find utxo?

I might be over thinking this, but I'm trying to figure out the best way to build an unspent output pool. Should I just naively parse every block? Every input gets removed from the hash set, and every ...
Matt's user avatar
  • 550
6 votes
1 answer
2k views

What is an obfuscation key?

This message appears in my debug.log: 2017-01-21 00:16:42 Opened LevelDB successfully 2017-01-21 00:16:42 Using obfuscation key for /home/<username>/.bitcoin/blocks/index: 0000000000000000 As ...
Nick ODell's user avatar
  • 29.4k
3 votes
2 answers
2k views

How can a miner verify that a UTXOs is not spent elsewhere?

How does a miner verify that a UTXO is not spent somewhere else, wouldn't he have to search the entire blockchain from that UTXO and onwards to see if this was the case? Assuming any real scale this ...
no nein's user avatar
  • 297
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
3 votes
0 answers
1k views

How to directly query leveldb database to get get a record by transaction hash or by sender's address?

I learned that the blocks and transactions are stored locally in .bitcoin/blocks/index and .bitcoin/chainstate databases, respectively. I want to make a direct query to those databases to measure the ...
Noureddine's user avatar
1 vote
2 answers
626 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 : ...
Elerir's user avatar
  • 11
0 votes
2 answers
441 views

How to get the block hash in the chainstate leveldb?

From this link What are the keys used in the blockchain levelDB (ie what are the key:value pairs)?, to get the block hash I use the obfuscation key and xor it with the result I get from the db. So I ...
guest1234312's user avatar
0 votes
1 answer
210 views

Bitcoin - Read transaction details from LevelDB

I am new to LevelDB and the way BTC keeps everything in the database. I went through article How does Bitcoin read from/write to LevelDB but was not able to get to the first step - Transaction ...
Ankit's user avatar
  • 29
0 votes
1 answer
220 views

Bitcoin - Level DB - Block Index - Parsing value for block hash

I am trying to read the value against block hash in level DB of Bitcoin node database - Block/index. For Genesis block, I get 88 bytes which I want to parse. I tried to follow instructions in https://...
Ankit's user avatar
  • 29
0 votes
0 answers
172 views

existing solution to build a bitcoin address-balance index

I've a full node running in a AWS vm. I want to develop an app which would be able to provide balance for a given btc address. I know blockchain.info and blockexplorer.com exists but I want to do my ...
kdas's user avatar
  • 141
0 votes
0 answers
17 views

How to decode bitcoin node's chainstate data stored in LevelDB?

I am trying to decode the data available in the chainstate. After doing some research, I see that Google's LevelDB is mentioned (like in this post). However, I am still not sure how to effectively and ...
ram's user avatar
  • 1