Hyperledger Fabric is an open-source enterprise-grade permissioned distributed ledger technology platform. Focus for use in enterprise contexts. It has key features than any other blockchain platforms. I will explain what is a blockchain and how it is useful. Then I explain about Hyperledger Fabric blockchain platform.
What is a blockchain?
Blockchain is an immutable chain of records called a ledger. A hash function associated with the ledger and stored in chronological order of execution. These records may be a transaction done between two nodes. Blockchain network is a distributed decentralized network, where each peer nodes have a copy of the ledger. Since blockchain is a decentralized network, there is no centralized host. the reliability achieved through consensus protocol. Each node needs to verify and validate the transaction in the network. This feature makes blockchain with high security.
This is how a blockchain works.
Each time a hash function for the block created and connected with the previous block. This forms a chain of cryptographic records. After each transaction, the nodes in each node in the network store the copy of that ledger. This makes blockchain a fault tolerance network.
For more reference https://www.investopedia.com/terms/b/blockchain.asp
some of the interesting use cases are:
- Deutsche Bahn, the second-largest transport company in world and infrastructure management, digitizing the railway transport with blockchain for assets management, railway signalling infrastructure. To more read here.
- Walmart manages its food supply chain in an unpredicted way using hyperledger fabric blockchain network. To more read here.
- BurstIQ’s platform helps healthcare companies to safe and secure massive amounts of patient data. Its blockchain technology enables the safekeeping, sale, sharing or license of data while maintaining strict compliance with HIPAA rules.
There are many blockchain networks available. These can be divided into two categories.
- Public blockchain: Public blockchain is where any participants can be able to participate in the blockchain network and make a transaction between them. Bitcoin, Ethereum which are the most popular public blockchain network.
- Private blockchain: Private blockchain main focus is for B2B. A consortium of organizations or organizations under governance use this blockchain. Private blockchain archives high privacy and security. The most popular private blockchain is Hyperledger technologies such as fabric and sawtooth, Corda, Ripple, Ethereum.
What is hyperledger fabric blockchain?
As said Hyperledger Fabric is a distributed ledger platform. The main focus for enterprise private blockchain solution. It is an open-source project under Linux-foundation started by IBM. It is an active project in Hyperledger technologies. Currently, more than 30 companies contribute to Hyperledger fabric.
Hyperledger technologies have different frameworks and libraries like fabric, sawtooth, indy, besu. It also has tools for managing blockchain networks. For more details go to hyperledger.org
Why hyperledger fabric?
Hyperledger fabric focus in private permissioned blockchain. It has many key features than other blockchain platforms to standalone.
They key features are:
- Privacy and confidentiality
- Performance and scalability
- Smart contract in form of chaincode
- Pluggable consensus
Hyperledger Fabric has a modular architecture. The modularity of consensus protocol, cryptographic functions, ease of smart contract development, key management protocol and different algorithms.
To know how hyperledger works go to https://hyperledger-fabric.readthedocs.io/en/release-2.2/txflow.html
Hyperledger fabric is a private blockchain. The main key focus is on privacy and security. A blockchain platform for the enterprise can be fully deployed using this framework. This use different consensus protocol such as byzantine and crash fault tolerance protocols.
Additionally, in such a permissioned context, the risk of a participant intentionally introducing malicious code through a smart contract is diminished. First, the participants are known to one another and all actions, whether submitting application transactions, modifying the configuration of the network or deploying a smart contract recorded on the blockchain following an endorsement policy that was established for the network and relevant transaction type.
Privacy and confidentiality
Hyperledger Fabric, being a permissioned platform, enables confidentiality through its channel architecture and private data feature. In channels, participants on a Fabric network establish a sub-network where every member has visibility to a particular set of transactions. Thus, only those nodes that participate in a channel have access to the smart contract (chaincode) and data transacted, preserving the privacy and confidentiality of both. Private data allows collections between members on a channel, allowing much of the same protection as channels without the maintenance overhead of creating and maintaining a separate channel.
Performance and scalability
In performance and scalability, Hyperledger Fabric standalone from other blockchain platforms. Variables such as transaction size, block size, network size, as well as limits of the hardware, etc may affect the performance. The Hyperledger Fabric Performance and Scale working group currently working on a benchmarking framework called Hyperledger Caliper. The latest scaled Fabric to 20,000 transactions per second.
Fabric introduces a new architecture for transactions that we call execute-order-validate. It addresses the resiliency, flexibility, scalability, performance and confidentiality challenges faced by the order-execute model by separating the transaction flow into three steps:
- execute a transaction and check its correctness, thereby endorsing it,
- order transactions via a (pluggable) consensus protocol, and
- validate transactions against an application-specific endorsement policy before committing them to the ledger
This design departs radically from the order-execute paradigm in that Fabric executes transactions before reaching a final agreement on their order.
We can deploy those blockchain network using docker container technology also. Thus scalability of the blockchain network is efficient than other platforms. Many cloud service providers such as AWS, Azure, IBM provide cloud blockchain solution. Where we can easily deploy the blockchain network and make ease of transaction in it.
Smart contract in form of chaincode
A smart contract, or what Fabric calls “chaincode”, functions as a trusted distributed application that gains its security/trust from the blockchain and the underlying consensus among the peers. It is the business logic of a blockchain application.
There are three key points that apply to smart contracts, especially when applied to a platform:
- many smart contracts run concurrently in the network,
- A smart contract can be dynamically deployed
- Untrusted and potentially malicious code treated as well.
It is easy to write that chaincode in native languages such as NodeJS, JAVA, Go, Typescript. No need to have separate language for smart contract.
A consensus algorithm is a procedure through which all the peers of the Blockchain network reach a common agreement about the present state of the distributed ledger. In this way, consensus algorithms achieve reliability in the Blockchain network and establish trust between unknown peers in a distributed computing environment. Essentially, the consensus protocol makes sure that every new block added to the Blockchain is the one and only version of the truth that agreed upon by all the nodes in the Blockchain.
Hyperledger fabric uses two types of the consensus protocol. one is Byzantine protocol and another one is crash fault tolerance. As of modular architecture, it uses them as for the problem in the blockchain network. Thus achieve more reliability to the blockchain network.
For complete features visit https://hyperledger-fabric.readthedocs.io/en/release-2.2/whatis.html
I learned about this technology for my college project. It is an awesome open source project. You can easily develop a smart contract with NodeJS. We can deploy the blockchain network using containers also. For more go to https://hyperledger-fabric.readthedocs.io.
I will be posting articles on hyperledger fabric administration and chaincode development. If you have any suggestion or corrections in this article please share in the comments.
For my other programming archives -> Go.