Giter Club home page Giter Club logo

fabex's Introduction

Block explorer for Hyperledger Fabric


Reference

Prerequisites

Microservice mode

CLI usage

Testing



  1. Configure config.yaml (it's main config of the Fabex) and connection-profile.yaml (Hyperledger Fabric connection profile)

  2. Install and start database (MongoDB or CassandraDB)

    If you choose Mongo:

    1. set initial user name and password in db/mongo-compose/docker-compose.yaml
    2. start container:
    make mongo
    

    If you choose Cassandra:

    make cassandra
    
  3. (OPTIONAL) Start your Fabric blockchain network or sample test network with

    make fabric-test
    



You can start Fabex as standalone microservice with Cassandra blocks storage:

`./fabex -task=grpc -configpath=configs -configname=config -enrolluser=true -db=cassandra`

or with Mongo storage

`./fabex -task=grpc -configpath=configs -configname=config -enrolluser=true -db=mongo`

Use fabex.proto as service contract.

Example of GRPC client implementation.



Build Fabex executable binary file:

`go build`

Enroll admin user:

`./fabex -enrolluser=true`

Save blocks data to db:

`./fabex -task=explore -configpath=configs -configname=config -db=cassandra`

Also you can start service for fetching blocks in daemon mode:

`./fabex -task=explore -configpath=configs -configname=config -db=cassandra -forever=true` 

Get transactions of specific block (chain operation):

`./fabex -task=getblock -blocknum=14 -configpath=configs -configname=config -db=cassandra`

Get all transactions (db operation):

`./fabex -task=getall -configpath=configs -configname=config -db=cassandra`

You can choose database for data saving and retrieving with -db flag (MongoDB or CassandraDB):

`./fabex -task=explore -configpath=configs -configname=config -db=mongo`
`./fabex -task=explore -configpath=configs -configname=config -db=cassandra`



unit tests: make unit-tests

integration tests: make integration-tests

fabex's People

Contributors

vadiminshakov avatar mikelle avatar

Stargazers

 avatar  avatar Dmitri Plakhov avatar

Watchers

James Cloos avatar  avatar  avatar Dmitri Plakhov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.