How can I add the Hyperledger Fabric explorer to the "Hyperledger composer" environment

3.3k Views Asked by At

As I understand, the Hyperledger composer environment runs on a Hyperledger Fabric v1.0 (or 0.8?) blockchain.

Beside the REST server to interact with the blockchain or see the transaction, participants etc. is is possible to see which transactions are in which block, like on the Hyperledger explorer? (https://github.com/hyperledger/blockchain-explorer)

3

There are 3 best solutions below

2
On BEST ANSWER

Yes it is possible to see which transactions are in which block, and Yes you can use Explorer to view the transactions on a Hyperledger Fabric blockchain.

All you need is to clone the repo in the link you shared and create the relevant database by executing the mysql script mysql -u<username> -p < db/fabricexplorer.sql. Afterwards, you can start your network and note the channel name. Then, edit the file blockchain-explorer/config.json and include the channel in the channel list. Then, go to http://localhost:8080 and you will see the statistics of the channel you had indicated.

Hope this helps.

0
On

In Hyperledger Explorer Dashboard, you can find the information such as blocklist and block details including transaction information, previous hash, data hash etc. As you click on a block (#number) in the blocklist, the block details show up in another pane. This page covers up the more detail.

3
On

After several hours of trying and exercising the Explorer works now. (jippii)

It was not that easy for me as a beginner, so for those who need some hints:

Since TLS is in my dev environment not necessary, change grpcs to grpc in the config.json :

"peer1": {
            "requests": "grpc://127.0.0.1:7051",
            "events": "grpc://127.0.0.1:7053",
            "server-hostname": "peer0.org1.example.com"

and change to path to your running fabric composer keystore and certificate: /fabric-scripts/hlfv1/composer/....

"admin": {
                "key": "../fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore",
                "cert": "../fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts"
            }