每个通道的同意者子集 - 每个通道组织的单独订购者

subsets of consenters for each channel - seperate orderers of an organization per channel

我必须找到一种方法来为每个渠道定义同意者子集。

主要目的是将组织的订购者按渠道分开。

例如:

* I have Org1 and Org2:
        ** Org1 has orderes: orderer11, orderer 12
        ** Org2 has orderer: 21, orderer 22
* I want to create system channel which contains EtcdRaft consenter with all 4 orderers.
* I want to create 2 application channels, each one of them will contain EtcdRaft with 1 orderer from each org in the following way:
        ** channel1 with orderer11 and orderer 21
        ** channel2 with orderer12 and orderer 22

我试图在 configtx.yaml 文件上配置所需的配置,但我的所有实验都失败了。

预期配置示例:

Profiles:
/** System Channel **/
    mychannel
        Organization: OrdererOrg
        Orderer:
            <<: *OrdererDefaults
                    OrdererType: etcdraft
                    EtcdRaft:
                Consenters:
                    - Host: orderer11.example.com
                    - Host: orderer12.example.com
                    - Host: orderer21.example.com
                    - Host: orderer22.example.com
        Consortiums:
            Organizations:
                - *org1
                - *org2
/** Application Channels **/
    channel1
        Orderer:
            <<: *OrdererDefaults
                    OrdererType: etcdraft
                    EtcdRaft:
                Consenters:
                    - Host: orderer11.example.com
                    - Host: orderer21.example.com
        Consortiums:
            Organizations:
                - *org1
                - *org2
    channel2
        Orderer:
            <<: *OrdererDefaults
                    OrdererType: etcdraft
                    EtcdRaft:
                Consenters:
                    - Host: orderer12.example.com
                    - Host: orderer22.example.com
        Consortiums:
            Organizations:
                - *org1
                - *org2

如何应用预期的配置?

系统通道被订购服务用作创建应用程序通道的模板。系统通道中定义的排序服务的节点成为新通道的默认同意者集,而排序服务的管理员成为通道的排序者管理员。

所以你在个人资料申请频道部分定义Orderer没用

但可以通过更新应用程序通道配置在通道中添加或删除排序节点

因此,如果您想为每个通道使用单独的订购者,请在创建应用程序通道后删除您的应用程序通道配置的同意者集,您可以参考 https://hyperledger-fabric.readthedocs.io/en/release-2.2/config_update.html

https://kctheservant.medium.com/add-an-orderer-to-a-running-raft-based-orderer-cluster-b6a432da138c

我在版本 1.4.2 中成功地为每个通道使用了单独的排序器,我认为版本 2 更容易。3.x。因为您可以在没有系统通道的情况下设置结构网络。