The KHS Blockchain Browser is an open source analytics tool that gives developers and operators of Hyperledger blockchain networks real-time visibility into transactions and blocks as they are added to a HLF network.
Blockchain Browser is a React/Node.js web application with which a persistent database is not required. The Blockchain Browser "browses" the block store directly using the Fabric Node.js SDK.
View a three-minute video of the Blockchain Browser in action here.
Give a LIVE version a try, here's a link to a browser deployed to Heroku and pointing to a reference Hyperledger Fabric reference network here
Please see below for installation and startup instructions.
- Node 8.9.x or above
Windows OS Only
- Python 2.7+ (v3+ not supported)Windows OS Only
- For 'rm' and 'cp' commands, use Powershell or add Git to PATH (C:\Program Files\Git\usr\bin) or install Cygwin.- Access to HyperLedger Fabric network. Here's an example: khs-lab-results-blockchain
Note: Two useful tools for managing Node and Python versions are nvm and pyenv.
- Clone repo
- Install server and UI JavaScript modules
$ npm install
$ cd ui
$ npm install
$ cd ..
- The current keystore has credentials for the Hyperledger example networks. You can access other networks by modifying the
config.js
so that thenetwork_url
property points to a peer node address and an adminUSERID
property references an admin user and public/private keys located in thehfc-key-store
folder.
module.exports = {
port: process.env.PORT || 4001,
host: process.env.HOST || "localhost",
loglevel: process.env.LOGLEVEL || "info",
wallet_path: process.env.KEYSTORE || "../hfc-key-store",
user_id: process.env.USERID || "PeerAdmin",
network_url: process.env.NETWORK_URL || "grpc://localhost:7051",
network_profile: process.env.NETWORKPROFILE || '',
peer_pem: process.env.PEER_PEM || ''
}
Here is an example public/private and user file in the hfc-key-store
directory.
- Start the API Server and UI server with the following commands:
$ ./runApiServer.sh
$ npm run start:dev
- Browse to
http://localhost:8080
.
Note: to change the port, edit file ./ui/package.json
.
These three variables are used to enable TLS with the targeted peer (put them in a .env
file in the root and replace the values for your network's):
NETWORKPROFILE=../hfc-key-store/networkprofile.json
PEER_PEM="-----BEGIN CERTIFICATE-----\nMIICb..."
SSL_TARGET_NAME_OVERRIDE=peer1...
Be sure to also replace the files in the folder ./hfc-key-store
with your keys.
Also make sure to update the client.credentialStore.path
and client.credentialStore.cryptoStore.path
with ./hfc-key-store
The certificate should be wrapped in quotes, otherwise it won't be recognized as a single value
Please let us know if you have questions - [email protected].
We at Keyhole are working to add new features all the time and would love your feedback.