5

If we know that some organizations might want to keep certain information private from others, why not just create a separate channel? Is private-data purely just for management and to reduce channel overhead?

I've read the documentation on when to use a collection within a channel vs. a separate channel:

Use channels when entire transactions (and ledgers) must be kept confidential within a set of organizations that are members of the channel.

Use collections when transactions (and ledgers) must be shared among a set of organizations, but when only a subset of those organizations should have access to some (or all) of the data within a transaction. Additionally, since private data is disseminated peer-to-peer rather than via blocks, use private data collections when transaction data must be kept confidential from ordering service nodes.

ejgza
  • 83
  • 7

3 Answers3

4

Take a practical example for this. There is an auction house and 3-4 vendors who regularly bid. The bidding type is a closed auction. The auction house is one node and will announce the item to be bid upon. This item must be visible by all the vendors. Each vendor will then submit their bid for the item over the blockchain. As each bid is private, the vendors may view only their bid, while the auction house has full visibility.

Without private data 1) Channel PUBLIC -> Auction house creates a bid, all vendors can view it 2) Channel VENDOR_1, VENDOR_2, VENDOR_3 - Only one vendor and auction house are on this channel. The vendor submits his bid over here

What happens is the auction house now has to check bids across multiple channels, choose the winner and then update all channels appropriately. At a larger scale and more complex systems the overhead associated is massive. You may require separate modules/ API calls that just ensure state of certain objects (bids) are the same across channels.

Instead private data will allow a single channel to be used. A vendor may submit a bid that is viewable by everyone, BUT mark the price of the bid as private, so only the auction house and the vendor can view it.

Varun Agarwal
  • 1,587
  • 14
  • 29
3

Yes,private-data is mostly used to reduce channel overhead. Adding a new Private data collection dynamically is more convenient and easy and have pretty much no overhead on the network.

Where As Having too many channels in the network can lead to a maintenance nightmare and can drastically affect the networks performance.

when to use Multiple channels

  • when its okay to have isolated transactions

  • Number of channels are manageable.

When to use Private data collection.

  • when its just required to hide the txn data(confidential data) and not isolate other users from viewing the interaction between the parties involved.(others can only see the hash of the data anyway but they would know there was a txn between the involved parties.)
Risabh Sharma
  • 634
  • 5
  • 15
  • How can we create the PDC participants dynamically, could you please refer to the API documentaion? – Anil8753 Oct 09 '21 at 11:16
0

Would like to highlight one important distinction (its also in your documentation quote): Private collections hide the transaction data from the orderers too i.e. these transactions are never submitted for ordering. When using the multiple channels approach, your transaction is shared with the orderer(s).

adnan.c
  • 721
  • 5
  • 15
  • 1
    PDC hides the transaction data from the orderer and not the entire transaction.In this way the hashed transaction data is shared between other peers who are not authorised to view it in the network.so they would know some txn has happened between the other parties but wont know the data. – Risabh Sharma Jun 26 '19 at 18:21