4

1) What is the format of the LevelDB databases stored in the database directory?

I know there are some custom blockchain parsing libraries, such as this one, but I'm wondering if I can just do a read of the chainstate database to get some basic information about the UTXO set.

2) Is there some sort of a LevelDB database explorer GUI that I can use to see what's in this database?

3) Could I have a second program that just read from this database? Would it be safe or would I mess up the database if I tried this?

morsecoder
  • 14,168
  • 2
  • 42
  • 94

2 Answers2

1

You can find how to read the blockchain leveldb (format and meaning of the keys) here: What are the keys used in the blockchain levelDB (ie what are the key:value pairs)?

no idea (yet) for the UTXO :-)

  • 1
    He talks about the unspent transaction set too. Ctrl-F Inside the chain state database – Nick ODell Oct 10 '14 at 17:19
  • @Nick, could you elaborate further on how to get the UTXO set from the chainstate database? That sounds like the answer I am looking for. But many other coins don't have the chainstate database, so how would I do this for those coins? – morsecoder Oct 14 '14 at 14:41
  • @StephenM347 I don't think there's any *coin that doesn't have a transaction index or an unspent transaction index. Way too slow. Be more specific. – Nick ODell Oct 14 '14 at 15:36
  • In my ~/Application Support/Bitcoin/ directory, there is a chainstate directory, which I think has the database of UTXOs. In my ~/Application Support/PPCoin/ directory, though, there is no chainstate directory. Is the UTXO set stored somewhere else in PPCoin? Can you explain what you mean by "Ctrl-F Inside the chain state database"? Thanks! – morsecoder Oct 14 '14 at 15:53
  • @NickODell means: go to http://bitcoin.stackexchange.com/questions/28168/what-are-the-keys-used-in-the-blockchain-leveldb-ie-what-are-the-keyvalue-pair and search the sentence "Inside the chain state database" in your browser. Format of UTXO DB is explained here. – Vincent de Lagabbe Nov 03 '14 at 15:14
0

One guy on GitHub said that his software can make chainstate files readable for humans:
https://github.com/in3rsha/bitcoin-utxo-dump

Mercedes
  • 802
  • 6
  • 25