Blockchain is simply a chain of blocks which contains information. This technology was introduced in 1991 by a research team intending to timestamp documents so no one can backdate or tamper. As per the official definition, blockchain is a decentralized, distributed public immutable ledger, we will discuss more later under the distributed system. A single block contains data, hash, and the hash of the previous block.
There are three types of blockchains those are private, public and consortium. Most popular blockchain networks such as Bitcoin, Ethereum falls under the public category. The first block is called genesis block it is the initial state of a blockchain. There is a certain timeframe to create a single block after data mining and hashing. Miners validate transactions that take place in blockchain, they receive a payment for it in cryptocurrency.
Uses of Blockchain
Later in 2009, Satoshi Nakamoto was the one who started to use blockchain technology and came up with the digital cryptocurrency concept. We all have heard about his invention it is Bitcoin which is widely used as a digital cryptocurrency globally. In present, there are many new digital currencies which exist, but Bitcoin is leading the market value. Using cryptocurrencies people do transactions in day-to-day life. Such as buying and selling of goods, for large business acquisitions, for education, money trading etc.
Smart contracts are another use of blockchain technology it provides some form of a scripting language to make it easier to add functionality to ledgers. A contract encapsulates long-lived state, a constructor to initialize that state and methods to manage the state. Ethereum styled contracts are the most popular ones so far. The latest network of blockchain, IPFS (interplanetary file system) is also developed in order to store and share data globally in a distributed file system.
Above mentioned usage types are game-changers in real-world use cases because this technology has a huge potential to cover many industries. Supply chains, Money transactions, Digital voting, Loyalty rewards & funding, Real estate, Food, IoT, Contracts & wills, Recordkeeping, Tracking, Tax and rights are some of the streams which blockchain is used successfully.
The distributed system used in Blockchain
Blockchain is defined as a decentralized, distributed system which includes a core of P2P (peer-to-peer) network architecture. Main advantages of this architecture are all nodes in the network capable of sharing and storing data among other nodes, if one node goes down it will not affect the network as a whole etc. Distributed computing is used as all the nodes communicate with their neighbour nodes to validate a particular transaction.
Blockchain has used distributed system concepts widely to maintain security, performance, and accessibility etc. Consensus protocols are thoroughly followed in the blockchain. Nodes in the distributed system maintaining ledgers of transactions as blocks simultaneously in a decentralized peer-to-peer manner.
In Public blockchain networks, since the ledger is replicated, shared, and synchronized across a number of nodes, failure of one or more node or component of the network does not cause the failure of the entire blockchain system. All parties have visibility into the complete record of transactions. Highly distributed public blockchain networks are by fault-tolerant design, though private enterprise blockchain networks consisting of fewer nodes are made fault-tolerant by the quality of their underlying and surrounding infrastructure.
Byzantine Fault Tolerance (BFT) system is used in the blockchain which enables to continue operating even if some of the nodes fail or act maliciously avoiding acting as expected. Over time, to empower the blockchain to work, a few consensus mechanisms have been created as a major aspect of BFT to run a safe and tamper-proof ledger in the absence of any central control. BFT system is maintained in blockchain by the use of consensus algorithms. We will discuss those in detail under security.
The users of blockchain should be able to access the data of transactions at any time, anywhere. Availability in blockchain refers to both system-level and transaction level. Blockchain network runs reliably in system-level even in the event of an attack. At the transaction level, the data can be accessed by authorized users without being unattainable, inconsistent, or corrupted.
However, individual blockchain participants/nodes can suffer downtime if their own node stops functioning. For example, due to a power cut, system crash or loss of connectivity etc. To overcome this blockchain is structured to run simultaneously and redundantly manner preferably on separate systems with separate network connections and in separate locations in order to ensure high availability.
Similar to any other technology implementation, blockchain network is also addressing solutions for the various risks of losing data and how to recover those pertaining to the blockchain applications. The decentralized nature of blockchain technology creates a unique reliance on the other participants of the blockchain network in order to maintain recoverability.
Maintaining several nodes of same blockchain capable to provide recovery of data if one node is tampered or altered. No data is lost or altered maliciously forever. In blockchain technology, it is always possible to recover data successfully. No need to maintain and spend money on backup local databases or in the cloud. Until now no additional disaster recovery methods were needed for the public blockchain network.
The concept of consistency in the context of blockchain as a distributed global ledger refers to the property that all nodes have the same ledger at the same time. The consistency property has raised some controversial debate. Some argue that blockchain systems only provide eventual consistency, which is a weak consistency and other claims that blockchain guarantees strong consistency, not eventual consistency.
When we look into eventual consistency, it makes sure that data of each entry at each node of the system gets consistent eventually, and thus achieves high availability and low latency at the risk of returning data. With eventual consistency, time taken by the nodes of the system to get consistent may not be defined. Within a blockchain network system, the strong consistency model means that all nodes have the same ledger at the same time, and during the time when the distributed ledger is being updated with data of new transactions.
The whole concept of freedom in blockchain from third-party validations is based on verification of each and every transaction by mining nodes. The average waiting time for a transaction has increased gradually until it became an issue to overcome. Blockchain suffers scalability according to the researchers and reviewers.
If we consider a public network, two main scalability problems arise. Those are the time taken to put a transaction inside a block after mining and time have taken to reach a consensus. Following solutions for scalability of blockchain network have either been or will be implemented. Some important ones are block size, sharding, proof-of-stake (POS), lightning network, and Segwit etc. Increasing block size, parallelizing the transaction mining processes which is called as sharding and segwit which means all the signature data of every transaction will move from the main chain to side chain are the most effective solutions so far.
In a blockchain network, it is impossible to give an accurate numerical performance estimate because it is a system which consists of thousands of machines connected world-widely. From the user’s perspective, we can say that they consider blockchain performance as the speed at which they get the requested service, but actual performance relies on other various points as well.
When we talk about the speed, it takes a considerable amount to mine and validates a transaction. For example, in Ethereum network it takes 15 seconds. So, among many solutions most recommended solution can be identified as configuring the network to allow parallelism whereas public blockchain struggles to partition the network to even make it possible for parallel execution. This mostly suits for the permissioned blockchain networks and block size is also one of the main performance-related parameters of a PoW blockchain such as Bitcoin.
Blockchain is well known for its security measures which are outstanding among other technologies. It includes the best mechanisms as it handles the digital cryptocurrencies and deals with sensitive data. In blockchain each block connected to all the blocks before and after, making it hard to tamper because one should be able to change records in other linked blocks to avoid detection. Apart from that records on a block are secured by cryptography, which includes a private key to transactions that act as a digital signature. SHA256 used as the hashing algorithm for transactions and blocks.
Blockchain’s decentralized and distributed(P2P) manner updates continuously and kept in sync, so it won’t have a single point of failure. To tamper or alter data it would require more than 51% majority of the nodes. Consensus mechanisms are another main concept used in the blockchain it refers to the ability of the nodes within a distributed blockchain network to agree on the true state of the network and on the validity of transactions. Typically, this is achieved by using so-called consensus algorithms.