transperent- Logo

Blockchain

What Is Blockchain and how does it work?

In 2008, the much publicized and still unknown entity ‘Satoshi Nakamoto’ wrote a paper about Peer-to-peer Electronic Cash System that was eventually used as underlying technology for the first Blockchain- Bitcoin.
Since then, many variants of Blockchain Implementations have come to exist, both Public and Private – such as Bitcoin, Ethereum, Hyper ledger, Sawtooth etc., using different algorithms or consensus mechanisms.
But to understand and appreciate the differences, first it may be important to understand what a blockchain is and how it offers the Security, Immutability & Transparency it is claims to offer.
Simply put, a blockchain is a type of distributed ledger or decentralized database that keeps continuously updated digital records, based on a consensus mechanism, of who owns what. Rather than having a central administrator like a traditional database, a distributed ledger has a network of replicated databases, synchronized via the internet and visible to anyone within the network. Blockchain networks can be private with restricted membership like an intranet, or public, like the Internet, accessible to any person in the world.
When a digital transaction is carried out, it is grouped together in a cryptographically protected block with other transactions and sent out to the entire network. ‘Miners’ (members in the network with high levels of computing power) then compete to validate the transactions by solving complex coded problems. The first miner to solve the problems and validate the block receives a reward. (In the Bitcoin Blockchain network, for example, a miner would receive Bitcoins). The validated block of transactions is then timestamped and added to a chain in a linear, chronological order. New blocks of validated transactions are linked to older blocks, making a chain of blocks that show every transaction made in the history of that blockchain. The entire chain is continually updated so that every ledger in the network is the same, giving each member the ability to prove who owns what at any given time.
Its decentralized, open & cryptographic nature allows people to trust each other and transact peer to peer, making the need for intermediaries obsolete. This also brings unprecedented security benefits. Hacking attacks that commonly impact large centralized intermediaries like banks would be virtually impossible to pull off on the blockchain. For example — if someone wanted to hack into a specific block of a blockchain, a hacker would not only need to hack into that block, but all of the proceeding blocks going back the entire history of that blockchain. And they would need to do it on every ledger in the network, which could be millions, simultaneously.

Consensus Model

Different Consensus mechanisms allow secure updating of a distributed shared state.
Common technique used for achieving fault tolerance in a distributed system is to distribute the shared state across multiple replicas in the network and updating according to pre-defined transition rules. This technique is known as state machine replication. Replication ensures that the state is not lost if one or more nodes crash. It ensures that all nodes with identical inputs, will eventually produce the same outputs resulting in eventual agreement on the change of state via the consensus protocol. The replicas also communicate with each other to build consensus and agree upon the finality of the state after a state change is executed. Different implementations of Blockchain use different consensus methods.

Different Consensus Models

Blockchain platforms use a range of consensus models which are PoW and PBFT in their original form or variations of it providing certain advantages desired over the original model. Bold new models are also proposed, such as Proof-of-Stake (PoS) and Proof-of-elapsed-Time (PoeT) and variations of PBFT appear as viable alternatives. In this section, we review the broad categories of consensus models used by the popular blockchain platforms.

Proof of Work (PoW)

Proof of work is an algorithm whose main goal is deterring cyber-attacks such as a distributed denial-of-service attack (DDoS) which has the purpose of exhausting the resources of a computer system by sending multiple fake requests. It is a requirement to define an expensive computer calculation, also called mining, to verify the legitimacy of a transaction that needs to be performed to create a new group of trustless transactions (called block) on a distributed ledger called blockchain.

Proof-of-Stake Model (PoS)

Proof-of-Stake algorithms are designed to overcome the disadvantages of PoW algorithms in terms of the high electricity consumption involved in mining operations. PoS completely replaces the mining operation with an alternative approach involving a user’s stake or ownership of virtual currency in the blockchain system.

Proof of Elapsed Time

Another consensus algorithm called Proof of Elapsed Time (PoET) is used by IntelLedger or SawtoothLake. It is intended to run in a Trusted Execution Environment, such as Intel’s Software Guard Extensions (SGX). SawtoothLake is a blockchain platform developed by Intel and subsequently open sourced for use by the community. PoET uses a lottery-based election model based on SGX, where the protocol randomly selects the next leader to finalize the block.

Byzantine Fault Tolerance

Hyperledger Fabric, which is the most popular permissioned blockchain platform being developed by the Linux Foundation provides a flexible architecture with a pluggable consensus model. Hyperledger currently supports two consensus models – the popular Practical Byzantine Fault Tolerance algorithm (PBFT) and its variation SIEVE that can handle non-deterministic chaincode execution.

The Byzantine Generals Problem

A group of generals, each commandeering a part of the Byzantine army has surrounded an enemy city. To attack the city, all generals have to agree on a battle plan. Generals can communicate via messengers only. The messengers might be captured by the enemy and the message might never reach the other general. The difficulty in the agreement is that one or more generals might be traitors and are interested in sabotaging the battle plan. To this end, they might send false messages, distort messages or not send any messages at all. All loyal generals will act according to the plan. A small number of traitors should not cause

Emerging Landscape

While there are several consortia developing industry specific variant of Blockchain implementations. Two of them seem to be emerging as leaders, if the companies joining them is any indication. While IBM took an early lead with Fabric, an implementation of Linux Foundation’s Hyperledger Project, more recently Enterprise Ethereum Alliance backed by likes Microsoft and using JPMorgan Chase’s Quorum seems to be gaining popularity. Launched 12 months ago, The Enterprise Ethereum Alliance, the world’s largest open-source Blockchain initiative, was established to connect Fortune 500 companies, Blockchain startups, academics, and industry experts together with a common goal. EEA is a non-profit industry organization that defines standards, so application built on an Ethereum-derived platform will run on all Ethereum platforms as well as support the development of enterprise tools.

PBFT The Practical Byzantine Fault Tolerance algorithm was the first practical solution to the achieving consensus in the face of Byzantine failures. It uses the concept of replicated state machine and voting by replicas for state changes. It also provides several important optimizations, such as signing, and encryption of messages exchanged between replicas and clients, reducing the size and number of messages exchanged, for the system to be practical in the face of Byzantine faults.
SIEVE consensus protocol is designed to handle non-determinism in chaincode execution. When non-determinism is present within the chaincode, it can produce different output when executed by different replicas in a distributed network. SIEVE handles transactions that are usually deterministic, but which may occasionally yield different outputs.
Consensus models used by popular blockchain platforms today are largely driven by the type of applications the platform expects to cater to and the threats it envisages to the integrity of the chain. Typically, the permission-less platforms are achieving robust consensus among very high number of untrusted peers using computational or memory complexity while sacrificing transaction finality and throughput. On the other hand, the permissioned, consortium blockchains are opting for a less scalable but much higher throughput model that ensures faster transaction finality.