Crypto Academy / Season 3 / Week 6 - Homework Post for [@stream4u] … by @benton3

in SteemitCryptoAcademy4 years ago

Hello my steemian friends, it great to be with you all once more through this medium. I am engaging in another homework task of crypto academy. This time, i will be writing on the homework task of @stream4u who thrilled us on the topic** Let us Open The Blockchain**

purple.png

1. What is Blockchain and What are the types of Blockchains/ Explain in details the type of Blockchain?

What is Blockchain?

Just like the name sounds, these are blocks joined together forming a chain or a kind of rope. It is a system of recording data or information in a manner that every information recorded there can not be hacked, changed nor can the system be cheated in any way.

It is ledger just like we have in normal accounting books, but in this case in digital format containing all transaction and made available to all by distributing it across the entire network of computers on the blockchain.

So from the foregoing, we can deduce that blockchain is a sort of database which stores data in blocks that are chained together.
Every new data coming in forms a new block, once the block is filled up, it is linked to previous block thereby arranging the data in order of first come first serve.

For blockchain to work, three component are involved, there must be

  1. Blocks

  2. Nodes

  3. Miners

we are going to explain the above components and how it relates to blockchain

Blocks

A block can be defined as the unit of transaction. so a blockchain cannot work without a block. these Blocks are files containing the data used within the network. Every new data is recorded in a block and stays there permanently. The blocks are of different sizes depending on the blockchain.

So a block records all or most of the recent transaction, which have not been recorded on any block. Each block is like a page in a ledger or book of record.

Once the block is filled, the block will pass through a process of validation before being linked to the previous blocks, which is the chaining, while another new block starts forming.

To enable the block pass through this process, it requires data, nonces( which is a 32-bit number randomly generated when a new block is formed) and Hash(which is a number in the 256-bit format that usually starts with zeros).

Each blocks nonce and hash are very unique but also contains the previous block hash to consummate the chaining process.

Nodes

A node can be defined as a physical terminal within a network, provided that is is used to send, receive and share information. this node is a computer or any other device which could be connected to a network. Nodes are usually responsible for the reliability and trustworthiness of information stored within the blockchain. It enables users to access information and view all transactions stored within the network. An individual can become a node if he can meet up with the requirements of doing so, since it is capital intensive, but receives income from the transactions going through the network as a reward.

These nodes makes it possible for blockchain to achieve its decentralization too.

MIners

Miners are the ones that validate new blocks before it is added to the chain. They also ensure that the network is secure and immutable. The process of mining taken by this miners is dependent on the network. the mining process could be Proof of work(POW), proof of stake(POS), delegated proof of stake(DPOS), etc. The miners get coins reward after completely mining a block.

Types of Blockchains

We have four types of blockchain. They

● Public blockchains

● Private Blokchain

● Consortium Blockchains

● Hybrid blockchains

Public Blockchain

This is the type of blockchain where all data are distributed across the whole network using p2p protocol. This type totally encourages and supports decentralization and improves transparency. it is an open source network, which allows anyone to serve as node within the network. it usually makes use of proof of work and proof of stake in its consensus method.

Advantages

  1. It is entirely independent of any organisation. so it is fully decentralized. The death of a company that started it would not mean that the blockchain will now cease to exist, rather it continues to run as far as there are nodes connected to it.

  2. It is a very transparent blockchain. Users have access to all files and information, even nodes can identify bugs, propose changes that needs to be made and verify transactions.

  3. The public blockchain is very secure.

Disadvantages

  1. The network is very slow.

  2. Organizations can not restrict access or its use, making it vulnerable to 51% attack. once they get more than 50% percent computational power, they can alter information on the blockchain.

  1. The blockchain is not scalable too. Since many nodes can join the network. The transaction processing time is high.

Private Blockchain

Private blockchain are blockchain that requires an authorization before anyone are allowed access to data or information in the network.

Even though they can be said to be decentralized, it is not entirely so. since only nodes who have been granted access that can can view some data. Hence some information are restricted to users.

This type of blockchain is known as permissioned or enterprise blockchain. Ordinarily, it is run by smaller organizations like a closed network.

Advantages

  1. The company have total control of the blockchain. They set the permission levels, accessibility and autthorization.

  2. It is very secure, hackers can not easily access data within the system.

  3. It is very fast and have high scalability.

Disadvantages

  1. A private blockchain can not be said to be a true blockchain, since it is not truly decentralized.

  2. information from the blockchain cannot be trusted since it operates centralized nodes and the consensus protocol can be compromised.

  3. There is no anonymity in a private blockchain.

Hybrid Blockchain

This type of blockchain have the qualities of both the public blockchain and the private blockchain. It allow companies run a non-permisionless system together with a permissionless ones. This gives them the ability to have control over certain restricted data while the rest are opened to public scrutiny and access if they so desire.

Even though records and transactions are not made public, they can be accessed and verified through a smart contract. We also need to know that no transaction can be altered in a hybrid blockchain.

Advantages

□ The users are anonymous, not known by other users

□ it works in a closed system, thus 51% attack cannot happen.

□ Transaction fees are normally cheap and fast.

□ It has very high scalability than a public blockchain

Disadvanttages

♤ It is not entirely decentralized, thus no transparency.

♤ There is no way of incentivizing users who contribute to the blockchain.

♤ Upgrade in a hybrid blockchain can also be a big challenge since it is capital intensive

Consortium Blockchain

The consortium blockchain is also known ass federated blockchain. it is a private blockchain owned by several entities, limiting access to a group, such that one entity does not control the entire network of the blockchain.

The consensus protocol is determined by preset nodes. it also makes use of validators to start, receive and validate transactions.

Advantages

○ It provides more security than a public blockchain.

○ It is very scalable and more efficient than a public blockchain.

○ It also gives control to the owners, users will require authorization to access some information.

Disadvantages

○ It is not a transparent blockchain, so it can not be said to be fully decentralized.

○ If a node within the blockchain is breached, the network can be compromised.

○ The system of regulation can stall the efficient working of the network

purple.png

2. What are the benefits of blockchain?

There are so many benefits derived from the usage of blockchain. As all of us can see, presently blockchain technology is gradually taking over the day to day affair of the human society and not just to cryptocurrencies.

The benefit are listed and explained below

● Immutability

Blockchain transactions are immutable. Any data entered in a blockchain is forever stuck in the blockchain. It cannot be deleted. This is made possible because no one person serves as a database, such that if he ceases to exist, everything is gone. Rather, there are so many nodes on the network having access to the database. As such it is always available.

● Technological Innovation

Blockchain have been the basis for so many innovations. People can now play games and earn rewards by receiving cryptocurrencies. Financial transactions are made cheaper, faster and more efficient. It has provided other means of investments apart from the traditional ones. People can now be bosses of there own since blockchain provides them with a means to connecting the outside world, thereby expanding there businesses, while advertising their businesses at zero cost. Employees can now sort fort the employment of their choice and avoid being cheated by greedy employers

● Transparency

Information stored in a blockchain is normally transparent and can be verified. There is nothing hidden about all the data in this digital ledger book. This will make it impossible for fraudulent actions to be carried out in parastatals and ensure accountability and responsibility by office holders. Whatever funds spent and how it is spent will definite be verified by all parties concerned.

● Decentralization

One of the major benefits blockchain offers is decentralization of power and authority. There is no central control where all policies comes from. This makes each user to be independent of each other and not having to rely on any central authority for decision making or control.

● Traceability

This is most applicable in a supply chain, where it is most at times difficult to trace goods sometimes leading to theft and loss of goods. However, with blockchain, each party can trace the products sent thereby ensuring it does not get missing or replaced along the way.

● Improved Security

Blockchain transactions are highly secured. All transactions requires validation by the consensus protocol in order to be part of the block. Once this validation is done, it cannot be taken away. It is also good to note that each transaction is encrypted and has a hash linking it to the previous one. Another thing that makes it secure is that each node possesses a copy of whatever transaction that is done on the network.

● Reduced transaction cost.

The use of blockchain comes with reduced cost since there is no third party involved in the transactions done. The presence of third parties leads to increased fees since he needs to be paid. Additionally, since transactions are seamless now, other little charges will cease to exist.

lack.png

3. Explain Blockchain Distributed Ledger

A distributed ledger comprises of database shared and synchronized digitally, spread across so many sites and institutions and are accessible to so many persons. It does not have a central administrator. So this blockchain distributed Ledger is used to store data on the blockchain. All the data stored is shared by as many computers referred to as nodes which are connected to the network.

Like I earlier mentioned, every data is stored in a block, once the block is completed, it will be validated through a consensus protocol as may be used by the network, and added to other previous blocks. Whatever data that is stored in the DLT cannot be changed or deleted once it is validated.

Blockchain DLT creates value to the system, making ownership of assets and specific information like identity, health information, etc possible. It also makes transfer of these value possible through p2p means without any control centre. Distributed Ledger will definitely lead to lower fee charges,improve financial transaction efficiency and creating access to financial services to the unbanked populaation in the world, since everything can be done just through an android phone.

The blockchain distributed ledger is updated online real time and the malfunction8ng of a node does not affect the operation of the network.

So this possesses all the benefits of blockchain.

greenery.png

4. What is blockchain double spending and how bitcoin handles the problem?

Blockchain double simply means a situation that occurs when funds are stolen in the form of cryptocurrency as a result of disruption or attack on the blockchain network. Ordinarily the person stealing the cryptocurrency would send a receipt showing that the transaction have been done trying to make it right or might totally erase the transaction from the system.

So it is the process of making two payments with the cryptocurrency just to deceive the receivers of those funds.

This attack is made possible because an unconfirmed transaction has been accepted by you and thus included in the block. This makes you susceptible to this attack. Another reason why it happens is because digital currencies are very easy to duplicate.

This is very popular among bitcoin transaction since it requires about 10mins for confirmation, verification and validation. This gives the attacker ample time to create another transaction like the first one and work on the block such that the first transaction looks unspent and in the process sending the same asset so many time only to his own benefit.

There are so many types of this attack. They are

Race attack, Finney attack, Vector76 attack and The mighty 51% Attack.

How bitcoin handles the problem?

■ Third party involvement.

The addition of a third party to verify transactions can mitigate the risk of double spending. Even though this is against the etiquette of decentralization, it can reduce the risk to its barest minimum.

■ Effective use of validators.

In this case, validators can confirm a single transaction if there are multiple transactions coming from the same wallet at the same time. That is to say, if a person send two transactions at the same time. The first of the transaction to get six confirmations will be added to the blockchain while the second transaction is discarded. The first now added is immutable and cannot be changed.
With this the hacker cannot go back to six blocks already added to make any alteration, thus failing in his hacking effort. So merchants are advised to wait for at least six confirmations before releasing their goods or confirming receipt of funds.

purple.png

5. Practical + Theory, Visit Blockchain Demo and check section Blockchain, then explain in detail 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.

We need to note that every data in blockchain is encrypted or converted to a machine readable language. This encryption is performed through a mining process and becomes a hash. A hash can be created with any input be it numbers, alphabets, special characters and even media files.
The hash produced from these data inputs are always of the same length. We also need to note that, irrespective of the length of the data, the hash length still remain the same.

We are going to demonstrate that using hash SHA-256 from blockchain demo link.

When you click on the link, it will take you to this page.

Then click on hash, it will take you to SHA-256

This is a simulator that helps us understand how the hash, block and blockchain works. It comes with it owns default hash.

Now let us enter an input and see the hash generated, this time a short input or sentence. We type in Abia is a good state. See what happens below.

We can see the new hash generated on the screenshot.

c6ac8d47bfd490c2dd5a9e707b5a1291c75fb6598feab895106a93954981d36c if you check properly, you will notice that it is still of the fixed length with the default hash.

Now let us input a long sentence or input, to see if the hash will increase in length. Abia is a good state. But unfortunately no constant power, no good drinking water, poor road infrastrature.

Kindly see the resulting hash.

The resulting hash is still of the same fixed length despite having a longer input or sentence.
** d40bddd7686eb7fe02565719aac5e7ffa892874560dfe44756e95de9da3eadf9**

Block hashing in Blockchain.

Now we want to see how the hash generated is applied in blockchain. In this stage, we miners coming into play. Remember that miners does the building of the block, but before that can be done, they need to get the valid hash first before validating the block. So they are really in a race against others to get the correct hash to mine the block first.

On the same blockchain demo, click on blockchain besides hash, the screen for doing so will come up.

When it comes up, it has about five blocks starting with block one., each having a default nonce value. Block 1 have a default(previous) hash of zeros through out, then the new hash to be generated with default encryption. It is good to note that for the hash to work and to create a valid block, it must have to start with zeros.

On block one , type in your data

You can see the hash it generated, but it did not start with zeros, thus making it invalid. Even when the nonce is changed, the hash generated is still not valid.
1e8bab1e844f20a74a1d1de987a4d0b44f2c0e7c7840aa38585dc3cb5a98a8f7

So to be able to get the correct hash, and to hasten the possibility of of validating the block, I clicked on the Mine button below.

It now generated a valid hash as you can see above. 0000c6699592a2f54bd03f083a3a8f7a0ebb732a04d44fa458ed22e88fbd2f17. The nonce also changed and remember it can only be used once.
In the second Block, the hash have now changed to the hash generated in block 1, meaning that it has been accepted and the block accepted and chained to the previous block.

wall.png

6. What Is Vector76 Attack in blockchain?

Vector76 attack occurs when hackers create and include a double spending transaction in one block, sending this self made block. The network will now give you a confirmation that the block is valid. By using this means they would have made away with a lot of funds before the network realizes it. This form of attack combines the artistry of a race and finney attacking mode. Cryptocurrency Exchanges are their major targets.

How does this happen,

The hacker must be in control of two nodes, one node (node 1) is connected to an exchange, while the other one (node 2) is connected to other nodes well positioned within the network.
After confirming the position of these nodes, he will then generate a private valid block. He then initiates two transactions, one with a high value lets say 30 BTC, and the other with a low value 0.1 BTC.

He will now assign node 1 with 30 BTC, which is the one that will be directed to the exchange and wait. Once he notices a need for a block on the exchange network, he transmits the block on node 1 directly to the exchange along with other recently generated blocks. Eventually all other nodes confirms the block as valid and add them to the chain. At this point the 30 BTC is validated and deposited in the hackers exchange account, which he immediately withdraws.

Thereafter he will now send the second transaction in node 2 which is connected to well positioned nodes in the network, thereby ensuring faster processing of the transaction and invalidating the first one in the process.

To successful avoid this kind of attack we need to

◇ make use of systems that do not accept a transaction just with a singular confirmation.

◇ we need to disable inbound connections only allowing that from computers we know very well. This also includes flash drives.

◇ Any outgoing terminal connections should only be to known terminals and should be duly monitored.

purple.png

7.Limitations/disadvantages of Blockchain.

51% Attacks

Despite measures taken to secure the network against hackers, it is still very susceptible to the above attack. Since this is possible when a group or individual acquires more than 50% of its computing hash power, giving them the power to disrupt the network by removing or altering transactions.

Inability to Modify Data

A data can not be modified once added to a blockchain. However, when changes needs to be done it usually very difficult and demanding, requiring a hardfork. This hardfork invalidates and abandons a block and accepting a new one instead.

The use of Private Keys.

Users have full control of their blockchain assets. The private keys gives them function. Hence, if the private keys are lost, it means that all the assets in that wallet are lost as well with no hope of recovering them.

High Energy Consumption.

Mining in blockchains require energy. Since mining is a competitive affair, miners always increases computing power to be selected as miners every ten minutes thus consuming more energy. Additionally the energy used by all the other miners that were not selected also becomes a total waste, thereby making the process inefficient.

Storage problems

The size of the blockchain is growing at an alarming rate. This causes a storage problem since multiple nodes needs to replicate each transaction. Additionally, as the networks continues to grow, it slows the speed of the network down. This can be a problem for institutions who relies on speed and fast transmissions to conduct their businesses.

Interoperability

This is a situation where blockchains cannot communicate effectively with each other. Rather they try to solve their problems in there own unique ways. That is why, up till today, certain wallets cannot transfer crypto assets to others too. For example, if you are send a coin from trc20 wallet to Erc20 wallet. You will end up losing the crypto asset. You must ensure that another trc20 address is used in the destination wallet. It is still a very big problem.

High cost of Establishing a Blockchain

It takes a whole lot of money to build and implement a blockchain technology. Individuals owning it is out of question, requires an organization with strong financial strength to do that.

So many cost are associated in doing that, such

  1. Hiring of developers

  2. Maintenance cost

  3. Licensing cost

  4. Equipment cost, etc.

Issue of anonymity

Blockchain does not require users to verify themselves. This makes it possible for user to conduct transaction without verification. As such it is open to being used for fraudulent and illegal transactions which is also bad. This illegal funds can be used for illegitimate activities.

purple.png

8. Conclusion.

Blockchain technology have so many positive vibes to easy to however there are attendant risk involved in its usage. I have also learned so much about hash generation and its usage in block validation, before being added to the blockchain. I have also learnt of the various types of attack on the blockchain and how I can be protected from them.

Overall, i must say a big thank you @stream4u for this lecture and the opportunity to make research to learn more..

Sort:  

Hi @benton3

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. Still, the information 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
7/10

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