- What is Blockchain technology
- Popular Blockchain based projects
- Blockchain Architecture/How Blockchain transaction works
- Block structure
- Block hash
- Block Security
- Proof of Work
- Distributed P2P Network
- Communicating with other nodes
- Client-Server Network Vs Peer-to-Peer Network
- Why do we need BlockChain
- BlockChain Versions
- Real-Life use case of Blockchain
- BlockChain Variants
- What is Mining in BlockChain
What is Blockchain technology
Blockchain can be defined as a chain of the block that contains some information. This technique is intended to timestamp digital documents (Ex.s: land records, stock market shareholding, car resale etc. ) so that it’s not possible to backdate them or temper them.
It is nothing but a distributed database that maintains a continuously growing list of ordered records.
The term “blockchain” is usually strongly tied to concepts like transactions, smart contracts or ryptocurrencies.
The blockchain is used for the secure transfer of items like money, property, contracts, etc. without requiring a third-party intermediary like bank or government. Once a data is recorded inside a blockchain, it is very difficult to change it.
The blockchain is a software protocol (like SMTP is for email). Blockchains could not be run without the Internet. It is also called meta-technology as it affects other technologies. It is comprised of several pieces: a database, software application, some connected computers, etc.
What Blockchain is not
Blockchain is not Bitcoin, but it is the technology behind Bitcoin
Bitcoin is the digital token and blockchain is the ledger to keep track of who owns the digital tokens
You can’t have Bitcoin without blockchain, but you can have blockchain without Bitcoin.
Popular Blockchain based projects
Blockchain Architecture/How Blockchain transaction works
The first logical step is to decide the block structure. To keep things as simple as possible we include only the most necessary:
- hash and
- previous hash
Note: The hash of the previous block must be found in the block to preserve the chain integrity
Eg: A Bitcoin Block contains information about the Sender, Receiver, Number of Bitcoins to be transferred.
The block needs to be hashed to keep the integrity of the data. A SHA-256 is taken over the content of the block.
Understanding SHA256 – Hash
A block also has a hash. It can be understood as a fingerprint which is unique to each block. It identifies a block and all of its contents, and it’s always unique, just like a person’s fingerprint. So once a block is created, any change inside the block will cause the hash to change.
Let’s consider a chain of 3 blocks. The 1st block has no predecessor. Hence, it does not contain the previous block. Block 2 contains a hash of block 1, while block 3 contains the Hash of block 2.
Hence, all blocks are containing hashes of previous blocks. This is the technique that makes a blockchain so secure. Let’s see how it works:
Assume an attacker is able to change the data present in the Block 2. Correspondingly, the Hash of the Block also changes. But, Block 3 still contains the old Hash of the Block 2. This makes Block 3, and all succeeding blocks invalid as they do not have correct hash the previous block.
Proof of Work
Hashes are an excellent mechanism to prevent tempering but computers these days are high-speed and can calculate hundreds of thousands of hashes per second. In a matter of few minutes, an attacker can tamper with a block, and then recalculate all the hashes of other blocks to make the blockchain valid again.
To avoid the issue, blockchains use the concept of Proof-of-Work. It is a mechanism which slows down the creation of the new blocks.
A proof-of-work is a computational problem that takes certain to effort to solve. But the time required to verify the results of the computational problem is very less compared to the effort it takes to solve the computational problem itself.
In case of Bitcoin, it takes almost 10 minutes to calculate the required proof-of-work to add a new block to the chain. Considering our example, if a hacker would to change data in Block 2, he would need to perform proof of work (which would take 10 minutes) and only then make changes in Block 3 and all the succeeding blocks.
This kind of mechanism makes it quite tough to tamper with the blocks so even if you tamper with even a single block, you will need to recalculate the proof-of-work for all the following blocks. Thus, hashing and proof-of-work mechanism make a blockchain secure.
Distributed P2P Network
However, there is one more method which is used by Blockchains to secure themselves, and that’s by being distributed. Instead of using a central entity to manage the chain, Blockchains use a distributed peer-peer network, and everyone is allowed to join. When someone enters this network, he will get the full copy of the blockchain. Each computer is called a node:
Let’s see what happens when any user creates a new block. This new block is sent to all the users on the network. Each node needs to verify the block to make sure that it hasn’t been altered. After complete checking, each node adds this block to their blockchain.
All these nodes in this network create a consensus. They agree about what blocks are valid and which are not. Nodes in the network will reject blocks that are tampered with.
Communicating with other nodes
An essential part of a node is to share and sync the blockchain with other nodes. The following rules are used to keep the network in sync:
When a node generates a new block, it broadcasts it to the network
When a node connects to a new peer it querys for the latest block
When a node encounters a block that has an index larger than the current known block, it either adds the block the its current chain or querys for the full blockchain.
Client-Server Network Vs Peer-to-Peer Network
Note: Let’s assume the server as a Bank’s Application / Database Server and the clients as ATM Machines, Bank branches, and client’s Web Browsers
Note: Remembers that Server sends the response data to the client only when a client sends a request.
Note: Here each machine is called as a Node/Peer. Each node has equal priority. Any node can be connected to any other node in the network (but not necessarily to all the other nodes).
Why do we need BlockChain
The following are the important reasons why BlockChain technology has become so popular
- Resilience: Blockchains is often replicated architecture. The chain is still operated by most nodes in the event of a massive attack against the system.
- Time reduction: In the financial industry, blockchain can play a vital role by allowing the quicker settlement of trades as it does not need a lengthy process of verification, settlement, and clearance because a single version of agreed-upon data of the share ledger is available between all stake holders.
- Reliability: Blockchain certifies and verifies the identities of the interested parties. This removes double records, reducing rates and accelerates transactions.
- Unchangeable transactions: By registering transactions in chronological order, Blockchain certifies the unalterability, of all operations which means when any new block has been added to the chain of ledgers, it cannot be removed or modified.
- Fraud prevention: The concepts of shared information and consensus prevent possible losses due to fraud or embezzlement. In logistics-based industries, blockchain as a monitoring mechanism act to reduce costs.
- Security: Attacking a traditional database is the bringing down of a specific target. With the help of Distributed Ledger Technology, each party holds a copy of the original chain, so the system remains operative, even the large number of other nodes fall.
- Transparency: Changes to public blockchains are publicly viewable to everyone. This offers greater transparency, and all transactions are immutable.
- Collaboration: Allows parties to transact directly with each other without the need for mediating third parties.
- Decentralized: There are standards rules on how every node exchanges the blockchain information. This method ensures that all transactions are validated, and all valid transactions are added one by one.
Blockchain 1.0: CryptoCurrency
The implementation of DLT (distributed ledger technology) led to its first and obvious application: cryptocurrencies. This allows financial transactions based on blockchain technology. It is used in currency and payments. Bitcoin is the most prominent example in this segment.
Blockchain 2.0: Smart Contracts
The new key concepts are Smart Contracts, small computer programs that "live" in the blockchain. They are free computer programs that execute automatically, and check conditions defined earlier like facilitation, verification or enforcement. It is used as a replacement for traditional contracts.
Blockchain 3.0: DApps
DApps is an abbreviation of decentralized application. It has their backend code running on a decentralized peer-to-peer network. A DApp can have frontend code and user interfaces written in any language that can make a call to its backend, like a traditional Apps.
Real-Life use case of Blockchain
Blockchain for Humanitarian Aid:
In January 2017 the united nations world food program started a project called humanitarian aid. The project was developed in rural areas of the Sindh region of Pakistan. By using the Blockchain technology, beneficiaries received money, food and all type of transactions are registered on a blockchain to ensure security and transparency of this process.
In this type of blockchains, ledgers are visible to everyone on the internet. It allows anyone to verify and add a block of transactions to the blockchain. Public networks have incentives for people to join and free for use. Anyone can use a public blockchain network.
The private blockchain is within a single organization. It allows only specific people of the organization to verify and add transaction blocks. However, everyone on the internet is generally allowed to view.
What is Mining in BlockChain
Mining: Mining is the process of confirming transactions and adding them to a public ledger. To add a transaction to the ledger, the “miner” must solve an increasingly-complex computational problem (like a mathematical puzzle). Mining is open source so that anyone can confirm the transaction. The first “miner” to solve the puzzle adds a “block” of transactions to the ledger. The way in which transactions, blocks, and the public blockchain ledger work together ensure that no one individual can easily add or change a block at will. Once a block is added to the ledger, all correlating transactions are permanent, and they add a small transaction fee to the miner’s wallet (along with newly created coins). The mining process is what gives value to the coins and is known as a proof-of-work system.
---Knowledge acquired from various resources online and our take on this subject