Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hyperledger Fabric: Private Data and World State

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?

like image 762
steady_progress Avatar asked Sep 26 '18 17:09

steady_progress


People also ask

What is world State in Hyperledger Fabric?

In Hyperledger Fabric, a ledger consists of two distinct, though related, parts – a world state and a blockchain. Each of these represents a set of facts about a set of business objects. Firstly, there's a world state – a database that holds current values of a set of ledger states.

What is private data in Hyperledger Fabric?

Private Data: Within a channel there are scenarios that only a subgroup of organizations keep the data while those outside that subgroup do not. It is always due to requirement of data privacy between organizations. Hyperledger Fabric introduces Private Data to address this need.

How does Hyperledger Fabric store data?

The actual private data, sent peer-to-peer via gossip protocol to only the organization(s) authorized to see it. This data is stored in a private state database on the peers of authorized organizations, which can be accessed from chaincode on these authorized peers.

Is Hyperledger Fabric public or private?

Because Hyperledger Fabric is private and requires permission to access, businesses can segregate information (like prices), plus transactions can be sped up because the number of nodes on the network is reduced.


1 Answers

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

like image 190
Andrei Dragotoniu Avatar answered Sep 20 '22 20:09

Andrei Dragotoniu