The blockchain concept is based on Bitcoin, which Satoshi Nakamoto suggested in 2009. A blockchain system is, by definition, a distributed ledger. Participants work together to keep the system running and elect nodes to add new material into the ledger using the Byzantine fault-tolerant consensus mechanism on a regular basis. One of the primary benefits of blockchain technology is tamper-proofing. All transactions are specifically placed in the leaf nodes of a Merkle Tree, and an iterative calculation procedure is carried out until the MerkleRoot is computed, which is contained in the block header so that the user can readily check the integrity of the transaction data. Furthermore, blocks are chained progressively by computing the hash value of the preceding block's header, known as the prevHash. It is extremely difficult to generate a correct PrevHash value, therefore after a transaction has been validated (i.e., has 6 sequential blocks), subverting it might be exponentially difficult. As a result, the combination of MerkleRoot and prevHash is the foundation of the blockchain's tamper-proof functionality. The innovation with a blockchain is that it guarantees the fidelity and security of a record of data and generates trust without the need for a trusted third party.


Hyperledger Fabric is a private open source Blockchain, licensed by Linux Foundation. Most Blockchain networks are intended to be used for the transfer and storage of funds, with the creation of a "coin" that is used on the network in most cases. The term "assets" refers to anything related to Hyperledger Fabric. An asset can be cash, real estate, a vehicle, or even an insurance policy. Unlike most other Blockchain networks, its key feature is that it will be used by employees of one or more companies rather than individuals. It does not provide a single standard of work for the Blockchain network, but rather a variety of options from which to choose. It may be easier to build a network that fits into the business model of the organization for which it is being implemented in this manner. Because Hyperledger is open source, an organization that wants to use it can improve the network, create new modules, fix existing problems, and generally adapt to its needs. Smart contracts are referred to as "chaincodes" in Hyperledger Fabric.
Hyperledger Fabric's key participants are:
  • Clients - the network participants who send requests to write to the network.
  • Blockchain network. They also set up and run smart contracts. They are also used to communicate between external applications and the Blockchain network, as well as between smart contracts.
  • Orders service – nodes responsible for accepting network, change, and order requests and distributing them to peers for validation.
Model Blockchain
a. Peers (or Nodes)
Peers themselves represent organizations and members. Peers are crucial components of a blockchain network because they host instances of ledgers and smart contracts. Peers are most important in a Fabric blockchain when it comes to transactions or the transaction workflow in this way.
  • Orderer Peers - Orderers are peers (or nodes) who ensure that all peers in a channel have the same updated ledger. In this way, orderer peers ensure data consistency and safeguard the ledger's integrity. Following the endorsement of a transaction, orderers build the blocks and enter the record into them. When working together, the orderer peers, also known as the ordering service, mail out the new blocks to each peer within a channel, updating their respective ledgers.
  • Endorser Peers - The Endorser role allows for the designation of peers. This is where a transaction request is either ratified as valid and accepted to be added to the ledger, or it is refused outright. To do so, they handle chaincode execution.
b. Hyperledger Fabric CA
The Hyperledger Fabric CA (or Fabric Certificate Authority) acts as the Membership Service Provider for Hyperledger Fabric. It is in charge of member registration, certification, and node regulation. As a result, certificate authorities play a crucial role in establishing Fabric as a permissioned blockchain, registering members, tracking identities within the network, and removing deprecated accounts.
notion image
c. Hyperledger Fabric Workflow
notion image
Cloud server: 2 vCPU and 4 GB RAM
Framework: Hyperledger Fabric SDK for Nodejs v2.2, Hyperledger Fabric binaries v2.2
Software: Visual Studio Code
OS: Ubuntu 20.04.3 LTS
Platform: Docker version 20.10.12, Nodejs v16.13.2
Language: Shell script, JavaScript, Golang
Database: CouchDB

Khang Hy

Sun Sep 11 2022