blockfile_000000 - Blockfiles of Blockchain


What is blockfile_000000 Blockfiles of Blockchain?



Blocks of a blockchain are stored in physical files. Since they are very static once created, there is no need to store them in database.

Hyperledger Fabric combines multiple blocks into a single blockfile, and stores it in the /var/hyperledger/production/ledgersData/chains/chains directory on the peer container.

Since each channel has its own block, blockfiles are stored in sub-directories, one per channel. You can view and download blockfiles as shown below.

$ docker exec ls -l 
-rw-r----- 1 root root 31232 Apr  1 16:11 blockfile_000000

$ docker cp\
   blockfile_000000 .
$ more blockfile_000000


As you can see, the blockfile is also in binary format, you need a tool to parse it.


Setup Node.js for WYFA Tests

Read Block Data in Blockchain

WYFA (Writing Your First Application)

⇑⇑ Hyperledger Tutorials

2020-02-07, 491👍, 0💬