AkshayM
AkshayM

Reputation: 1441

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,

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.

Upvotes: 2

Views: 507

Answers (1)

Harshit
Harshit

Reputation: 905

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.

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

Upvotes: 1

Related Questions