Hyperledger Fabric explained - configtx.yaml
#1
In order to configure and launch your own Hyperledger fabric network, you will need 3 files

-configtx.yaml

-crypto-config.yaml

-docker-compose.yml

This tutorial try to explain how, the configtx.yaml file is structured. 


We can split the configtx.yaml file into 5 differents blocks : 

-Organizations block
-Orderer block
-Applications block
-Profiles block
-Capabilities block

Let's explore it : 

Organizations block :


[Image: 1538562195-fabric-config.png]

Structure : 

-         &NAME

           Name : NAME
           ID : MSP NAME (NAME following MSP is a good solution)
           MSPDir : MSP configuration path
           AdminPrincipal : coming soon
           AnchorPeers : (defines the peers used for cross-org gossip communication)
                - Host : one peer hostname (defined on your docker-compose file)
                - Port : peer port

You can declare as many org as you want following this strucure. 

Orderer block :
[Image: 1538562195-fabric-config0.png]

Structure :

         &ORDERER REF
                OrdererType : « solo » or « kafka » (production deployement require kafka)
                Addresses : (in kafka mode, you can set as many orderer as you want)
                                - orderer.hostname :orderer.port (defined on your docker-compose file)
                BatchTimeout : 2s (time to wait before creating batch)
                BatchSize :
                               MaxMessageCount : 10 (maximum number of messages in a batch)
                               AbsoluteMaxBytes : 10 MB (absolute maximum number of bytes allowed for messages)
                               PreferredMaxBytes : 512 KB (preferred maximum number of bytes allowed for messages)
                Kafka :
                               Brokers :
                                                - kafka hostname :kafka port (defined in your docker-compose file)
                                               - kafka hostname :kafka port
                                               - kafka hostname :kafka port
                Organizations : (lists the orgs participating on the orderer side)

Profiles block :

[Image: 1538562196-fabric-config2.png]

Profiles defines which elements to use with your network and are passed to configtxgen in order to create genesis block and channel artifacts.

Network profile structure :

ProfileName :
                Orderer :
                               << : *Orderer (Orderer profile to use)
                                Organizations :
                                                - *Orderer org name (OrdererORg to use)
                Consortiums :
                               ComposerConsortium :
                                               Organizations : (Organizations to take part of our network)
                                                               - * Name
                                                               - * Name
 
Channel profile structure :

ChannelName :
                                Consortium : ComposerConsortium
                                Application :
                                               << : *Application (Application profile to use)
                                               Organizations :
                                                                - * Name
Reply