如果同龄人使用相同的链码,那么背书背书政策是否有可能会有所不同? [英] If peers use the same chain code, is there any chance that Endorsement of Endorsement Policy will be different?

查看:70
本文介绍了如果同龄人使用相同的链码,那么背书背书政策是否有可能会有所不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会问你下面的认可政策"示例

I will ask you thought Endorsement Policy example below

peer chaincode instantiate -C <channelid> -n mycc -P "AND('Org1.member', 'Org2.member')"

我的理解(承诺)

  • Org1.member或Org2.member指的是Peer.
  • 该示例意味着Org1.member和Org2.member必须具有与实例化mycc相同的结果.

问题

  1. 如果Org1.member和Org2.member具有相同的链码,则它们可以 结果会有所不同吗?
  2. Org1.member和Org2.member是否引用组织的一个对等方? (2-1.如果是,是否在组织上随机设置对等方?)
  3. 我可以使用诸如"AND('Org1.member> 10','Org2.member> 10')"之类的正则表达式吗
  1. If Org1.member and Org2.member have same chaincode, could their result be different?
  2. Are Org1.member and Org2.member refer to one peer of Organization? (2-1. If so, does the peer be set on organization randomly?)
  3. Can I use regular expressions like "AND('Org1.member > 10', 'Org2.member > 10')"

推荐答案

我希望您已经参考了背书中的结构文档.如果不是,请在这里 endorsement-policies

I hope you have referred to the fabric documentation on endorsement already. If not, then please find it here endorsement-policies

以负责验证签名人身份和签名人在该MSP中所扮演角色的MSP的方式描述了主体.当前,支持两个角色:成员和管理员.主体被描述为MSP.ROLE,其中MSP是所需的MSP ID,ROLE是两个字符串成员和admin之一.有效主体的示例是"Org0.admin"(Org0 MSP的任何管理员)或"Org1.member"(Org1 MSP的任何成员).

A principal is described in terms of the MSP that is tasked to validate the identity of the signer and of the role that the signer has within that MSP. Currently, two roles are supported: member and admin. Principals are described as MSP.ROLE, where MSP is the MSP ID that is required, and ROLE is either one of the two strings member and admin. Examples of valid principals are 'Org0.admin' (any administrator of the Org0 MSP) or 'Org1.member' (any member of the Org1 MSP).

AND(Org1.member,Org2.member)表示为了成功认可,发送到订购者(从客户端SDK)的交易建议响应应由org1对等成员证书和成员证书签名的org2对等体

AND (Org1.member, Org2.member) means that for successful endorsement, the transaction proposal response which is sent to Orderer ( from the client SDK) is expected to be signed by the member certificate of Peer of org1 and member certificate of the Peer of org2

  1. 如果您的链码是不确定的,则可能会有不同的结果(即说其获取当前时间等和putState()).因此写集可以不同.

  1. It is possible to have different result if your chaincode is Non-Deterministic ( ie, say its getting current time etc and putState() ). So write sets can be different.

Org1.member& Org2.member是两个不同的对等体.属于Org1的一个对等方和属于Org2的另一个对等方. [您不能让Peer随机地属于两个组织]

Org1.member & Org2.member are two different Peers. One peer belonging to Org1 and another peer belonging to Org2. [ You cannot have the Peer belonging to two organizations randomly ]

我不确定.请检查上面的Fabric文档链接.

I am not sure. Please check the link of Fabric Documentation above.

这篇关于如果同龄人使用相同的链码,那么背书背书政策是否有可能会有所不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆