Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm interested in seeing the schema (layout and indexes) that is used in the reference client. Namely wallet.dat, the bk** files and also the in-memory uncommitted tx.

Does this exist anywhere for the 7.x client or the newer BerkleyDB format?

I'd like to see what, if any changes are being made to accommodate BIP 0034.

share|improve this question

There are the bitcoin-tools by Gavin Andresen but they will only work up to version 0.7 of Bitcoin-QT. If your goal is to simply check whether the blocks are version 1 or 2 I suggest you do something like this:

MAX_HEIGHT=`bitcoind getinfo | grep blocks | grep -oE '[0-9]+'`
for HEIGHT in `seq $MAX_HEIGHT -1 $MIN_HEIGHT`; do
  HASH=`bitcoind getblockhash $HEIGHT`
  VERSION=`bitcoind getblock $HASH | grep version | grep -oE '[0-9]+'`
done >> block-versions.csv

This will get you a Comma-Separated file with the block's height,its hash and version.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.