The release of the new Hyperledger Fabric v2.0 brings forth many new upgrades and changes to the previous v1.4.
But what exactly is Hyperledger Fabric? And why are people talking about it? It’s easy to get confused with all these words being thrown around. Many people still have a hard time understanding what blockchain technology is and how it works.
So here is everything you need to know about Hyperledger Fabric v2.0.
To know what Hyperledger Fabric is, you should know what Hyperledger is. Yes, there is a distinction between these two terms.
Hyperledger is an umbrella project by the Linux Foundation and consists of several Frameworks and Modules. These tools allow businesses to develop blockchain-based private networks and applications to suit their needs.
This the major feature that separates Hyperledger from conventional blockchains.
While blockchain technology is a decentralized permissionless ledger that is available openly to the public, Hyperledger is a private permissioned network where businesses can store their confidential private data. Businesses can limit access to this private data to permissioned entities or persons.
Hyperledger Fabric is a framework for distributed ledger solutions that allows enterprise businesses to develop blockchain solutions and applications with a modular architecture and delivers high levels of flexibility, confidentiality, resiliency, and scalability.
Its modular architecture allows components such as consensus and membership services to be plug-n-play, allowing businesses to resolve complexities in their economic ecosystem.
Unlike permissionless blockchains like Bitcoin, which allows public users into the network to make transactions, Hyperledger Fabric allows entities to conduct confidential transactions with permissioned members via a trusted membership service provider.
Hyperledger v2.0 is the first major release after v1.4 back in January 2019 and brings us many new upgrades and changes for both users and operators.
V2.0 now offers support for new applications and privacy patterns, enhanced governance for smart contracts, and new options for operating nodes.
Moreover, you still have the ability to upgrade network components on your own terms, with support for rolling changes from the previous version. This means that you can upgrade each network component one at a time, with no downtime.
Additionally, it also has the option to enable the new features only when the member organizations are ready.
Now let’s dig a little bit deeper into what Hyperledger Fabric v2.0 has to offer.
Something totally new in Hyperledger Fabric v2.0 is the decentralized governance for smart contracts. You also get a new process for installing a chaincode on your peer and starting it on a channel.
The new chaincode lifecycle enables multiple organizations to arrive at an agreement on the chaincode’s parameters, such as the endorsement policy of the chaincode, before you use it to interact with the ledger.
In the previous releases of Hyperledger Fabric, only one organization was able to set the parameters of a chaincode, such as an endorsement policy, for all other members. The other members couldn’t take part in the transactions that invoked the chaincode as they only had the power to refuse the installation of the chaincode.
The new Fabric v2.0 chaincode lifecycle now supports decentralized trust models along with the centralized trust model of the previous version, making it much more flexible.
The decentralized trust model requires a sufficient number of organizations to agree on an endorsement policy before enabling the chaincode on the channels.
Only one organization could issue the upgrade transaction in the previous chaincode lifecycle, creating a potential risk for the channel member that had not yet installed the new chaincode.
With the new model, a sufficient number of organizations have to approve the upgrade before the chaincode is upgraded.
The Fabric v2.0 lifecycle allows you to change a private data collection configuration or an endorsement policy without repackaging or reinstalling the chaincode.
Users also get a new endorsement policy that needs endorsement from a majority of the members on the channel. This policy is automatically updated when members are added or removed.
The new lifecycle packages chaincodes in easily readable tar files. This makes the process of inspecting the chaincode package easier and simplifies coordinate installation across multiple organizations.
In the previous lifecycle, a name and version specified during the chaincode package installation defined each chaincode on the channel.
You can now deploy multiple chaincodes with different names on the same channel or on different channels using a single chaincode package.
Organizations can now extend a chaincode for their own use case, for instance, if the member wants to perform different validations in the interest of their organization.
The transaction will be validated and added to the ledger, as long as the number of required organizations endorse the chaincode transactions with matching results.
This way, organizations can individually roll out minor fixes on their own schedules without needing the entire network to proceed in lock-step.
You can use the decentralized methods of coming to an agreement that supports the new chaincode lifecycle, in your own chaincode applications, to ensure that organizations consent to data transactions before they are added to the ledger.
Validating additional information before endorsing a transaction proposal is now simplified, as organizations can now add automated checks to chaincode functions.
You can model a chaincode process that spans multiple transactions based on human decisions. Actors from various organizations can indicate their terms and conditions of the agreement in a ledger transaction.
A final chaincode proposal can then verify whether the conditions set by all individuals are met, and settle the business transaction.
New patterns for sharing and working with private data is something else that’s new in Hyperledger Fabric v2.0.
This process does not require the creation of private data collection for all combinations of channel members that may want to transact.
In other words, instead of sharing private data within a collection of multiple members, you may want to share it with multiple collections where each collection will have a single organization or an organization along with a regulator or auditor.
Hyperledger Fabric v2.0 has several enhancements to enable these new private data patterns.
You can share private data with a channel member who is not a member of a collection, or with another private data collection that has one or more channel members.
Here the parties on the receiving end can verify if the private data matches the co-chain hashes created from private data in previous transactions, using a chaincode API.
You now get the option to define private data collections using an endorsement policy. The endorsement policy overrides the chaincode-level endorsement policy for keys within the collection.
You can use this feature to control which organizations can write data to a collection. Moreover, it enables the chaincode lifecycle and the chaincode application patterns that we talked about earlier.
In Fabric v2.0, you can use Implicit organization-specific collections without any upfront definition. If you want to utilize the per-organization private data patterns, you don’t even have to define the collections when deploying chaincode.
Operators can build and launch chaincode with the technology of their choice with the external chaincode launcher feature. Because the default behavior builds and runs the chaincode in the same manner as prior releases using the Docker API, the use of external builders and launchers is not required.
The Hyperledger Fabric required peers to have access to a docker daemon to build and launch a chaincode in its prior releases. This is not something you’d want in production environments because of the privileges required by the peer process. Fabric v2.0 eliminates this dependency
The operator can now run the chaincode in the environment of their choice and don’t need to be run in Docker containers.
An operator can now override how the peer builds and launches chaincode by providing a set of external builder executables.
You can now run a chaincode as an external service, while in the previous releases, the peer had to launch the chaincodes and then connect back to the peer.
Read delays during endorsement and validation phases have always been a performance issue while using the CouchDB sate database.
Hyperledger Fabric v2.0 now provides fast local cache reads with a new peer cache that replaces many of the expensive lookups.
Docker images in Hyperledger Fabric v2.0 will now use a security-oriented and lightweight Linux distribution called Alpine Linux. This provides faster downloads, start-up times, and takes up less disk space on host systems as the images are now much smaller.
Alpine Linux is designed with security as the highest priority and it’s minimalist nature greatly reduces the risk of security vulnerabilities.
The fabric-samples repository in v2.0 now gets a new Fabric test network. The test network, built to be a modular and user-friendly sample fabric, makes it easy to test your applications and smart contracts.
You can also deploy your network using Certificate Authorities, in addition to Cryptogen.
So, folks, that’s about it for now.
We’ve looked at just about everything that’s new in Hyperledger Fabric v2.0.
Thank you for reading this far, and hope this article helped you out.
If you need any more information on anything related to blockchain technology, do let us know in the comment section below.
We’ll make a post just on that.
If you found this helpful, do share it with your peers on your social media. And don’t forget to check back often for more content.