Hi,

Thanks for reaching. Those block files are collected (fetched) from the ledger. Here is how you can do so.

Go to shell of either CLI or a Peer Node

docker exec -it cli <or peer0.org1.example.com> bash

Then use peer channel fetch command to get the block

peer channel fetch <block#> -c <channelID>

And you will see a .block file created. Finally you can convert it into JSON with this tool.

configtxlator proto_decode --type common.Block --input <block file> --output <.json file>

Then you can see what’s shown in the article.

Reference: https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peerchannel.html

cheers, kc

Written by

Happy to share what I learn on blockchain. Visit http://www.ledgertech.biz/kcarticles.html for my works. or reach me on https://www.linkedin.com/in/ktam1/.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store