【问题标题】:Getting "ENDORSEMENT_POLICY_FAILURE" as Validation Code in Hyperledger Explorer for every transaction / block在 Hyperledger Explorer 中为每个事务/块获取“ENDORSEMENT_POLICY_FAILURE”作为验证码
【发布时间】:2021-10-04 09:16:15
【问题描述】:

我的网络中有两个组织。我创建了一个通道,在两个 Orgs(Org1 和 Org2)上部署了链代码,并收到了 VALID 代码。

两个组织都批准了链码,检查了提交的准备情况并提交了链码。日志就像...

2021-10-04 14:30:52.864 IST [chaincodeCmd] ClientWait -> INFO 001 txid [eff4729bb0fcb0ac21b6b4c4ee78de75d9fc3bc04b67fdd1cc22c9b67044d93a] committed with status (VALID) at localhost:9051

2021-10-04 14:30:52.911 IST [chaincodeCmd] ClientWait -> INFO 002 txid [eff4729bb0fcb0ac21b6b4c4ee78de75d9fc3bc04b67fdd1cc22c9b67044d93a] committed with status (VALID) at localhost:7051

=============== Commit chaincode definition Org 1 ============================== Committed chaincode definition for chaincode 'sample' on channel 'samplechannel': Version: 1, Sequence: 1, Endorsement Plugin: escc, Validation Plugin: vscc, Approvals: [Org1MSP: true, Org2MSP: true]

=============== query commited from Org 1====================`` Committed chaincode definition for chaincode 'sample' on channel 'samplechannel': Version: 1, Sequence: 1, Endorsement Plugin: escc, Validation Plugin: vscc, Approvals: [Org1MSP: true, Org2MSP: true]

我已经发布并添加了类似的问题 BlockValidation: Type: ImplicitMeta Rule: "ANY Writers" 我的configtx.yaml

事务执行没有任何错误。能够查看交易哈希。 但是在资源管理器中获取ENDORSEMENT_POLICY_FAILURE

我在下面添加了截图。

任何人都可以帮助这里有什么问题/需要更改吗?

提前致谢。 图片供参考 -

ENDORSEMENT_POLICY_FAILURE Chaincode deployment

【问题讨论】:

    标签: hyperledger-fabric hyperledger-chaincode hyperledger-fabric-ca hyperledger-explorer


    【解决方案1】:

    默认背书策略是 MAJORITY。这意味着您的交易将得到大多数渠道成员的验证。

    要更改背书策略,您可以在configtx.yamlANY Endorsement 中指定Channel/Application/Endorsement。 Fabric 将使用此配置作为所有链码中的默认背书策略。

    或者您可以通过在批准和提交链代码时定义每个链代码来指定策略。例如:

    peer lifecycle chaincode approveformyorg --channelID mychannel --signature-policy "OR('Org1.member', 'Org2.member')" --name mycc --version 1.0 --package-id mycc_1:3a8c52d70c36313cfebbaf09d8616e7a6318ababa01c7cbe40603c373bcfe173 --sequence 1 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem --waitForEvent
    
    peer lifecycle chaincode commit -o orderer.example.com:7050 --channelID mychannel --signature-policy "OR('Org1.member', 'Org2.member')" --name mycc --version 1.0 --sequence 1 --init-required --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem --waitForEvent --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:9051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
    

    Hyperledger Fabric documentation中查看更多信息

    【讨论】:

    • 我也遵循了同样的方法,但在超级账本浏览器中仍然遇到同样的问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-13
    • 1970-01-01
    • 2018-08-31
    • 1970-01-01
    相关资源
    最近更新 更多