I am developing a hyperledger fabric client application. I have set up the default hyperledger fabric network using IBM blockchain platform vs code extension. I am able to view the world state in couch db in the web interface. How do I view all the transactions stored in the blocks of the blockchain? I am using a windows 10 machine. TIA.
1 Answers
Generally speaking, the literal transactions should be much less interesting than, the world state. You'll find the initial proposal and parameters, a read/write set, any chaincode event, and then a lot of assorted certificates, signatures, and other boilerplate that isn't terribly interesting for most users.
That being said, if you retrieve a block (either using QSCC, or better yet the Deliver service such as via peer channel fetch) you can decode the block to JSON using the configtxlator tool. Although the original, and most common use for this tool is inspecting config blocks, it should work just fine on normal blocks as well.
You can decode a block using the command:
configtxlator proto_decode --type common.Block --input <your_input_block>
If you want to do this decoding from inside an application, configtxlator can also operate as a REST server and you can see examples of how to invoke it using curl in the documentation.