In the recent times, Blockchain has become the talk of the town. In this article, I have tried to cover a very high-level overview of Blockchain/Distributed Ledger and how it can help us. I have also given an overview of Hyperledger fabric Blockchain components.
There is no single definition for Blockchain. According to me, Blockchain is an immutable distributed ledger that records the transactions in a decentralized environment. It’s an ordered list of all the transactions since inception. There are different type of Blockchain like public(permissionless) & permission. In this article, I have discussed the permission Blockchain – Hyperledger Fabric.
It is a set of records that are shared, replicated and synchronized among the participants in a network. It records all the transactions like the exchange of data or assets among the participants in the network.
There are different participants in a business and every participants keep their own ledger copy. Transactions are bilateral and each participant has to interact with each other and thus by creating a complex network. Transactions are governed by a central body which needs multiple approvals. This is a time & money consuming task.
Establishing trust in a network is very difficult and it’s a time consuming with the subject of reputation. The reputed and governing body takes time to create trust.
As each participant in the network has its own ledger which is not shared and so there is no transparency in the network.
Regulators like bank, clearinghouse, stock exchange, legal services are required as a middleman to ensure the accountability of the transaction.
The Blockchain is a tamper-proof immutable distributed ledger which records all the transactions in a network. The ledger is maintained by all participants and it is distributed in a peer-to-peer network. Instead of trusting on the 3rd party or central governances, Blockchain uses consensus protocol to commit a transaction into the ledger. The integrity of the transactions are achieved by cryptographic hashes and digital signatures.
In a distributed peer-to-peer network, transactions are stored in blocks which are linked together to form a chain and this is called as Blockchain. Each block contains a hash of the current block, timestamp of recent valid transaction and hash for the previous block. Previous block hash is used to link the block and prevents from altering the block or inserting between blocks.
Hyperledger is an open source hosted by Linux foundation and openly governed by collaborative effort to advance the cross-industry blockchain technologies for business. Hyperledger Fabric is a blockchain framework implementation and it is one of the Hyperledger projects.
Some key feature of Fabric:
- No token - Permissioned blockchain
- Based on consensus
- Endorsement policies for transactions approvals
- Private Channels for sharing confidential information
These are the network services that maintain the ledger. It receives ordered update messages for committing the new transaction to the ledger and to run the smart contacts.
It commits transactions and maintains the ledger & state.
It receives transactions for endorsement and it verifies whether the transaction fulfills all the necessary and sufficient conditions. Thereby the Endorsing peer responds by granting or denying the endorsement.
It approves the inclusion of blocks into the ledger. It communicates with peers and endorsing peers. It provides a shared communication channel to clients and peers over which the transaction can be broadcasted.
These are subnets of the peer network which shares a single ledger. It is used to restrict access to the transaction with involved parties. It means clients only can see the messages and their associated transactions of the channels they are connected to and are unaware of other channels.
It provides identity services to participants on the network. It manages different types of certificates required to run the blockchain.
It’s the transaction logic running on each invocation call. Transaction invocation results in updating or querying the ledger state.
It’s the process by which the agreement is obtained on the peer network. It is responsible for consistently replicating the ledger and for agreeing on new blocks.
It is an immutable record of all transactions on the network. It’s a collection of records that all participants on the network can access.
It is an End-user application which must be connected to the Blockchain through a peer.
Client application / SDK submits a transaction proposal for a chaincode by targeting the required peers. All the Endorser peers will execute the transactions. These transactions will not be updated in the ledger as it is only to endorse. Once endorsement is completed, it is signed by the endorser and returned to the client. The client then submits the transaction to the Orderer. It is then the Ordering service collects the transaction in blocks and distributes to the committing peers. These committing peers then deliver to other peers using gossip. There are different ordering algorithms are available such as SOLO (single node, development), Kafka, SBFT.
Committing peers validate the transactions against the endorsement policy and also check whether the transactions are valid for the current state. After all these processes the transactions are written into the ledger. Client applications are notified when the transactions are succeeded or failed and also when the blocks are added into the ledger if they are registered for the notification. The client application will also be notified by each peer to which they are connected to.
I have given an overview of what Blockchain is and high-level view of Hyperledger fabric. This approach can be used across various business areas like finance, supply chain, trade, etcs.