ejgza
ejgza

Reputation: 95

What exactly is the point of private-data collection?

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.

Upvotes: 5

Views: 433

Answers (3)

adnan.c
adnan.c

Reputation: 721

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).

Upvotes: 0

Risabh Sharma
Risabh Sharma

Reputation: 654

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.)

Upvotes: 3

Varun Agarwal
Varun Agarwal

Reputation: 1587

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.

Upvotes: 4

Related Questions