DEV Community

Discussion on: Your first Hyperledger Fabric network

Collapse
 
jean507 profile image
Jean Le Bouthillier • Edited

Did you test this code before posting?

You generate the genesis block as "genesis.block" and later on use "orderer.genesis.block"

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

...

  • ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block

You also require "Template" in crypto-config.yaml, otherwise the crypto is not fully generated.

PeerOrgs:

  • Name: Microsoft Domain: microsoft.cool-network.com EnableNodeOUs: true Template: Count: 2 Users: Count: 1

It's also illegal to use capital letters in the naming of channel! The ordered will crash.

Collapse
 
danionita profile image
danionita

However, after fixing this, Ithe orderer fails to start with the following error:
' Error creating configtx manager and handlers: Error deserializing key Capabilities for group /Channel: Unexpected key Capabilities'

Collapse
 
danionita profile image
danionita

Using the latest fabric images (i.e. removing all instances of ':x86_64-1.0.0-rc1') fixed this.

Collapse
 
damcosset profile image
Damien Cosset

Thank you for your comment. I had no idea about the capital letters in the channel name causing problems! Thanks!

Collapse
 
danionita profile image
danionita

Actually, changing
'ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block'
to
'ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/genesis.block'
breaks the code, because '/var/hyperledger/orderer/genesis.block' does not exist.

The original code was correct because in docker-compose-base.yaml, you mount the following volume:
../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block

Collapse
 
saifdeveloper profile image
Saif Ali

can you please share you github link for this code ? It will be very helpful