What is hyperledger fabric blockchain?
Tags: blockchain, hyperledgerfabric, introduction
Published: 2021-01-02 13:20:45

<p> <a href="https://www.hyperledger.org/projects/fabric"><span data-offset-key="aoo3v-1-0">Hyperledger Fabric</span></a><span data-offset-key="aoo3v-2-0"> 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. </span></p>

<!-- wp:heading -->
<h2>What is a blockchain?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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 <a href="https://en.wikipedia.org/wiki/Consensus_(computer_science)">consensus protocol</a>. Each node needs to verify and validate the transaction in the network. This feature makes blockchain with high security.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is how a blockchain works. </p>
<!-- /wp:paragraph -->

<!-- wp:image {"width":629,"height":429,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large is-resized"><img src="https://www.investopedia.com/thmb/OspmuCTSRyVEcNwSLOwYGaQHm64=/1688x0/filters:no_upscale():max_bytes(150000):strip_icc():format(webp)/dotdash_Final_Blockchain_Sep_2020-01-60f31a638c4944abbcfde92e1a408a30.jpg" alt="What is hyperleder fabric blochchain?-blockchain" width="629" height="429"/><figcaption>Source: <a href="https://www.investopedia.com/terms/b/blockchain.asp">https://www.investopedia.com/terms/b/blockchain.asp</a></figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For more reference <a href="https://www.investopedia.com/terms/b/blockchain.asp">https://www.investopedia.com/terms/b/blockchain.asp</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><a href="https://en.wikipedia.org/wiki/Bitcoin">Bitcoin</a> by <a href="https://en.wikipedia.org/wiki/Satoshi_Nakamoto">Satoshi Nakamoto</a> is the first blockchain network used for cryptocurrency. Nowadays, blockchain technology has many uses cases like banking, hospitality, supply chain, government etc.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>some of the interesting use cases are:</h3>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><li>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 <a href="https://www.deutschebahn.com/en/Digitalization/technology/New-Technology/blockchain-3520362">read here</a>.</li><li>Walmart manages its food supply chain in an unpredicted way using hyperledger fabric blockchain network. To more <a href="https://www.hyperledger.org/learn/publications/walmart-case-study">read here</a>.</li><li><a href="https://www.burstiq.com/" target="_blank" rel="noreferrer noopener">BurstIQ’s</a>&nbsp;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.</li></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>There are many blockchain networks available. These can be divided into two categories.</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><li><strong>Public blockchain: </strong>Public blockchain is where any participants can be able to participate in the blockchain network and make a transaction between them. <strong>Bitcoin, Ethereum</strong> which are the<strong> </strong>most popular public blockchain network.</li><li><strong>Private blockchain:</strong> 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 <strong>Hyperledger technologies such as fabric and sawtooth, Corda, Ripple, Ethereum</strong>.</li></ol>
<!-- /wp:list -->

<!-- wp:heading -->
<h2>What is hyperledger fabric blockchain?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>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 <a href="http://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">hyperledger.org</a></p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Why hyperledger fabric?</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Hyperledger fabric focus in private permissioned blockchain. It has many key features than other blockchain platforms to standalone.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>They key features are:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>Modularity</li><li>Permissioned</li><li>Privacy and confidentiality</li><li>Performance and scalability</li><li>Smart contract in form of chaincode</li><li>Pluggable consensus</li></ul>
<!-- /wp:list -->

<!-- wp:heading {"level":3} -->
<h3>Modularity</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Hyperledger Fabric has a modular architecture. The modularity of consensus protocol, cryptographic functions, ease of smart contract development, key management protocol and different algorithms.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To know how hyperledger works go to <a href="https://hyperledger-fabric.readthedocs.io/en/release-2.2/txflow.html">https://hyperledger-fabric.readthedocs.io/en/release-2.2/txflow.html</a></p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Permissioned</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Privacy and confidentiality</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Performance and scalability</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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 <a href="https://wiki.hyperledger.org/display/PSWG/Performance+and+Scale+Working+Group">Performance and Scale working group</a> currently working on a benchmarking framework called <a href="https://wiki.hyperledger.org/projects/caliper">Hyperledger Caliper</a>. The latest <a href="https://arxiv.org/abs/1901.00910">scaled Fabric to 20,000 transactions per second</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Fabric introduces a new architecture for transactions that we call&nbsp;<strong>execute-order-validate</strong>. It addresses the resiliency, flexibility, scalability, performance and confidentiality challenges faced by the order-execute model by separating the transaction flow into three steps:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li><em>execute</em>&nbsp;a transaction and check its correctness, thereby endorsing it,</li><li><em>order</em>&nbsp;transactions via a (pluggable) consensus protocol, and</li><li><em>validate</em>&nbsp;transactions against an application-specific endorsement policy before committing them to the ledger</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>This design departs radically from the order-execute paradigm in that Fabric executes transactions before reaching a final agreement on their order.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Smart contract in form of chaincode</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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.<br>There are three key points that apply to smart contracts, especially when applied to a platform:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>many smart contracts run concurrently in the network,</li></ul>
<!-- /wp:list -->

<!-- wp:list -->
<ul><li>A smart contract can be dynamically deployed</li></ul>
<!-- /wp:list -->

<!-- wp:list -->
<ul><li>Untrusted and potentially malicious code treated as well.</li></ul>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Pluggable consensus</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For complete features visit <a href="https://hyperledger-fabric.readthedocs.io/en/release-2.2/whatis.html">https://hyperledger-fabric.readthedocs.io/en/release-2.2/whatis.html</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>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 <a href="https://hyperledger-fabric.readthedocs.io">https://hyperledger-fabric.readthedocs.io</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>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.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For my other programming archives -> <a href="https://developersdoors.xyz/category/programming/">Go</a>.</p>
<!-- /wp:paragraph -->