Advertisement
Guest User

configtx.yaml

a guest
Feb 20th, 2020
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 11.25 KB | None | 0 0
  1. # Copyright IBM Corp. All Rights Reserved.
  2. #
  3. # SPDX-License-Identifier: Apache-2.0
  4. #
  5.  
  6. ---
  7. ################################################################################
  8. #
  9. #   Section: Organizations
  10. #
  11. #   - This section defines the different organizational identities which will
  12. #   be referenced later in the configuration.
  13. #
  14. ################################################################################
  15. Organizations:
  16.     # SampleOrg defines an MSP using the sampleconfig.  It should never be used
  17.     # in production but may be used as a template for other definitions
  18.    - &OrgO
  19.        # DefaultOrg defines the organization which is used in the sampleconfig
  20.        # of the fabric.git development environment
  21.       Name: orgoMSP
  22.  
  23.        # ID to load the MSP definition as
  24.       ID: orgoMSP
  25.  
  26.        # MSPDir is the filesystem path which contains the MSP configuration
  27.       MSPDir: /home/user1/hyperledger/orgo/msp
  28.  
  29.        # Policies defines the set of policies at this level of the config tree
  30.        # For organization policies, their canonical path is usually
  31.        #   /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
  32.       Policies:
  33.          Readers:
  34.             Type: Signature
  35.             Rule: "OR('orgoMSP.member')"
  36.          Writers:
  37.             Type: Signature
  38.             Rule: "OR('orgoMSP.member', 'orgoMSP.admin')"
  39.          Admins:
  40.             Type: Signature
  41.             Rule: "OR('orgoMSP.admin')"
  42.  
  43.    - &Org1
  44.         # DefaultOrg defines the organization which is used in the sampleconfig
  45.         # of the fabric.git development environment
  46.       Name: org1MSP
  47.  
  48.         # ID to load the MSP definition as
  49.       ID: org1MSP
  50.  
  51.       MSPDir: /home/user1/hyperledger/org1/msp
  52.  
  53.         # Policies defines the set of policies at this level of the config tree
  54.         # For organization policies, their canonical path is usually
  55.         #   /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
  56.       Policies:
  57.          Readers:
  58.             Type: Signature
  59.             Rule: "OR('org1MSP.admin', 'org1MSP.peer', 'org1MSP.client')"
  60.          Writers:
  61.             Type: Signature
  62.             Rule: "OR('org1MSP.admin', 'org1MSP.client')"
  63.          Admins:
  64.             Type: Signature
  65.             Rule: "OR('org1MSP.admin')"
  66.          Endorsement:
  67.             Type: Signature
  68.             Rule: "OR('org1MSP.peer')"
  69.  
  70.         # leave this flag set to true.
  71.       AnchorPeers:
  72.            # AnchorPeers defines the location of peers which can be used
  73.             # for cross org gossip communication.  Note, this value is only
  74.             # encoded in the genesis block in the Application section context
  75.          - Host: peer1-org1.inuit.local
  76.            Port: 7051
  77.  
  78.    - &Org2
  79.         # DefaultOrg defines the organization which is used in the sampleconfig
  80.         # of the fabric.git development environment
  81.       Name: org2MSP
  82.  
  83.         # ID to load the MSP definition as
  84.       ID: org2MSP
  85.  
  86.       MSPDir: /home/user1/hyperledger/org2/msp
  87.  
  88.         # Policies defines the set of policies at this level of the config tree
  89.         # For organization policies, their canonical path is usually
  90.         #   /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
  91.       Policies:
  92.          Readers:
  93.             Type: Signature
  94.             Rule: "OR('org2MSP.admin', 'org2MSP.peer', 'org2MSP.client')"
  95.          Writers:
  96.             Type: Signature
  97.             Rule: "OR('org2MSP.admin', 'org2MSP.client')"
  98.          Admins:
  99.             Type: Signature
  100.             Rule: "OR('org2MSP.admin')"
  101.          Endorsement:
  102.             Type: Signature
  103.             Rule: "OR('org2MSP.peer')"
  104.  
  105.       AnchorPeers:
  106.            # AnchorPeers defines the location of peers which can be used
  107.             # for cross org gossip communication.  Note, this value is only
  108.             # encoded in the genesis block in the Application section context
  109.          - Host: peer1-org2.inuit.local
  110.            Port: 7051
  111.  
  112. ################################################################################
  113. #
  114. #   SECTION: Capabilities
  115. #
  116. #   - This section defines the capabilities of fabric network. This is a new
  117. #   concept as of v1.1.0 and should not be utilized in mixed networks with
  118. #   v1.0.x peers and orderers.  Capabilities define features which must be
  119. #   present in a fabric binary for that binary to safely participate in the
  120. #   fabric network.  For instance, if a new MSP type is added, newer binaries
  121. #   might recognize and validate the signatures from this type, while older
  122. #   binaries without this support would be unable to validate those
  123. #   transactions.  This could lead to different versions of the fabric binaries
  124. #   having different world states.  Instead, defining a capability for a channel
  125. #   informs those binaries without this capability that they must cease
  126. #   processing transactions until they have been upgraded.  For v1.0.x if any
  127. #   capabilities are defined (including a map with all capabilities turned off)
  128. #   then the v1.0.x peer will deliberately crash.
  129. #
  130. ################################################################################
  131. Capabilities:
  132.    # Channel capabilities apply to both the orderers and the peers and must be
  133.     # supported by both.
  134.     # Set the value of the capability to true to require it.
  135.    Channel: &ChannelCapabilities
  136.       V2_0: true
  137.  
  138.     # Orderer capabilities apply only to the orderers, and may be safely
  139.     # used with prior release peers.
  140.     # Set the value of the capability to true to require it.
  141.    Orderer: &OrdererCapabilities
  142.       V2_0: true
  143.  
  144.     # Application capabilities apply only to the peer network, and may be safely
  145.     # used with prior release orderers.
  146.     # Set the value of the capability to true to require it.
  147.    Application: &ApplicationCapabilities
  148.       V2_0: true
  149.  
  150.  
  151. ################################################################################
  152. #
  153. #   SECTION: Application
  154. #
  155. #   - This section defines the values to encode into a config transaction or
  156. #   genesis block for application related parameters
  157. #
  158. ################################################################################
  159. Application: &ApplicationDefaults
  160.     # the application side of the network
  161.    Organizations:
  162.     # Policies defines the set of policies at this level of the config tree
  163.     # For Application policies, their canonical path is
  164.     #   /Channel/Application/<PolicyName>
  165.    Policies:
  166.       Readers:
  167.          Type: ImplicitMeta
  168.          Rule: "ANY Readers"
  169.       Writers:
  170.          Type: ImplicitMeta
  171.          Rule: "ANY Writers"
  172.       Admins:
  173.          Type: ImplicitMeta
  174.          Rule: "MAJORITY Admins"
  175.       LifecycleEndorsement:
  176.          Type: ImplicitMeta
  177.          Rule: "MAJORITY Endorsement"
  178.       Endorsement:
  179.          Type: ImplicitMeta
  180.          Rule: "MAJORITY Endorsement"
  181.  
  182.    Capabilities:
  183.       <<: *ApplicationCapabilities
  184. ################################################################################
  185. #
  186. #   SECTION: Orderer
  187. #
  188. #   - This section defines the values to encode into a config transaction or
  189. #   genesis block for orderer related parameters
  190. #
  191. ################################################################################
  192. Orderer: &OrdererDefaults
  193.  
  194.    OrdererType: etcdraft
  195.    Addresses:
  196.      - ord1-orgo.inuit.local:7050
  197.       - ord2-orgo.inuit.local:8050
  198.       - ord3-orgo.inuit.local:7050
  199.       - ord4-orgo.inuit.local:7050
  200.    BatchTimeOut: 2s
  201.    BatchSize:
  202.       MaxMessageCount: 10
  203.       AbsoluteMaxBytes: 99 MB
  204.       PreferredMaxBytes: 512 KB
  205.    EtcdRaft:
  206.       Consenters:
  207.       - Host: ord1-orgo.inuit.local
  208.         Port: 7050
  209.         ClientTLSCert: /home/user1/hyperledger/orderers/o1/o1-tcert.pem
  210.         ServerTLSCert: /home/user1/hyperledger/orderers/o1/o1-tcert.pem
  211.       - Host: ord2-orgo.inuit.local
  212.         Port: 8050
  213.         ClientTLSCert: /home/user1/hyperledger/orderers/o2/o2-tcert.pem
  214.         ServerTLSCert: /home/user1/hyperledger/orderers/o2/o2-tcert.pem
  215.       - Host: ord3-orgo.inuit.local
  216.         Port: 7050
  217.         ClientTLSCert: /home/user1/hyperledger/orderers/o3/o3-tcert.pem
  218.         ServerTLSCert: /home/user1/hyperledger/orderers/o3/o3-tcert.pem
  219.       - Host: ord4-orgo.inuit.local
  220.         Port: 7050
  221.         ClientTLSCert: /home/user1/hyperledger/orderers/o4/o4-tcert.pem
  222.         ServerTLSCert: /home/user1/hyperledger/orderers/o4/o4-tcert.pem
  223.       Options:
  224.          TickInterval: 500ms
  225.          ElectionTick: 10
  226.          HeartBeatTick: 1
  227.          MaxInflightBlocks: 5
  228.          SnapshotIntervalSize: 20 MB
  229.    Organizations:
  230.     # Policies defines the set of policies at this level of the config tree
  231.     # For Orderer policies, their canonical path is
  232.     #   /Channel/Orderer/<PolicyName>
  233.    Policies:
  234.       Readers:
  235.          Type: ImplicitMeta
  236.          Rule: "ANY Readers"
  237.       Writers:
  238.          Type: ImplicitMeta
  239.          Rule: "ANY Writers"
  240.       Admins:
  241.          Type: ImplicitMeta
  242.          Rule: "MAJORITY Admins"
  243.         # BlockValidation specifies what signatures must be included in the block
  244.         # from the orderer for the peer to validate it.
  245.       BlockValidation:
  246.          Type: ImplicitMeta
  247.          Rule: "ANY Writers"
  248.    Capabilities:
  249.       <<: *OrdererCapabilities
  250.  
  251. ################################################################################
  252. #
  253. #   CHANNEL
  254. #
  255. #   This section defines the values to encode into a config transaction or
  256. #   genesis block for channel related parameters.
  257. #
  258. ################################################################################
  259. Channel: &ChannelDefaults
  260.     # Policies defines the set of policies at this level of the config tree
  261.     # For Channel policies, their canonical path is
  262.     #   /Channel/<PolicyName>
  263.    Policies:
  264.        # Who may invoke the 'Deliver' API
  265.       Readers:
  266.          Type: ImplicitMeta
  267.          Rule: "ANY Readers"
  268.         # Who may invoke the 'Broadcast' API
  269.       Writers:
  270.          Type: ImplicitMeta
  271.          Rule: "ANY Writers"
  272.         # By default, who may modify elements at this config level
  273.       Admins:
  274.          Type: ImplicitMeta
  275.          Rule: "MAJORITY Admins"
  276.  
  277.     # Capabilities describes the channel level capabilities, see the
  278.     # dedicated Capabilities section elsewhere in this file for a full
  279.     # description
  280.    Capabilities:
  281.       <<: *ChannelCapabilities
  282.  
  283. ################################################################################
  284. #
  285. #   Profile
  286. #
  287. #   - Different configuration profiles may be encoded here to be specified
  288. #   as parameters to the configtxgen tool
  289. #
  290. ################################################################################
  291. Profiles:
  292.    TwoOrgsChannel:
  293.       Consortium: SampleConsortium
  294.       <<: *ChannelDefaults
  295.       Application:
  296.          <<: *ApplicationDefaults
  297.          Organizations:
  298.            - *Org1
  299.             - *Org2
  300.          Capabilities:
  301.             <<: *ApplicationCapabilities
  302.  
  303.    SampleMultiNodeEtcdRaft:
  304.       <<: *ChannelDefaults
  305.       Orderer:
  306.          <<: *OrdererDefaults
  307.          Organizations:
  308.         - *OrgO
  309.          Capabilities:
  310.             <<: *OrdererCapabilities
  311.       Application:
  312.          <<: *ApplicationDefaults
  313.          Organizations:
  314.             - <<: *OrgO
  315.       Consortiums:
  316.          SampleConsortium:
  317.             Organizations:
  318.               - *Org1
  319.                - *Org2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement