github.com/IBM-Blockchain/fabric-operator@v1.0.4/sample-network/config/configtx-template.yaml (about)

     1  #
     2  # Copyright contributors to the Hyperledger Fabric Operator project
     3  #
     4  # SPDX-License-Identifier: Apache-2.0
     5  #
     6  # Licensed under the Apache License, Version 2.0 (the "License");
     7  # you may not use this file except in compliance with the License.
     8  # You may obtain a copy of the License at:
     9  #
    10  # 	  http://www.apache.org/licenses/LICENSE-2.0
    11  #
    12  # Unless required by applicable law or agreed to in writing, software
    13  # distributed under the License is distributed on an "AS IS" BASIS,
    14  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    15  # See the License for the specific language governing permissions and
    16  # limitations under the License.
    17  #
    18  
    19  ---
    20  ################################################################################
    21  #
    22  #   Section: Organizations
    23  #
    24  #   - This section defines the different organizational identities which will
    25  #   be referenced later in the configuration.
    26  #
    27  ################################################################################
    28  Organizations:
    29  
    30    # SampleOrg defines an MSP using the sampleconfig.  It should never be used
    31    # in production but may be used as a template for other definitions
    32    - &OrdererOrg
    33      # DefaultOrg defines the organization which is used in the sampleconfig
    34      # of the fabric.git development environment
    35      Name: OrdererOrg
    36  
    37      # ID to load the MSP definition as
    38      ID: OrdererMSP
    39  
    40      # MSPDir is the filesystem path which contains the MSP configuration
    41      MSPDir: ../../temp/channel-msp/ordererOrganizations/org0/msp
    42  
    43      # Policies defines the set of policies at this level of the config tree
    44      # For organization policies, their canonical path is usually
    45      #   /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
    46      Policies:
    47        Readers:
    48          Type: Signature
    49          Rule: "OR('OrdererMSP.member')"
    50        Writers:
    51          Type: Signature
    52          Rule: "OR('OrdererMSP.member')"
    53        Admins:
    54          Type: Signature
    55          Rule: "OR('OrdererMSP.admin')"
    56  
    57      OrdererEndpoints:
    58        - org0-orderersnode1.${KUBE_DNS_DOMAIN}:7050
    59        - org0-orderersnode2.${KUBE_DNS_DOMAIN}:7050
    60        - org0-orderersnode3.${KUBE_DNS_DOMAIN}:7050
    61  
    62    - &Org1
    63      # DefaultOrg defines the organization which is used in the sampleconfig
    64      # of the fabric.git development environment
    65      Name: Org1MSP
    66  
    67      # ID to load the MSP definition as
    68      ID: Org1MSP
    69  
    70      MSPDir: ../../temp/channel-msp/peerOrganizations/org1/msp
    71  
    72      # Policies defines the set of policies at this level of the config tree
    73      # For organization policies, their canonical path is usually
    74      #   /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
    75      Policies:
    76        Readers:
    77          Type: Signature
    78          Rule: "OR('Org1MSP.admin', 'Org1MSP.peer', 'Org1MSP.client')"
    79        Writers:
    80          Type: Signature
    81          Rule: "OR('Org1MSP.admin', 'Org1MSP.client')"
    82        Admins:
    83          Type: Signature
    84          Rule: "OR('Org1MSP.admin')"
    85        Endorsement:
    86          Type: Signature
    87          Rule: "OR('Org1MSP.peer')"
    88  
    89      # leave this flag set to true.
    90      AnchorPeers:
    91        # AnchorPeers defines the location of peers which can be used
    92        # for cross org gossip communication.  Note, this value is only
    93        # encoded in the genesis block in the Application section context
    94        - Host: org1-peer1.${KUBE_DNS_DOMAIN}
    95          Port: 7051
    96  
    97    - &Org2
    98      # DefaultOrg defines the organization which is used in the sampleconfig
    99      # of the fabric.git development environment
   100      Name: Org2MSP
   101  
   102      # ID to load the MSP definition as
   103      ID: Org2MSP
   104  
   105      MSPDir: ../../temp/channel-msp/peerOrganizations/org2/msp
   106  
   107      # Policies defines the set of policies at this level of the config tree
   108      # For organization policies, their canonical path is usually
   109      #   /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
   110      Policies:
   111        Readers:
   112          Type: Signature
   113          Rule: "OR('Org2MSP.admin', 'Org2MSP.peer', 'Org2MSP.client')"
   114        Writers:
   115          Type: Signature
   116          Rule: "OR('Org2MSP.admin', 'Org2MSP.client')"
   117        Admins:
   118          Type: Signature
   119          Rule: "OR('Org2MSP.admin')"
   120        Endorsement:
   121          Type: Signature
   122          Rule: "OR('Org2MSP.peer')"
   123  
   124      AnchorPeers:
   125        # AnchorPeers defines the location of peers which can be used
   126        # for cross org gossip communication.  Note, this value is only
   127        # encoded in the genesis block in the Application section context
   128        - Host: org2-peer1.${KUBE_DNS_DOMAIN}
   129          Port: 7051
   130  
   131  ################################################################################
   132  #
   133  #   SECTION: Capabilities
   134  #
   135  #   - This section defines the capabilities of fabric network. This is a new
   136  #   concept as of v1.1.0 and should not be utilized in mixed networks with
   137  #   v1.0.x peers and orderers.  Capabilities define features which must be
   138  #   present in a fabric binary for that binary to safely participate in the
   139  #   fabric network.  For instance, if a new MSP type is added, newer binaries
   140  #   might recognize and validate the signatures from this type, while older
   141  #   binaries without this support would be unable to validate those
   142  #   transactions.  This could lead to different versions of the fabric binaries
   143  #   having different world states.  Instead, defining a capability for a channel
   144  #   informs those binaries without this capability that they must cease
   145  #   processing transactions until they have been upgraded.  For v1.0.x if any
   146  #   capabilities are defined (including a map with all capabilities turned off)
   147  #   then the v1.0.x peer will deliberately crash.
   148  #
   149  ################################################################################
   150  Capabilities:
   151    # Channel capabilities apply to both the orderers and the peers and must be
   152    # supported by both.
   153    # Set the value of the capability to true to require it.
   154    Channel: &ChannelCapabilities
   155      # V2_0 capability ensures that orderers and peers behave according
   156      # to v2.0 channel capabilities. Orderers and peers from
   157      # prior releases would behave in an incompatible way, and are therefore
   158      # not able to participate in channels at v2.0 capability.
   159      # Prior to enabling V2.0 channel capabilities, ensure that all
   160      # orderers and peers on a channel are at v2.0.0 or later.
   161      V2_0: true
   162  
   163    # Orderer capabilities apply only to the orderers, and may be safely
   164    # used with prior release peers.
   165    # Set the value of the capability to true to require it.
   166    Orderer: &OrdererCapabilities
   167      # V2_0 orderer capability ensures that orderers behave according
   168      # to v2.0 orderer capabilities. Orderers from
   169      # prior releases would behave in an incompatible way, and are therefore
   170      # not able to participate in channels at v2.0 orderer capability.
   171      # Prior to enabling V2.0 orderer capabilities, ensure that all
   172      # orderers on channel are at v2.0.0 or later.
   173      V2_0: true
   174  
   175    # Application capabilities apply only to the peer network, and may be safely
   176    # used with prior release orderers.
   177    # Set the value of the capability to true to require it.
   178    Application: &ApplicationCapabilities
   179      # V2_0 application capability ensures that peers behave according
   180      # to v2.0 application capabilities. Peers from
   181      # prior releases would behave in an incompatible way, and are therefore
   182      # not able to participate in channels at v2.0 application capability.
   183      # Prior to enabling V2.0 application capabilities, ensure that all
   184      # peers on channel are at v2.0.0 or later.
   185      V2_0: true
   186  
   187  ################################################################################
   188  #
   189  #   SECTION: Application
   190  #
   191  #   - This section defines the values to encode into a config transaction or
   192  #   genesis block for application related parameters
   193  #
   194  ################################################################################
   195  Application: &ApplicationDefaults
   196  
   197    # Organizations is the list of orgs which are defined as participants on
   198    # the application side of the network
   199    Organizations:
   200  
   201    # Policies defines the set of policies at this level of the config tree
   202    # For Application policies, their canonical path is
   203    #   /Channel/Application/<PolicyName>
   204    Policies:
   205      Readers:
   206        Type: ImplicitMeta
   207        Rule: "ANY Readers"
   208      Writers:
   209        Type: ImplicitMeta
   210        Rule: "ANY Writers"
   211      Admins:
   212        Type: ImplicitMeta
   213        Rule: "MAJORITY Admins"
   214      LifecycleEndorsement:
   215        Type: Signature
   216        Rule: "OR('Org1MSP.peer','Org2MSP.peer')"
   217      Endorsement:
   218        Type: Signature
   219        Rule: "OR('Org1MSP.peer','Org2MSP.peer')"
   220  
   221    Capabilities:
   222      <<: *ApplicationCapabilities
   223  ################################################################################
   224  #
   225  #   SECTION: Orderer
   226  #
   227  #   - This section defines the values to encode into a config transaction or
   228  #   genesis block for orderer related parameters
   229  #
   230  ################################################################################
   231  Orderer: &OrdererDefaults
   232  
   233    # Orderer Type: The orderer implementation to start
   234    OrdererType: etcdraft
   235  
   236    EtcdRaft:
   237      Consenters:
   238        - Host: org0-orderersnode1.${KUBE_DNS_DOMAIN}
   239          Port: 7050
   240          ClientTLSCert: ../../temp/channel-msp/ordererOrganizations/org0/orderers/org0-orderersnode1/tls/signcerts/tls-cert.pem
   241          ServerTLSCert: ../../temp/channel-msp/ordererOrganizations/org0/orderers/org0-orderersnode1/tls/signcerts/tls-cert.pem
   242        - Host: org0-orderersnode2.${KUBE_DNS_DOMAIN}
   243          Port: 7050
   244          ClientTLSCert: ../../temp/channel-msp/ordererOrganizations/org0/orderers/org0-orderersnode2/tls/signcerts/tls-cert.pem
   245          ServerTLSCert: ../../temp/channel-msp/ordererOrganizations/org0/orderers/org0-orderersnode2/tls/signcerts/tls-cert.pem
   246        - Host: org0-orderersnode3.${KUBE_DNS_DOMAIN}
   247          Port: 7050
   248          ClientTLSCert: ../../temp/channel-msp/ordererOrganizations/org0/orderers/org0-orderersnode3/tls/signcerts/tls-cert.pem
   249          ServerTLSCert: ../../temp/channel-msp/ordererOrganizations/org0/orderers/org0-orderersnode3/tls/signcerts/tls-cert.pem
   250  
   251  
   252      # Options to be specified for all the etcd/raft nodes. The values here
   253      # are the defaults for all new channels and can be modified on a
   254      # per-channel basis via configuration updates.
   255      Options:
   256        # TickInterval is the time interval between two Node.Tick invocations.
   257        #TickInterval: 500ms default
   258        TickInterval: 2500ms
   259  
   260        # ElectionTick is the number of Node.Tick invocations that must pass
   261        # between elections. That is, if a follower does not receive any
   262        # message from the leader of current term before ElectionTick has
   263        # elapsed, it will become candidate and start an election.
   264        # ElectionTick must be greater than HeartbeatTick.
   265        # ElectionTick: 10 default
   266        ElectionTick: 5
   267  
   268        # HeartbeatTick is the number of Node.Tick invocations that must
   269        # pass between heartbeats. That is, a leader sends heartbeat
   270        # messages to maintain its leadership every HeartbeatTick ticks.
   271        HeartbeatTick: 1
   272  
   273        # MaxInflightBlocks limits the max number of in-flight append messages
   274        # during optimistic replication phase.
   275        MaxInflightBlocks: 5
   276  
   277        # SnapshotIntervalSize defines number of bytes per which a snapshot is taken
   278        SnapshotIntervalSize: 16 MB
   279  
   280    # Batch Timeout: The amount of time to wait before creating a batch
   281    BatchTimeout: 2s
   282  
   283    # Batch Size: Controls the number of messages batched into a block
   284    BatchSize:
   285  
   286      # Max Message Count: The maximum number of messages to permit in a batch
   287      MaxMessageCount: 10
   288  
   289      # Absolute Max Bytes: The absolute maximum number of bytes allowed for
   290      # the serialized messages in a batch.
   291      AbsoluteMaxBytes: 99 MB
   292  
   293      # Preferred Max Bytes: The preferred maximum number of bytes allowed for
   294      # the serialized messages in a batch. A message larger than the preferred
   295      # max bytes will result in a batch larger than preferred max bytes.
   296      PreferredMaxBytes: 512 KB
   297  
   298    # Organizations is the list of orgs which are defined as participants on
   299    # the orderer side of the network
   300    Organizations:
   301  
   302    # Policies defines the set of policies at this level of the config tree
   303    # For Orderer policies, their canonical path is
   304    #   /Channel/Orderer/<PolicyName>
   305    Policies:
   306      Readers:
   307        Type: ImplicitMeta
   308        Rule: "ANY Readers"
   309      Writers:
   310        Type: ImplicitMeta
   311        Rule: "ANY Writers"
   312      Admins:
   313        Type: ImplicitMeta
   314        Rule: "MAJORITY Admins"
   315      # BlockValidation specifies what signatures must be included in the block
   316      # from the orderer for the peer to validate it.
   317      BlockValidation:
   318        Type: ImplicitMeta
   319        Rule: "ANY Writers"
   320  
   321  ################################################################################
   322  #
   323  #   CHANNEL
   324  #
   325  #   This section defines the values to encode into a config transaction or
   326  #   genesis block for channel related parameters.
   327  #
   328  ################################################################################
   329  Channel: &ChannelDefaults
   330    # Policies defines the set of policies at this level of the config tree
   331    # For Channel policies, their canonical path is
   332    #   /Channel/<PolicyName>
   333    Policies:
   334      # Who may invoke the 'Deliver' API
   335      Readers:
   336        Type: ImplicitMeta
   337        Rule: "ANY Readers"
   338      # Who may invoke the 'Broadcast' API
   339      Writers:
   340        Type: ImplicitMeta
   341        Rule: "ANY Writers"
   342      # By default, who may modify elements at this config level
   343      Admins:
   344        Type: ImplicitMeta
   345        Rule: "MAJORITY Admins"
   346  
   347    # Capabilities describes the channel level capabilities, see the
   348    # dedicated Capabilities section elsewhere in this file for a full
   349    # description
   350    Capabilities:
   351      <<: *ChannelCapabilities
   352  
   353  ################################################################################
   354  #
   355  #   Profile
   356  #
   357  #   - Different configuration profiles may be encoded here to be specified
   358  #   as parameters to the configtxgen tool
   359  #
   360  ################################################################################
   361  Profiles:
   362  
   363    # test network profile with application (not system) channel.
   364    TwoOrgsApplicationGenesis:
   365      <<: *ChannelDefaults
   366      Orderer:
   367        <<: *OrdererDefaults
   368        Organizations:
   369          - *OrdererOrg
   370        Capabilities: *OrdererCapabilities
   371      Application:
   372        <<: *ApplicationDefaults
   373        Organizations:
   374          - *Org1
   375          - *Org2
   376        Capabilities: *ApplicationCapabilities
   377  
   378  
   379    #
   380    # Unclear lineage for these profiles:  nano-fab?
   381    #
   382    # TwoOrgsOrdererGenesis will construct a system channel as it has a Consortiums stanza, which is not
   383    # compatible with osnadmin.
   384    #
   385    # @enyeart - which profile should be used for the kube test network?
   386    #
   387    TwoOrgsOrdererGenesis:
   388      <<: *ChannelDefaults
   389      Orderer:
   390        <<: *OrdererDefaults
   391        OrdererType: etcdraft
   392        Organizations:
   393          - *OrdererOrg
   394        Capabilities:
   395          <<: *OrdererCapabilities
   396      Consortiums:
   397        SampleConsortium:
   398          Organizations:
   399            - *Org1
   400            - *Org2
   401    TwoOrgsChannel:
   402      Consortium: SampleConsortium
   403      <<: *ChannelDefaults
   404      Application:
   405        <<: *ApplicationDefaults
   406        Organizations:
   407          - *Org1
   408          - *Org2
   409        Capabilities:
   410          <<: *ApplicationCapabilities
   411    Org1Channel:
   412      Consortium: SampleConsortium
   413      <<: *ChannelDefaults
   414      Application:
   415        <<: *ApplicationDefaults
   416        Organizations:
   417          - *Org1
   418        Capabilities:
   419          <<: *ApplicationCapabilities
   420    Org2Channel:
   421      Consortium: SampleConsortium
   422      <<: *ChannelDefaults
   423      Application:
   424        <<: *ApplicationDefaults
   425        Organizations:
   426          - *Org2
   427        Capabilities:
   428          <<: *ApplicationCapabilities