为RAFT应用程序通道设置订购者的子集

问题描述 投票:0回答:1

我正在尝试使用first-network中的fabric-samples创建一个应用程序通道。

  1. 我正在创建部署以运行在RAFT集群中运行的4个订购节点。以下是用于在configtx.yaml文件中创建Orderer Genesis块的配置文件部分。

    SampleMultiNodeEtcdRaft
        <<: *ChannelDefaults
        Capabilities:
        <<: *ChannelCapabilities
        Orderer:
            <<: *OrdererDefaults
            OrdererType: etcdraft
            EtcdRaft:
                Consenters:
                - Host: orderer.example.com
                  Port: 7050
                  ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
                  ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
                - Host: orderer2.example.com
                  Port: 8050
                  ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
                  ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
                - Host: orderer3.example.com
                  Port: 9050
                  ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
                  ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
                - Host: orderer4.example.com
                  Port: 10050
                  ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer4.example.com/tls/server.crt
                  ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer4.example.com/tls/server.crt
            Addresses:
                - orderer.example.com:7050
                - orderer2.example.com:8050
                - orderer3.example.com:9050
                - orderer4.example.com:10050
            Organizations:
            - *OrdererOrg
            Capabilities:
                <<: *OrdererCapabilities
        Application:
            <<: *ApplicationDefaults
            Organizations:
            - <<: *OrdererOrg
        Consortiums:
            SampleConsortium:
                Organizations:
                - *Org1
                - *Org2
    
  2. 现在,我想创建一个仅具有3个订购节点(在给定4个订购节点中)的应用程序通道:orderer, orderer2, orderer3。因此,我将应用程序通道的配置文件部分设置如下(在configtx.yaml文件中):

    TwoOrgsChannel:
        Consortium: SampleConsortium
        <<: *ChannelDefaults
        Capabilities:
            <<: *ChannelCapabilities
        Orderer:
            <<: *OrdererDefaults
            OrdererType: etcdraft
            EtcdRaft:
                Consenters:
                - Host: orderer.example.com
                  Port: 7050
                  ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
                  ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
                - Host: orderer2.example.com
                  Port: 8050
                  ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
                  ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
                - Host: orderer3.example.com
                  Port: 9050
                  ClientTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
                  ServerTLSCert: crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
            Addresses:
                - orderer.example.com:7050
                - orderer2.example.com:8050
                - orderer3.example.com:9050
            Organizations:
                - *OrdererOrg
            Capabilities:
                <<: *OrdererCapabilities
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org1
                - *Org2
            Capabilities:
                <<: *ApplicationCapabilities
    
  3. 我正在使用默认的byfn.sh脚本来启动网络。

但是但是当我尝试使用cli环境从orderer4容器中获取应用程序通道配置块时,我能够成功完成并将其解码为JSON文件的过程,我可以看到所有4个订购者都是一部分应用程序通道的[[consenters部分中的每个地址,以及每个订购者的地址都位于orderer address部分中。

所以,为什么只给前三个订购者作为同意者,申请渠道却不是仅从前三个订购者开始?
hyperledger-fabric raft
1个回答
0
投票
通道创建命令中必须包含-channelCreateTxBaseProfile参数,并且该参数的值将是订购者的创始简档名称(此处为SampleMultiNodeEtcdRaft)。

此外,尝试执行peer channel create命令的标识必须满足以下ACL:/Channel/Orderer/ConsensusType(默认情况下设置为以下策略:/Channel/Application/Admins)。

© www.soinside.com 2019 - 2024. All rights reserved.