Hyperledger Fabric, or simply Fabric, is a blockchain framework that is part of Hyperledger’s list of projects. Hyperledger is an open-source collaboration that includes The Linux Foundation and several leading players from the enterprise sector.
Projects under Hyperledger can be in one of several stages: Proposal, Incubation, Active, First Major Release, Deprecated. Fabric is the first project, from Hyperledger’s portfolio of projects, to exit Incubation and move into Active status.
According to Hyperledger documentation, ‘Fabric has been designed for enterprise use from the outset’. Here are some key features to consider as you explore Fabric.
While exploring Fabric, two words that you will come across often are ‘pluggable’ and ‘modularity’. Because enterprise use cases are diverse and unique, Fabric has tried to avoid a ‘one size fits all’ approach. Instead, it aims to be as versatile as possible by emphasizing a modular architecture.
Yet at the same time, we don’t want to force everyone to see everything the same way, so we need a set of solutions that are very modular, based on the same core technologies but with some variations.
Arnaud Le Hors, IBM. Source.
Fabric offers pluggable consensus, pluggable identity management, and pluggable key management protocols. For enterprises, this means great flexibility in choosing their options.
Take the case of consensus mechanisms for example. In Fabric, enterprises can choose between Byzantine Fault Tolerant (BFT) consensus mechanism or Crash Fault Tolerant (CFT) consensus mechanism. But if the enterprise is part of a consortium that involves known participants with a high degree of trust, then BFT is not really necessary.
BFT is primarily used to tackle the possibility of any malicious nodes in the network. Using BFT as a consensus mechanism can adversely impact throughput and performance as a result of the high number of encrypted messages that need to be passed among nodes. In the case of a trusted network, therefore, CFT would be a better choice, and Fabric makes it easy to plug this mechanism in.
Smart contracts in Fabric universe are known as ‘chaincode’. They contain business logic and execute depending on certain conditions. Smart contracts need to be deterministic. And to be able to do so, smart contracts have historically been programmed in Solidity, a non-standard language that eliminates the possibility of any non-determinism. But the need to learn a non-standard language can impede an enterprise’s rapid ability to adopt blockchain.
Fabric, however, has tackled the possibility of non-determinism through a new approach to transactions. As a result, smart contracts in Fabric can be written in a popular programming language such as Go or Node.js, and there could even be support for Java in future.
For enterprises, the significantly larger pool of talent, who can now also craft business logic on a blockchain using their existing programming knowledge can only boost consortium-wide adoption plans.
Fabric is a permissioned network. At a fundamental level, therefore, privacy is baked in, because it requires explicit authorization to participate in the network and authorization to participate in transactions; but Fabric offers more.
Fabric offers the following three mechanisms to address the sophisticated need for privacy and confidentiality among enterprises.
Channels are essentially sub-blockchain networks atop the main blockchain network and are used to conduct transactions that involve confidential data. Several such channels can be created, with each channel maintaining its own ledger and its own set of data.
For example a supplier of dairy products to several large retailers in a country could create channels with each of those retailers. This assumes its transactions with those retailers are large enough to warrant the creation of a channel. Each channel now shields its entire set of transactions from parties outside that channel.
Channels are ideal for when a subgroup of participants have to transact among themselves regularly and have no need to access for data outside that channel.
So channels are great right! Not entirely. It’s great for all the above-mentioned reasons. It’s not for the simple fact that now if you want to share some data only among a sub-group of participants on a channel, there’s no way to do that - unless you create another channel. But creating one channel after another brings with it overheads in terms of maintaining access policies, chaincode versions, etc. The solution - private data or collections of private data that offer privacy at a more fine-grained level than channels
Starting version 1.2, Fabric will allow for the creation of private data collections. which can be accessed only by a subset of participants on a channel. So now participants have the choice of using a channel when the entire set of transactions needs to be kept confidential among all participants of that channel. But they can use to choose private data collections, when only a subset of organizations on that channel need to access certain data.
ZKP enables one party, the prover, to prove to another party, the verifier, that it’s in possession of a secret, which satisfies certain properties - all this without revealing the actual secret (therefore zero-knowledge).
In Fabric, ZKP will be used for:
Anonymous Client Authentication using Identity Mixer, and
Exchange of assets using Zero-Knowledge Asset Transfer
Identity Mixer will be available as a release feature in version 1.2 and will be used to protect the privacy of users when signing, authenticating, and during the transfer of certified attributes. Because it leverages ZKP, it will guarantee that nothing is revealed about the client’s identity (its secret) beyond whether the corresponding statement is true.
In a yet to be announced release, Fabric will also offer ZKP-powered asset management (ZKAT) that could be of particular interest to financial organizations. ZKAT is a mechanism for use cases where assets need to be transferred without exposing one’s business model and, yet, the entire transfer needs to be auditable.
Banks, for instance, have arbitrage as their core business model - they borrow at a low rate and lend at a higher rate. With ZKAT, a bank on a blockchain can transfer assets and have them recorded on the shared ledger without the fear of exposing what is being transferred or who is the sender and recipient.
Remember how we discussed ‘modularity’ and ‘pluggability’? Well it extends even to the choice of the database. But before we touch upon that, let’s start with the ledger.
In Fabric, the blockchain ledger is where it all starts and comprises the blockchain and the world state. The blockchain logs all transactions and updates the world state, which is implemented as a database that holds current values of the ledger. The world state can be stored on either LevelDB or CouchDB.
By default, Fabric comes embedded with LevelDB, which is good enough for simple key-value pairs. CouchDB, on the other hand, would be the right choice for ledger states structured as JSON and that needs to take into account richer data types typically found in business transactions. Both support chaincode operations such as getting and setting and key and querying based on keys. CouchDB, though, has the additional advantage of complex queries using CouchDB JSON query language.
To conclude, by offering pluggable database options, Fabric provides much needed leeway to an enterprise in configuring its world state database. An enterprise can now take a call on whether it needs a sophisticated relational or graph-oriented data store or one that is merely timestamp-based.
MonetaGo, a New York headquartered blockchain applications company, successfully implemented a blockchain platform in India to tackle fraud around accounts receivables financing. The accounts receivables financing industry already loans around US$200 billion to small and medium sized businesses. It is believed that there is further potential of another US$188 billion if the issue of fraud is tackled.
The enterprise blockchain is built on Fabric and provides a common platform with no single financial institution controlling it. In a true test of privacy and confidentiality for the platform, the trade finance exchanges, who are also competitors, have been able to participate without compromising their privacy.
The world has always run on trade. Today, this $16 trillion industry spans a complex ecosystem of corporations, intermediaries, and officials. When you find out that a single shipment of avocados from Mombasa to Rotterdam involves 30+actors, 100+people, and 200 information exchanges, you cannot help but conclude that here is an industry that is in dire need of transformation.
TradeLens, a joint venture between Maersk and IBM, aims to use the power of blockchain to eliminate various barriers within the international supply chain. Time-consuming paper processes, duplication of information, errors in information exchange, long-winded clearance processes - these are just some of the problems that plague the industry.
Now with the power of blockchain, Maersk, IBM, and several other partners are trying to remove redundancies across the ecosystem that includes ports, terminals, ocean carriers, government authorities, shippers, and 3PL providers among others. TradeLens is currently in beta and gradually approaching production scale processing a whopping 150 million events per day!
Visualize the current state of affairs of education - we attend several academic institutions, earn our credentials each step of the way, and are required to repeatedly prove or present our credentials to institutions and employers. These credentials, moreover, reside in different data silos and are subject to different validation processes.
Sony Global Education, a subsidiary of Sony Corporation, started with the vision of creating a system where credentials are no longer siloed and presenting them to all parties concerned becomes easier. The net benefit is that employers and higher academic institutions can get a comprehensive view of an individual’s credentials allowing them to select the right applicant much faster.
To achieve its vision, Sony Global Education brought together a consortium of government agencies and private organizations. Along with a technology partner, they implemented a Fabric-based platform for storing and retrieving education and training data keeping in mind secure data access. After a successful prototype, Sony Global Education successfully rolled it out to 250,000 participants worldwide in a Global Math Challenge. It is now working closely with Japan’s Ministry of Internal Affairs and Communications to demonstrate a next-generation platform for schools.