Advertisement
Guest User

configtx.yaml

a guest
Jul 9th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.21 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.  
  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. - &OrdererOrg
  20. # DefaultOrg defines the organization which is used in the sampleconfig
  21. # of the fabric.git development environment
  22. Name: OrdererOrg
  23.  
  24. # ID to load the MSP definition as
  25. ID: OrdererMSP
  26.  
  27. # MSPDir is the filesystem path which contains the MSP configuration
  28. MSPDir: crypto-config/ordererOrganizations/example.com/msp
  29.  
  30. # Policies defines the set of policies at this level of the config tree
  31. # For organization policies, their canonical path is usually
  32. # /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
  33. Policies:
  34. Readers:
  35. Type: Signature
  36. Rule: "OR('OrdererMSP.member')"
  37. Writers:
  38. Type: Signature
  39. Rule: "OR('OrdererMSP.member')"
  40. Admins:
  41. Type: Signature
  42. Rule: "OR('OrdererMSP.admin')"
  43.  
  44. - &Org1
  45. # DefaultOrg defines the organization which is used in the sampleconfig
  46. # of the fabric.git development environment
  47. Name: Org1MSP
  48.  
  49. # ID to load the MSP definition as
  50. ID: Org1MSP
  51.  
  52. MSPDir: crypto-config/peerOrganizations/org1.com/msp
  53.  
  54. # Policies defines the set of policies at this level of the config tree
  55. # For organization policies, their canonical path is usually
  56. # /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
  57. Policies:
  58. Readers:
  59. Type: Signature
  60. Rule: "OR('Org1MSP.admin', 'Org1MSP.peer', 'Org1MSP.client')"
  61. Writers:
  62. Type: Signature
  63. Rule: "OR('Org1MSP.admin', 'Org1MSP.client')"
  64. Admins:
  65. Type: Signature
  66. Rule: "OR('Org1MSP.admin', 'Org1MSP.client')"
  67.  
  68. # leave this flag set to true.
  69. AnchorPeers:
  70. # AnchorPeers defines the location of peers which can be used
  71. # for cross org gossip communication. Note, this value is only
  72. # encoded in the genesis block in the Application section context
  73. - Host: peer0.org1.com
  74. Port: 7051
  75.  
  76. - &Org2
  77. # DefaultOrg defines the organization which is used in the sampleconfig
  78. # of the fabric.git development environment
  79. Name: Org2MSP
  80.  
  81. # ID to load the MSP definition as
  82. ID: Org2MSP
  83.  
  84. MSPDir: crypto-config/peerOrganizations/org2.com/msp
  85.  
  86. # Policies defines the set of policies at this level of the config tree
  87. # For organization policies, their canonical path is usually
  88. # /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
  89. Policies:
  90. Readers:
  91. Type: Signature
  92. Rule: "OR('Org2MSP.admin', 'Org2MSP.peer', 'Org2MSP.client')"
  93. Writers:
  94. Type: Signature
  95. Rule: "OR('Org2MSP.admin', 'Org2MSP.client')"
  96. Admins:
  97. Type: Signature
  98. Rule: "OR('Org2MSP.admin', 'Org2MSP.client')"
  99.  
  100. AnchorPeers:
  101. # AnchorPeers defines the location of peers which can be used
  102. # for cross org gossip communication. Note, this value is only
  103. # encoded in the genesis block in the Application section context
  104. - Host: peer0.org2.com
  105. Port: 7051
  106.  
  107. ################################################################################
  108. #
  109. # SECTION: Capabilities
  110. #
  111. # - This section defines the capabilities of fabric network. This is a new
  112. # concept as of v1.1.0 and should not be utilized in mixed networks with
  113. # v1.0.x peers and orderers. Capabilities define features which must be
  114. # present in a fabric binary for that binary to safely participate in the
  115. # fabric network. For instance, if a new MSP type is added, newer binaries
  116. # might recognize and validate the signatures from this type, while older
  117. # binaries without this support would be unable to validate those
  118. # transactions. This could lead to different versions of the fabric binaries
  119. # having different world states. Instead, defining a capability for a channel
  120. # informs those binaries without this capability that they must cease
  121. # processing transactions until they have been upgraded. For v1.0.x if any
  122. # capabilities are defined (including a map with all capabilities turned off)
  123. # then the v1.0.x peer will deliberately crash.
  124. #
  125. ################################################################################
  126. Capabilities:
  127. # Channel capabilities apply to both the orderers and the peers and must be
  128. # supported by both.
  129. # Set the value of the capability to true to require it.
  130. Channel: &ChannelCapabilities
  131. # V1.3 for Channel is a catchall flag for behavior which has been
  132. # determined to be desired for all orderers and peers running at the v1.3.x
  133. # level, but which would be incompatible with orderers and peers from
  134. # prior releases.
  135. # Prior to enabling V1.3 channel capabilities, ensure that all
  136. # orderers and peers on a channel are at v1.3.0 or later.
  137. V1_3: true
  138.  
  139. # Orderer capabilities apply only to the orderers, and may be safely
  140. # used with prior release peers.
  141. # Set the value of the capability to true to require it.
  142. Orderer: &OrdererCapabilities
  143. # V1.1 for Orderer is a catchall flag for behavior which has been
  144. # determined to be desired for all orderers running at the v1.1.x
  145. # level, but which would be incompatible with orderers from prior releases.
  146. # Prior to enabling V1.1 orderer capabilities, ensure that all
  147. # orderers on a channel are at v1.1.0 or later.
  148. V1_1: true
  149.  
  150. # Application capabilities apply only to the peer network, and may be safely
  151. # used with prior release orderers.
  152. # Set the value of the capability to true to require it.
  153. Application: &ApplicationCapabilities
  154. # V1.3 for Application enables the new non-backwards compatible
  155. # features and fixes of fabric v1.3.
  156. V1_3: true
  157. # V1.2 for Application enables the new non-backwards compatible
  158. # features and fixes of fabric v1.2 (note, this need not be set if
  159. # later version capabilities are set)
  160. V1_2: false
  161. # V1.1 for Application enables the new non-backwards compatible
  162. # features and fixes of fabric v1.1 (note, this need not be set if
  163. # later version capabilities are set).
  164. V1_1: false
  165.  
  166. ################################################################################
  167. #
  168. # SECTION: Application
  169. #
  170. # - This section defines the values to encode into a config transaction or
  171. # genesis block for application related parameters
  172. #
  173. ################################################################################
  174. Application: &ApplicationDefaults
  175.  
  176. # Organizations is the list of orgs which are defined as participants on
  177. # the application side of the network
  178. Organizations:
  179.  
  180. # Policies defines the set of policies at this level of the config tree
  181. # For Application policies, their canonical path is
  182. # /Channel/Application/<PolicyName>
  183. Policies:
  184. Readers:
  185. Type: ImplicitMeta
  186. Rule: "ANY Readers"
  187. Writers:
  188. Type: ImplicitMeta
  189. Rule: "ANY Writers"
  190. Admins:
  191. Type: ImplicitMeta
  192. Rule: "MAJORITY Admins"
  193.  
  194. Capabilities:
  195. <<: *ApplicationCapabilities
  196. ################################################################################
  197. #
  198. # SECTION: Orderer
  199. #
  200. # - This section defines the values to encode into a config transaction or
  201. # genesis block for orderer related parameters
  202. #
  203. ################################################################################
  204. Orderer: &OrdererDefaults
  205.  
  206. # Orderer Type: The orderer implementation to start
  207. # Available types are "solo" and "kafka"
  208. OrdererType: solo
  209.  
  210. Addresses:
  211. - orderer.example.com:7050
  212.  
  213. # Batch Timeout: The amount of time to wait before creating a batch
  214. BatchTimeout: 2s
  215.  
  216. # Batch Size: Controls the number of messages batched into a block
  217. BatchSize:
  218.  
  219. # Max Message Count: The maximum number of messages to permit in a batch
  220. MaxMessageCount: 10
  221.  
  222. # Absolute Max Bytes: The absolute maximum number of bytes allowed for
  223. # the serialized messages in a batch.
  224. AbsoluteMaxBytes: 99 MB
  225.  
  226. # Preferred Max Bytes: The preferred maximum number of bytes allowed for
  227. # the serialized messages in a batch. A message larger than the preferred
  228. # max bytes will result in a batch larger than preferred max bytes.
  229. PreferredMaxBytes: 512 KB
  230.  
  231. # Organizations is the list of orgs which are defined as participants on
  232. # the orderer side of the network
  233. Organizations:
  234.  
  235. # Policies defines the set of policies at this level of the config tree
  236. # For Orderer policies, their canonical path is
  237. # /Channel/Orderer/<PolicyName>
  238. Policies:
  239. Readers:
  240. Type: ImplicitMeta
  241. Rule: "ANY Readers"
  242. Writers:
  243. Type: ImplicitMeta
  244. Rule: "ANY Writers"
  245. Admins:
  246. Type: ImplicitMeta
  247. Rule: "MAJORITY Admins"
  248. # BlockValidation specifies what signatures must be included in the block
  249. # from the orderer for the peer to validate it.
  250. BlockValidation:
  251. Type: ImplicitMeta
  252. Rule: "ANY Writers"
  253.  
  254. ################################################################################
  255. #
  256. # CHANNEL
  257. #
  258. # This section defines the values to encode into a config transaction or
  259. # genesis block for channel related parameters.
  260. #
  261. ################################################################################
  262. Channel: &ChannelDefaults
  263. # Policies defines the set of policies at this level of the config tree
  264. # For Channel policies, their canonical path is
  265. # /Channel/<PolicyName>
  266. Policies:
  267. # Who may invoke the 'Deliver' API
  268. Readers:
  269. Type: ImplicitMeta
  270. Rule: "ANY Readers"
  271. # Who may invoke the 'Broadcast' API
  272. Writers:
  273. Type: ImplicitMeta
  274. Rule: "ANY Writers"
  275. # By default, who may modify elements at this config level
  276. Admins:
  277. Type: ImplicitMeta
  278. Rule: "MAJORITY Admins"
  279.  
  280. # Capabilities describes the channel level capabilities, see the
  281. # dedicated Capabilities section elsewhere in this file for a full
  282. # description
  283. Capabilities:
  284. <<: *ChannelCapabilities
  285.  
  286. ################################################################################
  287. #
  288. # Profile
  289. #
  290. # - Different configuration profiles may be encoded here to be specified
  291. # as parameters to the configtxgen tool
  292. #
  293. ################################################################################
  294. Profiles:
  295.  
  296. TwoOrgsOrdererGenesis:
  297. <<: *ChannelDefaults
  298. Orderer:
  299. <<: *OrdererDefaults
  300. Organizations:
  301. - *OrdererOrg
  302. Capabilities:
  303. <<: *OrdererCapabilities
  304. Consortiums:
  305. SampleConsortium:
  306. Organizations:
  307. - *Org1
  308. - *Org2
  309. TwoOrgsChannel:
  310. Consortium: SampleConsortium
  311. <<: *ChannelDefaults
  312. Application:
  313. <<: *ApplicationDefaults
  314. Organizations:
  315. - *Org1
  316. - *Org2
  317. Capabilities:
  318. <<: *ApplicationCapabilities
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement