首页 > 解决方案 > Hyperledger Fabric 为渠道定制订购者

问题描述

我有现有的超级账本结构设置,包含 2 个组织、5 个订购者和 1 个通道,我想创建一个新通道,并且只想将 3 个订购者(共 5 个)作为新通道的一部分,因为我已经提到了订购者的详细信息在频道配置文件部分如下:

NewChannel:
    Consortium: SampleConsortium
    <<: *ChannelDefaults
    Capabilities:
        <<: *ChannelCapabilities
    Orderer:
        <<: *OrdererDefaults
        OrdererType: etcdraft
        EtcdRaft:
            Consenters:
            - Host: orderer3.example.com
              Port: 13050
              ClientTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
              ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
            - Host: orderer4.example.com
              Port: 14050
              ClientTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer4.example.com/tls/server.crt
              ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer4.example.com/tls/server.crt
            - Host: orderer5.example.com
              Port: 15050
              ClientTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer5.example.com/tls/server.crt
              ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer5.example.com/tls/server.crt
        Addresses:
            - orderer3.example.com:13050
            - orderer4.example.com:14050
            - orderer5.example.com:15050
        Organizations:
            - *OrdererOrg
        Capabilities:
            <<: *OrdererCapabilities
    Application:
        <<: *ApplicationDefaults
        Organizations:
            - *Org1
            - *Org2
        Capabilities:
            <<: *ApplicationCapabilities

我通过使用-channelCreateTxBaseProfile参数创建了没有任何问题的通道事务文件,但是在创建通道时出现以下错误:

错误:出现意外状态:BAD_REQUEST - 验证新频道“channel11”的频道创建事务时出错,无法成功将更新应用到模板配置:授权更新时出错:验证 DeltaSet 时出错:[Value] /Channel/OrdererAddresses 的策略不满足:隐式策略评估失败 - 满足 0 个子策略,但此策略需要满足 1 个“管理员”子策略

我无法确定政策的确切问题,任何人都可以就该问题以及如何解决它提出建议。

标签: hyperledger-fabrichyperledger

解决方案


尝试使用 orderer admin msp 而不是 peer admin msp

当您更新频道配置时,请像这样设置环境:

export CORE_PEER_LOCALMSPID="OrdererMSP"
export CORE_PEER_TLS_ROOTCERT_FILE=${PROJECT_PATH}/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=${PROJECT_PATH}/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp
export CORE_PEER_ADDRESS=peer0.org1.example.com:7051

推荐阅读