Hyperledger私有数据动态访问 [英] Hyperledger private data dynamic access

查看:81
本文介绍了Hyperledger私有数据动态访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Hyperledger fabric 1.4中动态设置对私有数据的访问?与必须添加可以访问特定集合"的组织的集合文件不同,是否可以通过链码来添加访问权限?

Is it possible to dynamically set access to private data in Hyperledger fabric 1.4? Unlike the collections file where we have to add the organizations that can have access to a particular "collection", is it possible to add access through chaincode?

推荐答案

本人必须对此做一些研究,但是由于Fabric v1.4,可以将对等体动态添加到私有数据集合中. 私人数据协调确保将在对等体加入之前创建的该集合中的所有私有数据状态都传递给新对等体.

Had to do some research on this myself, but since Fabric v1.4 it is possible to dynamically add peers to private data collections. Private data reconciliation ensures that all private data state in that collection, which was created prior to the peer joining, will be delivered to the new peer.

更多详细信息:使用收集文件,您可以指定初始背书策略.可以稍后通过 a SDK来更新此认可政策函数(称为 SetPrivateDataValidationParameter ).更新之后,将根据新的认可政策提供新的私有数据键值对.

In more detail: With the collections file you specify an initial endorsement policy. This endorsement policy can be updated later through a SDK function called SetPrivateDataValidationParameter. After this update takes place, new private data key-value-pairs will be delivered according to the new endorsement policy.

此外,如果要更新集合定义文件本身,则可以在升级链码时指定一个新的集合定义文件.集合定义文件指定允许哪些同级查看数据,因此,要更改此名称,您需要升级链码.

Additionally, if you want to update the collections definition file itself, you can specify a new one when upgrading the chaincode. The collections definition file specifies, which peers are allowed to see the data, so in order to change that, you need to upgrade your chaincode.

这篇关于Hyperledger私有数据动态访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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