【发布时间】:2021-04-05 17:56:04
【问题描述】:
我正在检查一个用例是否可以共享对等点、调用链代码函数并与不同的 MSP 执行事务。这是一个用例,其中一些不愿意在基础设施上花钱但可能希望使用网络运营商运行的区块链网络的组织需要共享环境。
例如,拥有 MSP org1 的网络运营商创建了一个 Hyperledger Fabric 网络。 org4 想加入网络但没有任何对等方。 CA 容器将用于此org4。 org4 身份是否可以在 org1 对等方上调用事务?
我实际上试过这个。查看下面其余客户端的日志:
[Service Discovery Turned On]
2021-04-02T04:19:27.643Z - debug: [Channel]: _getServiceEndpoints - start - org4
2021-04-02T04:19:27.643Z - debug: [Channel]: _getServiceEndpoints - Endorser mspid not matched, not added peer0.org1.com:7051 - org1
2021-04-02T04:19:27.643Z - debug: [Channel]: _getServiceEndpoints - Endorser mspid not matched, not added peer1.org1.com:7051 - org1
2021-04-02T04:19:27.643Z - debug: [Channel]: _getServiceEndpoints - Endorser mspid not matched, not added peer1.networkoperator.com:7051 - networkoperator
2021-04-02T04:19:27.643Z - debug: [Channel]: _getServiceEndpoints - Endorser mspid not matched, not added peer0.networkoperator.com:7051 - networkoperator
2021-04-02T04:19:27.643Z - debug: [Channel]: _getServiceEndpoints - Endorser mspid not matched, not added peer0.org2.com:7051 - org2
2021-04-02T04:19:27.643Z - debug: [Channel]: _getServiceEndpoints - Endorser mspid not matched, not added peer1.org2.com:7051 - org2
2021-04-02T04:19:27.643Z - debug: [Channel]: _getServiceEndpoints - Endorser mspid not matched, not added peer0.org3.com:7051 - org3
2021-04-02T04:19:27.643Z - debug: [Channel]: _getServiceEndpoints - Endorser mspid not matched, not added peer1.org3.com:7051 - org3
2021-04-02T04:19:27.643Z - debug: [RoundRobinQueryHandler]: constructor: peers=[]
以上日志显示 rest-client 尝试将 MSP id 与 peers 匹配
没有服务发现的日志:
[Service Discovery Turned Off]
2021-04-02T04:39:11.091Z - debug: [Channel]: _getServiceEndpoints - start - org4
2021-04-02T04:39:11.091Z - debug: [Channel]: _getServiceEndpoints - Endorser mspid not matched, not added peer0.org1.com - org1
2021-04-02T04:39:11.091Z - debug: [Channel]: _getServiceEndpoints - Endorser mspid not matched, not added peer1.org1.com - org1
2021-04-02T04:39:11.091Z - debug: [RoundRobinQueryHandler]: constructor: peers=[]
一般来说,这些组织会加入共享基础架构,当他们准备好使用自己的基础架构时,就会迁移到该基础架构。同时,他们将通过自己的身份调用链码函数
【问题讨论】:
-
没有对等点的组织肯定可以调用事务,只要它们已被添加到适当的通道。您是否将
org4添加到所有相关频道? -
是的,@GariSingh。我已将该组织添加到频道中。我正在使用 HLF 2.3.1
-
您能发布更多您的客户端代码吗?不确定您正在调用哪些函数
-
@GariSingh 我检查了对等日志
2021-04-04 15:24:10.447 UTC [policies] SignatureSetToValidIdentities -> WARN 65875 invalid identity: certificate subject=CN=admin,OU=client serialnumber=529341260981649280325273063095564239165763549342 error="the supplied identity is not valid: x509: certificate signed by unknown authority" -
org4 身份正在向 org1 的对等方发送交易,而这些对等方正在抛出上述警告
标签: hyperledger-fabric hyperledger hyperledger-chaincode hyperledger-fabric-ca