简体   繁体   中英

How can I add the Hyperledger Fabric explorer to the “Hyperledger composer” environment

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 )

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.

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/Admin@org1.example.com/msp/keystore",
                "cert": "../fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
            }

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM