Giter VIP home page Giter VIP logo

fabric-starter's Introduction

Starter Application for Hyperledger Fabric

Create a network to jump start development of your decentralized application on Hyperledger Fabric platform.

The network is run by docker containers and can be deployed to one host for development or to multiple hosts for testing or production.

Scripts of this starter generate crypto material and config files, start the network and deploy your chaincodes. Developers can use REST API to invoke and query chaincodes, explore blocks and transactions.

What's left is to develop your chaincodes and place them into the chaincode folder, and user interface as a single page web app that you can serve by by placing the sources into the www folder.

See also

Blockchain network deployment

The following sections describe Fabric Starter possibilites in more details:

Install

See Prerequisites

Using a particular version of Hyperledger Fabric

By default Fabric starter uses the 1.4.9 version of HL Fabric. If you want to deploy network with another version of HL Fabric then export it in the FABRIC_VERSION environment variable, e.g.:

export FABRIC_VERSION=1.4.8

Create a network with 1 organization for development

See One Org Network

Create a local network of 3 organizations

See Three local Orgs Network

Use REST API to query and invoke chaincodes

See Use REST Api

Multi host deployment

See Multi host deployment

Join to an External Network

For invite-based blockchain-networks (see next chapter) new organization can be added to the consortium by a member of this network. The new organization need to obtain the BOOTSRAP_IP (currently it's the IP of the orderer node) and deploy its own node with this IP.

export BOOTSTRAP_IP=192.168.0.1
#ORG=... DOMAIN=... docker-compose up

Then the new organization passes the ip address of the newly deployed node to the network's member and this member adds the organization to Consortium by it's administration dashboard. After that the new organization can create own channels, add other organizations to the own channels and even invite more organizations to the network itself.

Network Governance. Invite-based and Majority-based Governance

So now our network can be governed by itself (or to say it right by the network's members). The first type of network-governance is Invite-based. With this type of deployment any organization ((and not a central system administrator)) - member of the blockchain network can add new organization to consortium.

To deploy such type of network export environment variable

export CONSORTIUM_CONFIG=InviteConsortiumPolicy

Start orderer:

WWW_PORT=81 WORK_DIR=./ docker-compose -f docker-compose-orderer.yaml -f docker-compose-orderer-multihost.yaml up -d

Then start an organization

MY_IP=192.168.99.yy BOOTSTRAP_IP=192.168.99.xx ORG=org1 MULTIHOST=true WORK_DIR=./ docker-compose -f docker-compose.yaml -f docker-compose-multihost.yaml -f docker-compose-api-port.yaml up -d 

Majority type of governance is coming.

Consensus Types. RAFT consensus algorithm. By default Fabric Starter uses Solo type of consensus. To use RAFT consensus see instructions in Start Raft Ordering Service

Releases\Snapshots cycle

As this project doesn't have a defined release cycle yet we create snapshot-{version}-{fabric-version} branches
when we see code is stable enough or before introducing major changes\new features.

Note, the Hyperledger Fabric version which the snapshot depends on is defined in the .env file.
Also this project uses olegabu/fabric-starter-rest docker image which has the same versioning approach but even updated docker image with the same label (e.g. latest) won't be pulled automatically if it exists in the local docker registry.
You have to remove the old image manually (by docker rmi -f olegabu/fabric-starter-rest).

The master branch as well as potentially feature branches are used for development.
Master is assigned to the latest version of Fabric.

Currently issued branches are:

  • master(development)
  • snapshot-0.5-1.4
    • new org auto connect for invite type consortium
    • new orgs dns register functionality
    • use fabric-starter-rest:snapshot-0.4-1.4
  • snapshot-0.4-1.4
    • auto-generate crypto configuration
    • Invite type consortium
    • BOOTSTRAP_IP for new node joining
  • snapshot-0.3-1.4
    • use fabric-starter-rest:snapshot-0.3-1.4
  • snapshot-0.2-1.4
    • use fabric-starter-rest:snapshot-0.2-1.4
  • snapshot-0.1-1.4
    • start snapshot branching

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.