hyperledger-fabric - 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 个“管理员”子策略
我无法确定政策的确切问题,任何人都可以就该问题以及如何解决它提出建议。
解决方案
尝试使用 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
推荐阅读
- amazon-web-services - AWS 网络负载均衡器和使用 AWS Fargate 的 TCP 流量
- ios - 这些结构标识符之间有什么不同
- node.js - 带有等待和承诺的 useMutation 问题
- io - Julia:使用 ProtoBuf 从压缩文件中读取消息
- express - 通过 HTTPS 解锁帐户时 web3 HTTP 访问被禁止错误
- javascript - TypeScript 编译器是否具有与 babel preset-env 相同的浏览器支持
- c# - “projectname.styles.css”指的是哪个文件?
- ruby - 我无法使用 Watir 获取 div 的子元素
- python - 为什么我的 PyInstaller 生成的 .exe 无法启动?
- python-3.x - 在odoo数据模板中调用qweb模板