Blockchain

Networks: Centralized, Decentralized and Distributed

Centralized network focuses on a single point, which is the single point of failure. When the single node fails, the whole network fails. Decentralized network eliminates risk caused by multiplying the single point. The network is governed by multiple nodes. Unlike decentralized network, each node has the equal access in a distributed network. For example, blockchain or defined as a digital record of transactions (nodes/ connected computers). Each node has a copy of all transactions. Blocks are chained and sealed by cryptography, producing distributed ledger of transactions. Transactions are validated by all participant nodes (miners) before written into the block. Network formed is highly secured, traceable, tamper-proof and scalable. With more blocks, the probability for blocks to be tampered decreases

Structure of Block

Bitcoin was first proposed with the idea of blockchain. Each block of Bitcoin comprises of block header and block identifiers. Header consists of metadata, such as previous block hash, Merkle root and nonce. Block identifiers consists of transactions. Mining involves the computation of hashing for potential blocks to produce a nonce value. Nonce value is changeable by hashing. Hashing functions are required to create Proof of Work (PoW). Bitcoin uses SHA-256 algorithm for hashing. Merkle root is computed from the hashes of all transaction hashes of a block. Merkle tree or hash tree is used to handle and effectively verify the high volume of data. It also detects and checks the inconsistencies of data.

Consistency, Availability and Partition tolerance (CAP) Thereom is implemented in blockchain. CAP theorem characterizes the transactions of the distributed system by fitting system into any two of the criteria. Consistency ensures each node is updated with the latest ledger. Furthermore, availability ensures availability of data to be requested. As for partition tolerance, partial failure nodes do not interfere the operational status of system.

Here are some advantages of blockchain:

Consensus Mechanism

Blockchain applies consensus algorithm to validate and create new blocks. The method is also known as distributed consensus. The created block will be verified and added. Only a single blockchain will be chosen as the correct chain.

Consensus algorithms implemented are as below: