我们可以在执行期间(HyperLeDger Fabric)中找到智能合约中的认可详细信息吗?
我们可以在执行期间(HyperLeDger Fabric)中找到智能合约中的认可详细信息吗?
Can we find the endorser details in smart contract during execution(Hyperledger Fabric) ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看下面的链接,使用此库您访问MSPID,链式CA证书详细信息在链代码
https://github.com/hyperledger/fabric-chaincode-go/blob/main/main/pkg/cid/cid/cid/readme.md.md
https://hyperledger-fabric.readthedocs.io/en/en/release-2.2.2/endorsement-policies 。
“> https://github.com/hyperledger/fabric-samples/blob/main/main/asset-transfer-secured-agreement/chaincode-go/asset_transfer.go
Check out the below link, by using this library you access MSPid, fabric-ca certificate details inside the chaincode
https://github.com/hyperledger/fabric-chaincode-go/blob/main/pkg/cid/README.md
https://hyperledger-fabric.readthedocs.io/en/release-2.2/endorsement-policies.html
https://github.com/hyperledger/fabric-samples/blob/main/asset-transfer-secured-agreement/chaincode-go/asset_transfer.go
如果您使用内部Docker构建机制,那么链代码唯一可用的东西是
core_peer_localmspid
我没有尝试过,但是如果您使用外部构建器,则可以在运行零件中自己添加更多信息,请参见
-and-launcher-api ,如果您使用链码作为服务在您在不同的组织中使用的图像中烘烤一些东西
If you use the internal docker build mechanism then the only thing available to chaincode is
CORE_PEER_LOCALMSPID
I've not tried but if you use an external builder you could add more information yourself during the run part see https://hyperledger-fabric.readthedocs.io/en/release-2.2/cc_launcher.html?highlight=builder#external-builder-and-launcher-api
and if you use chaincode as a service then it may be possible for you to bake something into the image you use in different orgs