#-表示数组,&表示锚点,*表示引用,<<表示合并到当前数据。
```bash
Profiles:
TwoOrgsOrdererGenesis: #Orderer系统通道配置
Orderer:
<<: *OrdererDefaults #引用OrdererDefaults并合并到当前
Organizations: #属于Orderer通道的组织
- *OrdererOrg
Consortiums: #Orderer所服务的联盟列表
SampleConsortium:
Organizations:
- *Org1
- *Org2
TwoOrgsChannel: #应用通道配置
Consortium: SampleConsortium #应用通道关联的联盟
Application:
<<: *ApplicationDefaults #引用ApplicationDefaults并合并到当前
Organizations: #初始加入应用通道的组织
- *Org1
- *Org2
Organizations:
- &OrdererOrg
Name: OrdererOrg
ID: OrdererMSP # MSP ID
MSPDir: crypto-config/ordererOrganizations/example.com/msp #MSP相关文件本地路径
- &Org1
Name: Org1MSP
ID: Org1MSP
MSPDir: crypto-config/peerOrganizations/org1.example.com/msp
AnchorPeers: #锚节点地址,用于跨组织的Gossip通信
- Host: peer0.org1.example.com
Port: 7051
- &Org2
Name: Org2MSP
ID: Org2MSP
MSPDir: crypto-config/peerOrganizations/org2.example.com/msp
AnchorPeers: #锚节点地址,用于跨组织的Gossip通信
- Host: peer0.org2.example.com
Port: 7051
Orderer: &OrdererDefaults
OrdererType: solo # Orderer共识插件类型,分solo或kafka
Addresses:
- orderer.example.com:7050 #服务地址
BatchTimeout: 2s #创建批量交易的最大超时,一批交易构成一个块
BatchSize: #写入区块内的交易个数
MaxMessageCount: 10 #一批消息的最大个数
AbsoluteMaxBytes: 98 MB #一批交易的最大字节数,任何时候均不能超过
PreferredMaxBytes: 512 KB #批量交易的建议字节数
Kafka:
Brokers: #Kafka端口
- 127.0.0.1:9092
Organizations: #参与维护Orderer的组织,默认空
Application: &ApplicationDefaults
Organizations: #加入到通道的组织信息,此处为不包括任何组织
```
---------------------
作者:尹成
来源:优快云
原文:https://blog.youkuaiyun.com/itcastcpp/article/details/80384270
版权声明:本文为博主原创文章,转载请附上博文链接!
fabric1.1新增
################################################################################
#
# SECTION: Capabilities
#
# - This section defines the capabilities of fabric network. This is a new
# concept as of v1.1.0 and should not be utilized in mixed networks with
# v1.0.x peers and orderers. Capabilities define features which must be
# present in a fabric binary for that binary to safely participate in the
# fabric network. For instance, if a new MSP type is added, newer binaries
# might recognize and validate the signatures from this type, while older
# binaries without this support would be unable to validate those
# transactions. This could lead to different versions of the fabric binaries
# having different world states. Instead, defining a capability for a channel
# informs those binaries without this capability that they must cease
# processing transactions until they have been upgraded. For v1.0.x if any
# capabilities are defined (including a map with all capabilities turned off)
# then the v1.0.x peer will deliberately crash.
#
################################################################################
Capabilities:
# Channel capabilities apply to both the orderers and the peers and must be
# supported by both. Set the value of the capability to true to require it.
#通道的性能必须同时支持orderers和peers,默认值设为true
Global: &ChannelCapabilities
# V1.1 for Global is a catchall flag for behavior which has been
# determined to be desired for all orderers and peers running v1.0.x,
# but the modification of which would cause incompatibilities. Users
# should leave this flag set to true.
V1_1: true
# Orderer capabilities apply only to the orderers, and may be safely
# manipulated without concern for upgrading peers. Set the value of the
# capability to true to require it.
#orderer只需要功能上适配orderers节点,不用担心peers节点更新对操作的影响。默认为true
Orderer: &OrdererCapabilities
# V1.1 for Order is a catchall flag for behavior which has been
# determined to be desired for all orderers running v1.0.x, but the
# modification of which would cause incompatibilities. Users should
# leave this flag set to true.
V1_1: true
# Application capabilities apply only to the peer network, and may be safely
# manipulated without concern for upgrading orderers. Set the value of the
# capability to true to require it.
#同样的application只需要适配peer网络,不必担心orderers的更新默认值同样为true
Application: &ApplicationCapabilities
# V1.1 for Application is a catchall flag for behavior which has been
# determined to be desired for all peers running v1.0.x, but the
# modification of which would cause incompatibilities. Users should
# leave this flag set to true.
V1_1: true