4

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)

PiiiZH
  • 100
  • 1
  • 6

3 Answers3

2

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.

Goodman
  • 138
  • 10
  • I already have a Blockchain solution and an AngularJS application to view my assets, participants, and transactions. How can I wire up my Blockchain solution to view the analytical data in Explorer? – Sriram B Dec 29 '17 at 04:39
  • I haven't done much along that line, but I would think you could just display the relevant values from the mysql database – Goodman Jan 04 '18 at 07:03
2

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"
            }
PiiiZH
  • 100
  • 1
  • 6
  • how does one find the peer details of a network running from composer? – dendog Apr 09 '18 at 11:38
  • You can find the ip or the hostname in the configtx.yaml or crypto-config.yaml file under /fabric-scripts/hlfv1/composer – PiiiZH Apr 09 '18 at 16:16
  • @ydennis in your .composer folder, you can find the admin's card folder, which has connection.json, which has all addresses of peers etc nodes. – ulu May 16 '18 at 20:06
0

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.

Ajitesh
  • 814
  • 8
  • 13