In an earlier post, I cited an example of the threats that the present digital technology can pose to our centralized medical data if there exists a fatal combination of digital incompetence and misplaced trust. Or it could even be caused by deliberate, agenda-driven misconduct. Putting the data on a public blockchain that supports smart contracts, like Ethereum or Solana, is a way to decentralize the storage of the personal data. The cryptographic nature of the blockchain would then provide the much-needed privacy and security.
In the public blockchains however, all data is public by default and you have to deal with gas fees, code complexity, and network congestion. Furthermore, the specialist nature of the blockchain and its missing safety net can cause resistance among a typical development team at a medical or government institute.
Introduction to Fabric
Here, Hyperledger Fabric (or just called Fabric) emerges as a very interesting alternative blockchain variant. Being open source and hosted by the Linux Foundation, it is designed for building distributed ledger solutions for business contexts where participants are known and trusted (like corporations, governments, or consortiums), rather than being public and anonymous. Fabric focuses purely on business logic, has no native cryptocurrency and no gas fees. So it is not the trustless, permissionless environment of the public blockchain, but I suppose well suited for the medical-data use case. It surely aligns with the collaborative yet regulated nature of healthcare.
Fabric allows you to use only part of the ledger, by creating channels. Channels allow you to create private sub-networks. For instance, consider a channel that comprises only Diagnostic Lab A, Hospital A, Hospital B and Insurer A. This implies that only Hospital A, Hospital B and Insurer A have access to a patient’s lab results. You as owner of your health data should be informed about any changes in the world state (which is the total transaction hash in a block) of the Fabric blockchain concerning your data. Within a channel, you can fine-grain the sharing of data even more between specific organizations only.
In Fabric, you can deploy Smart Contracts (packaged in Chaincode for deployment) for enforcing business rules and regulatory logic directly into the chaincode on the ledger. Every accessor update event is recorded immutably on the ledger, which provides a complete provenance trail for the data, comprising audits, patient access logs, and breach investigations. So any modification or removal of ‘unsuited’ data, and whomever performed it, can immediately be picked up as a changing world-state event.
Data storage
When you would make use of a public ledger, you would need an external centralized storage of your lab data (e.g. in the standardized healthcare format HL7 v2.5), because the blockchain has not been built for storing large (meta)data. In a public ledger, like Solana, storage efficiency is not a priority and you have to deal with rental fees, transaction fees, and network fees. In essence, HL7 flat-text files are not that large, on average 5-20 KB for lab results, but may become larger when embedded Base64-encoded data occurs. But still, you should store only a cryptographic hash of the file as a reference on the ledger and the physical data itself off-chain.
In Fabric, the data files should also be stored off-chain, because large transactions slow down the endorsement, ordering, and commitment processes on the network. Also, every peer stores the full ledger history, causing multiplied storage costs. Fabric however, deals with data in a different manner. While Solana stores binary data in accounts, Fabric can process and store data in any format in the state database CouchDB, a key-value database that supports JSON queries, synchronized on all peers. This makes it easy to query external databases. For example, from an app you can run high-performance complex queries from a peer’s local CouchDB database (so, NOT on the blockchain) with joins (via views) to external data.
Security and identity permissions
Fabric’s Public Key Infrastructure (PKI) ensures that the different actors in the Fabric blockchain network, including peers, orderers, client applications, and administrators, use SSL/TLS-encrypted communication. Each of them authenticates itself as a verifiable identity with an X.509 digital certificate. Fabric comes with a set of solutions for managing the digital identities in the blockchain network. It can create its own root CA certificates, from which intermediate certificates can be signed. Of course, these can only be issued within the network. Apart from using this, the flexibility is there to use your own Certificate Authority (CA).
In addition to the PKI, Fabric’s Membership Service Provider (MSP) is the mechanism that regulates which of the identities can be trusted and recognized by the rest of the network. In short: who is allowed to do what at the organization, node, and channel level, recorded in a set of roles and permissions.
The future of Hyperledger Fabric
Hyperledger Fabric is ready and mature and its technology has the future, but are these kind of private distributed systems being adopted at the moment? Not enough, as I have read in several critical blogs. In fact, it is not the technology, but they miss the same level of hype that is present in the public blockchains ecosystem. Therefore, it remains problematic to gather a group of trusted participants to take the risk of investing in a private distributed system. Also, a lot of companies and institutions still lack the essential competencies with the blockchain technology in general. As you see, brilliant technical initiatives to help preventing the serious privacy issues in healthcare are there, but when will they be taken up and by whom? Are private blockchains still ahead of their time? … Probably.
For details on the architecture, workings, and local (Docker) installation of Hyperledger Fabric, I like to refer to their excellent documentation under the above-mentioned link.
Most important: enjoy your experiments with Fabric!
Leave a comment