6

Assume I have a Hyperledger-Fabric Application, where different members can comment on each other's profile pictures.

Assume further there are three members ("organisations"): Adam, Bob and Sara.

Furthermore, between Adam and Bob Fabric's new "Private Data" feature is used. The feature is also used between Adam and Sarah.

Assume there is a transaction named "addCommentToProfile", which can be used to add comments to other profiles.

Assume Sarah sends transaction "addCommentToProfile", adding the comment "your hair looks very good!" to Adam's profile.

Is the result of the transaction (a new comment "your hair looks very good!" on Adam's profile) invisible to Bob?

My understanding is that the comment is not visible to Bob. Because as far as I am concerned, using Private Data entails having a separate world state. Hence, Adam would have one profile vis-a-vis Sarah and another profile vis-a-vis Bob.

Is my understanding correct?

steady_progress
  • 3,311
  • 10
  • 31
  • 62

5 Answers5

1

that is my understanding as well, after looking at the whole private date concept.

in the Adam and Bob relationship, what you have is a private transaction between them. The data itself is in a private, separate database to which Sarah has no access.

In the documentation, they are referred to as private data collections between specific organisations and they are not stored in the ledger database. Furthermore each peer of the two orgs involved will have their own copy of this side data which means the APIs that talk to these peers will have access to that data. Sarah won't have the data as it won't be sent to that org's peers.

So the scenario you presented seems accurate.

However, you mention organisations but what you really have are users. You're not going to have one org per user. You will have users belonging to orgs so that data will be visible to anyone from both orgs as they all have access to the peers of that org.

That's my understanding of it, at this point in time

Andrei Dragotoniu
  • 6,155
  • 3
  • 18
  • 32
1

The private data feature works by the members of a private data collection (organizations) sharing the private data relative to transactions between temselves via the gossip protocol. Only the hash of the private data shared amongst the members of a collection is written to the ledger.

As far as your question is concerned, the answer is yes, you understand correctly - at least based on what you have written.

You can read more about this feature in the documentation.

christo4ferris
  • 4,039
  • 1
  • 17
  • 30
1

It's simple.

In the fabric application (v1.2), there are three organization Adam(org1), Bob(org2) and Sara(org3). and you are defining a subset of organization on the channel between adam(org1) and sara(org3).You are creating a private data collections channel comprising of only Adam(org1) and sarah(org3). Note that you are not creating a seperate channel.

So, the data is only visible between only these parties not to Adam(org2).The Adam (org2) will only get the hash. The hash serves as evidence of the transaction and is used for state validation and can be used for audit purposes.But your data remain private(encrypted). Yes,you are right.

Shubham Jaiswal
  • 570
  • 5
  • 11
0

Yes,your understanding is correct.

Using "private data" feature in Fabric, you can hide your data from organizations that are on a channel with your organization but you don't want them to see your data. Only hash of the data is sent in the channel. Sending hash prevents non-authorized organizations and ordering service from seeing your data.

mahdi
  • 598
  • 5
  • 22
0

In your terms, Bob will see that Sarah has commented Adam's profile (the hash), but he won't see what the comment is, while Adam and Sarah will see the content of the comment.

Ivan
  • 340
  • 3
  • 14