github.com/defanghe/fabric@v2.1.1+incompatible/sampleconfig/configtx.yaml (about)

     1  # Copyright IBM Corp. All Rights Reserved.
     2  #
     3  # SPDX-License-Identifier: Apache-2.0
     4  #
     5  
     6  ---
     7  ################################################################################
     8  #
     9  #   ORGANIZATIONS
    10  #
    11  #   This section defines the organizational identities that can be referenced
    12  #   in the configuration profiles.
    13  #
    14  ################################################################################
    15  Organizations:
    16  
    17      # SampleOrg defines an MSP using the sampleconfig. It should never be used
    18      # in production but may be used as a template for other definitions.
    19      - &SampleOrg
    20          # Name is the key by which this org will be referenced in channel
    21          # configuration transactions.
    22          # Name can include alphanumeric characters as well as dots and dashes.
    23          Name: SampleOrg
    24  
    25          # SkipAsForeign can be set to true for org definitions which are to be
    26          # inherited from the orderer system channel during channel creation.  This
    27          # is especially useful when an admin of a single org without access to the
    28          # MSP directories of the other orgs wishes to create a channel.  Note
    29          # this property must always be set to false for orgs included in block
    30          # creation.
    31          SkipAsForeign: false
    32  
    33          # ID is the key by which this org's MSP definition will be referenced.
    34          # ID can include alphanumeric characters as well as dots and dashes.
    35          ID: SampleOrg
    36  
    37          # MSPDir is the filesystem path which contains the MSP configuration.
    38          MSPDir: msp
    39  
    40          # Policies defines the set of policies at this level of the config tree
    41          # For organization policies, their canonical path is usually
    42          #   /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
    43          Policies: &SampleOrgPolicies
    44              Readers:
    45                  Type: Signature
    46                  Rule: "OR('SampleOrg.member')"
    47                  # If your MSP is configured with the new NodeOUs, you might
    48                  # want to use a more specific rule like the following:
    49                  # Rule: "OR('SampleOrg.admin', 'SampleOrg.peer', 'SampleOrg.client')"
    50              Writers:
    51                  Type: Signature
    52                  Rule: "OR('SampleOrg.member')"
    53                  # If your MSP is configured with the new NodeOUs, you might
    54                  # want to use a more specific rule like the following:
    55                  # Rule: "OR('SampleOrg.admin', 'SampleOrg.client')"
    56              Admins:
    57                  Type: Signature
    58                  Rule: "OR('SampleOrg.admin')"
    59              Endorsement:
    60                  Type: Signature
    61                  Rule: "OR('SampleOrg.member')"
    62  
    63          # OrdererEndpoints is a list of all orderers this org runs which clients
    64          # and peers may to connect to to push transactions and receive blocks respectively.
    65          OrdererEndpoints:
    66              - "127.0.0.1:7050"
    67  
    68          # AnchorPeers defines the location of peers which can be used for
    69          # cross-org gossip communication. Note, this value is only encoded in
    70          # the genesis block in the Application section context.
    71          AnchorPeers:
    72              - Host: 127.0.0.1
    73                Port: 7051
    74  
    75  ################################################################################
    76  #
    77  #   CAPABILITIES
    78  #
    79  #   This section defines the capabilities of fabric network. This is a new
    80  #   concept as of v1.1.0 and should not be utilized in mixed networks with
    81  #   v1.0.x peers and orderers.  Capabilities define features which must be
    82  #   present in a fabric binary for that binary to safely participate in the
    83  #   fabric network.  For instance, if a new MSP type is added, newer binaries
    84  #   might recognize and validate the signatures from this type, while older
    85  #   binaries without this support would be unable to validate those
    86  #   transactions.  This could lead to different versions of the fabric binaries
    87  #   having different world states.  Instead, defining a capability for a channel
    88  #   informs those binaries without this capability that they must cease
    89  #   processing transactions until they have been upgraded.  For v1.0.x if any
    90  #   capabilities are defined (including a map with all capabilities turned off)
    91  #   then the v1.0.x peer will deliberately crash.
    92  #
    93  ################################################################################
    94  Capabilities:
    95      # Channel capabilities apply to both the orderers and the peers and must be
    96      # supported by both.
    97      # Set the value of the capability to true to require it.
    98      Channel: &ChannelCapabilities
    99          # V2.0 for Channel is a catchall flag for behavior which has been
   100          # determined to be desired for all orderers and peers running at the v2.0.0
   101          # level, but which would be incompatible with orderers and peers from
   102          # prior releases.
   103          # Prior to enabling V2.0 channel capabilities, ensure that all
   104          # orderers and peers on a channel are at v2.0.0 or later.
   105          V2_0: true
   106  
   107      # Orderer capabilities apply only to the orderers, and may be safely
   108      # used with prior release peers.
   109      # Set the value of the capability to true to require it.
   110      Orderer: &OrdererCapabilities
   111          # V1.1 for Orderer is a catchall flag for behavior which has been
   112          # determined to be desired for all orderers running at the v1.1.x
   113          # level, but which would be incompatible with orderers from prior releases.
   114          # Prior to enabling V2.0 orderer capabilities, ensure that all
   115          # orderers on a channel are at v2.0.0 or later.
   116          V2_0: true
   117  
   118      # Application capabilities apply only to the peer network, and may be safely
   119      # used with prior release orderers.
   120      # Set the value of the capability to true to require it.
   121      Application: &ApplicationCapabilities
   122          # V2.0 for Application enables the new non-backwards compatible
   123          # features and fixes of fabric v2.0.
   124          # Prior to enabling V2.0 orderer capabilities, ensure that all
   125          # orderers on a channel are at v2.0.0 or later.
   126          V2_0: true
   127  
   128  ################################################################################
   129  #
   130  #   APPLICATION
   131  #
   132  #   This section defines the values to encode into a config transaction or
   133  #   genesis block for application-related parameters.
   134  #
   135  ################################################################################
   136  Application: &ApplicationDefaults
   137      ACLs: &ACLsDefault
   138          # This section provides defaults for policies for various resources
   139          # in the system. These "resources" could be functions on system chaincodes
   140          # (e.g., "GetBlockByNumber" on the "qscc" system chaincode) or other resources
   141          # (e.g.,who can receive Block events). This section does NOT specify the resource's
   142          # definition or API, but just the ACL policy for it.
   143          #
   144          # Users can override these defaults with their own policy mapping by defining the
   145          # mapping under ACLs in their channel definition
   146  
   147          #---New Lifecycle System Chaincode (_lifecycle) function to policy mapping for access control--#
   148  
   149          # ACL policy for _lifecycle's "CheckCommitReadiness" function
   150          _lifecycle/CheckCommitReadiness: /Channel/Application/Writers
   151  
   152          # ACL policy for _lifecycle's "CommitChaincodeDefinition" function
   153          _lifecycle/CommitChaincodeDefinition: /Channel/Application/Writers
   154  
   155          # ACL policy for _lifecycle's "QueryChaincodeDefinition" function
   156          _lifecycle/QueryChaincodeDefinition: /Channel/Application/Readers
   157  
   158          # ACL policy for _lifecycle's "QueryChaincodeDefinitions" function
   159          _lifecycle/QueryChaincodeDefinitions: /Channel/Application/Readers
   160  
   161          #---Lifecycle System Chaincode (lscc) function to policy mapping for access control---#
   162  
   163          # ACL policy for lscc's "getid" function
   164          lscc/ChaincodeExists: /Channel/Application/Readers
   165  
   166          # ACL policy for lscc's "getdepspec" function
   167          lscc/GetDeploymentSpec: /Channel/Application/Readers
   168  
   169          # ACL policy for lscc's "getccdata" function
   170          lscc/GetChaincodeData: /Channel/Application/Readers
   171  
   172          # ACL Policy for lscc's "getchaincodes" function
   173          lscc/GetInstantiatedChaincodes: /Channel/Application/Readers
   174  
   175          #---Query System Chaincode (qscc) function to policy mapping for access control---#
   176  
   177          # ACL policy for qscc's "GetChainInfo" function
   178          qscc/GetChainInfo: /Channel/Application/Readers
   179  
   180          # ACL policy for qscc's "GetBlockByNumber" function
   181          qscc/GetBlockByNumber: /Channel/Application/Readers
   182  
   183          # ACL policy for qscc's  "GetBlockByHash" function
   184          qscc/GetBlockByHash: /Channel/Application/Readers
   185  
   186          # ACL policy for qscc's "GetTransactionByID" function
   187          qscc/GetTransactionByID: /Channel/Application/Readers
   188  
   189          # ACL policy for qscc's "GetBlockByTxID" function
   190          qscc/GetBlockByTxID: /Channel/Application/Readers
   191  
   192          #---Configuration System Chaincode (cscc) function to policy mapping for access control---#
   193  
   194          # ACL policy for cscc's "GetConfigBlock" function
   195          cscc/GetConfigBlock: /Channel/Application/Readers
   196  
   197          # ACL policy for cscc's "GetConfigTree" function
   198          cscc/GetConfigTree: /Channel/Application/Readers
   199  
   200          # ACL policy for cscc's "SimulateConfigTreeUpdate" function
   201          cscc/SimulateConfigTreeUpdate: /Channel/Application/Readers
   202  
   203          #---Miscellanesous peer function to policy mapping for access control---#
   204  
   205          # ACL policy for invoking chaincodes on peer
   206          peer/Propose: /Channel/Application/Writers
   207  
   208          # ACL policy for chaincode to chaincode invocation
   209          peer/ChaincodeToChaincode: /Channel/Application/Readers
   210  
   211          #---Events resource to policy mapping for access control###---#
   212  
   213          # ACL policy for sending block events
   214          event/Block: /Channel/Application/Readers
   215  
   216          # ACL policy for sending filtered block events
   217          event/FilteredBlock: /Channel/Application/Readers
   218  
   219      # Organizations lists the orgs participating on the application side of the
   220      # network.
   221      Organizations:
   222  
   223      # Policies defines the set of policies at this level of the config tree
   224      # For Application policies, their canonical path is
   225      #   /Channel/Application/<PolicyName>
   226      Policies: &ApplicationDefaultPolicies
   227          LifecycleEndorsement:
   228              Type: ImplicitMeta
   229              Rule: "MAJORITY Endorsement"
   230          Endorsement:
   231              Type: ImplicitMeta
   232              Rule: "MAJORITY Endorsement"
   233          Readers:
   234              Type: ImplicitMeta
   235              Rule: "ANY Readers"
   236          Writers:
   237              Type: ImplicitMeta
   238              Rule: "ANY Writers"
   239          Admins:
   240              Type: ImplicitMeta
   241              Rule: "MAJORITY Admins"
   242  
   243      # Capabilities describes the application level capabilities, see the
   244      # dedicated Capabilities section elsewhere in this file for a full
   245      # description
   246      Capabilities:
   247          <<: *ApplicationCapabilities
   248  
   249  ################################################################################
   250  #
   251  #   ORDERER
   252  #
   253  #   This section defines the values to encode into a config transaction or
   254  #   genesis block for orderer related parameters.
   255  #
   256  ################################################################################
   257  Orderer: &OrdererDefaults
   258  
   259      # Orderer Type: The orderer implementation to start.
   260      # Available types are "solo", "kafka" and "etcdraft".
   261      OrdererType: solo
   262  
   263      # Addresses used to be the list of orderer addresses that clients and peers
   264      # could connect to.  However, this does not allow clients to associate orderer
   265      # addresses and orderer organizations which can be useful for things such
   266      # as TLS validation.  The preferred way to specify orderer addresses is now
   267      # to include the OrdererEndpoints item in your org definition
   268      Addresses:
   269          # - 127.0.0.1:7050
   270  
   271      # Batch Timeout: The amount of time to wait before creating a batch.
   272      BatchTimeout: 2s
   273  
   274      # Batch Size: Controls the number of messages batched into a block.
   275      # The orderer views messages opaquely, but typically, messages may
   276      # be considered to be Fabric transactions.  The 'batch' is the group
   277      # of messages in the 'data' field of the block.  Blocks will be a few kb
   278      # larger than the batch size, when signatures, hashes, and other metadata
   279      # is applied.
   280      BatchSize:
   281  
   282          # Max Message Count: The maximum number of messages to permit in a
   283          # batch.  No block will contain more than this number of messages.
   284          MaxMessageCount: 500
   285  
   286          # Absolute Max Bytes: The absolute maximum number of bytes allowed for
   287          # the serialized messages in a batch. The maximum block size is this value
   288          # plus the size of the associated metadata (usually a few KB depending
   289          # upon the size of the signing identities). Any transaction larger than
   290          # this value will be rejected by ordering. If the "kafka" OrdererType is
   291          # selected, set 'message.max.bytes' and 'replica.fetch.max.bytes' on
   292          # the Kafka brokers to a value that is larger than this one.
   293          AbsoluteMaxBytes: 10 MB
   294  
   295          # Preferred Max Bytes: The preferred maximum number of bytes allowed
   296          # for the serialized messages in a batch. Roughly, this field may be considered
   297          # the best effort maximum size of a batch. A batch will fill with messages
   298          # until this size is reached (or the max message count, or batch timeout is
   299          # exceeded).  If adding a new message to the batch would cause the batch to
   300          # exceed the preferred max bytes, then the current batch is closed and written
   301          # to a block, and a new batch containing the new message is created.  If a
   302          # message larger than the preferred max bytes is received, then its batch
   303          # will contain only that message.  Because messages may be larger than
   304          # preferred max bytes (up to AbsoluteMaxBytes), some batches may exceed
   305          # the preferred max bytes, but will always contain exactly one transaction.
   306          PreferredMaxBytes: 2 MB
   307  
   308      # Max Channels is the maximum number of channels to allow on the ordering
   309      # network. When set to 0, this implies no maximum number of channels.
   310      MaxChannels: 0
   311  
   312      Kafka:
   313          # Brokers: A list of Kafka brokers to which the orderer connects. Edit
   314          # this list to identify the brokers of the ordering service.
   315          # NOTE: Use IP:port notation.
   316          Brokers:
   317              - kafka0:9092
   318              - kafka1:9092
   319              - kafka2:9092
   320  
   321      # EtcdRaft defines configuration which must be set when the "etcdraft"
   322      # orderertype is chosen.
   323      EtcdRaft:
   324          # The set of Raft replicas for this network. For the etcd/raft-based
   325          # implementation, we expect every replica to also be an OSN. Therefore,
   326          # a subset of the host:port items enumerated in this list should be
   327          # replicated under the Orderer.Addresses key above.
   328          Consenters:
   329              - Host: raft0.example.com
   330                Port: 7050
   331                ClientTLSCert: path/to/ClientTLSCert0
   332                ServerTLSCert: path/to/ServerTLSCert0
   333              - Host: raft1.example.com
   334                Port: 7050
   335                ClientTLSCert: path/to/ClientTLSCert1
   336                ServerTLSCert: path/to/ServerTLSCert1
   337              - Host: raft2.example.com
   338                Port: 7050
   339                ClientTLSCert: path/to/ClientTLSCert2
   340                ServerTLSCert: path/to/ServerTLSCert2
   341  
   342          # Options to be specified for all the etcd/raft nodes. The values here
   343          # are the defaults for all new channels and can be modified on a
   344          # per-channel basis via configuration updates.
   345          Options:
   346              # TickInterval is the time interval between two Node.Tick invocations.
   347              TickInterval: 500ms
   348  
   349              # ElectionTick is the number of Node.Tick invocations that must pass
   350              # between elections. That is, if a follower does not receive any
   351              # message from the leader of current term before ElectionTick has
   352              # elapsed, it will become candidate and start an election.
   353              # ElectionTick must be greater than HeartbeatTick.
   354              ElectionTick: 10
   355  
   356              # HeartbeatTick is the number of Node.Tick invocations that must
   357              # pass between heartbeats. That is, a leader sends heartbeat
   358              # messages to maintain its leadership every HeartbeatTick ticks.
   359              HeartbeatTick: 1
   360  
   361              # MaxInflightBlocks limits the max number of in-flight append messages
   362              # during optimistic replication phase.
   363              MaxInflightBlocks: 5
   364  
   365              # SnapshotIntervalSize defines number of bytes per which a snapshot is taken
   366              SnapshotIntervalSize: 16 MB
   367  
   368      # Organizations lists the orgs participating on the orderer side of the
   369      # network.
   370      Organizations:
   371  
   372      # Policies defines the set of policies at this level of the config tree
   373      # For Orderer policies, their canonical path is
   374      #   /Channel/Orderer/<PolicyName>
   375      Policies:
   376          Readers:
   377              Type: ImplicitMeta
   378              Rule: "ANY Readers"
   379          Writers:
   380              Type: ImplicitMeta
   381              Rule: "ANY Writers"
   382          Admins:
   383              Type: ImplicitMeta
   384              Rule: "MAJORITY Admins"
   385          # BlockValidation specifies what signatures must be included in the block
   386          # from the orderer for the peer to validate it.
   387          BlockValidation:
   388              Type: ImplicitMeta
   389              Rule: "ANY Writers"
   390  
   391      # Capabilities describes the orderer level capabilities, see the
   392      # dedicated Capabilities section elsewhere in this file for a full
   393      # description
   394      Capabilities:
   395          <<: *OrdererCapabilities
   396  
   397  ################################################################################
   398  #
   399  #   CHANNEL
   400  #
   401  #   This section defines the values to encode into a config transaction or
   402  #   genesis block for channel related parameters.
   403  #
   404  ################################################################################
   405  Channel: &ChannelDefaults
   406      # Policies defines the set of policies at this level of the config tree
   407      # For Channel policies, their canonical path is
   408      #   /Channel/<PolicyName>
   409      Policies:
   410          # Who may invoke the 'Deliver' API
   411          Readers:
   412              Type: ImplicitMeta
   413              Rule: "ANY Readers"
   414          # Who may invoke the 'Broadcast' API
   415          Writers:
   416              Type: ImplicitMeta
   417              Rule: "ANY Writers"
   418          # By default, who may modify elements at this config level
   419          Admins:
   420              Type: ImplicitMeta
   421              Rule: "MAJORITY Admins"
   422  
   423  
   424      # Capabilities describes the channel level capabilities, see the
   425      # dedicated Capabilities section elsewhere in this file for a full
   426      # description
   427      Capabilities:
   428          <<: *ChannelCapabilities
   429  
   430  ################################################################################
   431  #
   432  #   PROFILES
   433  #
   434  #   Different configuration profiles may be encoded here to be specified as
   435  #   parameters to the configtxgen tool. The profiles which specify consortiums
   436  #   are to be used for generating the orderer genesis block. With the correct
   437  #   consortium members defined in the orderer genesis block, channel creation
   438  #   requests may be generated with only the org member names and a consortium
   439  #   name.
   440  #
   441  ################################################################################
   442  Profiles:
   443  
   444      # SampleSingleMSPSolo defines a configuration which uses the Solo orderer,
   445      # and contains a single MSP definition (the MSP sampleconfig).
   446      # The Consortium SampleConsortium has only a single member, SampleOrg.
   447      SampleSingleMSPSolo:
   448          <<: *ChannelDefaults
   449          Orderer:
   450              <<: *OrdererDefaults
   451              Organizations:
   452                  - *SampleOrg
   453          Consortiums:
   454              SampleConsortium:
   455                  Organizations:
   456                      - *SampleOrg
   457  
   458      # SampleSingleMSPKafka defines a configuration that differs from the
   459      # SampleSingleMSPSolo one only in that it uses the Kafka-based orderer.
   460      SampleSingleMSPKafka:
   461          <<: *ChannelDefaults
   462          Orderer:
   463              <<: *OrdererDefaults
   464              OrdererType: kafka
   465              Organizations:
   466                  - *SampleOrg
   467          Consortiums:
   468              SampleConsortium:
   469                  Organizations:
   470                      - *SampleOrg
   471  
   472      # SampleInsecureSolo defines a configuration which uses the Solo orderer,
   473      # contains no MSP definitions, and allows all transactions and channel
   474      # creation requests for the consortium SampleConsortium.
   475      SampleInsecureSolo:
   476          <<: *ChannelDefaults
   477          Orderer:
   478              <<: *OrdererDefaults
   479          Consortiums:
   480              SampleConsortium:
   481                  Organizations:
   482  
   483      # SampleInsecureKafka defines a configuration that differs from the
   484      # SampleInsecureSolo one only in that it uses the Kafka-based orderer.
   485      SampleInsecureKafka:
   486          <<: *ChannelDefaults
   487          Orderer:
   488              OrdererType: kafka
   489              <<: *OrdererDefaults
   490          Consortiums:
   491              SampleConsortium:
   492                  Organizations:
   493  
   494      # SampleDevModeSolo defines a configuration which uses the Solo orderer,
   495      # contains the sample MSP as both orderer and consortium member, and
   496      # requires only basic membership for admin privileges. It also defines
   497      # an Application on the ordering system channel, which should usually
   498      # be avoided.
   499      SampleDevModeSolo:
   500          <<: *ChannelDefaults
   501          Orderer:
   502              <<: *OrdererDefaults
   503              Organizations:
   504                  - <<: *SampleOrg
   505                    Policies:
   506                        <<: *SampleOrgPolicies
   507                        Admins:
   508                            Type: Signature
   509                            Rule: "OR('SampleOrg.member')"
   510          Application:
   511              <<: *ApplicationDefaults
   512              Organizations:
   513                  - <<: *SampleOrg
   514                    Policies:
   515                        <<: *SampleOrgPolicies
   516                        Admins:
   517                            Type: Signature
   518                            Rule: "OR('SampleOrg.member')"
   519          Consortiums:
   520              SampleConsortium:
   521                  Organizations:
   522                      - <<: *SampleOrg
   523                        Policies:
   524                            <<: *SampleOrgPolicies
   525                            Admins:
   526                                Type: Signature
   527                                Rule: "OR('SampleOrg.member')"
   528  
   529      # SampleDevModeKafka defines a configuration that differs from the
   530      # SampleDevModeSolo one only in that it uses the Kafka-based orderer.
   531      SampleDevModeKafka:
   532          <<: *ChannelDefaults
   533          Orderer:
   534              <<: *OrdererDefaults
   535              OrdererType: kafka
   536              Organizations:
   537                  - <<: *SampleOrg
   538                    Policies:
   539                        <<: *SampleOrgPolicies
   540                        Admins:
   541                            Type: Signature
   542                            Rule: "OR('SampleOrg.member')"
   543          Application:
   544              <<: *ApplicationDefaults
   545              Organizations:
   546                  - <<: *SampleOrg
   547                    Policies:
   548                        <<: *SampleOrgPolicies
   549                        Admins:
   550                            Type: Signature
   551                            Rule: "OR('SampleOrg.member')"
   552          Consortiums:
   553              SampleConsortium:
   554                  Organizations:
   555                      - <<: *SampleOrg
   556                        Policies:
   557                            <<: *SampleOrgPolicies
   558                            Admins:
   559                                Type: Signature
   560                                Rule: "OR('SampleOrg.member')"
   561  
   562      # SampleSingleMSPChannel defines a channel with only the sample org as a
   563      # member. It is designed to be used in conjunction with SampleSingleMSPSolo
   564      # and SampleSingleMSPKafka orderer profiles.   Note, for channel creation
   565      # profiles, only the 'Application' section and consortium # name are
   566      # considered.
   567      SampleSingleMSPChannel:
   568          <<: *ChannelDefaults
   569          Consortium: SampleConsortium
   570          Application:
   571              <<: *ApplicationDefaults
   572              Organizations:
   573                  - <<: *SampleOrg
   574  
   575      # SampleDevModeEtcdRaft defines a configuration that differs from the
   576      # SampleDevModeSolo one only in that it uses the etcd/raft-based orderer.
   577      SampleDevModeEtcdRaft:
   578          <<: *ChannelDefaults
   579          Orderer:
   580              <<: *OrdererDefaults
   581              OrdererType: etcdraft
   582              Organizations:
   583                  - <<: *SampleOrg
   584                    Policies:
   585                        <<: *SampleOrgPolicies
   586                        Admins:
   587                            Type: Signature
   588                            Rule: "OR('SampleOrg.member')"
   589          Application:
   590              <<: *ApplicationDefaults
   591              Organizations:
   592                  - <<: *SampleOrg
   593                    Policies:
   594                        <<: *SampleOrgPolicies
   595                        Admins:
   596                            Type: Signature
   597                            Rule: "OR('SampleOrg.member')"
   598          Consortiums:
   599              SampleConsortium:
   600                  Organizations:
   601                      - <<: *SampleOrg
   602                        Policies:
   603                            <<: *SampleOrgPolicies
   604                            Admins:
   605                                Type: Signature
   606                                Rule: "OR('SampleOrg.member')"