Understanding blockchain technology

Blockchain technology was invented to be the backbone for Bitcoin, the popular cryptocurrency. It is a distributed ledger spread across a permissioned or permissionless network. The participants of this network are referred to as nodes. Each node contains a copy of the ledger. To update the ledger, the participants in the network will propose a transaction or a set of transactions that should be added next to the ledger. Once the participants in the network come to an agreement on the next set of transactions, they will add the transactions to their local copy of the ledger. This way, the sanctity and uniformity of the ledger across the nodes are maintained.

Data is added in "blocks" of transactions. Each block contains the hash value of the header of the previous block. (A hash function generates a unique output of fixed length for an input data of any length.) This ensures that the sequential order of the blocks is maintained in the ledger. Each block header has a set of parameters, including a Merkle root hash of the transactions in the block. If  any transaction data is tampered, it results in the Merkle root of the block being altered. This causes a mismatch in the hash of the header of the block and the hash of the header of the block stored in the following block, effectively 'breaking the chain'.  This will result in the local copy of the ledger being broken and the node being thrown out of sync with the other copies of the distributed ledger disabling it from adding any further transactions to the ledger.

Transactions submitted to the network are signed using a private key or a secret key that is held by the network participant and the public key is included in the transaction as part of the transaction. This means that the other participants on the network can validate the identity of the transaction submitter.

The multiple copies of the ledger and the hash-chain ensure that any data written to the ledger is immutable. If there is a mismatch between the local copy of the ledger held by a node and the copy of the ledger held by the other network participants (nodes), the node is disengaged from the network and cannot broadcast new transactions. This ensures that the sanctity of the ledger is maintained. To further maintain the uniformity of the ledger, blockchain allows network participants only to append new data to the ledger and does not allow participants to remove or modify existing data in the ledger. As such, any transaction data written to the blockchain is preserved and cannot be modified.

Since the ledger is universal, there needs to exist a mechanism to ensure that transactions are added in the same order across all copies of the ledger. This is typically achieved through a consensus mechanism. A consensus mechanism is basically a set of steps that ensures that transactions are written in the same order across the nodes. Additionally, it ensures that the transactions in all the copies of the ledger are the same.

Consensus can be achieved through various means. Traditional public permissionless blockchains, such as those running cryptocurrencies such as Bitcoin or Ethereum 1.0, rely on the solving of a cryptographic puzzle to pick the network participant who gets to write the next set of transactions to the ledger. This network participant is called a miner. After successfully solving the cryptographic puzzle, the miner will create a "block" of what they believe the next transactions in the ledger should be. They then add this block with the transactions and their solution to the puzzle to their local copy of the ledger and broadcast this block to all the other nodes in the network. The other nodes will validate the authenticity of this block before updating it to their local ledger. The difficulty of the cryptographic puzzle is set such that only one network participant can solve the puzzle in a fixed window of time. After the puzzle is solved, a new cryptographic puzzle is generated and the next miner needs to solve this puzzle.

Permissioned blockchains follow a slightly different approach. Permissioned blockchains are blockchains where we know all the network participants and the participants cannot connect to the network without prior permission of the participants. Since the identity of all the network participants is known, these blockchains follow a slightly more relaxed approach to consensus. They might use a simple queuing mechanism to order the transactions. Some may also follow a round-robin approach. A round-robin approach is one where each network participant is allowed to submit and write its own block to the ledger. This continues until every participant has had a chance to submit a block, and then the process is repeated.

In recent times, the term Distributed Ledger Technology (DLT) has been interchangeably used with the term blockchain. All Blockchains are DLTs but not all DLTs are Blockchains. In common parlance, the term DLT is generally used to  refer to a platform that does not use 'blocks' or 'chains'. Instead they add data in singular transactions.  These platforms are being actively used to build financial applications. Most of these platforms use a variation of the Practical Byzantine Fault Tolerance (PBFT) mechanism to achieve a transactional-level consensus between the various copies of the ledger. As they are PBFT-based, several of them suffer from the same limitations as PBFT. They are able to solve this problem using intelligent network design or by making modifications to the traditional PBFT algorithm. A good example is the Stellar platform, which follows the Federated Byzantine Agreement (FBA) consensus model and restricts the Validation Nodes on its public network. DLT platforms are preferred over blockchains in certain use cases because they often permit higher transactions per second. This makes them suitable for payment networks, trading exchanges, and so on. 

Lastly, let's look at the concept of smart contracts. Smart contracts are computer protocols that enable the execution of condition-based business flows. The authenticity of conditions and the execution of the terms of the contract can be satisfactorily verified by all the parties who are affected by the execution of the contract without trusting a third party.

This is possible by writing and deploying such business flows to a distributed ledger and by leveraging blockchain technology. Let's say Alice wants to sell a car and Bob wants to buy it. But Alice wants to ensure that Bob gets possession of the car only when she gets paid. In such a case, Alice and Bob can write a smart contract. Bob can transfer the funds he needs to pay Alice to the smart contract's account. Alice can transfer a secret password that will unlock a digital copy of the documents of the car to the smart contract. The smart contract will ensure that Bob gets access to the password and Alice gets her payment without them depending on a third-party middleman. If the deal does not go through, the contract can also return the assets to the original owners. 

This is better than traditional means because a human intermediary can be influenced by Alice or Bob. They might also have to pay some fees to the intermediary. Additionally, there might be a delay in executing the deal owing to a backlog of requests or an inefficient intermediator. If the third-party turns out to be fraudulent, they could even run away with the money and possession of the car! Since in a distributed system the smart contract code is deployed on a blockchain network, it cannot be altered by Alice or Bob or a malicious individual due to the immutable nature of the blockchain. This ensures that the deal will always go through with a limited risk of fraud.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.183.150