Hyperledgder Explorer is a Blockchain explorer which can be used to view the details on the one or more blockchain network (channels) created using Hyperledger Fabric 1.0.
In this post, you will learn about some of the following:
Hyperledger Explorer is a Nodejs based web app which runs on Node/ExpressJS with MySQL as the backend database. It provides details related Fabric blockchain network (channels) based on configuration provided in the file, blockchain_explorer/config.json. The following represents some of the key details provided by the explorer app vis-a-vis the data it captures for the Hyperledger Fabric blockchain (channels).
The details on package used can be found in package.json file in the root folder, blockchain-explorer (blockchain_explorer/package.json). The app files can be found in the folder, explorer_client (blockchain_explorer/explorer_client).
The following needs to be installed/setup before setting up the explorer.
Once done with above, set up the Hyperledger Explorer using the following instructions:
git clone https://github.com/hyperledger/blockchain-explorer.git cd blockchain-explorer
mysql -u<username> -p < db/fabricexplorer.sql
Installation/setup details can also be found on this GitHub page, Setting up Hyperledger Explorer.
The Hyperledger explorer comes bundled with the files related to building your first network (BYFN) which can be found in the folder, blockchain_explorer/first_network. You could configure config.json file appropriately to either refer the Fabric network built with bundled folder or BYFN installed as part of fabric_samples. I had the BYFN installed as part of fabric samples. Thus, I configured the config.json with appropriate path referring to already existing byfn network (created using byfn.sh).
Here is the sample config.json file:
{ "network-config": { "org1": { "name": "peerOrg1", "mspid": "Org1MSP", "peer1": { "requests": "grpcs://127.0.0.1:7051", "events": "grpcs://127.0.0.1:7053", "server-hostname": "peer0.org1.example.com", "tls_cacerts": "../fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, "peer2": { "requests": "grpcs://127.0.0.1:8051", "events": "grpcs://127.0.0.1:8053", "server-hostname": "peer1.org1.example.com", "tls_cacerts": "../fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, "admin": { "key": "../fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore", "cert": "../fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts" } }, "org2": { "name": "peerOrg2", "mspid": "Org2MSP", "peer1": { "requests": "grpcs://127.0.0.1:9051", "events": "grpcs://127.0.0.1:9053", "server-hostname": "peer0.org2.example.com", "tls_cacerts": "../fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, "peer2": { "requests": "grpcs://127.0.0.1:10051", "events": "grpcs://127.0.0.1:10053", "server-hostname": "peer1.org2.example.com", "tls_cacerts": "../fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, "admin": { "key": "../fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore", "cert": "../fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts" } } }, "host":"localhost", "port":"8080", "channel": "mychannel", "GOPATH":"../artifacts", "keyValueStore":"/tmp/fabric-client-kvs", "eventWaitTime":"30000", "mysql":{ "host":"127.0.0.1", "port":"3306", "database":"fabricexplorer", "username":"root", "passwd":"root" } }
Make a note of some of the following:
fabric-samples/first-network/byfn.sh -m up
In this post, you learned about some of the following:
Did you find this article useful? Do you have any questions about this article or setting up/installing or configuring Hyperledger Explorer? Leave a comment and ask your questions and I shall do my best to address your queries.
In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents,…
Adaptive learning helps in tailoring learning experiences to fit the unique needs of each student.…
With the increasing demand for more powerful machine learning (ML) systems that can handle diverse…
Anxiety is a common mental health condition that affects millions of people around the world.…
In machine learning, confounder features or variables can significantly affect the accuracy and validity of…
Last updated: 26 Sept, 2024 Credit card fraud detection is a major concern for credit…
View Comments
thanks for this! but seems now the prerequisite is Postgres over Mysql
How to configure multiple channels in config.json file?