I am wondering if in a private Hyperledger Fabric network with N organizations in one channel can have different private smart contracts? Specifically, I would like to build a network with N orgs and M peers in each org, where each org will have it's own private data collection while at the same time all M peers of N orgs will be part of the endorsement policy. For example if org1 needs to update it's private part of the ledger all the network peers will be part of the endorsement without knowing the data that will be committed by the org1. Is this feasible?
1 Answers
If all organizations need to endorse a transaction, that means the private data would be sent to all of the organizations peers. This would leak the private data beyond the one intended organization specified in the private data collection. Only the organization that is specified in the private data collection would be authorized to persist the private data on their peers. So while this is possible, it is likely not something you would want due to the private data leakage to all organizations at endorsement time.
Typically the endorsement policy for a private data collection is defined to be a subset of its members. For example if there are three organizations sharing data in a private data collection, the endorsement policy would likely require two or three of those organizations to endorse the transaction.
Note that in Fabric v2.x implicit collections are created for each organization for their own use. These implicit collections have an endorsement policy of the organization itself, making each organization in control of their own private data.