If you click on random wallet at block explorer you get an instant info of all the transactions, balance etc etc. My question is, how their technology works exactly? Do they transform blk????.dat files in some kind of database and then read the stuff from database? If they are, what technology they use to put all transactions in database? Is there any protocol I try to do as well with programme?

When I open blk.dat files, I see only weird chars and from what I have read so far, the info there is not really transparent.

1 Answer 1


blk.dat files contain blocks data in raw format. Also a leveldb index is maintained that helps to quickly lookup blocks/utxo. You can find the details here and here.

Blockexplorers will not directly read these files. It is not safe for multiple process to access leveldb at the same time (blockexplorer and bitcoin node process). Here is a brief summary of what a blockexplorer will do:

  1. Create tables having indexes to store blocks/transactions/addresses
  2. Do RPC calls/ listen to callbacks to bitcoind to get latest data
  3. Store fetched data into tables
  4. Goto 2.

Most of the commonly used blockexplorers are forked from the below opensource code:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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