项目作者: Salmandabbakuti

项目描述 :
Two-org three peer fabric network
高级语言: Shell
项目地址: git://github.com/Salmandabbakuti/cool-network.git
创建时间: 2019-07-09T09:00:36Z
项目社区:https://github.com/Salmandabbakuti/cool-network

开源协议:

下载


Fabric-Network-Generation

Install latest Docker images and tools for hyperledger fabric network development

  1. curl -sSL https://goo.gl/6wtTN5 | bash -s
  1. git clone https://github.com/Salmandabbakuti/cool-network.git
  2. cd cool-network
  3. ./generate.sh
  4. ./start.sh

Certificates Generation

Note that we are not using first-network template, we are creating our personalized network with crypto-config.yaml and configtxgen.yaml. using cryptogen, configtxgen tools, we are creating certificates and genesis blocks,channels.

  1. cryptogen generate --config crypto-config.yaml --output=crypto-config

it will generate crypto-config directory in master branch with all required dependencies of network

Starting with Genesis Block

  1. configtxgen -profile OrdererGenesis -outputBlock ./channel-artifacts/genesis.block

Generating Channel artifacts

  1. configtxgen -profile channelthreeorgs -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID channelthreeorgs

Creating Anchor peer transactions (each command for each organization)

  1. configtxgen -profile channelthreeorgs -outputAnchorPeersUpdate ./channel-artifacts/<peer tx file> -channelID channelthreeorgs -asOrg <org ID>
  2. EX: configtxgen -profile channelthreeorgs -outputAnchorPeersUpdate ./channel-artifacts/MicrosoftAnchor.tx -channelID channelthreeorgs -asOrg MicrosoftMSP

Bringing Network Up and Running

  1. docker-compose -f docker-compose-cli.yaml up -d

Chaincode Installation and Instantiation