简体   繁体   English

更新 Hyperledger Fabric 中的私有数据收集策略

[英]Update private data collection policy in Hyperledger Fabric

From docs:从文档:

To configure the chaincode collections on the channel, specify the flag --collections-config along with the name of the collections JSON file,要在通道上配置链码集合,请指定标志 --collections-config 以及集合 JSON 文件的名称,

Is it possible to update private data collection policy after instantiation of the channel?通道实例化后是否可以更新私有数据收集策略? In my case I want to add a member or remove a member from policy for a particular private data collection.在我的情况下,我想添加一个成员或从特定私有数据集合的策略中删除一个成员。

Or if there is another approach, I would like hear it too.或者如果有另一种方法,我也想听听。

Yes you can do that, there is a peer chain code upgrade command that can be used after instantiation.是的,您可以这样做,实例化后可以使用对等链代码升级命令。

Refer: peer chaincode upgrade参考: 对等链码升级

where you can specify --collections-config flag with your new collections-config file by either adding or removing member from a policy.您可以在其中通过在策略中添加或删除成员来使用新的 collections-config 文件指定 --collections-config 标志。

Your second question on another approach, If you want to add/remove members you can consider creating a new channel but that depends on your usecase.关于另一种方法的第二个问题,如果您想添加/删除成员,您可以考虑创建一个新频道,但这取决于您的用例。 For this you can refer to为此,您可以参考

When to use a collection within a channel vs. a separate channel 何时使用频道内的集合与单独的频道

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM