Steemit Crypto Academy | Season 3: Week 6 | Homework post for @stream4u | Let's Open The Blockchain by @silencewan

in SteemitCryptoAcademy3 years ago

1.jpg

Introduction

hello everyone, I am excited to make my submissions on this week's crypto homework assignment. This week with professor @stream4u is all about opening The Blockchain. I will be making my submissions based on the questions asked by the professor. Without further deliberations, I will like to delve into the subject matter.

Question One: What is Blockchain and What are the types of Blockchains / Explain in detail the types of Blockchain?

The idea of blockchain comes from nowhere but from the collection of digital records, such records are called blocks and these blocks are interconnected to each other. These blocks are also then kept saved, or stored in such a way that they can not be altered or hacked by any invader. Further explaining what blockchain is all about, we will talk about the aspect that interests most, its decentralized nature is one feature that makes it unique. This system is complete when blocks keep the records or stores data of all transactions made that are being linked to other blocks that are validated in the same network. These are in a form of a chain and they are complete when all blocks are connected. This makes the blockchain system.

Looking at this in a different dimension, we see that they can also perform the task of digital ledgers which intend to store data in a very safe and secured way. Some components form together to make a very transparent distribution of data in and across the nodes of the blockchain. These components are Blocks, Nodes, and Miners

I will be explaining this component in detail. That way you can get a clear understanding of what actually Blockchain is all about.

image.png

source

Blocks

A block can be explained to be like a page of a ledger or even a record book that stores or holds information about transactions that have been made just recently in the blockchain system. Before these blocks are validated, there are processes it needs to go through, thus it is validated before it goes to add up to an already existing chain in the blockchain. We have some unique features that identify a block and these features are Number-only-used-Once of the block, Data, and Hash.

Nodes
Nodes when considered in blockchain terms are forms of devices or data points in a larger network that are interconnected in which its aim is for giving a smooth running of the blockchain network. Data that is shared within nodes in a blockchain network uses the P2P protocol I validating transactions before they are added to the chain of blocks.

Miners
Another thing I will like to talk about is the term miners. This is blockchain basis refers to how powerful computers are used in the solving of complex mathematical and computational problems, thus to validate the hash blocks, before the process, blocks and transactions through mining in the blockchain network have to go through this mining process.

After explaining g the components of the blockchain, I will like to talk about the Types of Blockchains we have in the system. We have about three types, which are;

  1. Public blockchain

  2. Private blockchain

  3. Hybrid blockchain

I will be picking each of these types and then explain in detail, what actually they are. Let us start by talking about the

Public Blockchain

The public blockchain is the type whereby access is granted to any user or anyone within the network so far as you have an internet connection that can aid you to connect to the network. This way makes the system does not restrict anyone trying to connect to the network. Also, the public blockchain makes good use of the distributed ledger technology, this way, the data is not stored in one place, it is spread across the entire network, the protocol used here is the P2P protocol. Another important thing about the public blockchain is the fact that it works is based on fighting the centralized system of working thus, making a very transparent work environment. This is done by the data that is shared or distributed across all nodes in the network with the help of the protocol used, The P2P protocol.

After talking about what the public blockchain is all about, I will move further to explain what the advantages and disadvantages are.

Advantages of Public Blockchain

  1. Security. The first thing you should know about the public blockchain is the fact that it is secured in use. All kinds of transactions made in the system are safe and secured because it uses cryptography in encrypting data, this way, it makes it safe and secured and not permissible to anyone. It also uses the decentralized way of keeping multiple records of the same multiple data across the network.

  2. Transparency. The word is self-explanatory, this is a feature and advantage of the public blockchain in which transactions that are carried out are shown to the users in the network. This means that the work that is carried out is not hidden, it is shown to all users who are available in the network.

  3. Restriction Free. The fact that there is no restriction in the network makes it a great advantage for the users of the network. Once you can meet the required stats demanded by the network. Then you wouldn't be restricted.

Private Blockchain

Talking about private blockchain, we can say that, they are the type that deals with invitations only. What this means is that it is governed by an entity that regulates the affairs. So participating parties will have to seek or require permission before they can read, write and then perform other functions like editing the blockchain. But aside from this trend, nothing more can be done. Also, the blockchain is said to have multiple layers holding data access that keeps some sort of pieces of data that are very confidential.

Advantages of the Private Blockchain

  1. The first advantage I will like to talk about is the private blockchain is that it is very fast compared to that of the public.

  2. Also, there are few participants in the blockchain which makes it a great advantage. What we can further say about this is that coming to a consensus is always so simple since there are fewer participants and as a matter of fact, more transactions can be performed.

  3. Another advantage we can talk about is credibility. The credibility of this blockchain will be based on the credibility of the authorized nodes.

Hybrid Blockchain

This type of blockchain works simultaneously with the public and that of the private blockchain. This in its work develops a private blockchain that can restrict data that do not come from the legit nodes to the network. The hybrid blockchain is fast and secure and relatively cheap as compared to a public and private blockchain.
The connected nodes in the network maintain some form of restrictions. The best way to explain this blockchain type is that it uses the public blockchain where the use of the private network is being hosted. Like I have said above, the participants are restricted which is controlled by the private blockchain.

Advantages of Hybrid blockchain

  1. The first thing I will mention is that the nodes available in the network have the access to all the data which are stored in the blockchain.

  2. Also, the fact that it can handle a lot of transactions at a mile cost rate makes it very scalable for use

  3. Thirdly, there is also privacy, privacy in the sense that, certain nodes are kept hidden from other nodes in the network.

  4. Another advantage of this type of blockchain is that it is very fast when using.

Question Two; What are the benefits of blockchain

In this chapter, I will be talking about the benefits of blockchain. Below are my points

  1. The first benefit I will talk about is the fact that it enhances security. Data is very delicate and sensitive and so blockchain has a way it can significantly alter the way this crucial data is viewed. This is done with the help of the record that is created which cannot be changed or altered. This is so because it is encrypted thereby making it not to be changed. This helps prevent fraud and also, unauthorized activities in the network.

  2. Another benefit I will be talking about is that there is greater transparency. What you should know is that, without blockchains, it will cause organizations have separate database because the blockchain method uses the distributed ledger in its transactions and this data are then recorded in multiple locations which are identical. So what this means is that all the users or participants in the network will all see the same information that is if they are all given permission. Also, the fact that they say it is transparent is that the transactions involved in this are all immutably recorded and also time and date stamped. This allows members to see what is in the entire history when a transaction is made which can virtually eliminate cases of fraud.

  3. Also, there is instant traceability. The system creates audit trails, these trails are keeping documents that keep records of assets from the start and every step in the transaction process.

  4. Another benefit is that transactions are completed in less time, making it good when talking in terms of speed.

  5. Here, the cost is lesser. We can see that because transacting cryptos through blockchains costs lesser as compared to using the traditional way, that is the banks. The fee they charge is always huge sometimes.

Question Three: Explain Blockchain Distributed ledger.

Let's pick this as a single unit before we bind them and then talk about what actually they are. Let us pick a ledger and then combined it with the blockchain since we already know what a blockchain is.

A ledger is explained as a collection of financial accounts and we k ow that blockchain talks about blocks of data. So having this in mind, we can then talk about what a blockchain distributed network is. A blockchain distributed ledger can be explained as the distribution of data and the transactions performed that are stored or kept in a form of blocks, since blockchain deals with blocks. These are recorded and stored in the nodes that are interconnected and authorized by the blockchain system. When talking about the blockchain distributed ledger, it forms the basis upon which the difference between the traditional or centralized system and that of the decentralized system. So a clear example will be, our local banking style and dealing with cryptocurrencies. The blockchain distributed ledger performs functions like ensuring that, every node available in the system always keeps track of the blocks and also the transactions performed. These are then permanently encrypted in the network that makes the systems much tight in security.

This way of keeping records makes it unique thereby we can mention a few properties of the blockchain distributed ledger. The first property that identifies it is that there is security. We already know that ledgers keep records and since this is utilized in blockchains, there is some kind of encryption if this data cannot be altered. This is a very unique property of the blockchain distributed ledger.

Also, we can talk of other properties like the fact that there is a case of an automated environment that utilizes smart contacts. We know how smart contacts function so, therefore, it makes good use of this property.

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

Blockchain Double Spending

In this chapter, I will be talking about Blockchain Double Spending. First and foremost, this is a problem that occurs concerning cryptocurrencies or digital currencies. This term double-spending has to deal with a crypto asset of the same amount being used in transactions multiple times. What this means is that there is a case where a crypto asset if used in multiple transactions say twice. This is always an issue resorting from the host or initiator of the transaction.

This issue of double-spending mostly occurs in the cryptocurrency space. Let us look at a clear example, assuming a person wants to buy an asset worth GHc 4000, through sending this digital currency, it could be manipulated such that he can buy two assets worth GHc 4000 at the same time and the same space. But taking a look at the paying with real cash. It is not possible because you will pay in cash for whatever you are purchasing and then the deal is confirmed by both parties. One gets his asset and one gets his cash. So there is no way a case of double-spend will occur here. But in the case of digital currencies, it is impossible.

Having explained what double spending is, I will like to talk about some of these types.

  • Race Attack

  • Finney attack.

  • Vector76 attack

How Bitcoin handles Blockchain Double Spending

In this chapter, I will be talking about how Bitcoin handles cases of double-spending. Bitcoin can employ a confirmation mechanism and also maintaining a very unique universal ledger which is called the Blockchain, it is said that it is similar to the traditional cash monetary systems.

Explain this, Let’s see how the Bitcoin network prevents double-spending with this scenario

Let us assume you make a 2 BTC transaction in the blockchain to a merchant, after the first transaction, you again send the same 2 BTC to another address in faking the merchant. Now what happens is that the two transactions made will be pushed into the unconfirmed pool of transactions. But in this case, only the first transaction that was made will get confirmed and also got verified by the miners available in the block. But the case of the second transaction will not be able to get enough verification and confirmation, this is as a result of the miners judging it as an invalid and so it will be dropped from the network.

image.png

source

But someone could also ask, in cases of both the transactions taken simultaneously by the miners

what happens, in this case, is that, when the transactions are considered simultaneously, then the transaction that can acquire the maximum amount of confirmations within the network is what will be considered or included in the blockchain, the last one that got fewer confirmations will be discarded.

So it is mostly recommended for the merchants to await a six minimum confirmation. What this means is that, after the transaction got added to the blockchain, the other six more blocks will be containing different other transactions get added to the blockchain after the first got added.

Question Five: 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.

Block Hash in Blockchains

In one of professor @pelon53 lectures, we learned about what hashing is, so this really makes this part of the assignment a little familiar. this can be explained as some kind of function through which encrypted demands are met and then needed to solve complex blockchain computations. This has to deal with the use of cryptography, thus solving the complex algorithms. Solving algorithms in the sense that, the data in for transaction and which is stored in the block is encrypted with the help of this block hash.

I will be using the Blockchain Demo to experiment practically, what this is all about.

1.PNG

The screenshot are taken through the Blockchain Demo Site

Every Blockchain is structured into four categories or folds. These are the block numbers, we have the nonce, we have the hash which indeed is divided into two, we have the previous hash and that of the current one, which is just the hash. As seen below, I have marked the parts with the red rectangle.
2.PNG

The screenshot are taken through the Blockchain Demo Site

3.PNG

The screenshot are taken through the Blockchain Demo Site

Let us check out something in the image above.
We see that in the first block, that is block 1. We notice that the previous hash of it is 0000000000000000000 and has a hash of 000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf. This is so because there is a term known as the Genesis block. That is what has been applied here. So every first block of a blockchain will equally have that which is also known as the Genesis block.

Now let us check in the Second Block. That is Block two, we see that block two has a previous Hash of block one and its own hash, you can see it below.

Block 2 Hash: 00012fa9b916eb9078f8d98a7864e697ae83ed54f5146bd84452cdafd043c19
Prev. Hash: 000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf

So what we can see here is that there is a connection between the two blocks, that is that of block 2 and that of block 1. So it means that, in every Blockchain, there is some kind of direct link between blocks of the blockchain.

Let me make another comparison between that of Block 3 and 4, you will then see how the blocks are linked in the blockchain.

4.PNG

The screenshot are taken through the Blockchain Demo Site

Here you can see clearly in the image above that, block three has a Prev Hash of Block 2 and its Hash, and also block 4 has a Prev Hash of block 3 and its Hash.

Prev. Block 2 hash: 000012fa9b916eb9078f8d98a7864e697ae83ed54f5146bd84452cdafd043c19

Prev. Block 3 Hash: 000012fa9b916eb9078f8d98a7864e697ae83ed54f5146bd84452cdafd043c19
Hash: 0000b9015ce2a08b61216ba5a0778545bf4ddd7ceb7bbd85dd8062b29a9140bf

Prev. Block 4 Hash:0000b9015ce2a08b61216ba5a0778545bf4ddd7ceb7bbd85dd8062b29a9140bf
Hash: 0000ae8bbc96cf89c68be6e10a865cc47c6c48a9ebec3c6cad729646cefaef83

From the above example, you see that this block has some kind of connection. They are directly linked to each other in the Blockchain network.

Lets now Talk about Adding Data to Blocks in a Blockchain.
As can be seen in the other images, there are no data generated for the blocks above, so If I try generating data for the blocks, it will also generate a new hash for the various blocks thereby necessary to mine the block. What also happens is that, you can see in the image below, that the data which I added to the block changed the
Let us look at this clear example below.

5.PNG

The screenshot are taken through the Blockchain Demo Site

Now we see that in the above image, the Nonce does not correspond to the block hash. So you can see that the interface changes to red indicating an invalid block hash. So how then can we get the hash? Let's see if we try to change the Nonce we can attain the correct hash.

Current Nonce: 11316 and it has a hash of 7cb429693d4508aa52dff8a82a29b15e8713dbf90bd2b7cc186dc66716b312b2

2.PNG

The screenshot are taken through the Blockchain Demo Site

Here is what I inputed, a Nonce of 11345 and a hash of 3cf9f4e48267af8dc08b816c2ef4dd0cbbe610c79a7f9f0744c2c8ce687cff8

1.PNG

You can see that, there are still errors, the data of the block is not getting the right hash, and the human brain can not solve all these algorithms in other to get the correct hash. So that will lead us to mine of blocks.

Mining of a Block in a Blockchain

In cryptocurrency, we can define mining to be a method of using powerful computers to solve and validate blocks in a blockchain. There is a need to use powerful and highly rated computers, computers that are so fast. Such computers consume a very amount of power so thereby mining blocks in cryptocurrency is really easy as a result of the demands needed. So let us see how mining can solve these computational problems.

Below the Pre. and the Hash, you can see the mine button, you will need to click on it and see what it will generate.
before we click on the mine button.

1.PNG

The screenshot are taken through the Blockchain Demo Site

You can see that in the image below, the window changes green. That is for the first block.
We see that mining solves these algorithms which gives us the correct blocks we want.
The correct Nonce to the data I wrote, my name is silencewan is
Nonce: 6492 and the
Hash: 000005e54c9a7c3f1031aefb4f1026fe8dac69241b4d359048ace5e98d7ceb40, since is the Genesis block, our Prev. will automatically be,
Prev. : 0000000000000000000000000000000000000000000000000000000000000000

Now let us proceed and mine for the second block and see if our blocks will be linked as we saw in the previous one.

2.PNG

The screenshot are taken through the Blockchain Demo Site

3.PNG

The screenshot are taken through the Blockchain Demo Site

Nonce: 12293
Prev. : 000005e54c9a7c3f1031aefb4f1026fe8dac69241b4d359048ace5e98d7ceb40
Hash;00003275e22c618b774fb5e8268d6c198ed2ea69d2b5bc324cafd0b0ccede0c9

After mining the bloc, you can see clearly that I acquired the right block hash for the data. And you can see that, there is a link between the blocks. The previous Hash of Block 2 is the Hash of Block 1. Block One had 0000000 since is the Genesis block. It will continue for all the blocks we will mine.
All the values that will be yield from the mine will be a valid hash.

4.PNG

The screenshot are taken through the Blockchain Demo Site

Question Sic: What Is Race Attack in blockchain? OR What Is Finney Attack in blockchain? OR What Is Vector76 Attack in blockchain?
Race Attack, Finney, and vector 76 are all types of double spending on a Blockchain. Let us look at them individually.

Finney Attack
let us explain what the Finney attack is. This type of double-spending occurs in cases where there is duplication of details of a transaction through different blocks which are being used, but one thing you have to know here is that it is only possible when the receiver accepts an unconfirmed transaction else, there would not be a case of double-spending in this type.

Race Attack
Another type of blockchain double-spending I will like to talk about is the race attack. This type of double spending in blockchain always occurs when hackers or intruders transfer multiple transactions b using the same crypto asset in a blockchain network and spending this asset before confirmation is given. It also occurs when the receiver accepts unconfirmed data in the blockchain but if the receiver confirms the transaction, there would not be a case of double-spending here.

vector 76 Attack
The last type of blockchain double-spending I will want to talk about is the vector 76 attack. This term can already create that impression of hackers invading a system. This happens when intruders send formulated crypto assets that are generated by them to a receiver in a blockchain network. These are uncontrollable sometimes. Hackers always find new ways.

Question Seven: Limitations/disadvantages of Blockchain.

Although, Blockchain has a lot of Benefits as explained previously in question 2. Here I will be talking about some of the limitations or disadvantages of the blockchain.

  1. the first thing I will like to talk about is the fact that it requires a high amount of power to mine is a great disadvantage. So what if you have no resources, it means that you cannot mine. So this is a great disadvantage.

  2. Another important disadvantage is that cost of mining will be a problem. One had to get computers that are very fast and can process and solve high-level algorithms. Such computers require a lot of infrastructures. A blockchain mining company could cover more than 500 square ft of land. This means that resources are another disadvantage.

  3. Also, there are cases of missing private keys. Once your keys are missing. there is no way it can be retrieved thereby making you lose your data.

  4. Another great disadvantage is that data modification cannot be done here. Sometimes it is necessary to update certain information in your data. But in this case, it is not possible therefore it is a great disadvantage.

  5. Sometimes in the blockchain, there could be fraudulent actions. People can transact their assets illegally leading to the issues of double-spending.

CONCLUSION

Blockchains are always interesting to talk about, blockchains are the reason we have the existence of cryptocurrencies because these digital currencies run or operate on such networks. I have analyzed the kind of blockchains we have in the system. That is, the private, public, and that of hybrid. Another interesting part of this task is that I analyzed the advantages of the types of blockchains mentioned.

I have in my submission analyze the benefits of the blockchain network. We saw how the decentralized nature of the blockchain is better than that of the centralized system. As a result of making a transparent working ecosystem, unlike that of the centralized system, where there is authority controlling affairs.

A major issue of the blockchain is the hacks that occur sometimes. As in the centralized system, hacks attacks are miles compared to that of the blockchain. I say this because the blockchain works based on decentralization. Giving power to users of the network. So hacks are most severe in here and one should take note of them.

All in all, the week's homework task was a great one, I want to thank Professor @stream4u for bringing such a wonderful topic for the week. I hope that my response will be part of the good works. Thanks to the professor.

Sort:  

Hi @silencewan

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 good Content. All topics were explained well but more details require in Blockchain Practical + Theory.
All information was explained well. In Blockchain Practical + Theory you explain Blockchain well and screenshots are provided also good. However, the information is not cleared for what if any middle of the block gets changed? Practically you did 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 

Thanks for the analysis prof. I will consider what is said in your next lecture.

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.029
BTC 75847.70
ETH 2878.96
USDT 1.00
SBD 2.57