[Fabric]: Adding support for Private Data Collection
Is your feature request related to a problem? Please describe. We could add a feature to enable private data collection feature of Hyperledger fabric into our network formed through BAF
Describe the solution you'd like At chaincode section of our network.yaml file for fabric network, we should be able to mention the collection config file that includes the private data collection configuration needed for a chaincode on a given channel We can store the collections-config file within our same repo for chaincode deployment, this way we won't need additional configuration for config file and a simple addition of collection config file would let enabling private data
eg:
chaincode:
name: "chaincode_name"#This has to be replaced with the name of the chaincode
version: "chaincode_version"#This has to be replaced with the version of the chaincode
maindirectory: "chaincode_main"#The main directory where chaincode is needed to be placed
lang: "golang"# The language in which the chaincode is written ( golang/java/node )
repository:
username: "git_username"# Git Service user who has rights to check-in in all branches
password: "git_access_token"
url: "github.com/<username>/blockchain-automation-framework.git"
branch: develop
path: "chaincode_src"
**collections_config: "product/collections/collections_config.json"**
Private Data collection config file is passed for chaincode deployment at the stage of Approve and Commit of the new chaincode lifecycle
To enable private data collection on a particular chaincode we need to edit below two files which includes the job to approve and commit chaincode
File1: approve_chaincode.yaml
platforms/hyperledger-fabric/charts/approve_chaincode/templates/approve_chaincode.yaml
This file includes the "peer lifecycle chaincode approveformyorg" command as a part of lifecycle step to approve chaincode for an org
So if collections_config parameter is mentioned in network.yaml file as a part of this job, we'll need to add additional code to pull the mentioned file from git repo and then we can append "--collections-config" flag along with value as the relative path of pulled collection config inside the chaincode folder
Eg: "--collections-config ../chaincode-collection/collections_config.json"
File2: commit_chaincode.yaml
platforms/hyperledger-fabric/charts/commit_chaincode/templates/commit_chaincode.yaml
Similar to approve_chaincode.yaml if collections_config parameter is mentioned in network.yaml file, we'll need to again pull the mentioned file from git repo and we can append "--collections-config" flag along with value as the relative path of collection config inside the chaincode folder
Describe alternatives you've considered Manual chanincode deployment in case private data collection has to be enabled
Additional context We'll also need to decide if we want to keep collections_config as a fixed entry in network.yaml file or we can keep it optional and add additional checks to handle it
Hi @bafsunsu, any update on this issue?
closing this stale issue. also the chaincode related ops is not part of core bevel development.