Block Chain
What is Block Chain?
Blockchain is a chain of block that contains information. It is a record-keeping and contract-enforcement technology that uses cryptography to make it extremely difficult to change previous history. It allows participants to share workstreams by tracking changes on a distributed ledger.
Just like an accounting ledger, the distributed ledger is a history of transactions. Each transaction in the ledger affects the final state.
What is a block?
A block is a cluster of data within the blockchain that store transaction information. The number of transcations in a block is usually time-based.
Each block contains:
- Some data
- The hash of the block
- The hash of the previous block
The hash of the block identify the block and all of its content. The hash is unique. The hash of the previous block is used to chain the block to the previous block.
How does blockchain work?
It consists of peers connected in a distributed network where each peer has a copy of the ledger.
Data in a blockchain represents state. Blockchain uses transactions to change the state of the data from one value to another. The current state of the ledger is the transactions applied in order.
Blockchain sends the transaction throughout the blockchain network. Each node gets a copy of the transaciton and uses a consensus mechanism to validate the data before processing the transaction. As part of consensus, a group of transactions is validated as a block and the network must agree if the block should be included in the blockchain.
Consensus mechanism is used to ensure data is consistent across nodes. This is to prevent participant from modifying the history. Consensus enables consistency and trust for the distributed ledger.
There are several blockchain consensus algorithms including proof of work, proof of stake, and proof of authority. Each consensus solves consistency in a different way. Consensus provides a way for the distributed ledger to come to a common state.
A decentralized application (DApp) is an application on a distributed computing system. DApps are called smart contracts. A smart contract contains logic that is executed as part of a transaction. Smart contracts are deployed to the blockchain and are referenced by an address. When a transaction is excuted, smart contract logic will update the state data. The blockchain network sends the transaction to all nodes. The smart contract logic executes at each node.
Types of blockchain
- Public blockchain - No central authority. Examples: Bitcoin blockchain, Ethereum blockchain.
- Private blockchain - Controlled by one authority.
- Consortium - Controlled by a group.
- Hybrid - Controlled by one autority with some permissionless processes
Both private and public blockchains have drawbacks. Public blockchains tend to have longer validation times for new data than private blockchains, and private blockchains are more vulnerabke to fraud and bad actors.
Blockchain Protocol
- Bitcoin blockchain
The Bitcoin blockchain netowork was created for Bitcoin cryptocurrency. The primary function of the Bitcoin blockchain network is to store Bitcoin value. Value can be transferred from one to another in a trustless way.
- Ethereum blockchain
Ethereum is a general use protocol. Ethereum extends what Bitcoin had created to provide a protocol that would allow small programs to be written, as well as simple value transfers.
Disadvantages of block chain technology:
Blockchain technology is going to change the world around us. However, to understand what it has to offer, we need to understand its disadvantages as well.
-
Redundancy
Having every network member (node) record every transaction is costly. It can lead to storage problem.
-
Efficiency
If the size of the blockchain grows with more transactions and nodes, then the whole network will be slowed down. This is not ideal for businesses where it is essential for the network to be fast and secure at the same time.
-
Scalability
Blockchains are not scalable. The more nodes join the networks, the chances of slowing down is more. This is because all nodes record all transactions will have its common ledger grow exponentially faster than network nodes.
-
Regulation
In heavily regulated industries that require interpretation, blockchain could be difficult to effectively apply. It’s difficult to comply with all rules and often can’t be easily tailored to existing regulatory infrastructure.
-
Irreversibility
In many cases, reversibility is desirable. If an organization utilizes a digital platform that runs on blockchain technology, then the user of the organization will be unable to remove a wrong record such as wrong account or inventory item code from the system if the record should not be stored in the system.
-
Security
The DAO (Decentralized Autonomous Organization) - a programme built on the Ethereum Blockchain platform was breahed in a case that resulted in $50 million worth of Ether being stolen. The attack proved that Blockchain technology is not flawless.
-
Cost of implementation
The underlying cost of implementing blockchain technology is huge. There are costs associated with hiring developers, managing a team that excels at different aspects of blockchain technology, licensing costs if you opt for a paid blockchain solution.