Fabric部署-configtxgen配置文件

Profiles:

#orderer系统通道模版

TwoOrgsOrdererGenesis2:

Capabilities:

<<: *ChannelCapabilities

#指定orderer系统通道自身的配置信息

Orderer:

<<: *Ordererlychee

#参与到此orderer的组织信息

Organizations:

#组织名

- *OrdererOrg

Capabilities:

<<: *OrdererCapabilities

#orderer所服务的联盟列表
Consortiums:

#联盟SampleConsortium的信息

SampleConsortium:

#参与联盟的peer组织

Organizations:

#组织名

- *Org1
- *Org2

#应用通道模版

TwoOrgsChannel2:

#该应用通道所关联联盟的名称

Consortium: SampleConsortium

#指定属于某应用通道的信息
Application:

<<: *ApplicationDefaults
Organizations:

- *Org1
- *Org2

Capabilities:

<<: *ApplicationCapabilities

###########################################

#该部分定义了在这个配置文件中被引用的不同的组织标识

Organizations:

# SampleOrg 使用sampleconfig定义一个MSP。这个MSP不会在生产中使用,但可以临时使用

- &OrdererOrg

# DefaultOrg 定义一个在开发环境中sampleconfig使用过的组织

Name: OrdererOrg

# load MSP 使用的ID

ID: OrdererMSP

# MSP配置文件路径,由cryptogen工具生成的加密材料路径

MSPDir: crypto-config/ordererOrganizations/example.com/msp

- &Org1

Name: Org1MSP

ID: Org1MSP

MSPDir: crypto-config/peerOrganizations/org1.example.com/msp

#AnchorPeers 定义了可用于跨组织gossip通信的peer的位置。即peer组织的锚节点

#注意,这个值只有在Application下使用时才会编码进创世区块(即profile中 Application下引用这个组织Org1)

AnchorPeers:

- Host: peer0.org1.example.com

Port: 7051

- &Org2

Name: Org2MSP

ID: Org2MSP

MSPDir: crypto-config/peerOrganizations/org2.example.com/msp

#AnchorPeers 定义了可用于跨组织gossip通信的peer的位置。即peer组织的锚节点

#注意,这个值只有在Application下使用时才会编码进创世区块(即profile中 Application下引用这个组织Org2)

AnchorPeers:

- Host: peer0.org2.example.com

Port: 7051

###########################################

#该部分定义了编码到配置交易或创世区块中的与orderer相关的参数值

Orderer: &Ordererexample

#orderer 的启动方式

#可选类型是 "solo" 和 "kafka"

OrdererType: kafka

Addresses:
orderer1.example.com:7050
orderer2.example.com:7050
orderer3.example.com:7050

# 创建batch的超时时间

BatchTimeout: 2s

# 控制batch到块中的消息数

BatchSize:

#batch中允许的最大消息数量

MaxMessageCount: 10

# 设置最大的区块大小。每个区块最大有Orderer.AbsoluteMaxBytes个字节(不包括头部)。
# 假定这里设置的值为A,记住这个值,这会影响怎样配置Kafka代理。

# batch中允许的绝对最大序列化消息字节数

# 如果OrdererType 是kafka,则要设置Kafka brokers的'message.max.bytes'和'replica.fetch.max.bytes'的值大于该值

AbsoluteMaxBytes: 99 MB


# 设置每个区块建议的大小。Kafka对于相对小的消息提供更高的吞吐量;区块大小最好不要超过1MB。
PreferredMaxBytes: 512 KB

Kafka:

# 包括Kafka集群中至少两个代理的地址信息(IP:port)
# 这个List不需要是完全的(这些是你的种子代理)
# 这个代理表示当前Orderer所要连接的Kafka代理
Brokers:

- k1:9092
- k3:9092

# 作为网络中orderer侧参与者的组织列表

Organizations:

###########################################
#该部分定义了编码到配置交易或创世区块中的与APP相关的参数值

#注意,在创建channel tx时才会用Application,否则是创建区块

Application: &ApplicationDefaults

Organizations:

###########################################

#未知
Capabilities:

Global: &ChannelCapabilities

V1_1: true

Orderer: &OrdererCapabilities

V1_1: true

Application: &ApplicationCapabilities

V1_1: true

猜你喜欢

转载自blog.csdn.net/weixin_41926234/article/details/80624209
今日推荐