Crypto Academy Season 3 | Homework post for professor [@stream4u] : Let's Open The Blockchain.

in SteemitCryptoAcademy3 years ago
Today i am writing homework post for Professor @stream4u which is about, "Blockchain". Let's begin :

What is Blockchain and What are the types of Blockchains. Explain in detail the types of Blockchain?


1600px-Bitcoin_Block_Data.svg.png
Source - structure of blockchain

Blockchain is a decentralized ledger to record the transactions after verification and validation in the form of blocks on computers and other hardware devices with high computational power like GPUs known as nodes. So we can simply put it like this, blockchain is a decentralized database which maintains records of transactions on nodes and these nodes are run by miners for which they are rewarded some share of newly mined cryptos.

To simplify it further, we need to understand some terms used above , node refers to hardware devices like computer, GPUs, ASIC etc. Miners are the individuals that own the nodes. Block is a storage unit of information.

Blockchain as the name implies is the chain of blocks. It means that the blocks are linked to each other so as to form a chain. Each block contains transaction details, nonce, time stamp and hash of previous block. Hash is a cryptographic code for the message and the message here is transaction detail. It is through this hash that each block is linked to its previous block to form a chain of blocks.

When a crypto transaction is performed , the transaction details are first verified by miners by solving complex cryptographic mathematical puzzles linked to each transaction with the help of computational power of nodes . Each puzzle has a unique solution and the miner's node that finds the solution first becomes the validator and is rewarded for the same. The transaction after verification is distributed to to all the nodes for Independent verification and storage.

Types of Blockchain.

As of now, we have four types of blockchains and they are, Public blockchains, Private blockchains, hybrid blocchains and
censortium blockchain.

Public blockchain.

Whenever we talk of public blockchain, think of a bitcoin blockchain for easy understanding. I would like to emphasize on three points related to public blockchain and they are , it is decentralised, open source and permissionless. So there is no central authority to control entrance into public blockchain therefore making it more transparent and accountable. Being open source and permissionless , there is no specific permission required from any authority to enter into the mining process . Anyone can set up mining rig and start participating in mining process and earn the rewards. However, this feature poses risk like 51% attack to the blockchain due to combination of self recruited savvy miners. The other issues like low scalability, heavy energy issues, heavy cost of hardware and maintainence charges etc are bitcoin centric demerits of public blockchain.

Private Blockchain

It is a permissioned but decentralized blockchain that aims to enhance the security and scalability issues of the public blockchain . Proper verification of the miners before allowing them to enter into the mining process unlike public blockchain where anyone can enter without any permission into the process. After permission miners act in a decentralized manner like public blockchain . Therefore the sanctity of the blockchain which lies in the decentralization is preserved along with enhanced security and scalability. However, data is kept private to which governing body has access and therefore transparency has to bear the major burnt at the cost of security which is not acceptable to most of the users.

Hybrid blockchain

As the name implies, it is the combination of private and public blockchain. Demerits of private and public blockchain have given rise to this new type of the blockchain to circumvent the shortcomings of both. To enhance security only the users permitted by the governing body have access to the data and miners after proper verification are allowed to enter into the mining process and are kept hidden from other nodes untill they are performing some common transaction. This feature of restricted access raises question on transparency but has enhanced security. To avoid data manipulation, smart contract based verification of data is carried out. In addition, it is betrer than public blockchain in terms of scalability as well.

Censortium blockchain

Censortium or federated blochchain is cotrolled by multiple organisations and is permissioned but decentralised. As no single authority controls the blockchan, so it is decentralised but unlike public blockchain, only permitted nodes can enter into mining process so as to enhance security ( no 51% attack) and speed of transactions. So this type of blockchain has no scalability issue. Being properly regulated, transaction fee as well as energy cost is lower than public blockchains. Although decentralised but not anonymous, it makes potential of abuse as seen in public chain, negligible with federated blockchain.


What are the benefits of blockchain?


Advantages of Blockchain

Security

Blockchain stores data in the form of blocks. Blocks are linked to each other through one way mathematical function known as hash and it is impossible to decode the hash. For each block there is a unique number known as Nonce from which hash is generated . Each transaction is verified before recording and once recorded it cannot be altered. So these feature make blockchain more secure.

Transparency

Blockchain being a decentralized public ledger system , transactions after verification and validation are distributed to all the nodes for independent verification and are accessible to all. Moreover the transactions are non-editable and cannot be deleted once recorded.

P2P Global transaction

As for fund transfer on blockchain is concerned, P2P Global transactions of sizable amount are executed instantly without prior permission from any authority unlike our traditional financial system where global transactions are laborious and time taken for transactions is much more then what is being taken with the help of blockchain. Moreover the transaction fee is much lesser than that in traditional system.

Quality Service

The quality of service delivery by the use of blockchain in any field is undoubtedly superior then currently operating systems. Suppose, blockchain is put to use in e- commerce , quality of service from order booking to delivery would be improved.

Elemination of dependency

With incorporation of blockchain in different sectors like banking , finance , record keeping etc, dependency on the authorities would be reduced because blockchain is publicly accessible to all and you can perform transaction at anytime and anywhere. So the concept of working for banker's hours wouldn't hold true with incorporation of blockchain.


Explain Blockchain Distributed ledger.


Blockchain is a decentralized public or distributed ledger which means that the transaction data is distributed across all the nodes in a system. As mentioned above, verification of a transaction by a node is carried out by solving complex cryptographic puzzles and coming out with a unique solution of each transaction and then the transaction details are sent to all the nodes involved in the system for independent verification. Once the transaction is verified by majority of the nodes, it is automatically updated on all the nodes in system and after updation and storage, the transaction detais are immutable and non-editable.
So distributed ledger refers to a system where there is no central authority to restrict access to transaction data.


What Is Blockchain Double Spending and how Bitcoin handles this problem?


Double spending as the name implies refers to spending one digital token twice by fradulent means like making a double copy which ia possible only in digital tokens, erasing data of spent transaction, sending multiple copies and reversing the transaction.Examples of double spending are race attack, finney, sybil attack, vector76 attak, 51% attack etc.

Bitcoin handling measure

The neasures that Bitcoin took to prevent double spending are :

The consensus algorithm (PoW) that is in place in Bitcoin is itself a barrier of double spending because it requies computational power to solve the cryptofeaphic puzzles to validate the transaction. For double spending, hacker must have conteol over the blockchain and that is possible only by having more than 51% of the computational power . It is not possible for an individual to have that much of computational power but may be done by group of miscreants or institutions putting their computatiobal power together. Along with this verification mechanism, the transactions being broadcasted publicly on the decentralized ledger technology in the forms of blocks holding time stamps for independent verification by multiple nodes is also potentiating factor to avoid double spending. Let's not forget the role of hash which is a unique one way mathematical algorithm and any alteration in input results in altogether different hash resulting in rejection of transactions.


How Blocks Hashes Work in Blockchain, what will happen when any middle of the block gets changed, try to give screenshot for each possible details.


Working of block hashes.

Let's go to Blockchain demo and we got to see below interface :

IMG_20210803_223510.jpgn

Navigate to blockchain section and we see

IMG_20210803_223605.jpg

In the above screenshot, we can see that each block has a block number, data, hash of previous block and hash of that block. Let's look at above example, where we have blockchain with four blocks #1 , #2 , #3 amd #4.

IMG_20210803_225043.jpg

Let's see each of these blocks , block 1 has previous hash as 00000 because it is genesis block or originator block. So there is no previous block hash in it.

Block 2 has previous hash as

IMG_20210803_225147.jpg

000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf
In screenshot above, we see that in block 2 , it has previous hash and we can see that hash is the hash of block 1

And its own hash is

000012fa9b916eb9078f8d98a7864e697ae83ed54f5146bd84452cdafd043c19

Amd we can see that this hash can be seen in block 3 as prev hash. And this process continues. This is how blocks are linked to each other in a blockchain.


Change in blocks

Let's bring some change in blocks and see what happens. Let's enter some data into blcoks . For example, 1 BTC

Now the hash of block 1 becomes

00008d560be1d1d198659229e21209bff43c144a42722a8b314dbf4fe6f663fa

Earliee hash of block 1 was

000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf

Same holds true for block 2 , 3 and 4 also.

IMG_20210803_230957.jpg
We saw that with any change in data, all the blocks in the blockchain got altered.


Let's try to make any change in the Nonce amd see the results. Before changing, nonce of block 1 was 11361 and the hash was
IMG_20210803_232235.jpg

00008d560be1d1d198659229e21209bff43c144a42722a8b314dbf4fe6f663fa

Now let me make a slight chnage in noce from 11361 to 11362 and hash changed to

IMG_20210803_232300.jpg

bf8bc58b62cc5fc1ab94d0cf37a14c68ac92d485113cc92a14d03dcc6f009a30

It is an invalid hash as hash doesn't start with zeros. After multiple attempts, i couldn't find a right hash. Only after hitting mine, i could find the right nonce and hash back.

So by the above cited examples, we were able to understand how blocks are linked to each other and how any minor change in the data within the block results in change of the blocks throughout the whole blockchain.


What Is Race Attack in blockchain? OR What Is Finney Attack in blockchain? OR What Is Vector76 Attack in blockchain?


Vector76 attack

It is an attempt carried out by a dishonest savvy miner in which miner sends two transactions from two different nodes. Of the two nodes, one node is connected to the other peers involved in the mining process and other is connected to the excchange. Also, remeber, two transactions of different amounts are made, one is high valued and other is low valued. Miner pre mines high valued transaction to the exchange so that block is annoumced and on confirmation he than quickly sends the low valued transaction to the blockchain which than rejects the high valued transaction and attacker takes advantage of partially confirmed hugh valued transaction . So it is an attack to double spend the transaction. This type of attack is aimed at exchanges more than individuals but is not common.


Limitations/disadvantages of Blockchain.


Non repudiable nature.

Blockchain being a decentralised system , the transactions carried on the blockchain once successful cannot be reversed and so the transaction if made to any wrong address can not be reversed as there is no scope for negotiation because the transactions are carried in P2P manner and there is no centralised authority to whom complaint can be made for negotiation.

High Cost

In case of bitcoin blockchain, hardware device in use and the cost of energy consumed by the devices is very high. In addition the maintenance charges of the hardware devices also mounts to a significant amount.

Anonymity

The anonymous nature of transactions has unfolded its dark side. With the use of financial transactions for illegal purposes like drugs , child abuse, arms and ammunition trade etc . This issue has come to limelight by silk road scam that took place in case of Bitcoin . Possibility of other Crypto coins that run on blockchain for such purposes always exist.

Miner consolidation.

This issue of miner consolidation is BTC centric like other issues such as high energy consumption, high energy cost, environmental hazards ( ourdoor and indoor) . Miner consolidation in case of BTC refers to migration of miners to certain areas in search of favourable conditions for mining like low energy cost, evasion of regulatory checks and balances, favourable temperature etc These areas act as leech for energy and deplete energy and pollute environment in these areas as well.


Conclusion(Overall understanding of Blockchain.).


Blockchain is decentralised public ledger system that maintains the Crypto coin transactions in the form of blocks on nodes run by miners. The blocks are linked to each other via one way mathematical algorithms known as hash. Because of complex cryptofrpahic functions, blockchain is highly secure. In addition, it is also known for its transparency, accountability, auditability and anonymity. As nothing is absolute, so Is not blockchain as mentioned in disadvantages above. However, if blockchain technology is used in more fields of daily usage, it is surely going to turn the table.


Thanks

Sort:  

Hi @drqamu

Thank you for joining The Steemit Crypto Academy Courses and participated in the Homework Task.

Review Visit Level
Task Remark
Comment
Guidance, Feedback, Suggestions
Verification (Done, Hold)
Total Grade
First
Completed
The Presentation of the Task is Good. Mentioned information has some good Content. All topics were explained very well.
In Blockchain Practical + Theory, you explain Blockchain well and screenshots are provided also good. However, the information is not cleared for how Block Hash works, and also the explanation is not cleared for what if any middle of the block gets changed? Practically you tried well but what did we understand from this Practical, that theory information need to be more clear with the correct explanation. The rest of the task is good.
Done
8/10

Total | 8/10

Your Homework Task verification has been done by @Stream4u, hope you have enjoyed and learned something new.

Thank You.
@stream4u
Crypto Professors : Steemit Crypto Academy

#affable

 3 years ago 

Thank you for your valuable feedback.

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.029
BTC 59269.62
ETH 3112.63
USDT 1.00
SBD 2.41