I am doing an electronic health record Hyperledger fabric network. Suppose my network has two hospitals and these hospitals need to share information like patient info etc with each other and register on the ledger. I have created three channel channel1 having peers of hospital1 and channel2 having peers of hospital2 and another channel that having peers of both organization. So that information like employees details etc won't be save on another organisations peers. Is my setup correct or do I need to make changes? and how can I share patient records to hospital2.
Under the technical aspect, you are right. Only the channel 3 will provide a common "data sharing".
Under the architecture aspect, what would be the purpose of the channels 1 and 2? The data will be written and read by only 1 organisation (1 hospital). So a more "classical" database would do the job.
If you want to share patient data between both hospitals, you will need to install a chaincode on all the peers of channel 3, then instantiate it. In this chaincode, you should have an invoke function, which put new patient key/value in the ledger.
Related
I am using Hyperledger Fabric 2.3. I have added 50+ Orgs in a channel. An Org1 wants to choose Org(i) dynamically to perform a transaction, but transaction details should be visible to only Org1 and Org(i) only.
What are the possible ways to achieve it?
The solution to this kind of scenario is already available in fabric. You can use Private Data Collection(PDC) to keep the transaction data private between the two or more Orgs.
When you have PDC in place the data is shared only among the required Orgs and other Orgs that are not part of that transaction will just hold the transaction hash.
you can refer to this for more details on PDC's
What happens if the ledger is taken out and attached to a new fabric network? especially in the below case
1 Fabric is used for storing confidential data among 3 parties.(via chaincode abac, chaincode multi ownership among 3 parties so there are three ledgers synced)
2 One party(party A) takes out the ledger and setup a new hlf behind and attaches the ledger to the new hlf and changes the chaincode in order to see all the data.......
In this scenario what can be implemented to prevent the party A from seeing the data.....isn't it true that the ledger is taken out so the ledger is just a chuck of file(impossible to function as long as it is not in the original HLF setup(the orginal hlf network.......even ip change blow up all the ledger and setting......).....
Look forward to your replies
For any given peer or orderer that is part of a Fabric "network", some person or entity will inevitably have physical access to the platform on which it is hosted. They will be able to physically read the ledger file(s) as well as the state database(s). So if they are not supposed to have access to the data, then you either need to encrypt the payloads at the application layer or you can use private data collections.
I have isolated two organizations into two different channels. Organizations one and two are part of channel1, and organizations three and four are part of channel two. I would like to ask if it is possible that one peer on channel2 access queries the ledger of channel1 and vice-versa. If it is possible how can I do it?
I very much appreciate your help.
It is not possible in your current setup because the peers who have joined the channel can only access that channel. Peers that are not part of the channel can not access the ledger data.
What you can do is, bring the peers on the common channel and can use PDC (Private Data Collection) to make the transaction private to the organization/Organizations.
Hyperledger Fabric is a private and permissioned blockchain.
A channel is a private blockchain overlay which allows for data isolation and confidentiality. A channel-specific ledger is shared across the peers in the channel, and transacting parties must be authenticated to a channel in order to interact with it. Channels are defined by a Configuration-Block.
At channel creation time, all organizations added to the channel must be part of a consortium. However, an organization that is not defined in a consortium may be added to an existing channel like by adding an new organization into that channel with fulfilling endorsement policy.
So to be a part of a channel, your organizational peer must need access according to the consortium. A peer can be a part of multiple channel and the ledger/database of every peer within a channel is identical/same, to invoke/query the ledger we need smart contact which is also identical among every peer of that channel. So if my peer server is a part of two channel, I need two ledgers/databases. To access the data of a ledger for invoke/query, you need corresponding smart contract.
According to your current setup, it's not possible and this is the nature of private-permissioned blockchain and to make it possible, you have to change the consortium with appropriate endorcement.
Only way to make peer on channel2 to access ledger of channel1 is to join the peer into channel1. Otherwise it is not possible to access the data.
In Fabric network,
there can be more than one channels. Who maintains the ledger in the private channel?
What is the link between records in the private channel and the public enteries? Is it the unique ID of the record?
You can have more than one channels in the fabric network. A channel can be joined by multiple organizations and it provides a way for private communication among them (for example, these organizations would like to transact with each others and keep the data private to the network). When you create a channel, you implicitly create a ledger that is scoped to that channel only. This ledger will then record all the transactions in this channel. Every peer within the organization in a channel maintains a copy of the ledger. Whenever there is a transaction, this will be recorded to the ledger of EACH of the peer in that channel.
Not sure what do you mean by public entries but that basically how it works. Hope it helps!
You can refer to the following links for more information.
https://hyperledger-fabric.readthedocs.io/en/release-1.2/ledger/ledger.html
https://hyperledger-fabric.readthedocs.io/en/release-1.2/glossary.html#channel
I have two organizations which have a peer each, where Org1 takes some data and sends only selected data in it to Org2 for further processing, where they have only 1 channel.
there are no other organizations in the channel and only 1 channel is established between these two Org's.
How can they have their ledger being updated? and,How can i achieve this in Hyperledger Fabric?
basically, the concept of organizations is about to map the real-life (organizations - companies - business corporations) which can have multiple peers/machines which is participating in Blockchain network,
and such thing doesn't mean they didn't share the same ledger....
in matter fact all the organizations with all peers behind this organizations sharing the same ledger and once you submit any transaction from any of this peers and the transaction is committed and done successfully, the rest of organizations with all peers will sync with the new transaction and get copy of whatever happened in the ledger...
but keep in mind this should be happen in the channel scope,
channels is about to separate ledgers, each channel have it's own specific transactions / data separated form other channels
so if you have 2 channels let's say (Ch1 , Ch2) and each channel have 2 organizations (Org1, Org2) and each organization have 1 or more than 1 peer: all peers inside all organizations in channel (Ch1) will have it's own transactions and data and will not sync or share it with channel (Ch2)
summary:
organizations share the same ledger and get copy from any transaction and have it's own copy of data
channels didn't share ledgers and each channel have it's own separate data which is not shared with another channel
hope this point is very clear now for you....