Understanding Blockchain

in SteemitCryptoAcademy3 years ago (edited)

What is Blockchain and What are the types of Blockchains

Blockchain is made up of digital records(blocks) that stores and secures data. In other words, blockchain are made up of blocks(digital records) that are interconnected with each other, hence, once a data is stored it can not be changed, thus, data are secured.

Blockchain works like this, for instance, first block is A, it is stored. Second block will be A+B=AB, so second block is stored as AB. Third block will be AB+C=ABC, so third block is stored as ABC and it goes on and one. From that illustration above, you can clearly see that blocks are interconnected and it is quite impossible to change blocks, except you are ready to go to the beginning of the first block, and begin the changes, which is almost impossible.

There are some important components that enables the blockchain to function properly, and they are; hash, nodes, blocks and miners. Hash helps to interconnect blocks, in such a manner that they can be altered, hence, hash ensures that data are stored securely. Nodes are computers that hosts, mines and validates blocks in a blockchain. Nodes, ensures the functionality of a blockchain, without nodes, miners won't be updated of the new block, hence, there will be glitch in the blockchain. Blocks are digital data or records that are stored in the blockchain. The digital data stored are transactions that has taken place within the blockchain, and it will be added to the existing blocks when validated by miners, hence, stored and cannot be changed again. Miners are people who are charged with the responsibilities of running the nodes and validating blocks and are rewarded for their efforts with the blockchain native tokens.


What Are The Types Of Blockchains


There are 4 types of Blockchains which are;

  • Public Blockchain
  • Private Blockchain
  • Hybrid Blockchain
  • Consortium Blockchain

Public Blockchain: This is the most common and used blockchain. It has no restriction, any one who has internet connection can have access to this blockchain. Public blockchain is known for it's transparency, that's why it is mostly used for electoral voting by countries/states or for keeping records for healthcare establishments. Bitcoin, Ethereum, Litecoin, and others use Public Blockchains.

Advantages

  • It is a very transparent, as blocks/transaction are open for everyone to see.
  • It is highly secured, data(transactions) can not be altered, as it uses one way encryption.
  • It is highly decentralized, as no central authority is present and no one has a say to how the blockchain is run.

Disadvantages

  • It is not highly scalable, as a result of it been public, more and more people are free to have connected nodes, which will make transaction lower.
  • It is requires high cost for maintenance and mining, as the computers are very expensive and it requires lots of electricity power and cooling power.
  • It can be hacked, because it is open to the entire public, malicious hackers can easily gain access to the blockchain.

p1.jpg

Source


Private Blockchain: This blockchain has some restrictions, only some selected few can have access to the nodes of the blockchain. It is highly centralized, that's why it is mostly used by small organizations such as banks, schools, private companies, and lots more.

Advantages

  • It is highly scalable, as it has limited accessibility, hence, the transaction speed is very high.
  • It is more secured than public blockchain, as it is not open to the general public, hence, it becomes more difficult for malicious hacker to gain access to the blockchain.

Disadvantages

  • It is not transparent, as transaction are not open for the general public to see.
  • Limited access, as only selected few are able to gain access to the blockchain.
  • It is highly centralized, as there is a presence of a central authority.

p2.jpg

Source


Hybrid Blockchain: This blockchain combines some key features from both the Private blockchains and Public blockchains. There exist some limitation to the access of the nodes of the blockchain, as selected members can decide on such transaction should be made public or private. In some extent, it is transparent, as members may be decide if some transactions should be made public or not. Members don't have ability to alter transactions. It is mostly used by supply chain logistics companies and also Ripples(XRP) operates Hybrid blockchain.

Advantages

  • It is highly scalable, as it is not open to the general public, hence, the transaction speed is very high.
  • It is requires low cost for maintenance and mining as compared to the public blockchain which is quite expensive to maintain and perform mining operations.
  • Data are highly secured, as it is not as accessible as the public blockchain which is open to all.

Disadvantages

  • There's still some level of centralization, as there is a presence of a centralized system of operation.
  • There's no complete transparency, as some information are made public and some are not made public for all to see.

p3.jpg

Source

Consortium Blockchain: This is a type of blockchain which is not given to just a single organization but rather to a group of organizations. It combines the features of both public blockchains and private blockchains. For instance, a bank can't be granted this blockchain, but a group of banks can be granted access to this blockchain. So, this blockchain requires multiple organizations to govern or operate it. It is also known as Federated blockchain. It is currently been used by Corda, Hyperledger and Quorum

Advantages

  • It is highly scalable, as only a few selected organizations have access to the blockchain, hence, transaction speed is very high.
  • It is ensures accountability, as the central authority only grants limited organizations, hence, each organization are held accountable for their activities.

Disadvantages

  • It is centralized, as there's the presence of a central authority, who have a say on how the blockchain is run.
  • It can be hacked, hence, less secured, as more than one organization is granted access to the blockchain.
  • There's no complete transparency, as not all information are disclosed to the general public to see.

Consortium-blockchain-network-architecture-model.png

Source


What are the benefits of blockchain


There are so many benefits of blockchain as it has really been useful to a lot things in today's world. I will listing and explaining my top 4 benefits of blockchain, which are;


  • Transaction Cost and Speed
  • Security of Funds
  • Immutability
  • Smart Contracts

Transaction Cost And Speed: The introduction of blockchain technology has helped in reducing the cost of transaction and enhancing the speed of transactions. Before the adoption of blockchain technology, our only means of transfer of funds within and outside our country was through the bank. The cost of transferring money from one country to another is quite expensive. In my country, if you want to transfer, let's say $100 to another country, you may accrue a transaction cost of over $25 and it might take two days before the person I'm sending the money to might receive the money.

Whereas blockchain technology, such as Steem blockchain, I can transfer over $1,000 and I won't pay a penny and it will arrive at it's destination account in less than 3 minutes. This is one of the many benefits of blockchain.


Security of Funds: Blockchain technology has ensured a better security for our funds. For me, I barely save my money in banks any more, because they are cases when your funds are withdrawn and no one is held responsible, as the bank might blame you for disclosing sensitive account information, but in truth you didn't. You have no authority or control of funds at all. A law is in place in Nigeria, that any account found dealing cryptocurrency with be banned. Imagine you have over $10,000 and your account is flagged, it simply means, your $10,000 has been taken from you.

With the introduction of blockchain technology comes the invention of digital crypto wallets, which are safer than our conventional banks, as you have total control over your funds.


Immutability: With the introduction of blockchain technology, accountability has increased greatly because data are immutable i.e data can not be altered. This is a very good and great way for organizations to keep a proper check and balance of their employees. Accountants and Auditors can no long window dress financial statements because data can not altered as soon as they have been validated by miners of a blockchain. For example, an article I wrote 2 years ago, will still be same till this very day. If I should edit, it saves a new block but the 2 years ago block is still there and haven't been altered. If you used a Steem explorer, you will be able to get the exact words you wrote. I feel the police department should adopt blockchain, so that records can not be changed to anyone's favor, as records are immutable. This is yet another amazing benefit of Blockchain technology.


Smart Contracts: The introduction of blockchain saw the creation of smart contracts which has been more than helpful in today's world. Smart contracts, ensures a transactions takes place automatically as soon as some conditions have been met, hence, no need for third parties anymore. Smart contracts, has encouraged DeFi system to expand more easily. Smart contracts is one of the biggest benefits of blockchain technology.


Explain Blockchain Distributed ledger.


Blockchain distributed ledger is a database that helps record data, share data and synchronize data across several nodes. Data recorded are immutable as they have been signed cryptographically i.e hashed. How is it possible? The reason is that, when a transaction takes place, it generates a hash, and once another new transaction takes place, the hash of the previous transaction is included in the new transaction, thereby chaining transactions after transactions, hence, it becomes impossible to change one transaction because it has hash of previous transactions, hence, data becomes immutable.

There are some notable features of Blockchain distributed ledger, which are ;

  • There is high level of transparency as data is available to all members and once there's a change, it can seen by all.

  • There's no need for KYC (Know Your Customer), hence, privacy of users are adequately maintained.

  • Data are highly secured as they are hashed, hence, they become immutable.

  • It is highly decentralized as there is no central authority controlling the activities of authorizing and validating transactions.


1_gbTYMdWlpqzru6NWAfgMFA.png

Source

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


Blockchain double spending occurs when a user manipulates the blockchain system to his/her favor, hereby making two transactions or more from the same amount. What this means, is that, a user can manipulate the system to the extent where he makes two or more transactions but is charged just once.

For instance, a blockchain double spending will occur when I send about 30 steem to @stream4u and before the transaction is validated and I get deducted of the 30 steem, I copied the transaction ID and manipulate it, and then send 30 steem to another username. So, I used 30 steem and made 2 transactions worth 30 steem each. And once the miners notice this, one of the transaction will validated and the other would be regarded as fake, hence, they will cancel 30 steem transaction, which means, one of the two users, I sent the steem to, will suffer the loss.


paid_digital_form.jpg

Source


There are 3 various types of blockchain double spending, and they include;

  • Race Attack
  • Finney Attack
  • Vector 76 Attack

Race Attack: This is a type of blockchain double spending where a hacker carries out multiple transactions using the same amount. The hacker races against time making multiple transactions before the transaction is validated by miners. This kind of transactions occurs in P2P, where the recipient accepts the transaction without waiting for validation from the miners.


Finney Attack: This is another type of blockchain double spending which occurs when a miner of a blockchain creates a fake transaction from the transaction details of a given block. The user will fall victim to this double spending because he/she is actually seeing proof of the transaction been made but didn't wait to confirm if such transaction has been validated and confirmed by miners.


Vector 76 Attack: This is another type of blockchain double spending where hackers take advantage of a blockchain by sending fake cryptocurrency to users for payment through the Vector 76 attack software. After sometime, when the miners will have to validate transactions, they will regard those transactions as fake, and such cryptocurrency will automatically disappear from the users wallet, hence, the users will incur loss, as they have paid for the crypto but were scammed of it.


How Bitcoin Handles This Problem?

Bitcoin blockchain handles this problem through the validation and confirmation of transactions by miners. Once a transaction has been validated and confirmed by miners only then can it be added as a block in the blockchain distributed ledger. So users have to be patient to know if their transaction has been validated and confirmed by miners before making payment to the sender of the BTC coins. Because once a transaction has been validated and confirmed by miners and added to the distributed ledger, it can not be changed or altered, hence, as a user/recipient you are assured that the transaction is real and not a blockchain double spending attack.


Practical + Theory


I will explain how Block Hashes works in blockchain visually, by visiting a Blockchain Demo site. Below is the image of the blockchain section of the site.


1.2.jpg


From the image above, you notice some features of the page, such Block, Nonce, Data, Prev and Hash. The standout features for us are Prev and Hash.

Take a look at Block 1, you will notice the Prev is just 0000... and the Hash is unique. Now, look at Block 2, you will notice that the Prev is the unique Hash of Block 1, and it produces a new Hash. Meaning Block 2 took note of Block 1 hash.

To prove this even further, here is a screenshot of Block 3 and Block 4 below. You will notice that the Prev of Block 3 will be the Hash of Block 2, and the Prev of Block 4, will be the Hash of Block 3. And that's how it comes on and on.


2.1.jpg


This is why blockchain data are mostly immutable, because each block takes note of the previous block hash, to create a new Hash.


Adding Data


You will notice that the previous screenshots had no data stored. But as soon as you add data, the blockchain will have to generate a new hash for that data. Let's take for instance, I add Menoski to the data section of Block 1, let's see what will happen.


3.1.jpg


The Hash remained the same, right? But the background of the page changed from Green to Red, meaning something is wrong. But what exactly?

What is wrong, is that, the hash that exists for Block 1, was an empty data, and since new data has been added, there's need to mine, in order to generate a new hash that suits the new data that has been added. Let's take for instance, I click on Mine, let's see what will happen.


4.1.jpg


A new Hash was generated and the background color for Block 1 changed to green, meaning, everything is okay with Block 1. But why is Block 2, still red? This is because, as soon as you add a new data, the hash of that block changes, hence, the Prev of the next block won't be same with Hash of the current Block. So, you must have to Mine, all the blocks afterwards, so that, the Prev hash, matches the Hash of the previous block.


5.1.jpg


6.1.jpg



What will happen when any middle of the block gets changed


What if any middle block gets changed, what I will happen? Alright, let's add data to Block 3, that is right in the middle, between Block 1 - 2 and Block 4 - 5. By adding data to Block 3, that's a change, because the Data section was empty before. Let's a add Stream4u and see what happens.


7.1.jpg


From the image, above, you will notice that from Block 3 - 5, the background color changed to Red, meaning something is wrong. While from Block 2 to Block 1, background color remained Green, meaning everything is okay, but why?

It is quite simple, the Prev on Block 3 won't be affected but the Hash for block 3 will have to change because a new data has been added. So, if the new data is added, the Hash of Block 3 will change, the Prev of Block 4 and Block 5 will also need to change, because the Prev of Block 4 will have to be updated to the new Hash of Block 3 and the Prev of Block 5 will also have to change to the new Hash of Block 4. Block 1 and 2 remain unaffected, because both their Prev and Hash won't be affected.


8.1.jpg


So, I will have to mine Block 3, 4 and 5 for everything to be okay and functioning properly. You can clearly see why Blockchain data are almost impossible to be altered. Because if you want to change any Data from the past, you will have to start mining(change) all the Hashes after that the Block you altered, which is almost an impossible task.


I hope you now fully comprehend how Block hashes works in Blockchain and what will happen when any middle of the block gets changed.


Limitations/disadvantages of Blockchain.


Although blockchain has brought so many new amazing benefits to the world, it still has some limitations. Below are my top 4 limitations of Blockchain and they are;

  • Immutability
  • High Cost Of Maintenance
  • Scalability
  • Environmental Impact

Immutability: Immutability has it owns benefits but also has it owns demerits. What if there is an honest need to change details of a transaction, it becomes impossible, which shouldn't be, because we humans are not all perfect all the time, there could be an honest mistake that needs to be changed but can't because of the immutability nature of blockchain.


High Cost Involved: The cost of setting up for miners is quite expensive as the cost of acquiring the computers and power supply needed is very high.


Scalability: Since the public is free to join and have there various connected nodes, the scalability is greatly affected as there would be congestion, which will result to transaction speed been affected negatively and increase in transaction fees.


Environmental Impact: This is one of the major limitation to blockchain, because blockchain requires a huge amount of computer power, which will definitely require a lot of electrical power and cooling power, which would have negative effect to our environment.


Conclusion

The introduction of blockchain technology has impacted the world positively, as we can now be able to make transactions quicker and cheaper, store our funds more securely and have more transparent transactions. Almost everyday, over 50% of the world population makes use of blockchain technology and it's only just the beginning because I know, blockchain is the future.

Sort:  

Hi @menoski

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
All topics explained very well. The Presentation of the Task is good. Mentioned information has a Quality Content. Blockchain Practical and explanation done very well.
Looks Fine.
Done
10/10

Total | 10/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

Thanks for your wonderful review @stream4u

Your post was upvoted and resteemed on @crypto.defrag