Configuring multiple Consortium in Hyperledger Fabric 1.4

140 views Asked by At

In fabric sample, Consortium is defined for two organization and there is provided proile for single consortium Consortium: SampleConsortium in configtx.yaml file.

I have tried to configure two consortium, XYZCosortium and PQRConsortium. The Profile is defined as below :

  MultiNodeEtcdRaft:
       <<: *ChannelDefaults
       Capabilities:
           <<: *ChannelCapabilities
       Orderer:
           <<: *OrdererDefaults
           OrdererType: etcdraft
           EtcdRaft:
               Consenters:
               - Host: orderer1.xyz.com
                 Port: 7050
                 ClientTLSCert: crypto-config/ordererOrganizations/xyz.com/orderers/orderer1.xyz.com/tls/server.crt
                 ServerTLSCert: crypto-config/ordererOrganizations/xyz.com/orderers/orderer1.xyz.com/tls/server.crt
              
               - Host: orderer2.xyz.com
                 Port: 7050
                 ClientTLSCert: crypto-config/ordererOrganizations/xyz.com/orderers/orderer2.xyz.com/tls/server.crt
                 ServerTLSCert: crypto-config/ordererOrganizations/xyz.com/orderers/orderer2.xyz.com/tls/server.crt
 
               - Host: orderer3.xyz.com
                 Port: 7050
                 ClientTLSCert: crypto-config/ordererOrganizations/xyz.com/orderers/orderer3.xyz.com/tls/server.crt
                 ServerTLSCert: crypto-config/ordererOrganizations/xyz.com/orderers/orderer3.xyz.com/tls/server.crt
 
               - Host: orderer1.pqr.com
                 Port: 7050
                 ClientTLSCert: crypto-config/ordererOrganizations/pqr.com/orderers/orderer1.pqr.com/tls/server.crt
                 ServerTLSCert: crypto-config/ordererOrganizations/pqr.com/orderers/orderer1.pqr.com/tls/server.crt
 
               - Host: orderer2.pqr.com
                 Port: 7050
                 ClientTLSCert: crypto-config/ordererOrganizations/pqr.com/orderers/orderer2.pqr.com/tls/server.crt
                 ServerTLSCert: crypto-config/ordererOrganizations/pqr.com/orderers/orderer2.pqr.com/tls/server.crt
 
 
           Addresses:
               - orderer1.xyz.com:7050
               - orderer2.xyz.com:7050
               - orderer3.xyz.com:7050
               - orderer1.pqr.com:7050
               - orderer2.pqr.com:7050
 
 
           Organizations:
           - *OrdererOrg
           - *Orderer2Org
           Capabilities:
               <<: *OrdererCapabilities
       Application:
           <<: *ApplicationDefaults
           Organizations:
           - <<: *OrdererOrg
           - <<: *Orderer2Org
       Consortiums:
           XYZConsortium:
               Organizations:
               - *Org1
           PQRConsortium:
               Organizations:
               - *Org2
  

Here are two cosortium and each have one organization and corrosponding orderers as defined in above profile of orderer.

I am getting MSP related issues, Identity issues and others too. My question is,

Configuraiton of multiple consortium is possible is fabric 1.4 ?
How to configure multiple consortium in Fabric ?

1

There are 1 answers

0
Ta-seen Junaid On

Configuraiton of multiple consortium is possible with fabric 1.4 .

To configure multiple consortium in Fabric, you have to write configtx.yaml file properly, specially the profile

Profiles:

OrgsChannel1:
    Consortium: Consortium1
    <<: *ChannelDefaults
    Application:
        <<: *ApplicationDefaults
        Organizations:
            - *Org1
            - *Org2
            - *Org3
        Capabilities:
            <<: *ApplicationCapabilities

OrgsChannel2:
    Consortium: Consortium2
    <<: *ChannelDefaults
    Application:
        <<: *ApplicationDefaults
        Organizations:
            - *Org3
            - *Org4
        Capabilities:
            <<: *ApplicationCapabilities

SampleMultiNodeEtcdRaft:
    <<: *ChannelDefaults
    Capabilities:
        <<: *ChannelCapabilities
    Orderer:
        <<: *OrdererDefaults
        OrdererType: etcdraft
        EtcdRaft:
            Consenters:
            - Host: orderer.example.com
              Port: 7050
              ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
              ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
            - Host: orderer2.example.com
              Port: 8050
              ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
              ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
            - Host: orderer3.example.com
              Port: 9050
              ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
              ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
            - Host: orderer4.example.com
              Port: 10050
              ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer4.example.com/tls/server.crt
              ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer4.example.com/tls/server.crt
            - Host: orderer5.example.com
              Port: 11050
              ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer5.example.com/tls/server.crt
              ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer5.example.com/tls/server.crt
        Addresses:
            - orderer.example.com:7050
            - orderer2.example.com:8050
            - orderer3.example.com:9050
            - orderer4.example.com:10050
            - orderer5.example.com:11050

        Organizations:
        - *OrdererOrg
        Capabilities:
            <<: *OrdererCapabilities
    Application:
        <<: *ApplicationDefaults
        Organizations:
        - <<: *OrdererOrg
    Consortiums:
        Consortium1:
            Organizations:
            - *Org1
            - *Org2
            - *Org3

        Consortium2:
            Organizations:
            - *Org3
            - *Org4